1、合作商余额查询
2、分油账户司机可用额度
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
<view class="container">
|
||||
<!-- 搜索框 -->
|
||||
<search class="search" tips="搜索商品" @event="$navTo('pages/search/index')" />
|
||||
<select-province class='province' ref="choiceProvince" :provinces="provinceList" :value="province" @change="onProvinceChange" v-model="province" />
|
||||
<!-- 一级分类 -->
|
||||
<primary v-if="setting.style == PageCategoryStyleEnum.ONE_LEVEL_BIG.value || setting.style == PageCategoryStyleEnum.ONE_LEVEL_SMALL.value"
|
||||
:display="setting.style" :list="list" />
|
||||
@@ -16,7 +15,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectProvince from '@/components/select-province/select-province'
|
||||
import MescrollCompMixin from '@/components/mescroll-uni/mixins/mescroll-comp'
|
||||
import { setCartTabBadge } from '@/core/app'
|
||||
import SettingKeyEnum from '@/common/enum/setting/Key'
|
||||
@@ -38,8 +36,7 @@
|
||||
Empty,
|
||||
Primary,
|
||||
Secondary,
|
||||
Commodity,
|
||||
SelectProvince
|
||||
Commodity
|
||||
},
|
||||
mixins: [MescrollCompMixin],
|
||||
data() {
|
||||
@@ -53,9 +50,6 @@
|
||||
trade: {},
|
||||
// 正在加载中
|
||||
isLoading: true,
|
||||
// 地区
|
||||
provinceList: [],
|
||||
province: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -77,26 +71,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initPage(){
|
||||
try {
|
||||
// 第一步:获取商城设置(等待返回)
|
||||
const setting = await SettingModel.data(false) // 如果你不传参数,默认根据配置决定是否用缓存
|
||||
console.log('商城设置:', setting)
|
||||
const trade = setting[SettingKeyEnum.TRADE.value]
|
||||
this.provinceList = trade.province_list.split(',')
|
||||
// 第二步:获取本地已选择的省份
|
||||
const savedProvince = uni.getStorageSync('province')
|
||||
|
||||
if (savedProvince) {
|
||||
this.province = savedProvince
|
||||
this.onRefreshPage()
|
||||
} else {
|
||||
this.$refs.choiceProvince.open()
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error('获取商城设置失败:', e)
|
||||
}
|
||||
// 分类不再按省份过滤,进页面直接加载
|
||||
initPage(){
|
||||
this.onRefreshPage()
|
||||
},
|
||||
|
||||
// 刷新页面
|
||||
@@ -136,7 +113,6 @@
|
||||
initSetting(setting) {
|
||||
this.setting = setting[SettingKeyEnum.PAGE_CATEGORY_TEMPLATE.value]
|
||||
this.trade = setting[SettingKeyEnum.TRADE.value]
|
||||
this.provinceList = this.trade.province_list.split(',')
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -146,15 +122,6 @@
|
||||
initCategory(result) {
|
||||
this.list = result.data.list
|
||||
},
|
||||
|
||||
onProvinceChange(val) {
|
||||
this.province = val
|
||||
// 存储省份
|
||||
uni.setStorageSync('province', val)
|
||||
// 加载页面数据
|
||||
this.onRefreshPage()
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -197,15 +164,5 @@
|
||||
left: var(--window-left);
|
||||
right: var(--window-right);
|
||||
z-index: 9;
|
||||
width: 78%;
|
||||
}
|
||||
.province {
|
||||
position: fixed;
|
||||
top: var(--window-top);
|
||||
right: var(--window-right);
|
||||
width: 20%;
|
||||
height: 40px;
|
||||
z-index: 9;
|
||||
line-height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user