diff --git a/pages/index/index.vue b/pages/index/index.vue index 6d7e46f..94051cb 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,16 +4,15 @@ + v-if="userInfoData.mer_info&&userInfoData.mer_info.mer_avatar" mode="aspectFill" @click="byset"> - + - + {{userInfoData.mer_info.mer_name?userInfoData.mer_info.mer_name:'暂无信息'}} @@ -871,8 +870,7 @@ }, 10) } }, - onReady() { - }, + onReady() {}, onShow() { if (this.loadEndFlag) { @@ -1130,7 +1128,6 @@ }, //关闭弹窗 recuo() { - if (this.num > 0) { this.num = 15 this.isFshow = false @@ -1259,6 +1256,11 @@ //商家设置 byset() { + // #ifdef H5 + this.$refs.popup1.open() + // #endif + + // #ifndef H5 if (this.userid) { uni.navigateTo({ url: '/pages/product/basicSet?mer_id=' + this.userInfoData.service.mer_id @@ -1267,6 +1269,7 @@ this.isAuto = true; this.isShowAuth = true } + // #endif }, //个人详情 diff --git a/pages/product/addGoodDetail/addGoodDetail.vue b/pages/product/addGoodDetail/addGoodDetail.vue index 20d65b8..749e732 100644 --- a/pages/product/addGoodDetail/addGoodDetail.vue +++ b/pages/product/addGoodDetail/addGoodDetail.vue @@ -288,7 +288,6 @@ productCreate, productUpdate, productDetail - } from '@/api/product.js'; import uploadImgVideo from "../addGood/components/uploadImgVideo.vue" import form from "../../../uni_modules/uview-ui/libs/config/props/form"; @@ -318,9 +317,7 @@ store_info: "", product_id: "", "store_name": "", - "imageList": [ - - ], + "imageList": [], attr: [{ detail: [{ attr: 'name' @@ -328,9 +325,7 @@ value: " " }, ], "attrValue": [{ - detail: { - - }, + detail: {}, "price": "", "unit_name": "", "wholesale_unit_name": "", @@ -351,24 +346,17 @@ "cate_name": "", "unit_name": "", "cate_id": '', - "mer_cate_id": [ - - ], + "mer_cate_id": [], "mer_cate_name": "", "spec_type": "", - "specifica": "", - "delivery_way": [ - - ], + "delivery_way": [], "delivery_free": "1", "temp_id": "", "tempName": "", "once_min_count": "", "image": "", - "slider_image": [ - "" - ], + "slider_image": [""], "is_good": 0, "is_gift_bag": 0, "sort": "", @@ -388,7 +376,6 @@ value: '' }] } - }, mer_id: "", maxLength: 30, @@ -403,31 +390,26 @@ }, }, range: [{ - value: 0, - text: "篮球" - }, - { - value: 1, - text: "足球" - }, - { - value: 2, - text: "游泳" - }, - ], + value: 0, + text: "篮球" + }, { + value: 1, + text: "足球" + }, { + value: 2, + text: "游泳" + }], text: "", text1: "", value1: "", checkboxValue1: [], checkboxList1: [{ - name: '到店核销', - value: '1', - }, - { - name: '快递配送', - value: '2', - } - ], + name: '到店核销', + value: '1', + }, { + name: '快递配送', + value: '2', + }], attrRules: { price: '单价不能为空', unit_name: '计量单位不能为空', @@ -462,7 +444,6 @@ message: '请填写完整商品规格', trigger: ['change', 'blur'], }], - 'store_name': { type: 'string', required: true, @@ -491,8 +472,6 @@ message: '请上传商品详情图', trigger: ['blur', 'change'] }, - - }, radio: '', switchVal: false @@ -509,10 +488,6 @@ }, methods: { - test(index) { - // this.formData.imageList.splice(index, 1) - console.log(this.formData, index) - }, preViewImg(url) { let that = this uni.previewImage({ diff --git a/pages/product/list/index.vue b/pages/product/list/index.vue index 41c80b6..ac2592f 100644 --- a/pages/product/list/index.vue +++ b/pages/product/list/index.vue @@ -7,14 +7,9 @@ :clearabled="false" @clickIcon="scanQRcodes"> - - - - - @@ -35,16 +30,18 @@ - + 零售: {{item.price}}/{{item.unit_name}} - + 批发: {{item.attrValue[0].wholesale_price}}/{{item.attrValue[0].wholesale_unit_name}} + style="font-size: 22rpx;">¥{{item.wholesale_price}}/{{item.wholesale_unit_name}} @@ -277,7 +274,7 @@ sjList: [2, 4], xjItem: "", showOverly: false, - isWholeSale: false, + isWholeSale: '', status: 'loadmore', current: "", where: { @@ -336,7 +333,8 @@ this.newUser = Boolean(options.diver) this.getUserInfo() this.getCategoryList(); - this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2; + this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale; + if (options.type) { this.where.type = options.type } diff --git a/pages/product/updateStock/updateStock.vue b/pages/product/updateStock/updateStock.vue index 19e060b..f6a1b6e 100644 --- a/pages/product/updateStock/updateStock.vue +++ b/pages/product/updateStock/updateStock.vue @@ -18,10 +18,13 @@ 库存: {{attrvalueStock}} - - {{short.attrValue && short.attrValue[0].price}}/{{short.attrValue && short.attrValue[0].unit_name}} + + {{short.price }}/{{short.unit_name }} + + + {{short.wholesale_price }}/{{short.wholesale_unit_name }} @@ -100,6 +103,7 @@ product_id: '' }, attrvalueStock: 0, + isWholeSale: '' } }, onLoad(options) { @@ -108,6 +112,8 @@ if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo); this.mer_id = userInfo.service.mer_id; this.initInfo(); + + this.isWholeSale = userInfo?.mer_info?.wholesale; }, onShow() {}, methods: {