Browse Source

'2023年6月1日10:53:25'

yxb
wq 2 years ago
parent
commit
c1d506da30
2 changed files with 27 additions and 1 deletions
  1. 25
    0
      pages/index/index.vue
  2. 2
    1
      stores/user.js

+ 25
- 0
pages/index/index.vue View File

const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`;
const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`;
const list = reactive(["您有一条待办事项,还未办理完成"]) const list = reactive(["您有一条待办事项,还未办理完成"])

const swiper = reactive({ const swiper = reactive({
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
} }
}); });
onLoad(() => { onLoad(() => {

wx.login({
success: function(res){
console.log('输出内容========',res)
}
})
//调用方式
request('eeb51c66bcda48dc9dbb5997323a11ed', {}).then((res) => {
console.log("====", stringToJson(res.bizContent));
wx.requestSubscribeMessage({
tmplIds: [''],
success: function(res){
console.log('输出内容========',res)
},
fail: function(res){
console.log('内容========',res)
}
})
})
.catch((err) => {});
getInfo() getInfo()
quanKeyAction().then((val: any) => { quanKeyAction().then((val: any) => {
setItem('key', val.dictTypeAndItem) setItem('key', val.dictTypeAndItem)
} }
}) })
getSwiper() getSwiper()

// console.log(credentialType); // console.log(credentialType);


//参数说明 //参数说明

+ 2
- 1
stores/user.js View File

const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
this.saveToken(data.accessToken); this.saveToken(data.accessToken);
this.saveOpenId(data.openId); this.saveOpenId(data.openId);
console.log('输出内容', data.openId)
resolve(data); resolve(data);
}).catch((error) => { }).catch((error) => {
reject(error); reject(error);
url: "/login/login" url: "/login/login"
}); });
}, },
/*退出登录*/ /*退出登录*/
loginOut() { loginOut() {
confirm( confirm(

Loading…
Cancel
Save