Commit 6cf2b444 by 李伟康

commit 提交

1 parent 4a145e97
......@@ -55,4 +55,14 @@ module.exports = {
...data,
});
},
/**轻改素材配置 */
getBoutiqueMaterialConfig (data) {
return http.post({
method: "dj.api.boutique.recepiton.material.merchant.detail",
projectName: "boutique",
...data,
});
},
};
......@@ -16,7 +16,7 @@ const UPLOAD_STATUS = {
import { mapMutations, mapState } from 'vuex'
import utils from '@/utils/utils.js'
export default {
data() {
data () {
return {
voicePath: '',
timer: null,
......@@ -25,7 +25,7 @@ export default {
reaction: 1
}
},
mounted() {
mounted () {
// 获取当前页面栈数组
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
......@@ -38,23 +38,23 @@ export default {
...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']),
...mapState(['user.customerInfo'])
},
created() {
created () {
console.log('created')
},
onHide() {
onHide () {
console.log('隐藏')
// recorderManager.stop();
// recorderManager.start({
// duration: 10000,
// });
},
onShow() {
onShow () {
// console.log(utils.requestAndroidPermission());
},
methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
// //关闭提示
tipCancel() {
tipCancel () {
this.stopAudio()
this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 })
......@@ -67,11 +67,11 @@ export default {
}
},
//结束提示
tipConfirm() {
tipConfirm () {
this.times = 0
this.$refs.tipBox?.close()
},
closeAudio() {
closeAudio () {
this.times = 0
clearInterval(this.timer)
this.timer = null
......@@ -79,7 +79,7 @@ export default {
this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 })
},
getParams() {
getParams () {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map(item => {
......@@ -92,7 +92,18 @@ export default {
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ deviceId: appCode } = uni.getDeviceInfo(),
receptionTrack = this.$store.state.user.receptionTrack,
params = {
receptionCustomerMaterialPointList = []
Object.keys(receptionTrack).map(key => {
receptionCustomerMaterialPointList.push({
...receptionTrack[key],
merchantId: shopMerchantId,
businessScene: sceneType,
staffUuid:salesUuid,
staffName,
receptionDate: Date.now()
})
})
let params = {
staffUuid: uuid,
staffName: name,
serviceMerchantId: merchantId,
......@@ -111,9 +122,10 @@ export default {
merchantId: shopMerchantId,
merchantName,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1 //1问界 2 比亚迪 3 其他
channelType: channelType || 1, //1问界 2 比亚迪 3 其他
receptionCustomerMaterialPointList
}
console.log(receptionTrack)
console.log(params)
return params
},
/**
......@@ -121,7 +133,7 @@ export default {
* @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName
*/
RenameFile(oldFilePath, newFileName) {
RenameFile (oldFilePath, newFileName) {
plus.io.resolveLocalFileSystemURL(oldFilePath, entry => {
entry.getParent(_oldFile => {
entry.moveTo(_oldFile, '/' + newFileName, newFilePath => {
......@@ -180,7 +192,7 @@ export default {
this.handleSave(newFilePath)
})
}, 300),
handleSave(file) {
handleSave (file) {
const audioList = [...this.audioInfo.audioList, file]
if (file) {
this.setAudioInfo({ audioList })
......@@ -192,7 +204,7 @@ export default {
this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' })
},
/**保存记录*/
async saveRecord() {
async saveRecord () {
const params = this.getParams()
const unlock = await uni.$recordManager.lock()
const path = await utils.getFileSaveFolderOnClient()
......@@ -258,7 +270,7 @@ export default {
recorderManager.stop()
}, 1500),
//监听点击事件
initTime() {
initTime () {
if (this.audioInfo.audioStatus != 'start') return
this.timer = setInterval(() => {
// console.log(this.times);
......@@ -270,11 +282,11 @@ export default {
}
}, 1000 * 10)
},
handleTouchStart() {
handleTouchStart () {
this.times = 0
}
},
beforeCreate() {
beforeCreate () {
clearInterval(this.timer)
this.timer = null
}
......
......@@ -12,9 +12,9 @@ export default {
} else {
value = {
openCount: 1,
name: item.title,
id: item.id,
stayTime: 0,
materialName: item.detailTitle,
materialId: item.id,
stayDuration: 0,
entryTime: Date.now()
}
}
......@@ -31,7 +31,7 @@ export default {
receptionTrackLeave () {
let key = this.id,
value = this.receptionTrack[key]
value.stayTime += Number(((Date.now() - value.entryTime) / 1000).toFixed(2))
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
}
}
......
......@@ -237,12 +237,12 @@ export default {
watchStatus: {
immediate: true,
handler(newval) {
console.log('重新进入', this.pageParams)
let item = this.couponList.find(e => e.couponType == 1),
item2 = this.couponList.find(e => e.couponType == 18)
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
else if (item2) this.chooseCoupon(item2) //次选填入「精品」类型
else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券
// console.log('重新进入', this.pageParams)
// let item = this.couponList.find(e => e.couponType == 1),
// item2 = this.couponList.find(e => e.couponType == 18)
// if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
// else if (item2) this.chooseCoupon(item2) //次选填入「精品」类型
// else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券
}
}
},
......@@ -276,9 +276,6 @@ export default {
},
mounted () {
console.log(qrcode.createQrCodeImg('id=10086', {
size: 200
}))
},
methods: {
init () {
......
<template>
<view class="layout">
<view
class="tab-box flex"
>
<view class="tab-box flex">
<template v-for="(item, index) in carList">
<view
:key="index"
......@@ -54,7 +52,7 @@
<view
class="coupon-btn flex"
v-if="!isPreview"
@click="$refs.couponPopup.open(customerType)"
@click="couponPopupRef.open(customerType, customerInfo.customerCouponId)"
>{{couponText}}</view>
</view>
</view>
......@@ -154,15 +152,18 @@ export default {
couponText () {
return this.customerType == 0 ? '查看客户券码' : '为客户发券'
},
change_disabled(){
return this.customerType == 0 || this.$refs.couponPopup.pageParams.QRURL
change_disabled () {
return this.customerType == 0 || this.couponPopupRef.pageParams.QRURL
},
couponPopupRef () {
return this.$refs.couponPopup
}
},
methods: {
changeCar (item) {
if(this.change_disabled) return
if (this.change_disabled) return
this.currentCarString = item
this.updateViewKey = Date.now()
},
......@@ -179,7 +180,14 @@ export default {
this.currentImgUrl = e
},
reception (e) {
this.clearCustomerReceivedTimer()
this.$emit('reception', e)
},
clearCustomerReceivedTimer () {
if (this.couponPopupRef.pageParams.qrTimer) {
clearInterval(this.couponPopupRef.pageParams.qrTimer)
this.couponPopupRef.pageParams.qrTimer = null
}
}
}
}
......
......@@ -18,7 +18,7 @@
color="#000"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
<view class="title" v-if="id != 1">{{ title }}</view>
</view>
<template v-for="(item, index) in media">
<view
......@@ -71,7 +71,7 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue";
import Case from "./case.vue";
import history from "./history.vue";
import {receptionTrackMixin} from '@/mixin/index.js'
import { receptionTrackMixin } from '@/mixin/index.js'
export default {
components: {
ToolBox,
......@@ -165,7 +165,8 @@ export default {
phoneNumber: item.customerPhone,
salesUuid: item.userId,
staffName: item.employeeName,
receiveCouponDate: item.receiveCouponDate
receiveCouponDate: item.receiveCouponDate,
customerCouponId: item.customerCouponId
}
this.$emit('reception', customer)
},
......
......@@ -235,6 +235,11 @@ export default {
this.$store.dispatch("setEmployeeList", res);
});
/**获取车型素材配置 */
uni.$api.boutiqueApi.getBoutiqueMaterialConfig({
merchantId: shopMerchantId
}).then(res =>{
console.log(res,'===========')
})
let boutiqueMediaConfig = {
M5: [defaultConfig[0], defaultConfig[1], defaultConfig[2]],
M7: [defaultConfig[0], defaultConfig[1]],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!