Commit 2c6e0dc7 by zhangzhen

细节优化

parent 940066e5
<script>
import Vue from 'vue'
import { login } from "@/api/index.js";
export default {
onLaunch: function(e) {
......@@ -26,6 +27,22 @@
// })
// }
wx.login({
success: (res) => {
login(res.code).then(res => {
if (res.data.code == 200) {
if (res.data.data.type === "login") {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
key: uni.getStorageSync('tokenHeaders'),
data: res.data.data.token
})
}
}
})
}
})
if(uni.getStorageSync("storeId")){
uni.removeStorageSync("storeId")
}
......
......@@ -66,8 +66,6 @@
})
}
})
},
onCancle(){
this.$refs.popupPhone.close()
......
......@@ -403,10 +403,12 @@
},
onGetSysConfig() {
systemConfig().then(res => {
if(res.data.code == 200){
uni.setStorage({
key: 'sysConfig',
data: res.data.rows
})
}
})
},
onGetDicts() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment