重写商品添加页面(未完成)

This commit is contained in:
weipengfei 2023-11-15 18:21:56 +08:00
parent b2a4948203
commit a5f98d1746
8 changed files with 2242 additions and 0 deletions

View File

@ -1319,6 +1319,14 @@
"navigationBarTitleText": "商户基本设置",
"enablePullDownRefresh": false
}
},
{
"path" : "addGood/addGood",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}
]
},

View File

@ -0,0 +1,475 @@
<template>
<view class="container">
<view class="step_one">
<view class="input_content">
<view class="bar-code" v-if="bar_code_dis">
<view>商品条码</view>
<input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis"
placeholder-class="inputPlaceHolder" />
</view>
<view class="input_content_textarea">
<textarea v-model="setFormData.store_name" placeholder="请输入商品名称" placeholder-class="placeholderStyle"
maxlength="60" />
<view class="flex" style="justify-content: space-between;color: #999999;">
<view>(品牌,名称,规格,口味)</view>
<view>
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
<text v-else>0</text>/60
</view>
</view>
</view>
<view class="photo_count">
<text class="photo_size" style="color: #e93323;">建议图片尺寸为750*750px, 上传2张以上</text>
<view class="input_content_photo">
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList" :key="index">
<image :src="item" class="myimg2 photos" @click="pop(item)"></image>
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
<image src="../static/images/close.png" mode=""></image>
</view>
</view>
<view v-if="setFormData.imageList.length < 9" class="input_content_photo_adPh addBtn" @click="clk">
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加图片</view>
</view>
</view>
</view>
<u-popup ref="select_popup" class="pop" :show="show" mode="center" closeOnClickOverlay bgColor='transparent'>
<image :src="image"></image>
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
</u-popup>
</view>
<!-- 商品详情 -->
<commodityComponent v-if="showCommodity" :key="showCommodity" :showCommodity="showCommodity" :product_id="product_id" :merId="merId"
:code="code" @lastStep="lastStep">
</commodityComponent>
<view class="popup_group">
<view class="popup_group_item" @click="selectPlatform">
<view class="popup_group_item_label">平台分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<span v-if="setFormData.cate_name"
class="popup_group_item_message_value">{{ setFormData.cate_name }}</span>
<span v-else>请选择平台分类</span>
</view>
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view>
<view class="popup_group_item">
<view class="popup_group_item_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
placeholder="请填写商品单位" /></view>
</view>
</view>
<!-- 选择平台分类弹框 -->
<uni-popup ref="select_platform" type="bottom">
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData" @getPlatData="getPlatData">
</platfrom>
</uni-popup>
<!-- 规格设置 -->
<priceComponent :product_id="product_id" :bar_code="code" @updateCode = "updateCode" v-if="showCommodity"></priceComponent>
<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">&#xe6bd;</span></view>
</view>
</view> -->
<block >
<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>
<view class="handle">
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
<uni-popup ref="tempId" type="bottom">
<linkage-assembly selectProductTitle="选择运费模板" :form="setFormData" :classifiedData="classified['temp_id']"
:selectProductItem="productItem" :mer_id="merId" @getLinkageData="getTempIdData" @multipleList="multipleList"
@close="$refs.tempId.close()" @scrolltolower="scrolltolower"></linkage-assembly>
</uni-popup>
<!-- 图片选择器 -->
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
</avatar>
</view>
</template>
<script>
import {
TOKENNAME,
HTTP_REQUEST_URL
} from '@/config/app.js';
import {
categoryBrandlist,
categorySelect,
storeClassifyLst,
categoryList,
attrList,
templateList,
productDetail,
getDeliveryType
} from '@/api/product.js';
import avatar from "@/components/yq-avatar/yq-avatar.vue";
import platfrom from "./components/platform.vue";
import commodityComponent from "./components/commodity.vue";
import priceComponent from "./components/price.vue";
export default {
components:{
avatar,
platfrom,
commodityComponent,
priceComponent
},
data() {
return {
bar_code_dis: false,
merId: '', //id
product_id: '', //id
code: '', //
show: false, //
image: false, //
setFormData:{
store_name: '',
imageList: [],
cate_name: '', //
unit_name: '', //
},
platformClassificationData: [], //
merchantClassification: [], //
brand: [], //
showCommodity: false, // ,
deliveryFreeList: [{
value: '1',
name: '到店核销'
},
{
value: '2',
name: '快递配送'
}
],
//
classified: {
cate_id: [],
mer_cate_id: [],
brand_id: [],
attr: [],
temp_id: []
},
productItem: {} || [],
};
},
onLoad(opt) {
this.merId = Number(opt.mer_id);
this.product_id = opt.product_id;
if(!opt.product_id)this.showCommodity=true;
this.initData();
this.initClasiffy();
},
onBackPress() {
},
onShow() {
},
beforeDestroy() {
},
methods: {
//
initDataEditData() {
this.setFormData = {
imageList: [],
specification: '',
image: '', //
slider_image: '', //
store_name: '', //
store_info: '', //
keyword: '', //
brand_id: '', // id
brand_name: '', //
cate_id: '', //
cate_name: '', //
mer_cate_id: '', //
mer_cate_name: '', //
unit_name: '', //
spec_type: '0', // 0. 1
attr: [], //
specifica: '', //
setSpecificaValue: '', //
setSpecificaValue2: '', //
delivery_way: [], // 1 2
delivery_free: '0', // 0 1
temp_id: '', // ID
tempName: '' //
};
if (getStorage('editGoodsDetils')) {
removeStorage('editGoodsDetils');
}
productDetail(this.merId, this.product_id).then(res => {
setStorage('editGoodsDetils', res.data);
if(res.data.content_arr.length>0) res.data.content = res.data.content_arr;
this.$store.commit('setStorage', res.data);
let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item];
});
this.setFormData.product_id = this.product_id;
this.setFormData.imageList = [...(this.setFormData.image ? [this.setFormData.image] : []), ...
this
.setFormData.slider_image
];
this.setFormData.cate_name = editGoodsDetils?.storeCategory?.cate_name; //
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
item => item
.category && item.category.cate_name).join(',') : '';
this.setFormData.brand_name = editGoodsDetils.brand ? editGoodsDetils.brand.brand_name : '';
//
if (this.setFormData.spec_type == 1) {
if (editGoodsDetils.attr.length) {
this.setFormData.specifica = '点击修改规格'
}
if (editGoodsDetils.attrValue.length) {
this.setFormData.setSpecificaValue2 = '点击修改价格'
}
}
if (editGoodsDetils.spec_type == 0) {
setStorage('singleSpecification', editGoodsDetils.attrValue[0]);
if (editGoodsDetils.attrValue.length) {
this.setFormData.setSpecificaValue = '点击修改价格'
}
}
setStorage('attrValue', editGoodsDetils.attrValue);
editGoodsDetils.temp && (this.setFormData.tempName = editGoodsDetils.temp.name);
setStorage('canChange', true);
hideLoading();
this.showCommodity = true;
});
},
//
async initClasiffy() {
this.merchantClassification = (await storeClassifyLst(this.merId)).data;
},
async initData() {
//
this.brand = (await categoryBrandlist(this.merId)).data;
//
let { data } = await categoryList(this.merId);
data.forEach((item1)=>{
item1.children.forEach((item2)=>{
item2.children = null;
})
})
this.platformClassificationData = data;
},
//
updateCode(e){
this.code = e + '';
},
//
handleChooseImage() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.setFormData.imageList.push(res.data.path);
});
},
clk() {
let avatar = this.$refs.avatar;
avatar.fChooseImg(1, {
selWidth: '350upx',
selHeight: '350upx',
inner: true
});
},
doUpload(rsp) {
let that = this
// console.log(rsp);
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/upload/image/field',
filePath: rsp.path,
name: 'field',
formData: {
'filename': rsp.path,
'name': that.imgName
},
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + this.$store.state.app.token
},
success: (uploadFileRes) => {
// console.log(uploadFileRes.data);
let imgData = JSON.parse(uploadFileRes.data)
that.setFormData.imageList.push(imgData.data.path)
},
complete(res) {
// console.log(res)
}
});
},
getImgName(name) {
this.imgName = name
},
//
pop(e) {
this.show = true
this.image = e
},
//
close() {
this.$refs.select_popup.close();
this.show = false
},
//
deleteImage(index) {
this.setFormData.imageList.splice(index, 1);
},
//
selectPlatform() {
this.$refs.select_platform.open();
},
//
closePlatfrom() {
this.$refs.select_platform.close();
},
//
getPlatData(item, taplist) {
this.setFormData.cate_id = item.value;
this.setFormData.cate_name = item.label;
this.$refs.select_platform.close();
},
//
selectStoreClass() {
this.$refs.select_store.open();
},
//
merchantClose() {
this.$refs.select_store.close();
},
//
handleGetSelectStore(item) {
this.setFormData.mer_cate_id = item.map(val => val.store_category_id);
this.setFormData.mer_cate_name = item.map(val => val.cate_name).join(',');
this.$refs.select_store.close();
},
//
selectBrand() {
this.$refs.select_popup.open();
},
//
getLinkageData(item) {
this.setFormData.brand_id = item[0].value;
this.setFormData.brand_name = item[0].cate_name;
this.$refs.select_popup.close();
},
//
multipleList(data, model) {
if (model == 'mer_cate_id') {
this.platformClassification[1].value = data.map(item => item.label).join('');
this.platformClassification[1].allreadySelect = data;
this.setFormData.mer_cate_id = data.map(item => item.value);
}
},
// popup
//
close() {
this.$refs.select_popup.close();
this.show = false
},
//
getLinkDataOfRecursion(arr, child = 'children', key = 'value') {
let str = '';
let id = '';
arr.forEach(item => {
str = item.label;
id = item.value;
});
// str = str.slice(0, str.length - 1);
return {
str,
id
};
},
//
getTemplateList() {
templateList(this.merId, this.templateListPage).then(res => {
res.data.list.forEach(item => {
this.$set(item, 'value', item.shipping_template_id);
this.$set(item, 'label', item.name);
});
this.classified['temp_id'] = res.data.list;
this.$refs.tempId.open();
});
},
//
submitCreatedGoods() {
console.log('创建商品');
console.log('商品数据', this.setFormData);
},
}
};
</script>
<style lang="scss" scoped>
@import './scss/index.scss';
.pop {
z-index: 1;
}
.guanbi {
width: 20px;
height: 20px;
margin: 30px auto;
}
</style>

