Commit 580cfe9d by 李伟康

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

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