From 739f6524a4f0cf52c2a783e0f6dbf636b37183b2 Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Tue, 3 Sep 2024 18:02:48 +0800 Subject: [PATCH] 11 --- common/http.interceptor.js | 4 +- page_fenbao/shiyong.vue | 22 ++++--- page_user/deviceedit.vue | 4 +- page_user/devicelist.vue | 114 ++++++++++++++++++++++++++----------- page_user/homepage.vue | 28 ++++++--- page_user/promote.vue | 4 +- page_user/sjhezuo.vue | 15 +++++ pages.json | 7 +++ 8 files changed, 141 insertions(+), 57 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 60214bd..ee180eb 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -20,8 +20,8 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.2.223:3302', - // baseUrl: 'https://kang.chuangtewl.com/prod-api', + // baseUrl: 'http://192.168.2.223:3302', + baseUrl: 'https://kang.chuangtewl.com/prod-api', loadingText: '努力加载中~', loadingTime: 800, // 设置自定义头部content-type diff --git a/page_fenbao/shiyong.vue b/page_fenbao/shiyong.vue index 1b93df2..b45f0be 100644 --- a/page_fenbao/shiyong.vue +++ b/page_fenbao/shiyong.vue @@ -3,18 +3,11 @@ - + + + {{item.arrivalName == undefined ? '--' : item.arrivalName}}(平台公司合作伙伴商渠道商创业者经营场所){{item.point}}% - ¥{{item.amount== undefined ? '--' : otem.amount}} + @@ -145,7 +145,7 @@ }, methods: { getxq(){ - this.$u.get(`/agent/device/${this.deviceId}`).then(res =>{ + this.$u.get(`/app/device/${this.deviceId}`).then(res =>{ if(res.code == 200){ this.obj = res.data } diff --git a/page_user/devicelist.vue b/page_user/devicelist.vue index 1a9c200..5e619d6 100644 --- a/page_user/devicelist.vue +++ b/page_user/devicelist.vue @@ -67,7 +67,7 @@ 所属创业者 - {{item.userName == undefined ? '--' : item.userName}} + {{item.userName == undefined ? '--' : item.userName}} 未绑定 @@ -107,10 +107,7 @@ room: '', shows: false, showtz: false, - listtz: [{ - value: '1', - label: '张三' - }, ], + listtz: [], lists: [], list: [{ value: '1', @@ -131,10 +128,12 @@ type: 2, keyword: '', statusList: '', - deviceId: '' + deviceId: '', + type:'' } }, - onLoad() { + onLoad(option) { + this.type = option.type this.getlist() this.gettzr() this.getchangsuo() @@ -237,6 +236,8 @@ icon: 'success', duration: 1000, }) + this.wateringList = [] + this.pagenum = 1 this.getlist() } else { uni.showToast({ @@ -265,6 +266,8 @@ icon: 'success', duration: 1000, }) + this.wateringList = [] + this.pagenum = 1 this.getlist() } else { uni.showToast({ @@ -276,21 +279,68 @@ }) }, - // 获取列表 + //获取列表 getlist() { - this.$u.get( - `/agent/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.statusList}&keyword=${this.keyword}` - ).then(res => { - if (res.code == 200) { - this.total = res.total - if (res.rows.length > 0) { - // 有数据,追加到列表 - this.wateringList = this.wateringList.concat(res.rows) - this.pagenum++ + // 合作伙伴(代理) + if(this.type == 2){ + this.$u.get( + `/agent/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.statusList}&keyword=${this.keyword}` + ).then(res => { + if (res.code == 200) { + this.total = res.total + if (res.rows.length > 0) { + // 有数据,追加到列表 + this.wateringList = this.wateringList.concat(res.rows) + this.pagenum++ + } } - } - }) + }) + // 创业者(投资人) + }else if(this.type == 4){ + this.$u.get( + `/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.statusList}&keyword=${this.keyword}` + ).then(res => { + if (res.code == 200) { + this.total = res.total + if (res.rows.length > 0) { + // 有数据,追加到列表 + this.wateringList = this.wateringList.concat(res.rows) + this.pagenum++ + } + } + }) + // 渠道商(业务员) + }else if(this.type == 3){ + this.$u.get( + `/biz/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.statusList}&keyword=${this.keyword}` + ).then(res => { + if (res.code == 200) { + this.total = res.total + if (res.rows.length > 0) { + // 有数据,追加到列表 + this.wateringList = this.wateringList.concat(res.rows) + this.pagenum++ + } + } + }) + // 经营场所 + }else if(this.type == 5){ + this.$u.get( + `store/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&statusList=${this.statusList}&keyword=${this.keyword}` + ).then(res => { + if (res.code == 200) { + this.total = res.total + if (res.rows.length > 0) { + // 有数据,追加到列表 + this.wateringList = this.wateringList.concat(res.rows) + this.pagenum++ + } + } + }) + } }, + + // 滚动到底部 onScrollToLower() { if (this.total > this.wateringList.length) { @@ -329,22 +379,22 @@ }) }, // 渠道商 - gettzr() { - this.$u.get(`/biz/user/allInvestorList`).then(res => { - if (res.code == 200) { - res.data.forEach(item => { - this.listtz.push({ - label: item.userName, - value: item.userId - }) - }) - } - }) - }, + // gettzr() { + // this.$u.get(`/biz/user/allInvestorList`).then(res => { + // if (res.code == 200) { + // res.data.forEach(item => { + // this.listtz.push({ + // label: item.userName, + // value: item.userId + // }) + // }) + // } + // }) + // }, // 获取所有的经营场所 getchangsuo() { - this.$u.get(`/agent/user/allInvestorList`).then(res => { + this.$u.get(`/agent/store/allList`).then(res => { if (res.code == 200) { res.data.forEach(item => { this.lists.push({ diff --git a/page_user/homepage.vue b/page_user/homepage.vue index 34bab8e..5491810 100644 --- a/page_user/homepage.vue +++ b/page_user/homepage.vue @@ -124,7 +124,7 @@ - 推广管理 + {{jytxt}} @@ -157,7 +157,9 @@ firsTime:'', lasTime:'', infoobj:{}, - tongobj:{} + tongobj:{}, + jytxt:'', + type:'' } }, onLoad() { @@ -194,6 +196,12 @@ this.$u.get(`/app/user/userInfo`).then(res => { if(res.code == 200){ this.infoobj = res.data + this.type = res.data.type + if(res.data.type == 5){ + this.jytxt = '场所管理' + }else{ + this.jytxt = '推广管理' + } this.gettongji() } }) @@ -218,12 +226,18 @@ }) }else if(num == 3){ uni.navigateTo({ - url:'/page_user/devicelist' + url:'/page_user/devicelist?type=' + this.type }) }else if(num == 4){ - uni.navigateTo({ - url:'/page_user/tuiguang' - }) + if(this.jytxt == '推广管理'){ + uni.navigateTo({ + url:'/page_user/tuiguang' + }) + }else{ + uni.navigateTo({ + url:'/page_user/changsuo' + }) + } }else if(num == 5){ uni.navigateTo({ url:'/page_fenbao/listtaocan' @@ -281,7 +295,7 @@ let yesterday = new Date() yesterday.setDate(yesterday.getDate() - 1) this.firsTime = this.formatDate(yesterday) - this.lasTime = this.formatDate(new Date()) + this.lasTime = this.formatDate(yesterday) this.gettongji() } else if (num == 3) { let today = new Date() diff --git a/page_user/promote.vue b/page_user/promote.vue index d727ac7..291e66e 100644 --- a/page_user/promote.vue +++ b/page_user/promote.vue @@ -120,8 +120,8 @@ canvasId: 'qrcode', componentInstance: this, text: 'https://kang.chuangtewl.com/sc?c=' + text, - size: 150, - margin: 0, + size: 170, + margin: 0, backgroundColor: '#ffffff', foregroundColor: '#000000', fileType: 'jpg', diff --git a/page_user/sjhezuo.vue b/page_user/sjhezuo.vue index cda40f7..398dd6d 100644 --- a/page_user/sjhezuo.vue +++ b/page_user/sjhezuo.vue @@ -34,6 +34,9 @@ 马上加盟 立即赚钱 + + 《商家合作角色权益与职责》 + @@ -78,6 +81,11 @@ } }, methods: { + btnxq(){ + uni.navigateTo({ + url:'/page_fenbao/sjhzxq' + }) + }, confirm(){ this.type = '' }, @@ -166,6 +174,13 @@ page { background-color: #F7FAFE; } + .botwz{ + margin-top: 20rpx; + color: #8883F0; + font-size: 28rpx; + width: 100%; + text-align: center; + } #active{ position: fixed; bottom: 300rpx !important; diff --git a/pages.json b/pages.json index 3eebef8..c2e667f 100644 --- a/pages.json +++ b/pages.json @@ -323,6 +323,13 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } + },{ + "path": "sjhzxq", + "style": { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } } ] }