订单相关修改提测

This commit is contained in:
GaoHao
2024-09-09 11:08:04 +08:00
parent c2ff506543
commit 2dbcdf4300
45 changed files with 1377 additions and 3506 deletions

26
App.vue
View File

@@ -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'), //临时登录凭证