确认订单完成一半

version/0412
shuxiaoquan 9 months ago
parent 337458993b
commit 63ce060f4b
  1. 4
      manifest.json
  2. 2
      pages/cart/index.vue
  3. 3
      pages/checkout/index.vue
  4. 2
      pages/invite/index.vue
  5. 9
      pages/invite/list.vue
  6. 4
      pages/shop/extract.vue
  7. 560
      pages/sureOrder/index.vue

@ -114,13 +114,13 @@
"lazyCodeLoading" : "requiredComponents",
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于为您提供更合适您的服务"
"desc" : "获取当前所在城市位置"
}
},
"optimization" : {
"subPackages" : true
},
"requiredPrivateInfos" : [ "chooseAddress" ]
"requiredPrivateInfos" : [ "chooseAddress","getLocation" ]
},
"mp-alipay" : {
"usingComponents" : true

@ -575,7 +575,7 @@
.goods-price {
vertical-align: bottom;
color: $main-bg;
flex: 1;
.unit {
font-size: 24rpx;
}

@ -359,7 +359,8 @@
//
personal: {},
//
setting: {}
setting: {},
distance_unit: ""
}
},

@ -88,7 +88,7 @@
backgroundBg1: {
"background-color": "transparent"
},
isPopup: true,
isPopup: false,
info: {},
list: ["邀请更多好友,获得更多奖金"]
}

@ -3,14 +3,15 @@
<view class="user-bd">
<view class="li" v-for="(a,i) in list" :key="i">
<view class="l">
<image :src="$picUrl+'/static/news/avater.png'"></image>
<image v-if="a.invitee.money" :src="a.invitee.money"></image>
<image v-else :src="$picUrl+'/static/news/avater.png'"></image>
</view>
<view class="m">
<view class="n">AUIIO</view>
<view class="t">2023-02-12 10:00</view>
<view class="n">{{a.invitee.nick_name}}</view>
<view class="t">{{a.create_time}}</view>
</view>
<view class="r">
+<text>18</text>
+<text>{{a.money}}</text>
</view>
</view>
</view>

