Commit 1e08060a by 李伟康

Merge branch 'v1.0.6' into v1.0.7

2 parents f24c82d8 1d6db22c
...@@ -4,20 +4,16 @@ ...@@ -4,20 +4,16 @@
"version" : "0.0", "version" : "0.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : "app-plus" : {
{
"launchtype" : "remote" "launchtype" : "remote"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"h5" : "h5" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : "mp-weixin" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"provider" : "aliyun", "provider" : "aliyun",
......
...@@ -23,7 +23,7 @@ Vue.component("wnCanvas", wnCanvas); ...@@ -23,7 +23,7 @@ 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 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;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "1.2.0", "versionName" : "1.4.1",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
......
...@@ -67,11 +67,13 @@ export default { ...@@ -67,11 +67,13 @@ export default {
this.stopAudio(); this.stopAudio();
this.setReceptionStatus(0); this.setReceptionStatus(0);
this.setAudioInfo({ endReasonType: 1 }); this.setAudioInfo({ endReasonType: 1 });
this.$refs.tipBox?.close(); if (this.$refs.tipBox) {
this.$refs.tipBox.close();
let { sceneType } = uni.$storage.get("userInfo"); let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({ uni.reLaunch({
url: sceneType == 0 ? "/pages/equity/index" : "/pages/boutique/index", url: sceneType == 0 ? "/pages/equity/index" : "/pages/boutique/index",
}); });
}
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm() {
...@@ -210,7 +212,7 @@ export default { ...@@ -210,7 +212,7 @@ export default {
this.$store.state.user.customerInfo; this.$store.state.user.customerInfo;
const { name } = uni.$storage.get("userInfo"); const { name } = uni.$storage.get("userInfo");
this.$sendSentry( this.$sendSentry(
`上传文件失败:手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name},失败原因-${result}` `重试多次失败:手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name},失败原因-${result}`
); );
// this.handleErrorFile(res.tempFilePath, UPLOAD_STATUS.fail); // this.handleErrorFile(res.tempFilePath, UPLOAD_STATUS.fail);
...@@ -287,6 +289,9 @@ export default { ...@@ -287,6 +289,9 @@ export default {
// 上传成功 // 上传成功
return result; return result;
} catch (error) { } catch (error) {
if (attempt == 0) {
this.$sendSentry(`第一次上传失败:文件${tempFilePath}`);
}
errorMsg = error; errorMsg = error;
attempt++; attempt++;
// 等待一段时间后重试 // 等待一段时间后重试
...@@ -344,7 +349,7 @@ export default { ...@@ -344,7 +349,7 @@ export default {
}, 1500), }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime() {
if (!this.audioInfo.audioStatus == "start") return; if (this.audioInfo.audioStatus != "start") return;
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.times++; this.times++;
if (this.times >= this.timeout) { if (this.times >= this.timeout) {
......
...@@ -22,18 +22,18 @@ ...@@ -22,18 +22,18 @@
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == item.id }]" :class="['view', { showView: id == item.sort }]"
:key="index" :key="index"
> >
<component <component
:is="componentName(item.id)" :is="componentName(item.sort)"
:views="item.receptionSourceDetailList || []" :views="item.receptionSourceDetailList || []"
:ref="'media' + item.id" :ref="'media' + item.sort"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.id" :madiaId="item.sort"
:customerType="customerType" :customerType="customerType"
@jumpPage="jumpPage" @jumpPage="jumpPage"
:show="id == item.id" :show="id == item.sort"
@reception="reception" @reception="reception"
/> />
</view> </view>
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
idKey="sort"
/> />
</template> </template>
<finish-step <finish-step
...@@ -59,7 +60,6 @@ ...@@ -59,7 +60,6 @@
</template> </template>
<script> <script>
import ToolBox from "@/components/ToolBox.vue"; import ToolBox from "@/components/ToolBox.vue";
import myClick from "@/mixin/click";
import FinishStep from "@/components/FinishStep.vue"; import FinishStep from "@/components/FinishStep.vue";
import Membranes from "./membranes.vue"; import Membranes from "./membranes.vue";
import Reception from "./components/Reception.vue"; import Reception from "./components/Reception.vue";
...@@ -77,7 +77,6 @@ export default { ...@@ -77,7 +77,6 @@ export default {
Case, Case,
history history
}, },
mixins: [myClick],
props: { props: {
id: [String, Number], id: [String, Number],
media: Array, media: Array,
...@@ -95,7 +94,7 @@ export default { ...@@ -95,7 +94,7 @@ export default {
computed: { computed: {
title () { title () {
let { id } = this, let { id } = this,
name = this.media.find((e) => e.id == id)?.detailTitle || ""; name = this.media.find((e) => e.sort == id)?.detailTitle || "";
return name; return name;
}, },
watchStatus () { watchStatus () {
...@@ -112,13 +111,13 @@ export default { ...@@ -112,13 +111,13 @@ export default {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
componentName (id) { componentName (id) {
let name = ""; let name = "";
if ([8, 10, 11].includes(id)) name = "membranes"; if ([2, 4, 5].includes(id)) name = "membranes";
else else
name = { name = {
7: "reception", 1: "reception",
13: "invitation", 7: "invitation",
9: "Case", 3: "Case",
12: 'history' 6: 'history'
}[id]; }[id];
return name; return name;
}, },
...@@ -127,8 +126,8 @@ export default { ...@@ -127,8 +126,8 @@ export default {
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
if (this.id == 7) this.$refs.media7[0].closeAllPopup(); if (this.id == 1) this.$refs.media1[0].closeAllPopup();
this.jumpPage({ id: e.id }) this.jumpPage({ id: e.sort })
}, },
back () { back () {
if (this.historyId) { if (this.historyId) {
...@@ -145,7 +144,7 @@ export default { ...@@ -145,7 +144,7 @@ export default {
this.$emit("done", e); this.$emit("done", e);
}, },
jumpPage ({ id, historyId }) { jumpPage ({ id, historyId }) {
if (historyId) this.$emit('update:historyId', historyId) this.$emit('update:historyId', historyId || '')
this.$emit("update:id", Number(id)); this.$emit("update:id", Number(id));
}, },
/**回店客户 */ /**回店客户 */
...@@ -171,7 +170,7 @@ export default { ...@@ -171,7 +170,7 @@ export default {
this.$emit('reception') this.$emit('reception')
}, },
backInvitation () { backInvitation () {
this.jumpPage({ id: 13 }) this.jumpPage({ id: 7 })
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '请选择回店客户', title: '请选择回店客户',
......
...@@ -88,10 +88,11 @@ export default { ...@@ -88,10 +88,11 @@ export default {
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
init () { init () {
this.customerType = -1
this.getSoure()
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
this.customerType = -1
this.getSoure(shopMerchantId)
/**获取品牌车型 */ /**获取品牌车型 */
uni.$api.commonApi uni.$api.commonApi
.getMerchantCarBrandList([shopMerchantId]) .getMerchantCarBrandList([shopMerchantId])
...@@ -119,9 +120,10 @@ export default { ...@@ -119,9 +120,10 @@ export default {
}); });
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure (merchantNo) {
const moduleList = await uni.$api.commonApi.findSoureList({ const moduleList = await uni.$api.commonApi.findSoureList({
bussinessType: 2 bussinessType: 2,
merchantNo
}); });
moduleList.map((e, index) => { moduleList.map((e, index) => {
if (index < 2) { if (index < 2) {
...@@ -144,9 +146,9 @@ export default { ...@@ -144,9 +146,9 @@ export default {
this.$refs.home.previewRef.close(); this.$refs.home.previewRef.close();
}, },
preview () { preview () {
let { id } = this.chooseItem; let { sort } = this.chooseItem;
this.type = "preview"; this.type = "preview";
this.id = id; this.id = sort;
this.cancel() this.cancel()
}, },
back () { back () {
...@@ -187,7 +189,7 @@ export default { ...@@ -187,7 +189,7 @@ export default {
return true return true
}, },
jumpPage (id) { jumpPage (id) {
this.id = id ? id : this.moduleList[0].id this.id = id ? id : this.moduleList[0].sort
this.type = "edit" this.type = "edit"
}, },
clearHistory () { clearHistory () {
...@@ -204,8 +206,8 @@ export default { ...@@ -204,8 +206,8 @@ export default {
if (!flag) return if (!flag) return
this.customerType = index this.customerType = index
if (index == 0) { if (index == 0) {
const { id } = moduleList[moduleList.length - 1] const { sort } = moduleList[moduleList.length - 1]
this.jumpPage(id) this.jumpPage(sort)
} }
else this.jumpPage() else this.jumpPage()
}, },
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
</view> --> </view> -->
<view class="wrapper"> <view class="wrapper">
<view class="wrapper-content"> <view class="wrapper-content">
<template v-if="views && views[firstIndex] && views[firstIndex].receptionSourceDetailInfoList">
<view class="first-tab"> <view class="first-tab">
<view <view
class="tab-item" class="tab-item"
...@@ -30,20 +32,24 @@ ...@@ -30,20 +32,24 @@
]" ]"
:style="{ left: firstLeft[index] }" :style="{ left: firstLeft[index] }"
></view> ></view>
<view class="text" :class="[firstIndex == index ? `active` : '']">{{ <view
class="text"
:class="[firstIndex == index ? `active` : '']"
>{{
i.tabName i.tabName
}}</view> }}</view>
</view> </view>
</view> </view>
<template v-if="madiaId == 8"> <template v-if="madiaId == 2">
<!-- 套餐 无分组 --> <!-- 套餐 无分组 -->
<view class="content" id="content"> <view
<template class="content"
v-if=" id="content"
>
<template v-if="
views[firstIndex].noGroupReceptionSourceDetailInfoList.length > views[firstIndex].noGroupReceptionSourceDetailInfoList.length >
0 0
" ">
>
<view <view
class="product-list" class="product-list"
:key="firstIndex" :key="firstIndex"
...@@ -78,7 +84,10 @@ ...@@ -78,7 +84,10 @@
</template> </template>
<template v-else> <template v-else>
<!-- 其他 有分组 --> <!-- 其他 有分组 -->
<view class="content" id="content"> <view
class="content"
id="content"
>
<view <view
class="second-tab" class="second-tab"
ref="secondTab" ref="secondTab"
...@@ -94,13 +103,11 @@ ...@@ -94,13 +103,11 @@
>{{ item.tabName }} >{{ item.tabName }}
</view> </view>
</view> </view>
<template <template v-if="
v-if="
views[firstIndex].receptionSourceDetailInfoList.length > 0 && views[firstIndex].receptionSourceDetailInfoList.length > 0 &&
views[firstIndex].receptionSourceDetailInfoList[secondIndex] views[firstIndex].receptionSourceDetailInfoList[secondIndex]
.receptionSourceDetailInfoList .receptionSourceDetailInfoList
" ">
>
<view <view
class="product-list" class="product-list"
:key="firstIndex + secondIndex" :key="firstIndex + secondIndex"
...@@ -138,6 +145,16 @@ ...@@ -138,6 +145,16 @@
</template> </template>
</view> </view>
</template> </template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/boutique/nothing.png"
/>
<view>暂无产品内容</view>
</view>
</template>
</view> </view>
</view> </view>
<image <image
...@@ -177,10 +194,10 @@ export default { ...@@ -177,10 +194,10 @@ export default {
}, },
}, },
watch: { watch: {
show(val) { show (val) {
if (val) this.imgKey = Date.now() if (val) this.imgKey = Date.now()
}, },
watchStatus() { watchStatus () {
console.log(111) console.log(111)
this.firstIndex = 0 this.firstIndex = 0
this.secondIndex = 0 this.secondIndex = 0
...@@ -188,7 +205,7 @@ export default { ...@@ -188,7 +205,7 @@ export default {
} }
}, },
methods: { methods: {
changeIndex(index, name) { changeIndex (index, name) {
if (this[name] == index) return // 点击同一个 if (this[name] == index) return // 点击同一个
this.direction = '' this.direction = ''
console.log(index, name, this[name]) console.log(index, name, this[name])
...@@ -209,7 +226,7 @@ export default { ...@@ -209,7 +226,7 @@ export default {
const data = await uni.$api.boutiqueApi.findSoureList({}) const data = await uni.$api.boutiqueApi.findSoureList({})
console.log(data) console.log(data)
}, },
goDetail(data) { goDetail (data) {
console.log(data) console.log(data)
uni.navigateTo({ uni.navigateTo({
url: `/pages/boutique/productDetail?detailUrl=${data.detailUrl}` url: `/pages/boutique/productDetail?detailUrl=${data.detailUrl}`
......
...@@ -54,7 +54,20 @@ const uploadFile = function (filePath) { ...@@ -54,7 +54,20 @@ const uploadFile = function (filePath) {
success: function (res) { success: function (res) {
console.log(res, 444); console.log(res, 444);
if (res.statusCode != 200) { if (res.statusCode != 200) {
reject(new Error("上传错误:" + JSON.stringify(res))); reject(
new Error(
"上传错误:" +
JSON.stringify({
statusCode: res.statusCode,
filePath,
key: aliyunFileKey,
policy: policyBase64,
OSSAccessKeyId: lsaccessKeyId,
signature: signature,
"x-oss-security-token": securityToken,
})
)
);
} else { } else {
uni.removeSavedFile({ uni.removeSavedFile({
filePath, filePath,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!