Commit f6bb913d by 李伟康

commit 接待

1 parent e9867ed7
......@@ -19,15 +19,13 @@ module.exports = {
currentPage: 1,
pageSize: 99999,
...data,
},
false,
"ip"
}
);
},
/**查询用户是否领券 */
findCustomerReceivedStatus (data) {
return http.post({
method: "dj.api.smartcarlife.customerCoupon.page",
method: "dj.api.smartcarlife.customerCoupon.pageForZYApp",
projectName: "boutique",
...data,
currentPage: 1,
......
......@@ -68,10 +68,7 @@ class Request {
let {
data,
} = response
if (!data) return uni.showToast({
title: "接口异常",
icon: "none",
});
if (!data) return reject()
let { code, message } = data
if (returnAll) {
resolve(data);
......
.sprite-icon {
background-image: url(@/assets/images/sprite.png);
background-size: 1070rpx 876rpx;
}
.icon-arrow-right {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -60rpx;
}
.icon-back {
width: 128rpx;
height: 50rpx;
background-position: -942rpx 0rpx;
}
.icon-change-account {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -102rpx;
}
.icon-customer-1 {
width: 400rpx;
height: 400rpx;
background-position: 0rpx 0rpx;
}
.icon-customer-2 {
width: 400rpx;
height: 400rpx;
background-position: -410rpx 0rpx;
}
.icon-face-error-active {
width: 96rpx;
height: 96rpx;
background-position: -820rpx -610rpx;
}
.icon-face-error {
width: 96rpx;
height: 96rpx;
background-position: 0rpx -780rpx;
}
.icon-face-success-active {
width: 96rpx;
height: 96rpx;
background-position: -106rpx -780rpx;
}
.icon-face-success {
width: 96rpx;
height: 96rpx;
background-position: -212rpx -780rpx;
}
.icon-feedback {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -150rpx;
}
.icon-first-nav {
width: 464rpx;
height: 176rpx;
background-position: 0rpx -410rpx;
}
.icon-home-active {
width: 80rpx;
height: 80rpx;
background-position: -942rpx -60rpx;
}
.icon-home {
width: 80rpx;
height: 80rpx;
background-position: -942rpx -150rpx;
}
.icon-icon-addr {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -192rpx;
}
.icon-icon-avatar {
width: 112rpx;
height: 112rpx;
background-position: -820rpx 0rpx;
}
.icon-icon-female {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -240rpx;
}
.icon-icon-handshake {
width: 72rpx;
height: 72rpx;
background-position: -942rpx -420rpx;
}
.icon-icon-male {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -282rpx;
}
.icon-icon-shop {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -330rpx;
}
.icon-icon-upload {
width: 128rpx;
height: 128rpx;
background-position: -644rpx -410rpx;
}
.icon-icon-weixin {
width: 32rpx;
height: 32rpx;
background-position: -1032rpx -372rpx;
}
.icon-kf-0 {
width: 32rpx;
height: 32rpx;
background-position: -1016rpx -576rpx;
}
.icon-kf-1 {
width: 32rpx;
height: 32rpx;
background-position: -1012rpx -650rpx;
}
.icon-kf-2 {
width: 32rpx;
height: 32rpx;
background-position: -1012rpx -720rpx;
}
.icon-kf-3 {
width: 32rpx;
height: 32rpx;
background-position: -1012rpx -790rpx;
}
.icon-logo {
width: 160rpx;
height: 160rpx;
background-position: -474rpx -410rpx;
}
.icon-new-addr {
width: 32rpx;
height: 32rpx;
background-position: -820rpx -716rpx;
}
.icon-new-avatar {
width: 96rpx;
height: 96rpx;
background-position: -318rpx -780rpx;
}
.icon-new-feedback {
width: 64rpx;
height: 64rpx;
background-position: -942rpx -502rpx;
}
.icon-new-home-active {
width: 112rpx;
height: 112rpx;
background-position: -820rpx -122rpx;
}
.icon-new-home {
width: 112rpx;
height: 112rpx;
background-position: -820rpx -244rpx;
}
.icon-new-record-active {
width: 112rpx;
height: 112rpx;
background-position: -820rpx -366rpx;
}
.icon-new-record {
width: 112rpx;
height: 112rpx;
background-position: -820rpx -488rpx;
}
.icon-new-setting {
width: 64rpx;
height: 64rpx;
background-position: -942rpx -576rpx;
}
.icon-pen-active {
width: 120rpx;
height: 120rpx;
background-position: -490rpx -596rpx;
}
.icon-pen {
width: 120rpx;
height: 120rpx;
background-position: -620rpx -596rpx;
}
.icon-qw {
width: 48rpx;
height: 48rpx;
background-position: -1016rpx -502rpx;
}
.icon-record-active {
width: 80rpx;
height: 80rpx;
background-position: -942rpx -240rpx;
}
.icon-record {
width: 80rpx;
height: 80rpx;
background-position: -942rpx -330rpx;
}
.icon-scene-0 {
width: 96rpx;
height: 96rpx;
background-position: -424rpx -780rpx;
}
.icon-scene-1 {
width: 96rpx;
height: 96rpx;
background-position: -530rpx -780rpx;
}
.icon-search {
width: 40rpx;
height: 40rpx;
background-position: -1024rpx -420rpx;
}
.icon-second-nav {
width: 480rpx;
height: 128rpx;
background-position: 0rpx -596rpx;
}
.icon-setting {
width: 32rpx;
height: 32rpx;
background-position: -862rpx -716rpx;
}
.icon-store {
width: 96rpx;
height: 96rpx;
background-position: -636rpx -780rpx;
}
.icon-tool-file {
width: 60rpx;
height: 60rpx;
background-position: -942rpx -650rpx;
}
.icon-tool-finish {
width: 60rpx;
height: 60rpx;
background-position: -942rpx -720rpx;
}
.icon-tool-pay {
width: 60rpx;
height: 60rpx;
background-position: -942rpx -790rpx;
}
.icon-customer-1 {
width: 400rpx;
height: 400rpx;
background-position: 0rpx 0rpx;
}
.icon-customer-2 {
width: 400rpx;
height: 400rpx;
background-position: -410rpx 0rpx;
}
.icon-aito {
width: 320rpx;
height: 36rpx;
background-position: 0rpx -734rpx;
}
.icon-qr-success {
width: 96rpx;
height: 96rpx;
background-position: -742rpx -780rpx;
}
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1070rpx 876rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: 0rpx -734rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1032rpx -60rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -942rpx 0rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1032rpx -102rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -820rpx -610rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -780rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -106rpx -780rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -212rpx -780rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -1032rpx -150rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -410rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: -942rpx -60rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -942rpx -150rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1032rpx -192rpx;}
.icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -820rpx 0rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1032rpx -240rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -942rpx -420rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1032rpx -282rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1032rpx -330rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -644rpx -410rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1032rpx -372rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1016rpx -576rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1012rpx -650rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -1012rpx -720rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1012rpx -790rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -474rpx -410rpx;}
.icon-new-addr { width: 32rpx; height: 32rpx; background-position: -820rpx -716rpx;}
.icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -318rpx -780rpx;}
.icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -942rpx -502rpx;}
.icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -820rpx -122rpx;}
.icon-new-home { width: 112rpx; height: 112rpx; background-position: -820rpx -244rpx;}
.icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -820rpx -366rpx;}
.icon-new-record { width: 112rpx; height: 112rpx; background-position: -820rpx -488rpx;}
.icon-new-setting { width: 64rpx; height: 64rpx; background-position: -942rpx -576rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -490rpx -596rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -620rpx -596rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -424rpx -780rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1016rpx -502rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -942rpx -240rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -942rpx -330rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -530rpx -780rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -636rpx -780rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1024rpx -420rpx;}
.icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -596rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -862rpx -716rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -742rpx -780rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -942rpx -650rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -942rpx -720rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -942rpx -790rpx;}
\ No newline at end of file

