Commit de3771bd by 前端

Merge branch 'v1.0.5' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.5

2 parents 39f0c8c4 1c84093d
...@@ -23,14 +23,6 @@ export default { ...@@ -23,14 +23,6 @@ export default {
}); });
}, },
onShow: async function () { onShow: async function () {
const userInfo = uni.$storage.get("userInfo") || {};
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.reLaunch({
url: "/pages/common/login",
});
}
const systemInfo = await uni.$api.systemApi.getMockData(); const systemInfo = await uni.$api.systemApi.getMockData();
if (systemInfo.isCheckedUpdate) { if (systemInfo.isCheckedUpdate) {
checkUpdate(); checkUpdate();
......
...@@ -34,18 +34,18 @@ module.exports = { ...@@ -34,18 +34,18 @@ module.exports = {
/**选择帐号登陆 */ /**选择帐号登陆 */
selectAccountLogin (data) { selectAccountLogin (data) {
data.projectName = "boutique"; data.projectName = "boutique";
return http.fetch( return http.post({
"dj.api.smartcarlife.workWechat.selectAccountLogin", method: "dj.api.smartcarlife.workWechat.selectAccountLogin",
data ...data,
); });
}, },
// 选择4s店和场景 // 选择4s店和场景
selectMerchantScene (data) { selectMerchantScene (data) {
data.projectName = "boutique"; data.projectName = "boutique";
return http.fetch( return http.post({
"dj.api.smartcarlife.selectMerchantScene", method: "dj.api.smartcarlife.selectMerchantScene",
data ...data,
); });
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI (data) { getYqMerchantSceneConfigAPI (data) {
......
No preview for this file type
...@@ -49,7 +49,8 @@ export default { ...@@ -49,7 +49,8 @@ export default {
data () { data () {
return { return {
carlist: [], carlist: [],
selectItem: {} selectItem: {},
clickFlga: false
} }
}, },
watch: { watch: {
...@@ -81,6 +82,9 @@ export default { ...@@ -81,6 +82,9 @@ export default {
this.$refs.carBrandListVisible.open() this.$refs.carBrandListVisible.open()
}, },
selectCar (e) { selectCar (e) {
let { clickFlga } = this
if (clickFlga) return
this.clickFlga = true
uni.showLoading() uni.showLoading()
const customerInfo = this.$store.state.user.customerInfo const customerInfo = this.$store.state.user.customerInfo
customerInfo.carBrand = e.name customerInfo.carBrand = e.name
...@@ -99,7 +103,11 @@ export default { ...@@ -99,7 +103,11 @@ export default {
uni.hideLoading() uni.hideLoading()
this.carlist = res this.carlist = res
this.$refs.carBoxVisible.open() this.$refs.carBoxVisible.open()
}).catch(() => uni.hideLoading()) this.clickFlga = false
}).catch(() => {
this.clickFlga = false
uni.hideLoading()
})
}, },
handleSelect (item) { handleSelect (item) {
this.$refs.carBoxVisible.close(); this.$refs.carBoxVisible.close();
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
class="input" class="input"
:placeholder="i.placeholder" :placeholder="i.placeholder"
:disabled="customerType == 0" :disabled="customerType == 0"
@input="inputCustomer"
/> />
</template> </template>
<template v-else> <template v-else>
...@@ -298,6 +299,9 @@ export default { ...@@ -298,6 +299,9 @@ export default {
this.setReceptionStatus(receptionStatus); this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus) this.$emit('submit', receptionStatus)
}, },
inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.formData)
},
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close(); this.$refs[popkey].close();
if (popkey == "employeeBoxVisible") { if (popkey == "employeeBoxVisible") {
......
...@@ -85,11 +85,20 @@ ...@@ -85,11 +85,20 @@
</view> </view>
</view> </view>
</template> </template>
<image <view
class="start" class="start"
src="../../assets/images/home/start.webp"
@click="$emit('start')" @click="$emit('start')"
/> >
<image
class="start-btn"
src="../../assets/images/home/start.gif"
/>
<image
class="start-border"
src="../../assets/images/home/start-border.png"
/>
</view>
<!-- <view class="start"> <!-- <view class="start">
<view class="start-btn"></view> <view class="start-btn"></view>
</view> --> </view> -->
...@@ -199,7 +208,7 @@ export default { ...@@ -199,7 +208,7 @@ export default {
}; };
}, },
mounted () { mounted () {
let userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo") || {};
this.userInfo = userInfo this.userInfo = userInfo
setInterval(() => { setInterval(() => {
this.dateKey = Date.now(); this.dateKey = Date.now();
...@@ -223,6 +232,7 @@ export default { ...@@ -223,6 +232,7 @@ export default {
}, },
methods: { methods: {
changeIndex (index) { changeIndex (index) {
if (this.tabIndex == index) return
this.tabIndex = index; this.tabIndex = index;
this.$emit("changeTab", index) this.$emit("changeTab", index)
}, },
...@@ -544,64 +554,28 @@ export default { ...@@ -544,64 +554,28 @@ export default {
transform: translateY(calc(100% - 20px)) translateX(0); transform: translateY(calc(100% - 20px)) translateX(0);
} }
} }
/* 动态计算动画时长以匹配长宽比 */
.start[data-long="true"] {
--duration: calc(12s * (var(--width) / var(--height)));
}
.start[data-long="false"] {
--duration: 6s; /* 或者任何适合短边动画时长 */
}
.start { .start {
// border-radius: 48rpx;
// border: 4rpx solid #fff;
// box-sizing: border-box;
// position: relative;
// overflow: hidden;
&::after {
content: "";
position: absolute;
width: 20rpx;
height: 20rpx;
background-color: white; /* 光环内部的颜色,可以根据需要调整 */
border-radius: 50%; /* 如果希望是圆形光环,则设置为50%以形成圆形 */
box-shadow: 0 0 40rpx 40rpx rgba(255, 255, 255, 0.5),
/* 外发光,白色半透明 */ 0 0 30px 30px rgba(255, 255, 255, 0.3); /* 可以叠加多层以增强效果 */
animation: moveAround var(--duration) ease-in-out infinite;
}
&-btn { &-btn {
position: absolute; position: absolute;
width: calc(100% - 24rpx); width: calc(100% - 64rpx);
height: calc(100% - 24rpx); height: calc(100% - 64rpx);
background-image: linear-gradient(to bottom, #48a6ff 0%, #2c66f7 100%);
border-radius: 48rpx;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
vertical-align: top;
}
&-border {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
vertical-align: top;
} }
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
height: 336rpx; height: 336rpx;
vertical-align: top;
// display: flex; position: relative;
// justify-content: center;
// align-items: center;
// // background-image: linear-gradient(90deg, #48a6ff 0%, #2c66f7 100%);
// border-radius: 40rpx;
// transition: all 0.15s;
// background-image: linear-gradient(90deg, #48d7ff, #445dff, #48d7ff);
// background-size: 200% 100%;
// animation: shine 4s linear infinite forwards;
.icon-start {
width: 72rpx;
height: 72rpx;
margin-right: 20rpx;
}
.start-text {
font-weight: 600;
font-size: 48rpx;
color: #ffffff;
line-height: 44rpx;
}
} }
.hover-class { .hover-class {
transform: scale(0.98); transform: scale(0.98);
......
...@@ -135,6 +135,8 @@ export default { ...@@ -135,6 +135,8 @@ export default {
opacity: 0; opacity: 0;
position: relative; position: relative;
background: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.6);
visibility: hidden;
height: 0;
&::after { &::after {
position: absolute; position: absolute;
content: ""; content: "";
...@@ -181,6 +183,8 @@ export default { ...@@ -181,6 +183,8 @@ export default {
opacity: 1; opacity: 1;
padding-bottom: 16rpx; padding-bottom: 16rpx;
animation: scale-up-top-right 0.4s; animation: scale-up-top-right 0.4s;
visibility: visible;
height: auto;
} }
@keyframes scale-up-top-right { @keyframes scale-up-top-right {
0% { 0% {
......
...@@ -16,12 +16,14 @@ import GlsxImage from "./components/GlsxImage"; ...@@ -16,12 +16,14 @@ import GlsxImage from "./components/GlsxImage";
import MessageBox from "./components/MessageBox/index"; import MessageBox from "./components/MessageBox/index";
import wnCanvas from "./components/Canvas/wn-canvas"; import wnCanvas from "./components/Canvas/wn-canvas";
import UpdateBox from "./components/UpdateBox"; import UpdateBox from "./components/UpdateBox";
import utils from "./utils/utils";
Vue.component("GlsxImage", GlsxImage); Vue.component("GlsxImage", GlsxImage);
Vue.component("MessageBox", MessageBox); Vue.component("MessageBox", MessageBox);
Vue.component("wnCanvas", wnCanvas); Vue.component("wnCanvas", wnCanvas);
Vue.component("UpdateBox", UpdateBox); Vue.component("UpdateBox", UpdateBox);
uni.$api = api; uni.$api = api;
uni.$storage = new Storage(); uni.$storage = new Storage();
uni.$throttle = utils.throttle
Vue.config.productionTip = false; Vue.config.productionTip = false;
App.mpType = "app"; App.mpType = "app";
Vue.prototype.$ossDomain = config.OSS_DOMAIN; Vue.prototype.$ossDomain = config.OSS_DOMAIN;
......
...@@ -54,6 +54,15 @@ export default { ...@@ -54,6 +54,15 @@ export default {
// }); // });
}, },
onShow() { onShow() {
const userInfo = uni.$storage.get("userInfo") || {};
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.reLaunch({
url: "/pages/common/login",
});
return
}
// console.log(utils.requestAndroidPermission()); // console.log(utils.requestAndroidPermission());
}, },
methods: { methods: {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: 'CustomerType',
data () { data () {
return { return {
typeList: [ typeList: [
...@@ -67,10 +67,11 @@ export default { ...@@ -67,10 +67,11 @@ export default {
this.$refs.customer.close(); this.$refs.customer.close();
this.$emit('cancel') this.$emit('cancel')
}, },
choose (index) { choose: uni.$throttle(function (index) {
this.$emit('choose', index) this.$emit('choose', index)
this.$refs.customer.close(); this.$refs.customer.close();
} }, 200)
} }
} }
</script> </script>
......
...@@ -7,17 +7,22 @@ ...@@ -7,17 +7,22 @@
class="qrPopup" class="qrPopup"
> >
<view class="box"> <view class="box">
<view <template v-if="count > 0">
class="icon-close-box flex" <view class="icon-close-box count">{{count}}</view>
@click="close" </template>
> <template v-else>
<uni-icons <view
class="icon-close" class="icon-close-box flex"
type="closeempty" @click="close"
:size="16" >
color="#1A1A1A" <uni-icons
></uni-icons> class="icon-close"
</view> type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
</template>
<view class="content flex"> <view class="content flex">
<view class="title flex"> <view class="title flex">
<view class="sprite-icon icon-scan"></view> <view class="sprite-icon icon-scan"></view>
...@@ -52,6 +57,7 @@ export default { ...@@ -52,6 +57,7 @@ export default {
}, },
data () { data () {
return { return {
count: 4
} }
}, },
mounted () { mounted () {
...@@ -59,11 +65,21 @@ export default { ...@@ -59,11 +65,21 @@ export default {
methods: { methods: {
open () { open () {
this.$refs.qr.open(); this.$refs.qr.open();
this.count = 3
this.countDown()
}, },
close () { close () {
this.$refs.qr.close(); this.$refs.qr.close();
this.$emit('close') this.$emit('close')
}, },
countDown(){
setTimeout(() => {
if(this.count > 0){
this.count--
this.countDown()
}
}, 1000)
}
} }
} }
</script> </script>
...@@ -84,6 +100,9 @@ export default { ...@@ -84,6 +100,9 @@ export default {
top: 0; top: 0;
right: 0; right: 0;
} }
.count{
color: #999999;
}
.content { .content {
flex-direction: column; flex-direction: column;
...@@ -92,7 +111,7 @@ export default { ...@@ -92,7 +111,7 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
.sprite-icon{ .sprite-icon {
margin-right: 12rpx; margin-right: 12rpx;
} }
} }
......
...@@ -245,7 +245,8 @@ export default { ...@@ -245,7 +245,8 @@ export default {
couponId: '', couponId: '',
carInfo: {}, carInfo: {},
QRURL: '', QRURL: '',
showDetail: false showDetail: false,
clickFlag: false
}, },
couponErrorTips: '', couponErrorTips: '',
refreshKey: Date.now() refreshKey: Date.now()
...@@ -302,6 +303,7 @@ export default { ...@@ -302,6 +303,7 @@ export default {
return b.createdDate - a.createdDate return b.createdDate - a.createdDate
})[0]) })[0])
}) })
console.log(arr)
let item = arr.find(e => e.couponType == 1), let item = arr.find(e => e.couponType == 1),
item2 = arr.find(e => e.couponType == 18) item2 = arr.find(e => e.couponType == 18)
if (!this.pageParams.couponId) { if (!this.pageParams.couponId) {
...@@ -353,10 +355,14 @@ export default { ...@@ -353,10 +355,14 @@ export default {
}, },
async createCoupon () { async createCoupon () {
try { try {
const { pageParams: { couponId, carInfo }, customerInfo } = this, { const { pageParams: { clickFlag, couponId, carInfo }, customerInfo } = this, {
shopMerchantId } = uni.$storage.get("userInfo"), shopMerchantId } = uni.$storage.get("userInfo"),
validateStatus = await this.validate() validateStatus = await this.validate(),
checkCouponAmount = await this.checkCouponAmount(couponId, [shopMerchantId])
if (!checkCouponAmount.length) throw '该门店礼券已使用完,请联系管理员配置。'
if (!validateStatus) return if (!validateStatus) return
if (clickFlag) return
this.pageParams.clickFlag = true
uni.showLoading() uni.showLoading()
let { staffName, salesUuid } = customerInfo, let { staffName, salesUuid } = customerInfo,
scene = `id=${couponId}&userId=${salesUuid}&employName=${staffName}&merchantId=${shopMerchantId}&customerName=${customerInfo.customerName}&customerPhone=${customerInfo.phoneNumber}`, scene = `id=${couponId}&userId=${salesUuid}&employName=${staffName}&merchantId=${shopMerchantId}&customerName=${customerInfo.customerName}&customerPhone=${customerInfo.phoneNumber}`,
...@@ -373,17 +379,20 @@ export default { ...@@ -373,17 +379,20 @@ export default {
data, data,
message message
} = await uni.$api.commonApi.createQrcode(params) } = await uni.$api.commonApi.createQrcode(params)
uni.hideLoading()
if (code == 0) { if (code == 0) {
if (data) { if (data) {
this.pageParams.QRURL = data this.pageParams.QRURL = data
this.checkCustomerReceivedStatus(dayjs().format("YYYY-MM-DD HH:mm:ss")) this.checkCustomerReceivedStatus(dayjs().format("YYYY-MM-DD HH:mm:ss"))
this.$refs.qrbox.open() this.$refs.qrbox.open()
uni.hideLoading()
this.pageParams.clickFlag = false
} }
else throw '生成小程序码失败,请重试!' else throw '生成小程序码失败,请重试!'
} else throw message } else throw message
} catch (error) { } catch (error) {
uni.hideLoading()
if (error) { if (error) {
this.pageParams.clickFlag = false
this.couponErrorTips = error this.couponErrorTips = error
this.$refs.couponTips.open() this.$refs.couponTips.open()
} }
...@@ -399,6 +408,8 @@ export default { ...@@ -399,6 +408,8 @@ export default {
if (phoneNumber && !phoneRex.test(phoneNumber)) throw '请输入正确的手机号' if (phoneNumber && !phoneRex.test(phoneNumber)) throw '请输入正确的手机号'
if (!couponId) throw '请选择礼券类型' if (!couponId) throw '请选择礼券类型'
} catch (error) { } catch (error) {
this.pageParams.clickFlag = false
uni.hideLoading()
uni.showToast({ uni.showToast({
title: error, title: error,
icon: 'none', icon: 'none',
...@@ -408,6 +419,7 @@ export default { ...@@ -408,6 +419,7 @@ export default {
return flag return flag
}, },
checkCustomerReceivedStatus (receiveCouponStartTime) { checkCustomerReceivedStatus (receiveCouponStartTime) {
if(this.pageParams.qrTimer) return
try { try {
this.pageParams.received = false this.pageParams.received = false
this.pageParams.qrTimer = setInterval(async () => { this.pageParams.qrTimer = setInterval(async () => {
...@@ -449,6 +461,13 @@ export default { ...@@ -449,6 +461,13 @@ export default {
}, },
resetFocusIndex () { resetFocusIndex () {
this.focusIndex = -1 this.focusIndex = -1
},
async checkCouponAmount (merchantCouponId, merchantIdList) {
const { list } = await uni.$api.boutiqueApi.findCouponList({
merchantCouponId,
merchantIdList
})
return list || []
} }
} }
} }
......
...@@ -66,7 +66,6 @@ import { mapMutations } from "vuex"; ...@@ -66,7 +66,6 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue"; import invitation from "./invitation.vue";
import Case from "./case.vue"; import Case from "./case.vue";
import history from "./history.vue"; import history from "./history.vue";
import utils from "@/utils/utils";
export default { export default {
components: { components: {
ToolBox, ToolBox,
...@@ -101,7 +100,7 @@ export default { ...@@ -101,7 +100,7 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
toolList(){ toolList () {
return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) { return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) {
return a.shortSort - b.shortSort return a.shortSort - b.shortSort
}) })
...@@ -149,7 +148,17 @@ export default { ...@@ -149,7 +148,17 @@ export default {
this.$emit("update:id", Number(id)); this.$emit("update:id", Number(id));
}, },
/**回店客户 */ /**回店客户 */
reception ({ item }) { async reception ({ item }) {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return
}
this.$store.dispatch('setCustomerInfo', { this.$store.dispatch('setCustomerInfo', {
customerName: item.customerName, customerName: item.customerName,
carModel: item.carSeriesName, carModel: item.carSeriesName,
......
...@@ -187,11 +187,12 @@ export default { ...@@ -187,11 +187,12 @@ export default {
title: "为了记录语音通话,请打开录音权限", title: "为了记录语音通话,请打开录音权限",
icon: "none", icon: "none",
}); });
return; return false
} }
if (before) this.clearHistory(); if (before) this.clearHistory();
this.startAudio(); this.startAudio();
this.recording = true this.recording = true
return true
}, },
jumpPage (id) { jumpPage (id) {
this.id = id ? id : this.moduleList[0].id this.id = id ? id : this.moduleList[0].id
...@@ -205,10 +206,11 @@ export default { ...@@ -205,10 +206,11 @@ export default {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
this.$refs.detail.open(); this.$refs.detail.open();
}, },
chooseCustomerType (index) { async chooseCustomerType (index) {
const { moduleList } = this const { moduleList } = this,
flag = await this.start()
if (!flag) return
this.customerType = index this.customerType = index
this.start()
if (index == 0) { if (index == 0) {
const { id } = moduleList[moduleList.length - 1] const { id } = moduleList[moduleList.length - 1]
this.jumpPage(id) this.jumpPage(id)
......
...@@ -117,26 +117,40 @@ export default { ...@@ -117,26 +117,40 @@ export default {
} }
}, },
},
watch: {
watchStatus: {
handler () {
this.init()
},
immediate: true
},
show () {
this.$refs.receptionTips?.close()
this.getRecordList()
}
},
methods: { methods: {
init() { init () {
this.customerNameOrPhone = ''; this.customerNameOrPhone = '';
this.isSearch = false this.isSearch = false
this.pageNum = 1 this.pageNum = 1
this.flag = false this.flag = false
this.getRecordList()
}, },
//已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约 //已预约的并且预约时间小于当前时间的,显示超时未到店,否则显示已预约
formatInvite(val) { formatInvite (val) {
if(val.inviteStatus == 2 && new Date().getTime() > new Date(val.inviteDate).getTime()) { if (val.inviteStatus == 2 && new Date().getTime() > new Date(val.inviteDate).getTime()) {
return 5 return 5
} }
return val.inviteStatus return val.inviteStatus
}, },
formatTime(val,key) { formatTime (val, key) {
if(key == 'customerPhone') { if (key == 'customerPhone') {
return val.slice(0, 3) + " " + val.slice(3, 7) + " " + val.slice(7) return val.slice(0, 3) + " " + val.slice(3, 7) + " " + val.slice(7)
} }
return dayjs(val).format("YYYY-MM-DD HH:mm:ss") return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
}, },
//下拉分页 //下拉分页
pageonReachBottom () { pageonReachBottom () {
...@@ -151,15 +165,15 @@ export default { ...@@ -151,15 +165,15 @@ export default {
this.customerNameOrPhone = e.detail.value this.customerNameOrPhone = e.detail.value
if (this.customerNameOrPhone == '') if (this.customerNameOrPhone == '')
this.isSearch = false this.isSearch = false
this.pageNum = 1 this.pageNum = 1
this.flag = false this.flag = false
this.getRecordList() this.getRecordList()
}, },
focus () { focus () {
this.isSearch = true this.isSearch = true
}, },
handleClear() { handleClear () {
this.init() this.init()
}, },
getRecordList () { getRecordList () {
const { pageNum, pageSize, customerNameOrPhone } = this, const { pageNum, pageSize, customerNameOrPhone } = this,
...@@ -176,11 +190,11 @@ export default { ...@@ -176,11 +190,11 @@ export default {
this.chooseItem = item this.chooseItem = item
this.$refs.receptionTips.open() this.$refs.receptionTips.open()
}, },
jumpPage () { jumpPage: uni.$throttle(function () {
this.$emit('reception', { this.$emit('reception', {
item: this.chooseItem item: this.chooseItem
}) })
} }, 200)
}, },
} }
</script> </script>
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
uni.$storage.set('sessionId', sessionId); uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList this.copyLoginUserInfoList = loginUserInfoList
if(autoLogin) this.chooseAccount(loginUserInfoList[0]) if (autoLogin) this.chooseAccount(loginUserInfoList[0])
} else uni.showToast({ } else uni.showToast({
title: message, title: message,
icon: 'none', icon: 'none',
...@@ -117,14 +117,13 @@ export default { ...@@ -117,14 +117,13 @@ export default {
if (this.requestFlag) return if (this.requestFlag) return
this.requestFlag = true this.requestFlag = true
uni.showLoading() uni.showLoading()
uni.$api.userApi.selectAccountLogin({ id }).then(res => { uni.$api.userApi.selectAccountLogin({ id }).then(data => {
uni.hideLoading() uni.hideLoading()
this.requestFlag = false this.requestFlag = false
let { data, message } = res, let [userInfo] = data.loginUserInfoList
[userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo) if (data && userInfo) this.get4SStoreList(userInfo)
else uni.showToast({ else uni.showToast({
title: message, title: '获取4S店列表失败',
icon: 'none', icon: 'none',
}) })
}) })
......
...@@ -80,13 +80,12 @@ export default { ...@@ -80,13 +80,12 @@ export default {
if (userInfo?.isSuper) this.jump(userInfo) if (userInfo?.isSuper) this.jump(userInfo)
else { else {
try { try {
const { message, data, code } = await uni.$api.userApi.selectMerchantScene({ const data = await uni.$api.userApi.selectMerchantScene({
merchantId: userInfo.shopMerchantId, merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName, merchantName: userInfo.shopMerchantName,
sceneType sceneType
}) })
if (code == 0) this.jump(userInfo, data) if (data) this.jump(userInfo, data)
else throw message
} catch (error) { } catch (error) {
uni.showToast({ uni.showToast({
title: error, title: error,
......
...@@ -254,6 +254,7 @@ export default { ...@@ -254,6 +254,7 @@ export default {
this.pageNum = 1 this.pageNum = 1
this.dateIndex = index this.dateIndex = index
this.getReceptionList() this.getReceptionList()
this.getReceptionStatistics(0)
}, },
pageonReachBottom () { pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this let { pageNum, total, nothing, pageSize } = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!