Commit 8f362389 by 张立顺

合并代码请求

2 parents 9e12ee64 a963d05c
...@@ -104,6 +104,9 @@ ...@@ -104,6 +104,9 @@
"~/*": "/*" "~/*": "/*"
}, },
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"resolveAlias": {
"~/*": "/*"
},
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示" "desc": "你的位置信息将用于小程序位置接口的效果展示"
......
...@@ -141,7 +141,7 @@ Component({ ...@@ -141,7 +141,7 @@ Component({
setCar(data, isApiEvent) { setCar(data, isApiEvent) {
let { carSeriesId, letter } = this.data let { carSeriesId, letter } = this.data
// 处理可能车型没有数据的问题 // 处理可能车型没有数据的问题
let letterList = data ? Array.from(new Set([...data.map(e => e.letter)])) : [] let letterList = data && data.length ? Array.from(new Set([...data.map(e => e.letter)])) : []
// console.log(letterList) // console.log(letterList)
let brandList = letterList.map(e => { let brandList = letterList.map(e => {
let list = [] let list = []
......
...@@ -27,8 +27,8 @@ Component({ ...@@ -27,8 +27,8 @@ Component({
// 校验历史订单二级流量方是否在配置的二级流量方数据中包含 不包含清空二级流量方重新选择 // 校验历史订单二级流量方是否在配置的二级流量方数据中包含 不包含清空二级流量方重新选择
let hasSubShopMerchantId = subShopMerchantList.some(item=> item.subMerchantId == orderObj.subShopMerchantId) let hasSubShopMerchantId = subShopMerchantList.some(item=> item.subMerchantId == orderObj.subShopMerchantId)
if (!hasSubShopMerchantId && subShopMerchantList.length) { if (!hasSubShopMerchantId && subShopMerchantList.length) {
delete orderObj.subShopMerchantId delete orderObj?.subShopMerchantId
delete orderObj.subShopMerchantName delete orderObj?.subShopMerchantName
} }
thisPage.setData({ thisPage.setData({
orderObj orderObj
...@@ -79,7 +79,7 @@ Component({ ...@@ -79,7 +79,7 @@ Component({
if (code == '0') { if (code == '0') {
// 有二级流量方数据 添加必填二级流量方字段 // 有二级流量方数据 添加必填二级流量方字段
if (data?.length) { if (data?.length) {
if (requiredList.indexOf('subShopMerchantId') < 0) requiredList.push('subShopMerchantId') if (!requiredList.includes('subShopMerchantId')) requiredList.unshift('subShopMerchantId')
data.map(i => { data.map(i => {
i.active = false i.active = false
if (i.subMerchantId == orderObj.subShopMerchantId) { if (i.subMerchantId == orderObj.subShopMerchantId) {
...@@ -90,8 +90,8 @@ Component({ ...@@ -90,8 +90,8 @@ Component({
// 校验历史订单二级流量方是否在配置的二级流量方数据中包含 不包含清空二级流量方重新选择 // 校验历史订单二级流量方是否在配置的二级流量方数据中包含 不包含清空二级流量方重新选择
let hasSubShopMerchantId = data.some(item=> item.subMerchantId == orderObj.subShopMerchantId) let hasSubShopMerchantId = data.some(item=> item.subMerchantId == orderObj.subShopMerchantId)
if (!hasSubShopMerchantId) { if (!hasSubShopMerchantId) {
delete orderObj.subShopMerchantId delete orderObj?.subShopMerchantId
delete orderObj.subShopMerchantName delete orderObj?.subShopMerchantName
} }
thisPage.setData({ thisPage.setData({
requiredList, requiredList,
...@@ -104,9 +104,9 @@ Component({ ...@@ -104,9 +104,9 @@ Component({
}) })
} else { } else {
// 无二级流量方字段时 清空选择的二级流量方字段 // 无二级流量方字段时 清空选择的二级流量方字段
delete orderObj.subShopMerchantId delete orderObj?.subShopMerchantId
delete orderObj.subShopMerchantName delete orderObj?.subShopMerchantName
requiredList.indexOf('subShopMerchantId') > -1 && requiredList.splice(requiredList.indexOf('subShopMerchantId'), 1) if (requiredList.includes('subShopMerchantId')) requiredList.splice(requiredList.indexOf('subShopMerchantId'), 1)
thisPage.setData({ thisPage.setData({
isShowSubShopMerchant: false, isShowSubShopMerchant: false,
requiredList, requiredList,
......
...@@ -109,7 +109,7 @@ Page({ ...@@ -109,7 +109,7 @@ Page({
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
api.getListSelectAccount().then(res => { api.getListSelectAccount().then(res => {
wx.hideLoading() wx.hideLoading()
console.log(res) // console.log(res)
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
let { loginUserInfoList, sessionId } = data let { loginUserInfoList, sessionId } = data
...@@ -166,7 +166,8 @@ Page({ ...@@ -166,7 +166,8 @@ Page({
// : { scene } // : { scene }
} = SCENE } = SCENE
let { target, name } = wx.$util.getSceneId(path) let { target, name } = wx.$util.getSceneId(path)
console.log(query) // console.log(query)
// console.log(target,name);
wx.$router.reLaunch(`${target}.${name}`, query) wx.$router.reLaunch(`${target}.${name}`, query)
wx.$SCENE = null wx.$SCENE = null
} else { } else {
......
...@@ -49,6 +49,7 @@ class Router { ...@@ -49,6 +49,7 @@ class Router {
if (thisPage) { if (thisPage) {
const onRoute = thisPage.onRoute const onRoute = thisPage.onRoute
thisPage.$query = this[_query] thisPage.$query = this[_query]
// console.log(this[_query]);
typeof onRoute === 'function' && onRoute(this[_query]) typeof onRoute === 'function' && onRoute(this[_query])
thisPage.showToast = util.showToast thisPage.showToast = util.showToast
thisPage.showLoading = util.showLoading thisPage.showLoading = util.showLoading
...@@ -99,8 +100,10 @@ class Router { ...@@ -99,8 +100,10 @@ class Router {
} }
checkRouter(route, events) { checkRouter(route, events) {
// console.log(route) // console.log(route)
// console.log(events);
// debugger // debugger
this[_query] = events || {} this[_query] = events || {}
// console.log(this[_query])
const [_parent, _name] = route.split('.') const [_parent, _name] = route.split('.')
let name = route let name = route
let parent = this.getPageInstance()?.__route__.split('/')[0] let parent = this.getPageInstance()?.__route__.split('/')[0]
...@@ -155,7 +158,10 @@ class Router { ...@@ -155,7 +158,10 @@ class Router {
} }
/**关闭所有页面,打开到应用内的某个页面 */ /**关闭所有页面,打开到应用内的某个页面 */
reLaunch(route, events) { reLaunch(route, events) {
// console.log(events)
// debugger
let { routerMapItem, query } = this.checkRouter(route, events) let { routerMapItem, query } = this.checkRouter(route, events)
// console.log(query, 'query')
wx.reLaunch({ wx.reLaunch({
url: `${routerMapItem.url}${query}` url: `${routerMapItem.url}${query}`
}) })
......
...@@ -253,7 +253,11 @@ Page({ ...@@ -253,7 +253,11 @@ Page({
// 10s轮询一次待补录 // 10s轮询一次待补录
getWaitOrder() { getWaitOrder() {
let { isStaff } = this.data let { isStaff } = this.data
isStaff && // console.log('isStaff', isStaff)
let thisPage = wx.$router.getPageInstance()
console.log(thisPage.route, ' thisPage.route')
thisPage.route == 'tabIndex/pages/index/index' &&
isStaff &&
api api
.waitinputorder() .waitinputorder()
.then(result => { .then(result => {
...@@ -332,35 +336,29 @@ Page({ ...@@ -332,35 +336,29 @@ Page({
} }
}) })
}, },
onRoute(options) { checkShowOrderPop(options) {
if (options.supplement) { let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
this.setData({ if (userInfo?.subLoginUser?.merchantId == options.merchantId) {
showOrderpop: true if (options.merchantId) {
})
}
},
init(userInfo) {
getYQInfo(userInfo)
.then(result => {
console.log(result)
// console.log(app.globalData.isYqdSuper)
this.setData({ this.setData({
...result showOrderpop: true
}) })
}) }
.catch(err => {}) }
this.getPageData() },
onRoute(options) {
// console.log($query);
// debugger
// console.log(options,'options');
options && this.checkShowOrderPop(options)
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// console.log(app.globalData.isStaff) // console.log(options)
if (options.supplement) { options && this.checkShowOrderPop(options)
this.setData({
showOrderpop: true
})
}
let today = new Date() let today = new Date()
let startDate = today.format('yyyy-MM-dd') let startDate = today.format('yyyy-MM-dd')
let endDate = today.format('yyyy-MM-dd') let endDate = today.format('yyyy-MM-dd')
...@@ -373,6 +371,7 @@ Page({ ...@@ -373,6 +371,7 @@ Page({
this.setData({ this.setData({
isStaff: app.globalData.isStaff isStaff: app.globalData.isStaff
}) })
// this.getWaitOrder()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -433,13 +432,15 @@ Page({ ...@@ -433,13 +432,15 @@ Page({
onHide: function () { onHide: function () {
// console.log('onHide') // console.log('onHide')
// console.log(time) // console.log(time)
clearTimeout(time) time && clearTimeout(time)
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () {
time && clearTimeout(time)
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
...@@ -7,7 +7,8 @@ export default { ...@@ -7,7 +7,8 @@ export default {
url: 'tabWorkOrder.createOrder' url: 'tabWorkOrder.createOrder'
}, },
{ {
name: '战败下单', name: '客户建档',
// name: '战败下单',
url: 'tabWorkOrder.createArchives' url: 'tabWorkOrder.createArchives'
}, },
{ {
......
...@@ -77,51 +77,6 @@ Page({ ...@@ -77,51 +77,6 @@ Page({
}) })
}) })
.catch(err => {}) .catch(err => {})
// console.log(userInfo)
// debugger
// if (!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2) {
// this.setData({
// merchantRange: [
// {
// merchantName: userInfo.merchantName
// }
// ],
// subIndex: 0
// })
// return
// }
// let all = {
// merchantName: '全部'
// }
// api.getYQList().then(res => {
// console.log(res)
// wx.hideLoading()
// let { code, data } = res
// if (code == 0) {
// let subIndex = 0
// let arr = []
// if (data.length > 1) {
// if (userInfo.merchantId != userInfo.subLoginUser.merchantId) {
// data.map((e, index) => {
// if (e.merchantId == userInfo.subLoginUser.merchantId) subIndex = index + 1
// })
// }
// arr = [all, ...data]
// } else {
// arr = [
// {
// merchantName: userInfo.merchantName
// }
// ]
// }
// this.setData({
// merchantRange: arr,
// subIndex,
// canRemark: arr.length == 1
// })
// }
// })
// this.getPageData()
}, },
refresh(data) { refresh(data) {
// console.log('refresh') // console.log('refresh')
...@@ -150,8 +105,6 @@ Page({ ...@@ -150,8 +105,6 @@ Page({
// console.log('time') // console.log('time')
let maxDate = new Date().format('yyyy-MM-dd') let maxDate = new Date().format('yyyy-MM-dd')
let today = dateNum || new Date().format('yyyy-MM-dd') let today = dateNum || new Date().format('yyyy-MM-dd')
// console.log(new Date(today).getTime())
// console.log(today)
/** /**
* 根据日期字符串获取星期几 * 根据日期字符串获取星期几
* @param dateString 日期字符串(如:2020-05-02) * @param dateString 日期字符串(如:2020-05-02)
...@@ -300,6 +253,20 @@ Page({ ...@@ -300,6 +253,20 @@ Page({
console.log(err) console.log(err)
}) })
}, },
// 获取设备信息
getDeviceSize() {
return new Promise((resolve, reject) => {
wx.getSystemInfo({
success: function (res) {
// console.log(res)
const { screenHeight, safeArea } = res
const { bottom } = safeArea
const bottomLift = screenHeight - bottom
resolve({ bottomLift })
}
})
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -307,11 +274,14 @@ Page({ ...@@ -307,11 +274,14 @@ Page({
// console.log('onload') // console.log('onload')
this.setTimeList() this.setTimeList()
// this.getOrderNum() // this.getOrderNum()
let { bottomLift } = app.globalData let { bottomLift } = app.globalData
if (bottomLift >= 0) { if (bottomLift >= 0) {
<<<<<<< HEAD
wx.$util.getDeviceSize().then(res => { wx.$util.getDeviceSize().then(res => {
console.log(res, 'res') console.log(res, 'res')
=======
this.getDeviceSize().then(res => {
>>>>>>> dev_v4.16.0
const { bottomLift } = res const { bottomLift } = res
this.setData({ this.setData({
bottomLift bottomLift
......
...@@ -96,6 +96,10 @@ module.exports = { ...@@ -96,6 +96,10 @@ module.exports = {
notUpgradeOrder(data) { notUpgradeOrder(data) {
return api.post('dj.api.smartcarlife.order.notUpgrade.batchInsert', data) return api.post('dj.api.smartcarlife.order.notUpgrade.batchInsert', data)
}, },
/** 批量新建预录工单 */
createPrerecordedOrderBatch(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder.batch', data)
},
/** 新建预录工单 */ /** 新建预录工单 */
createPrerecordedOrder(data) { createPrerecordedOrder(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder', data) return api.post('dj.api.smartcarlife.order.preliminaryOrder', data)
...@@ -107,5 +111,9 @@ module.exports = { ...@@ -107,5 +111,9 @@ module.exports = {
/** 获取商户基本信息 */ /** 获取商户基本信息 */
getServiceBaseInfo(data) { getServiceBaseInfo(data) {
return api.post('dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo', data) return api.post('dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo', data)
},
/** 根据id查询待补录订单 */
waitinputorderSelectById(data) {
return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data)
} }
} }
...@@ -728,6 +728,9 @@ Page({ ...@@ -728,6 +728,9 @@ Page({
// if (options.scene) { // if (options.scene) {
// this.setData(options) // this.setData(options)
// } // }
// let { supplementId } = options
console.log(options)
options?.supplementId && this.checkShowOrderInfo(options)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -740,46 +743,51 @@ Page({ ...@@ -740,46 +743,51 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (res) { onShow: function (res) {
this.getSetting()
// console.log(111)
// this.saveImageClick() // this.saveImageClick()
// console.log(res) // console.log(res)
// setTimeout(() => { // setTimeout(() => {
// wx.$util.showLoading() // wx.$util.showLoading()
// }, 2000) // }, 2000)
}, },
checkShowOrderInfo(options) {
onRoute(res) { let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
console.log(options)
// debugger // debugger
let { outTradeNo, totalFee, accountDate } = res if (userInfo?.subLoginUser?.merchantId != options.merchantId) {
// console.log(res) // wx.$router.go('pages/index')
// console.log(outTradeNo, totalFee) wx.$router.go('tabIndex.index')
this.setData({ } else {
outTradeNo, // 查询补单信息
totalFee: totalFee, api
accountDate .waitinputorderSelectById({ id: options.supplementId })
}) .then(result => {
// console.log(res) console.log(result)
// console.log() let { outTradeNo, totalFee, accountDate } = result.data
// if (res.scene) { accountDate && (accountDate = new Date(accountDate).format('yyyy-MM-dd'))
// res.returnFun = true this.setData({
// this.setData(res) outTradeNo,
// } else if (res.merchantId) { totalFee: totalFee*100,
// this.setData({ accountDate
// returnFun: true })
// }) })
// this.setOrderObj(res) .catch(err => {})
// } else { }
// wx.$util.showLoading('加载中...') },
// this.setData( onRoute(options) {
// { let { outTradeNo, totalFee, accountDate, supplementId } = options
// flag: true console.log(options);
// }, // 如果是扫码进来的
// () => { if (supplementId) {
// wx.$util.hideLoading() return this.checkShowOrderInfo(options)
// } } else {
// ) this.setData({
// } outTradeNo,
// console.log(11) totalFee: totalFee,
this.getSetting() accountDate
})
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
...@@ -804,27 +812,27 @@ Page({ ...@@ -804,27 +812,27 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () {}
// 获取园区店支付配置 // 获取园区店支付配置
getConfig() { // getConfig() {
// console.log(this.data.orderObj) // // console.log(this.data.orderObj)
let o = this.data.orderObj // let o = this.data.orderObj
let oParams = {} // let oParams = {}
oParams.yqMerchantId = o.sellerMerchantId // oParams.yqMerchantId = o.sellerMerchantId
api.getYqStoreConfig(oParams).then(res => { // api.getYqStoreConfig(oParams).then(res => {
console.log(res) // console.log(res)
let obj = res.data || {} // let obj = res.data || {}
let m = obj.supportPayTypes || [] // let m = obj.supportPayTypes || []
let n = this.data.payTypeList // let n = this.data.payTypeList
let list = n.filter(k => { // let list = n.filter(k => {
let idx = m.find(j => j == k.value) // let idx = m.find(j => j == k.value)
return idx >= 0 // return idx >= 0
}) // })
this.setData({ // this.setData({
showPayList: list // showPayList: list
}) // })
// console.log(list) // // console.log(list)
}) // })
} // }
}) })
...@@ -281,7 +281,9 @@ Page({ ...@@ -281,7 +281,9 @@ Page({
submit(i) { submit(i) {
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
// let { save } = i.currentTarget.dataset console.log(i);
let { type } = i.currentTarget.dataset
console.log(type);
let { orderObj, notUpgradeOrderList, dateObj, isStandNo } = this.data let { orderObj, notUpgradeOrderList, dateObj, isStandNo } = this.data
let key = this.checkRequired(orderObj) let key = this.checkRequired(orderObj)
...@@ -309,16 +311,23 @@ Page({ ...@@ -309,16 +311,23 @@ Page({
return this.showToast(`请输入第${index + 1}位客户车架号`) return this.showToast(`请输入第${index + 1}位客户车架号`)
} }
} }
orderObj = { orderObj = {
...orderObj, ...orderObj,
notUpgradeOrderList, // notUpgradeOrderList,
createDate: dateObj.today createDate: dateObj.today
} }
if (type=='success') {
orderObj.preliminaryOrders = notUpgradeOrderList
}else{
orderObj.notUpgradeOrderList = notUpgradeOrderList
}
this.showLoading('提交中...') this.showLoading('提交中...')
console.log('orderObj', orderObj) console.log('orderObj', orderObj)
// return // return
api.notUpgradeOrder(orderObj).then(res => { const apiName = type=='success'? 'createPrerecordedOrderBatch':'notUpgradeOrder'
api[apiName](orderObj).then(res => {
wx.hideLoading() wx.hideLoading()
// console.log(orderObj, res) // console.log(orderObj, res)
let { code, data, message } = res let { code, data, message } = res
...@@ -328,8 +337,9 @@ Page({ ...@@ -328,8 +337,9 @@ Page({
icon: 'success', icon: 'success',
title: '提交成功' title: '提交成功'
}) })
wx.$router.back() // wx.$router.back()
// wx.$router.go('tabindex.index')
wx.$router.go('tabIndex.index')
// if (save) { // if (save) {
// wx.showModal({ // wx.showModal({
// title: '温馨提示', // title: '温馨提示',
......
{ {
"navigationBarTitleText": "战败下单", "navigationBarTitleText": "创建客户档案",
"usingComponents": { "usingComponents": {
"car-brands": "/components/CarBrands/CarBrands", "car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
......
...@@ -214,9 +214,17 @@ ...@@ -214,9 +214,17 @@
<!-- <car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.carSeriesId || ''}}" /> --> <!-- <car-brands show="{{carBrandBox}}" bindconfirm="chooseCar" carSeriesId="{{orderObj.carSeriesId || ''}}" /> -->
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="tips">可批量生成当天的战败客户,缺漏信息建档后在工单详情补充</view> <view class="tips">可批量生成当天的战败客户,缺漏信息建档后在工单详情补充</view>
<view class="confirm text-center" bindtap="submit"> <view class="btns-con">
{{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}}
<view class="confirm fail text-center" bindtap="submit">
战败下单
<!-- {{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}} -->
</view>
<view class="confirm save text-center" bindtap="submit" data-type="success">提交</view>
</view> </view>
<!-- <view class="confirm text-center" bindtap="submit">
{{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}}
</view> -->
</view> </view>
<merchant-seles <merchant-seles
show="{{selesBox}}" show="{{selesBox}}"
......
...@@ -269,14 +269,35 @@ scroll-view ::-webkit-scrollbar { ...@@ -269,14 +269,35 @@ scroll-view ::-webkit-scrollbar {
height: 80rpx; height: 80rpx;
background-color: #3582EE; background-color: #3582EE;
border-radius: 12rpx; border-radius: 12rpx;
margin: 0 32rpx; /* margin: 0 32rpx; */
} }
.btns-con {
box-sizing: border-box;
display: flex;
padding: 0 32rpx;
}
.btns-con .save {
width: 480rpx;
}
.btns-con .fail {
width: 186rpx;
margin-right: 20rpx;
background: #FFFFFF;
border: 2rpx solid #DCDEE0;
border-radius: 12rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #323233;
}
.touch-item { .touch-item {
/* margin: 0 20rpx; */ /* margin: 0 20rpx; */
box-sizing: border-box; box-sizing: border-box;position: relative;
position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
/* width: calc(100% - 40rpx); */ /* width: calc(100% - 40rpx); */
......
...@@ -369,7 +369,7 @@ Page({ ...@@ -369,7 +369,7 @@ Page({
}, },
checkPhoneUseConfig() { checkPhoneUseConfig() {
let { phoneShow, orderObj } = this.data let { phoneShow, orderObj } = this.data
if (phoneShow && orderObj.merchantName && orderObj.employeeName && !orderObj.customer.customerPhone) { if (phoneShow && phoneShow.length && orderObj.merchantName && orderObj.employeeName && !orderObj.customer.customerPhone) {
// let list = phoneShow.shopMerchantPhoneList // let list = phoneShow.shopMerchantPhoneList
let phoneConfig = let phoneConfig =
phoneShow.find(item => { phoneShow.find(item => {
......
const getUpdateManager = () => { const getUpdateManager = () => {
<<<<<<< HEAD
const updateManager = wx.getUpdateManager() const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) { updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调 // 请求完新版本信息的回调
...@@ -20,5 +21,36 @@ const getUpdateManager = () => { ...@@ -20,5 +21,36 @@ const getUpdateManager = () => {
updateManager.onUpdateFailed(function () { updateManager.onUpdateFailed(function () {
// 新版本下载失败 // 新版本下载失败
}) })
=======
let startParamObj = wx.getLaunchOptionsSync()
// 解决朋友圈分享是单页面报错问题
if (wx.canIUse('getUpdateManager') && startParamObj.scene != 1154) {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新版本下载失败
wx.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
})
})
}
>>>>>>> dev_v4.16.0
} }
export default getUpdateManager export default getUpdateManager
...@@ -33,7 +33,7 @@ class Request { ...@@ -33,7 +33,7 @@ class Request {
data: { code, message }, data: { code, message },
data data
} = response } = response
// let thisPage = wx.$router.getPageInstance()
// // console.log(thisPage, 'thisPage') // // console.log(thisPage, 'thisPage')
// let { route, data: pageData } = thisPage // let { route, data: pageData } = thisPage
// if (pageData.shareQuery) { // if (pageData.shareQuery) {
...@@ -44,19 +44,23 @@ class Request { ...@@ -44,19 +44,23 @@ class Request {
// } // }
if (code == 20 || code == 21) { if (code == 20 || code == 21) {
let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
wx.hideLoading() wx.hideLoading()
wx.showModal({ if (thisPage.route != 'pages/wxLogin/wxLogin') {
title: '温馨提示', wx.showModal({
content: '登录过期,请重新登录。', title: '温馨提示',
showCancel: false, content: '登录过期,请重新登录。',
confirmText: '去登录', showCancel: false,
confirmColor: '#3582EE', confirmText: '去登录',
success(res) { confirmColor: '#3582EE',
if (res.confirm) { success(res) {
getApp().login(true) if (res.confirm) {
getApp().login(true)
}
} }
} })
}) }
} else if (code == -1) { } else if (code == -1) {
wx.showToast({ wx.showToast({
title: message || '网络请求失败', title: message || '网络请求失败',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!