View File

@ -0,0 +1,588 @@
<template>
<view class=" writeBg ">
<view class="content_list">
<view class="content_list_item">
<view>商品详情</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">&#xe688;</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>
</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 './inputGoodsDetils.vue';
export default {
components: {
inputGoodsDetils
},
props: {
merId: {
type: [String, Number],
default: ''
},
product_id: {
type: [String, Number],
default: ''
},
showCommodity: {
type: Boolean,
default: false
},
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:""},
store_name:'',
moreThanFlag: true,
};
},
mounted() {
this.initData();
// this.$nextTick(()=>{
// this.initData();
// })
},
updated() {
// this.initData();
},
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 = this.$store.state.storage.storage;
Object.keys(this.addGoodsSecoundData).forEach(item => {
// console.log(item, editGoodsDetils[item]);
this.addGoodsSecoundData[item] = editGoodsDetils[item];
});
if (editGoodsDetils.content) {
this.goodsDis.imageList = editGoodsDetils.content.image;
this.goodsDis.store_name = editGoodsDetils.content.title;
this.store_name = editGoodsDetils.content.title;
// console.log(this.goodsDis, editGoodsDetils.content);
setStorage('goodsDis', {
store_name: editGoodsDetils.content.title,
imageList: editGoodsDetils.content.image
});
this.disModel = true;
}
setStorage('canChangeSecound', true);
return;
}else {
setStorage('goodsDis', {
store_name: '',
imageList: []
});
}
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');
},
//
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: 2;
}
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>

