|
|
|
@ -1,21 +1,21 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view v-if="$isRight(goods_details)"> |
|
|
|
<view class="lf-bg-white lf-p-t-30 lf-p-b-30 lf-p-l-32 lf-p-r-32"> |
|
|
|
<view class="lf-row-between"> |
|
|
|
<image src="../../static/logo.png" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image> |
|
|
|
<image :src="goods_details.product.picture" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image> |
|
|
|
<view class="flex-sub padding-left-sm"> |
|
|
|
<view class="bref-box lf-font-32 lf-color-333 lf-line-2" style="height: 88rpx;line-height: 44rpx;"> |
|
|
|
南澳站·潮玩旅游胜地 身处亚热带风情/玩转南澳 |
|
|
|
{{goods_details.product.title}} |
|
|
|
</view> |
|
|
|
<view class="flex lf-m-t-25 align-center text-center"> |
|
|
|
<text class="block lf-color-gray lf-font-24" style="line-height: 40rpx;">数量</text> |
|
|
|
<text class="lf-m-l-10 lf-color-gray lf-font-24">x 1</text> |
|
|
|
<text class="lf-m-l-10 lf-color-gray lf-font-24">x {{goods_details.num}}</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="flex align-center text-center lf-m-t-25"> |
|
|
|
<lf-price :price="599.00" /> |
|
|
|
<lf-price :price="goods_details.price" /> |
|
|
|
<view class="lf-m-l-20 lf-line-through lf-color-gray"> |
|
|
|
599.00 |
|
|
|
{{goods_details.original_price}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -25,51 +25,72 @@ |
|
|
|
<view class="bg-white"> |
|
|
|
<view class="cu-bar padding-lr"> |
|
|
|
<text class="lf-color-555 lf-font-28">优惠</text> |
|
|
|
<text class="lf-color-price lf-font-28">活动优惠-50元</text> |
|
|
|
<view v-if="goods_details.coupon != ''"> |
|
|
|
<text class="lf-color-price lf-font-28 lf-m-r-10" v-for="(item,index) of goods_details.coupon">{{item.tag}}</text> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<text class="lf-color-price lf-font-28 lf-m-r-10">暂无优惠</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<self-line/> |
|
|
|
<view class="bg-white"> |
|
|
|
<view class="bg-white" v-if="btn_type!=2"> |
|
|
|
<view class="cu-bar padding-lr solid-bottom"> |
|
|
|
<text class="lf-color-555 lf-font-28">联系人</text> |
|
|
|
<input type="text" class="lf-color-999 lf-font-28 lf-text-right" placeholder="请输入联系人" /> |
|
|
|
<input type="text" v-model="contact" class="lf-color-999 lf-font-28 lf-text-right" placeholder="请输入联系人" /> |
|
|
|
</view> |
|
|
|
<view class="cu-bar padding-lr"> |
|
|
|
<text class="lf-color-555 lf-font-28">联系方式</text> |
|
|
|
<input type="text" class="lf-color-999 lf-font-28 lf-text-right" placeholder="请输入联系电话" maxlength="11" /> |
|
|
|
<input type="text" v-model="phone" class="lf-color-999 lf-font-28 lf-text-right" placeholder="请输入联系电话" maxlength="11" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<self-line/> |
|
|
|
<view class="bg-white"> |
|
|
|
<view class="bg-white" v-if="btn_type!=2"> |
|
|
|
<view class="lf-p-t-30 lf-p-l-32 lf-p-b-36"> |
|
|
|
<view class="lf-font-28 lf-color-555">支付方式</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="lf-p-r-32 lf-p-l-32"> |
|
|
|
<button class="cu-btn bg-white margin-self border-green" @tap="$url('/pages/order/order-details?order_id='+order_id,{type: 'launch'})"> |
|
|
|
<button class="cu-btn bg-white margin-self" :class="pay_type==0?'border-green':'border'" @tap="payStatus(0)"> |
|
|
|
<text class="lf-iconfont lf-icon-weixin text-green lf-font-44 lf-m-r-23"></text> |
|
|
|
<text class="lf-font-32 text-green">微信支付</text> |
|
|
|
<text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" style="position: absolute;right: 22rpx;"></text> |
|
|
|
<text class="lf-font-32" :class="pay_type==0?'text-green':'lf-color-333'">微信支付</text> |
|
|
|
<text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==0" style="position: absolute;right: 22rpx;"></text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="lf-p-r-32 lf-p-l-32 lf-m-t-30"> |
|
|
|
<button class="cu-btn bg-white margin-self" :class="pay_type==1?'border-green':'border'" @tap="payStatus(1)"> |
|
|
|
<text class="lf-font-32" :class="pay_type==1?'text-green':'lf-color-333'">定金支付</text> |
|
|
|
<text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==1" style="position: absolute;right: 22rpx;"></text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="lf-p-r-32 lf-p-l-32 lf-m-t-30"> |
|
|
|
<button class="cu-btn bg-white margin-self border" @tap="$url('/pages/order/order-details?order_id='+order_id,{type: 'launch'})"> |
|
|
|
<text class="lf-font-32 lf-color-333">线下支付</text> |
|
|
|
<button class="cu-btn bg-white margin-self" :class="pay_type==2?'border-green':'border'" @tap="payStatus(2)"> |
|
|
|
<text class="lf-font-32" :class="pay_type==2?'text-green':'lf-color-333'">首款支付</text> |
|
|
|
<text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==2" style="position: absolute;right: 22rpx;"></text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="lf-p-r-32 lf-p-l-32 lf-m-t-30"> |
|
|
|
<button class="cu-btn bg-white margin-self" :class="pay_type==3?'border-green':'border'" @tap="payStatus(3)"> |
|
|
|
<text class="lf-font-32" :class="pay_type==3?'text-green':'lf-color-333'">线下支付</text> |
|
|
|
<text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==3" style="position: absolute;right: 22rpx;"></text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="btn-bottom solid-top1"> |
|
|
|
<view class="padding-lr lf-p-t-10 lf-p-b-10 bg-white flex justify-between align-center shadow"> |
|
|
|
<view class="flex align-center"> |
|
|
|
<text class="lf-font-24 lf-font-555">应付款:</text> |
|
|
|
<lf-price :price="549.00" /> |
|
|
|
<lf-price :price="goods_details.final_price" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<button class="btn" @tap="submit"> |
|
|
|
<text class="lf-font-32 text-white" v-if="type == 1">立即付款</text> |
|
|
|
<text class="lf-font-32 text-white" v-else>下单付款</text> |
|
|
|
<text class="lf-font-32 text-white" v-if="btn_type == 1">下单付款</text> |
|
|
|
<text class="lf-font-32 text-white" v-else>支付尾款</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -77,6 +98,55 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
goods_id: 0, |
|
|
|
goods_details: {}, |
|
|
|
contact: '', |
|
|
|
phone: '', |
|
|
|
pay_type: 0, |
|
|
|
btn_type: 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
this.goods_id = e.goods_id; |
|
|
|
this.btn_type = e.btn_type |
|
|
|
if(this.goods_id) { |
|
|
|
this.getGoodsData(this.pay_type); |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
payStatus(type) { |
|
|
|
if(type == this.pay_type) { |
|
|
|
this.pay_type = type; |
|
|
|
return |
|
|
|
}else { |
|
|
|
this.pay_type = type; |
|
|
|
this.getGoodsData(type); |
|
|
|
} |
|
|
|
}, |
|
|
|
getGoodsData(type){ |
|
|
|
this.$http(this.API.API_CONFIRMDETAILS,{id: this.goods_id,num: 1,pay_type: type}).then(res => { |
|
|
|
this.goods_details = res.data; |
|
|
|
console.log(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
if(!this.contact) { |
|
|
|
this.$msg('请输入联系人!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!this.phone) { |
|
|
|
this.$msg('请输入联系电话!'); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$http(this.API.API_CREATEORDER,{id: this.goods_id,num: 1,pay_type: this.pay_type,name:this.contact,mobile:this.phone}).then(res => { |
|
|
|
console.log(res); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|
|