diff --git a/pages/index/consumer/index.vue b/pages/index/consumer/index.vue index 29485dd..ec87682 100644 --- a/pages/index/consumer/index.vue +++ b/pages/index/consumer/index.vue @@ -396,6 +396,18 @@ this.isnorefresh = 'refresh'; this.userInfo = uni.getStorageSync("weapp_session_userInfo_data") console.log(this.userInfo.showPhoneStatus) + if (this.isnorefresh == 'refresh') { + this.buildingID = uni.getStorageSync('buildingID').id; + this.nextPage = 1; + this.recordList = [] + // this.getMyCustom() + this.getFreeList() + this.getfindKeywordsList() + this.getFromSource(); + // this.isnorefresh = ''; + this.isRefresh = false; + this.getMyCustom() + } }, onPullDownRefresh() { @@ -417,18 +429,7 @@ let newmenulist = uni.getStorageSync('weapp_session_Menu_data'); this.permissions.commonly1 = newmenulist.khgl_ck; this.permissions.commonly2 = newmenulist.khgl_gj; - if (this.isnorefresh == 'refresh') { - this.buildingID = uni.getStorageSync('buildingID').id; - this.nextPage = 1; - this.recordList = [] - // this.getMyCustom() - this.getFreeList() - this.getfindKeywordsList() - this.getFromSource(); - // this.isnorefresh = ''; - this.isRefresh = false; - this.getMyCustom() - } + }, onReachBottom() { if (this.totalRecord == this.nextPage) { diff --git a/pages/index/learning.vue b/pages/index/learning.vue index b9ea312..d260907 100644 --- a/pages/index/learning.vue +++ b/pages/index/learning.vue @@ -168,10 +168,21 @@ var i = uni.getStorageSync('fendianindex') this.buildingID = uni.getStorageSync('buildingID').id; this.clocktab(i) - this.leftIndex = 0 - this.infoinit() + // this.leftIndex = 0 + // this.infoinit() + let left = uni.getStorageSync('left'); + if(left!=undefined){ + this.leftIndex = left.split(',')[0] + this.getSecond(left.split(',')[1]) + this.infoinit(left.split(',')[1]) + }else{ + this.leftIndex = 0 + this.infoinit() + } }, - + // onLoad() { + // this.infoinit() + // }, methods: { // 跳转部分学习 quclicks(item) { @@ -249,7 +260,10 @@ routerclick(item, index) { if (this.leftIndex === index) return this.leftIndex = index - this.getSecond(this.equinoctial[index].marketingId) + uni.setStorageSync("left", index+','+item.marketingId); //写入缓存 + + let mid = uni.getStorageSync('left').split(',')[1] + this.getSecond(mid) // // return // uni.navigateTo({ // url: "/pages/learning/Equinoctiallearning?id=" + item.marketingId + "&biaoqian=" + item.name @@ -263,7 +277,14 @@ this.ceninit() } else { uni.setStorageSync("fendianindex", 1); //写入缓存 - this.infoinit() + this.leftIndex = uni.getStorageSync('left').split(',')[0] + let mid = uni.getStorageSync('left').split(',')[1] + if(mid!=undefined){ + this.getSecond(mid) + }else{ + this.infoinit() + } + } }, @@ -332,7 +353,7 @@ }, - infoinit() { + infoinit(mid) { let obj = { itemId: this.buildingID } @@ -347,7 +368,11 @@ success: (data) => { if (data.data.code == 10000) { this.equinoctial = data.data.data - this.getSecond(data.data.data[0].marketingId) + if(mid!=undefined){ + this.getSecond(mid) + }else{ + this.getSecond(data.data.data[0].marketingId) + } } else { uni.showToast({ title: data.data.message, diff --git a/pages/mine/registerCode.vue b/pages/mine/registerCode.vue index 39265d1..5094457 100644 --- a/pages/mine/registerCode.vue +++ b/pages/mine/registerCode.vue @@ -1,7 +1,7 @@ @@ -106,7 +104,7 @@ onLoad(options){ const sceneStr = decodeURIComponent(options.scene); console.log(options) - this.projectId = sceneStr + this.parames.projectId = sceneStr }, watch:{ parames:{ @@ -122,27 +120,28 @@ }, methods: { - save() { + save() { if (this.parames.name.length == 0) { - uni.showToast({ + uni.showToast({ icon: "none", title: "姓名不能为空" }) return; } }, - getPhoneNumber(e){ - console.log(e) + getPhoneNumber(e){ this.qrCodeUrl = domain.baseUrl if(e.detail.errMsg=="getPhoneNumber:ok"){ let data = { code:e.detail.code, + appid:uni.getAccountInfoSync().miniProgram.appId, } uni.request({ url:this.qrCodeUrl + '/code/loginSessionKey', method:"GET", data, success:(res)=> { + console.log(res.data.data) let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber this.parames.phone = phoneNum if(this.parames.phone!=null && this.parames.phone!=""){ @@ -161,14 +160,19 @@ 'Access-Token': uni.getStorageSync('weapp_session_login_data').token }, success: (addres) => { - console.log(addres.data,111) if(addres.data.code == 10000){ uni.reLaunch({ url:'/pages/mine/registerResult' }) + }else{ + uni.showToast({ + icon: "none", + title: addres.data.message + }) } } }) + } } @@ -177,7 +181,6 @@ }else{ return; } - }, changeSex(sex) { this.parames.sex = sex; diff --git a/utils/domain.js b/utils/domain.js index 41efe05..2b305c2 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -2,8 +2,8 @@ // const base = 'http://8kdmng.natappfree.cc' ;// 佳豪 // const base = 'http://192.168.31.134:9999' ;// 佳豪 // const base = 'http://192.168.31.167:9999' // 长龙 -const base = 'https://zanyong.hfju.com';// 正式 AI销管 -// const base = 'https://hxz.quhouse.com';// 正式 AI销讲助手 +// const base = 'https://zanyong.hfju.com';// 正式 AI销管 +const base = 'https://hxz.quhouse.com';// 正式 AI销讲助手 // http.js使用 const baseUrl = `${base}/autoSR/api`;