Commit a20e3ebb by 张立顺

bug修复

1 parent 9b79a6c3
...@@ -13,7 +13,7 @@ import wxApi from './utils/utils_wx' ...@@ -13,7 +13,7 @@ import wxApi from './utils/utils_wx'
// 实例化对象存储 // 实例化对象存储
import { Storage } from '~/utils/cache/storage' import { Storage } from '~/utils/cache/storage'
const $Storage = new Storage() const $Storage = new Storage()
import { setSystem_info, getNoSignInUuid } from '~/utils/cache/storageApi' import { setSystem_info, getNoSignInUuid,removeSystemStorage } from '~/utils/cache/storageApi'
setSystem_info() // 存储设备信息 setSystem_info() // 存储设备信息
import { checkYqdSuper, checkScene } from '~/store/index' import { checkYqdSuper, checkScene } from '~/store/index'
import eventbus from './utils/eventbus' import eventbus from './utils/eventbus'
...@@ -50,6 +50,7 @@ App({ ...@@ -50,6 +50,7 @@ App({
} }
}, },
login(relogin, context) { login(relogin, context) {
// debugger
// console.log(relogin, 'relogin') // console.log(relogin, 'relogin')
let that = this let that = this
// 清空多账号信息 // 清空多账号信息
...@@ -68,6 +69,7 @@ App({ ...@@ -68,6 +69,7 @@ App({
return router.reLaunch('pages.accountItems') return router.reLaunch('pages.accountItems')
} else { } else {
util.removeStorage() util.removeStorage()
removeSystemStorage()
that.login(false) that.login(false)
} }
}) })
...@@ -93,6 +95,7 @@ App({ ...@@ -93,6 +95,7 @@ App({
this.globalData.yqdInfo = {} this.globalData.yqdInfo = {}
this.globalData.YQorderSetting = '' this.globalData.YQorderSetting = ''
util.removeStorage() util.removeStorage()
removeSystemStorage()
wx.$relogin = relogin wx.$relogin = relogin
router.reLaunch('pages.wxLogin') router.reLaunch('pages.wxLogin')
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* 3生产环境 * 3生产环境
* 4预发布 * 4预发布
*/ */
let index = 1 let index = 2
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -55,7 +55,7 @@ Page({ ...@@ -55,7 +55,7 @@ Page({
},) },)
// 没有登录信息 或无开通场景 退出登录 // 没有登录信息 或无开通场景 退出登录
if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) { if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) {
app.login(false) app.login(true,'请重新登录')
} }
}, },
......
// pages/wxLogin/wxLogin.js // pages/wxLogin/wxLogin.js
import api from '../../api/api.js' import api from '../../api/api.js'
import { setNoSignInUuid } from '~/utils/cache/storageApi.js' import { setNoSignInUuid,getNoSignInUuid } from '~/utils/cache/storageApi.js'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -270,6 +271,8 @@ Page({ ...@@ -270,6 +271,8 @@ Page({
onShow: function () { onShow: function () {
wx.hideHomeButton() wx.hideHomeButton()
this.login() this.login()
let noSignInUuid = getNoSignInUuid()
noSignInUuid&&app.login(true)
}, },
login() { login() {
wx.$util.showLoading() wx.$util.showLoading()
......
...@@ -578,6 +578,7 @@ Component({ ...@@ -578,6 +578,7 @@ Component({
}) })
// this.triggerEvent('change', list) // this.triggerEvent('change', list)
this.triggerEventSelectDay(); this.triggerEventSelectDay();
wx.$util.pointRecord(26)
}, },
// 收起/展开 // 收起/展开
......
...@@ -30,7 +30,7 @@ Page({ ...@@ -30,7 +30,7 @@ Page({
* inviteDate - 邀约日期(格式:yyyy-MM-dd) * inviteDate - 邀约日期(格式:yyyy-MM-dd)
* */ * */
getListByDay(e) { getListByDay(e) {
wx.$util.pointRecord(26)
let { detail } = e let { detail } = e
let params = { let params = {
inviteDate: `${detail.year}-${detail.month}-${detail.day}` inviteDate: `${detail.year}-${detail.month}-${detail.day}`
......
...@@ -286,10 +286,11 @@ Page({ ...@@ -286,10 +286,11 @@ Page({
wx.hideTabBar() wx.hideTabBar()
}, },
jump(e) { jump(e) {
console.log(e) // console.log(e)
let { item, name,recorderId } = e.currentTarget.dataset // return
let { item, name,recorderid } = e.currentTarget.dataset
wx.$router.go(name, item) wx.$router.go(name, item)
wx.$util.pointRecord(recorderId) wx.$util.pointRecord(recorderid)
}, },
/** /**
......
...@@ -149,6 +149,9 @@ Page({ ...@@ -149,6 +149,9 @@ Page({
jump(e) { jump(e) {
let { item, type } = e.currentTarget.dataset let { item, type } = e.currentTarget.dataset
let { userInfo } = this.data let { userInfo } = this.data
// recordId
// console.log(item);
// return
wx.$util.pointRecord(item.recordId) wx.$util.pointRecord(item.recordId)
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) { if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
......
...@@ -17,11 +17,12 @@ export default { ...@@ -17,11 +17,12 @@ export default {
{ {
name: '预约管理', name: '预约管理',
url: 'tabDate.index', url: 'tabDate.index',
recordId: 8 recordId: 9
}, },
{ {
name: '经营数据', name: '经营数据',
url: 'tabOperating.index' url: 'tabOperating.index',
recordId: 11
}, },
{ {
name: '客户建档', name: '客户建档',
......
...@@ -8,7 +8,8 @@ export default { ...@@ -8,7 +8,8 @@ export default {
}, },
{ {
name: '门店概况', name: '门店概况',
url: 'tabOperating.4sOverview' url: 'tabOperating.4sOverview',
recordId:29
}, },
{ {
name: '商品排行', name: '商品排行',
......
...@@ -23,9 +23,7 @@ export function setUserInfo(data) { ...@@ -23,9 +23,7 @@ export function setUserInfo(data) {
$Storage.set('userInfo', data) $Storage.set('userInfo', data)
} }
export function removeSystemStorage() { export function removeSystemStorage() {
// $Storage.rm('srcm_shopmall_user_info') $Storage.rm('noSignInUuid')
// $Storage.rm('scrm_shopmall_sessionId')
// $Storage.rm('guest_no')
} }
export function setStorageSync(key, data) { export function setStorageSync(key, data) {
$Storage.set(key, JSON.stringify(data)) $Storage.set(key, JSON.stringify(data))
......
...@@ -108,8 +108,9 @@ const setSessionId = sessionId => { ...@@ -108,8 +108,9 @@ const setSessionId = sessionId => {
wx.setStorageSync('dj_boutique_sessionId', sessionId) wx.setStorageSync('dj_boutique_sessionId', sessionId)
} }
const removeStorage = () => { const removeStorage = () => {
wx.removeStorageSync('noSignInUuid')
wx.removeStorageSync('dj_boutique_user_info') wx.removeStorageSync('dj_boutique_user_info')
wx.removeStorageSync('dj_boutique_sessionId') wx.removeStorageSync('dj_boutique_sessionId')
} }
const showNoAccess = () => { const showNoAccess = () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!