Commit d27ebb11 by 张立顺

第一轮bug修复

1 parent f03f0b18
......@@ -37,32 +37,56 @@ App({
// options.query.scene = 2 //调试用
// console.log(options, 'options')
// orderCode=2208241419054111&merchantId=44209480&customerName=123&page=createOrder
// const mockOptions = {
// query:{
// orderCode:2208241419054111,
// merchantId:44209480,
// customerName:'123',
// page:'createOrder'
// }
// }
let mockOptions = {
query: {
// orderCode: 2208241419054111,
// merchantId: 44209480,
customerName: '%E7%83%82%EC%A7%84%ED%9D%99%E6%B3%A5',
page: 'createArchives'
}
}
// options = mockOptions
options = mockOptions
if (options) {
let query = options.query
if (query) {
// 解码
for (const key in query) {
query[key] = decodeURIComponent(query[key])
}
options.query = query
}
// console.log('options', options)
let res = checkScene(options)
console.log(res,'res');
// console.log(res, 'res')
// 如果需要重新登录
res && this.login(true)
res && this.login(true, '订单与当前登录园区不一致,请重新登录。')
}
},
login(relogin) {
login(relogin, context) {
console.log(relogin, 'relogin')
let that = this
// 清空多账号信息
if (relogin) {
this.globalData.yqdInfo = {}
this.globalData.YQorderSetting = ''
util.removeStorage()
wx.$relogin = relogin
wx.showModal({
title: '温馨提示',
content: context || '登录过期,请重新登录。',
showCancel: false,
confirmText: '去登录',
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
that.globalData.yqdInfo = {}
that.globalData.YQorderSetting = ''
util.removeStorage()
wx.$relogin = relogin
router.reLaunch('pages.wxLogin')
}
}
})
} else {
router.reLaunch('pages.wxLogin')
}
router.reLaunch('pages.wxLogin')
},
globalData: {
......
......@@ -116,6 +116,10 @@ Component({
let { data, code, message } = result
if (code) {
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo.quotedPriceUpdate']: data.quotedPriceUpdate
})
this.setData({
insuranceCheck: true,
testQuotedPriceUpdate: data.quotedPriceUpdate / 100
......
......@@ -178,7 +178,7 @@ Page({
insurance.forEach(item => {
delete orderInfo[item]
})
delete orderInfo.quotedPriceUpdate
// delete orderInfo.quotedPriceUpdate
return orderInfo
},
getOwnerInfo() {
......
......@@ -167,6 +167,7 @@ Page({
// console.log(data.loginUserInfoList[0])
checkYqdSuper(app, data.loginUserInfoList[0])
const SCENE = wx.$SCENE
console.log(SCENE, 'SCENE')
// debugger 兼容扫码优惠券进来和免登录逻辑冲突问题
if (SCENE && SCENE.path != 'pages/accountItems/accountItems') {
let {
......@@ -174,17 +175,19 @@ Page({
query
// : { scene }
} = SCENE
console.log(path, 'path')
let { target, name } = wx.$util.getSceneId(path)
// console.log(query)
// console.log(target,name);
wx.$router.reLaunch(`${target}.${name}`, query)
wx.$SCENE = null
} else {
// 超管默认开通所有场景
if (isSuper) {
// 0 会员权益/升级 1 精品升级
let openSceneArr = constantData.sceneList.map(val => {return val?.sceneType})
let openSceneArr = constantData.sceneList.map(val => {
return val?.sceneType
})
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
wx.$router.reLaunch('pages.sceneIndex')
return
......
......@@ -36,6 +36,7 @@ Page({
let { sceneList } = this.data
let userInfo = wx.$util.getUserInfo() || {}
let openSceneArr = userInfo?.openSceneArr || []
this.setData({
timeState: wx.$util.getTimeState()
})
......@@ -99,7 +100,8 @@ Page({
onShow() {
let { sceneList } = this.data
let userInfo = wx.$util.getUserInfo()
userInfo?.openSceneArr.includes(userInfo?.selectedSceneType) &&
let openSceneArr = userInfo?.openSceneArr || []
openSceneArr.includes(userInfo?.selectedSceneType) &&
sceneList.map(i => {
i.actived = false
if (i.sceneType == userInfo?.selectedSceneType) {
......
......@@ -48,7 +48,7 @@
"scene": null
},
{
"name": "工单列表",
"name": "预约管理",
"pathName": "tabWorkOrder/pages/index/index",
"query": "",
"launchMode": "default",
......@@ -165,6 +165,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "预约管理",
"pathName": "tabDate/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
......@@ -99,9 +99,9 @@ export const getYQorderInfo = () => {
if (code == 0) {
// console.log(data);
// debugger
console.log(data.yqPhoneConfig,'data.yqPhoneConfig');
console.log(typeof data.yqPhoneConfig,'data.yqPhoneConfig');
console.log(data.yqPhoneConfig, 'data.yqPhoneConfig')
console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
// 过滤园区店是否需要屏蔽手机号选项
let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig)
// console.log(filterYqPhoneConfig)
......@@ -165,20 +165,20 @@ export const checkScene = options => {
// &&options.patch == 'tabIndex/pages/index/index'
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
// 需要当前门店的 不是就重新登录
// if (userInfo?.subLoginUser?.merchantId != query.merchantId) {
// wx.$SCENE = null
// // return this.login(true)
// return true // 重新登录
// }
if (userInfo?.subLoginUser?.merchantId != query.merchantId) {
wx.$SCENE = null
// return this.login(true)
return true // 重新登录
}
if (query.page) {
//订单跟进
options.patch = 'tabWorkOrder/pages/createOrder/createOrder'
options.path = 'tabWorkOrder/pages/createOrder/createOrder'
} else {
//订单补录
options.patch = 'pages/index/index'
options.path = 'pages/index/index'
}
}
// path
// h5跳转小程序 路径处理
if (query.page) {
const pagePath = {
......@@ -186,7 +186,7 @@ export const checkScene = options => {
createOrder: 'tabWorkOrder/pages/createOrder/createOrder',
followUpOrder: 'tabDate/pages/detail'
}
options.patch = pagePath[query.page]
options.path = pagePath[query.page]
}
console.log(options, 'options')
wx.$SCENE = options
......
......@@ -153,6 +153,10 @@ Page({
let updatedDate = new Date(e.updatedDate)
e.year = updatedDate.format('yyyy-MM-dd')
e.time = updatedDate.format('hh:mm:ss')
// 格式化跟进时间
let time = e.inviteDate
e.inviteDate = time ? `「${new Date(e.inviteDate).format('MM-dd hh:mm')}」` : ''
})
}
if (detail.carSeriesName) detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ''}-${detail.carSeriesName}`
......
......@@ -12,7 +12,8 @@
style="color:{{item.color}};"
catchtap="{{item.callBack}}"
data-data="{{detail[item.key]}}">
<block wx:if="{{items.key=='carName'}}">
<!-- <view>{{item.key}}</view> -->
<block wx:if="{{item.key=='carName'}}">
<block wx:if="{{detail.customer.carSeriesName}}">
<!-- <view class="between"> -->
{{detail.customer.carBrand}}-{{detail.customer.carChildsBrandName}}-{{detail.customer.carSeriesName}}
......@@ -103,7 +104,9 @@
</block>
:
</view>
<view class="value">{{i.enum? i.enum[item[i.key]] :item[i.key]||'无'}}</view>
<view class="value">
{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}
</view>
</view>
</block>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2}}">
......
......@@ -320,6 +320,7 @@ Page({
// console.log(arr[i])
delete orderInfo[deleteList[i]]
}
orderInfo.againOrder = true
wx.$router.redirectTo('createOrder', orderInfo)
// merchantDistributionList,expenseCategoryList,profitAllocatinList
},
......
......@@ -595,7 +595,7 @@ Page({
// app .
getYQorderInfo()
.then(merchantSettingInfo => {
console.log(merchantSettingInfo,'merchantSettingInfo')
console.log(merchantSettingInfo, 'merchantSettingInfo')
let dictionaryObj = {
carTypeRequiredFlag: 'carBrand',
standNoRequiredFlag: 'standNo',
......@@ -607,7 +607,7 @@ Page({
requiredList.push(dictionaryObj[key])
}
}
console.log(merchantSettingInfo.yqPhoneConfig,'merchantSettingInfo.yqPhoneConfig');
console.log(merchantSettingInfo.yqPhoneConfig, 'merchantSettingInfo.yqPhoneConfig')
// console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)')
this.setData({
requiredList: [...new Set(requiredList)],
......@@ -663,6 +663,7 @@ Page({
})
console.log(res)
let { code, message, data } = result
data.customer.customerName = res.customerName
code == 0 && (res = data)
}
......@@ -671,7 +672,7 @@ Page({
if (res.associateOrderCode) {
tipsProps.showTips = true
tipsProps.tipsText = '原订单录入信息有误,请重新提交正确的订单信息。'
} else if (res.orderCode) {
} else if (res.orderCode || res.againOrder) {
// 以建档(预约列表)/待跟进工单不可建档
isAlreadyExistOrder = true
tipsProps.showTips = false
......
import { secretKey, domain, path, sign } from './http.js'
console.log(secretKey, 'secretKey')
// console.log(secretKey, 'secretKey')
import util from '~/utils/util.js'
/**接口 */
class Request {
......@@ -35,32 +35,12 @@ class Request {
data
} = response
// // console.log(thisPage, 'thisPage')
// let { route, data: pageData } = thisPage
// if (pageData.shareQuery) {
// wx.$util.setStorageSync('shareQuery', {
// route,
// shareQuery: pageData.shareQuery
// })
// }
if (code == 20 || code == 21) {
let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
wx.hideLoading()
if (thisPage.route != 'pages/wxLogin/wxLogin') {
wx.showModal({
title: '温馨提示',
content: '登录过期,请重新登录。',
showCancel: false,
confirmText: '去登录',
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
getApp().login(true)
}
}
})
getApp().login(true)
}
} else if (code == -1) {
wx.showToast({
......@@ -80,10 +60,6 @@ class Request {
icon: 'error'
})
reject(error)
// if (fail && typeof fail == 'function') {
// fail(error, reject)
// } else {
// }
},
complete() {
wx.stopPullDownRefresh()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!