fix: 首页UI重构设计
This commit is contained in:
@@ -20,10 +20,11 @@
|
||||
{
|
||||
"path": "pages/home/home",
|
||||
"style": {
|
||||
// "navigationBarTitleText": "custom"
|
||||
"navigationStyle": "default",
|
||||
"navigationBarBackgroundColor": "#298DFF",
|
||||
"navigationBarTextStyle": "white"
|
||||
// "navigationBarTitleText": "custom",
|
||||
"navigationStyle": "custom"
|
||||
// "navigationStyle": "default",
|
||||
// "navigationBarBackgroundColor": "#298DFF",
|
||||
// "navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
1268
pages/home/home.vue
1268
pages/home/home.vue
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="content safe-area-inset-bottom">
|
||||
<!-- 平台资质证明 -->
|
||||
<!-- 资质证明 -->
|
||||
<view class="section">
|
||||
<view class="section-title">平台资质证明</view>
|
||||
<view class="section-title">{{ isPlatform ? '平台资质证明' : '店铺资质证明' }}</view>
|
||||
<view class="qualifications-list">
|
||||
<view class="qualification-item" v-for="(item, index) in qualifications" :key="index" @click="previewImage(item.image)">
|
||||
<view class="qualification-content">
|
||||
@@ -59,6 +59,8 @@ import { getPlatformQualificationsApi, getPlatformInfoApi } from '../../request/
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
storeId: '', // 店铺ID,0表示平台
|
||||
isPlatform: false, // 是否为平台资质
|
||||
qualifications: [],
|
||||
contactInfo: {
|
||||
phone: '',
|
||||
@@ -72,15 +74,28 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
// 接收store_id参数,如果传入0则显示平台资质,否则显示店铺资质
|
||||
if (options.store_id !== undefined) {
|
||||
this.storeId = options.store_id;
|
||||
this.isPlatform = options.store_id === '0' || options.store_id === 0;
|
||||
} else {
|
||||
// 默认使用当前店铺ID
|
||||
this.storeId = uni.getStorageSync('store_id') || '11001';
|
||||
this.isPlatform = false;
|
||||
}
|
||||
// 动态设置页面标题
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.isPlatform ? '平台资质' : '店铺资质'
|
||||
});
|
||||
this.getQualifications();
|
||||
this.getPlatformInfoData();
|
||||
},
|
||||
methods: {
|
||||
// 获取平台资质证明
|
||||
// 获取资质证明
|
||||
getQualifications() {
|
||||
getPlatformQualificationsApi({
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
store_id: this.storeId,
|
||||
}).then((res) => {
|
||||
if (res.data.code == 0 || res.data.errcode == 0) {
|
||||
this.qualifications = res.data.data || res.data.result || [];
|
||||
@@ -99,7 +114,7 @@ export default {
|
||||
// 获取平台信息
|
||||
getPlatformInfoData() {
|
||||
getPlatformInfoApi({
|
||||
store_id: uni.getStorageSync('store_id') || '11001',
|
||||
store_id: this.storeId,
|
||||
}).then((res) => {
|
||||
if (res.data.code == 0 || res.data.errcode == 0) {
|
||||
const data = res.data.data || res.data.result || {};
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
<text class="val">{{ productDetail.guozi_no }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 平台资质入口 -->
|
||||
<view class="platform-qualification-entry" @click="goPlatformQualification">
|
||||
<text>查看平台资质</text>
|
||||
<u-icon name="arrow-right" size="28" color="#909399"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 3. 物流提示 -->
|
||||
@@ -642,6 +648,12 @@ export default {
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
// 跳转平台资质页面
|
||||
goPlatformQualification() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/platform-info?store_id=0'
|
||||
});
|
||||
},
|
||||
onIllnessConfirm(e) {
|
||||
const index = e[0];
|
||||
this.prescriptionFormData.illnessInfo = this.illnessOptions[index].value;
|
||||
@@ -747,6 +759,18 @@ export default {
|
||||
.val { color: #303133; font-weight: 500; }
|
||||
}
|
||||
}
|
||||
|
||||
.platform-qualification-entry {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #F7F8FA;
|
||||
padding: 24rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
/* 3. 物流提示 */
|
||||
|
||||
Reference in New Issue
Block a user