Browse Source

积分兑换/订单详情物流查询

master
Enzo 4 years ago
parent
commit
0ce3ef7331
  1. 4
      components/lf-waterfall-pointgoods/lf-waterfall.vue
  2. 1
      components/uni-countdown/uni-countdown.vue
  3. 4
      components/uni-steps/uni-steps.vue
  4. 7
      pages.json
  5. 2
      pages/discover/discover.vue
  6. 1
      pages/order/cashier/cashier.vue
  7. 51
      pages/order/newdetail/logistics.vue
  8. 38
      pages/order/newdetail/newdetail.vue
  9. 550
      pages/order/pointconfirm/confirm.vue
  10. 2
      pages/point/exchangeRecord/exchangeRecord.vue
  11. 45
      pages/shop/goodsdetail.vue

4
components/lf-waterfall-pointgoods/lf-waterfall.vue

@ -13,7 +13,7 @@
</view>
<view>
<text class="lf-font-36 lf-color-primary lf-font-bold">{{ item.store_nums }}</text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">个兑换</text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">积分兑换</text>
</view>
</view>
</view>
@ -31,7 +31,7 @@
</view>
<view>
<text class="lf-font-36 lf-color-primary lf-font-bold">{{ item.store_nums }}</text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">个兑换</text>
<text class="lf-font-24 lf-color-777 lf-m-l-10">积分兑换</text>
</view>
</view>
</view>

1
components/uni-countdown/uni-countdown.vue

@ -11,6 +11,7 @@
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '分' : minuteText }}</text>
<text :style="{ borderColor: borderColor, color: color }"
class="uni-countdown__number">{{ s }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '秒' : secondText }}</text>
<text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor">{{secondText}}</text>
</view>
</template>

4
components/uni-steps/uni-steps.vue

@ -3,8 +3,8 @@
<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
<view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.time}}</text>
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.context}}</text>
</view>
</view>
<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">

7
pages.json

@ -303,6 +303,13 @@
"navigationStyle": "custom"
}
},
{
"path" : "pages/order/pointconfirm/confirm",
"style" : {
"navigationBarTitleText": "确认订单",
"navigationStyle": "custom"
}
},
{
"path" : "pages/shop/goodsSpecial",
"style" : {

2
pages/discover/discover.vue

@ -274,7 +274,6 @@
if (event.detail.source == '') return; //
if(this.tab_current == 2) {
this.getMyAttention();
console.log('执行关注列表');
}else {
this.getHotActivity();
}
@ -323,7 +322,6 @@
}else {
tab_item.list.push(...res.data.data.data);
}
console.log('数组列表',tab_item.list)
} else {
wx.showModal({
content: res.message || '请下拉页面刷新重试',

1
pages/order/cashier/cashier.vue

@ -341,6 +341,7 @@
font-size: 24rpx;
color: #FF9D9D;
display: flex;
align-items: center;
}
}
}

51
pages/order/newdetail/logistics.vue

