修改添加商品功能
This commit is contained in:
parent
42c777d9e2
commit
bff6905dee
@ -32,7 +32,7 @@
|
|||||||
getProductContent(obj) {
|
getProductContent(obj) {
|
||||||
// console.log(obj);
|
// console.log(obj);
|
||||||
this.goodsDis = obj;
|
this.goodsDis = obj;
|
||||||
this.a=obj.store_name
|
this.a=obj.store_name;
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
setStorage('goodsDis', this.goodsDis);
|
setStorage('goodsDis', this.goodsDis);
|
||||||
|
677
pages/product/addGoods/commodity.vue
Normal file
677
pages/product/addGoods/commodity.vue
Normal file
@ -0,0 +1,677 @@
|
|||||||
|
<template>
|
||||||
|
<view class=" writeBg ">
|
||||||
|
|
||||||
|
<view class="content_list">
|
||||||
|
<view class="content_list_item" @click="inputGoodsDetils">
|
||||||
|
<view>商品详情</view>
|
||||||
|
<!-- <view class="content_list_item_han">
|
||||||
|
<span v-if="disModel" style="color: #000000">去修改</span>
|
||||||
|
<span v-else>设置详情</span>
|
||||||
|
<span class="iconfont"></span>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
|
||||||
|
<block v-if="!moreThanFlag">
|
||||||
|
<view class="content_list_video input-goods-detils">
|
||||||
|
<view class="content_list_video_title">商品视频</view>
|
||||||
|
<view class="video_list">
|
||||||
|
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
|
||||||
|
<view class="jiao" @click="deleteImage()">
|
||||||
|
<!-- video标签在app端层级过高 -->
|
||||||
|
<!--#ifndef APP-PLUS-->
|
||||||
|
<video :src="addGoodsSecoundData.video_link"></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>
|
||||||
|
<!--#endif-->
|
||||||
|
<image src="../static/images/close.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!--#ifndef APP-PLUS-->
|
||||||
|
<view style="position: absolute;">
|
||||||
|
<view class="videoHover" @click="videoshow">
|
||||||
|
</view>
|
||||||
|
<text class="video-text">点击可预览视频</text>
|
||||||
|
</view>
|
||||||
|
<!--#endif-->
|
||||||
|
|
||||||
|
<!--#ifdef APP-PLUS-->
|
||||||
|
<view class='preview_video'>
|
||||||
|
<view class="videoHover" @click="videoshow">
|
||||||
|
</view>
|
||||||
|
<text class="video-text">点击可预览视频</text>
|
||||||
|
</view>
|
||||||
|
<!--#endif-->
|
||||||
|
</view>
|
||||||
|
<view class="photo" @click="uploadVideo" v-else>
|
||||||
|
<view>
|
||||||
|
<image src="../static/images/creamer.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view>添加视频</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="container_input marginTop_none input-goods-detils">
|
||||||
|
<view class="container_input_item">
|
||||||
|
<view class="container_input_item_label"><span>是否推荐</span></view>
|
||||||
|
<view class="container_input_item_value">
|
||||||
|
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)"
|
||||||
|
@change="isGood" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="container_input_item">
|
||||||
|
<view class="container_input_item_label"><span>是否开启礼包</span></view>
|
||||||
|
<view class="container_input_item_value">
|
||||||
|
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
|
||||||
|
@change="isGiftBag" />
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<!-- <view class="tip input-goods-detils">
|
||||||
|
<span class="iconfont"></span>
|
||||||
|
<span>开启后此商品只能在分销礼包中展示并销售</span>
|
||||||
|
</view> -->
|
||||||
|
<view class="container_input marginTop_none input-goods-detils">
|
||||||
|
<view class="container_input_item">
|
||||||
|
<view class="container_input_item_label"><span>限购数量</span></view>
|
||||||
|
<view class="container_input_item_value">
|
||||||
|
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
|
||||||
|
placeholder-class="inputPlaceHolder" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="container_input_item">
|
||||||
|
<view class="container_input_item_label"><span>商品排序</span></view>
|
||||||
|
<view class="container_input_item_value">
|
||||||
|
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
|
||||||
|
placeholder-class="inputPlaceHolder" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="more_than" @click="moreThanFlag=!moreThanFlag" >
|
||||||
|
<view v-if="moreThanFlag">更多</view>
|
||||||
|
<view v-else>收起</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="showVideo" class="video-count">
|
||||||
|
<!--#ifndef APP-PLUS-->
|
||||||
|
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
|
||||||
|
<!--#endif-->
|
||||||
|
<!--#ifdef APP-PLUS-->
|
||||||
|
|
||||||
|
<video id="myVideo" class="videoLink" autoplay loop
|
||||||
|
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
|
||||||
|
<!--#endif-->
|
||||||
|
</view>
|
||||||
|
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
|
||||||
|
<view class="handle dobuButton">
|
||||||
|
<view class="handle_button margin_right" @click="lastStep">上一步</view>
|
||||||
|
<view class="handle_button" @click="submitCreatedGoods">提交</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
|
||||||
|
import store from 'store';
|
||||||
|
import {
|
||||||
|
navigateTo,
|
||||||
|
setStorage,
|
||||||
|
getStorage,
|
||||||
|
removeStorage,
|
||||||
|
navigateBack,
|
||||||
|
Toast,
|
||||||
|
Loading,
|
||||||
|
hideLoading,
|
||||||
|
Modal
|
||||||
|
} from '../../../libs/uniApi.js';
|
||||||
|
import { productCreate, productUpdate } from 'api/product.js';
|
||||||
|
import inputGoodsDetils from '../components/inputGoodsDetils.vue';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
inputGoodsDetils
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
merId: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
product_id: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
resetKey: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showVideo: false,
|
||||||
|
disModel: false,
|
||||||
|
upload_max: 10,
|
||||||
|
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
|
||||||
|
addGoodsSecoundData: {
|
||||||
|
is_good: 0, // 是否推荐
|
||||||
|
is_gift_bag: 0,
|
||||||
|
sort: '',
|
||||||
|
once_count: '', // 限购数量
|
||||||
|
video_link: ''
|
||||||
|
},
|
||||||
|
goodsDis: {imageList: []},
|
||||||
|
store_name:'',
|
||||||
|
moreThanFlag: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
// console.log('123');
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
addGoodsSecoundData: {
|
||||||
|
handler(val) {
|
||||||
|
setTimeout(() => {
|
||||||
|
setStorage(this.product_id ? 'editGoodsDetils' : 'addGoodsSecoundData', val)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
resetKey: {
|
||||||
|
handler(val) {
|
||||||
|
// console.log(1);
|
||||||
|
this.initData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goodsDis: {
|
||||||
|
handler(val) {
|
||||||
|
setTimeout(() => {
|
||||||
|
setStorage('goodsDis', this.goodsDis);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
videoshow() {
|
||||||
|
this.showVideo = true
|
||||||
|
this.videoContext = uni.createVideoContext('myVideo', this);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.videoContext.play();
|
||||||
|
})
|
||||||
|
// this.video_link = this.formData.video_link;
|
||||||
|
// this.videoContext.requestFullScreen({ direction: 90 });
|
||||||
|
// this.videoContext.play(); this.videoplay = true;
|
||||||
|
},
|
||||||
|
initData() {
|
||||||
|
let editGoodsDetils = {};
|
||||||
|
if (getStorage('goodsDis')) {
|
||||||
|
this.disModel = true;
|
||||||
|
}
|
||||||
|
if (this.product_id) {
|
||||||
|
editGoodsDetils = getStorage('editGoodsDetils');
|
||||||
|
Object.keys(this.addGoodsSecoundData).forEach(item => {
|
||||||
|
this.addGoodsSecoundData[item] = editGoodsDetils[item];
|
||||||
|
});
|
||||||
|
|
||||||
|
if (editGoodsDetils.content) {
|
||||||
|
setStorage('goodsDis', {
|
||||||
|
store_name: editGoodsDetils.content.title,
|
||||||
|
imageList: editGoodsDetils.content.image
|
||||||
|
});
|
||||||
|
this.disModel = true;
|
||||||
|
}
|
||||||
|
setStorage('canChangeSecound', true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getStorage('addGoodsSecoundData')) {
|
||||||
|
Object.keys(this.addGoodsSecoundData).forEach(item => {
|
||||||
|
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] == 0) {
|
||||||
|
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lastStep() {
|
||||||
|
this.$emit('lastStep');
|
||||||
|
},
|
||||||
|
// 创建商品
|
||||||
|
submitCreatedGoods() {
|
||||||
|
Loading();
|
||||||
|
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
|
||||||
|
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound'
|
||||||
|
];
|
||||||
|
let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] :
|
||||||
|
getStorage('attrValue');
|
||||||
|
let postData = {
|
||||||
|
...this.addGoodsSecoundData,
|
||||||
|
...getStorage('addGoodsFormData'),
|
||||||
|
content: {
|
||||||
|
title: getStorage('goodsDis') ? getStorage('goodsDis').store_name : '',
|
||||||
|
image: getStorage('goodsDis') ? getStorage('goodsDis').imageList : []
|
||||||
|
},
|
||||||
|
video_link: this.addGoodsSecoundData.video_link
|
||||||
|
};
|
||||||
|
|
||||||
|
if (attrValue) {
|
||||||
|
postData.attrValue = attrValue.filter(item => item != '');
|
||||||
|
postData.attrValue[0].bar_code
|
||||||
|
}
|
||||||
|
// console.log(postData);
|
||||||
|
if (getStorage('addGoodsFormData').spec_type == 0) {
|
||||||
|
// postData.attr = [getStorage('singleSpecification')];
|
||||||
|
}
|
||||||
|
if (this.product_id) {
|
||||||
|
productUpdate(this.merId, this.product_id, postData)
|
||||||
|
.then(res => {
|
||||||
|
waitDeleteData.forEach(item => {
|
||||||
|
if (getStorage(item)) {
|
||||||
|
removeStorage(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
hideLoading()
|
||||||
|
Modal('提交成功', '点击确定,返回商品管理', {
|
||||||
|
showCancel: false
|
||||||
|
}).then(() => {
|
||||||
|
uni.removeStorageSync('singleSpecification')
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(rej => {
|
||||||
|
Toast(rej);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
productCreate(this.merId, postData)
|
||||||
|
.then(res => {
|
||||||
|
waitDeleteData.forEach(item => {
|
||||||
|
if (getStorage(item)) {
|
||||||
|
removeStorage(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
hideLoading();
|
||||||
|
Modal('提交成功', '点击确定,返回商品管理', {
|
||||||
|
showCancel: false,
|
||||||
|
}).then(() => {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(rej => {
|
||||||
|
Toast(rej);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 是否推荐
|
||||||
|
isGood(e) {
|
||||||
|
this.addGoodsSecoundData.is_good = e.detail.value ? 1 : 0;
|
||||||
|
},
|
||||||
|
// 是否开启礼包
|
||||||
|
isGiftBag(e) {
|
||||||
|
this.addGoodsSecoundData.is_gift_bag = e.detail.value ? 1 : 0;
|
||||||
|
},
|
||||||
|
|
||||||
|
switchChange(value, item) {
|
||||||
|
this.addGoodsSecoundData[item.model] = value ? 1 : 0;
|
||||||
|
},
|
||||||
|
// 跳转商品详情
|
||||||
|
inputGoodsDetils() {
|
||||||
|
navigateTo(1, '/pages/product/addGoods/addGoodDetils', { mer_id: this.merId });
|
||||||
|
},
|
||||||
|
// 上传视频
|
||||||
|
uploadVideo() {
|
||||||
|
uni.chooseVideo({
|
||||||
|
sourceType: ['camera', 'album'],
|
||||||
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
|
|
||||||
|
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: this.uploadUrl, //仅为示例,非真实的接口地址
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
name: 'file',
|
||||||
|
//请求参数
|
||||||
|
formData: {
|
||||||
|
user: 'test'
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
// #ifdef MP
|
||||||
|
'Content-Type': 'multipart/form-data',
|
||||||
|
// #endif
|
||||||
|
[TOKENNAME]: 'Bearer ' + store.state.app.token
|
||||||
|
},
|
||||||
|
success: uploadFileRes => {
|
||||||
|
let data = JSON.parse(uploadFileRes.data);
|
||||||
|
this.addGoodsSecoundData.video_link = (data.data.src);
|
||||||
|
},
|
||||||
|
complete: a => {
|
||||||
|
// console.log(a);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: `视频超出限制${this.upload_max}MB,已过滤`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
// 取消上传也会出现弹框
|
||||||
|
// uni.showModal({
|
||||||
|
// content: JSON.stringify(err)
|
||||||
|
// });
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deleteImage(index) {
|
||||||
|
this.addGoodsSecoundData.video_link = '';
|
||||||
|
},
|
||||||
|
getProductContent(obj) {
|
||||||
|
// console.log(obj);
|
||||||
|
this.goodsDis = obj;
|
||||||
|
this.a=obj.store_name
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './scss/index.scss';
|
||||||
|
|
||||||
|
.content_list {
|
||||||
|
width: 710rpx;
|
||||||
|
margin: auto;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: #fff;
|
||||||
|
margin-top: 31rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.input-goods-detils{
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx 10rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.more_than{
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 0 0 10rpx 10rpx;
|
||||||
|
margin: auto;
|
||||||
|
// margin-top: 30rpx;
|
||||||
|
border-top: 1px solid #f5f5f5;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 84rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_list_item {
|
||||||
|
padding: 32rpx 10rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
|
||||||
|
.content_list_item_han {
|
||||||
|
color: #bbbbbb;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content_list_video {
|
||||||
|
min-height: 154rpx;
|
||||||
|
padding: 23rpx 10rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.content_list_video_title {
|
||||||
|
padding-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video_list {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoHover {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 180rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
background: #000000;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 21rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
opacity: 1;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
// padding: 27rpx 21rpx 24rpx 21rpx;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #bbbbbb;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 12rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 62rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao {
|
||||||
|
image {
|
||||||
|
position: absolute;
|
||||||
|
top: -14rpx;
|
||||||
|
right: -14rpx;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 8rpx;
|
||||||
|
background: #e93323;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
video {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview_video {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_input {
|
||||||
|
background: #fff;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
width: 710rpx;
|
||||||
|
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 31rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
&_item {
|
||||||
|
display: flex;
|
||||||
|
height: 106rpx;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.select_and_input {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.greyColor {
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_label {
|
||||||
|
padding-left: 10rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.select_check {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.select {
|
||||||
|
background: #e93323;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
.iconfont {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&_value {
|
||||||
|
padding-right: 10rpx;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
>span:nth-child(1) {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #000;
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 400rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_group {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
&_select {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 110rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex_start {
|
||||||
|
padding: 0 10rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>view:not(:last-child) {
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputPlaceHolder {
|
||||||
|
color: #bbbbbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paddingTop_none {
|
||||||
|
padding-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.marginTop_none {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-count {
|
||||||
|
position: fixed;
|
||||||
|
width: 600rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -300rpx;
|
||||||
|
margin-top: -250rpx;
|
||||||
|
z-index: 100;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.videoLink {
|
||||||
|
width: 600rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// .writeBg {
|
||||||
|
// background: #fff;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.tip{
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -40,26 +40,6 @@
|
|||||||
<image :src="image"></image>
|
<image :src="image"></image>
|
||||||
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<view class="input_content_describe">
|
|
||||||
<view class="input_content_describe_title">
|
|
||||||
<view class="input_content_describe_title_msg">商品简介</view>
|
|
||||||
<view class="input_content_describe_title_num">
|
|
||||||
<text v-if="setFormData.store_info">{{ setFormData.store_info.length }}</text>
|
|
||||||
<text v-else>0</text>
|
|
||||||
/200
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="input_content_describe_textarea">
|
|
||||||
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
|
|
||||||
placeholderClass="placeholderClass" maxlength="200" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="input_content_keyword">
|
|
||||||
<view class="input_content_keyword_label">关键字</view>
|
|
||||||
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
|
|
||||||
placeholder="填写关键字" /></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="popup_group">
|
<view class="popup_group">
|
||||||
@ -75,7 +55,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="popup_group_item" @click="selectStoreClass">
|
<!-- <view class="popup_group_item" @click="selectStoreClass">
|
||||||
<view class="popup_group_item_label">店铺分类</view>
|
<view class="popup_group_item_label">店铺分类</view>
|
||||||
<view class="popup_group_item_value">
|
<view class="popup_group_item_value">
|
||||||
<view class="popup_group_item_message">
|
<view class="popup_group_item_message">
|
||||||
@ -85,7 +65,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view><span class="iconfont"></span></view>
|
<view><span class="iconfont"></span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- <view class="popup_group_item" @click="selectBrand">
|
<!-- <view class="popup_group_item" @click="selectBrand">
|
||||||
<view class="popup_group_item_label">商品品牌</view>
|
<view class="popup_group_item_label">商品品牌</view>
|
||||||
@ -106,7 +86,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="popup_group">
|
<priceComponent></priceComponent>
|
||||||
|
|
||||||
|
<!-- <view class="popup_group">
|
||||||
<view class="radio">
|
<view class="radio">
|
||||||
<view class="radio_label ">规格选择</view>
|
<view class="radio_label ">规格选择</view>
|
||||||
<radio-group class="select_group flex_start" @change="specificationsRadioChange($event)">
|
<radio-group class="select_group flex_start" @change="specificationsRadioChange($event)">
|
||||||
@ -154,20 +136,9 @@
|
|||||||
<view><span class="iconfont"></span></view>
|
<view><span class="iconfont"></span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="popup_group">
|
<view class="popup_group">
|
||||||
<view class="radio">
|
|
||||||
<view class="radio_label ">送货方式</view>
|
|
||||||
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
|
|
||||||
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
|
||||||
<view>
|
|
||||||
<checkbox :value="val.value" disabled :checked="val.value" />
|
|
||||||
</view>
|
|
||||||
<view>{{ val.name }}</view>
|
|
||||||
</label>
|
|
||||||
</checkbox-group>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
|
<!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
|
||||||
<view class="popup_group_item_label">是否包邮</view>
|
<view class="popup_group_item_label">是否包邮</view>
|
||||||
@ -179,7 +150,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
||||||
<view class="popup_group_item"
|
<!-- <view class="popup_group_item"
|
||||||
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
|
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
|
||||||
@click="tempIdSelect">
|
@click="tempIdSelect">
|
||||||
<view class="popup_group_item_label">运费模板</view>
|
<view class="popup_group_item_label">运费模板</view>
|
||||||
@ -191,10 +162,61 @@
|
|||||||
</view>
|
</view>
|
||||||
<view><span class="iconfont"></span></view>
|
<view><span class="iconfont"></span></view>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<commodityComponent :resetKey="secoundModel" :product_id="product_id" :merId="merId" :code="code" @lastStep="lastStep">
|
||||||
|
</commodityComponent>
|
||||||
|
|
||||||
|
<view class="popup_group">
|
||||||
|
<view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
|
||||||
|
<view class="popup_group_item_label">更多信息</view>
|
||||||
|
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
|
||||||
|
<view><span class="iconfont"></span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<block v-if="showMoreInfo">
|
||||||
|
<view class="input_content">
|
||||||
|
<view class="input_content_describe" style="border-top: none">
|
||||||
|
<view class="input_content_describe_title">
|
||||||
|
<view class="input_content_describe_title_msg">商品简介</view>
|
||||||
|
<view class="input_content_describe_title_num">
|
||||||
|
<text v-if="setFormData.store_info">{{ setFormData.store_info.length }}</text>
|
||||||
|
<text v-else>0</text>
|
||||||
|
/200
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="input_content_describe_textarea">
|
||||||
|
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
|
||||||
|
placeholderClass="placeholderClass" maxlength="200" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="input_content_keyword">
|
||||||
|
<view class="input_content_keyword_label">关键字</view>
|
||||||
|
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
|
||||||
|
placeholder="填写关键字" /></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="radio">
|
||||||
|
<view class="radio_label ">送货方式</view>
|
||||||
|
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
|
||||||
|
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||||
|
<view>
|
||||||
|
<checkbox :value="val.value" disabled :checked="val.value" />
|
||||||
|
</view>
|
||||||
|
<view>{{ val.name }}</view>
|
||||||
|
</label>
|
||||||
|
</checkbox-group>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="handle">
|
<view class="handle">
|
||||||
<view class="handle_button" @click="handleNextStep">下一步</view>
|
<!-- <view class="handle_button" @click="handleNextStep">下一步</view> -->
|
||||||
|
<secound :resetKey="secoundModel" :product_id="product_id" :merId="merId" :code="code" @lastStep="lastStep">
|
||||||
|
</secound>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -269,6 +291,8 @@
|
|||||||
HTTP_REQUEST_URL
|
HTTP_REQUEST_URL
|
||||||
} from '@/config/app.js';
|
} from '@/config/app.js';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
|
import priceComponent from "./price.vue";
|
||||||
|
import commodityComponent from "./commodity.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
inputGoodsDetils,
|
inputGoodsDetils,
|
||||||
@ -277,7 +301,9 @@
|
|||||||
platfrom, // 选择平台分类组件
|
platfrom, // 选择平台分类组件
|
||||||
storeClassification,
|
storeClassification,
|
||||||
secound,
|
secound,
|
||||||
avatar
|
avatar,
|
||||||
|
priceComponent,
|
||||||
|
commodityComponent
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -310,6 +336,7 @@
|
|||||||
tempName: '' // 运费模板名称
|
tempName: '' // 运费模板名称
|
||||||
},
|
},
|
||||||
popupContainerKey: false,
|
popupContainerKey: false,
|
||||||
|
showMoreInfo: false,
|
||||||
productItem: {} || [],
|
productItem: {} || [],
|
||||||
selectProductTitle: '选择平台分类',
|
selectProductTitle: '选择平台分类',
|
||||||
specificationsRadioList: [{
|
specificationsRadioList: [{
|
||||||
@ -828,6 +855,8 @@
|
|||||||
// 开始下一步
|
// 开始下一步
|
||||||
|
|
||||||
handleNextStep() {
|
handleNextStep() {
|
||||||
|
this.step = 2;
|
||||||
|
return ;
|
||||||
// console.log(this.setFormData.setSpecificaValue)
|
// console.log(this.setFormData.setSpecificaValue)
|
||||||
let canJumpFlag = true;
|
let canJumpFlag = true;
|
||||||
let requireData = {
|
let requireData = {
|
||||||
|
202
pages/product/addGoods/price.vue
Normal file
202
pages/product/addGoods/price.vue
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<select-form style="border-radius: 10rpx 10rpx 0 0;" :platformClassification="formList" :form="singleSpecification" @input="input"></select-form>
|
||||||
|
<view class="more_than" @click="moreThanFlag?selectMoreThan():spliceMoreThan()" >
|
||||||
|
<view v-if="moreThanFlag">更多</view>
|
||||||
|
<view v-else>收起</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="handle">
|
||||||
|
<view class="button" @click="saveSingleSpecification">
|
||||||
|
保存
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import selectForm from '../components/selectForm.vue';
|
||||||
|
import { navigateTo, navigateBack, serialize, setStorage, getStorage } from '../../../libs/uniApi.js';
|
||||||
|
// 单规格商品 attrValue
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
selectForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
singleSpecification: {
|
||||||
|
price: '', // 售价
|
||||||
|
cost: '', // 成本价
|
||||||
|
ot_price: '', // 原价
|
||||||
|
bar_code: '', // 商品编号
|
||||||
|
weight: '', // 重量
|
||||||
|
volume: '', // 体积
|
||||||
|
image: '',
|
||||||
|
extension_one: '',
|
||||||
|
extension_two: ''
|
||||||
|
},
|
||||||
|
moreThanFlag: true,
|
||||||
|
formList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
label: '售价',
|
||||||
|
type: 'digit',
|
||||||
|
model: 'price',
|
||||||
|
holder: '请填写售价'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
label: '库存',
|
||||||
|
type: 'digit',
|
||||||
|
model: 'stock_num',
|
||||||
|
holder: '请填写库存'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
moreThanList: [
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
label: '成本价',
|
||||||
|
type: 'digit',
|
||||||
|
holder: '请填写成本价',
|
||||||
|
model: 'cost'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
label: '原价',
|
||||||
|
type: 'digit',
|
||||||
|
holder: '请填写原价',
|
||||||
|
model: 'ot_price'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
label: '商品编号',
|
||||||
|
type: 'input',
|
||||||
|
holder: '请填写商品编号',
|
||||||
|
model: 'bar_code'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
label: '重量',
|
||||||
|
type: 'digit',
|
||||||
|
holder: '请输入重量',
|
||||||
|
model: 'weight'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
label: '体积',
|
||||||
|
type: 'digit',
|
||||||
|
holder: '请输入体积',
|
||||||
|
model: 'volume'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// id: 8,
|
||||||
|
// label: '佣金(一级)',
|
||||||
|
// type: 'digit',
|
||||||
|
// holder: '请输入一级佣金',
|
||||||
|
// model: 'extension_one'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 9,
|
||||||
|
// label: '佣金(二级)',
|
||||||
|
// type: 'digit',
|
||||||
|
// holder: '请输入二级佣金',
|
||||||
|
// model: 'extension_two'
|
||||||
|
// }
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
singleSpecification: {
|
||||||
|
handler(val) {
|
||||||
|
this.singleSpecification = val;
|
||||||
|
this.saveSingleSpecification();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
// this.singleSpecification.bar_code=option.code
|
||||||
|
// },
|
||||||
|
// onShow() {
|
||||||
|
// if(getStorage('addGoodsFormData').image) {
|
||||||
|
// this.singleSpecification.image = getStorage('addGoodsFormData').image;
|
||||||
|
// }
|
||||||
|
// if(getStorage('singleSpecification')) {
|
||||||
|
// Object.keys(this.singleSpecification).forEach(item => {
|
||||||
|
// if(getStorage('singleSpecification')[item]) {
|
||||||
|
// this.singleSpecification[item] = getStorage('singleSpecification')[item]
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// beforeDestroy() {
|
||||||
|
// console.log('123');
|
||||||
|
// uni.removeStorage({
|
||||||
|
// key: 'singleSpecification'
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
methods: {
|
||||||
|
selectMoreThan() {
|
||||||
|
this.formList = this.formList.concat(this.moreThanList);
|
||||||
|
this.moreThanFlag = false;
|
||||||
|
},
|
||||||
|
spliceMoreThan() {
|
||||||
|
this.moreThanFlag = true;
|
||||||
|
this.formList.splice(2, this.formList.length);
|
||||||
|
},
|
||||||
|
input(val) {
|
||||||
|
this.singleSpecification = val
|
||||||
|
},
|
||||||
|
// 保存
|
||||||
|
saveSingleSpecification() {
|
||||||
|
setStorage('singleSpecification', this.singleSpecification);
|
||||||
|
// navigateBack(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.more_than {
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 0 0 10rpx 10rpx;
|
||||||
|
margin: auto;
|
||||||
|
// margin-top: 30rpx;
|
||||||
|
margin-top: 1px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 710rpx;
|
||||||
|
height: 84rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.handle {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 126rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 32rpx;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 86rpx;
|
||||||
|
background: #E93323;
|
||||||
|
border-radius: 43rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tip {
|
.tip {
|
||||||
padding: 16rpx 0 0 40rpx;
|
padding: 16rpx 0 0 20rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #e93323;
|
color: #e93323;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -36,6 +36,14 @@
|
|||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
.icon_top{
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon_bottom{
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
.popup_group_item {
|
.popup_group_item {
|
||||||
padding: 32rpx 30rpx;
|
padding: 32rpx 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
|
<block v-if="showComponent">
|
||||||
<view class=" writeBg ">
|
<view class=" writeBg ">
|
||||||
<view class="container_input marginTop_none">
|
<view class="container_input marginTop_none">
|
||||||
<view class="container_input_item">
|
<view class="container_input_item">
|
||||||
@ -108,6 +110,9 @@
|
|||||||
<view class="handle_button" @click="submitCreatedGoods">提交</view>
|
<view class="handle_button" @click="submitCreatedGoods">提交</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="handle_button" @click="submitCreatedGoods">提交</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
|
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
|
||||||
@ -148,6 +153,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showComponent: false,
|
||||||
showVideo:false,
|
showVideo:false,
|
||||||
disModel: false,
|
disModel: false,
|
||||||
upload_max: 10,
|
upload_max: 10,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import selectForm from '../components/selectForm.vue';
|
import selectForm from '../components/selectForm.vue';
|
||||||
import { navigateTo, navigateBack, serialize, setStorage, getStorage} from '../../../libs/uniApi.js';
|
import { navigateTo, navigateBack, serialize, setStorage, getStorage } from '../../../libs/uniApi.js';
|
||||||
// 单规格商品 attrValue
|
// 单规格商品 attrValue
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<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="请输入简介" placeholder-class="placeholderStyle"
|
<textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle"
|
||||||
:maxlength="maxLength" />
|
:maxlength="maxLength" />
|
||||||
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
|
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
|
||||||
v-else>0</text>/{{maxLength}}</view>
|
v-else>0</text>/{{maxLength}}</view>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
|
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
|
||||||
placeholder="填写关键字" /></view>
|
placeholder="填写关键字" /></view>
|
||||||
</view>
|
</view>
|
||||||
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
<avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||||
</avatar>
|
</avatar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user