937 KB | W: | H:

937 KB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -41,6 +41,7 @@
v-if="isFooter"
>
<view
v-if="showCancelBtn"
class="tips-btn close"
@click="cancel()"
>{{
......@@ -106,7 +107,11 @@ export default {
default: "取消",
},
maxHeight: Number,
back: Boolean
back: Boolean,
showCancelBtn: {
type: Boolean,
default: true,
}
},
methods: {
close () {
......
......@@ -116,6 +116,12 @@
</view>
</view>
</MessageBox>
<MessageBox
ref="couponTips"
content="该门店礼券已使用完,请联系管理员配置。"
:showCancelBtn="false"
confirmBtnText="知道了"
></MessageBox>
<qr-box
:url="pageParams.QRURL"
ref="qrbox"
......@@ -219,30 +225,28 @@ export default {
{ shopMerchantId } = userInfo,
{ list } = await uni.$api.boutiqueApi.findCouponList({
merchantIdList: [shopMerchantId]
})
}),
arr = []
if (list && list.length) {
let couponTypeList = Array.from(new Set([...list.map((e) => e.couponType)]))
let arr = []
couponTypeList.map((i) => {
let item = []
list.map((e) => {
if (i == e.couponType) item.push(e)
})
arr.push({
couponType: i,
list: item
})
if (item.length) arr.push(item.sort(function (a, b) {
return b.createdDate - a.createdDate
})[0])
})
console.log(arr)
let item = list.find(e => e.couponType == 1),
item2 = list.find(e => e.couponType == 18)
let item = arr.find(e => e.couponType == 1),
item2 = arr.find(e => e.couponType == 18)
if (!this.pageParams.couponId) {
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
else if (item2) this.chooseCoupon(item) //次选填入「精品」类型
else this.chooseCoupon(list[0]) // 无此两种类型情况默认带入任意类型礼券
else this.chooseCoupon(arr[0]) // 无此两种类型情况默认带入任意类型礼券
}
}
this.couponList = list || []
} else this.$refs.couponTips.open()
this.couponList = arr
},
inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo)
......@@ -336,22 +340,29 @@ export default {
if (!couponId) throw '请选择礼券类型'
},
checkCustomerReceivedStatus (receiveCouponStartTime) {
this.pageParams.received = false
this.pageParams.qrTimer = setInterval(async () => {
const { pageParams: { couponId }, customerInfo } = this,
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
merchantCouponId: couponId,
customerPhone: customerInfo.phoneNumber,
receiveCouponStartTime
})
if (res.total) {
this.pageParams.received = true
this.closeQr()
setTimeout(() => {
this.$refs.qrbox.close()
}, 3e3)
}
}, 1e3)
try {
this.pageParams.received = false
this.pageParams.qrTimer = setInterval(async () => {
const { pageParams: { couponId }, customerInfo } = this,
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
merchantCouponId: couponId,
customerPhone: customerInfo.phoneNumber,
receiveCouponStartTime
})
if (res && res.total) {
this.pageParams.received = true
this.closeQr()
setTimeout(() => {
this.$refs.qrbox.close()
}, 3e3)
}
}, 1e3)
} catch (error) {
if (error) uni.showToast({
title: error,
icon: "none",
});
}
},
closeQr () {
clearInterval(this.pageParams.qrTimer)
......
......@@ -169,16 +169,16 @@ export default {
this.init();
},
async start () {
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
// if (result !== 1) {
// uni.showToast({
// title: "为了记录语音通话,请打开录音权限",
// icon: "none",
// });
// return;
// }
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
this.$refs.customerTypeRef.open()
this.startAudio();
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!