|
@@ -169,44 +169,16 @@
|
|
|
getOpenId(code) {
|
|
|
const that = this;
|
|
|
request.post('/wxma/code2Session',{
|
|
|
- code: code,
|
|
|
- platType: "slb",
|
|
|
- mpType: "engineer",
|
|
|
- }).then(res=>{
|
|
|
- console.error(res);
|
|
|
- if(res.success){
|
|
|
- //登录成功
|
|
|
- uni.setStorageSync('userMap', JSON.stringify(res.resultMap));
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- // wx.request({
|
|
|
- // method: 'post',
|
|
|
- // url: 'http://slb-m.dev.ml1993.com/lx-api/wxma/code2Session', //仅为示例,并非真实的接口地址
|
|
|
- // data: {
|
|
|
- // code: code,
|
|
|
- // platType: "slb",
|
|
|
- // mpType: "engineer",
|
|
|
- // },
|
|
|
- // header: {
|
|
|
- // 'content-type': 'application/json' ,// 默认值
|
|
|
- // platType: "slb",
|
|
|
- // mpType: "engineer",
|
|
|
- // },
|
|
|
- // success(res) {
|
|
|
- // console.warn(res);
|
|
|
- // //unionid存到本地
|
|
|
- // wx.setStorage({
|
|
|
- // key: "frontlixiangsid",
|
|
|
- // data: res.data.resultMap.frontlixiangsid
|
|
|
- // }, {
|
|
|
- // key: "userId",
|
|
|
- // data: res.data.resultMap.unionid
|
|
|
- // })
|
|
|
-
|
|
|
-
|
|
|
- // }
|
|
|
- // })
|
|
|
+ code: code,
|
|
|
+ platType: "slb",
|
|
|
+ mpType: "engineer",
|
|
|
+ }).then(res=>{
|
|
|
+ console.error(res);
|
|
|
+ if(res.success){
|
|
|
+ //登录成功
|
|
|
+ uni.setStorageSync('userMap', JSON.stringify(res.resultMap));
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
loginByCode(frontId) {
|
|
@@ -250,32 +222,8 @@
|
|
|
}
|
|
|
console.error(res2);
|
|
|
});
|
|
|
- // uni.request({
|
|
|
- // method: 'post',
|
|
|
- // url: 'http://slb-m.dev.ml1993.com/lx-api/slbMpAutoLogin', //仅为示例,并非真实的接口地址
|
|
|
- // data: {
|
|
|
- // code:frontId,
|
|
|
- // appType:'ma',
|
|
|
- // encryptedData:res.encryptedData,
|
|
|
- // iv: res.iv
|
|
|
- // },
|
|
|
- // header: {
|
|
|
- // 'content-type': 'application/json', // 默认值
|
|
|
-
|
|
|
- // platType: "slb",
|
|
|
- // mpType: "engineer",
|
|
|
- // },
|
|
|
- // success(res2) {
|
|
|
- // console.error(res2);
|
|
|
- // //unionid存到本地
|
|
|
-
|
|
|
- // }
|
|
|
- // })
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
|
|
|
// 瀑布流导航页面滚动到底部
|
|
@@ -290,13 +238,13 @@
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- onPulling(e) {
|
|
|
- console.log("onpulling", e);
|
|
|
- if(e.detail.deltaY<0){
|
|
|
- return
|
|
|
- }
|
|
|
- this.triggered = true
|
|
|
- },
|
|
|
+ onPulling(e) {
|
|
|
+ console.log("onpulling", e);
|
|
|
+ if(e.detail.deltaY<0){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.triggered = true
|
|
|
+ },
|
|
|
onRefresh(){
|
|
|
if (this._freshing) return;
|
|
|
this._freshing = true;
|
|
@@ -361,6 +309,9 @@
|
|
|
this.tabberPageLoadFlag[index] = true
|
|
|
}
|
|
|
this.currentIndex = index
|
|
|
+ if (this.currentIndex === 2&&this.$refs.discovery) {
|
|
|
+ this.$refs.discovery.fetchData();
|
|
|
+ }
|
|
|
},
|
|
|
// 获取canvas实例和ctx画笔
|
|
|
getMyCanvasAndCtx(id) {
|