From 4972fb28845cc0c1c5cc0691db4155b6346bed77 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 3 May 2024 15:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E5=85=A5=E4=BD=8Fbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 3 ++- pages/gather/gather.vue | 40 +++++++++++++++++------------------ pages/store/settled/index.vue | 20 +++++++++++++++++- pages/user/index.vue | 16 ++++++++------ pages/user/subnvue/index.nvue | 21 ++++++++++++------ utils/uniMP.js | 13 ++++++------ 6 files changed, 70 insertions(+), 43 deletions(-) diff --git a/pages.json b/pages.json index 4d1083b..631b7b2 100644 --- a/pages.json +++ b/pages.json @@ -862,7 +862,8 @@ "path": "settled/index", "style": { "navigationBarTitleText": "商家入驻", - "navigationStyle": "custom" + "navigationStyle": "custom", + "enablePullDownRefresh": true } }, { diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index 90071c6..a40afe5 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -303,12 +303,23 @@ }, onShow() { 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 if (Boolean(this.userInfo.service?.mer_id)) { isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then( res => { if (res.data == 'true') { - this.initMenu(true) setTimeout(() => { const query = uni.createSelectorQuery().in(this); query @@ -324,18 +335,7 @@ }) } // #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() { this.getUserInfo() @@ -366,7 +366,7 @@ }, methods: { openDiver() { - console.log("open") + // console.log("open") this.subNVue.show('zoom-out', 300) uni.$emit('diverGatherEmit', this.elInfo); }, @@ -444,10 +444,10 @@ } }) }, - initAllAppLet() { + initAllAppLet(flag) { applet().then(res => { this.AllMenuList = res.data; - this.initMenu(); + this.initMenu(flag); this.showControllerAllLet(); }).catch(e => { // console.log(e); @@ -474,13 +474,11 @@ if (list.find(t => t.name == item.name)?.name != item.name) all.push(item); else now.push(item) }) - console.log(flag) - console.log(now.length) + if (flag && !now.length) { + this.$set(now, 0, all[0]) + } this.AllMenuList = all; this.nowMenuList = now; - if (flag && !now.length) { - this.nowMenuList[0] = this.AllMenuList[0] - } } catch (e) { this.nowMenuList = []; diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index e891af9..7deb15c 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -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) { this.formData.phone = this.$store.state.app.userInfo.account - console.log(option, 'oprionsf') merClassifly().then(res => { this.MerchantCategoryColumn = [res.data] }) diff --git a/pages/user/index.vue b/pages/user/index.vue index 2a3d8da..c9a64f4 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -176,13 +176,12 @@ 我的2服务 - + - - - {{item.name}} + + + {{item.name+index}} @@ -480,7 +479,7 @@ setTimeout(() => { const query = uni.createSelectorQuery().in(this); query - .select("#target0") + .select(".targets") .boundingClientRect((data) => { that.elInfo = data // #ifdef APP-PLUS @@ -504,10 +503,13 @@ }, onShow: function() { // #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) { this.subNvue = uni.getSubNVueById('userSubnvu') this.subNvue.show('slide-in-left', 300) - uni.$emit('openUserSubnvue', JSON.stringify(data)) + uni.$emit('openUserSubnvue', JSON.stringify(this.elInfo)) } // #endif diff --git a/pages/user/subnvue/index.nvue b/pages/user/subnvue/index.nvue index caad48c..c04c7d2 100644 --- a/pages/user/subnvue/index.nvue +++ b/pages/user/subnvue/index.nvue @@ -6,14 +6,14 @@ 我知道了 - + 商家入驻 - + - + 点击我的页面,进行商户入驻 @@ -22,7 +22,7 @@ - + @@ -34,8 +34,8 @@ screenHeight: 800, screenWidth: 375, isAct: false, - left: 36.272727966308594, - top: 401 + left: -100, + top: -100, } }, methods: { @@ -51,6 +51,8 @@ onLoad() { let that = this uni.$on('openUserSubnvue', (data) => { + console.log('获取到的data') + console.log(JSON.parse(data)) that.left = JSON.parse(data).left that.top = JSON.parse(data).top }) @@ -160,6 +162,13 @@ 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 { width: 462rpx; } diff --git a/utils/uniMP.js b/utils/uniMP.js index 45f2e0c..96a2958 100644 --- a/utils/uniMP.js +++ b/utils/uniMP.js @@ -49,7 +49,8 @@ const loadMP = async (id) => { else uni.$emit('showLoading', true, `初始化中... 99%`) }, 200) 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) { wgtFile = res.tempFilePath; setTimeout(() => { @@ -106,7 +107,7 @@ const loadMPx = async (id) => { }, 200) let downloadTask = uni.downloadFile({ - url: info.data.appInfo.dow_url, + url: './__UNI__7626C0F.wgt', success(res) { wgtFile = res.tempFilePath; console.log('初始化完成', wgtFile); @@ -220,7 +221,8 @@ const loadAppletMP = async (data) => { else uni.$emit('showLoading', true, `初始化中... 99%`) }, 200) let downloadTask = uni.downloadFile({ - url: data.url, + // url: data.url, + url: "https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/3ffde202405031254278460.wgt", success(res) { wgtFile = res.tempFilePath; console.log('初始化完成', wgtFile); @@ -237,7 +239,6 @@ const loadAppletMP = async (data) => { } }); downloadTask.onProgressUpdate((res) => { - // console.log('初始化进度' + res.progress); if (res.progress > count) count += 10; if (count >= 90) { clearInterval(timer); @@ -352,9 +353,7 @@ const open = (id = null) => { if (id.type == 2) { setTimeout(() => { console.log("发送给小程序的", id) - mp.sendUniMPEvent(appid, 'tocustomlist', { - path: id - }, (ret) => { + mp.sendUniMPEvent(appid, 'tocustomlist', id, (ret) => { console.log("开始发送消息") }); }, 3000)