View File

@ -0,0 +1,316 @@
<template>
<view class="input_content">
<!-- <view class="input_content_textarea">
<textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle"
:maxlength="maxLength" />
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
v-else>0</text>/{{maxLength}}</view>
</view> -->
<view class="input_content_photo">
<view class="input_content_photo_adPh" v-for="(item, index) in prodectContent.imageList" :key="index">
<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>
<view v-if="isUpload" class="input_content_photo_adPh" @click="clk">
<view>
<image src="../../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加图片</view>
</view>
</view>
<view class="input_content_describe" v-if="isShowDescribe">
<view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num">
<text v-if="prodectContent.store_info">{{prodectContent.store_info.length}}</text>
<text v-else>0</text>/200
</view>
</view>
<view class="input_content_describe_textarea">
<textarea v-model="prodectContent.store_info" value=""
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view>
</view>
<view class="input_content_keyword" v-if="isShowDescribe">
<view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
placeholder="填写关键字" /></view>
</view>
<avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
</avatar>
</view>
</template>
<script>
import { chooseImage } from '@/libs/uniApi.js';
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
import avatar from "@/components/yq-avatar/yq-avatar.vue";
import store from '@/store';
export default {
components: {
avatar
},
props: {
isShowDescribe: {
type: Boolean,
default: false
},
isMultiple: {
type: Boolean,
default: true
},
maxLength: {
type: Number,
default: 12
},
title: {
type: String,
default: ''
},
prodectContent: {
type: Object,
default: () => { return { imageList: [] } }
}
},
data() {
return {
uploadImg: this.prodectContent.imageList,
upstore : '',
isUpload: true,
imgName: ""
};
},
watch: {
prodectContent: {
handler(val) {
// console.log(val.store_name);
this.upstore=val.store_name
this.$emit('getProductContent', val);
},
immediate: true,
deep: true
},
uploadImg: {
handler(val) {
if (this.isMultiple) {
this.isUpload = val.length < 6 ? true : false
} else {
this.isUpload = val.length < 1 ? true : false
}
},
immediate: true,
deep: true
}
},
mounted() {
// console.log(this.$props.prodectContent);
},
methods: {
handleChooseImage() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.uploadImg.push(res.data.path);
that.$set(that.prodectContent, 'imageList', that.uploadImg);
});
},
clk() {
let avatar = this.$refs.avatar;
avatar.fChooseImg(1, { selWidth: '350upx', selHeight: '350upx', inner: true });
},
doUpload(rsp) {
// console.log(rsp);
let that = this
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/upload/image/field',
filePath: rsp.path,
name: 'field',
formData: {
'filename': rsp.path,
'name': that.imgName
},
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: (uploadFileRes) => {
// console.log(JSON.parse(uploadFileRes.data));
let imgData = JSON.parse(uploadFileRes.data)
// that.prodectContent.imageList.push(imgData.data.path)
if(!that.prodectContent.imageList)that.prodectContent.imageList=[];
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore};
},
complete(res) {
// console.log(res)
}
});
},
getImgName(name) {
this.imgName = name
},
//
deleteImage(index) {
this.prodectContent.imageList.splice(index, 1);
this.uploadImg = this.prodectContent.imageList
}
}
};
</script>
<style lang="scss" scoped>
.input_content {
background: #fff;
padding: 20rpx 40rpx 40rpx 30rpx;
width: 710rpx;
margin: auto;
box-sizing: border-box;
border-radius: 10rpx;
&_textarea {
border-bottom: 1px solid #eeeeee;
padding-bottom: 19rpx;
textarea {
height: 114rpx;
}
>view {
text-align: right;
color: #666666;
font-size: 24rpx;
}
}
&_photo {
margin-top: 41rpx;
display: flex;
flex-wrap: wrap;
.photos {
width: 156rpx;
height: 156rpx;
}
&_adPh {
position: relative;
width: 156rpx;
height: 156rpx;
border: 1px solid #dddddd;
display: flex;
flex-direction: column;
justify-content: center;
border-radius: 8rpx;
margin-right: 30rpx;
margin-bottom: 30rpx;
>image {
height: 100%;
margin: auto;
}
>view:nth-child(1) {
height: 37rpx;
margin-bottom: 16rpx;
display: flex;
justify-content: center;
image {
width: 45rpx;
display: block;
}
}
>view:nth-child(2) {
text-align: center;
color: #bbbbbb;
font-size: 24rpx;
}
&_jiao {
position: absolute;
top: -14rpx;
right: -14rpx;
width: 40rpx;
height: 40rpx;
background: #e93323;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
image {
width: 16rpx;
height: 16rpx;
}
}
}
}
&_describe {
border-top: 1px solid #eeeeee;
padding-top: 30rpx;
padding-bottom: 47rpx;
border-bottom: 1px solid #eeeeee;
&_title {
display: flex;
align-items: center;
justify-content: space-between;
&_msg {
color: #333333;
font-size: 30rpx;
}
&_num {
color: #666666;
font-size: 24rpx;
}
}
&_textarea {
border-radius: 10px;
margin-top: 20rpx;
height: 180rpx;
background: #f5f5f5;
padding: 20rpx;
textarea {
font-size: 28rpx;
}
}
}
&_keyword {
padding-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
&_value {
flex: 1;
margin-left: 30rpx;
input {
width: 100%;
text-align: right;
}
}
}
}
.placeholderClass {
color: #bbbbbb;
font-size: 28rpx;
}
</style>

