Feat(提交订单):UI调整(已完成)

This commit is contained in:
modendeveloper
2024-09-08 15:10:49 +08:00
parent b9b47ef816
commit 22f2e9779a
6 changed files with 215 additions and 126 deletions
+21 -7
View File
@@ -59,13 +59,18 @@ each(@colors, {
margin-bottom: @baseNum; margin-bottom: @baseNum;
} }
.v12-ma-@{i} { .v12-ma-@{i} {
margin: @baseNum; margin-left: @baseNum;
margin-right: @baseNum;
margin-bottom: @baseNum;
margin-top: @baseNum;
} }
.v12-mx-@{i} { .v12-mx-@{i} {
margin: 0 @baseNum; margin-left: @baseNum;
margin-right: @baseNum;
} }
.v12-my-@{i} { .v12-my-@{i} {
margin: @baseNum 0; margin-bottom: @baseNum;
margin-top: @baseNum;
} }
.v12-pt-@{i} { .v12-pt-@{i} {
padding-top: @baseNum; padding-top: @baseNum;
@@ -80,13 +85,18 @@ each(@colors, {
padding-bottom: @baseNum; padding-bottom: @baseNum;
} }
.v12-pa-@{i} { .v12-pa-@{i} {
padding: @baseNum; padding-top: @baseNum;
padding-bottom: @baseNum;
padding-right: @baseNum;
padding-left: @baseNum;
} }
.v12-px-@{i} { .v12-px-@{i} {
padding: 0 @baseNum padding-right: @baseNum;
padding-left: @baseNum;
} }
.v12-py-@{i} { .v12-py-@{i} {
padding: @baseNum 0 padding-top: @baseNum;
padding-bottom: @baseNum;
} }
.generateMarginAndPadding(@n, (@i + 1)) .generateMarginAndPadding(@n, (@i + 1))
} }
@@ -133,7 +143,11 @@ each(@colors, {
} }
.v12-justify-start{ .v12-justify-start{
display: flex; display: flex;
justify-content: start; justify-content: flex-start;
}
.v12-justify-end{
display: flex;
justify-content: flex-end;
} }
.v12-d-grid-columns-2 { .v12-d-grid-columns-2 {
display: grid; display: grid;
+4 -2
View File
@@ -61,7 +61,8 @@ export default {
return { return {
webUrl: this.$VUE_APP_RESOURCES_URL, webUrl: this.$VUE_APP_RESOURCES_URL,
current: 0, current: 0,
couponId: uni.getStorageSync('couponId') || 0 couponId: uni.getStorageSync('couponId') || 0,
selectItem: {}
} }
}, },
computed: { computed: {
@@ -88,6 +89,7 @@ export default {
}, },
selectCoupon(id) { selectCoupon(id) {
this.couponId = id this.couponId = id
this.selectItem = this.list.find(e => e.id === id)
this.list.map(item => { this.list.map(item => {
item.checked = id === item.id item.checked = id === item.id
}) })
@@ -95,7 +97,7 @@ export default {
setCoupon() { setCoupon() {
if (this.current === 1) return if (this.current === 1) return
uni.setStorageSync('couponId', this.couponId) uni.setStorageSync('couponId', this.couponId)
this.$emit('change') this.$emit('change', this.selectItem || {})
} }
} }
} }
+22 -12
View File
@@ -2,43 +2,43 @@
<view class="orderGoods"> <view class="orderGoods">
<view <view
v-if="title.length > 0" v-if="title.length > 0"
class="total acea-row row-middle" class="v12-pa-3 acea-row row-middle"
> >
<view <view
style="position: relative;" style="position: relative;"
class="acea-row row-left row-middle" class="acea-row row-left row-middle"
> >
<image <!-- <image
style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" style="width: 32rpx;height: 32rpx;margin-right: 12rpx;"
src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode="" src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""
/> /> -->
<text class="title"> <text class="title v12-font-32">
{{ title }} {{ title }}
</text> </text>
</view> </view>
</view> </view>
<view <view
v-else v-else
class="total" class=""
>{{ cartInfo.length }}件商品</view> >{{ cartInfo.length }}件商品</view>
<view class="goodWrapper"> <view class="goodWrapper">
<view <view
v-for="cart in cartInfo" v-for="cart in cartInfo"
:key="cart.id" :key="cart.id"
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
style="flex-wrap: nowrap;" style="flex-wrap: nowrap; border:none"
> >
<view class="pictrue" style="margin-right: 20rpx;"> <view class="pictrue" style="margin-right: 20rpx;">
<image :src="cart.productInfo.image" class="image" /> <image :src="cart.productInfo.image" class="image" />
</view> </view>
<view class="text"> <view class="text" style="height: 100%;justify-content: space-between;">
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="name line1 one-t">{{ cart.productInfo.storeName }}</view> <view class="name line1 one-t v12-font-bold">{{ cart.productInfo.storeName }}</view>
</view> </view>
<view class="acea-row row-middle row-between attr-wrap"> <view class="acea-row row-middle row-between attr-wrap">
<view <view
v-if="cart.productInfo.attrInfo" v-if="cart.productInfo.attrInfo"
class="attr more-t" class="more-t v12-font-24 v12-secondary-dark-text"
> >
规格{{ cart.productInfo.attrInfo.sku }} 规格{{ cart.productInfo.attrInfo.sku }}
</view> </view>
@@ -49,8 +49,12 @@
>评价</view> >评价</view>
</view> </view>
<view class="money font-color-lightred acea-row row-between"> <view class="money font-color-lightred acea-row row-between">
<text>{{ cart.truePrice }}</text> <view class="v12-font-bold">
<text class="num">x{{ cart.cartNum }}</text> <text class="v12-font-28 v12-dark-text">应付</text>
<text class="v12-font-22"></text>
<text class="v12-primary-text v12-font-28">{{ cart.truePrice }}</text>
</view>
<text class="num v12-dark-text">x{{ cart.cartNum }}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -86,6 +90,12 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.orderGoods{
border-radius: 20rpx 20rpx 0 0;
}
.item{
height: 160rpx !important;
}
.title{ .title{
font-size:26rpx; font-size:26rpx;
color:#080F1A; color:#080F1A;
@@ -99,10 +109,10 @@ export default {
display: block; display: block;
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
border-radius: 16rpx;
} }
.attr-wrap { .attr-wrap {
position: relative; position: relative;
min-height: 80rpx;
margin-top: 8rpx; margin-top: 8rpx;
align-items: flex-start; align-items: flex-start;
} }
-1
View File
@@ -655,7 +655,6 @@ export default {
submit() { submit() {
const ids = this.handleIds() const ids = this.handleIds()
if (ids.length === 0) return if (ids.length === 0) return
uni.$emit('chooseAddress1', this.addressInfo)
uni.navigateTo({ uni.navigateTo({
url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(this.addressInfo) url: '/pages/order/OrderSubmission/index?id=' + ids.join(',') + '&address=' + JSON.stringify(this.addressInfo)
}) })
+167 -103
View File
@@ -3,28 +3,26 @@
<view class="allAddress" style="background-color: #f6f6f6;"> <view class="allAddress" style="background-color: #f6f6f6;">
<view <view
class="address acea-row row-middle" class="address acea-row v12-align-start"
style="flex-wrap: nowrap;margin: 0 0 30rpx 0;border-radius: 16rpx;" style="flex-wrap: nowrap;margin: 0 0 30rpx 0;border-radius: 16rpx;"
v-if="shipping_type === 0" v-if="shipping_type === 0"
@click="addressTap" @click="addressTap"
> >
<image style="flex-shrink: 0;width: 48rpx;height: 48rpx;margin-right: 20rpx;" <image style="flex-shrink: 0;width: 36rpx;height: 36rpx;margin-right: 20rpx;"
:src="webUrl+'/20230304135530688212.png'" mode=""></image> :src="webUrl+'/orderIcon/map.png'" mode=""></image>
<view class="acea-row row-between-wrapper" style="flex-wrap: nowrap;flex-grow: 1;"> <view class="acea-row row-between-wrapper" style="flex-wrap: nowrap;flex-grow: 1;">
<view class="addressCon" v-if="addressInfo.realName"> <view class="addressCon" v-if="addressInfo.realName">
<view class="name"> <view class="more-t">
{{ addressInfo.realName }}
<text class="phone">{{ addressInfo.phone }}</text>
</view>
<view>
{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }} {{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }}
</view> </view>
<view class="name v12-font-28 v12-mt-3">
<text>{{ addressInfo.realName }}</text>
<text class="phone">{{ addressInfo.phone }}</text>
</view>
</view> </view>
<view class="addressCon" v-else> <view class="addressCon" v-else>
<view class="setaddress">设置收货地址</view> <view class="setaddress">设置收货地址</view>
</view> </view>
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
</view> </view>
</view> </view>
<div style="flex-wrap: nowrap;" class="address acea-row row-middle" v-else @click="showStoreList"> <div style="flex-wrap: nowrap;" class="address acea-row row-middle" v-else @click="showStoreList">
@@ -47,70 +45,154 @@
</div> </div>
</view> </view>
<OrderGoods :evaluate="0" :cartInfo="orderGroupInfo.cartInfo" title="商品列表"></OrderGoods> <OrderGoods :evaluate="0" :cartInfo="orderGroupInfo.cartInfo" title="商品信息"></OrderGoods>
<view class="wrapper" style="margin: 30rpx 0;border-radius: 16rpx;"> <view class="wrapper" style="margin:0;border-radius:0 0 20rpx 20rpx">
<view class="item acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-if="shipping_type === 0"> <view class="v12-pa-2 acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-if="shipping_type === 0">
<view class="acea-row row-middle" style="flex-wrap: nowrap;"> <view class="acea-row row-middle" style="flex-wrap: nowrap;">
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230820761721.png'" <!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230820761721.png'"
mode=""></image> mode=""></image> -->
<text class="">快递费用</text> <text class="v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">快递费用</text>
</view> </view>
<view class="discount" style="width: auto !important;"> <view class="discount v12-secondary-dark-text" style="width: auto !important;">
{{ orderPrice.payPostage > 0 ? force2Decimal(orderPrice.payPostage) : "免运费" }} {{ orderPrice.payPostage > 0 ? force2Decimal(orderPrice.payPostage) : "包邮" }}
</view> </view>
</view> </view>
<view v-else> <view v-else>
<view class="item acea-row row-between-wrapper"> <view class="v12-pa-2 acea-row row-between-wrapper">
<view>联系人</view> <view class="v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">联系人</view>
<view class="discount"> <view class="discount">
<input type="text" placeholder="请填写您的联系姓名" v-model="contacts"/> <input type="text" placeholder="请填写您的联系姓名" v-model="contacts"/>
</view> </view>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="v12-pa-2 acea-row row-between-wrapper">
<view>联系电话</view> <view class="v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx">联系电话</view>
<view class="discount"> <view class="discount">
<input type="text" placeholder="请填写您的联系电话" v-model="contactsTel"/> <input type="text" placeholder="请填写您的联系电话" v-model="contactsTel"/>
</view> </view>
</view> </view>
</view> </view>
<view class="item" style="z-index: -1"> <view class=" v12-pa-2 v12-justify-between " style="z-index: -1;">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230836494421.png'" <!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230836494421.png'"
mode=""></image> mode=""></image> -->
<text class="">备注信息150字以内)</text> <text class="v12-secondary-dark-text v12-pr-3 v12-text-right" style="width: 140rpx;">备注</text>
</view> </view>
<textarea v-model="mark"></textarea> <textarea v-model="mark" class="mark"></textarea>
</view> </view>
</view> </view>
<view class="wrapper" style="margin: 30rpx 0;border-radius: 16rpx;"> <!-- v12 -->
<view class="v12-mt-3">
<view class="v12-white v12-pa-3 v12-radius-20" >
<view class="v12-justify-between v12-align-center v12-py-1" >
<view class="v12-font-24 v12-dark-text">商品总价</view>
<view class="v12-secondary-dark-text">
<text class="v12-font-22 "></text>
<text class="v12-font-28">{{ force2Decimal(orderPrice.totalPrice) }}</text>
</view>
</view>
<view class="v12-justify-between v12-align-center v12-py-1" >
<view class="v12-font-24 v12-dark-text">运费</view>
<view class="v12-secondary-dark-text">
<text class="v12-font-22 "></text>
<text class="v12-font-28">{{ force2Decimal(orderPrice.payPostage) }}</text>
</view>
</view>
<view class="v12-justify-between v12-align-center v12-py-1">
<view class="v12-font-24 v12-dark-text v12-align-center">
<text>优惠券</text>
<view class="v12-align-center v12-ml-1" v-if="couponTitle">
<view class="v12-primary-text v12-primary-border v12-font-22 v12-radius-6 v12-px-1"></view>
<view class="v12-primary-text v12-primary-border v12-font-22 v12-radius-6 v12-px-1">{{ couponTitle }}</view>
</view>
</view>
<view class="v12-justify-between v12-align-center">
<view class="v12-mr-2" @click="changeCoupons">
<text class="v12-dark-text v12-font-24">{{ couponList.usable.length === 0 ? '无' : '去选择' }}</text>
<text class="iconfont icon-jiantou v12-font-24 v12-dark-text"></text>
</view>
<view class="v12-secondary-dark-text">
<text class="v12-font-22 ">-</text>
<text class="v12-font-28">{{ force2Decimal(orderPrice.couponPrice) }}</text>
</view>
</view>
</view>
<view class="v12-justify-between v12-align-center v12-py-1">
<view class="v12-font-24 v12-dark-text">积分抵扣</view>
<view class="v12-secondary-dark-text v12-align-center ">
<!-- <view class="v12-mr-2">
<u-switch
v-model="usePointsCheck"
size="14"
@change="usePointsCheckChange"
/>
</view> -->
<view>
<text class="v12-font-22 ">-</text>
<text class="v12-font-28">{{ force2Decimal(orderPrice.deductionPrice) }}</text>
</view>
</view>
</view>
</view>
<!-- <view class="coupon-cell">
<view class="flex jc-between ai-center">
<view class="title">积分抵扣</view>
<view class="flex ai-center">
<u-switch
v-model="usePointsCheck"
size="20"
@change="usePointsCheckChange"
/>
</view>
</view>
<view v-if="usePointsCheck" class="flex jc-between ai-center points-cell">
<view>积分{{ orderPrice.usedPoints }}</view>
<view class="flex ai-center">
-{{ force2Decimal(orderPrice.deductionPrice) }}
</view>
</view>
</view> -->
<!-- <view class="coupon-cell flex jc-between ai-center" @click="changeCoupons">
<view class="title">优惠券</view>
<view class="flex ai-center">
<text style="color:#999999" v-if="couponList.usable.length===0"></text>
<view class="flex ai-center" v-else>
<text style="color:#FF564A">{{ couponIndex < 0 ? '去选择' : -couponList.usable[couponIndex].couponPrice }}
</text>
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
</view>
</view>
</view> -->
</view>
<view class="wrapper" style="margin: 30rpx 0;border-radius: 20rpx;">
<view class="item"> <view class="item">
<!-- <view>支付方式</view> --> <!-- <view>支付方式</view> -->
<view class="acea-row row-left row-middle"> <view class="acea-row row-left row-middle">
<view class="acea-row row-middle" style="position: relative;"> <view class="acea-row row-middle" style="position: relative;">
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230846995104.png'" <!-- <image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" :src="webUrl+'/20210807230846995104.png'"
mode=""></image> mode=""></image> -->
<text class="pay-method-title">支付方式</text> <text class="v12-dark-text v12-font-32 v12-font-bold">支付方式</text>
<!-- <text class="pink-dot"></text> --> <!-- <text class="pink-dot"></text> -->
</view> </view>
</view> </view>
<view class="list"> <view class="list" style="margin-top: 0;">
<view <view
class="payItem acea-row row-middle" class="payItem acea-row row-middle"
:class="active === 'weixin' ? 'on' : ''" :class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')"
v-show="isWeixin" v-show="isWeixin"
style="flex-wrap: nowrap;" @click="payItem('weixin')"
style="flex-wrap: nowrap; margin-top: 0"
> >
<view class="name acea-row"> <view class="name acea-row v12-font-24">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> <!-- <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> -->
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/微信支付.png'" mode=""></image>
微信支付 微信支付
</view> </view>
<view class="tip">微信快捷支付</view> <view class="tip">微信快捷支付</view>
<label class="radio"> <label class="radio">
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#FF0000"/> <radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#C52733"/>
<text></text> <text></text>
</label> </label>
</view> </view>
@@ -119,15 +201,16 @@
:class="active === 'weixin' ? 'on' : ''" :class="active === 'weixin' ? 'on' : ''"
@click="payItem('weixin')" @click="payItem('weixin')"
v-show="!isWeixin" v-show="!isWeixin"
style="flex-wrap: nowrap;" style="flex-wrap: nowrap; margin-top: 10rpx"
> >
<view class="name acea-row "> <view class="name acea-row v12-font-24">
<view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> <!-- <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view> -->
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/微信支付.png'" mode=""></image>
微信支付 微信支付
</view> </view>
<view class="tip"></view> <view class="tip"></view>
<label class="radio"> <label class="radio">
<radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#FF0000"/> <radio style="transform: scale(0.7);" value="" :checked="active === 'weixin'" color="#C52733"/>
<text></text> <text></text>
</label> </label>
@@ -138,14 +221,15 @@
@click="payItem('yue')" @click="payItem('yue')"
style="flex-wrap: nowrap;" style="flex-wrap: nowrap;"
> >
<view class="name acea-row "> <view class="name acea-row v12-font-24">
<view style="background-color: #007AFF;" class="iconfont icon-icon-test" <!-- <view style="background-color: #007AFF;" class="iconfont icon-icon-test"
:class="active === 'yue' ? 'bounceIn' : ''"></view> :class="active === 'yue' ? 'bounceIn' : ''"></view> -->
<image style="flex-shrink: 0;width: 32rpx;height: 32rpx;margin-right: 10rpx;" :src="webUrl+'/orderIcon/余额宝.png'" mode=""></image>
余额支付 余额支付
</view> </view>
<view class="tip">可用余额{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}</view> <view class="tip">可用余额{{ userInfo.nowMoney ? force2Decimal(userInfo.nowMoney) : 0.00 }}</view>
<label class="radio"> <label class="radio">
<radio style="transform: scale(0.7);" value="" :checked="active === 'yue'" color="#FF0000"/> <radio style="transform: scale(0.7);" value="" :checked="active === 'yue'" color="#C52733"/>
<text></text> <text></text>
</label> </label>
@@ -153,53 +237,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="moneyList" style="margin-bottom:30rpx;border-radius: 16rpx;">
<view class="item acea-row row-between-wrapper" v-if="orderPrice.totalPrice !== undefined">
<view>商品总价</view>
<view class="money">{{ force2Decimal(orderPrice.totalPrice) }}</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0">
<view>运费</view>
<view class="money">{{ force2Decimal(orderPrice.payPostage) }}</view>
</view>
<!-- <view class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0">
<view>优惠券抵扣</view>
<view class="money">-{{ force2Decimal(orderPrice.couponPrice) }}</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.deductionPrice > 0">
<view>积分抵扣</view>
<view class="money">-{{ force2Decimal(orderPrice.deductionPrice) }}</view>
</view> -->
</view>
<view v-if="canUsePoints" class="coupon-cell">
<view class="flex jc-between ai-center">
<view class="title">积分抵扣</view>
<view class="flex ai-center">
<u-switch
v-model="usePointsCheck"
size="20"
@change="usePointsCheckChange"
/>
</view>
</view>
<view v-if="usePointsCheck" class="flex jc-between ai-center points-cell">
<view>积分{{ orderPrice.usedPoints }}</view>
<view class="flex ai-center">
-{{ force2Decimal(orderPrice.deductionPrice) }}
</view>
</view>
</view>
<view class="coupon-cell flex jc-between ai-center" @click="changeCoupons">
<view class="title">优惠券</view>
<view class="flex ai-center">
<text style="color:#999999" v-if="couponList.usable.length===0"></text>
<view class="flex ai-center" v-else>
<text style="color:#FF564A">{{ couponIndex < 0 ? '去选择' : -couponList.usable[couponIndex].couponPrice }}
</text>
<view class="iconfont icon-jiantou" style="flex-shrink: 0;"></view>
</view>
</view>
</view>
<!-- v9 优惠券开始 --> <!-- v9 优惠券开始 -->
<u-popup <u-popup
@@ -218,14 +256,23 @@
<!-- v9 优惠券结束 --> <!-- v9 优惠券结束 -->
<view style="height:80rpx"></view> <view style="height:80rpx"></view>
<view class="footer acea-row row-between-wrapper" style="height: 80rpx;"> <view class="footer v12-justify-end v12-px-3" style="height: 120rpx;">
<view style="margin-left: 30rpx;"> <view class="v12-align-center v12-px-4">
<text style="color: #000000;font-size: 24rpx;font-weight: bold;">合计:</text> <view class="v12-mr-2">
<text class="" style="color: #FF564A;font-size: 28rpx;font-weight: bold;"> <view>
{{ force2Decimal(orderPrice.payPrice) }} <text class="v12-font-28 v12-dark-text v12-mr-2">{{ total }}</text>
</text> <text class="v12-font-28 v12-dark-text v12-mr-1">合计:</text>
<text class="v12-font-22 v12-primary-text v12-font-bold"></text>
<text class="v12-font-36 v12-primary-text v12-font-bold">{{ force2Decimal(orderPrice.payPrice) }}</text>
</view>
<view class="v12-primary-text v12-font-22 v12-text-right">
<text>共减</text>
<text></text>
<text>{{ force2Decimal(orderPrice.totalPrice - orderPrice.payPrice) }}</text>
</view>
</view>
<view class="v12-primary v12-white-text v12-radius-60 v12-px-3 v12-py-2 v12-font-bold" @click="subscribePay">立即付款</view>
</view> </view>
<view class="settlement acea-row row-middle row-center" @click="subscribePay">立即结算</view>
</view> </view>
<AddressWindow <AddressWindow
v-model="showAddress" v-model="showAddress"
@@ -320,7 +367,9 @@ export default {
canUsePoints: false, canUsePoints: false,
// 订单最大可使用积分数量 // 订单最大可使用积分数量
maxPoints: 0, maxPoints: 0,
pageKeyId: Object.freeze('orderConfirm') pageKeyId: Object.freeze('orderConfirm'),
total: 0,
couponTitle: ''
}; };
}, },
computed: mapGetters(["userInfo", "storeItems"]), computed: mapGetters(["userInfo", "storeItems"]),
@@ -344,7 +393,6 @@ export default {
//地址切换也要重新计算一下 //地址切换也要重新计算一下
that.computedPrice('onLoad chooseAddress'); that.computedPrice('onLoad chooseAddress');
}) })
console.log(that.$yroute);
if (that.$yroute.query.pinkid !== undefined) { if (that.$yroute.query.pinkid !== undefined) {
that.pinkId = that.$yroute.query.pinkid; that.pinkId = that.$yroute.query.pinkid;
} }
@@ -399,6 +447,8 @@ export default {
}); });
} else { } else {
this.orderPrice = data.result; this.orderPrice = data.result;
console.log(this.orderPrice);
if (this.usePointsCheck) { if (this.usePointsCheck) {
this.usePointsNumber = data.result.usedPoints this.usePointsNumber = data.result.usedPoints
} else { } else {
@@ -438,6 +488,9 @@ export default {
_this.canUsePoints = data.canUsePoints _this.canUsePoints = data.canUsePoints
_this.maxPoints = data.maxPoints _this.maxPoints = data.maxPoints
// 如果允许使用积分,则默认开启 // 如果允许使用积分,则默认开启
_this.total = data.cartInfo.map(i => i.cartNum).reduce((a, b) => {
return a + b
}, 0)
if (data.canUsePoints) { if (data.canUsePoints) {
_this.usePointsCheck = true _this.usePointsCheck = true
_this.usePointsNumber = data.maxPoints _this.usePointsNumber = data.maxPoints
@@ -447,6 +500,8 @@ export default {
} else { } else {
_this.addressInfo = data.addressInfo || {} _this.addressInfo = data.addressInfo || {}
} }
_this.systemStore = data.systemStore || {} _this.systemStore = data.systemStore || {}
_this.storeSelfMention = data.storeSelfMention _this.storeSelfMention = data.storeSelfMention
_this.computedPrice() _this.computedPrice()
@@ -711,16 +766,25 @@ export default {
}); });
}, },
// v9-2 // v9-2
changeCoupons() { changeCoupons(item) {
if (this.couponList.usable.length === 0) return if (this.couponList.usable.length === 0) return
this.show = !this.show this.show = !this.show
this.couponId = uni.getStorageSync('couponId') || 0 this.couponId = uni.getStorageSync('couponId') || 0
this.couponTitle = item.couponTitle
}, },
} }
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.mark{
background: rgba(0,0,0,0.15);
height: 128rpx;
border-radius: 16rpx;
padding: 10px
}
.pink-dot { .pink-dot {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
@@ -860,7 +924,7 @@ export default {
.order-submission .allAddress .address { .order-submission .allAddress .address {
width: 6.91 * 100rpx; width: 6.91 * 100rpx;
height: 1.5 * 100rpx; height: 1.8 * 100rpx;
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -6,7 +6,7 @@
> >
<view style="margin-bottom: 12rpx;" class="line" v-if="addressList.length > 0"> <view style="margin-bottom: 12rpx;" class="line" v-if="addressList.length > 0">
<image :src="webUrl+'/20230304135025917856.png'"/> <!-- <image :src="webUrl+'/20230304135025917856.png'"/> -->
</view> </view>
<view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList" <view style="position: relative;" class="item" v-for="(item, addressListIndex) in addressList"
:key="addressListIndex" @click="tapAddress(item)"> :key="addressListIndex" @click="tapAddress(item)">