diff --git a/pages.json b/pages.json index acb3c3f..4d1083b 100644 --- a/pages.json +++ b/pages.json @@ -21,17 +21,31 @@ "app-plus": { "scrollIndicator": false, //禁用原生导航栏 "subNVues": [{ - "id": "concatIndex", // 唯一标识 - "path": "pages/index/subnvue/concat", // 页面路径 - "type": "popup", - "style": { - "position": "absolute", - "dock": "right", - "width": "750rpx", - "height": "1000px", - "background": "rgba(0,0,0,0.2)" + "id": "concatIndex", // 唯一标识 + "path": "pages/index/subnvue/concat", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1000px", + "background": "rgba(0,0,0,0.2)" + } + }, + { + "id": "newUser", // 唯一标识 + "path": "pages/index/subnvue/newUser", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1000px", + "background": "rgba(0,0,0,0.2)" + } } - }] + + ] } } }, { @@ -81,7 +95,22 @@ "style": { "enablePullDownRefresh": true, "navigationBarTitleText": "个人中心", - "navigationStyle": "custom" + "navigationStyle": "custom", + "app-plus": { + "scrollIndicator": false, //禁用原生导航栏 + "subNVues": [{ + "id": "userSubnvu", // 唯一标识 + "path": "pages/user/subnvue/index", // 页面路径 + "type": "popup", + "style": { + "position": "absolute", + "dock": "right", + "width": "750rpx", + "height": "1500rpx", + "background": "rgba(0,0,0,0.2)" + } + }] + } } }, { @@ -832,7 +861,8 @@ { "path": "settled/index", "style": { - "navigationBarTitleText": "商家入驻" + "navigationBarTitleText": "商家入驻", + "navigationStyle": "custom" } }, { diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index c73835d..de98f17 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -172,11 +172,9 @@ - - @@ -247,6 +245,9 @@ } from "@/api/public"; // #ifdef APP-PLUS import uniMP from '@/utils/uniMP.js'; + import { + isNewMer + } from '@/api/user.js'; // #endif export default { @@ -301,6 +302,19 @@ }, onShow() { + // #ifdef APP-PLUS + 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('resdata', res.data) + if (res.data == 'true' && this.elInfo) { + + this.subNvue = uni.getSubNVueById('concat') + this.subNvue.show('slide-in-left', 300) + // this.openDiver() + } + }) + } + // #endif this.street = this.$store.state.storage.address.townName; this.getNav(); if (this.isLogin) { @@ -320,8 +334,10 @@ }, beforeDestroy() {}, onReady() { - if (uni.getStorageSync('is_new_user')) { - let that = this + // #ifdef APP-PLUS + let that = this + if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) { + this.initMenu(true) setTimeout(() => { const query = uni.createSelectorQuery().in(this); query @@ -329,13 +345,33 @@ .boundingClientRect((data) => { let info = JSON.stringify(data) that.elInfo = data - // #ifdef APP-PLUS that.openDiver() - // #endif }) .exec(); }, 1000) + } + + + // #endif + + + // if (uni.getStorageSync('is_new_user')) { + // let that = this + // setTimeout(() => { + // const query = uni.createSelectorQuery().in(this); + // query + // .select(".gatherDiver") + // .boundingClientRect((data) => { + // let info = JSON.stringify(data) + // that.elInfo = data + // // #ifdef APP-PLUS + // that.openDiver() + // // #endif + // }) + // .exec(); + // }, 1000) + // } }, // #ifdef APP-PLUS onPageScroll(e) { @@ -356,17 +392,6 @@ uni.$emit('showLoading', false); }, methods: { - test() { - let data = { - "name": "供销助农平台", - "app_id": "__UNI__1EE148C", - "pic": "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/0fa43202312291702314919.png", - "url": "https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/457d9202404291733397921.wgt", - "version": "1.4.5" - } - uniMP.loadAppletMP(data) - - }, openDiver() { this.subNVue.show('zoom-out', 300) uni.$emit('diverGatherEmit', this.elInfo); @@ -465,7 +490,7 @@ } }, // 初始化菜单 - initMenu() { + initMenu(flag = false) { let nowMenu = uni.getStorageSync('gatherMenuList'); try { let list = JSON.parse(nowMenu || '[]'); @@ -476,7 +501,7 @@ else now.push(item) }) // if() - if (uni.getStorageSync('is_new_user') && !now.length) now[0] = all[0]; + if (flag && !now.length) now[0] = all[0]; // console.log(all, now) this.AllMenuList = all; diff --git a/pages/gather/subnvue/concat.nvue b/pages/gather/subnvue/concat.nvue index 80d83c3..52a3ce5 100644 --- a/pages/gather/subnvue/concat.nvue +++ b/pages/gather/subnvue/concat.nvue @@ -41,7 +41,6 @@ this.subNVue.hide('zoom-in', 300, ) setTimeout(() => { uni.$emit('diverGatherSubEmit'); - uni.setStorageSync('is_new_user', false) }, 500) }, @@ -54,7 +53,6 @@ let that = this this.subNVue = uni.getSubNVueById('concat') uni.$on('diverGatherEmit', (data) => { - console.log('收到data', data) that.left = data.left that.top = data.top }) diff --git a/pages/index/index.vue b/pages/index/index.vue index c206e70..51acce2 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -597,16 +597,28 @@ }; }, // #endif + + + + + created(options) { + let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 + let curRoute = routes[routes.length - 1].route //获取当前页面路由 + this.activeRouter = '/' + curRoute + }, onLoad(options) { // #ifdef APP - this.subNVue = uni.getSubNVueById('concatIndex') - uni.$on('diverIndexSubEmit', function(data) { - that.subNVue.hide('slide-out-right', 300) - setTimeout(() => { - uni.switchTab({ - url: '/pages/gather/gather' - }) - }, 400) + uni.$on('offSubnvue', () => { + this.subNvue.hide('slide-out-left') + uni.switchTab({ + url: '/pages/user/index' + }) + }) + uni.$on('diverIndexSubEmit', () => { + this.subNvue.hide('slide-out-left') + uni.switchTab({ + url: '/pages/gather/gather' + }) }) // #endif @@ -627,21 +639,35 @@ that.pageLoad(options); this.$store.dispatch('INIT_CONFIG'); }, - created(options) { - let routes = getCurrentPages(); // 获取当前打开过的页面路由数组 - let curRoute = routes[routes.length - 1].route //获取当前页面路由 - this.activeRouter = '/' + curRoute - }, + onShow() { + console.log(Boolean(this.$store.state.app.userInfo.service?.mer_id)) let that = this; - // console.log() - if (this.$store.state.app.userInfo.service?.mer_id) { + // #ifdef APP-PLUS + if (Boolean(uni.getStorageSync('is_new_user'))) { + this.subNvue = uni.getSubNVueById('newUser') + this.subNvue.show('slide-in-left', 300) + } + 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('resdata', res.data) if (res.data == 'true') { - this.openDiver() + this.subNvue = uni.getSubNVueById('concatIndex') + this.subNvue.show('slide-in-left', 300) + // this.openDiver() } }) } + + // #endif + // console.log() + // if (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 => { + // if (res.data == 'true') { + // this.openDiver() + // } + // }) + // } // if (this.$store.state.app.userInfo) { // console.log(this.$store.state.app.userInfo.service?.mer_id, 'sdsd') @@ -702,7 +728,7 @@ methods: { openDiver() { this.subNVue.show('slide-in-left', 300) - uni.$emit('diverIndexEmit', this.userInfo); + // uni.$emit('diverIndexEmit', this.userInfo); }, loadCoupon() { if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) { diff --git a/pages/index/subnvue/newUser.nvue b/pages/index/subnvue/newUser.nvue new file mode 100644 index 0000000..bc05f2f --- /dev/null +++ b/pages/index/subnvue/newUser.nvue @@ -0,0 +1,165 @@ + + + + + \ No newline at end of file diff --git a/pages/store/applicationRecord/index.vue b/pages/store/applicationRecord/index.vue index f3f47ea..c583286 100644 --- a/pages/store/applicationRecord/index.vue +++ b/pages/store/applicationRecord/index.vue @@ -1,7 +1,43 @@ - - \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index f88f3bf..2a3d8da 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -100,19 +100,19 @@ 补贴余额 (元) --> - - - - - 我的余额 (元) - - - - - ¥{{userInfo.now_money||"0.00"}} - - + + + + + 我的余额 (元) + + + + + ¥{{userInfo.now_money||"0.00"}} + + @@ -174,13 +174,14 @@ - 我的服务 + 我的2服务 - + - - + + {{item.name}} @@ -238,7 +239,7 @@ 备案号:蜀ICP备2022030133号-2A 增值电信营业许可证号:川B2-20221250 联系我们:08302669767 - {{appVersion}} + {{appVersion}} diff --git a/static/images/pointer.png b/static/images/pointer.png index 9570f99..edd4fad 100644 Binary files a/static/images/pointer.png and b/static/images/pointer.png differ diff --git a/static/images/starpng.png b/static/images/starpng.png new file mode 100644 index 0000000..51c1e52 Binary files /dev/null and b/static/images/starpng.png differ