[报单模块添加及筛选条件,及权证管理模块没有报单兼容插件]
This commit is contained in:
44
App.vue
44
App.vue
@@ -1,19 +1,26 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
onLaunch() {
|
onLaunch() {
|
||||||
// if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
|
//#ifdef H5
|
||||||
// handleFontSize()
|
if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
|
||||||
// } else {
|
handleFontSize()
|
||||||
// document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
|
} else {
|
||||||
// }
|
document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
|
||||||
// function handleFontSize() {
|
}
|
||||||
// // 设置网页字体为默认大小
|
|
||||||
// WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 })
|
function handleFontSize() {
|
||||||
// // 重写设置网页字体大小的事件
|
// 设置网页字体为默认大小
|
||||||
// WeixinJSBridge.on('menu:setfont', function() {
|
WeixinJSBridge.invoke('setFontSizeCallback', {
|
||||||
// WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 })
|
fontSize: 0
|
||||||
// })
|
})
|
||||||
// }
|
// 重写设置网页字体大小的事件
|
||||||
|
WeixinJSBridge.on('menu:setfont', function() {
|
||||||
|
WeixinJSBridge.invoke('setFontSizeCallback', {
|
||||||
|
fontSize: 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log('App Show');
|
console.log('App Show');
|
||||||
@@ -24,13 +31,14 @@ export default {
|
|||||||
globalData: {
|
globalData: {
|
||||||
mainColor: 'white'
|
mainColor: 'white'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import 'uview-ui/index.scss';
|
@import 'uview-ui/index.scss';
|
||||||
page {
|
|
||||||
|
page {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
-webkit-text-size-adjust: 100% !important;
|
-webkit-text-size-adjust: 100% !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="goods--list">
|
<view class="goods--list">
|
||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
@@ -6,8 +5,18 @@
|
|||||||
<view class="cover">
|
<view class="cover">
|
||||||
<image class="cover--src" :src="item.cover" mode="aspectFill" />
|
<image class="cover--src" :src="item.cover" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
|
<template v-if='notag === ""'>
|
||||||
|
<span class='is_self'
|
||||||
|
v-if='item.specal_tags.is_self'>{{item.specal_tags.is_self}}</span>
|
||||||
|
</template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">{{item.name}}</view>
|
<view class="title">
|
||||||
|
<template v-if='notag === ""'>
|
||||||
|
<span class='is_allow_values'
|
||||||
|
v-if='item.specal_tags.is_allow_values'>{{item.specal_tags.is_allow_values}}</span>
|
||||||
|
</template>
|
||||||
|
{{item.name}}
|
||||||
|
</view>
|
||||||
<view class="content-flex">
|
<view class="content-flex">
|
||||||
<view class="price eb" v-if="priceType === 'EB'">
|
<view class="price eb" v-if="priceType === 'EB'">
|
||||||
{{item.price}}<text>易币</text>
|
{{item.price}}<text>易币</text>
|
||||||
@@ -34,52 +43,73 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name : 'goodsList',
|
name: 'goodsList',
|
||||||
props : {
|
props: {
|
||||||
|
notag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
// 数据列表
|
// 数据列表
|
||||||
list: {
|
list: {
|
||||||
type : Array,
|
type: Array,
|
||||||
default : () => {
|
default: () => {
|
||||||
return new Array
|
return new Array
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 价格类型
|
// 价格类型
|
||||||
priceType: {
|
priceType: {
|
||||||
type : String,
|
type: String,
|
||||||
default : 'EB'
|
default: 'EB'
|
||||||
},
|
},
|
||||||
// 列表空提示
|
// 列表空提示
|
||||||
toast : {
|
toast: {
|
||||||
type : String,
|
type: String,
|
||||||
default : '暂无商品数据 -_-!'
|
default: '暂无商品数据 -_-!'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
goods(e){
|
goods(e) {
|
||||||
this.$emit('on-goods', e)
|
this.$emit('on-goods', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.goods--list{
|
.goods--list {
|
||||||
padding: calc(#{$padding} - 10rpx);
|
padding: calc(#{$padding} - 10rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.goods--item{
|
|
||||||
|
.goods--item {
|
||||||
background: white;
|
background: white;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: calc(50% - 20rpx);
|
width: calc(50% - 20rpx);
|
||||||
margin: 10rpx;
|
margin: 10rpx;
|
||||||
border-radius: $radius/2;
|
border-radius: $radius/2;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.cover{
|
position: relative;
|
||||||
|
|
||||||
|
.is_self {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 20rpx;
|
||||||
|
background-image: linear-gradient(to bottom, #ee4c47, #9e312f);
|
||||||
|
// background-color: #ee4c47;
|
||||||
|
box-shadow: 0 4rpx 10rpx 2rpx rgba($color: #000, $alpha: .3);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 26;
|
||||||
|
padding: 2rpx 20rpx 10rpx 20rpx;
|
||||||
|
border-radius: 0 0 50rpx 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 100%;
|
padding-top: 100%;
|
||||||
.cover--src{
|
|
||||||
|
.cover--src {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -87,34 +117,50 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content{
|
|
||||||
|
.content {
|
||||||
padding: $padding/2;
|
padding: $padding/2;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
@extend .ellipsis;
|
@extend .ellipsis;
|
||||||
|
|
||||||
|
.is_allow_values {
|
||||||
|
color: #fff;
|
||||||
|
background-image: linear-gradient(to left, $main-color, $mian-color-light);
|
||||||
|
padding: 2rpx 14rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.content-flex{
|
}
|
||||||
|
|
||||||
|
.content-flex {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-top: $padding/2;
|
padding-top: $padding/2;
|
||||||
.price{
|
|
||||||
|
.price {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
text{
|
|
||||||
|
text {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
padding-left: $padding/4;
|
padding-left: $padding/4;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sales{
|
|
||||||
|
.sales {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
@@ -126,8 +172,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据空
|
// 数据空
|
||||||
.goods--null{
|
.goods--null {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 200rpx 0;
|
padding: 200rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
<swiper class="banner-swiper" indicator-color="#e93340" indicator-active-color="#f8f8f8"
|
<swiper class="banner-swiper" indicator-color="#e93340" indicator-active-color="#f8f8f8"
|
||||||
indicator-dots autoplay>
|
indicator-dots autoplay>
|
||||||
<swiper-item v-for="(item, index) in banners" :key="index">
|
<swiper-item v-for="(item, index) in banners" :key="index">
|
||||||
<image class="cover" :src="item.cover" mode="aspectFill"></image>
|
<image class="cover" :src="item.cover" mode="aspectFill" @click="swiperClick(item.url)" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -126,8 +126,12 @@
|
|||||||
<view class="goods-push" v-if="JSON.stringify(position) != '{}'">
|
<view class="goods-push" v-if="JSON.stringify(position) != '{}'">
|
||||||
<view class="itme item-mian" @click="onGoods(position.one)">
|
<view class="itme item-mian" @click="onGoods(position.one)">
|
||||||
<image class="cover" :src="position.one.cover" mode="aspectFill"></image>
|
<image class="cover" :src="position.one.cover" mode="aspectFill"></image>
|
||||||
<view class="title">{{position.one.name}}</view>
|
<view class="title">
|
||||||
|
<span class='is_allow_values' v-if='position.one.specal_tags.is_allow_values'>{{position.one.specal_tags.is_allow_values}}</span>
|
||||||
|
{{position.one.name}}
|
||||||
|
</view>
|
||||||
<view class="price"><text>¥</text>{{position.one.original_price}}</view>
|
<view class="price"><text>¥</text>{{position.one.original_price}}</view>
|
||||||
|
<span class='is_self' v-if='position.one.specal_tags.is_self'>{{position.one.specal_tags.is_self}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="itme">
|
<view class="itme">
|
||||||
<view class="itme-list" v-for="(item, index) in position.two" :key="index" @click="onGoods(item)">
|
<view class="itme-list" v-for="(item, index) in position.two" :key="index" @click="onGoods(item)">
|
||||||
@@ -196,6 +200,9 @@
|
|||||||
import goodsList from '@/components/goods-list/goods-list'
|
import goodsList from '@/components/goods-list/goods-list'
|
||||||
import industryList from '@/components/industry-list/industry-list'
|
import industryList from '@/components/industry-list/industry-list'
|
||||||
import userAuth from '@/public/userAuth'
|
import userAuth from '@/public/userAuth'
|
||||||
|
import {
|
||||||
|
config
|
||||||
|
} from '@/apis/index.js'
|
||||||
export default {
|
export default {
|
||||||
comments: {
|
comments: {
|
||||||
goodsList,
|
goodsList,
|
||||||
@@ -236,7 +243,8 @@
|
|||||||
busList: [],
|
busList: [],
|
||||||
busPage: 1,
|
busPage: 1,
|
||||||
// 分页
|
// 分页
|
||||||
pageStatus: ''
|
pageStatus: '',
|
||||||
|
imgUrl: config.apiUrls
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -269,6 +277,14 @@
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 点击轮播图
|
||||||
|
swiperClick(url) {
|
||||||
|
if (url === 'goBaoDanList') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: 'pages/goods/lists?type=baodan'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 领取,更多优惠券
|
// 领取,更多优惠券
|
||||||
onCoupons(type, id, index) {
|
onCoupons(type, id, index) {
|
||||||
let token = this.$store.getters.getToken
|
let token = this.$store.getters.getToken
|
||||||
@@ -341,6 +357,10 @@
|
|||||||
mall().then(res => {
|
mall().then(res => {
|
||||||
this.classify = res.categories.slice(0, 9)
|
this.classify = res.categories.slice(0, 9)
|
||||||
this.banners = res.banners
|
this.banners = res.banners
|
||||||
|
this.banners = [...this.banners, {
|
||||||
|
cover: config.apiUrls + 'images/baodan-banner.png',
|
||||||
|
url: 'goBaoDanList'
|
||||||
|
}]
|
||||||
this.coupons = res.coupons
|
this.coupons = res.coupons
|
||||||
this.position = res.positions
|
this.position = res.positions
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -470,6 +490,8 @@
|
|||||||
margin: $margin/2;
|
margin: $margin/2;
|
||||||
width: calc(20% - #{$margin});
|
width: calc(20% - #{$margin});
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
width: 98rpx;
|
width: 98rpx;
|
||||||
@@ -482,6 +504,15 @@
|
|||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
|
.is_allow_values {
|
||||||
|
color: #fff;
|
||||||
|
background-image: linear-gradient(to left,$main-color,$mian-color-light);
|
||||||
|
padding: 2rpx 14rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -506,12 +537,34 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
border-right: solid 1rpx $border-color;
|
border-right: solid 1rpx $border-color;
|
||||||
@extend .vertical;
|
@extend .vertical;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.is_self {
|
||||||
|
position: absolute;
|
||||||
|
top: 14rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
background-image: linear-gradient(to bottom, #ee4c47, #9e312f);
|
||||||
|
// background-color: #ee4c47;
|
||||||
|
box-shadow: 0 4rpx 10rpx 2rpx rgba($color: #000, $alpha: .3);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 26;
|
||||||
|
padding: 2rpx 20rpx 10rpx 20rpx;
|
||||||
|
border-radius: 0 0 50rpx 50rpx;
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
.is_allow_values {
|
||||||
|
color: #fff;
|
||||||
|
background-image: linear-gradient(to left,$main-color,$mian-color-light);
|
||||||
|
padding: 2rpx 14rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
@@ -527,9 +580,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cover {
|
.cover {
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
width: 220rpx;
|
width: 320rpx;
|
||||||
height: 280rpx;
|
height: 300rpx;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<swiper class="swiper" indicator-dots indicator-active-color="#c82626">
|
<swiper class="swiper" indicator-dots indicator-active-color="#c82626">
|
||||||
<block v-if="goodsObj.pictures.length > 0">
|
<block v-if="goodsObj.pictures.length > 0">
|
||||||
<swiper-item v-for="(item, index) in goodsObj.pictures" :key="index">
|
<swiper-item v-for="(item, index) in goodsObj.pictures" :key="index">
|
||||||
<image class="swiper-item" :src="item" mode="aspectFill"/>
|
<image class="swiper-item" :src="item" mode="aspectFill" />
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="flex-box">
|
<view class="flex-box">
|
||||||
<view class="price"><text>¥</text>{{goodsObj.price.show}}</view>
|
<view class="price"><text>¥</text>{{goodsObj.price.show}}</view>
|
||||||
<view class="sales">累计易货{{goodsObj.sales}}次</view>
|
<view class="sales">累计交易{{goodsObj.sales}}次</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
|
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
|
||||||
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
|
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
|
||||||
@@ -23,9 +23,15 @@
|
|||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon-btn">领券<image class="coupon-btn-img" src="../../static/icons/goods_row.png" mode="aspectFill"></image></view>
|
<view class="coupon-btn">领券<image class="coupon-btn-img" src="../../static/icons/goods_row.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="title">
|
||||||
|
<view class="title-hot" v-if="goodsObj.specal_tags.is_allow_values">{{goodsObj.specal_tags.is_allow_values}}</view>
|
||||||
|
<view class="title-hot" v-if="goodsObj.specal_tags.is_self">{{goodsObj.specal_tags.is_self}}</view>
|
||||||
|
{{goodsObj.name}}
|
||||||
</view>
|
</view>
|
||||||
<view class="title"><view class="title-hot">热卖</view>{{goodsObj.name}}</view>
|
|
||||||
<!-- <view class="sub-title">{{goodsObj.description}}</view> -->
|
<!-- <view class="sub-title">{{goodsObj.description}}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- 商家信息 -->
|
<!-- 商家信息 -->
|
||||||
@@ -34,28 +40,31 @@
|
|||||||
<view class="store-cont">
|
<view class="store-cont">
|
||||||
<view class="store-title">{{goodsObj.shop.name}}</view>
|
<view class="store-title">{{goodsObj.shop.name}}</view>
|
||||||
<view class="rate">
|
<view class="rate">
|
||||||
<uni-rate
|
<uni-rate :readonly="true" color="#ddd" active-color="#c82626" :value="goodsObj.company.star"
|
||||||
:readonly="true"
|
:size="14" />
|
||||||
color="#ddd"
|
</view>
|
||||||
active-color="#c82626"
|
<view class="openbtn" @click="onOpenWechat">进店<image class="openbtn-img"
|
||||||
:value="goodsObj.company.star"
|
src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||||
:size="14"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="openbtn" @click="onOpenWechat">进店<image class="openbtn-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tooSee">
|
<view class="tooSee">
|
||||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodsChain', params: {id: goodsObj.goods_id}})">
|
<view class="tooSee-label"
|
||||||
|
@click="$Router.push({name: 'GoodsChain', params: {id: goodsObj.goods_id}})">
|
||||||
区块链证书
|
区块链证书
|
||||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodsAttestation', params: {id: goodsObj.goods_id}})">
|
<view class="tooSee-label"
|
||||||
|
@click="$Router.push({name: 'GoodsAttestation', params: {id: goodsObj.goods_id}})">
|
||||||
商品认证
|
商品认证
|
||||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodstracedTo', params: {id: goodsObj.goods_id}})">
|
<view class="tooSee-label"
|
||||||
|
@click="$Router.push({name: 'GoodstracedTo', params: {id: goodsObj.goods_id}})">
|
||||||
商品溯源
|
商品溯源
|
||||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -73,8 +82,10 @@
|
|||||||
<label class="title">服务</label>
|
<label class="title">服务</label>
|
||||||
<view class="goods-serve" @click="serveOpne">
|
<view class="goods-serve" @click="serveOpne">
|
||||||
<image class="goods-serve-img" src="../../static/icons/goods_buy.png" mode="aspectFill"></image>
|
<image class="goods-serve-img" src="../../static/icons/goods_buy.png" mode="aspectFill"></image>
|
||||||
<view class="nowrap goods-serve-name"><text v-for="(item, index) in goodsObj.services">{{item.name}}</text></view>
|
<view class="nowrap goods-serve-name"><text
|
||||||
<image class="goods-serve-img" src="../../static/icons/goods_spot.png" mode="aspectFill"></image>
|
v-for="(item, index) in goodsObj.services">{{item.name}}</text></view>
|
||||||
|
<image class="goods-serve-img" src="../../static/icons/goods_spot.png" mode="aspectFill">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -173,34 +184,37 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { goods, managesCoupons } from '@/apis/interfaces/goods'
|
import {
|
||||||
|
goods,
|
||||||
|
managesCoupons
|
||||||
|
} from '@/apis/interfaces/goods'
|
||||||
import userAuth from '@/public/userAuth'
|
import userAuth from '@/public/userAuth'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loding : true,
|
loding: true,
|
||||||
goodsObj : {},
|
goodsObj: {},
|
||||||
identity : '',
|
identity: '',
|
||||||
company : {},
|
company: {},
|
||||||
coupons : {},
|
coupons: {},
|
||||||
couponSee : ""
|
couponSee: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
goods(this.$Route.query.id).then(res=>{
|
goods(this.$Route.query.id).then(res => {
|
||||||
this.loding = false
|
this.loding = false
|
||||||
this.goodsObj = res
|
this.goodsObj = res
|
||||||
this.identity = res.identity.id || ''
|
this.identity = res.identity.id || ''
|
||||||
this.company = res.company
|
this.company = res.company
|
||||||
this.couponSee= res.coupons.slice(0, 3)
|
this.couponSee = res.coupons.slice(0, 3)
|
||||||
this.coupons = res.coupons
|
this.coupons = res.coupons
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
// 提交购买单
|
// 提交购买单
|
||||||
buyGoods(){
|
buyGoods() {
|
||||||
let token = this.$store.getters.getToken
|
let token = this.$store.getters.getToken
|
||||||
if(token == ''){
|
if (token == '') {
|
||||||
let userLogin = new userAuth()
|
let userLogin = new userAuth()
|
||||||
userLogin.Login()
|
userLogin.Login()
|
||||||
return
|
return
|
||||||
@@ -217,11 +231,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 打开微信小程序
|
// 打开微信小程序
|
||||||
onOpenWechat(){
|
onOpenWechat() {
|
||||||
plus.share.getServices(res => {
|
plus.share.getServices(res => {
|
||||||
let sweixin = null;
|
let sweixin = null;
|
||||||
for(let val of res){
|
for (let val of res) {
|
||||||
if(val.id === 'weixin'){
|
if (val.id === 'weixin') {
|
||||||
sweixin = val
|
sweixin = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,29 +244,29 @@
|
|||||||
* index 跳小程序企业首页
|
* index 跳小程序企业首页
|
||||||
* 4 企业id
|
* 4 企业id
|
||||||
**/
|
**/
|
||||||
if(sweixin != null){
|
if (sweixin != null) {
|
||||||
sweixin.launchMiniProgram({
|
sweixin.launchMiniProgram({
|
||||||
id : this.company.original_id,
|
id: this.company.original_id,
|
||||||
path: 'pages/login/guide?scene=index_' + this.company.company_id
|
path: 'pages/login/guide?scene=index_' + this.company.company_id
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '当前环境不支持打开微信小程序',
|
title: '当前环境不支持打开微信小程序',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 领取优惠券
|
// 领取优惠券
|
||||||
drawCoupons(id){
|
drawCoupons(id) {
|
||||||
let token = this.$store.getters.getToken
|
let token = this.$store.getters.getToken
|
||||||
if(token == ''){
|
if (token == '') {
|
||||||
let userLogin = new userAuth()
|
let userLogin = new userAuth()
|
||||||
userLogin.Login()
|
userLogin.Login()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
managesCoupons(id).then(res=>{
|
managesCoupons(id).then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '领取成功',
|
title: '领取成功',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -260,24 +274,24 @@
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon : 'none',
|
icon: 'none',
|
||||||
title: err.message
|
title: err.message
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择优惠券-显示
|
// 选择优惠券-显示
|
||||||
couponsOpne(){
|
couponsOpne() {
|
||||||
this.$refs.couponsPopup.open('bottom')
|
this.$refs.couponsPopup.open('bottom')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择优惠券-隐藏
|
// 选择优惠券-隐藏
|
||||||
couponsClose(){
|
couponsClose() {
|
||||||
this.$refs.couponsPopup.close()
|
this.$refs.couponsPopup.close()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查看保障服务-显示
|
// 查看保障服务-显示
|
||||||
serveOpne(){
|
serveOpne() {
|
||||||
this.$refs.servePopup.open('bottom')
|
this.$refs.servePopup.open('bottom')
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -290,49 +304,56 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content{
|
.content {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 100%;
|
padding-top: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 轮播图
|
// 轮播图
|
||||||
.goods-covers{
|
.goods-covers {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 100%;
|
padding-top: 100%;
|
||||||
.swiper{
|
|
||||||
|
.swiper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.swiper-item{
|
|
||||||
|
.swiper-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商品详情
|
// 商品详情
|
||||||
.goods-content{
|
.goods-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: $radius $radius 0 0;
|
border-radius: $radius $radius 0 0;
|
||||||
padding-bottom: calc((#{$padding} * 2) + (env(safe-area-inset-bottom) / 2) + 90rpx);
|
padding-bottom: calc((#{$padding} * 2) + (env(safe-area-inset-bottom) / 2) + 90rpx);
|
||||||
padding-bottom: calc((#{$padding} * 2) + (constant(safe-area-inset-bottom) / 2) + 90rpx);
|
padding-bottom: calc((#{$padding} * 2) + (constant(safe-area-inset-bottom) / 2) + 90rpx);
|
||||||
|
|
||||||
// 详情
|
// 详情
|
||||||
.header{
|
.header {
|
||||||
padding: 0 $padding $padding;
|
padding: 0 $padding $padding;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
|
|
||||||
.title-hot {
|
.title-hot {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #fee195;
|
background-image: linear-gradient(to left,#fee195,#fee195);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
@@ -341,26 +362,32 @@
|
|||||||
margin: 6rpx 10rpx 0 0;
|
margin: 6rpx 10rpx 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sub-title{
|
|
||||||
|
.sub-title {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
padding-bottom: $padding/3;
|
padding-bottom: $padding/3;
|
||||||
}
|
}
|
||||||
.flex-box{
|
|
||||||
|
.flex-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
.price{
|
|
||||||
|
.price {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
font-size: $title-size + 14;
|
font-size: $title-size + 14;
|
||||||
text{
|
|
||||||
|
text {
|
||||||
font-size: 70%;
|
font-size: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
width: calc(60% - #{$padding});
|
width: calc(60% - #{$padding});
|
||||||
}
|
}
|
||||||
.sales{
|
|
||||||
|
.sales {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
@@ -379,8 +406,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: $margin - 10;
|
margin-bottom: $margin - 10;
|
||||||
|
|
||||||
.coupon-list {
|
.coupon-list {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
|
|
||||||
.coupon-label {
|
.coupon-label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1rpx solid #e998a1;
|
border: 1rpx solid #e998a1;
|
||||||
@@ -391,6 +420,7 @@
|
|||||||
margin-right: $margin - 10;
|
margin-right: $margin - 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupon-btn {
|
.coupon-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: $padding - 20;
|
right: $padding - 20;
|
||||||
@@ -399,6 +429,7 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
||||||
.coupon-btn-img {
|
.coupon-btn-img {
|
||||||
width: 22rpx;
|
width: 22rpx;
|
||||||
height: 22rpx;
|
height: 22rpx;
|
||||||
@@ -411,17 +442,21 @@
|
|||||||
// 新增服务
|
// 新增服务
|
||||||
.goods-serve {
|
.goods-serve {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.goods-serve-img {
|
.goods-serve-img {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-top: 26rpx;
|
margin-top: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-serve-name {
|
.goods-serve-name {
|
||||||
margin: 0 30rpx 0 20rpx;
|
margin: 0 30rpx 0 20rpx;
|
||||||
width: calc(100% - 122rpx);
|
width: calc(100% - 122rpx);
|
||||||
|
|
||||||
text {
|
text {
|
||||||
padding-right: $padding;
|
padding-right: $padding;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
@@ -430,14 +465,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 店铺
|
// 店铺
|
||||||
.store{
|
.store {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0 $margin;
|
margin: 0 $margin;
|
||||||
background: #F8F8F8;
|
background: #F8F8F8;
|
||||||
border-radius: $radius/2;
|
border-radius: $radius/2;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
min-height: 220rpx;
|
min-height: 220rpx;
|
||||||
.logo{
|
|
||||||
|
.logo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $margin;
|
left: $margin;
|
||||||
top: $margin;
|
top: $margin;
|
||||||
@@ -445,6 +481,7 @@
|
|||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
border-radius: $radius/2;
|
border-radius: $radius/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-cont {
|
.store-cont {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -455,6 +492,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooSee {
|
.tooSee {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 150rpx;
|
top: 150rpx;
|
||||||
@@ -462,6 +500,7 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding-left: $padding;
|
padding-left: $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.tooSee-label {
|
.tooSee-label {
|
||||||
background-color: #fd683e;
|
background-color: #fd683e;
|
||||||
border-radius: 8rpx 4rpx 4rpx 6rpx;
|
border-radius: 8rpx 4rpx 4rpx 6rpx;
|
||||||
@@ -473,10 +512,13 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $margin * 2;
|
margin-right: $margin * 2;
|
||||||
position: relative;
|
position: relative;
|
||||||
&::after, &::before{
|
|
||||||
|
&::after,
|
||||||
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
right: -40rpx;
|
right: -40rpx;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -485,6 +527,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 4rpx 8rpx 8rpx 4rpx;
|
border-radius: 4rpx 8rpx 8rpx 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
right: -1rpx;
|
right: -1rpx;
|
||||||
top: 5%;
|
top: 5%;
|
||||||
@@ -493,19 +536,24 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
background-color: #f2d7aa;
|
background-color: #f2d7aa;
|
||||||
color: #362507;
|
color: #362507;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child::after {
|
&:first-child::after {
|
||||||
background-color: #f1d599;
|
background-color: #f1d599;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child::before {
|
&:first-child::before {
|
||||||
border-color: #fae2b9;
|
border-color: #fae2b9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooSee-label-img {
|
.tooSee-label-img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -34rpx;
|
right: -34rpx;
|
||||||
@@ -514,20 +562,23 @@
|
|||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:first-child .tooSee-label-img {
|
&:first-child .tooSee-label-img {
|
||||||
filter: brightness(.2)
|
filter: brightness(.2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.store-title{
|
|
||||||
|
.store-title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rate
|
// rate
|
||||||
.openbtn{
|
.openbtn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: $margin - 10;
|
right: $margin - 10;
|
||||||
top: $margin * 3.5;
|
top: $margin * 3.5;
|
||||||
@@ -538,6 +589,7 @@
|
|||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
margin-top: -30rpx;
|
margin-top: -30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.openbtn-img {
|
.openbtn-img {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
@@ -546,17 +598,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 产品规格
|
// 产品规格
|
||||||
.size{
|
.size {
|
||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
border-top: solid 20rpx #F8F8F8;
|
border-top: solid 20rpx #F8F8F8;
|
||||||
border-bottom: solid 20rpx #F8F8F8;
|
border-bottom: solid 20rpx #F8F8F8;
|
||||||
.size-item{
|
|
||||||
|
.size-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 $padding 0 ($padding + 100);
|
padding: 0 $padding 0 ($padding + 100);
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
&::after{
|
|
||||||
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $margin;
|
left: $margin;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -565,10 +620,12 @@
|
|||||||
height: 1rpx;
|
height: 1rpx;
|
||||||
background-color: $border-color;
|
background-color: $border-color;
|
||||||
}
|
}
|
||||||
&:last-child::after{
|
|
||||||
|
&:last-child::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $margin;
|
left: $margin;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -576,16 +633,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 产品详情
|
// 产品详情
|
||||||
.product{
|
.product {
|
||||||
image{
|
image {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 立即购买
|
// 立即购买
|
||||||
.footer{
|
.footer {
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
background: white;
|
background: white;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -594,7 +653,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.btn[size='default']{
|
|
||||||
|
.btn[size='default'] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
@@ -616,13 +676,16 @@
|
|||||||
border-radius: 40rpx 40rpx 0 0;
|
border-radius: 40rpx 40rpx 0 0;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.coupons-header {
|
.coupons-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: $margin*1.5;
|
margin-bottom: $margin*1.5;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -632,17 +695,20 @@
|
|||||||
height: 38rpx;
|
height: 38rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-cont {
|
.coupons-cont {
|
||||||
.coupons-name {
|
.coupons-name {
|
||||||
color: #616065;
|
color: #616065;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-list {
|
.coupons-list {
|
||||||
border: 2rpx solid #d6b9be;
|
border: 2rpx solid #d6b9be;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
|
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
.coupons-tips {
|
.coupons-tips {
|
||||||
// background-color: #211e17;
|
// background-color: #211e17;
|
||||||
@@ -656,12 +722,14 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.coupons-tips-text {
|
.coupons-tips-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
transform:scale(.85);
|
transform: scale(.85);
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-left {
|
.coupons-left {
|
||||||
background-color: #fdedee;
|
background-color: #fdedee;
|
||||||
color: #e1293f;
|
color: #e1293f;
|
||||||
@@ -669,26 +737,32 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding: $padding - 10 0;
|
padding: $padding - 10 0;
|
||||||
border-right: 2rpx dashed #eccdd4;
|
border-right: 2rpx dashed #eccdd4;
|
||||||
.coupon-left-img{
|
|
||||||
|
.coupon-left-img {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-number {
|
.coupons-number {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.coupons-small {
|
&.coupons-small {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-full {
|
.coupons-full {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-center {
|
.coupons-center {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -697,12 +771,14 @@
|
|||||||
padding: $padding - 10 130rpx 0 220rpx;
|
padding: $padding - 10 130rpx 0 220rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.coupons-time {
|
.coupons-time {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
color: #514c51;
|
color: #514c51;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-right {
|
.coupons-right {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
@@ -714,6 +790,7 @@
|
|||||||
border-radius: 80rpx;
|
border-radius: 80rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 52rpx;
|
line-height: 52rpx;
|
||||||
|
|
||||||
&.coupons-right-active {
|
&.coupons-right-active {
|
||||||
background-color: #adadad;
|
background-color: #adadad;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
@@ -721,6 +798,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.coupons-true {
|
.coupons-true {
|
||||||
background-image: linear-gradient(to right, #e1293f, #fd275d);
|
background-image: linear-gradient(to right, #e1293f, #fd275d);
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
@@ -735,10 +813,12 @@
|
|||||||
.serve-label {
|
.serve-label {
|
||||||
margin-top: $margin + 10;
|
margin-top: $margin + 10;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.serve-label-name {
|
.serve-label-name {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-bottom: $margin - 10;
|
margin-bottom: $margin - 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.serve-label-text {
|
.serve-label-text {
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="Goods-LISTS">
|
<view class="Goods-LISTS">
|
||||||
|
<!-- <image :src="`${config.apiUrls}images/baodan-banner.png`" mode="widthFix" /> -->
|
||||||
<view class="tabs">
|
<view class="tabs">
|
||||||
<view class="tabs-item" :class="{'show': tabIndex == 0}" @click="onTabs" data-index="0">最新</view>
|
<view class="tabs-item" :class="{'show': tabIndex == 0}" @click="onTabs" data-index="0">最新</view>
|
||||||
<view class="tabs-item" :class="{'show': tabIndex == 1}" @click="onTabs" data-index="1">
|
<view class="tabs-item" :class="{'show': tabIndex == 1}" @click="onTabs" data-index="1">
|
||||||
@@ -19,6 +20,9 @@
|
|||||||
list
|
list
|
||||||
} from '@/apis/interfaces/goods'
|
} from '@/apis/interfaces/goods'
|
||||||
import goodsList from '@/components/goods-list/goods-list'
|
import goodsList from '@/components/goods-list/goods-list'
|
||||||
|
import {
|
||||||
|
config
|
||||||
|
} from '@/apis/index.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'Goods-LISTS',
|
name: 'Goods-LISTS',
|
||||||
data() {
|
data() {
|
||||||
@@ -28,6 +32,7 @@
|
|||||||
goods: [],
|
goods: [],
|
||||||
page: 1,
|
page: 1,
|
||||||
has_more: true,
|
has_more: true,
|
||||||
|
isBaoDan: false, // 是否是报单,默认有id不是报单,无id是报单
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -44,6 +49,14 @@
|
|||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
if (this.$Route.query.type === 'baodan') {
|
||||||
|
this.isBaoDan = true
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '报单商品'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onTabs(e) {
|
onTabs(e) {
|
||||||
let index = e.target.dataset.index
|
let index = e.target.dataset.index
|
||||||
@@ -58,7 +71,7 @@
|
|||||||
|
|
||||||
onGoods(e) {
|
onGoods(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/goods/details?id='+e.goods_id
|
url: '/pages/goods/details?id=' + e.goods_id
|
||||||
})
|
})
|
||||||
// this.$Router.push({
|
// this.$Router.push({
|
||||||
// name: 'goodsDetails',
|
// name: 'goodsDetails',
|
||||||
@@ -72,8 +85,11 @@
|
|||||||
order_by: this.tabIndex == 1 ? this.marketType : '',
|
order_by: this.tabIndex == 1 ? this.marketType : '',
|
||||||
page: this.page
|
page: this.page
|
||||||
}
|
}
|
||||||
if (this.$Route.query.type) {
|
if (this.$Route.query.type === 'id') {
|
||||||
data.category_id = this.$Route.query.id
|
data.category_id = this.$Route.query.id
|
||||||
|
} else if (this.$Route.query.type === 'baodan') {
|
||||||
|
// 报单加个条件筛选
|
||||||
|
data.is_allow_values = 1
|
||||||
} else {
|
} else {
|
||||||
data.category_cid = this.$Route.query.id
|
data.category_cid = this.$Route.query.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<view class="item" :class="{'show': status == '3'}" @click="onTabs('3')">已驳回</view>
|
<view class="item" :class="{'show': status == '3'}" @click="onTabs('3')">已驳回</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 优选商品 -->
|
<!-- 优选商品 -->
|
||||||
<goodsList :list="goods" priceType="CNY" :status='status' toast="暂无产品权证">
|
<goodsList :list="goods" priceType="CNY" :status='status' toast="暂无产品权证" notag='has'>
|
||||||
<template v-slot:statistics="goods">
|
<template v-slot:statistics="goods">
|
||||||
<view>库存{{goods.value.stock}}</view>
|
<view>库存{{goods.value.stock}}</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user