add
This commit is contained in:
parent
1a01e1ae65
commit
7e98709d06
3
App.vue
3
App.vue
|
@ -405,7 +405,8 @@
|
|||
//console.log('App Hide')
|
||||
},
|
||||
watch: {
|
||||
// 记录H5和公众号
|
||||
// https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/40390202404250914319725.mp4
|
||||
// 记录H5和公众号?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast
|
||||
$route(n) {
|
||||
if (this.$store.state.app.token) {
|
||||
// 浏览记录
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<swiper-item v-if="isVideoUrl(item)">
|
||||
<video :src="isVideoUrl(item,true)" objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate
|
||||
:enable-progress-gesture="false" :poster="videoCoverImg"></video>
|
||||
:enable-progress-gesture="false" :poster="item+coverUrl"></video>
|
||||
</swiper-item>
|
||||
<swiper-item v-else>
|
||||
<image :src="item" class="slide-image" @click='getpreviewImage(item)' />
|
||||
|
@ -19,7 +19,7 @@
|
|||
<block v-for="(item,index) in imgUrls" :key='index'>
|
||||
<swiper-item v-if="isVideoUrl(item)">
|
||||
<view>
|
||||
<image :src="videoCoverImg" class="slide-image" />
|
||||
<image :src="item+coverUrl" class="slide-image" />
|
||||
<image class="image-play-icon" src="../../static/images/stop.png"
|
||||
@click='videoPlay(item,index)'>
|
||||
</image>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<view v-if="!isPlay" style="width: 100%; height: 750rpx;">
|
||||
<video id="myVideo" :src='playingUrl' objectFit="cover" controls style="width:100%;height:100% "
|
||||
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :enable-progress-gesture="false"
|
||||
:poster="videoCoverImg" @pause="videoPause" @ended="endedFun()"></video>
|
||||
:poster="playingUrl+coverUrl" @pause="videoPause" @ended="endedFun()"></video>
|
||||
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
@ -72,6 +72,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
current: '0',
|
||||
videoTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
|
||||
playingUrl: '',
|
||||
|
|
10
pages.json
10
pages.json
|
@ -1366,7 +1366,15 @@
|
|||
"navigationBarTitleText": "商品详情"
|
||||
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"path": "goods_details/videoPlay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "视屏详情"
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stockOut/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码出库",
|
||||
|
|
|
@ -181,6 +181,39 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card" style="">
|
||||
<view class="">
|
||||
<view class='money font-color'>
|
||||
¥
|
||||
<text style="font-size:56rpx ;">{{storeInfo.price}}</text><text
|
||||
style="font-size: 40rpx;color:#777777 ;">/瓶</text>
|
||||
</view>
|
||||
<view class="" style="font-size:32rpx ;color:#444444 ;margin: 20rpx 0;">
|
||||
{{storeInfo.store_name ? storeInfo.store_name : ''}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="attribute">
|
||||
<view class="attribute-li" v-for="(item,index) in 10">
|
||||
<view class="" style="display: flex;flex-direction: column;align-items: center;">
|
||||
<view class="" style="margin-bottom: 10rpx;">
|
||||
书海性sdsd
|
||||
</view>
|
||||
<view class="">
|
||||
阿萨德
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
|
||||
color="#A1A1A1"></u-line>
|
||||
</view>
|
||||
<view class="attribute-fixed-right">
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<view
|
||||
v-if="storeInfo.product_type == 0 || storeInfo.product_type == 3 || storeInfo.product_type == 1"
|
||||
class='wrapper '>
|
||||
|
@ -208,20 +241,33 @@
|
|||
销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='attribute acea-row row-between-wrapper' @click="selecAttr">
|
||||
<view class="acea-row row-between-wrapper">{{attrTxt}}:
|
||||
</view> -->
|
||||
|
||||
<view class='card'>
|
||||
<view style="display: flex;justify-content: space-between;" @click="selecAttr">
|
||||
<view class="">{{attrTxt}}:
|
||||
<text class='atterTxt'>{{attrValue}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
<view class="">
|
||||
1件
|
||||
<text class='iconfont icon-jiantou'></text>
|
||||
</view>
|
||||
<!--运费-->
|
||||
<view class='attribute acea-row row-between-wrapper' @click="showShip">
|
||||
<view class="acea-row row-between-wrapper">运费:
|
||||
</view>
|
||||
<u-line color="#F3F3F3" style="margin: 30rpx 0;" />
|
||||
<view style="display: flex;justify-content: space-between;" @click="showShip">
|
||||
<view class="">运费:
|
||||
<text class='atterTxt'>{{shippingValue}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view>
|
||||
</view>
|
||||
<!--运费-->
|
||||
<!-- <view class='attribute acea-row row-between-wrapper card' @click="showShip">
|
||||
<view class="acea-row row-between-wrapper">运费:
|
||||
<text class='atterTxt'>{{shippingValue}}</text>
|
||||
</view>
|
||||
<view class='iconfont icon-jiantou'></view>
|
||||
</view> -->
|
||||
<!--保障-->
|
||||
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper'
|
||||
@click="showGuaranee">
|
||||
|
@ -250,7 +296,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 商铺信息 -->
|
||||
<view class="store-wrapper" v-if="storeInfo.merchant && hide_mer_status !=1">
|
||||
<view class="store-wrapper card" v-if="storeInfo.merchant && hide_mer_status !=1">
|
||||
<view class="store-hd">
|
||||
<view class="store-info">
|
||||
<view class="logo">
|
||||
|
@ -298,21 +344,16 @@
|
|||
</view>
|
||||
<block v-if="description.content && description.content.image">
|
||||
<view class="" v-for="(item,index) in description.content.image" :key="index">
|
||||
<view class="" v-if='videoTypeList.includes(getSuffix(item))'>
|
||||
<view class="" style="background-color: red;width: 100rpx;height: 100rpx;"
|
||||
@click="bindPause">
|
||||
{{item}}
|
||||
</view>
|
||||
<!-- <video id="myVideo"
|
||||
:src='item && (item.substring(0,4) == "http" || item.substring(0,5) == "https") ? item : "http:" + item'
|
||||
objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn
|
||||
show-mute-btn="true" auto-pause-if-navigate :enable-progress-gesture="false"
|
||||
:poster="videoCoverImg" @pause="videoPause" @ended="endedFun()"></video> -->
|
||||
</view>
|
||||
<image :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
<view style="position: relative;" v-if='videoTypeList.includes(getSuffix(item))'>
|
||||
<image :src="item+coverUrl" mode="widthFix"
|
||||
style="background-color: #fff;width: 100vw;" />
|
||||
<image class="image-play-icon" src="/static/images/stop.png"
|
||||
style="width: 100rpx;height: 100rpx;" @click="navGoPlay(item)">
|
||||
</image>
|
||||
</view>
|
||||
<image v-else :src="item" mode="widthFix" style="background-color: #fff;width: 100vw;">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -370,6 +411,7 @@
|
|||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
show: false,
|
||||
autoplay: false,
|
||||
isPlay: false,
|
||||
|
@ -480,6 +522,13 @@
|
|||
// this.getConfig()
|
||||
},
|
||||
methods: {
|
||||
navGoPlay(url) {
|
||||
console.log(url)
|
||||
uni.navigateTo({
|
||||
url: `/pages/admin/goods_details/videoPlay?url=${url}`
|
||||
})
|
||||
|
||||
},
|
||||
bindPause: function() {
|
||||
this.show = true
|
||||
console.log(this.isPlay, 'isplsfds')
|
||||
|
@ -1741,4 +1790,52 @@
|
|||
// height: 750rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 710rpx;
|
||||
margin: 20rpx auto;
|
||||
background-color: white;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.attribute {
|
||||
display: flex;
|
||||
background-color: #F6F6F6;
|
||||
// padding: 10rpx;
|
||||
width: 670rpx;
|
||||
height: 112rpx;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
border-radius: 8rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.attribute-li {
|
||||
display: flex;
|
||||
padding: 10rpx 0;
|
||||
font-size: 24rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.attribute-fixed-right {
|
||||
top: 0rpx;
|
||||
position: sticky;
|
||||
right: -30rpx;
|
||||
height: 112rpx;
|
||||
padding: 0;
|
||||
width: 100rpx;
|
||||
background: #F6F6F6;
|
||||
box-shadow: -6rpx 0rpx 6rpx 2rpx rgba(220, 220, 220, 0.28);
|
||||
border-radius: 0rpx 8rpx 8rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,45 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<video :src="url" style="width: 750rpx;height: 1400rpx;" :autoplay='true' id="myvideo" controls></video>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
videoPlay() {
|
||||
console.log("开始播放了")
|
||||
},
|
||||
|
||||
videoShow() {
|
||||
this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传
|
||||
this.videoUrl = this.url;
|
||||
this.videoContext.requestFullScreen({
|
||||
// direction: 90
|
||||
});
|
||||
this.videoContext.play();
|
||||
this.videoPlay = true; // 显示播放盒子
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
this.url = option.url
|
||||
setTimeout(() => {
|
||||
this.videoShow()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -25,8 +25,12 @@
|
|||
<video :src="item"></video>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
|
||||
style=" width:140rpx"></img>
|
||||
<view class="" style="position: relative;">
|
||||
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
|
||||
<view class="image-play-icon">
|
||||
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!--#endif-->
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
@ -131,9 +135,6 @@
|
|||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
|
||||
|
||||
<u-picker :show="show" :columns="columns" confirmColor='#33BB3C' @close='show=false' @confirm='choseMedia'
|
||||
@cancel='show=false'></u-picker>
|
||||
|
||||
|
@ -168,6 +169,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
videoIndex: 0,
|
||||
showVideo: false,
|
||||
upload_max: 100,
|
||||
|
@ -197,6 +199,7 @@
|
|||
],
|
||||
selfAttr: "",
|
||||
formData: {
|
||||
store_info: "",
|
||||
"store_name": "",
|
||||
"imageList": [
|
||||
|
||||
|
@ -641,4 +644,17 @@
|
|||
/* position: absolute; */
|
||||
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
|
@ -4,12 +4,12 @@
|
|||
labelWidth='auto'>
|
||||
<view class="good-baseInfo card">
|
||||
<u-form-item label="商品标题" prop="store_name" ref="item1" required>
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{value1.length}}/{{maxLength}}</text>
|
||||
<text slot='right'
|
||||
style="font-size:28rpx ; color:#989898 ;">{{stroeNameLength}}/{{maxLength}}</text>
|
||||
</u-form-item>
|
||||
<u-form-item label="" prop="userInfo.name" ref="item1">
|
||||
<u--textarea v-model="formData.store_name" placeholder="建议描述产品品牌、名称、规格、口味"
|
||||
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='maxLength'></u--textarea>
|
||||
<!-- <u--textarea v-model="formData.store_name" placeholder="请输入内容"></u--textarea> -->
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="商品主图" prop="formData.imageList" ref="item1" required>
|
||||
|
@ -20,6 +20,7 @@
|
|||
|
||||
<view v-for="(item,index) in formData.imageList"
|
||||
style="margin-right: 20rpx;margin-bottom: 20rpx;">
|
||||
|
||||
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
|
||||
<view class="video_list_item photo" style="position: relative;">
|
||||
<view class="jiao">
|
||||
|
@ -28,8 +29,12 @@
|
|||
<video :src="item"></video>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
|
||||
style=" width:150rpx"></img>
|
||||
<view class="" style="position: relative;">
|
||||
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
|
||||
<view class="image-play-icon">
|
||||
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!--#endif-->
|
||||
<image @click="formData.imageList.splice(index,1)"
|
||||
src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
|
@ -41,9 +46,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="" style="position: relative;" v-else>
|
||||
<view class="jiao" @click="formData.imageList.splice(index,1)">
|
||||
<!-- <view class="jiao" @click="test(index)"> -->
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<u--image @click="preViewImg(item)" :src="item" :fade="true" duration="450"
|
||||
|
@ -79,8 +85,12 @@
|
|||
<video :src="item"></video>
|
||||
<!--#endif-->
|
||||
<!--#ifdef APP-PLUS-->
|
||||
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
|
||||
style=" width:150rpx"></img>
|
||||
<view class="" style="position: relative;">
|
||||
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
|
||||
<view class="image-play-icon">
|
||||
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!--#endif-->
|
||||
<image src="@/static/images/gban.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
@ -107,9 +117,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<view class='tips'>
|
||||
商品类目属性
|
||||
|
@ -196,11 +203,11 @@
|
|||
|
||||
</view>
|
||||
<view class='tips'>
|
||||
服务与承诺
|
||||
|
||||
</view>
|
||||
<view class="card" style="padding: 14rpx 30rpx;">
|
||||
<u-form-item label="商品详细描述" prop="userInfo.name" ref="item1" labelPosition="left">
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{value1.length}}/{{300}}</text>
|
||||
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{storeInfoLength}}/{{300}}</text>
|
||||
</u-form-item>
|
||||
<u--textarea v-model="formData.store_info" placeholder="货品描述请严格遵循《广告法》规定,避免出现虚假宣传和误导消费者的词语"
|
||||
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='300'></u--textarea>
|
||||
|
@ -295,6 +302,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
|
||||
mode: 'add',
|
||||
isDetail: false,
|
||||
columns: [
|
||||
|
@ -311,6 +319,7 @@
|
|||
delivery_way: [],
|
||||
isWholeSale: false,
|
||||
formData: {
|
||||
store_info: "",
|
||||
product_id: "",
|
||||
"store_name": "",
|
||||
"imageList": [
|
||||
|
@ -494,6 +503,16 @@
|
|||
switchVal: false
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
stroeNameLength() {
|
||||
return this.formData.store_name?.length || 0
|
||||
},
|
||||
storeInfoLength() {
|
||||
return this.formData.store_info?.length || 0
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
test(index) {
|
||||
// this.formData.imageList.splice(index, 1)
|
||||
|
@ -715,6 +734,19 @@
|
|||
})
|
||||
|
||||
},
|
||||
oldToNew(formData) {
|
||||
if (formData.attr.length <= 1) return
|
||||
formData.attr.splice(1, 999)
|
||||
formData.attr[0].value = ' '
|
||||
formData.attr[0].detail = formData.attrValue.map(item => item.sku)
|
||||
formData.attrValue.forEach(item => {
|
||||
item.detail = {}
|
||||
item.detail[' '] = item.sku
|
||||
})
|
||||
this.formData = formData
|
||||
},
|
||||
|
||||
|
||||
initFormData(option) {
|
||||
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
|
||||
this.mer_id = option.mer_id
|
||||
|
@ -725,7 +757,8 @@
|
|||
let goods = JSON.parse(option.goodsInfo)
|
||||
console.log(goods)
|
||||
this.formData.store_name = goods.store_name
|
||||
this.formData.imageList = [goods.image, ...[goods.slider_image]]
|
||||
this.formData.imageList = [goods.image, ...goods.slider_image]
|
||||
console.log(this.formData)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -749,6 +782,8 @@
|
|||
this.formData.cate_id = this.formData.storeCategory.store_category_id
|
||||
delete this.formData.image_list
|
||||
if (!this.formData.imageList) this.formData.imageList = []
|
||||
this.oldToNew(this.formData)
|
||||
console.log(this.formData, 'formDATA')
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -894,4 +929,17 @@
|
|||
/* position: absolute; */
|
||||
|
||||
}
|
||||
|
||||
.image-play-icon {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
|
@ -355,7 +355,7 @@
|
|||
},
|
||||
submit() {
|
||||
let that = this
|
||||
uni.reLaunch({
|
||||
uni.redirectTo({
|
||||
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }`
|
||||
})
|
||||
|
||||
|
|
|
@ -21,9 +21,11 @@
|
|||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<u--input @focus="unitIptClick(index,false)"
|
||||
style=" flex: 2;width:100rpx;background-color: #F6F6F6;" placeholder="请输入计量单位"
|
||||
v-model="item.unit_name"></u--input>
|
||||
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
|
||||
placeholder="请输入计量单位" v-model="item.unit_name"></u--input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="" v-if='isWholeSale'
|
||||
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;">
|
||||
|
@ -32,8 +34,11 @@
|
|||
<view class="" style="flex: 1;text-align: center;">
|
||||
/
|
||||
</view>
|
||||
<u--input style=" flex: 2;width:100rpx;background-color: #F6F6F6;" @focus="unitIptClick(index,true)"
|
||||
placeholder="请输入计量单位" v-model="item.wholesale_unit_name"></u--input>
|
||||
<view class="" @click="unitIptClick(index,true)" style="width: 100rpx;flex: 2.4">
|
||||
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
|
||||
v-model="item.wholesale_unit_name"></u--input>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
|
||||
|
@ -163,7 +168,8 @@
|
|||
unit_name: '计量单位不能为空',
|
||||
wholesale_price: '批发价格不能为空',
|
||||
wholesale_unit_name: '批发单位不能为空',
|
||||
stock: '库存不能为空'
|
||||
stock: '库存不能为空',
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -188,13 +194,14 @@
|
|||
this.showCustom = false
|
||||
this.showPouple = false
|
||||
},
|
||||
|
||||
// hide() {
|
||||
// uni.hideKeyboard()
|
||||
// },
|
||||
unitIptClick(index, type) {
|
||||
this.isWhose = type
|
||||
console.log(index)
|
||||
this.unitIndex = index
|
||||
this.showPouple = true
|
||||
|
||||
uni.hideKeyboard()
|
||||
},
|
||||
pushFn() {
|
||||
this.attrValue.push({
|
||||
|
@ -238,23 +245,29 @@
|
|||
errList.push(this.rules[key])
|
||||
}
|
||||
}
|
||||
if (this.attrValue.length > 1) {
|
||||
if (!item['sku']) {
|
||||
errList.push('规格名称不能为空')
|
||||
}
|
||||
}
|
||||
})
|
||||
if (errList.length > 0) {
|
||||
console.log(errList)
|
||||
uni.$u.toast(errList[0])
|
||||
return
|
||||
}
|
||||
let flag = false
|
||||
if (this.formData.attr.length > 1) {
|
||||
this.formData.attr.forEach(item => {
|
||||
if (!item.value) {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
}
|
||||
if (flag) {
|
||||
uni.$u.toast('请填写规格名称')
|
||||
return
|
||||
}
|
||||
// let flag = false
|
||||
// if (this.formData.attr.length > 1) {
|
||||
// this.formData.attr.forEach(item => {
|
||||
// if (!item.value) {
|
||||
// flag = true
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// if (flag) {
|
||||
// uni.$u.toast('请填写规格名称')
|
||||
// return
|
||||
// }
|
||||
// 校验结束
|
||||
this.formData.attr[0].detail = []
|
||||
this.attrValue.forEach(item => {
|
||||
|
|
|
@ -866,8 +866,8 @@
|
|||
|
||||
editGoods(item) {
|
||||
let url = '/pages/product/addGoodDetail/addGoodDetail';
|
||||
if (this.mer_info.type_code == 'PersonalStore') url = '/pages/product/addGood/addGood_one';
|
||||
if (this.mer_info.type_code == 'TypeSupplyChain') url = '/pages/product/addGood/addGood_supply';
|
||||
if (this.mer_info.type_code == 'PersonalStore') url = '/pages/product/addGoodDetail/addGoodDetail';
|
||||
if (this.mer_info.type_code == 'TypeSupplyChain') url = '/pages/product/addGoodDetail/addGoodDetail';
|
||||
navigateTo(1, url, {
|
||||
mer_id: item.mer_id,
|
||||
product_id: item.product_id
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
<view class="content">
|
||||
<view class="head">
|
||||
<view class="" style="width: 210rpx;height: 210rpx;position: relative;">
|
||||
<u--image :src="short.attrValue[0].image||short.image||defualtImg" width='210rpx' height='210rpx'
|
||||
duration="450"></u--image>
|
||||
<view class="preview" @click="preViewImg(short.attrValue[0].image||short.image||defualtImg)">
|
||||
<u--image :src="short.image" width='210rpx' height='210rpx' duration="450"></u--image>
|
||||
<view class="preview" @click="preViewImg(short.image)">
|
||||
点击预览
|
||||
</view>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue