diff --git a/App.vue b/App.vue index bf1898f..e15ef70 100644 --- a/App.vue +++ b/App.vue @@ -94,9 +94,6 @@ uni.onHostEventReceive((event, data) => { if (event == 'tocustomlist') { - Toast("收到消息") - Toast(JSON.stringify(event)) - Toast(JSON.stringify(data)) if (data.page_type == 1) { uni.switchTab({ url: data.route diff --git a/pages/index/index.vue b/pages/index/index.vue index 04049ab..11ef8e8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -900,30 +900,13 @@ }, onShow() { - if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) { - isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then( - res => { - console.log(res.data) - if (res.data == 'true' && this.elInfo) { - let that = this - const query = uni.createSelectorQuery().in(this); - query - .select(".tools-two-img") - .boundingClientRect((data) => { - let info = JSON.stringify(data) - that.elInfo = data - // #ifdef APP-PLUS - that.openDiver() - // #endif - }) - .exec(); - } - }) - } - if (this.loadEndFlag) { this.getUserInfo(); this.codelist(); + console.log('wcnmonshow') + } else { + this.isNewUser() + console.log('1111111111') } }, @@ -932,6 +915,38 @@ this.$bus.$off('value-updated') }, methods: { + isNewUser(data) { + let user; + if (data) { + user = data + } else { + user = this.$store.state.app.userInfo + } + setTimeout(() => { + if (Boolean(user.service?.mer_id)) { + isNewMer(user.uid, user.service + ?.mer_id).then( + res => { + if (res.data == 'true' && this.elInfo) { + let that = this + setTimeout(() => { + const query = uni.createSelectorQuery().in(this); + query + .select(".tools-two-img") + .boundingClientRect((data) => { + let info = JSON.stringify(data) + that.elInfo = data + // #ifdef APP-PLUS + that.openDiver() + // #endif + }) + .exec(); + }, 500) + } + }) + } + }, 500) + }, test1() { isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => { console.log(res, 'res') @@ -1389,6 +1404,8 @@ this.userid = res.data.uid this.userInfoData = res.data; this.$store.commit('SET_USERINFO', res.data); + console.log('resdata', res.data) + this.isNewUser(res.data) this.merchantData.phone = res.data.phone; if (res.data.mer_info.is_company == 0) !this.merchantData.company_name ? this.merchantData .company_name = "" : null; diff --git a/pages/index/subnvue/concat.nvue b/pages/index/subnvue/concat.nvue index 16341c9..552bb43 100644 --- a/pages/index/subnvue/concat.nvue +++ b/pages/index/subnvue/concat.nvue @@ -58,7 +58,6 @@ this.subNVue = uni.getSubNVueById('concat') let that = this uni.$on('diverIndexEmit', (data) => { - console.log('data', data) that.left = data.left that.top = data.top }) diff --git a/pages/product/addGoodDetail/addGoodDetail.vue b/pages/product/addGoodDetail/addGoodDetail.vue index b6442f9..b5a90ed 100644 --- a/pages/product/addGoodDetail/addGoodDetail.vue +++ b/pages/product/addGoodDetail/addGoodDetail.vue @@ -732,9 +732,10 @@ formData.attr.splice(1, 999) formData.attr[0].value = ' ' formData.attr[0].detail = formData.attrValue.map(item => item.sku) - formData.attrValue.forEach(item => { + + formData.attrValue.forEach((item, index) => { item.detail = {} - item.detail[' '] = item.sku + item.detail[' '] = formData.attr[0].detail[index] }) this.formData = formData }, diff --git a/pages/product/addGoodDetail/goodsPrice.vue b/pages/product/addGoodDetail/goodsPrice.vue index de8af91..da6f304 100644 --- a/pages/product/addGoodDetail/goodsPrice.vue +++ b/pages/product/addGoodDetail/goodsPrice.vue @@ -256,22 +256,12 @@ uni.$u.toast(errList[0]) return } - // let flag = false - // if (this.formData.attr.length > 1) { - // this.formData.attr.forEach(item => { - // if (!item.value) { - // flag = true - // } - // }) - // } - // if (flag) { - // uni.$u.toast('请填写规格名称') - // return - // } + console.log(this.attrValue) // 校验结束 this.formData.attr[0].detail = [] this.attrValue.forEach(item => { - item.detail[' '] = item.sku + typeof(item.detail) == 'object' ? + item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku) console.log(this.formData.attr) this.formData.attr[0].detail.push(item.sku) }) diff --git a/pages/product/list/index.vue b/pages/product/list/index.vue index d5f4621..21e16cd 100644 --- a/pages/product/list/index.vue +++ b/pages/product/list/index.vue @@ -109,8 +109,8 @@ 扫码入库 - - 发布商品{{where.type}} + + 发布商品 @@ -346,27 +346,31 @@ this.where.page = ++this.where.page; this.getList(this.mer_id, false); }, - onReady() { + onShow() { if (!this.newUser) return let that = this - const query = uni.createSelectorQuery().in(this); - query - .select(".fbsp") - .boundingClientRect((data) => { - let info = JSON.stringify(data) - that.elInfo = data - // #ifdef APP-PLUS - setTimeout(() => { + setTimeout(() => { + const query = uni.createSelectorQuery().in(this); + query + .select(".wcnm") + .boundingClientRect((data) => { + let info = JSON.stringify(data) + console.log(data) + that.elInfo = data + // #ifdef APP-PLUS that.openDiver() - }, 1000) - // #endif - }) - .exec(); + // #endif + }) + .exec(); + }, 500) + }, methods: { openDiver() { let that = this const subNVue = uni.getSubNVueById('concatpro') + // console.log(that.elInfo) + // return subNVue.show('zoom-out', 300, () => { uni.$emit('diverProductEmit', that.elInfo); }) @@ -1609,7 +1613,7 @@ .footer { width: 750rpx; - height: 150rpx; + height: 75px; background-color: white; position: fixed; bottom: 0; @@ -1622,11 +1626,11 @@ .footer-li { border: 1px solid #989898; font-size: 32rpx; - padding: 14rpx 27rpx; + padding: 7px 27rpx; border-radius: 40rpx; overflow: hidden; width: 184rpx; - height: 72rpx; + height: 36px; } .act { diff --git a/pages/product/list/subnvue/concat.nvue b/pages/product/list/subnvue/concat.nvue index d494e2d..80f3def 100644 --- a/pages/product/list/subnvue/concat.nvue +++ b/pages/product/list/subnvue/concat.nvue @@ -1,7 +1,7 @@