This commit is contained in:
weipengfei 2023-12-25 16:25:03 +08:00
parent d94cf09c99
commit dbf2da56e4
5 changed files with 27 additions and 13 deletions

View File

@ -122,9 +122,10 @@
setDatas(datas, goodsNum) { setDatas(datas, goodsNum) {
getProductDetail(datas.product_id).then((res)=>{ getProductDetail(datas.product_id).then((res)=>{
this.attr = res.data.attr; this.attr = res.data.attr;
this.attr.forEach((item, index)=>{ if(this.attr.length>0) this.attr.forEach((item, index)=>{
this.changeAttr(index, 0); this.changeAttr(index, 0);
}) })
else this.changeSkuKey = '';
}) })
this.goodsNum = goodsNum; this.goodsNum = goodsNum;
this.datas = datas; this.datas = datas;

View File

@ -237,6 +237,8 @@
name: '种植溯源', name: '种植溯源',
icon: '/static/applet/icons.png', icon: '/static/applet/icons.png',
data: { data: {
// id: "__UNI__9B6D67A",
// url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/ce21c202312251443415370.wgt",
id: "__UNI__D087881", id: "__UNI__D087881",
url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3b1b1202312230957197588.wgt", url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/3b1b1202312230957197588.wgt",
}, },

View File

@ -742,7 +742,7 @@
delete query.category_id; delete query.category_id;
} }
else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // pid else if(!this.merchantTow.pid) query.cate_pid = this.storeParam.category_id; // pid
else query.category_id = this.storeParam.category_id; // else query.cate_id = this.storeParam.category_id; //
cloudWarehouse(query).then(res => { cloudWarehouse(query).then(res => {
// res.data.list = res.data.list.map(item=>{ // res.data.list = res.data.list.map(item=>{
// item.product = item; // item.product = item;

View File

@ -686,7 +686,11 @@
// //
getCartList: function(isChange) { getCartList: function(isChange) {
let that = this; let that = this;
getCartList({product_type: this.product_type}).then(res => { let query = {
product_type: this.product_type,
}
if(this.source) query.source = this.source;
getCartList(query).then(res => {
res.data.list.forEach((item, index) => { res.data.list.forEach((item, index) => {
item.allCheck = true item.allCheck = true
item.list.forEach((goods, j) => { item.list.forEach((goods, j) => {

View File

@ -20,7 +20,7 @@
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'" <image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
alt=""> alt="">
</view> </view>
<view class="application-record" @click="jumpToList"> <view class="application-record" @click="jumpToList" v-if="!mer_i_id">
申请记录 申请记录
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</view> </view>
@ -449,8 +449,7 @@ import { Toast } from '../../../libs/uniApi';
this.getGoodsDetails(options.mer_i_id) this.getGoodsDetails(options.mer_i_id)
}) })
} }
this.getArea() else this.getArea()
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45; this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
}, },
onShow() { onShow() {
@ -532,27 +531,34 @@ import { Toast } from '../../../libs/uniApi';
getVillage({ getVillage({
street_code: e street_code: e
}).then(res => { }).then(res => {
self.$set(self.business, 2, res.data) self.$set(self.business, 2, res.data);
if(self.mer_i_id&&!this.business_name){
let area = self.business[0].find(item=>item.code==self.area_id)?.name;
let street = self.business[1].find(item=>item.code==self.street_id)?.name;
let village = self.business[2].find(item=>item.id==self.village_id)?.name;
// console.log(area, street, village);
this.business_name = `${area} ${street} ${village}`
}
}) })
}, },
// //
getStreet(e) { getStreet(e, street) {
const self = this; const self = this;
getStreet({ getStreet({
area_code: e area_code: e
}).then(res => { }).then(res => {
self.$set(self.business, 1, res.data) self.$set(self.business, 1, res.data)
self.getVillage(self.business[1][0].code) self.getVillage(street?street:self.business[1][0].code)
}) })
}, },
// //
getArea() { getArea(code=null, street=null) {
getArea({ getArea({
city_code: 510500 city_code: 510500
}).then(res => { }).then(res => {
this.business[0] = res.data; this.business[0] = res.data;
this.code1 = this.business[0][0].code; this.code1 = code ? code : this.business[0][0].code;
this.getStreet(this.code1) this.getStreet(this.code1, street)
}) })
}, },
// //
@ -606,13 +612,14 @@ import { Toast } from '../../../libs/uniApi';
this.street_id = resData.street_id this.street_id = resData.street_id
this.mer_storeType = resData.mer_storeType this.mer_storeType = resData.mer_storeType
this.village_id = resData.village_id this.village_id = resData.village_id
}) })
this.business_license = resData.images[0]; this.business_license = resData.images[0];
resData.images.shift(); resData.images.shift();
this.pics = resData.images; this.pics = resData.images;
this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array) this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array)
this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr) this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr)
this.business_name = '';
this.getArea(this.area_id, this.street_id);
if(resData.mer_type_id!=12){ if(resData.mer_type_id!=12){
this.shoplist('mer_services_agree') this.shoplist('mer_services_agree')
}else{ }else{