Commit f6bb913d by 李伟康

commit 接待

1 parent e9867ed7
...@@ -19,15 +19,13 @@ module.exports = { ...@@ -19,15 +19,13 @@ module.exports = {
currentPage: 1, currentPage: 1,
pageSize: 99999, pageSize: 99999,
...data, ...data,
}, }
false,
"ip"
); );
}, },
/**查询用户是否领券 */ /**查询用户是否领券 */
findCustomerReceivedStatus (data) { findCustomerReceivedStatus (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.customerCoupon.page", method: "dj.api.smartcarlife.customerCoupon.pageForZYApp",
projectName: "boutique", projectName: "boutique",
...data, ...data,
currentPage: 1, currentPage: 1,
......
...@@ -68,10 +68,7 @@ class Request { ...@@ -68,10 +68,7 @@ class Request {
let { let {
data, data,
} = response } = response
if (!data) return uni.showToast({ if (!data) return reject()
title: "接口异常",
icon: "none",
});
let { code, message } = data let { code, message } = data
if (returnAll) { if (returnAll) {
resolve(data); resolve(data);
......
.sprite-icon { .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1070rpx 876rpx;}
background-image: url(@/assets/images/sprite.png); .icon-aito { width: 320rpx; height: 36rpx; background-position: 0rpx -734rpx;}
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-arrow-right { .icon-change-account { width: 32rpx; height: 32rpx; background-position: -1032rpx -102rpx;}
width: 32rpx; .icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
height: 32rpx; .icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
background-position: -1032rpx -60rpx; .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -820rpx -610rpx;}
} .icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -780rpx;}
.icon-back { .icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -106rpx -780rpx;}
width: 128rpx; .icon-face-success { width: 96rpx; height: 96rpx; background-position: -212rpx -780rpx;}
height: 50rpx; .icon-feedback { width: 32rpx; height: 32rpx; background-position: -1032rpx -150rpx;}
background-position: -942rpx 0rpx; .icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -410rpx;}
} .icon-home-active { width: 80rpx; height: 80rpx; background-position: -942rpx -60rpx;}
.icon-change-account { .icon-home { width: 80rpx; height: 80rpx; background-position: -942rpx -150rpx;}
width: 32rpx; .icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1032rpx -192rpx;}
height: 32rpx; .icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -820rpx 0rpx;}
background-position: -1032rpx -102rpx; .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1032rpx -240rpx;}
} .icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -942rpx -420rpx;}
.icon-customer-1 { .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1032rpx -282rpx;}
width: 400rpx; .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1032rpx -330rpx;}
height: 400rpx; .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -644rpx -410rpx;}
background-position: 0rpx 0rpx; .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1032rpx -372rpx;}
} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1016rpx -576rpx;}
.icon-customer-2 { .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1012rpx -650rpx;}
width: 400rpx; .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -1012rpx -720rpx;}
height: 400rpx; .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1012rpx -790rpx;}
background-position: -410rpx 0rpx; .icon-logo { width: 160rpx; height: 160rpx; background-position: -474rpx -410rpx;}
} .icon-new-addr { width: 32rpx; height: 32rpx; background-position: -820rpx -716rpx;}
.icon-face-error-active { .icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -318rpx -780rpx;}
width: 96rpx; .icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -942rpx -502rpx;}
height: 96rpx; .icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -820rpx -122rpx;}
background-position: -820rpx -610rpx; .icon-new-home { width: 112rpx; height: 112rpx; background-position: -820rpx -244rpx;}
} .icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -820rpx -366rpx;}
.icon-face-error { .icon-new-record { width: 112rpx; height: 112rpx; background-position: -820rpx -488rpx;}
width: 96rpx; .icon-new-setting { width: 64rpx; height: 64rpx; background-position: -942rpx -576rpx;}
height: 96rpx; .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -490rpx -596rpx;}
background-position: 0rpx -780rpx; .icon-pen { width: 120rpx; height: 120rpx; background-position: -620rpx -596rpx;}
} .icon-qr-success { width: 96rpx; height: 96rpx; background-position: -424rpx -780rpx;}
.icon-face-success-active { .icon-qw { width: 48rpx; height: 48rpx; background-position: -1016rpx -502rpx;}
width: 96rpx; .icon-record-active { width: 80rpx; height: 80rpx; background-position: -942rpx -240rpx;}
height: 96rpx; .icon-record { width: 80rpx; height: 80rpx; background-position: -942rpx -330rpx;}
background-position: -106rpx -780rpx; .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -530rpx -780rpx;}
} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -636rpx -780rpx;}
.icon-face-success { .icon-search { width: 40rpx; height: 40rpx; background-position: -1024rpx -420rpx;}
width: 96rpx; .icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -596rpx;}
height: 96rpx; .icon-setting { width: 32rpx; height: 32rpx; background-position: -862rpx -716rpx;}
background-position: -212rpx -780rpx; .icon-store { width: 96rpx; height: 96rpx; background-position: -742rpx -780rpx;}
} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -942rpx -650rpx;}
.icon-feedback { .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -942rpx -720rpx;}
width: 32rpx; .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -942rpx -790rpx;}
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;
}
\ No newline at end of file \ 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 @@ ...@@ -41,6 +41,7 @@
v-if="isFooter" v-if="isFooter"
> >
<view <view
v-if="showCancelBtn"
class="tips-btn close" class="tips-btn close"
@click="cancel()" @click="cancel()"
>{{ >{{
...@@ -106,7 +107,11 @@ export default { ...@@ -106,7 +107,11 @@ export default {
default: "取消", default: "取消",
}, },
maxHeight: Number, maxHeight: Number,
back: Boolean back: Boolean,
showCancelBtn: {
type: Boolean,
default: true,
}
}, },
methods: { methods: {
close () { close () {
......
...@@ -116,6 +116,12 @@ ...@@ -116,6 +116,12 @@
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
<MessageBox
ref="couponTips"
content="该门店礼券已使用完,请联系管理员配置。"
:showCancelBtn="false"
confirmBtnText="知道了"
></MessageBox>
<qr-box <qr-box
:url="pageParams.QRURL" :url="pageParams.QRURL"
ref="qrbox" ref="qrbox"
...@@ -219,30 +225,28 @@ export default { ...@@ -219,30 +225,28 @@ export default {
{ shopMerchantId } = userInfo, { shopMerchantId } = userInfo,
{ list } = await uni.$api.boutiqueApi.findCouponList({ { list } = await uni.$api.boutiqueApi.findCouponList({
merchantIdList: [shopMerchantId] merchantIdList: [shopMerchantId]
}) }),
arr = []
if (list && list.length) { if (list && list.length) {
let couponTypeList = Array.from(new Set([...list.map((e) => e.couponType)])) let couponTypeList = Array.from(new Set([...list.map((e) => e.couponType)]))
let arr = []
couponTypeList.map((i) => { couponTypeList.map((i) => {
let item = [] let item = []
list.map((e) => { list.map((e) => {
if (i == e.couponType) item.push(e) if (i == e.couponType) item.push(e)
}) })
arr.push({ if (item.length) arr.push(item.sort(function (a, b) {
couponType: i, return b.createdDate - a.createdDate
list: item })[0])
})
}) })
console.log(arr) let item = arr.find(e => e.couponType == 1),
let item = list.find(e => e.couponType == 1), item2 = arr.find(e => e.couponType == 18)
item2 = list.find(e => e.couponType == 18)
if (!this.pageParams.couponId) { if (!this.pageParams.couponId) {
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型 if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
else if (item2) this.chooseCoupon(item) //次选填入「精品」类型 else if (item2) this.chooseCoupon(item) //次选填入「精品」类型
else this.chooseCoupon(list[0]) // 无此两种类型情况默认带入任意类型礼券 else this.chooseCoupon(arr[0]) // 无此两种类型情况默认带入任意类型礼券
} }
} } else this.$refs.couponTips.open()
this.couponList = list || [] this.couponList = arr
}, },
inputCustomer () { inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
...@@ -336,22 +340,29 @@ export default { ...@@ -336,22 +340,29 @@ export default {
if (!couponId) throw '请选择礼券类型' if (!couponId) throw '请选择礼券类型'
}, },
checkCustomerReceivedStatus (receiveCouponStartTime) { checkCustomerReceivedStatus (receiveCouponStartTime) {
this.pageParams.received = false try {
this.pageParams.qrTimer = setInterval(async () => { this.pageParams.received = false
const { pageParams: { couponId }, customerInfo } = this, this.pageParams.qrTimer = setInterval(async () => {
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({ const { pageParams: { couponId }, customerInfo } = this,
merchantCouponId: couponId, res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
customerPhone: customerInfo.phoneNumber, merchantCouponId: couponId,
receiveCouponStartTime customerPhone: customerInfo.phoneNumber,
}) receiveCouponStartTime
if (res.total) { })
this.pageParams.received = true if (res && res.total) {
this.closeQr() this.pageParams.received = true
setTimeout(() => { this.closeQr()
this.$refs.qrbox.close() setTimeout(() => {
}, 3e3) this.$refs.qrbox.close()
} }, 3e3)
}, 1e3) }
}, 1e3)
} catch (error) {
if (error) uni.showToast({
title: error,
icon: "none",
});
}
}, },
closeQr () { closeQr () {
clearInterval(this.pageParams.qrTimer) clearInterval(this.pageParams.qrTimer)
......
...@@ -169,16 +169,16 @@ export default { ...@@ -169,16 +169,16 @@ export default {
this.init(); this.init();
}, },
async start () { async start () {
// const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
// ); );
// if (result !== 1) { if (result !== 1) {
// uni.showToast({ uni.showToast({
// title: "为了记录语音通话,请打开录音权限", title: "为了记录语音通话,请打开录音权限",
// icon: "none", icon: "none",
// }); });
// return; return;
// } }
this.$refs.customerTypeRef.open() this.$refs.customerTypeRef.open()
this.startAudio(); this.startAudio();
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!