Fix(入驻):[#1355, #1357]1、隐藏简介;2、增加视频封面上传

This commit is contained in:
lifizer
2024-04-28 19:41:59 +08:00
parent 2f33383251
commit 160fc7a65d
2 changed files with 85 additions and 9 deletions
+2 -2
View File
@@ -268,7 +268,7 @@
</view>
</u-form-item>
<u-form-item prop="desc">
<!-- <u-form-item prop="desc">
<view class="content-section">
<u-cell title="店铺简介" :border="false">
<template #label>
@@ -278,7 +278,7 @@
</template>
</u-cell>
</view>
</u-form-item>
</u-form-item> -->
</u-cell-group>
<view class="btn-submit btn-remove" v-if="reviewStatus===0 && isDraft!==1" @click="changeRemove(true)">撤销申请</view>
+83 -7
View File
@@ -189,8 +189,32 @@
</template>
</u-cell>
</u-form-item>
<u-form-item prop="cover">
<u-form-item prop="coverType">
<u-cell title="封面类型" :border="false">
<template #icon>
<text class="required">*</text>
</template>
<template #value>
<u-radio-group
v-model="form.coverType"
placement="row"
>
<u-radio
:name="1"
:customStyle="{marginRight: '16px'}"
active-color="red"
label="图片"
/>
<u-radio
:name="2"
active-color="red"
label="视频"
/>
</u-radio-group>
</template>
</u-cell>
</u-form-item>
<u-form-item v-if="form.coverType === 1" prop="cover">
<u-cell title="店铺封面图" :border="false">
<template #icon>
<text class="required">*</text>
@@ -205,6 +229,31 @@
</template>
</u-cell>
</u-form-item>
<u-form-item v-if="form.coverType === 2" prop="coverVideo">
<u-cell title="店铺视频封面" :border="false">
<template #icon>
<text class="required">*</text>
</template>
</u-cell>
<u-cell :border="false">
<template #title>
<view class="box-upload" @click="chooseLogoVideo()">
<view
v-if="!form.coverVideo"
class="btn-upload"
>上传视频</view>
<video
v-else
:src="form.coverVideo"
:poster="form.coverVideo + '?vframe/jpg/offset/1'"
:controls="false"
play-btn-position="center"
class="video-item"
/>
</view>
</template>
</u-cell>
</u-form-item>
<u-form-item prop="pics">
<u-cell title="店铺图片" :border="false">
@@ -328,7 +377,7 @@
</view>
</u-form-item>
<u-form-item prop="desc">
<!-- <u-form-item prop="desc">
<view class="content-section">
<u-cell title="店铺简介" :border="false">
<template #label>
@@ -338,7 +387,7 @@
</template>
</u-cell>
</view>
</u-form-item>
</u-form-item> -->
</u-cell-group>
<view class="btn-submit btn-remove" v-if="reviewStatus===0 && isDraft!==1" @click="changeRemove(true)">撤销申请
@@ -373,7 +422,12 @@
import CitySelect from "@/components/CitySelect";
import {getShopData, getShopInfo, removeApply, saveSupplier, saveWenwanSupplier} from "@/api/join";
import {getCity, registerVerify} from "@/api/user";
import {chooseImage, moreImage, uploadImage} from "@/utils";
import {
chooseImage,
moreImage,
uploadImage,
chooseVideoToUpload
} from "@/utils"
export default {
name: "pkgJoinSupplier",
@@ -403,6 +457,8 @@ export default {
form: {
name: "",
cover: "",
coverVideo: '',
coverType: 1, // coverType: 1-图片,2-视频
logo: "",
type: 0,
typeText: "",
@@ -481,6 +537,12 @@ export default {
message: '请上传店铺封面图',
trigger: ['blur', 'change']
},
'coverVideo': {
type: 'string',
required: true,
message: '请上传店铺视频方面',
trigger: ['blur', 'change']
},
'logo': {
type: 'string',
required: true,
@@ -648,6 +710,10 @@ export default {
this.form.typeText = this.columnsType[0][this.indexType].name;
this.form.position = this.$forceToDecimal(this.form.longitude, 6) + ',' + this.$forceToDecimal(this.form.latitude, 6);
this.form.area = `${this.form.provinceName} ${this.form.cityName} ${this.form.areaName}`;
if (data.hotelInfo.coverType === 2) {
this.form.coverVideo = data.hotelInfo.cover
this.form.cover = ''
}
}
if (data.supplierInfo) {
@@ -681,6 +747,12 @@ export default {
}
});
},
chooseLogoVideo() {
chooseVideoToUpload(path => {
this.form.coverVideo = path
this.$forceUpdate()
})
},
chooseShopImg() {
let that = this;
@@ -839,9 +911,13 @@ export default {
this.quaPics.map(item => {
this.formSupplier.qualification += (item.url + ",");
})
const postData = Object.assign({}, this.form)
if (postData.coverType === 2) {
postData.cover = postData.coverVideo
}
if (this.infoTitle === "特产") {
saveSupplier(this.form, this.formSupplier, this.partnerId).then(res => {
saveSupplier(postData, this.formSupplier, this.partnerId).then(res => {
if (res.status === 200) {
uni.showToast({
title: "您的入驻申请已提交成功,请耐心等待审核",
@@ -862,7 +938,7 @@ export default {
})
})
} else {
saveWenwanSupplier(this.form, this.formSupplier, this.partnerId).then(res => {
saveWenwanSupplier(postData, this.formSupplier, this.partnerId).then(res => {
if (res.status === 200) {
uni.showToast({
title: "您的入驻申请已提交成功,请耐心等待审核",