@ -1,19 +1,19 @@
<template>
<view>
<view v-if="$isRight(logistics_data)">
<lf-nav title="物流详情" :showIcon="true"></lf-nav>
<view class="top">
<image class="img" src="https://picsum.photos/200/300" mode="aspectFill"></image>
<view>已签收</view>
<image class="img" :src="order_details.items[0].item_meta.image" mode="aspectFill"></image>
<view>{{logistics_data.state_text}}</view>
</view>
<view class="head">
<view class="lf-flex">
<image class="avatar" src="https://picsum.photos/200/300" mode="aspectFill"></image>
<view class="name">邮政快递包裹 8374938754389</view>
<view class="name">{{logistics_data.com}} {{order_no}}</view>
</view>
<view class="copy" @click="copy">复制</view>
</view>
<view>
<uni-steps :options="options" active-color="#15716E" direction="column" :active="0"></uni-steps>
<uni-steps :options="logistics_data.data" active-color="#15716E" direction="column" :active="0"></uni-steps>
</view>
<view style="height: 90rpx;"></view>
</view>
@ -27,20 +27,45 @@
},
data(){
return {
options: [
{title:'[已签收] 09-09 08:28',desc:'到达【南宁邮件处理中心】'},
{title:'[已签收] 09-09 08:28',desc:'到达【南宁邮件处理中心】'},
{title:'[已签收] 09-09 08:28',desc:'到达【南宁邮件处理中心】'},
{title:'[已签收] 09-09 08:28',desc:'到达【南宁邮件处理中心】'}]
logistics_data: {},
order_no: '',
order_details: {}
}
},
onLoad(){
onLoad(e){
this.order_no = e.order_no;
if(this.order_no) {
this.searchLogistics();
this.getOrderDetails();
}
},
methods: {
getOrderDetails() {
this.$http.get({
api: 'api/order/' + this.order_no,
header: {
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.order_details = res.data.data;
})
},
searchLogistics() {
this.$http.get({
api: 'api/express/query',
data: {
no: this.order_no
},
header: {
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.logistics_data = res.data.data;
})
},
copy(){
uni.setClipboardData({
data: '你好'
data: this.order_no
})
}
}

38
pages/order/newdetail/newdetail.vue

@ -20,18 +20,20 @@
:day="order_details.last_pay_time[0]"
:hour="order_details.last_pay_time[1]"
:minute="order_details.last_pay_time[2]"
:second="order_details.last_pay_time[3]">
:second="order_details.last_pay_time[3]"
color="white"
splitorColor="white"
>
</countdown-time>
</view>
</view>
<!-- 待收货 -->
<view class="tips-waitconfirm" v-if="order_details.pick_self == 0">
<view class="tips-waitconfirm" v-if="order_details.pick_self == 0 && order_details.status == 3">
<view class="lf-flex-column">
<view class="lf-font-28 lf-color-white">运输中</view>
<view class="lf-font-24 lf-color-white" v-if="true">广州转运中心公司 已发出下一站南宁转运中心</view>
<view class="lf-font-24 lf-color-white" v-else>[自提柜]已签收签收人凭取货码签收</view>
<view class="lf-font-28 lf-color-white">{{logistics_data.state_text}}</view>
<view class="lf-font-24 lf-color-white" style="width: 540rpx;">{{logistics_data.data[0].context}}</view>
</view>
<view class="waitconfirm-tag">
<view class="waitconfirm-tag" @click="$url('/pages/order/newdetail/logistics?order_no='+order_no)">
查看详情
</view>
</view>
@ -65,7 +67,8 @@
<view class="lf-font-26 lf-color-333 lf-line-1">{{item.item_name}}</view>
<view class="lf-font-24 lf-color-777">{{item.item_meta.specs_text}}</view>
<view class="lf-row-between" style="line-height: 1;">
<text class="price">¥{{item.total_yuan}}</text>
<text class="price" v-if="type == 'point'">{{item.redeem_point}}积分</text>
<text class="price" v-else>¥{{item.total_yuan}}</text>
<text class="lf-font-28 lf-color-777">x {{item.quantity}}</text>
</view>
</view>
@ -245,6 +248,7 @@
color: '#000000', //
}
},
logistics_data: {}
}
},
components: {
@ -258,9 +262,23 @@
console.log('字体',this.pick_type)
if (this.order_no) {
this.getOrderDetails();
this.searchLogistics();
}
},
methods: {
searchLogistics() {
this.$http.get({
api: 'api/express/query',
data: {
no: this.order_no
},
header: {
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.logistics_data = res.data.data;
})
},
//
copy(text) {
uni.setClipboardData({
@ -331,7 +349,7 @@
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.order_details = res.data.data
this.order_details = res.data.data;
this.config.qrc.code = JSON.stringify({
u_id: this.order_details.user_id,
no: this.order_details.order_no
@ -366,11 +384,11 @@
}
.tips-waitconfirm {
width: 100%;
height: 113rpx;
height: max-content;
background: #15716E;
display: flex;
justify-content: space-between;
padding: 0 32rpx;
padding: 10rpx 32rpx;
align-items: center;
}

550
pages/order/pointconfirm/confirm.vue

@ -0,0 +1,550 @@
<template>
<view>
<lf-nav title="确认订单" :showIcon="true"></lf-nav>
<block v-if="$isRight(order_detail)">
<view class="card head">
<view class="lf-font-32 lf-color-222">选择收货方式</view>
<view class="capsule">
<view class="item" :class="{'capsule-active': mode == 0}" @click="mode = 0">邮寄</view>
<view class="item" :class="{'capsule-active': mode == 1}" @click="mode = 1">自提</view>
</view>
</view>
<view class="card address" v-if="mode == 0">
<view @click="$url('/pages/address/list/list?is_select=1')">
<text class="lf-font-28 lf-color-primary lf-m-r-10">更换收获地址</text>
<text class="lf-iconfont icon-xiangyou lf-font-24 lf-color-777"></text>
</view>
<view v-if="address">
<view class="lf-m-t-20">
<text class="lf-font-28 lf-color-222 lf-font-bold">{{ address.accept_name }}</text>
<text class="lf-font-28 lf-color-777 lf-m-l-20">{{ address.mobile }}</text>
</view>
<view class="lf-font-28 lf-color-333 lf-m-t-10">
<text>{{ address.address_name }}{{ address.address }}</text>
</view>
</view>
<view v-else class="lf-font-28 lf-color-777">
暂无收货地址,请前往添加
</view>
</view>
<view class="card address" v-else>
<view @click="$url('/pages/address/list/list?is_select=1')">
<text class="lf-font-28 lf-color-primary lf-m-r-10">店铺地址</text>
</view>
<view v-if="address">
<view class="lf-m-t-20">
<text class="lf-font-28 lf-color-222 lf-font-bold">{{ order_detail.brand.name }}</text>
<text class="lf-font-28 lf-color-777 lf-m-l-20">{{ order_detail.brand.tel }}</text>
</view>
<view class="lf-font-28 lf-color-333 lf-m-t-10">
<text>{{ order_detail.brand.floor }}</text>
</view>
</view>
<view v-else class="lf-font-28 lf-color-777">
暂无收货地址,请前往添加
</view>
</view>
<view class="card goods">
<view @click="$url('/pages/shop/shopdetail?id='+ order_detail.brand.id)">
<text class="lf-iconfont icon-Group- lf-font-30"></text>
<text class="shop-name">{{ order_detail.brand.name }}</text>
<text class="lf-iconfont icon-xiangyou lf-font-24"></text>
</view>
<view class="lf-flex lf-m-t-20" v-for="(item, index) in order_detail.order.items" :key="index">
<image class="goods-img" :src="item.item_meta.image"></image>
<view class="info">
<view class="lf-font-26 lf-color-333 lf-line-1">{{ item.item_name }}</view>
<view class="lf-font-24 lf-color-777">{{ item.item_meta.specs_text }}</view>
<view class="lf-row-between" style="line-height: 1;">
<text class="price"><text v-if="goods_type==1">¥</text>{{ item.redeem_point }}<text class="lf-font-24" v-if="goods_type==0">积分</text></text>
<text class="lf-font-28 lf-color-777">x {{ item.quantity }}</text>
</view>
</view>
</view>
<!-- <view class="tips">支付成功后15天内柜台提货</view> -->
<view class="lf-flex lf-m-t-20">
<view class="lf-font-28 lf-color-777">留言</view>
<input v-model="value" class="input" placeholder="有什么要求,请备注留言" />
</view>
</view>
<view class="card lf-m-t-20">
<view class="lf-row-between lf-m-t-20">
<view class="lf-font-28 lf-color-777">商品金额</view>
<view class="lf-font-26 lf-color-222"><text v-if="goods_type==1">¥</text>{{ order_detail.order.redeem_point }}<text v-if="goods_type==0">积分</text></view>
</view>
<view class="lf-row-between lf-m-t-20" v-if="mode == 0">
<view class="lf-font-28 lf-color-777">运费</view>
<view class="lf-font-26" style="color: #F63434;">+¥{{ order_detail.order.payable_freight_yuan }}</view>
</view>
</view>
<view class="spread-out"></view>
<view class="fixed-bottom" v-if="$isRight(order_detail.order)">
<view class="fixed-content">
<view class="lf-font-24 lf-color-777">{{ order_detail.order.count }}</view>
<view class="lf-flex">
<!-- <view class="lf-font-32 lf-color-primary" style="max-width: 400rpx;">合计 ¥{{ order_detail.order.total_yuan }}</view> -->
<view class="lf-font-32 lf-color-primary" style="max-width: 400rpx;">
<text class="lf-m-r-10">运费: {{order_detail.order.payable_freight_yuan}}</text>
<text>积分: {{order_detail.order.redeem_point}}积分</text>
</view>
<view class="confirm-btn" hover-class="lf-opacity" @click="confirm">立即兑换</view>
</view>
</view>
</view>
<!-- 选择优惠券弹出层 -->
<u-popup v-model="show_coupon" mode="bottom" :round="true" borderRadius="20">
<view class="popup-content">
<view class="lf-row-between" v-for="(item, index) in order_detail.coupons" :key="index">
<radio-group @change="couponChange">
<radio :value="index" :checked="coupon_index == index"></radio>
</radio-group>
<view class="coupon-card lf-m-b-30" :class="{'invalid-bg': item.ifpast == true}">
<view class="coupon-circle-top">
<view class="coupon-circle1"></view>
</view>
<view class="coupon-circle-bottom">
<view class="coupon-circle1"></view>
</view>
<view class="coupon-radius">
<view class="coupon-left">
<view class="lf-font-36 lf-color-white" style="line-height: 1;" v-if="item.discount.action_type.type == 'cash'">
<text v-if="goods_type==1"></text>
<text class="lf-font-70 lf-font-bold">{{item.discount.action_type.value}}</text>
<text v-if="goods_type==0">积分</text>
</view>
<view class="lf-font-36 lf-color-white" style="line-height: 1;" v-if="item.discount.action_type.type == 'discount'">
<text class="lf-font-70 lf-font-bold">{{item.discount.action_type.value}}</text>
<text>%</text>
</view>
<view class="coupon-tag" v-if="item.used_at != ''">
已使用
</view>
<view class="coupon-tag" v-if="item.ifpast">
已过期
</view>
<view class="coupon-tag" v-if="!item.ifpast && item.used_at == ''">
待使用
</view>
</view>
<view class="coupon-right">
<view class="lf-font-32 lf-font-bold lf-color-white">{{item.discount.title}}</view>
<view class="lf-font-24 lf-color-white">有效期{{item.discount.starts_at}}~{{item.discount.ends_at}}</view>
</view>
</view>
</view>
</view>
<!-- 不使用优惠券 -->
<view class="lf-flex">
<radio-group @change="couponChange">
<radio value="null" :checked="coupon_index == null"></radio>
</radio-group>
<view>不使用优惠券</view>
</view>
</view>
</u-popup>
</block>
</view>
</template>
<script>
import Bigc from '@/common/js/bigc.js';
export default {
data(){
return {
mode: 0, // 01
value: '', //
token: '',
address: {},
address_id: null,
order_detail: {coupons: []},
show_coupon: false,
coupon_index: null,
goods_type: 0,
params: {}
}
},
computed: {
showCouponTitle(){
if(this.coupon_index != null){
return this.order_detail.coupons[this.coupon_index].discount.title;
}else{
if(this.order_detail.coupons.length){
return '不使用优惠券';
}else{
return '暂无可用优惠券';
}
}
},
totalPrice(){
let order = this.order_detail.order;
if(!this.$isRight(order)){
return 0;
}
if(this.mode){
return order.total_yuan;
}else{
return new Bigc(order.total_yuan).plus(order.payable_freight_yuan);
}
}
},
onLoad(e){
this.token = this.$cookieStorage.get('user_token');
this.goods_type = e.goods_type;
if(e.product_id) {
this.params = {
quantity: e.quantity,
product_id: e.product_id
}
}else {
this.params = {
quantity: e.quantity,
goods_id: e.goods_id
}
}
this.getPointDetails();
},
onUnload(){
this.$cookieStorage.clear('order_confirm');
},
onShow(){
if(this.address_id){
this.getSelectAddress();
}
},
methods: {
getPointDetails() {
uni.showLoading({
title: '正在生成订单'
})
this.$http.post({
api: 'api/shopping/order/checkout/point',
data: this.params,
header: {
Authorization: this.token
}
}).then(res => {
if(res.data.code == true){
let detail = res.data.data;
this.order_detail = detail;
this.address = res.data.data.address;
uni.hideLoading()
}else{
this.$msg('订单提交失败!', {icon: 'error'})
}
}).catch(err => uni.hideLoading())
},
//
getDefaultAddress(){
this.$http.get({
api: 'api/address/default',
header: {
Authorization: this.token
}
}).then(res => {
this.address = res.data.data || {};
})
},
//
getSelectAddress(){
this.$http.get({
api: 'api/address/'+ this.address_id,
header: {
Authorization: this.token
}
}).then(res => {
this.address = res.data.data || {};
})
},
//
openCheckCoupon(){
if(this.order_detail.coupons.length){
this.show_coupon = true;
}else{
this.$msg('您没有可用的优惠券哦');
}
},
//
confirm(){
console.log(this.address)
if(this.address == null) {
this.$msg('请先添加收货地址!');
return
}
this.$http.post({
api: 'api/shopping/order/confirm/point',
data: {
order_no: this.order_detail.order.order_no,
// discount_id: 0, // id? TODO
pick_self: this.mode, // 0 1
address_id: this.address.id,
note: this.value
},
header: {
Authorization: this.token
}
}).then(res => {
if(res.data.code == 200 || res.data.code == true){
console.log(res.data.data)
if(res.data.data.order.payable_freight_yuan > 0) {
let order = res.data.data.order;
let url = '/pages/order/cashier/cashier';
url += '?amount='+ order.payable_freight_yuan;
url += '&order_no='+ order.order_no;
this.$url(url, {type: 'redirect'});
}else {
this.$msg('兑换成功')
setTimeout(() => {
this.$toBack()
},1000)
}
}else{
this.$msg(res.data.message);
}
})
},
//
couponChange(event){
if(event.detail.value == 'null'){
this.coupon_index = null;
}else{
this.coupon_index = Number(event.detail.value);
}
}
}
}
</script>
<style>
page{
background-color: #F8F8F8;
}
</style>
<style lang="scss" scoped="scoped">
.card{
height: max-content;
width: 750rpx;
padding: 30rpx 32rpx;
background-color: #FFFFFF;
}
.head{
.capsule{
width: 614rpx;
height: 100rpx;
margin: 30rpx auto 0;
border-radius: 100px;
border: 2rpx solid #15716E;
display: flex;
overflow: hidden;
.item{
width: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: bold;
color: #15716E;
}
.capsule-active{
background-color: #15716E;
color: #FFFFFF;
}
}
}
.address{
margin-top: 20rpx;
}
.goods{
margin-top: 20rpx;
.shop-name{
font-size: 28rpx;
color: #222222;
font-weight: bold;
margin: 0 15rpx;
}
.goods-img{
width: 130rpx;
height: 130rpx;
border-radius: 4rpx;
margin-right: 15rpx;
background-color: #EEEEEE;
}
.info{
width: 540rpx;
height: 130rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.price{
font-size: 32rpx;
color: #F63434;
font-weight: bold;
}
}
.tips{
font-size: 22rpx;
margin-top: 30rpx;
color: #15716E;
}
.input{
margin-left: 30rpx;
font-size: 28rpx;
width: 596rpx;
}
}
.spread-out{
height: 138rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
box-sizing: content-box;
}
.fixed-bottom{
position: fixed;
left: 0;
bottom: 0;
width: 750rpx;
height: max-content;
background-color: #FFFFFF;
border-top: 1rpx solid #e5e5e5;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.fixed-content{
width: 100%;
height: 118rpx;
padding: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.confirm-btn{
width: 167rpx;
height: 80rpx;
background: #15716E;
border-radius: 40rpx;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
margin-left: 30rpx;
font-size: 26rpx;
}
}
}
.popup-content{
width: 750rpx;
height: max-content;
max-height: 70vh;
overflow-y: scroll;
padding: 40rpx 32rpx;
background: #FFFFFF;
}
.coupon-circle1 {
width: 40rpx;
height: 40rpx;
background-color: white;
border-radius: 50%;
}
.coupon-circle-top {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
// background-color: red;
position: absolute;
border: 1px dashed #ccc;
left: 190rpx;
top: -20rpx;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
.coupon-circle-bottom {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
// background-color: red;
position: absolute;
border: 1px dashed #ccc;
left: 190rpx;
bottom: -20rpx;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
}
.coupon-right {
text-align: left;
justify-content: center;
align-items: flex-start;
display: flex;
flex-direction: column;
margin-left: 90rpx;
}
.coupon-left {
margin-left: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.coupon-tag {
width: max-content;
margin-top: 10rpx;
padding: 0 24rpx;
height: 43rpx;
border-radius: 22rpx;
border: 2rpx solid #FFFFFF;
font-size: 24rpx;
color: white;
}
.coupon-wrap {
display: flex;
justify-content: center;
margin-top: 30rpx;
flex-direction: column;
align-content: center;
align-items: center;
}
.coupon-card {
overflow: hidden;
position: relative;
display: flex;
align-items: center;
justify-content: center;
// width: 674rpx;
width: 626rpx;
height: 171rpx;
background: #15716E;
border-radius: 20rpx;
}
.invalid-bg{
background-color: #999999;
}
.coupon-radius {
// width: 664rpx;
width: 616rpx;
display: flex;
height: 161rpx;
border: 1rpx dashed #ccc;
// background: #15716E;
border-radius: 20rpx;
}
/deep/.u-scroll-box {
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
}
/deep/.special_tab .u-tabs .u-scroll-box .u-tab-bar {
background-color: #15716E!important;
width: 80rpx!important;
position: absolute;
height: 10rpx;
left: 0;
border-radius: 8rpx 8rpx 0px 0px!important;
bottom: -12rpx;
}
/deep/ .u-tab-item {
font-size: 28rpx!important;
}
</style>

2
pages/point/exchangeRecord/exchangeRecord.vue

@ -19,7 +19,7 @@
<view class="lf-font-26 lf-color-333 lf-line-2">{{item2.item_name}}</view>
<view class="lf-row-between" style="line-height: 1;">
<text class="lf-font-24 lf-color-777">{{item2.item_meta.specs_text}}</text>
<text class="lf-font-32 lf-color-primary lf-font-bold">{{item2.total_yuan}}</text>
<text class="lf-font-32 lf-color-primary lf-font-bold">{{item2.redeem_point}}积分</text>
</view>
</view>
</view>

45
pages/shop/goodsdetail.vue

@ -7,14 +7,31 @@
<swiper :current="current" :indicator-dots="pictures.length > 1" :circular="true" class="swiper-box" indicator-active-color="#1998FE">
<swiper-item v-for="(item, index) in pictures" :key="index">
<image mode="aspectFill" :src="item" style="width: 100%; height: 100%;" @click="lookImg(index)"></image>
<view class="seckill-box" v-if="type == 'seckill'">
<view class="seckill-box" v-if="type == 'seckill' && $isRight(seckill.seckill.end_left_time)" style="z-index: 999;">
<view>距离结束还剩余</view>
<view v-if="$isRight(seckill)">
<countdown-time
<view v-if="$isRight(seckill.seckill.end_left_time)">
<countdown-time
:day="seckill.seckill.end_left_time[0]"
:hour="seckill.seckill.end_left_time[1]"
:minute="seckill.seckill.end_left_time[2]"
:second="seckill.seckill.end_left_time[3]">
:second="seckill.seckill.end_left_time[3]"
color="white"
splitorColor="white"
>
</countdown-time>
</view>
</view>
<view class="seckill-box" v-if="type == 'seckill' && $isRight(seckill.seckill.start_left_time)" style="z-index: 999;">
<view>距离开始还剩余</view>
<view v-if="$isRight(seckill.seckill.start_left_time)">
<countdown-time
:day="seckill.seckill.start_left_time[0]"
:hour="seckill.seckill.start_left_time[1]"
:minute="seckill.seckill.start_left_time[2]"
:second="seckill.seckill.start_left_time[3]"
color="white"
splitorColor="white"
>
</countdown-time>
</view>
</view>
@ -23,10 +40,10 @@
<!-- 商品主要信息 -->
<view class="head-info">
<view class="lf-row-between">
<view class="lf-row-between">
<view v-if="type == 'point'">
<text class="lf-font-48 lf-color-primary lf-font-bold">{{ goods_detail.redeem_point }}</text>
<text class="lf-font-28 lf-color-777 lf-m-l-10">个兑换</text>
<text class="lf-font-28 lf-color-777 lf-m-l-10">积分兑换</text>
</view>
<lf-price :iftext="false" :price="goods_detail.sell_price || 0" v-else></lf-price>
<text class="lf-iconfont icon-fenxiang lf-font-40" @click="shareGraphic()"></text>
@ -169,7 +186,7 @@
<button class="btn" style="width: 349rpx;" @click="shoot(2)">立即秒杀</button>
</view>
<view v-else-if="type == 'point'">
<button class="btn" style="width: 349rpx;">立即兑换</button>
<button class="btn" style="width: 349rpx;" @click="shoot(3)">立即兑换</button>
</view>
<view class="lf-flex" v-else>
<button class="btn1" @click="shoot(1)">加入购物车</button>
@ -390,7 +407,8 @@
let specs = this.goods_stock.specs;
let stores = this.goods_stock.stores;
let par = {};
let have_specs = '';
let no_specs = '';
if(this.$isRight(specs)){
let s_id_1 = 1;
@ -429,6 +447,7 @@
name: goods_detail.name,
qty: this.goods_num
}
have_specs = stores[id_1 +'-'+ id_2].id;
}else{
par = {
attributes: {
@ -443,6 +462,7 @@
name: goods_detail.name,
qty: this.goods_num
}
no_specs = goods_detail.id;
}
//
if(this.$isRight(this.seckill)){
@ -493,6 +513,15 @@
// }
// uni.hideLoading()
// }).catch(err => uni.hideLoading())
}else if(this.click_type == 3) {
let params = {};
if(have_specs) {
uni.hideLoading()
this.$url('/pages/order/pointconfirm/confirm?quantity='+this.goods_num+'&product_id='+have_specs+'&goods_type=0')
}else {
uni.hideLoading()
this.$url('/pages/order/pointconfirm/confirm?quantity='+this.goods_num+'&goods_id='+no_specs+'&goods_type=0')
}
}
},
//

Loading…
Cancel
Save