View File

@ -0,0 +1,172 @@
<template>
<view class="select_popup_container platform">
<!-- 头部内容 -->
<view class="popup_title">
<view class="popup_title_msn">请选择平台分类</view>
<view class="close" @click="close"><text class="iconfont">&#xe761;</text></view>
</view>
<!-- 头部内容结束 -->
<view class="tap_list">
<view class="tap_list_item" v-for="(item, index) in tapList" :key="index" @click="selectTap(item, index)" :class="{ 'border': selectIndex == index }">
{{item.label}}
</view>
<view class="tap_list_item" :class="{ 'border': selectIndex == -1 }" @click="pleaseSelect">请选择</view>
</view>
<view class="content_list">
<scroll-view scroll-y="true" class="popup_sroll">
<view class="content_list_item" @click="selectItem(item, index)" v-for="(item, index) in selectClassifiedData" :key="index">{{ item.label }}</view>
</scroll-view>
</view>
</view>
</template>
<script>
import { navigateTo, serialize, setStorage } from '@/libs/uniApi.js';
export default {
props: {
// ()
classifiedData: {
type: Array,
default: () => {
return [];
}
}
},
data() {
return {
selectIndex: -1,
tapList: [],
selectClassifiedData: []
};
},
watch: {
classifiedData: {
handler(val) {
this.selectClassifiedData = this.classifiedData
},
deep: true
}
},
created() {
this.selectClassifiedData = serialize(this.classifiedData);
},
methods: {
selectItem(item, index) {
if(!(item.children && item.children.length)) {
this.$emit('getPlatData', item, this.tapList);
return;
}
if(this.selectIndex > -1) {
this.tapList.splice(this.selectIndex + 1, 999);
this.tapList.push(item);
this.selectIndex = -1;
this.selectClassifiedData = serialize(item.children);
return;
}
if(item.children && item.children.length) {
this.tapList.push(item);
this.selectClassifiedData = serialize(item.children);
return;
}
},
//
selectTap(item, index) {
// console.log(item);
if(index == 0){
this.tapList=[]
this.selectClassifiedData = serialize(this.classifiedData);
}
if(index == 1){
this.selectIndex = index;
this.tapList.splice(index,1)
this.selectClassifiedData = serialize(this.tapList[0].children);
}
},
//
pleaseSelect() {
this.selectIndex = -1;
this.selectClassifiedData = this.tapList[this.tapList.length - 1].children;
},
//
close() {
this.$emit('close');
}
}
};
</script>
<style lang="scss" scoped>
.select_popup_container {
background: #fff;
border-radius: 16rpx 16rpx 0 0;
}
.popup_title {
display: flex;
justify-content: flex-end;
padding: 36rpx 30rpx;
position: relative;
&_msn {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #282828;
font-size: 32rpx;
font-weight: bold;
}
.close {
position: relative;
z-index: 10;
font-size: 28rpx;
color: #8a8a8a;
}
}
.tap_list {
margin-top: 35rpx;
border-bottom: 1px solid #EEEEEE;
width: 710rpx;
margin: auto;
margin-bottom: 40rpx;
display: flex;
.border {
border-bottom: 2px solid #E93323 !important;
color: #E93323 !important;
}
&_item {
padding-bottom: 18rpx;
margin-right: 30rpx;
}
}
.content_list {
.popup_sroll {
height: 742rpx;
}
.content_list_item {
color: #333333;
margin-bottom: 50rpx;
margin-left: 30rpx;
margin-right: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
> view {
flex: 0.6;
}
> view:nth-child(2) {
flex: 0.4;
display: flex;
justify-content: flex-end;
}
.iconfont {
color: #e93323;
font-size: 36rpx !important;
}
}
}
</style>

