发布商品bu修复

This commit is contained in:
zmj 2024-05-03 15:03:12 +08:00
parent fd5181b55c
commit eaff04f995
7 changed files with 72 additions and 65 deletions

View File

@ -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

View File

@ -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;

View File

@ -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
})

View File

@ -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
},

View File

@ -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)
})

View File

@ -109,8 +109,8 @@
<view class="footer-li" @click="handClick(2)">
扫码入库
</view>
<view class="footer-li act fbsp" @click="handClick(3)">
发布商品{{where.type}}
<view class="footer-li act wcnm" id='fbsp' @click="handClick(3)">
<text>发布商品</text>
</view>
</view>
@ -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 {

View File

@ -1,7 +1,7 @@
<template>
<view class="" style="width: 750rpx;height: 100%;">
<view class="jump" @click="jump">
<text class="font">跳过</text>
<text class="font">跳过 </text>
</view>
<view class="target" :style="{left:left+'px',top:top+'px'}" v-if="top">
<text style="color:white;text-align: center;font-size: 32rpx;line-height: 32px;">发布商品</text>
@ -33,11 +33,10 @@
return {
isActive: false,
left: -100,
top: -100,
// left: 227.82386779785156,
// top: 777.7727661132812,
top: 0,
subNVue: null,
bottomBtn: -100,
screenHeight: 672,
}
},
methods: {
@ -61,10 +60,12 @@
this.subNVue = uni.getSubNVueById('concatpro')
uni.$on('diverProductEmit', (data) => {
that.left = data.left
that.top = data.top
const res = uni.getSystemInfo({
success: (res => {
that.bottomBtn = res.screenHeight - 150
this.screenHeight = res.screenHeight
that.top = res.screenHeight - 55
// console.log('screenheight', this.screenHeight)
})
});
}),
@ -159,8 +160,6 @@
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
.jump {