订单相关修改提测
This commit is contained in:
26
App.vue
26
App.vue
@@ -3,15 +3,30 @@
|
||||
<script>
|
||||
import Api from '@/common/js/api.js'
|
||||
export default {
|
||||
globalData: {
|
||||
systemInfo: null
|
||||
},
|
||||
onLaunch: function() {
|
||||
if ( uni.getStorageSync("NAME") && !uni.getStorageSync("NAME").data) {
|
||||
uni.cache.clear();
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
|
||||
// #endif
|
||||
uni.cache.set('NAME', '零点八零');
|
||||
// this.$store.dispatch("loginEvent")
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onShow: function() {
|
||||
// 获取导航栏信息
|
||||
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
this.globalData.systemInfo = res;
|
||||
}
|
||||
})
|
||||
this.$store.dispatch("HeightActions"); //获取随时获取页面的高度
|
||||
// #ifdef MP-WEIXIN
|
||||
// 当向小程序后台请求完新版本信息,会进行回调。res: {hasUpdate: true, version: 1.0.0}
|
||||
@@ -55,11 +70,22 @@
|
||||
if (!uni.cache.get('token')) {
|
||||
// this.$store.dispatch("loginEvent"); //获取shapid
|
||||
uni.login({
|
||||
// #ifndef MP-WEIXIN
|
||||
provider: 'weixin',
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
provider: 'alipay',
|
||||
// #endif
|
||||
success: (data) => {
|
||||
uni.getUserInfo({
|
||||
// #ifndef MP-WEIXIN
|
||||
provider: 'weixin',
|
||||
// #endif
|
||||
// #ifndef MP-ALIPAY
|
||||
provider: 'alipay',
|
||||
// #endif
|
||||
success: async (infoRes) => {
|
||||
console.log(infoRes)
|
||||
uni.cache.set('weixincode', data.code);
|
||||
let res = await Api.userwxlogin({
|
||||
code: uni.cache.get('weixincode'), //临时登录凭证
|
||||
|
||||
Reference in New Issue
Block a user