Commit e07bdee4 by 李伟康

commit 修改延保

1 parent 4cb4b30b
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
this.$refs.tipBox?.close(); this.$refs.tipBox?.close();
let { sceneType } = uni.$storage.get("userInfo"); let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({ uni.reLaunch({
url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index", url: sceneType == 0 ? "/pages/equity/index" : "/pages/boutique/index",
}); });
}, },
//结束提示 //结束提示
......
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
} }
}, },
{ {
"path": "pages/home/home", "path": "pages/equity/index",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"disableSwipeBack": true "disableSwipeBack": true
} }
}, },
{ {
"path": "pages/informationEntry/informationEntry", "path": "pages/equity/informationEntry",
"style": { "style": {
"navigationBarTitleText": "信息录入", "navigationBarTitleText": "信息录入",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/detail/detail", "path": "pages/equity/detail/detail",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottonDistance": 50, "onReachBottonDistance": 50,
......
...@@ -10,7 +10,11 @@ ...@@ -10,7 +10,11 @@
finishDoneText="下一步" finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。" finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。"
> >
<view class="module-box" slot="module" :key="moduleKey"> <view
class="module-box"
slot="module"
:key="moduleKey"
>
<template v-for="(i, index) in moduleList"> <template v-for="(i, index) in moduleList">
<view <view
:key="index" :key="index"
...@@ -18,7 +22,11 @@ ...@@ -18,7 +22,11 @@
:style="i.style" :style="i.style"
@click="toDetail(i)" @click="toDetail(i)"
> >
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" /> <image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
</view> </view>
</template> </template>
</view> </view>
...@@ -36,7 +44,10 @@ ...@@ -36,7 +44,10 @@
/> />
</template> </template>
<template slot="content"> <template slot="content">
<customer-type ref="customerTypeRef" @choose="chooseCustomerType" /> <customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
/>
</template> </template>
</home-frame> </home-frame>
</template> </template>
...@@ -73,10 +84,6 @@ export default { ...@@ -73,10 +84,6 @@ export default {
}, },
mounted () { mounted () {
this.init() this.init()
this.moduleList.map((e, index) => {
e.icon = require(`@/assets/images/boutique/${index + 1}.png`)
})
this.moduleKey = Date.now()
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
...@@ -128,7 +135,6 @@ export default { ...@@ -128,7 +135,6 @@ export default {
}) })
this.moduleList = moduleList this.moduleList = moduleList
console.log(moduleList) console.log(moduleList)
// this.skeletonStatus = false
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
uni.$storage.set('userInfo', userInfo) uni.$storage.set('userInfo', userInfo)
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/home/home' 0: '/pages/equity/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/home/home' 0: '/pages/equity/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"> <view class="bg">
<image src="../../../assets/images/media/bg-1.webp" /> <!-- <image src="../../../assets/images/media/bg-1.webp" /> -->
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"> <view class="bg">
<image src="../../../assets/images/media/bg-6.webp" /> <!-- <image src="../../../assets/images/media/bg-6.webp" /> -->
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{ title || "历史成交记录" }}</view> <view class="title">{{ title || "历史成交记录" }}</view>
......
...@@ -163,9 +163,8 @@ export default { ...@@ -163,9 +163,8 @@ export default {
// delta: 1, // delta: 1,
// }); // });
// this.stopAudio(); // this.stopAudio();
// pages/informationEntry/informationEntry
uni.navigateTo({ uni.navigateTo({
url: `/pages/informationEntry/informationEntry`, url: `/pages/equity/informationEntry`,
}); });
this.close(); this.close();
}, },
......
<template>
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
</view>
</template>
</view>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
@back="back"
@done="done"
ref="detail"
/>
</template>
<template slot="content">
<novice-guide
@nextStep="nextStep"
@back="back"
/>
</template>
</home-frame>
</template>
<script>
import detail from "./detail/detail";
import { mapMutations } from "vuex";
import NoviceGuide from "@/components/NoviceGuide.vue";
import HomeFrame from '@/components/HomeFrame/index.vue'
export default {
components: { HomeFrame, detail, NoviceGuide },
data () {
return {
moduleList: [],
id: "",
type: "",
chooseItem: {},
tabIndex: 0,
recording: false,
};
},
onBackPress (options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back();
return true;
}
// 其他情况允许正常返回
return false;
},
onShow () {
this.init();
},
async onReachBottom () {
const { tabIndex } = this;
if (tabIndex == 0) this.$refs.detail?.pageonReachBottom();
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
init () {
this.getSoure();
this.findPayInfo();
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
/**获取品牌车型 */
uni.$api.commonApi
.getMerchantCarBrandList([shopMerchantId])
.then(({ data }) => {
let list = data[0].carBrandList,
carBrandList = [];
list?.map((e) => {
e.childs.map((i) => {
i.brandId = e.id;
carBrandList.push(i);
});
});
this.$store.dispatch("setCarBrandsList", carBrandList);
});
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res);
});
},
// 查询素材
async getSoure () {
let moduleList = await uni.$api.commonApi.findSoureList();
//
moduleList.map((e, index) => {
if (index == 3) e.class = 'vertical'
else if (index == 2) e.class = 'square'
else {
e.class = 'landscape'
e.style = {
0: 'width:974rpx;',
1: 'width:652rpx;',
4: 'width: 1282rpx;height: 272rpx;',
5: 'width: 1282rpx;height: 272rpx;',
6: 'display:none;'
}[index]
}
});
console.log(moduleList)
this.moduleList = moduleList;
},
async start () {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
this.clearHistory();
this.$refs.home.startAudio();
this.id = this.moduleList[0].id;
this.type = "edit";
this.recording = true;
},
toDetail (item) {
this.chooseItem = item;
this.$refs.home.previewRef.open();
},
cancel () {
this.$refs.home.previewRef.close();
},
preview () {
let { id } = this.chooseItem;
this.type = "preview";
this.id = id;
this.cancel()
},
// 完成接待
done (e) {
this.$refs.home.finishRef.close();
if (this.recording) this.$refs.home.stopAudio();
this.recording = false;
setTimeout(() => {
this.id = "";
this.type = "";
this.setReceptionStatus(e);
}, 1500);
},
back () {
if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome();
},
backHome () {
if (this.recording) this.$refs.home.stopAudio(true);
this.$refs.home.finishRef.close();
this.id = "";
this.type = "";
this.clearHistory();
this.init();
this.recording = false;
},
nextStep () {
let { id } = this.moduleList[0];
this.type = "preview";
this.id = id;
},
clearHistory () {
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory");
},
openStep () {
this.$refs.home.finishRef.close();
this.$refs.detail.open();
},
// 查询门店支付配置
async findPayInfo () {
const { shopMerchantId } = uni.$storage.get("userInfo");
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId,
});
let paymentType = [];
data.find((item) => {
if (item.paymentType == 1)
paymentType.push({
name: "扫码支付",
type: 1,
title: "付款二维码",
...item,
});
if (item.paymentType == 2)
paymentType.push({
name: "对公账户",
type: 2,
title: "付款方式",
...item,
});
});
this.$store.dispatch("setPaymentType", paymentType);
},
changeTab (index) {
this.tabIndex = index;
if (index == 0) this.init();
},
},
};
</script>
<style scoped lang="scss">
.module-box {
padding-top: 44rpx;
.item {
float: left;
border-radius: 48rpx;
overflow: hidden;
&-img {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.landscape {
height: 312rpx;
}
.square {
width: 318rpx;
height: 312rpx;
}
.vertical {
width: 712rpx;
height: 624rpx;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!