修改添加商品时,商品详情不能添加图品
This commit is contained in:
parent
e5a37372b8
commit
6ef97fbed3
@ -1,18 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="input_content">
|
<view class="input_content">
|
||||||
<view class="input_content_textarea">
|
<view class="input_content_textarea">
|
||||||
<textarea v-model="prodectContent.store_name" :placeholder="title" placeholder-class="placeholderStyle" :maxlength="maxLength"/>
|
<textarea v-model="prodectContent.store_name" :placeholder="title" placeholder-class="placeholderStyle"
|
||||||
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text v-else>0</text>/{{maxLength}}</view>
|
:maxlength="maxLength" />
|
||||||
|
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
|
||||||
|
v-else>0</text>/{{maxLength}}</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="input_content_photo">
|
<view class="input_content_photo">
|
||||||
<view class="input_content_photo_adPh" v-for="(item, index) in prodectContent.imageList" :key="index">
|
<view class="input_content_photo_adPh" v-for="(item, index) in prodectContent.imageList" :key="index">
|
||||||
<image :src="item" class="myimg2 photos"></image>
|
<image :src="item" class="myimg2 photos"></image>
|
||||||
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)"><image src="../static/images/close.png" mode=""></image></view>
|
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
|
||||||
|
<image src="../static/images/close.png" mode=""></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="isUpload" class="input_content_photo_adPh" @click="clk">
|
<view v-if="isUpload" class="input_content_photo_adPh" @click="clk">
|
||||||
<view><image src="../static/images/creamer.png" mode="widthFix"></image></view>
|
<view>
|
||||||
|
<image src="../static/images/creamer.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
<view>添加图片</view>
|
<view>添加图片</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -25,14 +31,17 @@
|
|||||||
<text v-else>0</text>/200
|
<text v-else>0</text>/200
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input_content_describe_textarea"><textarea v-model="prodectContent.store_info" value="" placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200"/></view>
|
<view class="input_content_describe_textarea"><textarea v-model="prodectContent.store_info" value=""
|
||||||
|
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="input_content_keyword" v-if="isShowDescribe">
|
<view class="input_content_keyword" v-if="isShowDescribe">
|
||||||
<view class="input_content_keyword_label">关键字</view>
|
<view class="input_content_keyword_label">关键字</view>
|
||||||
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value="" placeholder="填写关键字" /></view>
|
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
|
||||||
|
placeholder="填写关键字" /></view>
|
||||||
</view>
|
</view>
|
||||||
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx"></avatar>
|
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||||
|
</avatar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -128,7 +137,8 @@ export default {
|
|||||||
success: (uploadFileRes) => {
|
success: (uploadFileRes) => {
|
||||||
console.log(uploadFileRes.data);
|
console.log(uploadFileRes.data);
|
||||||
let imgData = JSON.parse(uploadFileRes.data)
|
let imgData = JSON.parse(uploadFileRes.data)
|
||||||
that.prodectContent.imageList.push(imgData.data.path)
|
// that.prodectContent.imageList.push(imgData.data.path)
|
||||||
|
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] }
|
||||||
},
|
},
|
||||||
complete(res) {
|
complete(res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -155,12 +165,15 @@ export default {
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
&_textarea {
|
&_textarea {
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
padding-bottom: 19rpx;
|
padding-bottom: 19rpx;
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
height: 114rpx;
|
height: 114rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@ -172,10 +185,12 @@ export default {
|
|||||||
margin-top: 41rpx;
|
margin-top: 41rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.photos {
|
.photos {
|
||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
height: 156rpx;
|
height: 156rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_adPh {
|
&_adPh {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
@ -187,15 +202,18 @@ export default {
|
|||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
>view:nth-child(1) {
|
>view:nth-child(1) {
|
||||||
height: 37rpx;
|
height: 37rpx;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 45rpx;
|
width: 45rpx;
|
||||||
display: block;
|
display: block;
|
||||||
@ -219,6 +237,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 16rpx;
|
width: 16rpx;
|
||||||
height: 16rpx;
|
height: 16rpx;
|
||||||
@ -226,19 +245,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_describe {
|
&_describe {
|
||||||
border-top: 1px solid #eeeeee;
|
border-top: 1px solid #eeeeee;
|
||||||
padding-top: 30rpx;
|
padding-top: 30rpx;
|
||||||
padding-bottom: 47rpx;
|
padding-bottom: 47rpx;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
|
||||||
&_title {
|
&_title {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
&_msg {
|
&_msg {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_num {
|
&_num {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@ -251,6 +274,7 @@ export default {
|
|||||||
height: 180rpx;
|
height: 180rpx;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
@ -263,9 +287,11 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|
||||||
&_value {
|
&_value {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user