parent
5abc4dce43
commit
39acdfa7a4
@ -0,0 +1,571 @@ |
|||||||
|
<template> |
||||||
|
<view class="goods"> |
||||||
|
<view class="goods-hd"> |
||||||
|
<view class="item"> |
||||||
|
<view class="a">商品链接<text>*</text></view> |
||||||
|
<view class="b" style="width: 500rpx;"> |
||||||
|
<u-input v-model="from.urls" wi max-height="260" maxlength="100" type="textarea" |
||||||
|
placeholder="请输入商品链接" :border="true" /> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<view class="item"> |
||||||
|
<view class="a">商品主图<text>*</text></view> |
||||||
|
<view class="b"> |
||||||
|
<u-radio-group v-model="from.imageStorage"> |
||||||
|
<u-radio active-color='#F34A40' v-for="(item, index) in goodsImage" :key="index" |
||||||
|
:name="item.value"> |
||||||
|
{{ item.name }} |
||||||
|
</u-radio> |
||||||
|
</u-radio-group> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item"> |
||||||
|
<view class="a">商品类型<text>*</text></view> |
||||||
|
<view class="b"> |
||||||
|
<u-radio-group v-model="from.goods_type"> |
||||||
|
<u-radio active-color='#F34A40' v-for="(item, index) in goodsType" :key="index" |
||||||
|
:name="item.value"> |
||||||
|
{{ item.name }} |
||||||
|
</u-radio> |
||||||
|
</u-radio-group> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item"> |
||||||
|
<view class="a">商品分类<text>*</text></view> |
||||||
|
<view class="b roomCover" style="width: 350rpx;height: 40rpx;text-align: right;" @click="choseCategory"> |
||||||
|
<text :style="{color: from.categoryIds? '#606266' : '#C7C7C7'}"> |
||||||
|
{{from.categoryIds?category_name:'请选商品分类'}}</text> |
||||||
|
<u-icon name="arrow-right" color="#C7C7C7"></u-icon> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item"> |
||||||
|
<view class="a">运费模版<text>*</text></view> |
||||||
|
<view class="b" style="width: 350rpx;height: 40rpx;text-align: right;"> |
||||||
|
<picker @change="changeDeliveryTemplate" mode="selector" placeholder="请选择运费模版" |
||||||
|
style="width: 350rpx;height: 40rpx;" range-key="name" :value="index" :range="deliveryTemplate"> |
||||||
|
<text :style="{color: template_name? '#606266' : '#C7C7C7'}"> |
||||||
|
{{template_name?template_name:'请选择运费模版'}}</text> |
||||||
|
<u-icon name="arrow-right" color="#C7C7C7"></u-icon> |
||||||
|
</picker> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="item"> |
||||||
|
<view class="a">商品状态<text>*</text></view> |
||||||
|
<view class="b"> |
||||||
|
<u-radio-group v-model="from.goods_status"> |
||||||
|
<u-radio active-color='#F34A40' v-for="(item, index) in goodsStatus" :key="index" |
||||||
|
:name="item.value"> |
||||||
|
{{ item.name }} |
||||||
|
</u-radio> |
||||||
|
</u-radio-group> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="btnGroup"> |
||||||
|
<view class="reset" @click="reset"> |
||||||
|
重置 |
||||||
|
</view> |
||||||
|
<view class="submit" @click="submit" style="margin-left:24upx;"> |
||||||
|
确定 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<category ref="category" :tabList='categoryList' @getChoseCategory="getChoseCategory" |
||||||
|
:activeIndex='activeIndex'></category> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import * as newFunApi from '@/api/newFun' |
||||||
|
import category from './components/category.vue' |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
category |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
afterSale: false, |
||||||
|
category_name: '', |
||||||
|
template_name: '', |
||||||
|
from: { |
||||||
|
goods_type: 10, |
||||||
|
urls: "", |
||||||
|
imageStorage: 10, |
||||||
|
goods_status: 10, |
||||||
|
delivery_id: '', |
||||||
|
categoryIds: '', |
||||||
|
}, |
||||||
|
deliveryTemplate: [], |
||||||
|
goodsType: [{ |
||||||
|
name: '实物商品', |
||||||
|
value: 10 |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: '虚拟商品', |
||||||
|
value: 20 |
||||||
|
} |
||||||
|
], |
||||||
|
goodsStatus: [{ |
||||||
|
name: '上架', |
||||||
|
value: 10 |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: '下架', |
||||||
|
value: 20 |
||||||
|
} |
||||||
|
], |
||||||
|
goodsImage: [{ |
||||||
|
name: '下载到本地', |
||||||
|
value: 10 |
||||||
|
}, |
||||||
|
{ |
||||||
|
name: '使用源图片url', |
||||||
|
value: 20 |
||||||
|
} |
||||||
|
], |
||||||
|
categoryList: [], |
||||||
|
activeIndex: [] |
||||||
|
}; |
||||||
|
}, |
||||||
|
onLoad() { |
||||||
|
this.getCategory() |
||||||
|
this.getDelivery() |
||||||
|
}, |
||||||
|
onReady() {}, |
||||||
|
methods: { |
||||||
|
findElementsById(arr, ids) { |
||||||
|
let result = [] |
||||||
|
arr.forEach(item => { |
||||||
|
if (ids.indexOf(item.category_id) > -1) { |
||||||
|
result.push(item.name); |
||||||
|
} |
||||||
|
item.children.forEach(item1 => { |
||||||
|
if (ids.indexOf(item1.category_id) > -1) { |
||||||
|
result.push(item1.name); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
return result; |
||||||
|
}, |
||||||
|
// 获取分类 |
||||||
|
getChoseCategory(res) { |
||||||
|
let nameList = []; |
||||||
|
nameList = this.findElementsById(this.categoryList, res.category_id); |
||||||
|
this.category_name = nameList.join(',') + (nameList.length > 3 ? '等' : ''); |
||||||
|
this.from.categoryIds = res.category_id; |
||||||
|
this.$refs.category.afterSale = false; |
||||||
|
}, |
||||||
|
// 獲取运费模版 |
||||||
|
async getDelivery() { |
||||||
|
let { |
||||||
|
status, |
||||||
|
message, |
||||||
|
data |
||||||
|
} = await newFunApi.deliveryall(); |
||||||
|
this.deliveryTemplate = data.list |
||||||
|
}, |
||||||
|
// 獲取分类 |
||||||
|
async getCategory() { |
||||||
|
let { |
||||||
|
status, |
||||||
|
message, |
||||||
|
data |
||||||
|
} = await newFunApi.category(); |
||||||
|
this.categoryList = data.list |
||||||
|
}, |
||||||
|
reset() { |
||||||
|
this.from.goods_typ = 10; |
||||||
|
this.from.urls = ""; |
||||||
|
this.from.imageStorage = 10; |
||||||
|
this.from.goods_status = 10; |
||||||
|
this.from.delivery_id = ''; |
||||||
|
this.from.categoryIds = ''; |
||||||
|
}, |
||||||
|
choseCategory() { |
||||||
|
this.$refs.category.afterSale = true; |
||||||
|
}, |
||||||
|
// 运费模板 |
||||||
|
changeDeliveryTemplate(e) { |
||||||
|
this.from.delivery_id = this.deliveryTemplate[e.detail.value].delivery_id; |
||||||
|
this.template_name = this.deliveryTemplate[e.detail.value].name; |
||||||
|
|
||||||
|
}, |
||||||
|
async submit() { |
||||||
|
let that = this |
||||||
|
if (!that.from.urls) { |
||||||
|
return that.$toast('请输入商品链接') |
||||||
|
} |
||||||
|
if (!that.from.categoryIds) { |
||||||
|
return that.$toast('请选择商品分类') |
||||||
|
} |
||||||
|
if (!that.from.delivery_id) { |
||||||
|
return that.$toast('请选择运费模版') |
||||||
|
} |
||||||
|
let { |
||||||
|
status, |
||||||
|
message, |
||||||
|
data |
||||||
|
} = await newFunApi.editStore(this.from); |
||||||
|
if (status == 200) { |
||||||
|
uni.showToast({ |
||||||
|
title: "保存成功" |
||||||
|
}) |
||||||
|
uni.navigateBack() |
||||||
|
} |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
.btnGroup { |
||||||
|
margin: 60rpx 50rpx; |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
align-items: center; |
||||||
|
|
||||||
|
.reset { |
||||||
|
width: 300upx; |
||||||
|
height: 80upx; |
||||||
|
background: #E9E9E9; |
||||||
|
border-radius: 22px 22px 22px 22px; |
||||||
|
opacity: 1; |
||||||
|
|
||||||
|
font-size: 28upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #585858; |
||||||
|
line-height: 80upx; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
|
||||||
|
.submit { |
||||||
|
width: 300upx; |
||||||
|
height: 80upx; |
||||||
|
background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%); |
||||||
|
border-radius: 50px 50px 50px 50px; |
||||||
|
opacity: 1; |
||||||
|
|
||||||
|
font-size: 28upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #FFFFFF; |
||||||
|
line-height: 80upx; |
||||||
|
text-align: center; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.goods { |
||||||
|
padding: 0 0 130rpx; |
||||||
|
overflow: hidden; |
||||||
|
margin-top: 12rpx; |
||||||
|
|
||||||
|
&-top { |
||||||
|
background-color: #fff; |
||||||
|
padding: 40rpx 15rpx; |
||||||
|
overflow: hidden; |
||||||
|
margin-bottom: 20rpx; |
||||||
|
|
||||||
|
input { |
||||||
|
display: block; |
||||||
|
line-height: 60rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #212121; |
||||||
|
} |
||||||
|
|
||||||
|
.btn { |
||||||
|
width: 158rpx; |
||||||
|
line-height: 50rpx; |
||||||
|
background: #FF5050; |
||||||
|
border-radius: 50rpx; |
||||||
|
text-align: center; |
||||||
|
font-size: 24rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #FFFFFF; |
||||||
|
float: right; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
&-hd { |
||||||
|
background-color: #fff; |
||||||
|
padding: 0 25rpx 0; |
||||||
|
overflow: hidden; |
||||||
|
margin-bottom: 20rpx; |
||||||
|
|
||||||
|
.item { |
||||||
|
padding: 30rpx 20rpx; |
||||||
|
line-height: 50rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #212121; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
border-bottom: 1px solid #F7F7F7; |
||||||
|
|
||||||
|
.a { |
||||||
|
text { |
||||||
|
color: #F34A40; |
||||||
|
margin-left: 5rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.b { |
||||||
|
font-size: 28rpx; |
||||||
|
color: #606266; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: flex-end; |
||||||
|
|
||||||
|
input { |
||||||
|
font-size: 28rpx; |
||||||
|
color: #6D6D6D; |
||||||
|
flex: 1; |
||||||
|
line-height: 50rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
text-align: right; |
||||||
|
margin-right: 10rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.select { |
||||||
|
width: 100%; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
color: #C7C7C7; |
||||||
|
justify-content: flex-end; |
||||||
|
|
||||||
|
&-on { |
||||||
|
color: #212121; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.items { |
||||||
|
padding: 20rpx 30rpx; |
||||||
|
line-height: 50rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #212121; |
||||||
|
border-bottom: 1px solid #F7F7F7; |
||||||
|
|
||||||
|
.t { |
||||||
|
width: 480rpx; |
||||||
|
height: 40rpx; |
||||||
|
padding-left: 30rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #212121; |
||||||
|
margin-top: 5rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.a { |
||||||
|
flex: 1; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
|
||||||
|
input { |
||||||
|
flex: 1; |
||||||
|
font-size: 26rpx; |
||||||
|
color: #212121; |
||||||
|
line-height: 50rpx; |
||||||
|
margin-left: 20rpx; |
||||||
|
} |
||||||
|
|
||||||
|
text { |
||||||
|
color: #F34A40; |
||||||
|
margin-left: 5rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.select { |
||||||
|
flex: 1; |
||||||
|
} |
||||||
|
|
||||||
|
.tip { |
||||||
|
margin-left: 15rpx; |
||||||
|
font-size: 24rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #9F9F9F; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.b { |
||||||
|
padding-top: 20rpx; |
||||||
|
font-size: 24rpx; |
||||||
|
font-weight: 400; |
||||||
|
color: #C7C7C7; |
||||||
|
} |
||||||
|
|
||||||
|
.c { |
||||||
|
padding-top: 20rpx; |
||||||
|
overflow: hidden; |
||||||
|
|
||||||
|
.slot-btn { |
||||||
|
width: 180rpx; |
||||||
|
height: 180rpx; |
||||||
|
background: #F6F6F6; |
||||||
|
border-radius: 10rpx; |
||||||
|
border: 1px solid #C0C0C0; |
||||||
|
text-align: center; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #6D6D6D; |
||||||
|
|
||||||
|
image { |
||||||
|
width: 50rpx; |
||||||
|
height: 50rpx; |
||||||
|
margin-top: 30rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
&-fd { |
||||||
|
width: 100%; |
||||||
|
position: fixed; |
||||||
|
left: 0; |
||||||
|
bottom: 0; |
||||||
|
padding: 30rpx; |
||||||
|
z-index: 99; |
||||||
|
background-color: #fafafa; |
||||||
|
box-sizing: border-box; |
||||||
|
|
||||||
|
.btn { |
||||||
|
width: 630rpx; |
||||||
|
line-height: 88rpx; |
||||||
|
background: #F34A40; |
||||||
|
border-radius: 88rpx; |
||||||
|
text-align: center; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #FFFFFF; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
&-classify { |
||||||
|
width: 100%; |
||||||
|
overflow: hidden; |
||||||
|
|
||||||
|
&-hd { |
||||||
|
padding: 30rpx 60rpx; |
||||||
|
position: relative; |
||||||
|
font-size: 32rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #303030; |
||||||
|
text-align: center; |
||||||
|
|
||||||
|
.a { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 500; |
||||||
|
color: #FF624F; |
||||||
|
position: absolute; |
||||||
|
top: 30rpx; |
||||||
|
left: 40rpx; |
||||||
|
z-index: 2; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
&-bd { |
||||||
|
overflow: hidden; |
||||||
|
display: flex; |
||||||
|
align-items: flex-start; |
||||||
|
|
||||||
|
.l { |
||||||
|
width: 210rpx; |
||||||
|
height: 560rpx; |
||||||
|
background-color: #fff; |
||||||
|
|
||||||
|
.item { |
||||||
|
text-overflow: ellipsis; |
||||||
|
overflow: hidden; |
||||||
|
height: 80rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 400; |
||||||
|
color: #303030; |
||||||
|
white-space: nowrap; |
||||||
|
line-height: 80rpx; |
||||||
|
padding-left: 30rpx; |
||||||
|
box-sizing: border-box; |
||||||
|
|
||||||
|
&-on { |
||||||
|
background-color: #fff; |
||||||
|
font-weight: 500; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.m { |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
max-height: 560rpx; |
||||||
|
|
||||||
|
.item { |
||||||
|
text-overflow: ellipsis; |
||||||
|
overflow: hidden; |
||||||
|
height: 70rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 400; |
||||||
|
color: #303030; |
||||||
|
white-space: nowrap; |
||||||
|
line-height: 70rpx; |
||||||
|
box-sizing: border-box; |
||||||
|
|
||||||
|
&-on { |
||||||
|
color: #FF624F; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.r { |
||||||
|
width: 540rpx; |
||||||
|
height: 560rpx; |
||||||
|
|
||||||
|
.item { |
||||||
|
text-overflow: ellipsis; |
||||||
|
overflow: hidden; |
||||||
|
height: 80rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
font-weight: 400; |
||||||
|
color: #303030; |
||||||
|
white-space: nowrap; |
||||||
|
line-height: 80rpx; |
||||||
|
padding-left: 80rpx; |
||||||
|
box-sizing: border-box; |
||||||
|
|
||||||
|
&-on { |
||||||
|
color: #FF624F; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .u-list-item { |
||||||
|
margin: 10rpx 20rpx 10rpx 0 !important; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .uni-textarea { |
||||||
|
max-height: 100rpx !important; |
||||||
|
} |
||||||
|
|
||||||
|
::v-deep .uni-input-placeholder { |
||||||
|
color: #C7C7C7 !important; |
||||||
|
} |
||||||
|
|
||||||
|
.roomCover { |
||||||
|
overflow: hidden; |
||||||
|
|
||||||
|
text { |
||||||
|
text-overflow: ellipsis; |
||||||
|
white-space: nowrap; |
||||||
|
-webkit-line-clamp: 1; |
||||||
|
max-width: 400rpx; |
||||||
|
overflow: hidden; |
||||||
|
white-space: nowrap; |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,207 @@ |
|||||||
|
<template> |
||||||
|
<view> |
||||||
|
<u-popup v-model="afterSale" catchtouchmove='true' width="80%" border-radius="10" @close="onClose" |
||||||
|
:closeable="true" mode="center"> |
||||||
|
<view class="afterSales"> |
||||||
|
<view class="filterTitle"> |
||||||
|
请选择分类 |
||||||
|
</view> |
||||||
|
<view class="shopItem"> |
||||||
|
<view class="" v-for="(item, index) in tabList" :key="index"> |
||||||
|
<view class="shopText Text" :class="{'active1':activeIndex.indexOf(item.category_id) > -1}" |
||||||
|
@click="getShop(item,item.category_id)"> |
||||||
|
<text style="color: #333;font-weight: 700;">{{ item.name }}</text> |
||||||
|
<image v-if="activeIndex.indexOf(item.category_id) > -1" |
||||||
|
:src="$picUrl + '/static/news1/selected.png'" mode="widthFix"> |
||||||
|
</image> |
||||||
|
</view> |
||||||
|
<view class="shopItem2"> |
||||||
|
<view class="shopText" :class="{'active2':activeIndex.indexOf(item.category_id) > -1}" |
||||||
|
@click="getShop(item,item.category_id)" v-for="(item, index) in item.children" |
||||||
|
:key="index"> |
||||||
|
<text>{{ item.name }}</text> |
||||||
|
<image v-if="activeIndex.indexOf(item.category_id) > -1" |
||||||
|
:src="$picUrl + '/static/news1/selected.png'" mode="widthFix"> |
||||||
|
</image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="btnGroup"> |
||||||
|
<view class="reset" @click="reset"> |
||||||
|
重置 |
||||||
|
</view> |
||||||
|
<view class="submit" @click="submit" style="margin-left:24upx;"> |
||||||
|
确定 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</u-popup> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
export default { |
||||||
|
props: { |
||||||
|
tabList: Array, //自定义属性的值:数据类型 |
||||||
|
activeIndex: Array, |
||||||
|
categoryId: String || Number, |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
afterSale: false, |
||||||
|
category_id: '', |
||||||
|
category_name: '', |
||||||
|
} |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
reset() { |
||||||
|
this.activeIndex.splice(0) |
||||||
|
}, |
||||||
|
getShop(item, category_id) { |
||||||
|
let arrIndex = this.activeIndex.indexOf(category_id) |
||||||
|
if (arrIndex > -1) { |
||||||
|
this.activeIndex.splice(arrIndex, 1) |
||||||
|
} else { |
||||||
|
this.activeIndex.push(category_id) |
||||||
|
} |
||||||
|
}, |
||||||
|
submit() { |
||||||
|
this.$emit('getChoseCategory', { |
||||||
|
category_id: this.activeIndex || [], |
||||||
|
}) |
||||||
|
}, |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss" scoped> |
||||||
|
::v-deep .u-btn--primary { |
||||||
|
background-color: #FF6257 !important; |
||||||
|
border-color: #FF6257; |
||||||
|
} |
||||||
|
|
||||||
|
.afterSales { |
||||||
|
padding: 32upx; |
||||||
|
|
||||||
|
.btnGroup { |
||||||
|
margin: 40rpx; |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
align-items: center; |
||||||
|
|
||||||
|
.reset { |
||||||
|
width: 216upx; |
||||||
|
height: 70upx; |
||||||
|
background: #E9E9E9; |
||||||
|
border-radius: 22px 22px 22px 22px; |
||||||
|
opacity: 1; |
||||||
|
|
||||||
|
font-size: 28upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #585858; |
||||||
|
line-height: 70upx; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
|
||||||
|
.submit { |
||||||
|
width: 216upx; |
||||||
|
height: 70upx; |
||||||
|
background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%); |
||||||
|
border-radius: 50px 50px 50px 50px; |
||||||
|
opacity: 1; |
||||||
|
|
||||||
|
font-size: 28upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #FFFFFF; |
||||||
|
line-height: 70upx; |
||||||
|
text-align: center; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.filterTitle { |
||||||
|
font-size: 32upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 700; |
||||||
|
color: #303030; |
||||||
|
text-align: center; |
||||||
|
padding-bottom: 30rpx; |
||||||
|
border-bottom: 1px solid #EAEAEA; |
||||||
|
} |
||||||
|
|
||||||
|
.shopItem2 { |
||||||
|
display: flex; |
||||||
|
flex-wrap: wrap; |
||||||
|
align-items: center; |
||||||
|
margin-left: 40rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.shopItem { |
||||||
|
margin-top: 40rpx; |
||||||
|
max-height: 750rpx; |
||||||
|
overflow-y: auto; |
||||||
|
|
||||||
|
.shopText { |
||||||
|
margin-right: 12rpx; |
||||||
|
width: 150upx; |
||||||
|
height: 60upx; |
||||||
|
background: #FFFFFF; |
||||||
|
border-radius: 3px 3px 3px 3px; |
||||||
|
border: 1px solid #D6D6D6; |
||||||
|
position: relative; |
||||||
|
margin-bottom: 24upx; |
||||||
|
display: flex; |
||||||
|
justify-content: center; |
||||||
|
align-items: center; |
||||||
|
white-space: nowrap; |
||||||
|
text-overflow: ellipsis; |
||||||
|
overflow: hidden; |
||||||
|
|
||||||
|
text { |
||||||
|
font-size: 26upx; |
||||||
|
font-family: PingFang SC, PingFang SC; |
||||||
|
font-weight: 500; |
||||||
|
color: #B6B6B6; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
image { |
||||||
|
position: absolute; |
||||||
|
z-index: 9; |
||||||
|
right: -8upx; |
||||||
|
bottom: -8upx; |
||||||
|
height: 0; |
||||||
|
width: 50upx; |
||||||
|
height: auto; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.active1 { |
||||||
|
text { |
||||||
|
font-weight: 700; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #FF4F40; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
border: 1px solid #FF4F40; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
.active2 { |
||||||
|
text { |
||||||
|
font-weight: 500; |
||||||
|
font-size: 26rpx; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
border: 1px solid #FF4F40; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
</style> |
@ -1,711 +1,163 @@ |
|||||||
<template> |
<template> |
||||||
<view class="goods"> |
<view class="recharge"> |
||||||
<!-- <view class="goods-top"> |
<view class="recharge-bd"> |
||||||
<input type="textarea" v-model="content" placeholder="输入SKU直接导入获取商品信息" /> |
<view class="item" v-for="item in list" :key="i" v-if="list.length>0"> |
||||||
<view class="btn" :style="{'opacity': content?1:0.6 }" @click="onClickAccess">一键获取</view> |
<view class="item_box"> |
||||||
</view> --> |
<view class="l"> |
||||||
<view class="goods-hd"> |
<view class="a">采集数量:<text>{{item.total_count}}</text></view> |
||||||
<view class="item"> |
<view class="a">成功数量:<text>{{item.success_count}}</text></view> |
||||||
<view class="a">商品名称<text>*</text></view> |
|
||||||
<view class="b"> |
|
||||||
<input type="text" v-model="from.goods_name" placeholder="请输入商品价格,最低0.1元" />元 |
|
||||||
</view> |
</view> |
||||||
|
<view class="l"> |
||||||
|
<view class="a">采集状态:<text :style="{'color': item.status==20?'#55BD6A':'#F34A40' }">{{item.status==20?'已采集':'未采集'}}</text></view> |
||||||
|
<view class="a">失败数量:<text>{{item.fail_count}}</text></view> |
||||||
</view> |
</view> |
||||||
<view class="item"> |
|
||||||
<view class="a">商品分类</view> |
|
||||||
<view class="b" @click="openPage(1)"> |
|
||||||
<view class="select">请选择商品分类<u-icon name="arrow-right"></u-icon> |
|
||||||
</view> |
</view> |
||||||
|
<view class="item_tiem"> |
||||||
|
<view class="a">开始时间:<text>{{item.start_time}}</text></view> |
||||||
</view> |
</view> |
||||||
|
<view class="item_tiem"> |
||||||
|
<view class="a">结束时间:<text>{{item.end_time}}</text></view> |
||||||
</view> |
</view> |
||||||
<view class="items"> |
|
||||||
<view class="a">商品照片<text>*</text> |
|
||||||
<view class="tip">最多上传100张</view> |
|
||||||
</view> |
</view> |
||||||
<view class="c"> |
<u-empty text="暂无数据显示哦~" v-if="list.length==0" mode="list"></u-empty> |
||||||
<u-upload :action="action" :header="header" @on-uploaded="goosSuccess" @on-remove="goodsRemove" |
|
||||||
width="180" height="180" :file-list="goodsImageList" :custom-btn="true" max-count="100"> |
|
||||||
<template v-slot:addBtn> |
|
||||||
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> |
|
||||||
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> |
|
||||||
<view class="1">上传图片</view> |
|
||||||
</view> |
</view> |
||||||
</template> |
<image src="/static/order/share.png" @click="onGather" mode="" class="recharge_image"></image> |
||||||
</u-upload> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="items"> |
|
||||||
<view class="a" style="align-items: flex-start">商品详情<text>*</text> |
|
||||||
<view class="input"> |
|
||||||
<textarea placeholder="可输入商品的详细描述" v-model="from.goods_details" class="t"></textarea> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="c"> |
|
||||||
<u-upload :action="action" :header="header" @on-uploaded="detailSuccess" @on-remove="detailsRemove" |
|
||||||
width="180" height="180" :file-list="goodsDetailImageList" :custom-btn="true" max-count="6"> |
|
||||||
<template v-slot:addBtn> |
|
||||||
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> |
|
||||||
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> |
|
||||||
<view class="1">上传图片</view> |
|
||||||
</view> |
|
||||||
</template> |
|
||||||
</u-upload> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="items"> |
|
||||||
<view class="a">商品素材<text>*</text></view> |
|
||||||
<view class="c"> |
|
||||||
<u-upload :action="action" :header="header" @on-uploaded="sourceSuccess" @on-remove="sourceRemove" |
|
||||||
width="180" height="180" :file-list="goodSourceImageList" :custom-btn="true" max-count="6"> |
|
||||||
<template v-slot:addBtn> |
|
||||||
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> |
|
||||||
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> |
|
||||||
<view class="1">上传图片</view> |
|
||||||
</view> |
|
||||||
</template> |
|
||||||
</u-upload> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="goods-hd"> |
|
||||||
<view class="items"> |
|
||||||
<view class="a" style="justify-content: space-between;">多规格<u-switch v-model="skuchecked" |
|
||||||
active-color="#55BD6A"></u-switch> |
|
||||||
</view> |
|
||||||
<view class="b"> |
|
||||||
最多添加3个商品规格组,生成SKU数量不能超出50个 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">商品价格<text>*</text></view> |
|
||||||
<view class="b"> |
|
||||||
<input type="text" @input="keyGoodsPrice" v-model="from.goods_price" |
|
||||||
placeholder="请输入商品价格,最低0.1元" />元 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">商品原价</view> |
|
||||||
<view class="b"> |
|
||||||
<input type="text" @input="keyOriginalPrice" v-model="from.goods_original_price" |
|
||||||
placeholder="请输入商品划线价格" />元 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">商品库存<text>*</text></view> |
|
||||||
<view class="b"> |
|
||||||
<input type="number" v-model="from.goods_stock" placeholder="请输入商品库存" />件 |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">商品重量<text>*</text></view> |
|
||||||
<view class="b"> |
|
||||||
<input type="text" v-model="from.goods_weight" placeholder="请输入商品重量" />kg |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="goods-hd"> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">配送方式<text>*</text></view> |
|
||||||
<view class="b" style="width: 350rpx;height: 40rpx;text-align: right;"> |
|
||||||
<picker @change="changeDelivery" mode="selector" placeholder="请选择配送方式" |
|
||||||
style="width: 350rpx;height: 40rpx;" range-key="text" :value="index" :range="deliveryList"> |
|
||||||
<text :style="{color: from.delivery_name? '#303030' : '#C7C7C7'}"> |
|
||||||
{{from.delivery_name?from.delivery_name:'请选择配送方式'}}</text> |
|
||||||
<u-icon name="arrow-right" color="#C7C7C7"></u-icon> |
|
||||||
</picker> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">运费模版<text>*</text></view> |
|
||||||
<view class="b" style="width: 350rpx;height: 40rpx;text-align: right;"> |
|
||||||
<picker @change="changeDeliveryTemplate" mode="selector" placeholder="请选择运费模版" |
|
||||||
style="width: 350rpx;height: 40rpx;" range-key="text" :value="index" :range="deliveryTemplate"> |
|
||||||
<text :style="{color: from.template_name? '#303030' : '#C7C7C7'}"> |
|
||||||
{{from.template_name?from.template_name:'请选择运费模版'}}</text> |
|
||||||
<u-icon name="arrow-right" color="#C7C7C7"></u-icon> |
|
||||||
</picker> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="item"> |
|
||||||
<view class="a">销售状态<text>*</text></view> |
|
||||||
<view class="b"> |
|
||||||
<u-switch v-model="salesChecked" active-color="#55BD6A"></u-switch> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
<view class="goods-fd"> |
|
||||||
<view class="btn" @click="onSubmit">确认</view> |
|
||||||
</view> |
|
||||||
<u-popup v-model="isShow" mode="bottom" border-radius="12" mask-close-able="false" closeable> |
|
||||||
<view class="goods-classify"> |
|
||||||
<view class="goods-classify-hd"> |
|
||||||
<view class="a" @click="openPage(2)"> |
|
||||||
<u-icon name="plus"></u-icon>新增分类 |
|
||||||
</view> |
|
||||||
商品分类 |
|
||||||
</view> |
|
||||||
<view class="goods-classify-bd"> |
|
||||||
<scroll-view scroll-y class="l"> |
|
||||||
<view class="item" @click="tabLItem(0)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">数码</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(1)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">食品</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(2)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(3)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">家居百货</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(4)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(5)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">家居百货</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(6)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(7)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">食品</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(8)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(9)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">家居百货</view> |
|
||||||
</view> |
|
||||||
<view class="item" @click="tabLItem(10)"> |
|
||||||
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view> |
|
||||||
</view> |
|
||||||
</scroll-view> |
|
||||||
<scroll-view scroll-y class="r"> |
|
||||||
<view class="item" v-for="(a,i) in 10" @click="tabRItem(i)"> |
|
||||||
<view :class="tabRIndex == i?'item-on':''">水产肉类/新鲜水果</view> |
|
||||||
</view> |
|
||||||
</scroll-view> |
|
||||||
</view> |
|
||||||
</view> |
|
||||||
</u-popup> |
|
||||||
</view> |
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import Config from '@/core/config' |
|
||||||
import * as newFunApi from '@/api/newFun' |
import * as newFunApi from '@/api/newFun' |
||||||
export default { |
export default { |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
from: { |
list: [] |
||||||
goods_name: '', |
|
||||||
goods_class: '', |
|
||||||
goods_image_id: '', |
|
||||||
details_image_id: '', |
|
||||||
source_image_id: '', |
|
||||||
goods_details: '', |
|
||||||
goods_price: '', |
|
||||||
goods_original_price: '', |
|
||||||
goods_stock: '', |
|
||||||
goods_weight: '', |
|
||||||
delivery_id: '', |
|
||||||
delivery_name: '', |
|
||||||
template_name: '', |
|
||||||
template_id: '', |
|
||||||
}, |
|
||||||
content: '', |
|
||||||
skuchecked: false, |
|
||||||
salesChecked: false, |
|
||||||
goodSourceImageList: [], |
|
||||||
goodsDetailImageList: [], |
|
||||||
goodsImageList: [], |
|
||||||
deliveryTemplate: [{ |
|
||||||
text: '南京市', |
|
||||||
id: 0 |
|
||||||
}, { |
|
||||||
text: '西藏', |
|
||||||
id: 1 |
|
||||||
}], |
|
||||||
deliveryList: [{ |
|
||||||
text: '物流', |
|
||||||
id: 0 |
|
||||||
}, { |
|
||||||
text: '送货上门', |
|
||||||
id: 1 |
|
||||||
}], |
|
||||||
isShow: false, |
|
||||||
value: "", |
|
||||||
tabLIndex: 0, |
|
||||||
tabRIndex: 0, |
|
||||||
action: '', |
|
||||||
header: '', |
|
||||||
}; |
|
||||||
}, |
|
||||||
onReady() { |
|
||||||
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "") |
|
||||||
this.header = { |
|
||||||
'Storeid': uni.getStorageSync('Store').storeInfo.store_id, |
|
||||||
'Access-Token': uni.getStorageSync('AccessToken'), |
|
||||||
'platform': "MP-WEIXIN", |
|
||||||
} |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
// 提交信息 |
|
||||||
async onSubmit() { |
|
||||||
const that = this; |
|
||||||
console.log(that.from) |
|
||||||
return |
|
||||||
if (!that.from.goods_name) { |
|
||||||
return that.$toast('请输入商品名称') |
|
||||||
} |
|
||||||
let { |
|
||||||
status, |
|
||||||
message, |
|
||||||
data |
|
||||||
} = await newFunApi.addTransfer(that.form); |
|
||||||
if (status == 200) { |
|
||||||
uni.showToast({ |
|
||||||
title: "上架成功" |
|
||||||
}) |
|
||||||
setTimeout(function() { |
|
||||||
uni.$emit('refreshData'); |
|
||||||
uni.navigateBack({ |
|
||||||
delta: 1 |
|
||||||
}) |
|
||||||
}, 2000); |
|
||||||
} |
|
||||||
}, |
|
||||||
// 原价 |
|
||||||
keyOriginalPrice(e) { |
|
||||||
if (Number(e.detail.value) == 0 || Number(e.detail.value) < 0) { |
|
||||||
this.from.goods_original_price = '' |
|
||||||
return this.$toast('商品价不能低于0.1元') |
|
||||||
} |
|
||||||
this.from.goods_original_price = this.blurAmount(e.detail.value) |
|
||||||
}, |
|
||||||
// 商品价 |
|
||||||
keyGoodsPrice(e) { |
|
||||||
if (Number(e.detail.value) == 0 || Number(e.detail.value) < 0) { |
|
||||||
this.from.goods_price = '' |
|
||||||
return this.$toast('商品价不能低于0.1元') |
|
||||||
} |
|
||||||
this.from.goods_price = this.blurAmount(e.detail.value) |
|
||||||
}, |
|
||||||
// 价格规则 |
|
||||||
blurAmount(amount) { |
|
||||||
let num = null |
|
||||||
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1') |
|
||||||
const startPoint = /^\./g |
|
||||||
if (startPoint.test(num)) { |
|
||||||
num = amount.replace(startPoint, '0.') |
|
||||||
} |
|
||||||
if (num && !num.includes('.') && num !== '0') { |
|
||||||
num = +num |
|
||||||
} |
|
||||||
const morePoint = /\.+(\d*|\.+)\./g |
|
||||||
if (morePoint.test(num)) { |
|
||||||
num = amount |
|
||||||
.replace(/\.{2,}/g, ".") |
|
||||||
.replace(".", "$#$") |
|
||||||
.replace(/\./g, "") |
|
||||||
.replace("$#$", ".") |
|
||||||
} |
} |
||||||
return num |
|
||||||
}, |
}, |
||||||
// 获取配送方式 |
onLoad() { |
||||||
changeDelivery(e) { |
|
||||||
this.from.delivery_name = this.deliveryList[e.detail.value].text; |
|
||||||
this.from.delivery_id = this.deliveryList[e.detail.value].id; |
|
||||||
}, |
|
||||||
// 运费模板 |
|
||||||
changeDeliveryTemplate(e) { |
|
||||||
this.from.template_name = this.deliveryTemplate[e.detail.value].text; |
|
||||||
this.from.template_id = this.deliveryTemplate[e.detail.value].id; |
|
||||||
}, |
|
||||||
// 一键获取 |
|
||||||
onClickAccess() { |
|
||||||
|
|
||||||
}, |
}, |
||||||
//接受上传返回的数据商品 |
onShow() { |
||||||
goosSuccess(list) { |
this.getRechargeList() |
||||||
if (list.length > 0) { |
|
||||||
const { |
|
||||||
response |
|
||||||
} = list[0]; |
|
||||||
if (response.status == 200) { |
|
||||||
uni.showToast({ |
|
||||||
title: "上传成功" |
|
||||||
}) |
|
||||||
this.from.goods_image_id = this.handleRemove('', list) |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
// 详情 |
|
||||||
detailSuccess(list) { |
|
||||||
if (list.length > 0) { |
|
||||||
const { |
|
||||||
response |
|
||||||
} = list[0]; |
|
||||||
if (response.status == 200) { |
|
||||||
uni.showToast({ |
|
||||||
title: "上传成功" |
|
||||||
}) |
|
||||||
this.from.details_image_id = this.handleRemove('', list) |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
}, |
||||||
// 素材 |
methods: { |
||||||
sourceSuccess(list) { |
onGather() { |
||||||
if (list.length > 0) { |
uni.navigateTo({ |
||||||
const { |
url: '/pages/news/goods/addOneGround' |
||||||
response |
|
||||||
} = list[0]; |
|
||||||
if (response.status == 200) { |
|
||||||
uni.showToast({ |
|
||||||
title: "上传成功" |
|
||||||
}) |
}) |
||||||
this.from.source_image_id = this.handleRemove('', list) |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
goodsRemove: function(file, fileList) { |
|
||||||
this.from.goods_image_id = this.handleRemove(file, fileList) |
|
||||||
}, |
}, |
||||||
detailsRemove: function(file, fileList) { |
getRechargeList() { |
||||||
this.from.details_image_id = this.handleRemove(file, fileList) |
let that = this; |
||||||
}, |
newFunApi.collectorList() |
||||||
sourceRemove: function(file, fileList) { |
.then(res => { |
||||||
this.from.source_image_id = this.handleRemove(file, fileList) |
that.list = res.data.list.data |
||||||
}, |
|
||||||
handleRemove: function(file, fileList) { |
|
||||||
console.log(file, fileList) |
|
||||||
let idList = [] |
|
||||||
fileList.forEach(item => { |
|
||||||
idList.push(item.response.data.fileInfo.file_id) |
|
||||||
}); |
|
||||||
return idList.join(',') |
|
||||||
}, |
|
||||||
openPage(i) { |
|
||||||
if (i == 1) { |
|
||||||
this.isShow = true; |
|
||||||
} else if (i == 2) { |
|
||||||
this.isShow = false; |
|
||||||
uni.navigateTo({ |
|
||||||
url: "/pages/news/goods/classify" |
|
||||||
}) |
}) |
||||||
} |
.finally() |
||||||
}, |
}, |
||||||
tabLItem(i) { |
timestampToYds(timestamp) { |
||||||
this.tabLIndex = i |
//时间戳为10位需*1000,为13位不需乘1000 |
||||||
console.log(this.tabLIndex) |
let times = timestamp.length == 10 ? times * 1000 : timestamp; |
||||||
|
var date = new Date(times); |
||||||
|
let Y = date.getFullYear(), |
||||||
|
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1), |
||||||
|
D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()), |
||||||
|
h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()), |
||||||
|
m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()), |
||||||
|
s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()); |
||||||
|
return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s |
||||||
}, |
}, |
||||||
tabRItem(i) { |
|
||||||
this.tabRIndex = i |
|
||||||
console.log(this.tabRIndex) |
|
||||||
} |
|
||||||
} |
} |
||||||
} |
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||||
.goods { |
.recharge { |
||||||
padding: 0 0 130rpx; |
padding: 25rpx; |
||||||
overflow: hidden; |
|
||||||
margin-top: 12rpx; |
|
||||||
|
|
||||||
&-top { |
|
||||||
background-color: #fff; |
|
||||||
padding: 40rpx 25rpx; |
|
||||||
overflow: hidden; |
overflow: hidden; |
||||||
margin-bottom: 20rpx; |
|
||||||
|
|
||||||
input { |
|
||||||
display: block; |
|
||||||
line-height: 60rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #212121; |
|
||||||
} |
|
||||||
|
|
||||||
.btn { |
|
||||||
width: 158rpx; |
|
||||||
line-height: 50rpx; |
|
||||||
background: #FF5050; |
|
||||||
border-radius: 50rpx; |
|
||||||
text-align: center; |
|
||||||
font-size: 24rpx; |
|
||||||
font-weight: 500; |
|
||||||
color: #FFFFFF; |
|
||||||
float: right; |
|
||||||
|
|
||||||
} |
.recharge_image { |
||||||
|
width: 50rpx; |
||||||
|
height: 50rpx; |
||||||
|
position: fixed; |
||||||
|
right: 30rpx; |
||||||
|
bottom: 60rpx; |
||||||
} |
} |
||||||
|
|
||||||
&-hd { |
&-bd { |
||||||
background-color: #fff; |
border-radius: 12rpx; |
||||||
padding: 0 25rpx 0; |
|
||||||
overflow: hidden; |
overflow: hidden; |
||||||
margin-bottom: 20rpx; |
|
||||||
|
|
||||||
.item { |
.item { |
||||||
padding: 20rpx 30rpx; |
padding: 20rpx 28rpx; |
||||||
line-height: 50rpx; |
// border-top: 1px solid #F3F3F3; |
||||||
|
background-color: #fff; |
||||||
|
margin-bottom: 20rpx; |
||||||
|
border-radius: 16rpx; |
||||||
|
.item_tiem { |
||||||
|
padding: 16rpx 0; |
||||||
|
margin: 0 6rpx; |
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
color: #212121; |
font-weight: 400; |
||||||
display: flex; |
color: #757575; |
||||||
align-items: center; |
text{ |
||||||
justify-content: space-between; |
color: #303030; |
||||||
border-bottom: 1px solid #F7F7F7; |
|
||||||
|
|
||||||
.a { |
|
||||||
text { |
|
||||||
color: #F34A40; |
|
||||||
margin-left: 5rpx; |
|
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
.b { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #212121; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
justify-content: flex-end; |
|
||||||
flex: 1; |
|
||||||
|
|
||||||
input { |
|
||||||
font-size: 28rpx; |
|
||||||
color: #6D6D6D; |
|
||||||
flex: 1; |
|
||||||
line-height: 50rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
text-align: right; |
|
||||||
margin-right: 10rpx; |
|
||||||
} |
} |
||||||
|
|
||||||
.select { |
.item_box { |
||||||
width: 100%; |
|
||||||
display: flex; |
display: flex; |
||||||
align-items: center; |
justify-content: space-between; |
||||||
color: #C7C7C7; |
|
||||||
justify-content: flex-end; |
|
||||||
|
|
||||||
&-on { |
&:first-child { |
||||||
color: #212121; |
border-top-color: #fff; |
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
.items { |
.l { |
||||||
padding: 20rpx 30rpx; |
flex: 1; |
||||||
line-height: 50rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
color: #212121; |
|
||||||
border-bottom: 1px solid #F7F7F7; |
|
||||||
|
|
||||||
.t { |
.a { |
||||||
width: 480rpx; |
padding: 16rpx 0; |
||||||
height: 40rpx; |
margin: 0 6rpx; |
||||||
padding-left: 30rpx; |
|
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
color: #212121; |
font-weight: 400; |
||||||
margin-top: 5rpx; |
color: #757575; |
||||||
|
text{ |
||||||
|
color: #303030; |
||||||
} |
} |
||||||
|
|
||||||
.a { |
|
||||||
flex: 1; |
|
||||||
display: flex; |
|
||||||
align-items: center; |
|
||||||
|
|
||||||
input { |
|
||||||
flex: 1; |
|
||||||
font-size: 26rpx; |
|
||||||
color: #212121; |
|
||||||
line-height: 50rpx; |
|
||||||
margin-left: 20rpx; |
|
||||||
} |
} |
||||||
|
|
||||||
text { |
|
||||||
color: #F34A40; |
|
||||||
margin-left: 5rpx; |
|
||||||
} |
} |
||||||
|
|
||||||
.select { |
.r { |
||||||
flex: 1; |
flex: 1; |
||||||
} |
text-align: right; |
||||||
|
|
||||||
.tip { |
.a { |
||||||
margin-left: 15rpx; |
font-size: 40rpx; |
||||||
font-size: 24rpx; |
|
||||||
font-weight: 500; |
font-weight: 500; |
||||||
color: #9F9F9F; |
color: #414141; |
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
.b { |
.b { |
||||||
padding-top: 20rpx; |
|
||||||
font-size: 24rpx; |
|
||||||
font-weight: 400; |
|
||||||
color: #C7C7C7; |
|
||||||
} |
|
||||||
|
|
||||||
.c { |
|
||||||
padding-top: 20rpx; |
|
||||||
overflow: hidden; |
|
||||||
|
|
||||||
.slot-btn { |
|
||||||
width: 180rpx; |
|
||||||
height: 180rpx; |
|
||||||
background: #F6F6F6; |
|
||||||
border-radius: 10rpx; |
|
||||||
border: 1px solid #C0C0C0; |
|
||||||
text-align: center; |
|
||||||
font-size: 28rpx; |
font-size: 28rpx; |
||||||
font-weight: 500; |
font-weight: 400; |
||||||
color: #6D6D6D; |
color: #A3A3A3; |
||||||
|
|
||||||
image { |
|
||||||
width: 50rpx; |
|
||||||
height: 50rpx; |
|
||||||
margin-top: 30rpx; |
|
||||||
} |
|
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
&-fd { |
|
||||||
width: 100%; |
|
||||||
position: fixed; |
|
||||||
left: 0; |
|
||||||
bottom: 0; |
|
||||||
padding: 30rpx; |
|
||||||
z-index: 99; |
|
||||||
background-color: #fafafa; |
|
||||||
box-sizing: border-box; |
|
||||||
|
|
||||||
.btn { |
|
||||||
width: 630rpx; |
|
||||||
line-height: 88rpx; |
|
||||||
background: #F34A40; |
|
||||||
border-radius: 88rpx; |
|
||||||
text-align: center; |
|
||||||
font-size: 28rpx; |
|
||||||
font-weight: 500; |
|
||||||
color: #FFFFFF; |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
&-classify { |
.empty { |
||||||
width: 100%; |
|
||||||
overflow: hidden; |
|
||||||
|
|
||||||
&-hd { |
|
||||||
padding: 30rpx 60rpx; |
|
||||||
position: relative; |
|
||||||
font-size: 32rpx; |
|
||||||
font-weight: 500; |
|
||||||
color: #303030; |
|
||||||
text-align: center; |
|
||||||
|
|
||||||
.a { |
|
||||||
display: flex; |
display: flex; |
||||||
|
flex-direction: column; |
||||||
align-items: center; |
align-items: center; |
||||||
font-size: 28rpx; |
justify-content: center; |
||||||
font-weight: 500; |
|
||||||
color: #FF624F; |
|
||||||
position: absolute; |
|
||||||
top: 30rpx; |
|
||||||
left: 40rpx; |
|
||||||
z-index: 2; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
&-bd { |
|
||||||
overflow: hidden; |
|
||||||
display: flex; |
|
||||||
align-items: flex-start; |
|
||||||
|
|
||||||
.l { |
|
||||||
width: 210rpx; |
|
||||||
height: 560rpx; |
|
||||||
background-color: #fff; |
|
||||||
|
|
||||||
.item { |
|
||||||
text-overflow: ellipsis; |
|
||||||
overflow: hidden; |
|
||||||
height: 80rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
font-weight: 400; |
|
||||||
color: #303030; |
|
||||||
white-space: nowrap; |
|
||||||
line-height: 80rpx; |
|
||||||
padding-left: 30rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
|
|
||||||
&-on { |
|
||||||
background-color: #fff; |
|
||||||
font-weight: 500; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.m { |
|
||||||
width: 100%; |
width: 100%; |
||||||
text-align: center; |
|
||||||
max-height: 560rpx; |
|
||||||
|
|
||||||
.item { |
|
||||||
text-overflow: ellipsis; |
|
||||||
overflow: hidden; |
|
||||||
height: 70rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
font-weight: 400; |
|
||||||
color: #303030; |
|
||||||
white-space: nowrap; |
|
||||||
line-height: 70rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
|
|
||||||
&-on { |
|
||||||
color: #FF624F; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
.r { |
|
||||||
width: 540rpx; |
|
||||||
height: 560rpx; |
|
||||||
|
|
||||||
.item { |
|
||||||
text-overflow: ellipsis; |
|
||||||
overflow: hidden; |
|
||||||
height: 80rpx; |
|
||||||
font-size: 28rpx; |
|
||||||
font-weight: 400; |
|
||||||
color: #303030; |
|
||||||
white-space: nowrap; |
|
||||||
line-height: 80rpx; |
|
||||||
padding-left: 80rpx; |
|
||||||
box-sizing: border-box; |
|
||||||
|
|
||||||
&-on { |
|
||||||
color: #FF624F; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
::v-deep .u-list-item { |
image { |
||||||
margin: 10rpx 20rpx 10rpx 0 !important; |
width: 114rpx; |
||||||
} |
height: auto; |
||||||
|
margin-top: 200rpx; |
||||||
::v-deep .uni-textarea { |
|
||||||
max-height: 100rpx !important; |
|
||||||
} |
} |
||||||
|
|
||||||
::v-deep .uni-input-placeholder { |
|
||||||
color: #C7C7C7 !important; |
|
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
Loading…
Reference in new issue