diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 12ca17e..481d819 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,7 +19,7 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.2.27:10002', + // baseUrl: 'http://192.168.2.18:10002', baseUrl: 'https://kg.chuangtewl.com/prod-api', // loadingText: '加载中...', // loadingTime: 1000, diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue index 786f1af..3c35244 100644 --- a/page_components/fuwu/index.vue +++ b/page_components/fuwu/index.vue @@ -198,7 +198,7 @@ payNo:'', q:'', channelId:'', - swindleflag:true, + swindleflag:false, phonenumber:'', mchShowBillMobile:'', telslag:false, @@ -244,7 +244,6 @@ }, onShow() { // this.getuserinfo() - this.swindleflag = true this.getzfqd() setTimeout(()=>{ if (this.id != '') { @@ -285,33 +284,9 @@ }) }, methods: { - // 点击我已知晓判断设备是否有套餐 + // 点击我已知晓隐藏防骗提示 btnswindleflag(){ this.swindleflag = false - if(this.userId == this.deviceobj.userId && this.deviceobj.suitList.length == 0){ - let that = this - uni.showModal({ - title: '提示', - content: '该设备暂无套餐,是否前去配置?', - showCancel: false, - success: function(res) { - if (res.confirm) { - uni.setStorageSync('tcidlist', that.arrlists) - uni.navigateTo({ - url: '/page_components/newtaocan' - }) - } else if (res.cancel) { - - } - } - }) - }else if(this.userId != this.deviceobj.userId && this.deviceobj.suitList.length == 0){ - uni.showToast({ - title:'该设备暂无套餐,请联系商家添加套餐在使用', - icon: 'none', - duration:5000 - }) - } }, getzfqd(){ this.$u.get(`/app/channel/recharge/enabledList`).then(res =>{ @@ -457,6 +432,36 @@ this.$u.get(`/app/device/${this.id}/withSuitList`).then((res) => { if (res.code == 200) { this.deviceobj = res.data + // 判断该设备有没有套餐 + if(this.deviceobj.suitList.length == 0 || this.deviceobj.suitList == ''){ + this.swindleflag = false + if(this.userId == this.deviceobj.userId && this.deviceobj.suitList.length == 0){ + let that = this + uni.showModal({ + title: '提示', + content: '该设备暂无套餐,是否前去配置?', + showCancel: false, + success: function(res) { + if (res.confirm) { + uni.setStorageSync('tcidlist', that.arrlists) + uni.navigateTo({ + url: '/page_components/newtaocan' + }) + } else if (res.cancel) { + + } + } + }) + }else if(this.userId != this.deviceobj.userId && this.deviceobj.suitList.length == 0){ + uni.showToast({ + title:'该设备暂无套餐,请联系商家添加套餐在使用', + icon: 'none', + duration:5000 + }) + } + }else{ + this.swindleflag = true + } this.zfobj = res.data.suitList[0] let targetDateStr = this.deviceobj.expireTime this.mchShowBillMobile = res.data.mchShowBillMobile diff --git a/page_components/wifilist/index.vue b/page_components/wifilist/index.vue index 640e15d..a5343a7 100644 --- a/page_components/wifilist/index.vue +++ b/page_components/wifilist/index.vue @@ -6,6 +6,9 @@ WIFI选择 + + 当前WIFI配网:{{objlist.wifi}} + 请选择您需要连接的2.4GwiFi名称 @@ -196,12 +199,7 @@ diff --git a/pages/index/index.vue b/pages/index/index.vue index 8ae3fb5..c342e94 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -55,9 +55,6 @@ - @@ -80,7 +77,6 @@ - {{item.name}} @@ -1059,7 +1055,6 @@ this.groupList = res.data.filter(item => { return item.name === '全部' }) - // console.log(this.groupLists,'第一') this.storeId = this.groupList[0].storeId this.getlist() } @@ -1082,12 +1077,9 @@ } if (this.pagenum > 1) { this.pagenum++ - // this.wateringList = [] - // this.wateringList = this.wateringList.concat(res.rows) this.wateringList = res.rows this.shujuflag = false this.qingqiuflag = true - // console.log(this.wateringList); this.groupLists.forEach(groupItem => { groupItem.wateringList }) @@ -1103,29 +1095,11 @@ } }) }) - // this.groupLists[0] = this.groupLists[0].map(group => { - // // 使用一个对象来跟踪已经遇到的 deviceId - // const seenDeviceIds = {}; - // // 使用 reduce 来创建一个新的 wateringList,只包含唯一的 deviceId - // const uniqueWateringList = group.wateringList.reduce((acc, item) => { - // if (!seenDeviceIds[item.deviceId]) { - // seenDeviceIds[item.deviceId] = true; - // acc.push(item); - // } - // return acc; - // }, []); - // // 返回更新后的组对象 - // return { - // ...group, - // wateringList: uniqueWateringList - // }; - // }) uni.hideLoading() } else { this.pagenum++ this.wateringList = res.rows this.qingqiuflag = true - // console.log(this.wateringList,'000') this.groupLists.forEach(groupItem => { groupItem.wateringList = [] }) @@ -1139,24 +1113,6 @@ } }) }) - // console.log(this.groupLists) - // this.groupLists[0] = this.groupLists[0].map(group => { - // // 使用一个对象来跟踪已经遇到的 deviceId - // const seenDeviceIds = {}; - // // 使用 reduce 来创建一个新的 wateringList,只包含唯一的 deviceId - // const uniqueWateringList = group.wateringList.reduce((acc, item) => { - // if (!seenDeviceIds[item.deviceId]) { - // seenDeviceIds[item.deviceId] = true; - // acc.push(item); - // } - // return acc; - // }, []); - // // 返回更新后的组对象 - // return { - // ...group, - // wateringList: uniqueWateringList - // }; - // }) uni.hideLoading() } this.isLoading = false @@ -1167,75 +1123,6 @@ } }) }, - changeGp(item, index) { - // console.log(item); - this.pagenum = 1 - this.showfz = false - if (item == 1) { - this.getDeviceList() - } else { - if (item.storeId == null) { - this.pagenum = 1 - // this.wateringList = [] - this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => { - if (res.code == 200) { - this.total = res.total - if (res.rows.length > 0) { - // 有数据,追加到列表 - // this.wateringList = this.wateringList.concat(res.rows) - // this.pagenum++ - this.shujuflag = false - uni.hideLoading() - } else { - // 没有更多数据 - this.shujuflag = true - uni.hideLoading() - } - if (this.pagenum > 1) { - this.wateringList = this.wateringList.concat(res.rows) - this.shujuflag = false - } else { - this.wateringList = res.rows - } - this.pagenum++ - this.isLoading = false - } - }) - } else { - this.pagenum = 1 - // this.wateringList = [] - this.$u.get(`/app/device/list?storeId=${item.storeId}&pageNum=${this.pagenum}&pageSize=${this.pagesize}`).then((res) => { - if (res.code == 200) { - this.total = res.total - // if(this.pagenum > 1){ - // this.wateringList = this.wateringList.concat(res.rows) - // }else{ - // this.wateringList = res.rows - // } - if (res.rows.length > 0) { - // 有数据,追加到列表 - // this.wateringList = this.wateringList.concat(res.rows) - // this.pagenum++ - this.shujuflag = false - uni.hideLoading() - } else { - // 没有更多数据 - this.shujuflag = true - uni.hideLoading() - } - if (this.pagenum > 1) { - this.wateringList = this.wateringList.concat(res.rows) - this.shujuflag = false - } else { - this.wateringList = res.rows - } - this.pagenum++ - this.isLoading = false - } - }) - } - } - }, tosetpage() { this.showfz = false uni.navigateTo({ @@ -1440,10 +1327,8 @@ }, getDeviceList() { this.$u.get("/app/device/list").then((res) => { - // this.$forceUpdate() if (res.code == 200) { this.deviceList = res.rows.filter(row => row.isDefault === true) - // console.log(this.deviceList) this.total = res.total if (this.deviceList == '') { this.addflag = true @@ -1473,7 +1358,6 @@ this.sbflag = true } uni.setStorageSync('deviceId', this.deviceInfo.deviceId) - // this.initChart() this.order() }) },