View File

@ -0,0 +1,217 @@
<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
},
props: ['product_id', 'bar_code'],
data() {
return {
singleSpecification: {
price: '', //
cost: '', //
stock: '', //
ot_price: '', //
procure_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
image: '',
extension_one: '',
extension_two: ''
},
moreThanFlag: true,
formList: [{
id: 1,
label: '零售价',
type: 'digit',
model: 'price',
holder: '请填写零售价',
require: true,
}, {
id: 10,
label: '库存',
type: 'digit',
model: 'stock',
holder: '请填写库存',
disable: true,
require: true,
}, {
id: 2,
label: '成本价',
type: 'digit',
holder: '请填写成本价',
model: 'cost',
require: true,
},
],
moreThanList: [{
id: 6,
label: '重量',
type: 'digit',
holder: '请输入重量',
model: 'weight',
require: false,
},
{
id: 7,
label: '体积',
type: 'digit',
holder: '请输入体积',
model: 'volume',
require: false,
},
{
id: 5,
label: '商品条码',
type: 'input',
holder: '请填写商品条码',
model: 'bar_code',
require: false,
},
// {
// id: 8,
// label: '',
// type: 'digit',
// holder: '',
// model: 'extension_one'
// },
// {
// id: 9,
// label: '',
// type: 'digit',
// holder: '',
// model: 'extension_two'
// }
],
}
},
watch: {
singleSpecification: {
handler(val, old) {
this.singleSpecification = val;
this.$emit('updateCode', val.bar_code);
},
deep: true
},
},
mounted() {
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]
}
})
}
this.singleSpecification.bar_code = this.$props.bar_code + '';
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
//
if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
this.formList.unshift({
id: 3,
label: '批发价',
type: 'digit',
holder: '请填写批发价',
model: 'procure_price',
require: true,
})
}
// if (!this.$props.product_id) {
// this.formList.push({
// id: 10,
// label: '',
// type: 'digit',
// model: 'stock',
// holder: '',
// disable: true
// })
// }
},
methods: {
selectMoreThan() {
this.formList = this.formList.concat(this.moreThanList);
this.moreThanFlag = false;
},
spliceMoreThan() {
this.moreThanFlag = true;
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
if(this.$store.state.app?.userInfo?.mer_info?.type_code=="TypeSupplyChain")
this.formList.splice(4, this.formList.length);
else this.formList.splice(3, this.formList.length);
},
input(val) {
this.singleSpecification = val
},
}
}
</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>

