Compare commits
2 Commits
410a7850e6
...
lxb
| Author | SHA1 | Date | |
|---|---|---|---|
|
a3f2a6d57c
|
|||
|
|
3793c56cdc |
@@ -259,25 +259,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getStoreInfo({id}){
|
getStoreInfo({id}){
|
||||||
return vm.$u.post('Store/getStoreInfo',{id})
|
return vm.$u.post('Store/getStoreInfo',{id})
|
||||||
},
|
}
|
||||||
// 评论标签+数量
|
|
||||||
getEvaluateSpec({ id }) {
|
|
||||||
return vm.$u.post('Specialci/getEvaluateSpec', {
|
|
||||||
goods_id: id,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取商品评论
|
|
||||||
getAllEvalue({ goods_id, page, type }) {
|
|
||||||
return vm.$u.post('Specialci/getAllEvalue', {
|
|
||||||
goods_id: goods_id,
|
|
||||||
page: page,
|
|
||||||
type: type,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 搜索发现列表
|
|
||||||
searchwordlist() {
|
|
||||||
return vm.$u.post('ShopSearch/searchwordlist')
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,115 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="comment-item">
|
|
||||||
<view class="user">
|
|
||||||
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
|
|
||||||
<text class="name">{{ content.geval_frommembername }}</text>
|
|
||||||
<u-rate v-if="reply" :disabled='true' count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="text">{{ content.geval_content }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="image-container">
|
|
||||||
<image :src="src" v-for="(src, index) in content.geval_image" :key="index"></image>
|
|
||||||
</view>
|
|
||||||
<view class="reply" v-if="reply && content.geval_explain">
|
|
||||||
<view class="title">掌柜回复:</view>
|
|
||||||
<view class="content u-line-4">{{ content.geval_explain }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="time" v-if="reply">
|
|
||||||
<image src="/static/image/common/20.png"></image>
|
|
||||||
<view class="value">{{ content.geval_addtime }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
/*
|
|
||||||
* @description 显示评价
|
|
||||||
* @property {Boolean} reply 是否显示回复/时间/评分
|
|
||||||
**/
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
count: 5,
|
|
||||||
rate: 2,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
content: Object,
|
|
||||||
reply: Boolean,
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.comment-item {
|
|
||||||
background-color: #ffffff;
|
|
||||||
.user {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
.name {
|
|
||||||
margin: 0 20rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: rgba(153,153,153,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
.text {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
line-height: 40rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
> image {
|
|
||||||
width: 210rpx;
|
|
||||||
height: 210rpx;
|
|
||||||
border-radius: 10px;
|
|
||||||
&:not(:nth-child(3n)) {
|
|
||||||
margin-right: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.image-container {
|
|
||||||
margin: 20rpx 0;
|
|
||||||
> image {
|
|
||||||
width: 210rpx;
|
|
||||||
height: 210rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
&:not(:nth-child(3n)) {
|
|
||||||
margin-right: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.reply {
|
|
||||||
padding: 30rpx;
|
|
||||||
background: rgba(240,238,238,1);
|
|
||||||
border-radius: 10rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(102,102,102,1);
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
.title {
|
|
||||||
margin-bottom: 16rpx;
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
line-height: 36rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.time {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> image {
|
|
||||||
width: 28rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
margin-right: 12rpx;
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(153,153,153,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -12,11 +12,9 @@
|
|||||||
<image :src="goods.goods_image"></image>
|
<image :src="goods.goods_image"></image>
|
||||||
<view class="goods-text">
|
<view class="goods-text">
|
||||||
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
||||||
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
|
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40">XL;红色条纹XL;红色条纹XL;红色条纹</view>
|
||||||
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
|
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">距离结束:23:23:38</view>
|
||||||
</view>
|
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
|
||||||
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间:{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view>
|
|
||||||
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥{{ goods.goods_price }},实付款¥{{ goods.goods_pay_price }}</view>
|
|
||||||
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>{{ order.add_time | date }}</view>
|
<view>{{ order.add_time | date }}</view>
|
||||||
@@ -29,14 +27,13 @@
|
|||||||
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
|
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
|
||||||
<view class="payment" v-if="order.order_state == 10" @click="payNow(order.pay_sn, order.order_amount)">立即支付</view>
|
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
||||||
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
||||||
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import common from '@/static/js/common.js';
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -49,14 +46,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.viewState();
|
this.viewState();
|
||||||
},
|
},
|
||||||
filters: {
|
|
||||||
// timeLine(timestamp) {
|
|
||||||
// const timestamp = 0.5*60*60*1000;
|
|
||||||
// const now = new Date().getTime();
|
|
||||||
// let line = now - timestamp * 1000;
|
|
||||||
// return common.getLineTime({ timestamp: line });
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
viewState() {
|
viewState() {
|
||||||
let state;
|
let state;
|
||||||
@@ -103,12 +92,6 @@ export default {
|
|||||||
oid: this.order.order_id,
|
oid: this.order.order_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
payNow(pay_sn, order_amount) {
|
|
||||||
this.$u.route('/pageC/cart/cashier', {
|
|
||||||
pay_sn: pay_sn,
|
|
||||||
price: order_amount,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -131,7 +114,6 @@ export default {
|
|||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
background-color: aquamarine;
|
|
||||||
}
|
}
|
||||||
.store-name {
|
.store-name {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
||||||
<!-- 最多显示3个 -->
|
<!-- 最多显示3个 -->
|
||||||
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
||||||
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length" style="margin: 0 auto;"></u-empty>
|
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length"></u-empty>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,41 +23,17 @@ export default {
|
|||||||
components:{
|
components:{
|
||||||
sitem
|
sitem
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
groupList: Array,
|
||||||
|
classifyList: Array,
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
current: -1,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
groupList: [], // 拼团商品
|
|
||||||
classifyList: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
current(value) {
|
|
||||||
this.getPinTuanList(this.classifyList[value].gc_id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getGoodsClass();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 获取优惠券拼团分类
|
|
||||||
getGoodsClass() {
|
|
||||||
this.$u.api.getGoodsClass().then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.classifyList = res.data;
|
|
||||||
this.current = 0;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 拼团列表
|
|
||||||
getPinTuanList(id) {
|
|
||||||
this.$u.api.getPinTuanList({
|
|
||||||
page: 0,
|
|
||||||
gc_id: id,
|
|
||||||
}).then(res => {
|
|
||||||
this.groupList = res.data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
},
|
},
|
||||||
@@ -76,9 +52,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.group{
|
.group{
|
||||||
background-color: #ffffff;
|
|
||||||
.top{
|
.top{
|
||||||
padding: 0 30rpx;
|
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -93,11 +67,18 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// .label{
|
||||||
|
// display: flex;
|
||||||
|
// font-size: 24rpx;
|
||||||
|
// color: #999;
|
||||||
|
// >text{
|
||||||
|
// margin-right: 34rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
.list{
|
.list{
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
margin-top: 21rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -16,26 +16,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
// this.$u.api.getPinTuanDetails({
|
this.$u.api.getPinTuanDetails({
|
||||||
// pintuan_id: this.info.pintuan_id,
|
pintuan_id: this.info.pintuan_id,
|
||||||
// }).then(res => {
|
}).then(res => {
|
||||||
// if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data.data,
|
goods: res.data.data,
|
||||||
// type: 2,
|
type: 2,
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGoodsId', this.info.pintuan_id);
|
this.$store.commit('setGoodsId', this.info.pintuan_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.info.pintuan_id,
|
|
||||||
type: 2,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="top">商品推荐</view>
|
<view class="top">
|
||||||
|
商品推荐
|
||||||
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60" ></u-tabs-swiper>
|
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60" ></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
||||||
|
<!-- <scroll-view scroll-y style="height: 800rpx;width: 100%;"> -->
|
||||||
<view class="goods-item">
|
<view class="goods-item">
|
||||||
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
|
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!goodsList.length"></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" v-if="!goodsList.length"></u-empty>
|
||||||
|
<!-- </scroll-view> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20"></u-loadmore>
|
||||||
<!-- <loadmore ref="loadmore" @callback="getGoodsRecommend" bgColor="#FFF" :page="page"></loadmore> -->
|
<!-- <loadmore ref="loadmore" @callback="getGoodsRecommend" bgColor="#FFF" :page="page"></loadmore> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -57,7 +61,7 @@ export default {
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
reload: false,
|
reload: false,
|
||||||
}).then(length => {
|
}).then(length => {
|
||||||
// console.log(length);
|
console.log(length);
|
||||||
if(length == 0) {
|
if(length == 0) {
|
||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
@@ -120,10 +124,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.list{
|
.list{
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 30rpx {
|
|
||||||
top: 0;
|
|
||||||
};
|
|
||||||
.top{
|
.top{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
@@ -131,6 +131,22 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
// .label{
|
||||||
|
// display: flex;
|
||||||
|
// color: #999;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
// >text{
|
||||||
|
// margin-right: 34rpx;
|
||||||
|
// margin-bottom: 10rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .item{
|
||||||
|
// display: flex;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// margin-top: 20rpx;
|
||||||
|
|
||||||
|
// }
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -16,25 +16,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
// this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
||||||
// if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data,
|
goods: res.data,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGoodsId', this.info.goods_id);
|
this.$store.commit('setGoodsId', this.info.goods_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// // console.log(this.goodsInfo.mobile_body);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.info.goods_id,
|
// console.log(this.goodsInfo.mobile_body);
|
||||||
type: 1,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default {
|
|||||||
props: ['recommendData', 'type'],
|
props: ['recommendData', 'type'],
|
||||||
created() {
|
created() {
|
||||||
this.info = this.recommendData;
|
this.info = this.recommendData;
|
||||||
// console.log(this.recommendData);
|
console.log(this.recommendData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,30 +35,23 @@ export default {
|
|||||||
props: ['recommendData', 'type'],
|
props: ['recommendData', 'type'],
|
||||||
created() {
|
created() {
|
||||||
this.info = this.recommendData;
|
this.info = this.recommendData;
|
||||||
// console.log(this.recommendData);
|
console.log(this.recommendData);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
// this.$u.api.getPinTuanDetails({
|
this.$u.api.getPinTuanDetails({
|
||||||
// pintuan_id: this.recommendData.pintuan_id
|
pintuan_id: this.recommendData.pintuan_id
|
||||||
// }).then(res => {
|
}).then(res => {
|
||||||
// if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data.data,
|
goods: res.data.data,
|
||||||
// type: 2,
|
type: 2,
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGoodsId', this.recommendData.pintuan_id);
|
this.$store.commit('setGoodsId', this.recommendData.pintuan_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.recommendData.pintuan_id,
|
|
||||||
type: 2,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -67,9 +60,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.recommend{
|
.recommend{
|
||||||
margin-bottom: 20rpx;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
.top{
|
.top{
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -85,7 +75,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.connect{
|
.connect{
|
||||||
padding: 30rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.user {
|
.user {
|
||||||
|
|||||||
@@ -45,9 +45,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.seckill{
|
.seckill{
|
||||||
background-color: #fff;
|
|
||||||
padding: 30rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
.top{
|
.top{
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -26,27 +26,20 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
// console.log(this.item.groupbuy_id);
|
// console.log(this.item.groupbuy_id);
|
||||||
// this.$u.api.getSpikeInfo({
|
this.$u.api.getSpikeInfo({
|
||||||
// groupbuy_id: this.item.groupbuy_id
|
groupbuy_id: this.item.groupbuy_id
|
||||||
// }).then(res => {
|
}).then(res => {
|
||||||
// if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data.goodsInfo,
|
goods: res.data.goodsInfo,
|
||||||
// type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
||||||
// this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.item.groupbuy_id,
|
|
||||||
type: 3,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,51 +42,37 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
// console.log(this.item.groupbuy_id);
|
// console.log(this.item.groupbuy_id);
|
||||||
// this.$u.api.getSpikeInfo({
|
this.$u.api.getSpikeInfo({
|
||||||
// groupbuy_id: this.item.groupbuy_id
|
groupbuy_id: this.item.groupbuy_id
|
||||||
// }).then(res => {
|
}).then(res => {
|
||||||
// if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data.goodsInfo,
|
goods: res.data.goodsInfo,
|
||||||
// type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
||||||
// this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.item.groupbuy_id,
|
|
||||||
type: 3,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
// this.$u.api.getPinTuanDetails({
|
this.$u.api.getPinTuanDetails({
|
||||||
// pintuan_id: this.item.pintuan_id
|
pintuan_id: this.item.pintuan_id
|
||||||
// }).then(res => {
|
}).then(res => {
|
||||||
// if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// const goods = {
|
const goods = {
|
||||||
// goods: res.data.data,
|
goods: res.data.data,
|
||||||
// type: 2,
|
type: 2,
|
||||||
// }
|
}
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
this.$store.commit('setGoodsDetails', goods);
|
||||||
// this.$store.commit('setGoodsId', this.item.pintuan_id);
|
this.$store.commit('setGoodsId', this.item.pintuan_id);
|
||||||
// this.$u.route({
|
|
||||||
// url: 'pageB/sdetails/index',
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
})
|
||||||
id: this.item.pintuan_id,
|
|
||||||
type: 2,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
num = this.couponList.length
|
num = this.couponList.length
|
||||||
? this.couponList.length > 4 ? 4 : this.couponList.length
|
? this.couponList.length > 4 ? 4 : this.couponList.length
|
||||||
: 1
|
: 1
|
||||||
this.swiperHeight = (97 + 10) * num + 'px';
|
this.swiperHeight = (97 + 10) * num - 10 + 'px';
|
||||||
},
|
},
|
||||||
toCouponPage() {
|
toCouponPage() {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
@@ -93,11 +93,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.coupon-swiper {
|
.coupon-swiper {
|
||||||
background-color: #ffffff;
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
.top {
|
.top {
|
||||||
padding: 0 30rpx;
|
padding-top: 30rpx;
|
||||||
height: 90rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -112,9 +109,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.swiper-coupon-item {
|
.swiper-coupon-item {
|
||||||
padding: 0 30rpx;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
// padding: 30rpx {
|
||||||
|
// top: 0;
|
||||||
|
// };
|
||||||
.coupon-item {
|
.coupon-item {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,100 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="comment">
|
|
||||||
<view class="label-list">
|
|
||||||
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + '}' }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="comment-container">
|
|
||||||
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
|
||||||
<comment :reply="true" :content="item"></comment>
|
|
||||||
</view>
|
|
||||||
<u-empty text="暂无评论" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import comment from "@/components/comment/index";
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id: Number,
|
|
||||||
current: '全部',
|
|
||||||
page: 0,
|
|
||||||
evalueList: [],
|
|
||||||
evaluateSpec: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
|
||||||
comment
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
this.id = option.id;
|
|
||||||
// this.getAllEvalue();
|
|
||||||
this.getEvaluateSpec();
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
current(value) {
|
|
||||||
this.getAllEvalue(value);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getEvaluateSpec() {
|
|
||||||
this.$u.api.getEvaluateSpec({
|
|
||||||
id: this.id
|
|
||||||
}).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.evaluateSpec = res.data;
|
|
||||||
this.getAllEvalue();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getAllEvalue(type) {
|
|
||||||
let params = {
|
|
||||||
goods_id: this.id,
|
|
||||||
page: this.page,
|
|
||||||
}
|
|
||||||
if(type) Object.assign(params, { type: type });
|
|
||||||
this.$u.api.getAllEvalue(params).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.evalueList = res.data;
|
|
||||||
} else {
|
|
||||||
this.evalueList = [];
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.comment {
|
|
||||||
height: calc(100vh - var(--window-top));
|
|
||||||
background-color: #EEEBEE;
|
|
||||||
padding-bottom: 30rpx;
|
|
||||||
.label-list {
|
|
||||||
padding: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
margin-bottom: 14rpx;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
> view {
|
|
||||||
box-sizing: content-box;
|
|
||||||
padding: 16rpx 20rpx;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
margin: 0 20rpx 20rpx 0;
|
|
||||||
background: rgba(236,236,236,1);
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: rgba(153,153,153,1);
|
|
||||||
}
|
|
||||||
.active {
|
|
||||||
background: rgba(255,120,15,1);
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.comment-container {
|
|
||||||
.itme {
|
|
||||||
padding: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<!-- 普通商品 tool -->
|
<view class="tloos">
|
||||||
<view class="tloos" v-if="type == 1">
|
|
||||||
<view class="navs">
|
<view class="navs">
|
||||||
<image src="/static/image/common/18.png"></image>
|
<image src="/static/image/common/18.png"></image>
|
||||||
店铺
|
店铺
|
||||||
@@ -14,28 +13,6 @@
|
|||||||
<view class="button" style="background:rgba(253,211,96,1);" @click="buy(2)">加入购物车</view>
|
<view class="button" style="background:rgba(253,211,96,1);" @click="buy(2)">加入购物车</view>
|
||||||
<view class="button" style="background:rgba(255,120,15,1);" @click="buy(1)">立即购买</view>
|
<view class="button" style="background:rgba(255,120,15,1);" @click="buy(1)">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 拼团 tool -->
|
|
||||||
<view class="group-tool" v-if="type==2">
|
|
||||||
<view class="launch" @click="settlementOrder">发起拼团</view>
|
|
||||||
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
|
||||||
</view>
|
|
||||||
<!-- 秒杀 tool -->
|
|
||||||
<view class="spike-tool" v-if="type==3">
|
|
||||||
<view class="left">
|
|
||||||
<view>
|
|
||||||
<image src="/static/image/common/18.png"></image>
|
|
||||||
<text>店铺</text>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<image src="/static/image/common/19.png"></image>
|
|
||||||
<text>客服</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="btn" v-if="groupbuyInfo.groupbuy_state == 20 && groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity" @click="spikeGoods">立即秒杀</view>
|
|
||||||
<view class="btn" :class="{'cannot': groupbuyInfo.groupbuy_state == 32 || groupbuyInfo.inventory == groupbuyInfo.groupbuy_buy_quantity}" v-else>
|
|
||||||
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<u-popup v-model="show" mode="bottom">
|
<u-popup v-model="show" mode="bottom">
|
||||||
<scroll-view scroll-y="true" class="popup">
|
<scroll-view scroll-y="true" class="popup">
|
||||||
<view>
|
<view>
|
||||||
@@ -63,9 +40,9 @@
|
|||||||
import guige from "./guige"
|
import guige from "./guige"
|
||||||
export default {
|
export default {
|
||||||
name:"tloos",
|
name:"tloos",
|
||||||
props: ['id', 'info', 'type'],
|
props: ['id', 'info'],
|
||||||
components:{
|
components:{
|
||||||
guige,
|
guige
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
@@ -130,69 +107,6 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.group-tool {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 98rpx;
|
|
||||||
display: flex;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: rgba(255,255,255,1);
|
|
||||||
z-index: 99;
|
|
||||||
.launch {
|
|
||||||
flex: 1;
|
|
||||||
background: rgba(253,211,96,1);
|
|
||||||
line-height: 98rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.involvement {
|
|
||||||
flex: 1;
|
|
||||||
background: rgba(255,120,15,1);
|
|
||||||
line-height: 98rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.spike-tool {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 98rpx;
|
|
||||||
display: flex;
|
|
||||||
z-index: 99;
|
|
||||||
.left {
|
|
||||||
width: 190rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
> view {
|
|
||||||
text-align: center;
|
|
||||||
> image {
|
|
||||||
width: 35rpx;
|
|
||||||
height: 35rpx;
|
|
||||||
margin-bottom: 15rpx;
|
|
||||||
}
|
|
||||||
> text {
|
|
||||||
display: block;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(102,102,102,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
flex: 1;
|
|
||||||
height: 98rpx;
|
|
||||||
line-height: 98rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: rgba(255,255,255,1);
|
|
||||||
background: rgba(255,120,15,1);
|
|
||||||
}
|
|
||||||
.cannot {
|
|
||||||
background: rgba(221,221,221,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.tloos{
|
.tloos{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -25,20 +25,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="hr"></view>
|
<view class="hr"></view>
|
||||||
<!-- <navs :value="领券"></navs> -->
|
<!-- <navs :value="领券"></navs> -->
|
||||||
<navs :value="'产品规格'" @click.native="showSpec=true"></navs>
|
<navs :value="'产品规格'"></navs>
|
||||||
<!-- <navs :value="'产品颜色'"></navs> -->
|
<!-- <navs :value="'产品颜色'"></navs> -->
|
||||||
<!-- <navs :value="'选择尺码'"></navs> -->
|
<!-- <navs :value="'选择尺码'"></navs> -->
|
||||||
<view class="comment">
|
<!-- <navs v-for="(value, index) in goodsInfo.spec_name" :value="value" :key="index"></navs> -->
|
||||||
<view class="title">
|
|
||||||
<view class="left">商品评价({{ evaluate.evaluate_num }})</view>
|
|
||||||
<view class="right" @click="viewComment">
|
|
||||||
<text>查看全部</text>
|
|
||||||
<image src="/static/image/common/1.png"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
|
|
||||||
<view class="comment-none">暂无评价</view>
|
|
||||||
</view>
|
|
||||||
<view class="hr"></view>
|
<view class="hr"></view>
|
||||||
<view class="group-user" v-if="groupUser.length">
|
<view class="group-user" v-if="groupUser.length">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
@@ -72,7 +62,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup v-model="showGroupUser" mode="center" z-index="10078">
|
<u-popup v-model="showGroupUser" mode="center">
|
||||||
<view class="launch-container">
|
<view class="launch-container">
|
||||||
<view class="title u-line-1">正在拼团</view>
|
<view class="title u-line-1">正在拼团</view>
|
||||||
<scroll-view class="launch-view">
|
<scroll-view class="launch-view">
|
||||||
@@ -81,7 +71,6 @@
|
|||||||
<image class="avatar" :src="user[0].member_avatar"></image>
|
<image class="avatar" :src="user[0].member_avatar"></image>
|
||||||
<view class="name u-line-1">{{ user[0].member_nickname }}</view>
|
<view class="name u-line-1">{{ user[0].member_nickname }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pintuan-none" v-if="!groupUser.length">暂无拼团</view>
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
|
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
|
||||||
@@ -107,48 +96,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="rich">
|
<view class="rich">
|
||||||
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
||||||
</view>
|
|
||||||
<!-- 选择规格数量 -->
|
|
||||||
<u-popup v-model="showSpec" mode="bottom">
|
|
||||||
<scroll-view scroll-y="true" class="spec-popup">
|
|
||||||
<view>
|
|
||||||
<view class="head">
|
|
||||||
<image class="image" :src="goodsInfo.goods_image"></image>
|
|
||||||
<view class="info">
|
|
||||||
<text class="u-line-2">{{goodsInfo.goods_name}}</text>
|
|
||||||
<text>¥{{goodsInfo.goods_price}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
|
||||||
<view class="num">
|
|
||||||
<text>购买数量</text>
|
|
||||||
<u-number-box v-model="goodsNumber" @change="valChange"></u-number-box>
|
|
||||||
</view>
|
|
||||||
<view style="height:100rpx"></view>
|
|
||||||
</view>
|
|
||||||
<u-toast ref="uToast" />
|
|
||||||
</scroll-view>
|
|
||||||
</u-popup>
|
|
||||||
<!-- 普通商品 tool -->
|
|
||||||
<view class="tloos" v-if="type == 1">
|
|
||||||
<view class="navs">
|
|
||||||
<image src="/static/image/common/18.png"></image>
|
|
||||||
店铺
|
|
||||||
</view>
|
|
||||||
<view class="navs" style="margin-right:30rpx">
|
|
||||||
<image src="/static/image/common/19.png"></image>
|
|
||||||
客服
|
|
||||||
</view>
|
|
||||||
<view class="button" style="background:rgba(253,211,96,0.6);" v-if="goodsInfo.goods_try == 1">试穿试送</view>
|
|
||||||
<view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
|
|
||||||
<view class="button" style="background:rgba(255,120,15,1);" @click="settlementOrder">立即购买</view>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 拼团 tool -->
|
<!-- 拼团 tool -->
|
||||||
<view class="group-tool" v-if="type==2">
|
<view class="group-tool" v-if="type==2">
|
||||||
<view class="launch" @click="settlementOrder">发起拼团</view>
|
<view class="launch" @click="settlementOrder">发起拼团</view>
|
||||||
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 秒杀 tool -->
|
<!-- 秒杀 -->
|
||||||
<view class="spike-tool" v-if="type==3">
|
<view class="spike-tool" v-if="type==3">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view>
|
<view>
|
||||||
@@ -165,111 +119,97 @@
|
|||||||
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> -->
|
<!-- 普通商品 tool -->
|
||||||
|
<tloos @buy="buy" @xuanze="xuanze" :id="goodsInfo.goods_commonid" :info="goodsInfo" v-if="type==1"></tloos>
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import comment from "@/components/comment/index";
|
/*
|
||||||
import navs from "../components/sdetails/navs";
|
* 详情是请求完存在store的,在这里从store取值
|
||||||
import guige from "../components/sdetails/guige"
|
**/
|
||||||
import tloos from "../components/sdetails/tloos";
|
import navs from "../components/sdetails/navs"
|
||||||
|
import tloos from "../components/sdetails/tloos"
|
||||||
export default {
|
export default {
|
||||||
name:"sdetails",
|
name:"sdetails",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [], // 轮播图列表
|
list: [], // 轮播图列表
|
||||||
goodsInfo: {}, // 商品信息
|
goodsInfo: {},
|
||||||
glist: [], // 规格列表
|
info:{},
|
||||||
id: 0, // 商品id/秒杀id/拼团 id
|
glist:[],
|
||||||
|
id:0, // 商品id
|
||||||
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
groupUser: [], // 拼团用户
|
groupUser: [], // 拼团用户
|
||||||
user_suc: [], // 拼团成功用户
|
user_suc: [], // 拼团成功用户
|
||||||
|
avatarWidth: '',
|
||||||
|
pintuan_id: '', // 拼团id
|
||||||
showGroupUser: false, // 拼团
|
showGroupUser: false, // 拼团
|
||||||
showInvolvementUser: false, // 参团
|
showInvolvementUser: false, // 参团
|
||||||
involvemenGroupInfo: [], // 参团的人
|
involvemenGroupInfo: [], // 参团的人
|
||||||
groupbuyInfo: {}, // 秒杀详情
|
groupbuyInfo: {}, // 秒杀详情
|
||||||
spikeTime: '',
|
spikeTime: '',
|
||||||
timer: '', // 秒杀时间定时器
|
timer: '', // 时间定时器
|
||||||
spec_id: '', // 规格 id, 下单用的
|
|
||||||
evaluate: {}, // 评价内容
|
|
||||||
showSpec: false, // 是否显示选择规格
|
|
||||||
goodsNumber: 1,
|
|
||||||
sel: "", // 拼接的规格
|
|
||||||
quanxuan: false, // 规格是否选择
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
comment,
|
|
||||||
navs,
|
navs,
|
||||||
tloos,
|
tloos
|
||||||
guige,
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
sel(value){
|
|
||||||
this.xuanze(value);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onLoad(option) {
|
|
||||||
// this.init();
|
|
||||||
// console.log(option);
|
|
||||||
this.type = Number(option.type);
|
|
||||||
this.id = option.id;
|
|
||||||
this.getGoodsDetails(this.id);
|
|
||||||
this.setTitle();
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.showSpec = false;
|
// if(this.pintuan_id) {
|
||||||
this.showGroupUser = false;
|
// this.$u.api.getPinTuanDetails({
|
||||||
this.showInvolvementUser = false;
|
// pintuan_id: this.pintuan_id
|
||||||
|
// }).then(res => {
|
||||||
|
// if(res.errCode == 0) {
|
||||||
|
// const goods = {
|
||||||
|
// goods: res.data.data,
|
||||||
|
// type: 2,
|
||||||
|
// }
|
||||||
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
|
// this.$store.commit('setGoodsId', this.pintuan_id);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.init();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// init() {
|
init() {
|
||||||
// this.id = this.$store.state.goods_id;
|
this.id = this.$store.state.goods_id;
|
||||||
// this.type = this.$store.getters.getGoodsType;
|
this.type = this.$store.getters.getGoodsType;
|
||||||
// const info = this.$store.getters.getGoodsInfo;
|
const info = this.$store.getters.getGoodsInfo;
|
||||||
// // 拼团商品
|
if(this.type == 2) {
|
||||||
// if(this.type == 2) {
|
this.user_suc = info.user_suc;
|
||||||
// this.user_suc = info.user_suc;
|
this.groupUser = info.user;
|
||||||
// this.groupUser = info.user;
|
this.pintuan_id = info.pintuan_id;
|
||||||
// this.pintuan_id = info.pintuan_id;
|
}
|
||||||
// }
|
if (this.type == 3) {
|
||||||
// // 秒杀商品
|
this.groupbuyInfo = this.$store.state.groupbuyInfo;
|
||||||
// if (this.type == 3) {
|
this.setSpikeTime();
|
||||||
// this.groupbuyInfo = this.$store.state.groupbuyInfo;
|
}
|
||||||
// this.setSpikeTime();
|
// console.log(this.groupbuyInfo);
|
||||||
// }
|
this.goodsInfo = info.goods;
|
||||||
// // console.log(this.groupbuyInfo);
|
// 设置轮播图
|
||||||
// this.goodsInfo = info.goods;
|
let list = [];
|
||||||
// // 设置轮播图
|
info.goods_image[0].forEach(item => {
|
||||||
// let list = [];
|
|
||||||
// info.goods_image[0].forEach(item => {
|
|
||||||
// let temp = {
|
|
||||||
// image: item
|
|
||||||
// }
|
|
||||||
// list.push(temp);
|
|
||||||
// })
|
|
||||||
// this.list = list;
|
|
||||||
// this.setTitle();
|
|
||||||
// },
|
|
||||||
setSwiperList(list) {
|
|
||||||
let img = [];
|
|
||||||
list.forEach(item => {
|
|
||||||
let temp = {
|
let temp = {
|
||||||
image: item
|
image: item
|
||||||
}
|
}
|
||||||
img.push(temp);
|
list.push(temp);
|
||||||
})
|
})
|
||||||
this.list = img;
|
this.list = list;
|
||||||
|
this.setTitle();
|
||||||
},
|
},
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
this.settlementOrder()
|
this.settlementOrder()
|
||||||
},
|
},
|
||||||
setSpikeTime(time) {
|
setSpikeTime() {
|
||||||
// const time = this.groupbuyInfo.groupbuy_endtime;
|
const time = this.groupbuyInfo.groupbuy_endtime;
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
let spikeTime = time * 1000 - new Date().getTime();
|
let spikeTime = time * 1000 - new Date().getTime();
|
||||||
// 计算天数
|
// 计算天数
|
||||||
@@ -289,102 +229,61 @@ export default {
|
|||||||
// console.log(this.spikeTime);
|
// console.log(this.spikeTime);
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
addCart() {
|
buy(info){
|
||||||
|
if(info.type == 2){ // 加入购物车
|
||||||
this.$u.api.addCart({
|
this.$u.api.addCart({
|
||||||
goods_id: this.id,
|
goods_id: this.id,
|
||||||
quantity: this.goodsNumber,
|
quantity: info.value,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: res.errCode == 0 ? 'success' : 'warning',
|
type: res.errCode == 0 ? 'success' : 'warning',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
} else if (info.type == 1) { // 支付
|
||||||
purchase() {
|
this.settlementOrder({num: info.value});
|
||||||
this.settlementOrder();
|
|
||||||
},
|
|
||||||
getGoodsDetails(id) {
|
|
||||||
switch (this.type) {
|
|
||||||
case 1:
|
|
||||||
this.ordinaryDetails(id);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
this.pinTuanDetails(id);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.spikeGoodsDetails(id);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 普通商品
|
getGoodsDetails(id) {
|
||||||
ordinaryDetails(id) {
|
this.id = id;
|
||||||
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.evaluate = res.data.goods_evaluate_info;
|
|
||||||
this.goodsInfo = res.data.goods;
|
this.goodsInfo = res.data.goods;
|
||||||
this.setSwiperList(res.data.goods_image[0]);
|
let list = [];
|
||||||
|
res.data.goods_image[0].forEach(item => {
|
||||||
|
let temp = {
|
||||||
|
image: item
|
||||||
|
}
|
||||||
|
list.push(temp);
|
||||||
|
})
|
||||||
|
this.list = list;
|
||||||
|
this.info = res.data.goods;
|
||||||
this.glist = res.data.spec_list;
|
this.glist = res.data.spec_list;
|
||||||
// console.log(this.goodsInfo.mobile_body);
|
// console.log(this.goodsInfo.mobile_body);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 拼团
|
// 下单
|
||||||
pinTuanDetails(id) {
|
|
||||||
this.$u.api.getPinTuanDetails({
|
|
||||||
pintuan_id: id
|
|
||||||
}).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.evaluate = res.data.data.goods_evaluate_info;
|
|
||||||
this.goodsInfo = res.data.data.goods;
|
|
||||||
this.setSwiperList(res.data.data.goods_image[0]);
|
|
||||||
this.glist = res.data.data.spec_list;
|
|
||||||
this.user_suc = res.data.data.user_suc;
|
|
||||||
this.groupUser =res.data.data.user;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 秒杀
|
|
||||||
spikeGoodsDetails(id) {
|
|
||||||
this.$u.api.getSpikeInfo({
|
|
||||||
groupbuy_id: id
|
|
||||||
}).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.groupbuyInfo = res.data.groupbuyInfo;
|
|
||||||
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
|
||||||
this.goodsInfo = res.data.goodsInfo.goods;
|
|
||||||
this.setSwiperList(res.data.goodsInfo.goods_image[0]);
|
|
||||||
this.setSpikeTime(res.data.groupbuyInfo.groupbuy_endtime);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/*
|
/*
|
||||||
* @description 下单 订单步骤1:展示结算数据
|
|
||||||
* @params {Number} type 拼团或者开团
|
* @params {Number} type 拼团或者开团
|
||||||
* @params {Number} num 数量
|
|
||||||
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
|
||||||
**/
|
**/
|
||||||
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
|
settlementOrder({type, num = 1} = {}) {
|
||||||
|
// ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||||
let params = {
|
let params = {
|
||||||
ifcart: ifcart,
|
ifcart: 0,
|
||||||
cart_id: [this.goodsInfo.goods_id + '|' + num],
|
cart_id: [this.goodsInfo.goods_id + '|' + num],
|
||||||
}
|
}
|
||||||
if(this.type == 2) {
|
if(this.type == 2) {
|
||||||
if(type == 'involvement') {
|
if(type == 'involvement') {
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.id,
|
pintuan_id: this.pintuan_id,
|
||||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id
|
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const userId = uni.getStorageSync('user_info').member.member_id;
|
const userId = uni.getStorageSync('user_info').member.member_id;
|
||||||
this.$store.commit('setGroupHeadId', userId);
|
this.$store.commit('setGroupHeadId', userId);
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.id,
|
pintuan_id: this.pintuan_id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -398,42 +297,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 参团
|
|
||||||
involvemenGroup(user) {
|
involvemenGroup(user) {
|
||||||
this.involvemenGroupInfo = user;
|
this.involvemenGroupInfo = user;
|
||||||
this.showGroupUser = false;
|
this.showGroupUser = false;
|
||||||
this.showInvolvementUser = true;
|
this.showInvolvementUser = true;
|
||||||
// console.log(this.involvemenGroupInfo);
|
// console.log(this.involvemenGroupInfo);
|
||||||
},
|
},
|
||||||
valChange(e) {
|
|
||||||
// console.log(this.value)
|
|
||||||
},
|
|
||||||
self(){
|
|
||||||
// console.log(this.$refs.guige)
|
|
||||||
let index = 0;
|
|
||||||
let arr = [];
|
|
||||||
for(let i in this.goodsInfo.spec_value){
|
|
||||||
// console.log(i)
|
|
||||||
// console.log(this.$refs.guige[index++].select)
|
|
||||||
// index++;
|
|
||||||
let sel = this.$refs.guige[index++].select
|
|
||||||
if(sel != 0){
|
|
||||||
arr.push(sel)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log(arr.length)
|
|
||||||
if(arr.length == index){
|
|
||||||
this.sel = arr.join("|")
|
|
||||||
this.quanxuan = true
|
|
||||||
// console.log(this.sel)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
xuanze(id){
|
xuanze(id){
|
||||||
// console.log(id)
|
console.log(id)
|
||||||
this.getGoodsDetails(this.glist[id])
|
// this.getGoodsDetails(this.glist[id])
|
||||||
this.id = this.glist[id];
|
|
||||||
},
|
},
|
||||||
// 设置页面标题
|
|
||||||
setTitle() {
|
setTitle() {
|
||||||
let title = '';
|
let title = '';
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
@@ -456,14 +329,6 @@ export default {
|
|||||||
title: title
|
title: title
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
viewComment() {
|
|
||||||
this.$u.route({
|
|
||||||
url: 'pageB/comment/index',
|
|
||||||
params: {
|
|
||||||
id: this.goodsInfo.goods_id
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -471,7 +336,6 @@ export default {
|
|||||||
.sdetails {
|
.sdetails {
|
||||||
padding-bottom: 98rpx;
|
padding-bottom: 98rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #EEEBEE;
|
|
||||||
.spike-view {
|
.spike-view {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 396rpx;
|
top: 396rpx;
|
||||||
@@ -533,9 +397,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
background:rgba(255,255,255,1);
|
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
margin-bottom: 20rpx;
|
|
||||||
.title{
|
.title{
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
@@ -562,42 +424,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.comment {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
background:rgba(255,255,255,1);
|
|
||||||
padding: 30rpx;
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
.left {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
.right {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(153,153,153,1);
|
|
||||||
> image {
|
|
||||||
width: 8rpx;
|
|
||||||
height: 16rpx;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.comment-none {
|
|
||||||
font-size: 26rpx;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hr {
|
.hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
}
|
}
|
||||||
.group-user {
|
.group-user {
|
||||||
background: rgba(255,255,255,1);
|
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
.top {
|
.top {
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
@@ -748,11 +580,6 @@ export default {
|
|||||||
margin-right: 80rpx;
|
margin-right: 80rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pintuan-none {
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333;
|
|
||||||
margin: 100rpx auto 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -858,7 +685,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255,255,255,1);
|
color: rgba(255,255,255,1);
|
||||||
z-index: 10076;
|
z-index: 99;
|
||||||
.launch {
|
.launch {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background: rgba(253,211,96,1);
|
background: rgba(253,211,96,1);
|
||||||
@@ -879,7 +706,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
z-index: 10076;
|
z-index: 99;
|
||||||
.left {
|
.left {
|
||||||
width: 190rpx;
|
width: 190rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -912,82 +739,5 @@ export default {
|
|||||||
background: rgba(221,221,221,1);
|
background: rgba(221,221,221,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tloos{
|
|
||||||
background-color: #fff;
|
|
||||||
display: flex;
|
|
||||||
position: fixed;
|
|
||||||
height: 98rpx;
|
|
||||||
width: 100%;
|
|
||||||
bottom:0;
|
|
||||||
border-top: 1rpx solid #ececec;
|
|
||||||
z-index: 10076;
|
|
||||||
.navs{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
>image{
|
|
||||||
width: 35rpx;
|
|
||||||
height: 35rpx;
|
|
||||||
margin-bottom: 15rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
.button{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
line-height: 98rpx;
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.spec-popup {
|
|
||||||
padding: 30rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
max-height: 750rpx;
|
|
||||||
.head{
|
|
||||||
display: flex;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
.image{
|
|
||||||
width: 195rpx;
|
|
||||||
height: 195rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.info{
|
|
||||||
display: flex;
|
|
||||||
padding: 21rpx 0;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-left: 27rpx;
|
|
||||||
flex-direction: column;
|
|
||||||
>text:first-child{
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
>text:last-child{
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #ff3131;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.num{
|
|
||||||
height: 84rpx;
|
|
||||||
display: flex;
|
|
||||||
border-bottom: #ececec solid 2rpx;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
>text{
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="search">
|
<view class="search">
|
||||||
|
<view class="sosuo">
|
||||||
|
<image></image>
|
||||||
|
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :action-style="{
|
||||||
|
'font-size':'32rpx',
|
||||||
|
'color':'#FF780F',
|
||||||
|
'overflow':'unset'
|
||||||
|
}"
|
||||||
|
@search="search"
|
||||||
|
></u-search>
|
||||||
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="title">搜索发现</view>
|
<view class="title">搜索发现</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<text v-for="(label, index) in searchwordlist" :key="index" @click="search(label.word)">{{ label.word }}</text>
|
<text>这是标签</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -13,40 +23,17 @@ export default {
|
|||||||
name:"search",
|
name:"search",
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
keyword: "",
|
keyword:""
|
||||||
searchwordlist: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.getWordList();
|
|
||||||
},
|
|
||||||
// 点击搜索按钮
|
|
||||||
onNavigationBarButtonTap(e) {
|
|
||||||
if(e.index == 0) this.search(this.keyword);
|
|
||||||
},
|
|
||||||
// 输入框文本变化
|
|
||||||
onNavigationBarSearchInputChanged(e) {
|
|
||||||
this.keyword = e.text;
|
|
||||||
},
|
|
||||||
// 点击键盘搜索按钮
|
|
||||||
onNavigationBarSearchInputConfirmed(value) {
|
|
||||||
this.search(this.keyword);
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
getWordList() {
|
|
||||||
this.$u.api.searchwordlist().then(res => {
|
|
||||||
this.searchwordlist = res.data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
search(value){
|
search(value){
|
||||||
// console.log(value)
|
// console.log(value)
|
||||||
if(!value) this.$u.toast('搜索内容不可为空');
|
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url:"/pageB/search/out",
|
url:"/pageB/search/out",
|
||||||
params:{
|
params:{
|
||||||
value: value,
|
value,
|
||||||
type: "shop",
|
type:"shop"
|
||||||
order: 'goods_salenum'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -80,7 +67,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.label{
|
.label{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
>text{
|
>text{
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="out">
|
<view class="out">
|
||||||
|
<view class="sosuo">
|
||||||
|
<image></image>
|
||||||
|
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :show-action="false"></u-search>
|
||||||
|
</view>
|
||||||
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
|
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
|
||||||
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
@@ -12,7 +16,7 @@
|
|||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
<scroll-view :scroll-y="true" style="height:100%">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
|
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -34,6 +38,7 @@
|
|||||||
<scroll-view :scroll-y="true" style="height:100%">
|
<scroll-view :scroll-y="true" style="height:100%">
|
||||||
<view style="padding-top:30rpx">
|
<view style="padding-top:30rpx">
|
||||||
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
|
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -51,6 +56,8 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -155,11 +162,6 @@ export default {
|
|||||||
shoplist:[]
|
shoplist:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(o){
|
|
||||||
this.type = o.type
|
|
||||||
this.keyword = o.value
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
@@ -187,5 +189,10 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(o){
|
||||||
|
this.type = o.type
|
||||||
|
this.keyword = o.value
|
||||||
|
this.search()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -205,14 +205,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
intermediate() {
|
intermediate() {
|
||||||
if(this.orderType == 2) {
|
if(this.orderType == 2) this.withImmediate();
|
||||||
this.withImmediate();
|
|
||||||
} else if(this.orderType == 1) {
|
|
||||||
this.sendOrder(0);
|
|
||||||
}
|
|
||||||
else this.sendOrder(1);
|
else this.sendOrder(1);
|
||||||
},
|
},
|
||||||
// @params {Number} ifcart 是否是购物车商品
|
|
||||||
sendOrder(ifcart) {
|
sendOrder(ifcart) {
|
||||||
// 拼接后端需要的数据形式
|
// 拼接后端需要的数据形式
|
||||||
let id = [], temp = '';
|
let id = [], temp = '';
|
||||||
@@ -246,11 +241,11 @@ export default {
|
|||||||
cart_id: id,
|
cart_id: id,
|
||||||
address_id: this.addressInfo.address_id,
|
address_id: this.addressInfo.address_id,
|
||||||
buy_city_id: this.addressInfo.city_id,
|
buy_city_id: this.addressInfo.city_id,
|
||||||
|
voucher_id: coupon,
|
||||||
}
|
}
|
||||||
if(coupon.length) Object.assign(params, { voucher_id: coupon });
|
|
||||||
if(this.orderType == 2) {
|
if(this.orderType == 2) {
|
||||||
Object.assign(params, { pintuan_id: this.orderInfo.pintuan_id });
|
Object.assign(params, { pintuan_id: this.orderInfo.pintuan_id })
|
||||||
if(this.orderInfo.pintuangroup_id) Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id });
|
if(this.orderInfo.pintuangroup_id) Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id })
|
||||||
}
|
}
|
||||||
// console.log(params);
|
// console.log(params);
|
||||||
this.$u.api.sendOrder(params).then(res => {
|
this.$u.api.sendOrder(params).then(res => {
|
||||||
|
|||||||
@@ -54,10 +54,24 @@ export default {
|
|||||||
// getProvider() {
|
// getProvider() {
|
||||||
// uni.getProvider({service: 'payment'})
|
// uni.getProvider({service: 'payment'})
|
||||||
// },
|
// },
|
||||||
payOrder(provider, orderInfo) {
|
// 支付宝支付
|
||||||
|
payByAlipay (orderInfo) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: provider,
|
provider: 'alipay',
|
||||||
orderInfo: orderInfo, //订单数据
|
orderInfo: orderInfo, //支付宝订单数据
|
||||||
|
success: function (res) {
|
||||||
|
console.log('success:' + JSON.stringify(res));
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log('fail:' + JSON.stringify(err));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 微信支付
|
||||||
|
payByWxpay (orderInfo) {
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: 'wxpay',
|
||||||
|
orderInfo: orderInfo, //微信订单数据
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('success:' + JSON.stringify(res));
|
console.log('success:' + JSON.stringify(res));
|
||||||
},
|
},
|
||||||
@@ -72,15 +86,11 @@ export default {
|
|||||||
payment_code: this.pay_way,
|
payment_code: this.pay_way,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
let orderInfo, provider;
|
// this.$u.toast(res.message);
|
||||||
if(res.data.payment_code == 'wxpay_app') {
|
// uni.navigateBack();
|
||||||
provider = 'wxpay';
|
const orderInfo = JSON.parse(res.data.content);
|
||||||
orderInfo = JSON.parse(res.data.content);
|
console.log(orderInfo);
|
||||||
} else if(res.data.payment_code == 'alipay_app') {
|
this.pay_way == 'wxpay_app' ? this.payByWxpay(orderInfo) : this.payByAlipay(orderInfo);
|
||||||
provider = 'alipay';
|
|
||||||
orderInfo = res.data.content;
|
|
||||||
}
|
|
||||||
this.payOrder(provider, orderInfo);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
this.$u.toast(res.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -56,16 +56,16 @@ export default {
|
|||||||
},
|
},
|
||||||
addOrderEvaluate() {
|
addOrderEvaluate() {
|
||||||
if(!this.verifyParams()) return false;
|
if(!this.verifyParams()) return false;
|
||||||
// console.log(this.logistics);
|
console.log(this.logistics);
|
||||||
// console.log(this.service);
|
console.log(this.service);
|
||||||
// console.log(this.describe);
|
console.log(this.describe);
|
||||||
this.$u.api.updateOrderEvaluate({
|
this.$u.api.updateOrderEvaluate({
|
||||||
id: this.orderId,
|
id: this.orderId,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
scores_one: this.logistics,
|
scores_one: this.logistics,
|
||||||
scores_two: this.service,
|
scores_two: this.service,
|
||||||
scores_three: this.describe,
|
scores_three: this.describe,
|
||||||
file: '', // 只传文件名
|
file: '',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
|
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
|
||||||
<view class="payment" v-if="state == '6'" @click="payNow">立即支付</view>
|
<view class="payment" v-if="state == '6'">立即支付</view>
|
||||||
<view class="service" v-if="state == '7'">联系官方客服</view>
|
<view class="service" v-if="state == '7'">联系官方客服</view>
|
||||||
<view class="submit" v-if="state == '7'">提交官方审核</view>
|
<view class="submit" v-if="state == '7'">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -186,12 +186,6 @@ export default {
|
|||||||
title: title
|
title: title
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
payNow() {
|
|
||||||
this.$u.route('/pageC/cart/cashier', {
|
|
||||||
pay_sn: this.orderInfo.pay_sn,
|
|
||||||
price: this.orderInfo.order_amount,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
this.$u.route('/pageE/order/' + url, {
|
this.$u.route('/pageE/order/' + url, {
|
||||||
oid: this.orderInfo.order_id,
|
oid: this.orderInfo.order_id,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wash">
|
<view class="wash">
|
||||||
<view>
|
<view class="title">
|
||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||||
@@ -19,6 +19,11 @@
|
|||||||
<view>所属公司:xx公司</view>
|
<view>所属公司:xx公司</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="send-btn">
|
||||||
|
<view class="btn" v-if="btn_show">
|
||||||
|
确认完成
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -35,6 +40,14 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
<view class="popup" v-if="showPopup" @click="onTap">
|
||||||
|
<view class="popup_cont" @click="replaces(1)">
|
||||||
|
实体店历史订单
|
||||||
|
</view>
|
||||||
|
<view class="popup_cont" @click="replaces(2)">
|
||||||
|
平台历史订单
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -42,15 +55,17 @@ import Comment from '@/components/mine/comment/index'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showPopup: false,
|
||||||
list: [{
|
list: [{
|
||||||
name: '我的订单'
|
name: '平台历史订单'
|
||||||
}, {
|
}, {
|
||||||
name: '申请表'
|
name: '申请表'
|
||||||
}, {
|
}, {
|
||||||
name: '评价'
|
name: '评价'
|
||||||
}],
|
}],
|
||||||
current: 0,
|
current: 0,
|
||||||
swiperCurrent: 0
|
swiperCurrent: 0,
|
||||||
|
btn_show:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -59,6 +74,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.swiperCurrent = 0;
|
this.swiperCurrent = 0;
|
||||||
|
this.showPopup= false
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
@@ -72,11 +88,31 @@ export default {
|
|||||||
this.toApplyPage(current);
|
this.toApplyPage(current);
|
||||||
},
|
},
|
||||||
toApplyPage(index) {
|
toApplyPage(index) {
|
||||||
|
console.log(index)
|
||||||
|
var that = this;
|
||||||
if(index == 1) {
|
if(index == 1) {
|
||||||
|
this.showPopup = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageE/tool/WashOrder'
|
url: '/pageE/tool/WashOrder'
|
||||||
});
|
});
|
||||||
|
}else if(index ==0){
|
||||||
|
this.history();
|
||||||
|
}else{
|
||||||
|
this.showPopup = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
history(){
|
||||||
|
this.showPopup = true;
|
||||||
|
},
|
||||||
|
replaces(e){
|
||||||
|
if(e == 1){
|
||||||
|
this.$set(this.list,0,{name: '实体店历史订单'} )
|
||||||
|
}else{
|
||||||
|
this.$set(this.list,0,{name: '平台历史订单'} )
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onTap(){
|
||||||
|
this.showPopup = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -89,6 +125,10 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
> uni-swiper {
|
> uni-swiper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
height: 85vh;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
|
||||||
}
|
}
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
@@ -100,7 +140,7 @@ export default {
|
|||||||
.order-item {
|
.order-item {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
width:690rpx;
|
width:690rpx;
|
||||||
height: 308rpx;
|
height: 362rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@@ -135,6 +175,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.send-btn{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
.btn{
|
||||||
|
width: 154rpx;
|
||||||
|
height: 54rpx;
|
||||||
|
background: RGBA(255, 254, 255, 1);
|
||||||
|
border-radius: 49rpx;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
font-size: 26rpx;
|
||||||
|
border: 1rpx solid rgba(255,120,15,1);
|
||||||
|
color:rgba(255,120,15,1);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 54rpx;
|
||||||
|
margin-right: -80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.comment {
|
.comment {
|
||||||
@@ -145,5 +204,35 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.popup{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
top: 88px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
transform: scale(1);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: top;
|
||||||
|
align-items: center;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
|
||||||
|
.popup_cont{
|
||||||
|
border-top: 1px solid RGBA(239, 236, 240, 1);
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size:28rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:400;
|
||||||
|
color:rgba(102,102,102,1);
|
||||||
|
padding-left: 41rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wash-order">
|
<view class="wash-order">
|
||||||
|
<view>
|
||||||
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
||||||
|
</view>
|
||||||
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||||
|
<swiper-item class="swiper-item">
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
|
<view class="order-name" @click="order()">
|
||||||
|
<view class="title titles" >
|
||||||
|
<text>选择订单:</text>
|
||||||
|
<image src="../../static/image/shop/2.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<u-icon name="arrow-dwon" color="#2979ff" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="choose-info" v-if="choose">
|
||||||
|
<view class="store">
|
||||||
|
<view>
|
||||||
|
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
订单编号:2222222222222
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="store_info">
|
||||||
|
<view class="info_img">
|
||||||
|
<image src="../../static/image/mine/23.png" mode="">
|
||||||
|
</view>
|
||||||
|
<view class="info_txt">
|
||||||
|
<view class="content">
|
||||||
|
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
|
||||||
|
</view>
|
||||||
|
<view class="much">
|
||||||
|
<text>¥99</text>
|
||||||
|
<text>x1</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="order-name">
|
<view class="order-name">
|
||||||
<view class="title">送洗人:</view>
|
<view class="title">送洗人:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="name" />
|
||||||
@@ -36,26 +72,198 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="wash-btn" @click="reset()">确认送洗</view>
|
||||||
|
</swiper-item>
|
||||||
|
<swiper-item class="swiper-item">
|
||||||
|
<view class="order-info">
|
||||||
|
<view class="order-name">
|
||||||
|
<view class="title">商品名称:</view>
|
||||||
|
<input type="text" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="order-phone">
|
||||||
|
<view class="title">商品类型:</view>
|
||||||
|
<input type="text" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="order-phone">
|
||||||
|
<view class="title">衣服状况:</view>
|
||||||
|
<input type="text" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="order-name">
|
||||||
|
<view class="title">送洗人:</view>
|
||||||
|
<input type="text" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view class="order-area">
|
||||||
|
<view class="title">省市区:</view>
|
||||||
|
<input type="text" v-model="area" />
|
||||||
|
<view class="location">
|
||||||
|
<image src="../static/mine/28.png"></image>
|
||||||
|
<view>定位</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-address">
|
||||||
|
<view class="title">详细地址:</view>
|
||||||
|
<input type="text" v-model="address" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="upload-image">
|
||||||
|
<view class="title">上传商品图片</view>
|
||||||
|
<u-upload
|
||||||
|
ref="uUpload"
|
||||||
|
@on-uploaded="onUploaded"
|
||||||
|
:custom-btn="true"
|
||||||
|
:max-count="count"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
|
<img src="../static/mine/27.png" />
|
||||||
|
</view>
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
<view class="wash-btn">确认送洗</view>
|
<view class="wash-btn">确认送洗</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<view class="popup" v-if="showPopup">
|
||||||
|
<view class="popup_cont" >
|
||||||
|
<view class="check">
|
||||||
|
<text>选择订单</text>
|
||||||
|
<image src="../../static/image/common/17.png" @click="close()"></image>
|
||||||
|
</view>
|
||||||
|
<swiper style="height: 1000px;" vertical="true">
|
||||||
|
<swiper-item class="swiper-item">
|
||||||
|
<scroll-view scroll-y class="order-list">
|
||||||
|
<view v-for="(items, index) in 3" :key="items.index">
|
||||||
|
<view class="store">
|
||||||
|
<view>
|
||||||
|
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
订单编号:2222222222222
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="checkd">
|
||||||
|
<radio-group @change="er">
|
||||||
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in checkLidt" :key="index">
|
||||||
|
<view class="radio">
|
||||||
|
<radio color="#F0AD4E" :value="item.id" :checked="a==item.id"/>
|
||||||
|
</view>
|
||||||
|
<view class="store_info">
|
||||||
|
<view class="info_img">
|
||||||
|
<image src="../../static/image/mine/23.png" mode="">
|
||||||
|
</view>
|
||||||
|
<view class="info_txt">
|
||||||
|
<view class="content">
|
||||||
|
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
|
||||||
|
</view>
|
||||||
|
<view class="much">
|
||||||
|
<text>¥99</text>
|
||||||
|
<text>x1</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<view class="bottom_btn" style="width: 100%;background-color: #fff;">
|
||||||
|
<view class="wash-btn" @click="confirm()">确认</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
items: [],
|
||||||
count: 4, // 最大图片数量
|
count: 4, // 最大图片数量
|
||||||
name: '',
|
name: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
area: '',
|
area: '',
|
||||||
address: ''
|
address: '',
|
||||||
|
list: [{
|
||||||
|
name: '平台历史订单'
|
||||||
|
}, {
|
||||||
|
name: '实体店历史订单'
|
||||||
|
}],
|
||||||
|
current: 0,
|
||||||
|
swiperCurrent: 0,
|
||||||
|
showPopup : false,
|
||||||
|
a:"",
|
||||||
|
checkLidt:[
|
||||||
|
{id:'1'},
|
||||||
|
{id:'2'},
|
||||||
|
{id:'3'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onShow() {
|
||||||
|
this.current = 0;
|
||||||
|
this.swiperCurrent = 0;
|
||||||
|
this.showPopup = false;
|
||||||
|
this.choose = false
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.uUpload.upload();
|
this.$refs.uUpload.upload();
|
||||||
},
|
},
|
||||||
onUploaded(list) {
|
onUploaded(list) {
|
||||||
console.log(list)
|
console.log(list)
|
||||||
|
},tabsChange(index) {
|
||||||
|
this.swiperCurrent = index;
|
||||||
|
},
|
||||||
|
er(e){
|
||||||
|
console.log(e)
|
||||||
|
this.a =e.detail.value;
|
||||||
|
console.log(this.a)
|
||||||
|
},
|
||||||
|
animationfinish(e) {
|
||||||
|
let current = e.detail.current;
|
||||||
|
this.swiperCurrent = current;
|
||||||
|
this.current = current;
|
||||||
|
this.toApplyPage(current);
|
||||||
|
},
|
||||||
|
order(){
|
||||||
|
this.showPopup = true;
|
||||||
|
},
|
||||||
|
toApplyPage(index) {
|
||||||
|
console.log(index)
|
||||||
|
if(index == 1) {
|
||||||
|
this.showPopup = false;
|
||||||
|
this.choose = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// replaces(){
|
||||||
|
// if(this.list[0].name=='实体店历史订单'){
|
||||||
|
// this.$set(this.list,0,{name: '平台历史订单'} )
|
||||||
|
// }else{
|
||||||
|
// this.$set(this.list,0,{name: '实体店历史订单'} )
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
confirm(){
|
||||||
|
this.showPopup = false;
|
||||||
|
if(this.a ==''){
|
||||||
|
this.choose =false
|
||||||
|
}else{
|
||||||
|
this.choose = true
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
close(){
|
||||||
|
this.showPopup = false
|
||||||
|
},
|
||||||
|
reset(){
|
||||||
|
this.choose = false
|
||||||
|
},
|
||||||
|
radioChange: function(evt) {
|
||||||
|
for (let i = 0; i < this.items.length; i++) {
|
||||||
|
if (this.items[i].value === evt.target.value) {
|
||||||
|
this.current = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -63,7 +271,64 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wash-order {
|
.wash-order {
|
||||||
border-top: 1rpx solid #ECECEC;
|
border-top: 1rpx solid #ECECEC;
|
||||||
|
> uni-swiper {
|
||||||
|
flex: 1;
|
||||||
|
height: 95vh;
|
||||||
|
}
|
||||||
|
|
||||||
.order-info {
|
.order-info {
|
||||||
|
|
||||||
|
.choose-info{
|
||||||
|
display: flex;flex-wrap: wrap;
|
||||||
|
height: 335rpx;
|
||||||
|
.store{
|
||||||
|
>view{
|
||||||
|
>image{
|
||||||
|
width:60rpx;
|
||||||
|
height:60rpx;
|
||||||
|
border-radius:50%;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-right:13rpx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
font-size:28rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:400;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
line-height: 60rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.store_info{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
.info_img{
|
||||||
|
>image{
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info_txt{
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
.content{
|
||||||
|
line-height: 44rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.much{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
> view {
|
> view {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
@@ -87,6 +352,20 @@ export default {
|
|||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
.titles {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin-right: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
>image{
|
||||||
|
width: 27rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
> input {
|
> input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -127,6 +406,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.bottom_btn{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
.wash-btn {
|
.wash-btn {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
@@ -141,5 +426,132 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 98rpx;
|
line-height: 98rpx;
|
||||||
}
|
}
|
||||||
|
.popup{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
transform: scale(1);
|
||||||
|
align-items: center;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
|
||||||
|
.popup_cont{
|
||||||
|
border-top: 1px solid RGBA(239, 236, 240, 1);
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
height: 1072rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size:28rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:400;
|
||||||
|
color:rgba(102,102,102,1);
|
||||||
|
transform: scale(1);
|
||||||
|
position: fixed;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
bottom: 0px;
|
||||||
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
/* top: 0px; */
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
border-radius:20px 20px 0px 0px;
|
||||||
|
> uni-swiper {
|
||||||
|
flex: 1;
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
|
.order-list{
|
||||||
|
height: 60vh;
|
||||||
|
padding-bottom: 140rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.check{
|
||||||
|
font-size:30rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:500;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
height:88rpx;
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
border-bottom: 1px solid rgba(236, 236, 236, 1);
|
||||||
|
|
||||||
|
>image{
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
float: right;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
padding-right:30rpx
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.store{
|
||||||
|
>view{
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
>image{
|
||||||
|
width:60rpx;
|
||||||
|
height:60rpx;
|
||||||
|
border-radius:50%;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-right:13rpx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
font-size:28rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:400;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
line-height: 60rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.checkd{
|
||||||
|
>radio-group .uni-list-cell{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
}
|
||||||
|
.store_info{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.info_img{
|
||||||
|
>image{
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info_txt{
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
.content{
|
||||||
|
line-height: 44rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.much{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
62
pages.json
62
pages.json
@@ -113,69 +113,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "comment/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商品评价",
|
|
||||||
"app-plus":{
|
|
||||||
"titleNView":{
|
|
||||||
"backgroundColor":"#ffffff"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "search/index",
|
"path": "search/index",
|
||||||
"style": {
|
"style": {
|
||||||
"app-plus": {
|
"navigationBarTitleText": "",
|
||||||
"titleNView": {
|
"navigationStyle": "custom"
|
||||||
"titleColor": "#333333",
|
|
||||||
"backgroundColor": "#FFFFFF",
|
|
||||||
"buttons": [
|
|
||||||
{
|
|
||||||
"type":"none",
|
|
||||||
"text":"搜索",
|
|
||||||
"float":"right",
|
|
||||||
"fontSize":"16",
|
|
||||||
"color": "#FF780F"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"searchInput": {
|
|
||||||
"align": "left",
|
|
||||||
"borderRadius": "15px",
|
|
||||||
"placeholder": "搜索您需要的商品",
|
|
||||||
"backgroundColor": "rgb(236,236,236)",
|
|
||||||
"disabled": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "search/out",
|
"path": "search/out",
|
||||||
"style": {
|
"style": {
|
||||||
"app-plus": {
|
"navigationBarTitleText": "",
|
||||||
"titleNView": {
|
"navigationStyle": "custom"
|
||||||
"titleColor": "#333333",
|
|
||||||
"backgroundColor": "#FFFFFF",
|
|
||||||
"buttons": [
|
|
||||||
{
|
|
||||||
"type":"none",
|
|
||||||
"text":"搜索",
|
|
||||||
"float":"right",
|
|
||||||
"fontSize":"16",
|
|
||||||
"color": "#FF780F"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"searchInput": {
|
|
||||||
"align": "left",
|
|
||||||
"borderRadius": "15px",
|
|
||||||
"placeholder": "搜索您需要的商品",
|
|
||||||
"backgroundColor": "rgb(236,236,236)",
|
|
||||||
"disabled": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -216,6 +167,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "cart/index",
|
"path": "cart/index",
|
||||||
|
|||||||
@@ -11,9 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="swiper-image">
|
|
||||||
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
||||||
</view>
|
|
||||||
<view class="chengnuo">
|
<view class="chengnuo">
|
||||||
<view>
|
<view>
|
||||||
<image src="/static/image/shop/4.png"></image>
|
<image src="/static/image/shop/4.png"></image>
|
||||||
@@ -35,16 +33,21 @@
|
|||||||
<view class="fenlei">
|
<view class="fenlei">
|
||||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="hr" style="margin-top:80rpx"></view>
|
||||||
<!-- 秒杀 -->
|
<!-- 秒杀 -->
|
||||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||||
|
<view v-if="JSON.stringify(recommendedSpike) != '{}'" class="hr" style="margin-top:40rpx"></view>
|
||||||
<!-- 秒杀列表 -->
|
<!-- 秒杀列表 -->
|
||||||
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
||||||
|
<view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
|
||||||
<!-- 拼团推荐 -->
|
<!-- 拼团推荐 -->
|
||||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||||
|
<view class="hr" style="margin-top:40rpx" v-if="JSON.stringify(pinTuanPush) != '{}'"></view>
|
||||||
<!-- 拼团列表 -->
|
<!-- 拼团列表 -->
|
||||||
<group></group>
|
<group :groupList="pinTuanList" :classifyList="couponGroupList"></group>
|
||||||
<image class="lingquan"></image>
|
<image class="lingquan"></image>
|
||||||
<youhq></youhq>
|
<youhq></youhq>
|
||||||
|
<view class="hr" style="margin-top:40rpx"></view>
|
||||||
<list ref="recommendGoods"></list>
|
<list ref="recommendGoods"></list>
|
||||||
<view class="cart" @click="toCartPage">
|
<view class="cart" @click="toCartPage">
|
||||||
<image src="/static/image/common/3.png"></image>
|
<image src="/static/image/common/3.png"></image>
|
||||||
@@ -53,13 +56,13 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import shopitem from "@/components/shop/shop-item/index";
|
import shopitem from "@/components/shop/shop-item/index"
|
||||||
import recommend from "@/components/shop/recommend/index";
|
import recommend from "@/components/shop/recommend/index"
|
||||||
import pintuan from "@/components/shop/recommend/pintuan";
|
import pintuan from "@/components/shop/recommend/pintuan"
|
||||||
import seckill from "@/components/shop/seckill/index";
|
import seckill from "@/components/shop/seckill/index"
|
||||||
import group from "@/components/shop/group/index";
|
import group from "@/components/shop/group/index"
|
||||||
import youhq from "@/components/shop/youhq/index";
|
import youhq from "@/components/shop/youhq/index"
|
||||||
import list from "@/components/shop/list/index";
|
import list from "../../components/shop/list/index"
|
||||||
export default {
|
export default {
|
||||||
name:"shop",
|
name:"shop",
|
||||||
components:{
|
components:{
|
||||||
@@ -83,11 +86,12 @@ export default {
|
|||||||
keyword:"",
|
keyword:"",
|
||||||
list:[],
|
list:[],
|
||||||
goodsClassify: [], // 商品分类
|
goodsClassify: [], // 商品分类
|
||||||
// classifyList: [],
|
classifyList: [],
|
||||||
recommendedSpike: {}, // 秒杀推荐
|
recommendedSpike: {}, // 秒杀推荐
|
||||||
spikeList: [], // 全部秒杀列表
|
spikeList: [], // 全部秒杀列表
|
||||||
seckillTime: {}, // 秒杀时间
|
seckillTime: {}, // 秒杀时间
|
||||||
// couponGroupList: [], // 优惠券拼团分类
|
couponGroupList: [], // 优惠券拼团分类
|
||||||
|
pinTuanList: [], // 拼团商品
|
||||||
pinTuanPush: {}, // 拼团推荐
|
pinTuanPush: {}, // 拼团推荐
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -97,6 +101,7 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.getRecommendedSpike();
|
this.getRecommendedSpike();
|
||||||
this.getSpikeList();
|
this.getSpikeList();
|
||||||
|
this.getGoodsClass();
|
||||||
this.getPinTuanPush();
|
this.getPinTuanPush();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -136,6 +141,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取优惠券拼团分类
|
||||||
|
getGoodsClass() {
|
||||||
|
this.$u.api.getGoodsClass().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.couponGroupList = res.data;
|
||||||
|
this.getPinTuanList(this.couponGroupList[0].gc_id);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 全部秒杀
|
// 全部秒杀
|
||||||
getSpikeList() {
|
getSpikeList() {
|
||||||
this.$u.api.getSpikeList({ page: 0 }).then(res => {
|
this.$u.api.getSpikeList({ page: 0 }).then(res => {
|
||||||
@@ -148,6 +162,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 拼团列表
|
||||||
|
getPinTuanList(id) {
|
||||||
|
this.$u.api.getPinTuanList({
|
||||||
|
page: 0,
|
||||||
|
gc_id: id,
|
||||||
|
}).then(res => {
|
||||||
|
this.pinTuanList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
clickImage(index) {
|
clickImage(index) {
|
||||||
console.log(index);
|
console.log(index);
|
||||||
console.log(this.list[index]);
|
console.log(this.list[index]);
|
||||||
@@ -177,10 +200,8 @@ export default {
|
|||||||
.shop {
|
.shop {
|
||||||
height: calc(100vh - var(--window-top));
|
height: calc(100vh - var(--window-top));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #F0EDF1;
|
padding: 0 33rpx 100rpx;
|
||||||
.top{
|
.top{
|
||||||
padding: 0 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -190,10 +211,6 @@ export default {
|
|||||||
height: 37rpx;
|
height: 37rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.swiper-image {
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 0 30rpx;
|
|
||||||
}
|
|
||||||
.add{
|
.add{
|
||||||
width: 115rpx;
|
width: 115rpx;
|
||||||
height: 25rpx;
|
height: 25rpx;
|
||||||
@@ -213,17 +230,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mnue{
|
.mnue{
|
||||||
background-color: #ffffff;
|
|
||||||
width: 35rpx;
|
width: 35rpx;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
margin-left: 36rpx;
|
margin-left: 36rpx;
|
||||||
}
|
}
|
||||||
.chengnuo{
|
.chengnuo{
|
||||||
padding: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-top: 24rpx;
|
||||||
>view{
|
>view{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -239,11 +254,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.fenlei{
|
.fenlei{
|
||||||
padding: 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
margin-top: 30rpx;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 20rpx;
|
|
||||||
> view {
|
> view {
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
&:not(:nth-child(5n)) {
|
&:not(:nth-child(5n)) {
|
||||||
@@ -251,6 +265,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hr{
|
||||||
|
width: 750rpx;
|
||||||
|
margin-left: -33rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
background-color: #ececec;
|
||||||
|
}
|
||||||
.lingquan{
|
.lingquan{
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 177rpx;
|
height: 177rpx;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -43,29 +43,5 @@ const common = {
|
|||||||
});
|
});
|
||||||
return promise;
|
return promise;
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 将 php 时间戳转化为时分秒
|
|
||||||
* @param { String } timestamp php 时间戳
|
|
||||||
* @param { String } format 间隔符 默认 '26:14:25'
|
|
||||||
* @return { String } 格式化时间
|
|
||||||
*/
|
|
||||||
getLineTime({ timestamp, format } = {}) {
|
|
||||||
const days = Math.floor(timestamp / (24 * 3600 * 1000));
|
|
||||||
//计算出小时数
|
|
||||||
const leave1 = timestamp % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
|
|
||||||
let hours = Math.floor(leave1 / (3600 * 1000));
|
|
||||||
//计算相差分钟数
|
|
||||||
const leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
|
|
||||||
const minutes = Math.floor(leave2 / (60 * 1000))
|
|
||||||
//计算相差秒数
|
|
||||||
const leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
|
|
||||||
const seconds = Math.round(leave3 / 1000)
|
|
||||||
// 把天数算在小时里
|
|
||||||
hours = days * 24 + hours;
|
|
||||||
let result;
|
|
||||||
if(format) result = hours + format + minutes + format + seconds;
|
|
||||||
else result = hours + ':' + minutes + ':' + seconds;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
export default common
|
export default common
|
||||||
Reference in New Issue
Block a user