商户入住bug修复

This commit is contained in:
zmj 2024-05-03 15:02:21 +08:00
parent d7900f8eb1
commit 4972fb2884
6 changed files with 70 additions and 43 deletions

View File

@ -862,7 +862,8 @@
"path": "settled/index", "path": "settled/index",
"style": { "style": {
"navigationBarTitleText": "商家入驻", "navigationBarTitleText": "商家入驻",
"navigationStyle": "custom" "navigationStyle": "custom",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -303,12 +303,23 @@
}, },
onShow() { onShow() {
let that = this let that = this
this.street = this.$store.state.storage.address.townName;
this.getNav();
if (this.isLogin) {
this.emptyText = '暂无可用应用'
this.jurisdiction = false
this.initAllAppLet(true);
} else {
this.emptyText = '请登录'
this.jurisdiction = true
}
this.getUserInfo();
this.imgUrls = uni.getStorageSync('swiperImgList');
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (Boolean(this.userInfo.service?.mer_id)) { if (Boolean(this.userInfo.service?.mer_id)) {
isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then( isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then(
res => { res => {
if (res.data == 'true') { if (res.data == 'true') {
this.initMenu(true)
setTimeout(() => { setTimeout(() => {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query query
@ -324,18 +335,7 @@
}) })
} }
// #endif // #endif
this.street = this.$store.state.storage.address.townName;
this.getNav();
if (this.isLogin) {
this.emptyText = '暂无可用应用'
this.jurisdiction = false
this.initAllAppLet();
} else {
this.emptyText = '请登录'
this.jurisdiction = true
}
this.getUserInfo();
this.imgUrls = uni.getStorageSync('swiperImgList');
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getUserInfo() this.getUserInfo()
@ -366,7 +366,7 @@
}, },
methods: { methods: {
openDiver() { openDiver() {
console.log("open") // console.log("open")
this.subNVue.show('zoom-out', 300) this.subNVue.show('zoom-out', 300)
uni.$emit('diverGatherEmit', this.elInfo); uni.$emit('diverGatherEmit', this.elInfo);
}, },
@ -444,10 +444,10 @@
} }
}) })
}, },
initAllAppLet() { initAllAppLet(flag) {
applet().then(res => { applet().then(res => {
this.AllMenuList = res.data; this.AllMenuList = res.data;
this.initMenu(); this.initMenu(flag);
this.showControllerAllLet(); this.showControllerAllLet();
}).catch(e => { }).catch(e => {
// console.log(e); // console.log(e);
@ -474,13 +474,11 @@
if (list.find(t => t.name == item.name)?.name != item.name) all.push(item); if (list.find(t => t.name == item.name)?.name != item.name) all.push(item);
else now.push(item) else now.push(item)
}) })
console.log(flag) if (flag && !now.length) {
console.log(now.length) this.$set(now, 0, all[0])
}
this.AllMenuList = all; this.AllMenuList = all;
this.nowMenuList = now; this.nowMenuList = now;
if (flag && !now.length) {
this.nowMenuList[0] = this.AllMenuList[0]
}
} catch (e) { } catch (e) {
this.nowMenuList = []; this.nowMenuList = [];

View File

@ -520,9 +520,27 @@
}) })
}, },
}, },
onPullDownRefresh: function() {
getIntention(this.$store.state.app.userInfo.uid).then(res => {
if (Object.keys(res.data).length == 0) return
this.formData = res.data
this.step = this.formData.step
this.formData.phone = this.$store.state.app.userInfo.account
if (this.formData.status == 1) {
getUnimpInfo().then(res => {
this.uniMpInfo = res.data
})
}
})
uni.stopPullDownRefresh()
// this.page = 1;
// this.pageloading = false;
// this.loadend = false;
// this.assistList = []
// this.getAssistProductList();
},
onLoad(option) { onLoad(option) {
this.formData.phone = this.$store.state.app.userInfo.account this.formData.phone = this.$store.state.app.userInfo.account
console.log(option, 'oprionsf')
merClassifly().then(res => { merClassifly().then(res => {
this.MerchantCategoryColumn = [res.data] this.MerchantCategoryColumn = [res.data]
}) })

View File

@ -176,13 +176,12 @@
<view class="user-menus" style="margin-top: 20rpx;"> <view class="user-menus" style="margin-top: 20rpx;">
<view class="title skeleton-rect">我的2服务</view> <view class="title skeleton-rect">我的2服务</view>
<view class="menu-box"> <view class="menu-box">
<block v-for="(item,index) in personalMenu" :key="index"> <block v-for="(item,index) in personalMenu" :key="index" :id="'target'+index">
<view v-if="item.isShow" class="item "> <view v-if="item.isShow" class="item ">
<view @click="authTo(item.url)" class="item-count"> <view @click="authTo(item.url)" class="item-count">
<image v-if="showSkeleton" :id="'target'+index" <image v-if="showSkeleton" class="skeleton_image skeleton-radius"></image>
class="skeleton_image skeleton-radius"></image> <image v-else :src="item.pic" class="targets"></image>
<image v-else :src="item.pic" :id="'target'+index" class="target"></image> <text>{{item.name+index}}</text>
<text>{{item.name}}</text>
</view> </view>
</view> </view>
</block> </block>
@ -480,7 +479,7 @@
setTimeout(() => { setTimeout(() => {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query query
.select("#target0") .select(".targets")
.boundingClientRect((data) => { .boundingClientRect((data) => {
that.elInfo = data that.elInfo = data
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -504,10 +503,13 @@
}, },
onShow: function() { onShow: function() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// this.subNvue = uni.getSubNVueById('userSubnvu')
// this.subNvue.show('slide-in-left', 300)
// uni.$emit('openUserSubnvue', JSON.stringify(this.elInfo))
if (Boolean(uni.getStorageSync('is_new_user')) && this.elInfo) { if (Boolean(uni.getStorageSync('is_new_user')) && this.elInfo) {
this.subNvue = uni.getSubNVueById('userSubnvu') this.subNvue = uni.getSubNVueById('userSubnvu')
this.subNvue.show('slide-in-left', 300) this.subNvue.show('slide-in-left', 300)
uni.$emit('openUserSubnvue', JSON.stringify(data)) uni.$emit('openUserSubnvue', JSON.stringify(this.elInfo))
} }
// #endif // #endif

View File

@ -6,14 +6,14 @@
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}"> <view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">我知道了</text> <text class="next-btn-text font" style="line-height: 76rpx;" @click="next">我知道了</text>
</view> </view>
<view class="target" :style="{left:left-13.5,top:top-13.5}"> <view class="target" :style="{left:left-20,top:top-13.5}">
<image src="/static/images/fabu.png" class="target-icon"></image> <image src="/static/images/fabu.png" class="target-icon"></image>
<text class="target-text">商家入驻</text> <text class="target-text">商家入驻</text>
</view> </view>
<view :style="{left:left-13.5,top:top-70}"> <view :style="{left:left-20,top:top-70}" class="trans1">
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image> <image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
</view> </view>
<view class="tips-box" :style="{left:left,top:top-170}"> <view class="tips-box" :style="{left:left-13.5,top:top-154}">
<view class="tips" style="position: absolute;padding-left: 20px;"> <view class="tips" style="position: absolute;padding-left: 20px;">
<view class="tras" :class="{act:isAct}"> <view class="tras" :class="{act:isAct}">
<text style="font-size: 28rpx;line-height: 100rpx;color: white;">点击我的页面,进行商户入驻</text> <text style="font-size: 28rpx;line-height: 100rpx;color: white;">点击我的页面,进行商户入驻</text>
@ -22,7 +22,7 @@
<image src="/static/images/starpng.png" class="start" mode=""> <image src="/static/images/starpng.png" class="start" mode="">
</image> </image>
</view> </view>
<image src="/static/images/greenLine.png" class="greenLine" :style="{left:left,top:top-70}" mode=""> <image src="/static/images/greenLine.png" class="greenLine" :style="{left:left-3.5,top:top-70}" mode="">
</image> </image>
</view> </view>
</template> </template>
@ -34,8 +34,8 @@
screenHeight: 800, screenHeight: 800,
screenWidth: 375, screenWidth: 375,
isAct: false, isAct: false,
left: 36.272727966308594, left: -100,
top: 401 top: -100,
} }
}, },
methods: { methods: {
@ -51,6 +51,8 @@
onLoad() { onLoad() {
let that = this let that = this
uni.$on('openUserSubnvue', (data) => { uni.$on('openUserSubnvue', (data) => {
console.log('获取到的data')
console.log(JSON.parse(data))
that.left = JSON.parse(data).left that.left = JSON.parse(data).left
that.top = JSON.parse(data).top that.top = JSON.parse(data).top
}) })
@ -160,6 +162,13 @@
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0); transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
} }
.trans1 {
/* transition-property: left, top;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0); */
}
.act { .act {
width: 462rpx; width: 462rpx;
} }

View File

@ -49,7 +49,8 @@ const loadMP = async (id) => {
else uni.$emit('showLoading', true, `初始化中... 99%`) else uni.$emit('showLoading', true, `初始化中... 99%`)
}, 200) }, 200)
let downloadTask = uni.downloadFile({ let downloadTask = uni.downloadFile({
url: info.data.version_info?.dow_url, // url: info.data.version_info?.dow_url,
url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/36e40202405031202367449.wgt",
success(res) { success(res) {
wgtFile = res.tempFilePath; wgtFile = res.tempFilePath;
setTimeout(() => { setTimeout(() => {
@ -106,7 +107,7 @@ const loadMPx = async (id) => {
}, 200) }, 200)
let downloadTask = uni.downloadFile({ let downloadTask = uni.downloadFile({
url: info.data.appInfo.dow_url, url: './__UNI__7626C0F.wgt',
success(res) { success(res) {
wgtFile = res.tempFilePath; wgtFile = res.tempFilePath;
console.log('初始化完成', wgtFile); console.log('初始化完成', wgtFile);
@ -220,7 +221,8 @@ const loadAppletMP = async (data) => {
else uni.$emit('showLoading', true, `初始化中... 99%`) else uni.$emit('showLoading', true, `初始化中... 99%`)
}, 200) }, 200)
let downloadTask = uni.downloadFile({ let downloadTask = uni.downloadFile({
url: data.url, // url: data.url,
url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/3ffde202405031254278460.wgt",
success(res) { success(res) {
wgtFile = res.tempFilePath; wgtFile = res.tempFilePath;
console.log('初始化完成', wgtFile); console.log('初始化完成', wgtFile);
@ -237,7 +239,6 @@ const loadAppletMP = async (data) => {
} }
}); });
downloadTask.onProgressUpdate((res) => { downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress);
if (res.progress > count) count += 10; if (res.progress > count) count += 10;
if (count >= 90) { if (count >= 90) {
clearInterval(timer); clearInterval(timer);
@ -352,9 +353,7 @@ const open = (id = null) => {
if (id.type == 2) { if (id.type == 2) {
setTimeout(() => { setTimeout(() => {
console.log("发送给小程序的", id) console.log("发送给小程序的", id)
mp.sendUniMPEvent(appid, 'tocustomlist', { mp.sendUniMPEvent(appid, 'tocustomlist', id, (ret) => {
path: id
}, (ret) => {
console.log("开始发送消息") console.log("开始发送消息")
}); });
}, 3000) }, 3000)