[fix]更换背景图,线上数据清理

main
huyuanxiang 2 years ago
parent 1816674ddf
commit 543d9a5ef6

@ -3,11 +3,37 @@ import { getConfig, setConfig, getCart, getToken ,getCartNumber } from "./utils/
import myconfig from "./utils/config";
import request from "./utils/request";
import {setTabBarBadge } from'./utils/util.js'
import CONFIG from '@/config'
uni.$ajax = request; //
export default {
onShow() {
const hasLocalType = uni.getStorageSync('_SH_DPD_1')
let isDiff = false
let type = 1
if (!hasLocalType) {
isDiff = true
} else {
if (CONFIG.isPro && hasLocalType !== 1) {
isDiff = true
}
if (!CONFIG.isPro && hasLocalType === 1) {
isDiff = true
type = 2
}
}
if (isDiff) {
uni.clearStorageSync()
uni.setStorageSync('_SH_DPD_1', type)
uni.navigateTo({
url: '/pages/login/index1'
})
return
}
if (!getToken()) {
uni.navigateTo({
url: '/pages/login/index1'
})
}
},
onLaunch: function () {
@ -69,12 +95,7 @@ export default {
selectedIconPath: v
});
})
if (!getToken()) {
uni.navigateTo({
url: '/pages/login/index1'
})
return
}
/**
* 模拟获取购物车的数量 getCart
*/
@ -204,6 +225,9 @@ $black: #333333;
}
}
&.userbox {
.userHeader {
background-color: $color;
}
.iconfont {
color: $color;
}

@ -1,4 +1,4 @@
const isPro = false
const isPro = true
export default {
imgUrl: 'http://store-admin.nhet.cloud:8080/jeecg-boot/sys/common/static/',
apiUrl: isPro ? 'http://store-admin.nhet.cloud:8080/jeecg-boot' : 'http://store-admin.nhet.cloud:8080/jeecg-boot',

@ -263,7 +263,7 @@
onsub(item, index) {
// //
if (tem.number <= 1) {
if (item.number <= 1) {
return
}
let number = item.number - 1

@ -112,6 +112,9 @@ var app = getApp();
const carts = getCart()
setTabBarBadge(carts.length)
} else {
uni.navigateTo({
url: '/pages/login/index1'
})
this.hasToken = false
setTabBarBadge(0)
}

@ -1,7 +1,7 @@
<template>
<view class="userbox" :class="['theme', themeObj.name]">
<!-- 头部个人信息 不变-->
<view class="userHeader" :style="{background:colors}">
<view class="userHeader">
<image src="/static/images/user/user-bg.png" class="user_bg"></image>
<view class="nav">
<view class="user" @click="onLogin">
@ -171,6 +171,7 @@ export default {
let oldcolor = this.colors;
let userdata = getUserInfo() || {};
this.userdata = userdata
console.log(this.userdata)
this.getOrderStatus()

Loading…
Cancel
Save