View File

@ -0,0 +1,178 @@
.container {
padding-top: 20rpx;
padding-bottom: 223rpx;
}
.freight_template {
background: #fff;
width: 710rpx;
margin: auto;
border-radius: 10rpx;
padding: 0 20rpx;
&_name {
height: 106rpx;
border-bottom: 1px solid #eeeeee;
display: flex;
align-items: center;
&_con {
flex: 1;
padding: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
&_value {
flex: 1;
text-align: right;
}
}
}
}
.freight_description {
padding-top: 31rpx;
padding-bottom: 47rpx;
&_title {
padding-left: 20rpx;
padding-bottom: 20rpx;
}
&_textarea {
padding: 0 20rpx;
textarea {
padding: 20rpx;
width: 630rpx;
height: 180rpx;
border-radius: 10rpx;
background: #f5f5f5;
}
}
}
.inputClass_template_name {
color: #bbbbbb;
font-size: 30rpx;
}
.textarea_class {
color: #bbbbbb;
font-size: 28rpx;
}
.billing_method {
margin: auto;
margin-top: 30rpx;
width: 710rpx;
background: #fff;
padding: 30rpx 0 36rpx 30rpx;
border-radius: 10rpx;
&_title {
margin-bottom: 42rpx;
color: #333333;
font-size: 30rpx;
}
.radioContainer {
display: flex;
justify-content: space-between;
.uni-list-cell {
display: flex;
padding-right: 74rpx;
>view:nth-child(1) {
}
>view:nth-child(2) {
white-space: nowrap;
}
}
}
}
.regional_freight {
margin: auto;
margin-top: 30rpx;
width: 710rpx;
height: 106rpx;
background: #FFFFFF;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
&_label {
color: #333333;
font-size: 30rpx;
}
&_value {
color: #BBBBBB;
font-size: 30rpx;
>span:nth-child(1) {
display: inline-block;
margin-right: 15rpx;
}
}
}
.free_shipping {
background: #fff;
width: 710rpx;
margin: auto;
&_item {
height: 106rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
&_value {
color: #BBBBBB;
font-size: 30rpx;
display: flex;
align-items: center;
>span:nth-child(1) {
display: inline-block;
margin-right: 15rpx;
max-width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
.handle {
width: 100%;
height: 126rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 0;
bottom: 0;
&_button {
width: 690rpx;
height: 86rpx;
background: #e93323;
border-radius: 43px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #ffffff;
}
}
.width100 {
width: 100%;
}
.mt30 {
margin-top: 30rpx;
}

View File

@ -0,0 +1,288 @@
// addGoodsFormData
// singleSpecification -- 单规格
// attrValue -- 多规格数据
// modifyPriceData -- 多规格选择时已经存储的数据
.container {
padding-top: 20rpx;
padding-bottom: 156rpx;
}
.bar-code{
height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
margin-bottom: 20rpx;
input{
text-align: right;
}
}
.tip {
padding: 16rpx 0 0 20rpx;
font-size: 22rpx;
color: #e93323;
display: flex;
align-items: center;
margin-bottom: 40rpx;
.iconfont {
display: inline-block;
margin-right: 10rpx;
}
}
.popup_group {
background: #fff;
margin: 31rpx auto;
width: 710rpx;
font-size: 30rpx;
border-radius: 10rpx;
.icon_top{
transform: rotate(-90deg);
}
.icon_bottom{
transform: rotate(90deg);
}
.popup_group_item {
padding: 32rpx 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
.popup_group_item_value {
display: flex;
align-items: center;
.popup_group_item_message {
margin-right: 15rpx;
color: #bbbbbb;
max-width: 400rpx;
&_value {
display: inline-block;
max-width: 400rpx;
color: #000;
}
}
.iconfont {
color: #bbbbbb;
}
input {
text-align: right;
}
}
}
> view:not(:last-child) {
border-bottom: 1px solid #eeeeee;
}
}
.handle {
width: 100%;
height: 126rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
left: 0;
bottom: 0;
z-index: 10;
&_button {
width: 690rpx;
height: 86rpx;
background: #e93323;
border-radius: 43px;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #ffffff;
}
}
.input_content {
background: #fff;
padding: 20rpx 30rpx 40rpx 30rpx;
width: 710rpx;
margin: auto;
box-sizing: border-box;
border-radius: 10rpx;
&_textarea {
border-bottom: 1px solid #eeeeee;
padding-bottom: 19rpx;
textarea {
height: 114rpx;
}
> view {
text-align: right;
color: #666666;
font-size: 24rpx;
}
}
&_photo {
margin-top: 30rpx;
display: flex;
flex-wrap: wrap;
&_adPh {
position: relative;
width: 210rpx;
height: 210rpx;
border: 1px solid #dddddd;
display: flex;
flex-direction: column;
justify-content: center;
border-radius: 8rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
box-sizing: border-box;
&:nth-child(3n){
margin-right: 0;
}
> view:nth-child(1) {
height: 37rpx;
margin-bottom: 16rpx;
display: flex;
justify-content: center;
image {
width: 45rpx;
display: block;
}
}
> view:nth-child(2) {
text-align: center;
color: #bbbbbb;
font-size: 24rpx;
}
.photos {
width: 206rpx;
// height: 208rpx;
}
&_jiao {
position: absolute;
top: -2rpx;
right: -1rpx;
width: 40rpx;
height: 40rpx;
background: rgba(0,0,0,.6);
display: flex;
align-items: center;
justify-content: center;
border-radius: 0 8rpx 0 8rpx;
image {
width: 16rpx;
height: 16rpx;
}
}
}
}
&_describe {
border-top: 1px solid #eeeeee;
padding-top: 30rpx;
padding-bottom: 47rpx;
border-bottom: 1px solid #eeeeee;
&_title {
display: flex;
align-items: center;
justify-content: space-between;
&_msg {
color: #333333;
font-size: 30rpx;
}
&_num {
color: #666666;
font-size: 24rpx;
}
}
&_textarea {
border-radius: 10px;
margin-top: 20rpx;
height: 180rpx;
background: #f5f5f5;
padding: 20rpx;
textarea {
font-size: 28rpx;
height: 150rpx;
}
}
}
&_keyword {
padding-top: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
&_value {
flex: 1;
margin-left: 30rpx;
input {
width: 100%;
text-align: right;
}
}
}
}
.photo_count{
margin-top: 28rpx;
.photo_size{
font-size: 24rpx;
color: #999999;
}
}
.radio {
padding: 30rpx;
&_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;
}
}
}
.select_group {
display: flex;
}
.flex_start {
padding: 0 10rpx;
margin-top: 40rpx;
justify-content: flex-start;
}
&_select {
display: flex;
margin-right: 110rpx;
}
}
.dobuButton {
padding: 0 30rpx;
}
.margin_right {
background: #FD6523;
margin-right: 30rpx;
}