@ -2,7 +2,7 @@
<view class="container b-f">
<!-- 门店列表 -->
<view class="shop-list">
<view v-for="(item, index) in shopList" :key="index" @click="onSelectedShop(item.shop_id)" class="shop-item dis-flex flex-y-center">
<view v-for="(item, index) in shopList" :key="index" @click="onSelectedShop(item.shop_id,item.distance_unit)" class="shop-item dis-flex flex-y-center">
<view class="shop-item__content flex-box">
<view class="shop-item__title">
<text>{{ item.shop_name }}</text>
@ -127,7 +127,7 @@
/**
* 选择门店
*/
onSelectedShop(selectedId) {
onSelectedShop(selectedId,distance_unit) {
const app = this
// id
app.selectedId = selectedId

@ -4,88 +4,83 @@
<u-navbar title="确认订单" :border-bottom="false" title-color="#333" :background="background"></u-navbar>
</view>
<view class="buyType">
<view class="toDoor" :class="buyType=='sm'?'':'toDoor-dis'" @click="choseType('sm')">
<view class="toDoor" :class="buyType=='sm'?'':'toDoor-dis'" @click="handleSwichDelivery(DeliveryTypeEnum.EXPRESS.value,'sm')">
送货上门
</view>
<view class="toDoor" :class="buyType=='zq'?'':'toDoor-dis'" @click="choseType('zq')">
<view class="toDoor" :class="buyType=='zq'?'':'toDoor-dis'" @click="handleSwichDelivery(DeliveryTypeEnum.EXTRACT.value,'zq')">
到店自取
</view>
<view class="toDoor-on" :style="{'left': buyType=='sm'?'0':'345rpx'}">{{buyType=='zq'?'到店自取':'送货上门'}}</view>
<view class="toDoor-on" :style="{'left': buyType=='sm'?'0':'350rpx'}">{{buyType=='zq'?'到店自取':'送货上门'}}</view>
</view>
<view class="getSelf" >
<view class="address" v-if="buyType=='sm'">
<view class="address" v-if="buyType=='sm'" @click="onSelectAddress">
<view class="addAddress">
<view class="tip" v-if="true">请点击添加收货地址</view>
<view class="tip" v-if="!order.address">请点击添加收货地址</view>
<view class="info" v-else>
<view class="name"></view>
<view class="detail"></view>
<view class="name">{{ order.address.name}}<text>{{ order.address.phone }}</text></view>
<view class="detail">
<text v-for="(region, idx) in order.address.region" :key="idx">{{ region }}</text>
<text>{{ order.address.detail }}</text>
</view>
</view>
</view>
<view class="leftImg">
<image :src="$picUrl+'/static/order/left.png'"></image>
</view>
</view>
<view class="shopAddress" v-if="buyType=='zq'">
<view class="youTime">
花梨服务站
</view>
<view class="leftImg">
切换
<image src="/static/order/left.png" mode=""></image>
</view>
</view>
<view class="addressDetail">
</view>
<view class="lookMap" v-if="buyType=='zq'">
<image src="/static/user/address.png" mode="" class="addressIcon"></image>
<view class="range">
距您16.39km
</view>
<view class="checkMap">
查看地图
</view>
<image src="/static/order/left.png" mode="" class="rightIcon"></image>
</view>
<view class="pickUp">
<view class="pickPeople">
<view class="title">
取件人
</view>
<view class="name">
</view>
</view>
<view class="pickPeople">
<view class="title">
</view>
<view class="name">
<image src="/static/order/edit.png" mode="" class="edit"></image>
</view>
</view>
<view class="pickPeople">
<view class="title">
预留电话
</view>
<view class="name">
</view>
</view>
<view class="pickPeople">
<view class="title">
</view>
<view class="name">
<image src="/static/order/edit.png" mode="" class="edit"></image>
</view>
</view>
</view>
</view>
<view class="shopAddress" v-if="buyType=='zq'">
<view class="info" v-if="order.extractShop.shop_id">
<view class="a">
<view class="youTime">
{{ order.extractShop.shop_name }}
</view>
<view class="leftImg" @click="onSelectExtractPoint()">
切换
<image :src="$picUrl+'/static/order/left.png'" mode=""></image>
</view>
</view>
<view class="b">
{{ order.extractShop.region.province }} {{ order.extractShop.region.city }}{{ order.extractShop.region.region }} {{ order.extractShop.address }}
</view>
<view class="lookMap">
<image :src="$picUrl+'/static/user/address.png'" mode="" class="addressIcon"></image>
<view class="range">
距您{{distance_unit}}
</view>
<view class="checkMap" @click="openMap(order.extractShop)">
查看地图
</view>
<image :src="$picUrl+'/static/order/left.png'" mode="" class="rightIcon"></image>
</view>
</view>
<view class="tip" v-else @click="onSelectExtractPoint()">请选择门店<image :src="$picUrl+'/static/order/left.png'" mode=""></image></view>
<view class="pickUp">
<view class="pickPeople">
<view class="title">
取件人
</view>
<view class="name">
<input class="input" placeholder="请填写联系人姓名" v-model="linkman" />
<image :src="$picUrl+'/static/order/edit.png'" mode="" class="edit"></image>
</view>
</view>
<view class="pickPeople">
<view class="title">
预留电话
</view>
<view class="name">
<input class="input" placeholder="请填写联系电话" v-model="phone" />
<image :src="$picUrl+'/static/order/edit.png'" mode="" class="edit"></image>
</view>
</view>
</view>
</view>
</view>
<view class="preTime">
<view class="preTime" v-if="buyType=='zq'">
<view class="left">
<view class="bagImg">
<image src="/static/order/bag.png" mode="" class="bag"></image>
<image :src="$picUrl+'/static/order/bag.png'" mode="" class="bag"></image>
街边取
</view>
<view class="preText">
@ -96,52 +91,52 @@
<switch />
</view>
</view>
<view class="time">
<view class="time" v-if="buyType=='zq'">
<view class="youTime">
预计到货时间
</view>
<view class="leftImg">
<text class="leftText">2024-12-20 0930</text>
<image src="/static/order/left.png" mode=""></image>
<view class="leftImg" @click="openPicker(1)">
<text v-if="timer" class="leftText">{{timer}}</text>
<text v-else>请选择</text>
<image :src="$picUrl+'/static/order/left.png'" mode=""></image>
</view>
</view>
<view class="time">
<view class="time" v-if="buyType=='sm'">
<view class="youTime">
您期待的收货时间
</view>
<view class="leftImg">
请选择
<image src="/static/order/left.png" mode=""></image>
<view class="leftImg" @click="openPicker(2)">
<text v-if="timer" class="leftText">{{timer}}</text>
<text v-else>请选择</text>
<image :src="$picUrl+'/static/order/left.png'" mode=""></image>
</view>
</view>
<view class="goodsDetail">
<view class="goodsType">
<image src="/static/order/bag.png" mode="" class="bag"></image>
<image :src="$picUrl+'/static/order/bag.png'" mode="" class="bag"></image>
<text>大白兔家电</text>
<image src="/static/order/left.png" mode="" class="leftIcon"></image>
<image :src="$picUrl+'/static/order/left.png'" mode="" class="leftIcon"></image>
</view>
<view class="goods">
<view class="goods" v-for="(item, index) in order.goodsList" :key="index">
<view class="goodsImg">
<image :src="goodsInfo.goods_image" mode=""></image>
<image :src="item.goods_image" mode=""></image>
</view>
<view class="goodsInfo">
<view class="goodsName">
{{goodsInfo.goods_name}}
{{ item.goods_name }}
</view>
<view class="goodsPrice">
<text>{{goodsInfo.goods_price_min}}</text>
<text>{{item.goods_price_min}}</text>
</view>
</view>
<view class="goodsNum">
x1
x{{ item.total_num }}
</view>
</view>
</view>
<view class="time">
<view class="youTime" style="width: 60rpx;">
留言
</view>
<input type="textarea" placeholder="建议留言前先和店家沟通" v-model="remark" style="width:100%;" maxlength="100" />
</view>
@ -151,15 +146,18 @@
商品总额
</view>
<view class="price">
{{goodsInfo.goods_price_min}}
{{ order.orderTotalPrice }}
</view>
</view>
<view class="orderTitle">
<view class="orderTitle" v-if="order.address">
<view class="total">
运费
</view>
<view class="price">
{{goodsInfo.goods_price_min}}
<view class="price" v-if="order.isIntraRegion">
+{{ order.expressPrice }}
</view>
<view class="price" v-else>
不在配送范围
</view>
</view>
<view class="orderTitle">
@ -174,9 +172,14 @@
<view class="total">
优惠券
</view>
<view class="price" @click="choseCoupon">
<text class="couponNum">{{couponList.length}}张可用</text>
<image src="/static/order/left.png" mode=""></image>
<view class="price" v-if="order.couponList.length > 0" @click="handleShowPopup">
<text class="couponNum" v-if="order.couponId > 0">-{{ order.couponMoney }}</text>
<text class="couponNum" v-else>{{order.couponList.length}}张可用</text>
<image :src="$picUrl+'/static/order/left.png'"></image>
</view>
<view class="price" v-else>
<text class="couponNum">无优惠券可用</text>
<image :src="$picUrl+'/static/order/left.png'"></image>
</view>
</view>
<view class="line">
@ -188,7 +191,7 @@
</view>
<view class="right">
<text class="totalNum">共1件合计</text>
<text class="allPrice">{{goodsInfo.goods_price_min}}</text>
<text class="allPrice">{{ order.orderPayPrice }}</text>
</view>
</view>
</view>
@ -227,12 +230,54 @@
<view class="meetPrice">
应付款
<text class="type"></text>
<text class="price">{{goodsInfo.goods_price_min}}</text>
<text class="price">{{order.orderPayPrice}}</text>
</view>
<view class="btn" @click="orderPay">
<view class="btn">
提交订单
</view>
</view>
</view>
<!-- 优惠券弹出框 -->
<u-popup v-model="showPopup" mode="bottom">
<view class="popup__coupon">
<view class="coupon__title f-30">选择优惠券</view>
<!-- 优惠券列表 -->
<view class="coupon-list">
<scroll-view :scroll-y="true" style="height: 565rpx;">
<view class="coupon-item" v-for="(item, index) in order.couponList" :key="index">
<view class="item-wrapper" :class="[item.is_apply ? 'color-' + CouponColors[index % CouponColors.length] : 'color-gray']"
@click="handleSelectCoupon(index)">
<view class="coupon-type">{{ CouponTypeEnum[item.coupon_type].name }}</view>
<view class="tip dis-flex flex-dir-column flex-x-center">
<view v-if="item.coupon_type == CouponTypeEnum.FULL_DISCOUNT.value">
<text class="f-30"></text>
<text class="money">{{ item.reduce_price }}</text>
</view>
<text class="money" v-if="item.coupon_type == CouponTypeEnum.DISCOUNT.value">{{ item.discount }}</text>
<text class="pay-line">{{ item.min_price }}元可用</text>
</view>
<view class="split-line"></view>
<view class="content dis-flex flex-dir-column flex-x-between">
<view class="title">{{ item.name }}</view>
<view class="bottom dis-flex flex-y-center">
<view class="time flex-box">
<block v-if="item.start_time === item.end_time">{{ item.start_time }} 当天有效</block>
<block v-else>{{ item.start_time }}~{{ item.end_time }}</block>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 不使用优惠券 -->
<view class="coupon__do_not dis-flex flex-y-center flex-x-center">
<view class="control dis-flex flex-y-center flex-x-center" @click="handleNotUseCoupon()">
<text class="f-26">不使用优惠券</text>
</view>
</view>
</view>
</u-popup>
<u-picker mode="time" v-model="show1" :params="params" @confirm="confirm"></u-picker>
</view>
</template>
@ -298,6 +343,19 @@
export default {
data() {
return {
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true
},
show1: false,
background: {
background: 'url(https://www.royaum.com.cn/static/news/login-bg.png) center top no-repeat',
backgroundSize: '100% auto',
},
//
OrderTypeEnum,
DeliveryTypeEnum,
@ -347,8 +405,11 @@
},
//
personal: {},
buyType:'sm',
//
setting: {}
setting: {},
timer: "",
distance_unit: ""
}
},
@ -381,7 +442,12 @@
},
methods: {
openPicker() {
this.show1 = true;
},
confirm(e){
this.timer = e.year+'-'+e.month+'-'+e.day+' '+e.hour+':'+e.minute+':'+e.second
},
//
getOrderData() {
const app = this
@ -435,9 +501,10 @@
},
//
handleSwichDelivery(key) {
handleSwichDelivery(key,val) {
this.curDelivery = key
this.getOrderData()
this.buyType = val;
},
//
@ -636,188 +703,210 @@
.getSelf {
width: 700rpx;
margin: 0 auto;
.shopAddress {
display: flex;
align-items: center;
justify-content: space-between;
.youTime {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
}
.leftImg {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #9E9E9E;
image {
width: 18rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
background-image: url('https://www.royaum.com.cn/static/order/map.png');
background-size: 100%;
height: 160rpx;
background-size: 100%;
min-height: 160rpx;
padding: 14rpx 46rpx 0 32rpx;
box-sizing: border-box;
.addressDetail {
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
line-height: 34rpx;
margin-top: 6rpx;
}
.lookMap {
display: flex;
align-items: center;
margin-top: 8rpx;
.addressIcon {
width: 23rpx;
height: 26rpx;
margin-right: 14rpx;
}
.range {
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F42B17;
line-height: 26rpx;
padding-right: 10rpx;
border-right: 2rpx solid #D9D9D9;
margin-right: 10rpx;
}
.checkMap {
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #2B2B2B;
line-height: 26rpx;
margin-right: 24rpx;
}
.rightIcon {
width: 18rpx;
height: 18rpx;
}
}
.pickUp {
display: flex;
justify-content: space-around;
margin-top: 26rpx;
.pickPeople {
.title {
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #838383;
line-height: 28rpx;
}
.name {
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #2C2C2C;
line-height: 28rpx;
margin-top: 10rpx;
.edit {
width: 20rpx;
height: 20rpx;
}
}
}
}
}
.leftText {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #F21A1C;
line-height: 28rpx;
}
.shopAddress {
max-height: 260rpx;
padding-bottom: 20rpx;
overflow: hidden;
.tip{
font-size: 24rpx;
color: #F32E2E;
display: flex;
align-items: center;
justify-content: space-between;
image{
width: 12rpx;
height: 18rpx;
}
}
.pickUp {
display: flex;
justify-content: space-around;
margin-top: 16rpx;
.pickPeople {
flex: 1;
&:first-child{
margin-right: 20rpx;
}
.title {
font-size: 24rpx;
font-weight: 400;
color: #838383;
}
.name {
margin-top: 10rpx;
display: flex;
align-items: center;
input{
width: 200rpx;
line-height: 60rpx;
font-size: 24rpx;
color: #2C2C2C;
display: block;
}
.edit {
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
}
}
}
}
.a{
display: flex;
align-items: center;
justify-content: space-between;
.youTime {
font-size: 28rpx;
font-weight: 600;
color: #1D1D1D;
}
.leftImg {
font-size: 24rpx;
font-weight: 400;
color: #F42B17;
image {
width: 12rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
.b{
font-size: 24rpx;
color: #838383;
line-height: 50rpx;
}
.lookMap {
display: flex;
align-items: center;
margin-top: 8rpx;
margin-bottom: 10rpx;
.addressIcon {
width: 23rpx;
height: 26rpx;
margin-right: 14rpx;
}
.range {
font-size: 20rpx;
font-weight: 400;
color: #F42B17;
line-height: 26rpx;
padding-right: 10rpx;
border-right: 2rpx solid #D9D9D9;
margin-right: 10rpx;
}
.checkMap {
font-size: 20rpx;
font-weight: 400;
color: #2B2B2B;
line-height: 26rpx;
margin-right: 24rpx;
}
.rightIcon {
width: 12rpx;
height: 18rpx;
}
}
}
.address {
margin-left: 26rpx;
background-image: url('../../static/order/map.png');
width: 694rpx;
height: 154rpx;
display: flex;
width: 100%;
display: flex;
height: 120rpx;
align-items: center;
justify-content: space-between;
padding: 0 52rpx 0 32rpx;
padding: 0 22rpx 0 32rpx;
box-sizing: border-box;
.addAddress {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F32E2E;
// color: #F32E2E;
color: #212121;
.info{
flex: 1;
.name{
font-size: 28rpx;
color: #212121;
text{
margin-left: 20rpx;
color: #666;
}
}
.detail{
margin-top: 10rpx;
font-size: 26rpx;
}
}
.tip{
font-size: 30rpx;
font-weight: 500;
color: #F32E2E;
}
}
.leftImg {
width: 18rpx;
width: 12rpx;
height: 18rpx;
image {
width: 100%;
height: 100%;
height: 100%;
display: block;
}
}
}
.ziqu{
overflow: hidden;
padding: 0 22rpx 0 32rpx;
}
.preTime {
width: 694rpx;
width: 700rpx;
height: 140rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
border-radius: 10rpx;
margin: 12rpx 0 0 26rpx;
display: flex;
justify-content: space-between;
padding: 34rpx 0 0 30rpx;
box-sizing: border-box;
.left {
.bagImg {
height: 30rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 30rpx;
margin-bottom: 10rpx;
color: #000000;
display: flex;
align-items: center;
.bag {
width: 30rpx;
height: 30rpx;
width: 35rpx;
height: 35rpx;
margin-right: 10rpx;
}
}
}
.preText {
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #959595;
line-height: 34rpx;
margin-top: 15rpx;
}
}
@ -826,7 +915,7 @@
width: 694rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
border-radius: 10rpx;
opacity: 1;
margin: 12rpx 0 0 26rpx;
align-items: center;
@ -835,19 +924,16 @@
.youTime {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
}
.leftImg {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #9E9E9E;
image {
width: 18rpx;
width: 12rpx;
height: 18rpx;
margin-left: 16rpx;
}

Loading…
Cancel
Save