|
|
<template>
|
|
|
<view class="content">
|
|
|
<view class="sureordertop flextwo" @click="addaddress">
|
|
|
<!-- @click="addaddress" -->
|
|
|
<view class="sureordername" v-if="addressitem==''">请选择地址</view>
|
|
|
<view class="addresstop" v-else>
|
|
|
<view class="addressname flexone">
|
|
|
<view class="sureordername">
|
|
|
{{addressitem.name}}
|
|
|
<view class="ordercontent">
|
|
|
<view class="sureordertop flextwo" @click="addaddress" v-if="postage_type3==1||postage_type2==1||postage_type1==1">
|
|
|
<!-- @click="addaddress" -->
|
|
|
<view class="sureordername" v-if="addressitem==''">请选择地址</view>
|
|
|
<view class="addresstop" v-else>
|
|
|
<view class="addressname flexone">
|
|
|
<view class="sureordername">
|
|
|
{{addressitem.name}}
|
|
|
</view>
|
|
|
<view class="sureorderphone">{{addressitem.phone}}</view>
|
|
|
</view>
|
|
|
<view class="addresstitle">
|
|
|
{{addressitem.province_name}}{{addressitem.city_name}}{{addressitem.county_name}}{{addressitem.address}}
|
|
|
</view>
|
|
|
<view class="sureorderphone">{{addressitem.phone}}</view>
|
|
|
</view>
|
|
|
<view class="addresstitle">
|
|
|
{{addressitem.province_name}}{{addressitem.city_name}}{{addressitem.county_name}}{{addressitem.address}}
|
|
|
<view class="yourowk">
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="yourowk">
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="sureshop sureshopk">
|
|
|
<!-- 店铺商品 -->
|
|
|
<view class="bigbox" v-if="goodinfo.data3.length!=0">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="sureshopname">{{goodinfo.data3[0].name}}</view>
|
|
|
</view>
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data3[0].goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<image :src="item.store_goods_spec.spec_image" mode=""></image>
|
|
|
<view class="sureshop sureshopk">
|
|
|
<!-- 店铺商品 -->
|
|
|
<view class="bigbox" v-if="goodinfo.data3.length!=0">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
<view class="sureshopname">{{goodinfo.data3[0].name}}</view>
|
|
|
</view>
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data3[0].goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<image :src="item.store_goods_spec.spec_image" mode=""></image>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="delivery flextwo">
|
|
|
<view class="deliveryleft">配送服务</view>
|
|
|
<view class="deliveryright flexone">
|
|
|
<picker @change="bindgoodChange" :value="goodindex" :range="goodservicearr" range-key="name">
|
|
|
<view class="deliveryname">{{goodpeiname}}</view>
|
|
|
</picker>
|
|
|
<view class="delivery flextwo">
|
|
|
<view class="deliveryleft">配送服务</view>
|
|
|
<view class="deliveryright flexone">
|
|
|
<picker @change="bindgoodChange" :value="goodindex" :range="goodservicearr" range-key="name">
|
|
|
<view class="deliveryname">{{goodpeiname}}</view>
|
|
|
</picker>
|
|
|
|
|
|
<view class='yourow'>
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
<view class='yourow'>
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent">
|
|
|
<view class='markname'>店铺备注</view>
|
|
|
<view class="marktext">
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="entershopmessage" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data3[0].goods_total}}</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data3[0].postage_price}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data3[0].goods_total*100/100+goodinfo.data3[0].postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent">
|
|
|
<view class='markname'>店铺备注</view>
|
|
|
<view class="marktext">
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="entershopmessage" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data3[0].goods_total}}</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data3[0].postage_price}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data3[0].goods_total*100/100+goodinfo.data3[0].postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<div class="botbox" v-if="goodinfo.data1.flour_goods!=undefined"></div>
|
|
|
<!-- 面坊商品 -->
|
|
|
<view class="bigbox" v-if="goodinfo.data1.flour_goods!=undefined">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
<div class="botbox" v-if="goodinfo.data1.flour_goods!=undefined"></div>
|
|
|
<!-- 面坊商品 -->
|
|
|
<view class="bigbox" v-if="goodinfo.data1.flour_goods!=undefined">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="sureshopname">面坊商品</view>
|
|
|
</view>
|
|
|
<view class="sureshopname">面坊商品</view>
|
|
|
</view>
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data1.flour_goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<!-- <image :src="item.score_goods_spec.spec_image" mode=""></image> -->
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data1.flour_goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<!-- <image :src="item.score_goods_spec.spec_image" mode=""></image> -->
|
|
|
</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view class="delivery flextwo">
|
|
|
<view class="deliveryleft">配送服务</view>
|
|
|
<view class="deliveryright flexone">
|
|
|
<picker @change="bindmianChange" :value="mianindex" :range="servicearr" range-key="name">
|
|
|
<view class="deliveryname">{{mianpeiname}}</view>
|
|
|
</picker>
|
|
|
|
|
|
<view class='yourow'>
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent">
|
|
|
<view class='markname'>店铺备注</view>
|
|
|
<view class="marktext">
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="entermianfangrmark"/>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
</view>
|
|
|
<!-- <view class="delivery flextwo markcontent">
|
|
|
<view class="deliveryleft flexone">
|
|
|
<view class='jifen'>可用积分抵扣50</view>
|
|
|
<view class="jifenimg">
|
|
|
<image src="../../static/gantan.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname">请输入抵扣积分</view>
|
|
|
</view> -->
|
|
|
<view class="delivery flextwo markcontent" @click="selectcoupon">
|
|
|
<view class="deliveryleft flexone">
|
|
|
<view class='jifen'>优惠劵</view>
|
|
|
<view class="jifenimg youimg">
|
|
|
<image src="../../static/gantan.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname">{{couponname}}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.goods_total}}</view>
|
|
|
</view>
|
|
|
<!-- <view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>积分抵扣</view>
|
|
|
<view class='deliveryitemname moneyright'>¥2600.00</view>
|
|
|
</view> -->
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>优惠券</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.discounts}}</view>
|
|
|
</view>
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.postage_price}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data1.goods_total*100/100+goodinfo.data1.postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
<div class="botbox" v-if="goodinfo.data2.score_goods!=undefined"></div>
|
|
|
<!-- 积分商品 -->
|
|
|
<view class="bigbox jibox" v-if="goodinfo.data2.score_goods!=undefined">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="sureshopname">积分商品</view>
|
|
|
</view>
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data2.score_goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<image :src="item.score_goods_spec.spec_image" mode=""></image>
|
|
|
</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="weightnumk flexone">
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="delivery flextwo">
|
|
|
<view class="deliveryleft">配送服务</view>
|
|
|
<view class="deliveryright flexone">
|
|
|
<picker @change="bindmianChange" :value="mianindex" :range="servicearr" range-key="name">
|
|
|
<view class="deliveryname">{{mianpeiname}}</view>
|
|
|
<picker @change="bindjiChange" :value="jiindex" :range="jifenservicearr" range-key="name">
|
|
|
<view class="deliveryname">{{jifenpeiname}}</view>
|
|
|
</picker>
|
|
|
|
|
|
<view class='yourow'>
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
</view>
|
...
|
...
|
@@ -124,135 +215,45 @@ |
|
|
<view class="delivery markcontent">
|
|
|
<view class='markname'>店铺备注</view>
|
|
|
<view class="marktext">
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="entermianfangrmark"/>
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="enterjifenremark"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- <view class="delivery flextwo markcontent">
|
|
|
<view class="delivery flextwo markcontent">
|
|
|
<view class="deliveryleft flexone">
|
|
|
<view class='jifen'>可用积分抵扣50</view>
|
|
|
<view class="jifenimg">
|
|
|
<image src="../../static/gantan.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname">请输入抵扣积分</view>
|
|
|
</view> -->
|
|
|
<view class="delivery flextwo markcontent" @click="selectcoupon">
|
|
|
<view class="deliveryleft flexone">
|
|
|
<view class='jifen'>优惠劵</view>
|
|
|
<view class='jifen'>可用积分抵扣</view>
|
|
|
<view class="jifenimg youimg">
|
|
|
<image src="../../static/gantan.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname">{{couponname}}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.goods_total}}</view>
|
|
|
</view>
|
|
|
<!-- <view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>积分抵扣</view>
|
|
|
<view class='deliveryitemname moneyright'>¥2600.00</view>
|
|
|
</view> -->
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>优惠券</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.discounts}}</view>
|
|
|
</view>
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data1.postage_price}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data1.goods_total*100/100+goodinfo.data1.postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
<div class="botbox" v-if="goodinfo.data2.score_goods!=undefined"></div>
|
|
|
<!-- 积分商品 -->
|
|
|
<view class="bigbox jibox" v-if="goodinfo.data2.score_goods!=undefined">
|
|
|
<view class="sureorderbox flexone">
|
|
|
<view class="sureimg">
|
|
|
<image src="../../static/nearshop.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="sureshopname">积分商品</view>
|
|
|
</view>
|
|
|
<view class="boxbox">
|
|
|
<view class="sureorderitem flex" v-for="(item,index) in goodinfo.data2.score_goods" :key="index">
|
|
|
<view class="sureorderitemleft">
|
|
|
<image :src="item.score_goods_spec.spec_image" mode=""></image>
|
|
|
</view>
|
|
|
<view class='shuright'>
|
|
|
<view class="suregoodnamek">{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="item.spec.length!=0">
|
|
|
<view class="spec" v-for="(item,index) in item.spec" :key="index">{{item.spec_name}}:{{item.spec_value}}</view>
|
|
|
</view>
|
|
|
<view class="surebot flexone">
|
|
|
<view class="saleprice">¥{{item.price}}</view>
|
|
|
<view class="weightnumk flexone">
|
|
|
<view class="detailnum">x{{item.number}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname dikouname">
|
|
|
<input type="number" value="" placeholder="请输入抵扣积分" placeholder-class="dikouinput" @input="enterjifen"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="delivery flextwo">
|
|
|
<view class="deliveryleft">配送服务</view>
|
|
|
<view class="deliveryright flexone">
|
|
|
<picker @change="bindjiChange" :value="jiindex" :range="jifenservicearr" range-key="name">
|
|
|
<view class="deliveryname">{{jifenpeiname}}</view>
|
|
|
</picker>
|
|
|
<view class='yourow'>
|
|
|
<image src="../../static/yourowk.png" mode=""></image>
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.goods_total}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent">
|
|
|
<view class='markname'>店铺备注</view>
|
|
|
<view class="marktext">
|
|
|
<textarea value="" placeholder="选填,给商家留言" @input="enterjifenremark"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery flextwo markcontent">
|
|
|
<view class="deliveryleft flexone">
|
|
|
<view class='jifen'>可用积分抵扣50</view>
|
|
|
<view class="jifenimg youimg">
|
|
|
<image src="../../static/gantan.png" mode=""></image>
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>积分抵扣</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.user_score}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="deliveryname dikouname">
|
|
|
<input type="text" value="" placeholder="请输入抵扣积分" placeholder-class="dikouinput" @input="enterjifen"/>
|
|
|
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.postage_price}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery markcontent markcontentk peibox">
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>商品金额</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.goods_total}}</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data2.goods_total*100/100+goodinfo.data2.postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>积分抵扣</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.user_score}}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="deliveryitem flextwo">
|
|
|
<view class='deliveryitemname'>运费</view>
|
|
|
<view class='deliveryitemname moneyright'>¥{{goodinfo.data2.postage_price}}</view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="delivery peidelivery markcontentk flextwo peiboxk">
|
|
|
<view class="deliveryleft">小计</view>
|
|
|
<view class="deliverymoney">¥{{goodinfo.data2.postage_price*100/100+goodinfo.data2.postage_price*100/100}}</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="huiyuanbot boxsizing flextwo">
|
|
|
|
|
|
<view class="huiyuanbot boxsizing flextwo totalbtn">
|
|
|
<view class="surezhifu">总计:{{goodinfo.total}}</view>
|
|
|
<view class="behuiyuanbtn behuiyuanbtnk" @click="surepay">确认支付</view>
|
|
|
</view>
|
...
|
...
|
@@ -316,11 +317,8 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
<view class="buybtn btnk" @click="paynow">确认支付(¥{{goodinfo.total}})</view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 优惠券使用规则 -->
|
...
|
...
|
@@ -344,6 +342,8 @@ |
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
// 是否显示收货地址
|
|
|
addresstrue:true,
|
|
|
buyshow: false,
|
|
|
couponrule:false,
|
|
|
goodinfo:'',
|
...
|
...
|
@@ -359,11 +359,11 @@ |
|
|
name:'上门自提'
|
|
|
},
|
|
|
],
|
|
|
mianpeiname:'请选择配送方式',
|
|
|
mianpeiname:'快递配送',
|
|
|
jifen:'',
|
|
|
couponname:'请选择优惠券',
|
|
|
// 面坊的配送方式
|
|
|
postage_type1:'',
|
|
|
postage_type1:1,
|
|
|
// 积分商品配送方式
|
|
|
jifenservicearr:[{
|
|
|
id:1,
|
...
|
...
|
@@ -375,8 +375,8 @@ |
|
|
},
|
|
|
],
|
|
|
jiindex:-1,
|
|
|
postage_type2:'',
|
|
|
jifenpeiname:'请选择配送方式',
|
|
|
postage_type2:1,
|
|
|
jifenpeiname:'快递配送',
|
|
|
|
|
|
//店铺商品
|
|
|
|
...
|
...
|
@@ -389,12 +389,12 @@ |
|
|
id:2,
|
|
|
name:'上门自提'
|
|
|
}],
|
|
|
goodpeiname:'请选择配送方式',
|
|
|
goodpeiname:'快递配送',
|
|
|
pay_type:-1,
|
|
|
user_ticket_id:'',
|
|
|
order_id:''
|
|
|
|
|
|
|
|
|
order_id:'',
|
|
|
//判断收货地址是否显示
|
|
|
postage_type3:''
|
|
|
// data1 面坊 data2 积分 data3 店铺
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -403,6 +403,13 @@ |
|
|
this.goodinfo=uni.getStorageSync("goodinfo");
|
|
|
|
|
|
this.seldata=JSON.parse(options.seldata)
|
|
|
this.seldata.forEach(function(value,index,array){
|
|
|
if(value.type==3){
|
|
|
value.postage_type=1;
|
|
|
}
|
|
|
})
|
|
|
this.seldata=this.seldata;
|
|
|
|
|
|
console.log(this.goodinfo)
|
|
|
},
|
|
|
|
...
|
...
|
@@ -416,14 +423,17 @@ |
|
|
bindmianChange(e){
|
|
|
this.mianpeiname=this.servicearr[e.target.value].name;
|
|
|
this.mianindex=e.target.value;
|
|
|
this.postage_type1=this.servicearr[e.target.value].id
|
|
|
this.postage_type1=this.servicearr[e.target.value].id;
|
|
|
|
|
|
this.changeorder();
|
|
|
},
|
|
|
// 积分商品的配送方式
|
|
|
bindjiChange(e){
|
|
|
this.jifenpeiname=this.servicearr[e.target.value].name;
|
|
|
|
|
|
this.jiindex=e.target.value;
|
|
|
this.postage_type2=this.servicearr[e.target.value].id
|
|
|
this.postage_type2=this.servicearr[e.target.value].id;
|
|
|
this.changeorder();
|
|
|
},
|
|
|
// 店铺商品的配送方式
|
|
|
bindgoodChange(e){
|
...
|
...
|
@@ -431,16 +441,32 @@ |
|
|
console.log(this.goodservicearr)
|
|
|
this.goodpeiname=this.goodservicearr[e.target.value].name;
|
|
|
this.goodindex=e.target.value;
|
|
|
// 店铺商品选择配送方式
|
|
|
this.seldata.forEach(function(value,index,array){
|
|
|
if(value.type==3){
|
|
|
value.postage_type=that.goodservicearr[e.target.value].id;
|
|
|
}
|
|
|
value.postage_type=that.goodservicearr[e.target.value].id;
|
|
|
}
|
|
|
})
|
|
|
|
|
|
this.changeorder();
|
|
|
|
|
|
that.seldata.forEach(function(value,index,array){
|
|
|
if( value.postage_type==1){
|
|
|
that.postage_type3=1;
|
|
|
}
|
|
|
})
|
|
|
|
|
|
},
|
|
|
// 输入积分
|
|
|
enterjifen(e){
|
|
|
this.jifen=e.detail.vlaue
|
|
|
console.log(222222);
|
|
|
console.log(e.detail.value)
|
|
|
|
|
|
|
|
|
this.jifen=e.detail.value;
|
|
|
console.log(this.jifen)
|
|
|
this.changeorder()
|
|
|
|
|
|
},
|
|
|
// 面坊商品备注
|
|
|
entermianfangrmark(e){
|
...
|
...
|
@@ -479,34 +505,57 @@ |
|
|
know(){
|
|
|
this.couponrule=false
|
|
|
},
|
|
|
getordertail(){
|
|
|
let that = this;
|
|
|
if(that.data.length==0){
|
|
|
uni.showToast({
|
|
|
title:'请选择商品',
|
|
|
icon:'none'
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
var url = 'order/confirm_order';
|
|
|
var params = {
|
|
|
data: JSON.stringify(that.data),
|
|
|
|
|
|
}
|
|
|
console.log(params)
|
|
|
app.post(url, params,"post").then((res) => {
|
|
|
console.log(res);
|
|
|
uni.navigateTo({
|
|
|
url:'/pages/nearshop/sureorder'
|
|
|
})
|
|
|
|
|
|
}).catch((err) => {
|
|
|
console.log(err)
|
|
|
|
|
|
})
|
|
|
// 修改价格
|
|
|
changeorder(){
|
|
|
let that = this;
|
|
|
var url = 'order/confirm_order';
|
|
|
console.log('获取的参数', that.seldata)
|
|
|
var params = {
|
|
|
data: JSON.stringify(that.seldata),
|
|
|
postage_type1:that.postage_type1,
|
|
|
postage_type2:that.postage_type2,
|
|
|
score:that.jifen,
|
|
|
remark1:that.remark1,
|
|
|
remark2:that.remark2,
|
|
|
pay_type:that.pay_type,
|
|
|
user_address_id:that.addressitem.id,
|
|
|
}
|
|
|
console.log(params)
|
|
|
app.post(url, params, "post").then((res) => {
|
|
|
console.log(res);
|
|
|
console.log(res.data.data);
|
|
|
that.goodinfo=res.data.data
|
|
|
// let seldata = JSON.stringify(that.data)
|
|
|
// uni.setStorageSync("goodinfo", res.data.data);
|
|
|
// uni.navigateTo({
|
|
|
// url: '/pages/nearshop/sureorder?seldata=' + seldata
|
|
|
// })
|
|
|
|
|
|
}).catch((err) => {
|
|
|
console.log(err)
|
|
|
uni.showToast({
|
|
|
title:err.msg,
|
|
|
icon:'none'
|
|
|
})
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//确认支付
|
|
|
surepay(){
|
|
|
let that=this;
|
|
|
|
|
|
if(that.postage_type1==1||that.postage_type2==1||that.postage_type3==1){
|
|
|
if(that.addressitem.id==undefined){
|
|
|
uni.showToast({
|
|
|
title:'请选择收货地址',
|
|
|
icon:'none'
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
that.addressitem.id==''
|
|
|
}
|
|
|
this.buyshow=true
|
|
|
},
|
|
|
hidebuy(){
|
...
|
...
|
@@ -515,13 +564,9 @@ |
|
|
// 确认支付
|
|
|
paynow(){
|
|
|
let that = this;
|
|
|
// if(that.data.length==0){
|
|
|
// uni.showToast({
|
|
|
// title:'请选择商品',
|
|
|
// icon:'none'
|
|
|
// })
|
|
|
// return false
|
|
|
// }
|
|
|
console.log(that.addressitem.id)
|
|
|
|
|
|
|
|
|
var url = 'order/create_order';
|
|
|
var params = {
|
|
|
data: JSON.stringify(that.seldata),
|
...
|
...
|
@@ -534,7 +579,7 @@ |
|
|
pay_type:that.pay_type,
|
|
|
user_address_id:that.addressitem.id
|
|
|
}
|
|
|
console.log(that.seldata)
|
|
|
console.log(that.seldata);
|
|
|
console.log(params)
|
|
|
app.post(url, params,"post").then((res) => {
|
|
|
console.log(res);
|
...
|
...
|
@@ -546,6 +591,10 @@ |
|
|
|
|
|
}).catch((err) => {
|
|
|
console.log(err)
|
|
|
uni.showToast({
|
|
|
title:err.msg,
|
|
|
icon:'none'
|
|
|
})
|
|
|
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -565,6 +614,11 @@ |
|
|
title:'支付成功',
|
|
|
icon:'none'
|
|
|
})
|
|
|
setTimeout(function(){
|
|
|
uni.navigateTo({
|
|
|
url:'/pages/usercenter/myOrder'
|
|
|
})
|
|
|
},1500)
|
|
|
|
|
|
}).catch((err) => {
|
|
|
console.log(err)
|
...
|
...
|
@@ -600,6 +654,15 @@ |
|
|
page{
|
|
|
background: #F8F6F9;
|
|
|
}
|
|
|
.ordercontent{
|
|
|
padding-bottom: 150rpx;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.totalbtn{
|
|
|
position: fixed;
|
|
|
bottom:0;
|
|
|
left:0;
|
|
|
}
|
|
|
.totalmoney{
|
|
|
color:#C29445;
|
|
|
font-size: 30rpx;
|
...
|
...
|
|