[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 myconfig from "./utils/config";
import request from "./utils/request"; import request from "./utils/request";
import {setTabBarBadge } from'./utils/util.js' import {setTabBarBadge } from'./utils/util.js'
import CONFIG from '@/config'
uni.$ajax = request; // uni.$ajax = request; //
export default { export default {
onShow() { 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 () { onLaunch: function () {
@ -69,12 +95,7 @@ export default {
selectedIconPath: v selectedIconPath: v
}); });
}) })
if (!getToken()) {
uni.navigateTo({
url: '/pages/login/index1'
})
return
}
/** /**
* 模拟获取购物车的数量 getCart * 模拟获取购物车的数量 getCart
*/ */
@ -204,6 +225,9 @@ $black: #333333;
} }
} }
&.userbox { &.userbox {
.userHeader {
background-color: $color;
}
.iconfont { .iconfont {
color: $color; color: $color;
} }

@ -1,4 +1,4 @@
const isPro = false const isPro = true
export default { export default {
imgUrl: 'http://store-admin.nhet.cloud:8080/jeecg-boot/sys/common/static/', 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', 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) { onsub(item, index) {
// // // //
if (tem.number <= 1) { if (item.number <= 1) {
return return
} }
let number = item.number - 1 let number = item.number - 1

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

@ -1,7 +1,7 @@
<template> <template>
<view class="userbox" :class="['theme', themeObj.name]"> <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> <image src="/static/images/user/user-bg.png" class="user_bg"></image>
<view class="nav"> <view class="nav">
<view class="user" @click="onLogin"> <view class="user" @click="onLogin">
@ -171,6 +171,7 @@ export default {
let oldcolor = this.colors; let oldcolor = this.colors;
let userdata = getUserInfo() || {}; let userdata = getUserInfo() || {};
this.userdata = userdata this.userdata = userdata
console.log(this.userdata)
this.getOrderStatus() this.getOrderStatus()

Loading…
Cancel
Save