Commit 580cfe9d by 李伟康

修改小程序码,增加场景类型和商户

1 parent c1c6a28f
......@@ -277,6 +277,10 @@ export default {
watchStatus () {
return this.$store.state.user.historyStatus
},
shopMerchantId () {
const { shopMerchantId } = uni.$storage.get('userInfo')
return shopMerchantId
},
},
data () {
return {
......@@ -367,12 +371,12 @@ export default {
})
let scene = ''
if (customerInfo.inviteRecordId) {
this.customerInfo = customerInfo
scene= `url=/tabDate/pages/detail/detail&id=${customerInfo.inviteRecordId}`
scene = `url=/tabDate/pages/detail/detail&id=${customerInfo.inviteRecordId}`
} else {
let params = encodeURIComponent(`couponId=${customerInfo.customerCouponId}`)
scene = `url=/tabWorkOrder/pages/createOrder/createOrder&scene=${params}`
}
scene = `${scene}&sceneType=1&shopMerchantId=${this.shopMerchantId}`
uni.$api.commonApi.createQrcode({
scene,
path: '/pages/loading/loading',
......@@ -383,6 +387,9 @@ export default {
if (data) {
this.pageParams.customerCouponId = customerInfo.customerCouponId
this.pageParams.customerQr = data
if (customerInfo.inviteRecordId) this.customerInfo = customerInfo
console.log(customerInfo)
} else throw '生成小程序码失败,请重试!'
} else throw message
......
......@@ -4,19 +4,20 @@ import { getTime, withinSpliter, daysBetween } from './util'
class LocalLog {
logger = null
constructor() {
this.logger = new LogCat()
this.logger = {}
// this.logger = new LogCat()
}
debug(msg) {
this.logger.writeLog(LogLevel.DEBUG, msg)
// this.logger.writeLog(LogLevel.DEBUG, msg)
}
info(msg) {
this.logger.writeLog(LogLevel.INFO, msg)
// this.logger.writeLog(LogLevel.INFO, msg)
}
warn(msg) {
this.logger.writeLog(LogLevel.WARN, msg)
// this.logger.writeLog(LogLevel.WARN, msg)
}
error(msg) {
this.logger.writeLog(LogLevel.ERROR, msg)
// this.logger.writeLog(LogLevel.ERROR, msg)
}
getFiles(beginDate, endDate) {
const logFiles = this.logger.getLogFileList()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!