Commit d15de879 by 李伟康

commit 增加mask

1 parent 742df99b
......@@ -20,7 +20,6 @@ const getMockData = async (immediate = false) => {
serverConfig.mockCache = null;
serverConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url:configUrl });
console.log(data,'===')
data.createTime = Date.now();
serverConfig.mockCache = data;
uni.$storage.set("mock_data", data);
......
......@@ -46,9 +46,6 @@
<script type='text/ecmascript-6'>
export default {
name: 'CarBrands',
props: {
autoSelect: Boolean
},
data () {
return {
carlist: [],
......@@ -63,13 +60,6 @@ export default {
this.close()
}
},
carBrandList: {
immediate: true,
handler (newval) {
const { sceneType } = uni.$storage.get("userInfo")
if (newval.length && sceneType == 0 && this.autoSelect) this.selectCar(newval[0], true)
}
},
},
computed: {
watchStatus () {
......@@ -88,6 +78,10 @@ export default {
mounted () {
},
methods: {
autoSelect () {
const { carBrandList } = this
if (carBrandList.length) this.selectCar(carBrandList[0], true)
},
open () {
this.$refs.carBrandListVisible.open()
},
......@@ -95,7 +89,9 @@ export default {
let { clickFlga } = this
if (clickFlga) return
this.clickFlga = true
uni.showLoading()
uni.showLoading({
mask: true
})
const customerInfo = this.$store.state.user.customerInfo
customerInfo.carBrand = e.name
this.$store.dispatch('setCustomerInfo', customerInfo)
......
......@@ -8,8 +8,14 @@
<view class="record-content">
<view class="data-box">
<template v-for="(i, index) in dataList">
<view :class="['data-item', i.type]" :key="index">
<image :src="i.icon" class="data-item-bg" />
<view
:class="['data-item', i.type]"
:key="index"
>
<image
:src="i.icon"
class="data-item-bg"
/>
<view class="title">{{ dateList[index].text }}</view>
<view class="content">
<view class="total">
......@@ -38,8 +44,7 @@
:class="['tab flex', { active: dateIndex == index }]"
:key="index"
@click="changeIndex(index)"
>{{ i.text }}</view
>
>{{ i.text }}</view>
</template>
<view :class="['active-btn', `active-btn-${dateIndex}`]"></view>
</view>
......@@ -49,25 +54,28 @@
<template v-if="list.length && list[0] && list[0].length">
<template v-for="i in list">
<template v-for="item in i">
<view class="item" :key="item.id">
<view
:class="[
<view
class="item"
:key="item.id"
>
<view :class="[
'status flex',
{ deal: item.receptionStatus == 1 },
]"
>{{
]">{{
{
1: "成交",
0: "战败",
}[item.receptionStatus]
}}</view
>
}}</view>
<view class="name">
{{ item.customerName }}
</view>
<view class="goods-name">{{ item.carModel }}</view>
<template v-for="(k, ind) in itemObject">
<view class="info flex" :key="ind">
<view
class="info flex"
:key="ind"
>
<view class="label">{{ k.label }}</view>
<view class="value">{{ item[k.key] || "-" }}</view>
</view>
......@@ -190,7 +198,9 @@ export default {
},
async getReceptionList () {
try {
uni.showLoading()
uni.showLoading({
mask: true
})
const { dateList, dateIndex, pageNum, pageSize } = this,
{ startTime, endTime } = dateList[dateIndex],
userInfo = uni.$storage.get("userInfo"),
......@@ -215,6 +225,7 @@ export default {
this.flag = true
this.total = total
} catch (error) {
uni.hideLoading()
this.flag = true
}
},
......
......@@ -85,7 +85,9 @@ export default {
if (res.confirm) {
_this.$emit('stopAudio')
try {
uni.showLoading()
uni.showLoading({
mask: true
})
const { code, message } = await uni.$api.userApi.logout(),
userInfo = uni.$storage.get("userInfo")
console.log(code)
......
export default {
data() {
data () {
return {
list: [],
dateIndex: 0,
......@@ -11,17 +11,20 @@ export default {
total: 0,
};
},
mounted() {},
mounted () { },
methods: {
async getList(api, params) {
async getList (api, params) {
try {
uni.showLoading();
uni.showLoading({
mask: true
});
const { list, total } = await uni.$api.boutiqueApi[api](params);
uni.hideLoading();
this.list = [...(params.pageNum == 1 ? [] : this.list), ...list];
this.flag = true;
this.total = total;
} catch (error) {
uni.hideLoading()
this.flag = true;
}
},
......
......@@ -364,7 +364,9 @@ export default {
if (clickFlag) return
if (!checkCouponAmount.length) throw '该门店礼券已使用完,请联系管理员配置。'
this.pageParams.clickFlag = true
uni.showLoading()
uni.showLoading({
mask: true
})
let { staffName, salesUuid } = customerInfo,
scene = `id=${couponId}&userId=${salesUuid}&employName=${staffName}&merchantId=${shopMerchantId}&customerName=${customerInfo.customerName}&customerPhone=${customerInfo.phoneNumber}`,
params = {
......
......@@ -61,7 +61,9 @@ export default {
},
methods: {
getListSelectAccount (autoLogin = false) {
uni.showLoading()
uni.showLoading({
mask: true
})
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
let { code, data, message } = res
......@@ -81,6 +83,8 @@ export default {
});
this.flag = true
}
}).catch(() => {
uni.hideLoading()
})
},
chooseAccount (item) {
......@@ -116,7 +120,9 @@ export default {
selectAccountLogin (id) {
if (this.requestFlag) return
this.requestFlag = true
uni.showLoading()
uni.showLoading({
mask: true
})
uni.$api.userApi.selectAccountLogin({ id }).then(data => {
uni.hideLoading()
this.requestFlag = false
......@@ -126,6 +132,8 @@ export default {
title: '获取4S店列表失败',
icon: 'none',
})
}).catch(()=>{
uni.hideLoading()
})
},
// 搜索过滤
......
......@@ -75,7 +75,9 @@ export default {
this.loginUserInfoList = []
this.copyLoginUserInfoList = []
this.flag = false
uni.showLoading()
uni.showLoading({
mask: true
})
let { userInfo } = this
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
......@@ -93,7 +95,9 @@ export default {
})
},
chooseAccount (item) {
uni.showLoading()
uni.showLoading({
mask: true
})
let { loginUserInfoList } = this
let listArr = loginUserInfoList
listArr.map(i => {
......@@ -111,10 +115,14 @@ export default {
let { openSceneArr } = this,
{ merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
{ userInfo } = this
if (!openSceneArr?.length && !userInfo?.isSuper) return uni.showToast({
title: '暂无开通业务,请联系总部管理员',
icon: 'none'
})
if (!openSceneArr?.length && !userInfo?.isSuper) {
uni.hideLoading()
uni.showToast({
title: '暂无开通业务,请联系总部管理员',
icon: 'none'
})
return
}
this.$emit('chooseMerchant', {
...userInfo,
shopMerchantName,
......
......@@ -53,7 +53,9 @@ export default {
this.getSceneArr()
},
getSceneArr () {
uni.showLoading()
uni.showLoading({
mask: true
})
// 超管默认开通全部场景
let { userInfo } = this
if (userInfo?.isSuper) return
......@@ -64,6 +66,8 @@ export default {
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
}).catch(()=>{
uni.hideLoading()
})
},
// 选择场景
......
......@@ -9,7 +9,9 @@ export default {
}
},
mounted () {
uni.showLoading()
uni.showLoading({
mask: true
})
let userInfo = uni.$storage.get('userInfo')
if (userInfo && userInfo.sceneType != undefined && userInfo.sceneType != null) {
uni.$api.userApi.getListSelectAccount().then(res => {
......
......@@ -107,7 +107,9 @@ export default {
},
methods: {
async autoLogin (noSignInUuid) {
uni.showLoading();
uni.showLoading({
mask: true
});
const { data } = await uni.$api.userApi.autoLogin({ noSignInUuid })
uni.hideLoading();
if (data) this.jump(data, true)
......@@ -119,7 +121,9 @@ export default {
if (!mobile) throw '请输入手机号';
if (!phoneRex.test(mobile)) throw '请输入正确的手机号';
if (count) throw '验证码发送过于频繁,请稍后再试';
uni.showLoading();
uni.showLoading({
mask: true
});
const { code, message } = await uni.$api.userApi.getSmsCode({ mobile });
uni.hideLoading();
if (code == '0') {
......@@ -159,7 +163,9 @@ export default {
code: smsCode
}
if (noSignIn) params.noSignIn = noSignIn
uni.showLoading();
uni.showLoading({
mask: true
});
const { code, data, message } = await uni.$api.userApi.smsLogin(params);
console.log(code, data, message);
uni.hideLoading();
......
......@@ -7,9 +7,6 @@
custom
>
<template slot="customContent">
<view class="bg">
<!-- <image src="../../../assets/images/media/bg-1.webp" /> -->
</view>
<view class="content">
<view
class="form-box"
......@@ -59,22 +56,19 @@
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
@close="resetFocusIndex"
autoSelect
/>
</view>
</template>
<script type="text/ecmascript-6">
import Employee from '@/components/Employee.vue'
import CarBrands from '@/components/CarBrands.vue'
export default {
components: { Employee, CarBrands },
components: { CarBrands },
props: {
views: Array,
penSwitch: Boolean,
title: String,
show: Boolean
},
name: 'Media_1',
name: 'Reception',
data () {
return {
formObject: [
......@@ -110,6 +104,9 @@ export default {
if (newval) this.customerInfo = newval
}
},
show(n){
if(n && !this.customerInfo.carModel) this.$refs.carBrandListVisible.autoSelect()
}
},
computed: {
watchCustomerInfo () {
......@@ -156,13 +153,7 @@ export default {
width: 100vw;
height: 100vh;
.content {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
min-height: calc(100vh - 200rpx);
box-sizing: border-box;
padding-top: 196rpx;
.form-box {
height: 80rpx;
......
......@@ -28,17 +28,14 @@
:key="index"
>
<component
:is="item.id == 1 || item.id == 6 ? 'media_' + item.id : 'media-component'"
:is="componentName(item.id)"
:views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch"
:show="id == 6"
:show="id == item.id"
:ref="'media'+item.id"
:title="item.detailTitle || ''"
:mediaBg="item.top_bg"
:madiaId="item.id"
:background="item.background"
:defaultIndex="item.id == 4 ? 1 : 0"
:canvasStyle="item.id == 2 ? 'padding-top:12rpx' : ''"
/>
</view>
</template>
......@@ -69,7 +66,7 @@
</template>
<script>
import ToolBox from "@/components/ToolBox.vue";
import Media_1 from "./components/Media_1.vue";
import Reception from "./components/Reception.vue";
import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue";
import payPop from "./components/payPop.vue";
......@@ -78,7 +75,7 @@ import { mapMutations } from "vuex";
export default {
components: {
ToolBox,
Media_1,
Reception,
MediaComponent,
Media_6,
payPop,
......@@ -129,6 +126,16 @@ export default {
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
componentName (id) {
let name = "";
if (id != 1 && id != 6) name = "media-component";
else
name = {
1: "reception",
6: "media_6",
}[id]
return name;
},
open () {
this.$refs.stepRef.open()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!