Browse Source

修改组件,修改页面名称,新增直播功能

github-duan 4 năm trước cách đây
mục cha
commit
ec7ed40241

+ 1 - 0
.gitignore

xqd
@@ -0,0 +1 @@
+unpackage

+ 1 - 1
components/page-component/app-attr/app-attr.vue

xqd
@@ -112,7 +112,7 @@
             buyText: {
                 type: String,
                 default() {
-                    return '立即购买';
+                    return '立即报名';
                 }
             },
             plugin: {

+ 17 - 5
components/page-component/app-product-list/app-product-list.vue

xqd xqd
@@ -41,18 +41,19 @@
 						</template>
 						<template v-else>
 							<text v-if="item.is_negotiable != 1 && isShowSalesNum == 1" class="gray sales">{{item.sales}}</text>
-							<div v-if="item.is_negotiable != 1 && isShowCart == 1 && item.goods_stock > 0" class="box-grow-1 cart-box">
+							<div v-if="item.is_negotiable != 1 && isShowCart == 1 && item.goods_stock > 0" class="cart-box moneyAndBtn-btn">
 								<!--  #ifdef  MP-ALIPAY -->
-								<img style="-webkit-background-origin: content-box;background-origin: content-box;"
+								<!-- <img style="-webkit-background-origin: content-box;background-origin: content-box;"
 									 @click.stop="specification(item)"
 									 class="goods-cart"
-									 src="/static/image/icon/goods-cart.png">
+									 src="/static/image/icon/goods-cart.png"> -->
 								<!--  #endif -->
 								<!-- #ifndef MP-ALIPAY -->
-								<img @click.stop="specification(item)"
+							<!-- 	<img @click.stop="specification(item)"
 									 class="goods-cart"
-									 src="/static/image/icon/goods-cart.png">
+									 src="/static/image/icon/goods-cart.png"> -->
 								<!-- #endif -->
+								立即报名
 							</div>
 						</template>
 					</view>
@@ -123,6 +124,17 @@
 </script>
 
 <style scoped  lang="scss">
+	.moneyAndBtn-btn{
+		font-size:34upx;
+		font-family:Source Han Sans CN;
+		font-weight:500;
+		color: #fff;
+		background: #F09A21;
+		padding: 10upx 22upx;
+		text-align: center;
+		box-shadow: 0 4px 10px #999;
+		border-radius: 8upx;
+	}
 	.product-list {
 		padding: #{0 20upx};
 		position: relative;

+ 1 - 1
components/page-component/app-shipping-address/app-shipping-address.vue

xqd
@@ -121,7 +121,7 @@
             destroy() {
                 const self = this;
                 uni.showModal({
-                    content: '确定删除收货地址',
+                    content: '确定删除报名信息吗?',
                     success: function (res) {
                         if (res.confirm) {
                             self.$request({

+ 2 - 2
components/page-component/goods/app-goods-banner.vue

xqd
@@ -60,13 +60,13 @@
             </swiper-item>
         </swiper>
 
-        <view>
+<!--        <view>
             <app-jump-button url="/pages/cart/cart" v-if="isCart">
                 <view class="cart" :style="{'top': isScanQrCode ? '250rpx' : '60rpx'}">
                     <image load-lazy src="../../../static/image/icon/nav-icon-cart.png"></image>
                 </view>
             </app-jump-button>
-        </view>
+        </view> -->
         <view class="share-commission dir-left-nowrap cross-center" v-if="share > 0">
             <image load-lazy src="../../../static/image/icon/share/share_commission.png"></image>
             <view class="text">

+ 44 - 1
pages.json

xqd xqd
@@ -377,7 +377,7 @@
         {
           "path": "address-pick",
           "style": {
-            "navigationBarTitleText": "选择地址"
+            "navigationBarTitleText": "选择报名信息"
           }
         },
         {
@@ -534,6 +534,49 @@
           }
         }
       ]
+    },
+	{
+	  "root": "plugins/scan_code",
+	  "pages": [
+		{
+		  "path": "index/index",
+		  "style": {
+			"navigationBarTitleText": "当面付"
+		  }
+		},
+		{
+		  "path": "index/coupon",
+		  "style": {
+			"navigationBarTitleText": "选择优惠券"
+		  }
+		}
+	  ]
+	},   
+	{
+      "root": "pages/live",
+      "plugins": {
+        "live-player-plugin": {
+          "version": "1.0.3", // 填写该直播组件版本号
+          "provider": "wx2b03c6e691cd7370" // 必须填该直播组件appid
+        }
+      },
+      "pages": [
+        {
+          "path": "index",
+          "style": {
+            "navigationBarTitleText": "直播列表",
+            "usingComponents": {
+              "subscribe": "plugin-private://wx2b03c6e691cd7370/components/subscribe/subscribe"
+            }
+          }
+        },
+        {
+          "path": "playback",
+          "style": {
+            "navigationBarTitleText": "直播详情"
+          }
+        }
+      ]
     }
    
   ]

+ 11 - 1
pages/address/address-edit.vue

xqd xqd
@@ -47,7 +47,7 @@
             </view>
             <view class="app-line app-border main-between cross-center">
                 <text class="app-text box-grow-0">身份证号码:</text>
-                <input class="address-input" type="number" v-model="form.idcard" placeholder="17或18位身份证号"/>
+                <input class="address-input" type="text" v-model="form.idcard" placeholder="请输入18位身份证号"/>
             </view>
 <!--            <view class="app-line app-border main-between cross-center">
                 <text class="app-text box-grow-0">所在地区</text>
@@ -359,6 +359,16 @@
 					if (!this.form.idcard) {
                         content = '身份证不能为空';
                     }
+					
+					let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
+					if(!reg.test(this.form.mobile)){
+						content = '请检查联系方式';
+					}
+					let regs = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+					if(!regs.test(this.form.idcard)){
+						content = '请检查身份证信息';
+					}
+					
                     if (content) {
                         uni.showToast({
                             title: content,

+ 1 - 1
pages/address/address.vue

xqd
@@ -21,7 +21,7 @@
             <!-- #ifndef MP-ALIPAY -->
            <app-button :background="manual_btn_bg" arrangement="row" @click="manual" type="important" round width="700">
                 <icon class="app-icon app-manual-icon"></icon>
-                <text class="app-text">手动添加</text>
+                <text class="app-text">新增</text>
             </app-button>
 			<!--       <app-button :background="manual_btn_bg" arrangement="row" @click="manual" type="important" round width="346">
                 <icon class="app-icon app-manual-icon"></icon>

+ 13 - 5
pages/card/index/index.vue

xqd xqd
@@ -56,7 +56,8 @@ f<template>
                 list: [],
                 more: false,
                 page: 2,
-                title: '暂无未使用优惠券~'
+                // title: '暂无未使用优惠券~'
+                title: '暂无课程~'
             }
         },
         components: {
@@ -182,12 +183,19 @@ f<template>
             tabStatus(e) {
                 this.list = [];
                 let id = e.currentTarget.dataset.id;
-                if (id === 1) {
-                    this.title = `暂无未使用优惠券~`;
+                // if (id === 1) {
+                //     this.title = `暂无未使用优惠券~`;
+                // } else if (id === 2) {
+                //     this.title = `暂无已使用优惠券~`;
+                // } else if (id === 3) {
+                //     this.title = `暂无已过期优惠券~`;
+                // }              
+				if (id === 1) {
+                    this.title = `暂无课程~`;
                 } else if (id === 2) {
-                    this.title = `暂无已使用优惠券~`;
+                    this.title = `暂无课程~`;
                 } else if (id === 3) {
-                    this.title = `暂无已过期优惠券~`;
+                    this.title = `暂无课程~`;
                 }
                 this.page = 2;
                 this.activeTab = id;

+ 2 - 2
pages/goods/goods.vue

xqd xqd
@@ -3,7 +3,7 @@
         <view>
             <app-quick-navigation></app-quick-navigation>
         </view>
-        <view>
+       <view>
             <app-goods-banner :pic-list="goods.pic_url"
                   :share="goods.share"
                   :video-url="goods.video_url"
@@ -129,7 +129,7 @@
     					    <view class="main-center cross-center button buttonAttr"
     					          :class="theme + '-background'"
     					          @click="clickAttr"
-    					    >立即购买
+    					    >立即报名
     					    </view>
                         </view>
 				    </template>

+ 0 - 52
pages/index/index.vue

xqd
@@ -19,58 +19,6 @@
                           :is_storage="is_storage"
             ></app-diy-page>
         </view>
-<!-- 	<view class="course">
-		<view class="custom-header-container">
-			<view class="header-bg" :style="{height:headerBgHeight}">
-				<image src="../../static/image/course/bg.png"/>
-			</view>
-			<view class="custom-header-status-bar" :style="{height:getStausBarHeight}"></view>
-			<view class="custom-header-top-container">
-				<view class="custom-header-title">课程报名</view>
-			</view>
-		</view>
-		
-		<view class="banner">
-			<swiper class="swipe" indicator-dots="true" autoplay="true" interval="5000" duration="1500">
-				<swiper-item :url="item.url" v-for="(item, index) in bannerImg" :key="index">
-					<image :src="item.img" mode="aspectFill" :title="item.title" class="banner-img"/>
-				</swiper-item>
-			</swiper>
-		</view>
-		
-		<view class="course-list-icon">
-			<view class="img">
-				<image src="../../static/image/course/creation.png" mode=""></image>
-			</view>
-			<text>课程报名</text>
-		</view>
-		<view class="course-list">
-			<view class="course-list-item" v-for="(item, index) in courseListData" :key="index">
-				<view class="course-item-left">
-					<image :src="item.img" mode=""></image>
-				</view>
-				<view class="course-item-right">
-					<view class="course-item-title">
-						{{item.title}}
-					</view>
-					<view class="course-item-content">
-						{{item.content}}
-					</view>
-					<view class="course-item-moneyAndBtn">
-						<view class="moneyAndBtn-money">
-						   <text>¥</text> 30.00
-						</view>
-						<view class="moneyAndBtn-btn" @click="navTo">
-							立即报名
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="placeholder-view">
-				
-			</view>
-		</view>
-	</view> -->
         <app-buy-prompt v-if="config.is_purchase_frame === `1`"></app-buy-prompt>
     </app-layout>
 </template>

+ 1 - 1
pages/order-submit/address-pick.vue

xqd
@@ -20,7 +20,7 @@
                         <app-button :theme="theme" type="important" round @click="editAddress(0)">
                             <view class="cross-center main-center">
                                 <image class="icon" src="/static/image/icon/add.png"></image>
-                                <view>手动添加</view>
+                                <view>新增</view>
                             </view>
                         </app-button>
                     </app-form-id>

+ 2 - 2
pages/order/index/index.vue

xqd
@@ -14,12 +14,12 @@
                             <view class="dir-top-nowrap" style="width: 100%">
                                 <view class='dir-left-nowrap view-1'>
                                     <view class='box-grow-1'>订单号:{{item.order_no}}</view>
-                                    <template v-if='item.status == 0'>
+<!--                                    <template v-if='item.status == 0'>
                                         <text v-if='item.sign == "pintuan"'>{{item.is_pay == 1 ? '拼团中' : '待付款'}}</text>
                                     </template>
                                     <template v-else>
                                         <view>{{item.status_text}}</view>
-                                    </template>
+                                    </template> -->
                                 </view>
                                 <view v-for='(dItem, dIndex) in item.detail' :key='dIndex' class='view-2'>
                                     <app-order-goods-info :goods='dItem.goods_info'></app-order-goods-info>

+ 168 - 0
plugins/scan_code/index/coupon.vue

xqd
@@ -0,0 +1,168 @@
+<template>
+    <app-layout>
+        <view class="coupon-head-btn">
+            <app-button @click="pickCoupon(0)" color="#999999" background="#FFFFFF" round>不使用优惠券</app-button>
+        </view>
+        <view class="coupon-box">
+            <view class="coupon-item-container" v-for="(v,k) in list" :key="k">
+                <app-form-id @click="pickCoupon(v)">
+                    <view class="coupon-item">
+                        <image :src="appImg.coupon_enable_bg" class="coupon-bg"></image>
+                        <view class="dir-left-nowrap">
+                            <view class="box-grow-0 cross-center box-left">
+                                <view class="box-discount">
+                                    <view v-if="v.type==1">{{v.discount}}折</view>
+                                    <view v-if="v.type==2">¥{{v.sub_price}}</view>
+                                    <view class="box-use">满{{v.coupon_min_price}}可用</view>
+                                </view>
+                            </view>
+                            <view class="box-grow-1 cross-center coupon-right">
+                                <view>
+                                    <view class="coupon-name t-omit">{{v.coupon_data.name}}</view>
+                                    <view class="box-time">
+                                        <view>{{v.start_time}}~{{v.end_time}}</view>
+                                    </view>
+                                    <view>仅限当面付活动使用</view>
+                                </view>
+                                <icon v-if="coupon_id == v.id" class="icon-coupon-select"></icon>
+                            </view>
+                        </view>
+                    </view>
+                </app-form-id>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    import {mapState} from 'vuex';
+
+    export default {
+        name: "coupon",
+        components: {},
+        computed: {
+            ...mapState({
+                appImg: state => state.mallConfig.__wxapp_img.mall,
+            }),
+        },
+        data() {
+            return {
+                list: [],
+                page_loading: true,
+                coupon_id: 0,
+                price: '',
+            }
+        },
+        onLoad(options) {
+            const self = this;
+            [self.coupon_id, self.price] = [options.coupon_id, options.price];
+            self.$showLoading({text: '加载中'});
+            self.$request({
+                url: self.$api.scan_code_pay.coupons,
+                data: {
+                    price: options.price,
+                },
+                method: 'post',
+            }).then(e => {
+                self.$hideLoading();
+                if (e.code === 0) {
+                    self.list = e.data.coupon_list;
+                } else {
+                    uni.showToast({icon: 'none', title: e.msg});
+                }
+            }).catch(e => {
+                self.$hideLoading();
+            });
+        },
+        methods: {
+            pickCoupon(userCoupon) {
+                this.$store.commit('scanCode/mutSetUserCoupon', userCoupon);
+                uni.navigateBack({delta: 1});
+            },
+        }
+    }
+</script>
+
+<style lang="scss">
+    page {
+        background: #fff;
+    }
+</style>
+<style scoped lang="scss">
+    .coupon-head-btn {
+        padding: #{24rpx};
+    }
+
+    .coupon-box {
+        padding: #{24rpx} #{34rpx} 0 #{34rpx};
+
+        .box-left {
+            height: #{152rpx};
+            position: relative;
+            .box-discount {
+                text-align: center;
+                color: #fff;
+                width: #{194rpx};
+            }
+
+            .box-use {
+                font-size: #{20rpx};
+                padding-top: #{16rpx};
+            }
+        }
+    }
+
+    .coupon-item-container {
+        margin-bottom: #{24rpx};
+    }
+
+    .coupon-item-container:last-child {
+        margin-bottom: 0;
+    }
+
+    .coupon-item {
+        position: relative;
+        overflow: hidden;
+    }
+
+    .coupon-bg {
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 0;
+    }
+
+    .coupon-right {
+        position: relative;
+    }
+
+    .coupon-right > view {
+        padding: 0 #{30rpx};
+        overflow: hidden;
+        color: #666666;
+        font-size: #{20rpx};
+    }
+
+    .coupon-right .icon-coupon-select {
+        position: absolute;
+        right: 0;
+        top: 0;
+        height: #{70rpx};
+        width: #{70rpx};
+        z-index: 1;
+        background-image: url("../../../static/image/icon/coupon-select.png");
+        background-size: 100% auto;
+        background-repeat: no-repeat;
+    }
+
+    .coupon-right .box-time {
+        padding: #{12rpx} 0;
+    }
+
+    .coupon-right .coupon-name {
+        color: #353535;
+        font-size: #{32rpx};
+    }
+</style>

+ 561 - 0
plugins/scan_code/index/index.vue

xqd
@@ -0,0 +1,561 @@
+<template>
+    <app-layout>
+        <view>
+            <view class="scan-head dir-top-nowrap main-center">
+                <view class="order-name">订单金额</view>
+                <view class="scan-price dir-left-nowrap cross-bottom" @click="openPriceModel">
+                    <view class="order-key">¥</view>
+                    <view class="order-value">{{list.price}}</view>
+                </view>
+                <view class="scan-line"></view>
+                <!-- 优惠 -->
+                <view class="dir-left-nowrap cross-center scan-offer">
+                    <view class="box-grow-1">订单优惠</view>
+                    <view class="box-grow-0">
+                        <view v-if="list.preferential_money > 0" class="red">
+                            -¥{{list.preferential_money}}
+                        </view>
+                        <view v-else-if="list.price > 0" class="gray">暂无优惠</view>
+                    </view>
+                </view>
+
+                <!-- 优惠券 -->
+                <view class="dir-left-nowrap cross-center scan-offer">
+                    <view class="box-grow-1">优惠劵</view>
+                    <view class="box-grow-0 coupon-right">
+                        <view v-if="list.coupon_id" @click="setCoupon" class="red">
+                            -¥{{list.coupon_preferential_money}}
+                        </view>
+                        <view v-else-if="list.price > 0 && list.can_coupon_num > 0" class="gray"
+                              @click="setCoupon">选择优惠券
+                        </view>
+                        <view v-else-if="list.price > 0" class="gray">暂无可用优惠券</view>
+                    </view>
+                    <view class="box-grow-0 cross-center">
+                        <icon class="icon-right"></icon>
+                    </view>
+                </view>
+                <!-- 积分抵扣 -->
+                <view v-if="list.price > 0 && activity && integral.user_integral_num >= integral.member_integral && list.integral_deduction > 0"
+                      class="dir-left-nowrap cross-center scan-offer">
+                    <view class="box-grow-1 cross-center dir-left-nowrap">
+                        <view>
+                            <text>使用{{list.use_integral_num}}积分抵扣</text>
+                            <text class="red">{{list.integral_deduction}}</text>
+                            <text>元</text>
+                        </view>
+                        <view @click="getIntegralInfo" class="main-center cross-center">
+                            <icon class="scan-integral-icon"></icon>
+                        </view>
+                    </view>
+                    <view class="box-grow-0" @click="handleUseIntegral">
+                        <icon v-if="list.use_integral == 1" class="scan-integral-switch check"></icon>
+                        <icon v-else class="scan-integral-switch uncheck"></icon>
+                    </view>
+                </view>
+
+                <!-- 备注 -->
+                <view class="dir-left-nowrap scan-offer">
+                    <input @input="bindTextBlur" :value="remark" class="scan-input" placeholder="添加备注"/>
+                </view>
+                <view class="scan-line"></view>
+                <view class="scan-remark cross-center dir-left-nowrap main-center">
+                    <view class="key">应付金额</view>
+                    <view class="value">¥{{list.pay_price}}</view>
+                </view>
+            </view>
+
+            <view class="main-center cross-center scan-btn">
+                <app-button @click="submit"
+                            color="#ffffff"
+                            font-size="32"
+                            height="88"
+                            width="702"
+                            :background="list.price > 0 ? '#ff4544': '#cdcdcd'"
+                            :disabled="list.price <= 0"
+                            round>已与店员确认,立即买单
+                </app-button>
+            </view>
+            <view class="scan-end" v-if="activity.rules">
+                <view class="dir-left-nowrap cross-center">
+                    <view class="icon"></view>
+                    <view>规则说明</view>
+                </view>
+                <text space="nbsp">{{activity.rules}}</text>
+            </view>
+        </view>
+
+        <!-- MODEL -->
+        <view v-if="price_modal" class="scan-modal show bt">
+            <view class="scan-modal-bg"></view>
+            <view class="scan-modal-pic main-center">
+                <view class="info-model cross-center dir-top-nowrap">
+                    <view class="order-title">订单金额</view>
+                    <view class="info-box dir-left-nowrap cross-center">
+                        <input focus class="info-input" @input="setTempInput" :value="tmp_price" type="digit"
+                               placeholder-class="place" placeholder="输入支付金额"/>
+                        <view>元</view>
+                    </view>
+                    <view class="info-end dir-left-nowrap cross-center">
+                        <view @click="closePriceModel" class="box-grow-1 main-center cross-center">取消</view>
+                        <view class="box-grow-0 info-line"></view>
+                        <view @click="calcPrice" class="box-grow-1 red main-center cross-center">确认</view>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </app-layout>
+</template>
+
+<script>
+    export default {
+        name: "index",
+        components: {},
+        data() {
+            return {
+                page_loading: true,
+                tmp_price: '',
+                edit_status: true,
+                price_modal: false,
+                activity: null,
+                remark: '',
+                integral: {
+                    user_integral_num: '0',
+                },
+                list: {
+                    price: '',
+                    pay_price: 0.00,
+                    use_integral: 0,
+                    activity_id: 0,
+                    coupon_id: 0,
+                    can_coupon_num: 0,
+                    integral_explain: [],
+                },
+                clear: false,
+            }
+        },
+        onShow: function () {
+            const self = this;
+            const userCoupon = self.$store.state.scanCode.userCoupon;
+            if (userCoupon) {
+                self.list.coupon_id = userCoupon.id;
+                self.calcPrice();
+            } else {
+                self.list.coupon_id = 0
+            }
+            if (self.clear) {
+                console.log('onShow => clear');
+                [
+                    self.edit_status,
+                    self.clear,
+                    self.remark,
+                    self.tmp_price,
+                    self.list,
+                ] = [
+                    true,
+                    false,
+                    '',
+                    '',
+                    {
+                        price: '',
+                        pay_price: 0.00,
+                        use_integral: 0,
+                        activity_id: 0,
+                        coupon_id: 0,
+                        can_coupon_num: 0,
+                        integral_explain: [],
+                    }
+                ]
+            }
+        },
+
+        onLoad: function (options) {
+            const self = this;
+            if (options.price) {
+                [self.edit_status, self.tmp_price] = [false, options.price];
+                self.calcPrice();
+            }
+            self.$showLoading({text: '加载中'});
+            self.$request({
+                url: self.$api.scan_code_pay.index
+            }).then(info => {
+                self.$hideLoading();
+                if (info.code === 0) {
+                    [
+                        self.activity,
+                        self.goods,
+                        self.integral,
+                        self.setting
+                    ] = [
+                        info.data.activity,
+                        info.data.goods,
+                        info.data.integral,
+                        info.data.setting
+                    ];
+                }
+            }).catch(info => {
+                self.$hideLoading();
+            })
+        },
+        methods: {
+            openPriceModel() {
+                if (!this.edit_status) return;
+                this.price_modal = true;
+            },
+            closePriceModel() {
+                this.price_modal = false;
+            },
+            setTempInput: function (e) {
+                this.tmp_price = e.detail.value;
+            },
+            //总价
+            calcPrice: function () {
+                const self = this;
+                self.price_modal = false;
+                self.$showLoading({text: '加载中'});
+
+                self.$request({
+                    url: self.$api.scan_code_pay.preview,
+                    data: {
+                        price: self.tmp_price,
+                        coupon_id: self.list.coupon_id,
+                        use_integral: self.list.use_integral,
+                    },
+                    method: 'POST',
+                }).then(info => {
+                    self.$hideLoading();
+                    if (info.code === 0) {
+                        [self.list, self.tmp_price] = [info.data, info.data.price];
+                    } else {
+                        uni.showToast({icon: 'none', title: info.msg});
+                    }
+                }).catch(info => {
+                    self.$hideLoading();
+                })
+            },
+
+            //UseIntegral
+            handleUseIntegral() {
+                const self = this;
+                let list = self.list;
+                list.use_integral = list.use_integral == 1 ? 0 : 1;
+                self.calcPrice();
+            },
+
+            //Remark
+            bindTextBlur: function (e) {
+                this.remark = e.detail.value;
+            },
+
+            //Integral
+            getIntegralInfo: function (e) {
+                let content = '';
+                this.list.integral_explain.map(v => {
+                    content += '消费满' + v.consume_money + '元,';
+                    content += '积分最多可抵' + v.integral_deduction + '元';
+                    content += '\r\n';
+                });
+                uni.showModal({
+                    title: '积分抵扣说明',
+                    content: content.trim(),
+                    showCancel: false
+                })
+            },
+
+            //navigate
+            setCoupon: function (e) {
+                this.clear = false;
+                uni.navigateTo({
+                    url: '/plugins/scan_code/index/coupon?price=' + this.list.price + '&coupon_id=' + this.list.coupon_id,
+                });
+            },
+
+            submit: function (e) {
+                const self = this;
+                if (!self.list.price) return
+
+                self.$showLoading({text: '正在提交'});
+                self.$request({
+                    url: self.$api.scan_code_pay.submit,
+                    method: 'post',
+                    data: {
+                        price: self.list.price,
+                        coupon_id: self.list.coupon_id,
+                        use_integral: self.list.use_integral,
+                        remark: self.remark,
+                    },
+                }).then(e => {
+                    self.$hideLoading();
+                    if (e.code === 0) {
+                        self.$payment.pay(e.data.pay_id).then(payMsg => {
+                            // 支付成功
+                            uni.showModal({
+                                title: '提示',
+                                content: "支付成功",
+                                showCancel: false,
+                                success() {
+                                    uni.navigateTo({
+                                        url: '/pages/order-submit/pay-result?payment_order_union_id=' + e.data.pay_id + '&plugin=scan_code_pay'
+                                    })
+                                    self.clear = true;
+                                },
+                            });
+                        }).catch(payMsg => {
+                            // 支付失败
+                            self.$showLoading({text: '取消中'});
+                            self.$request({
+                                url: self.$api.scan_code_pay.cancel,
+                                data: {
+                                    pay_id: e.data.pay_id,
+                                },
+                                method: 'POST',
+                            }).then(info => {
+                                self.$hideLoading();
+                            }).catch(info => {
+                                self.$hideLoading();
+                                uni.showModal({title: '提示', content: info.msg});
+                            })
+                        });
+                    } else {
+                        uni.showModal({title: '提示', content: info.msg});
+                    }
+                }).catch(e => {
+                    self.$hideLoading();
+                });
+            },
+        }
+    }
+</script>
+
+<style scoped lang="scss">
+    .red {
+        color: #ff4544;
+    }
+
+    .gray {
+        color: #999999;
+    }
+
+    .scan-head {
+        margin: #{20rpx} #{24rpx} 0 #{24rpx};
+        background: #fff;
+        border-radius: #{16rpx};
+        padding: #{48rpx} #{40rpx} 0 #{40rpx};
+        font-size: #{28rpx};
+        color: #353535;
+
+        .scan-line {
+            height: 1px;
+            margin-top: #{38rpx};
+            background: #e2e2e2;
+        }
+
+        .scan-price {
+            margin-top: #{32rpx};
+
+            .order-key {
+                font-size: #{50rpx};
+            }
+
+            .order-value {
+                font-size: #{80rpx};
+                padding-left: #{28rpx};
+                height: #{98rpx};
+            }
+        }
+    }
+
+    .scan-offer {
+        color: #666666;
+        font-size: #{28rpx};
+        margin-top: #{40rpx};
+
+        .coupon-right {
+            padding-right: #{12rpx};
+        }
+
+        .icon-right {
+            background-size: 100% auto;
+            background-repeat: no-repeat;
+            background-image: url("../../../static/image/icon/arrow-right.png");
+            width: #{12rpx};
+            height: #{22rpx};
+        }
+    }
+
+    .scan-integral-icon {
+        height: #{36rpx};
+        width: #{36rpx};
+        background-image: url("../../../static/image/icon/warning.png");
+        background-repeat: no-repeat;
+        background-size: 100% auto;
+        margin-left: #{20rpx};
+    }
+
+    .scan-integral-switch {
+        width: #{44rpx};
+        height: #{44rpx};
+        background-size: 100% auto;
+        background-repeat: no-repeat;
+        float: left;
+
+    }
+
+    .scan-integral-switch.check {
+        margin-left: #{5rpx};
+        background-image: url("../../../static/image/icon/icon-checkbox-checked-a.png");
+    }
+
+    .scan-integral-switch.uncheck {
+        margin-left: #{5rpx};
+        background-image: url("../../../static/image/icon/icon-uncheck.png");
+    }
+
+    .scan-input {
+        width: 100%;
+        font-size: #{28rpx};
+        color: #666;
+    }
+
+    .scan-remark {
+        height: #{106rpx};
+
+        .key {
+            margin-left: auto;
+            color: #353535;
+            font-size: #{28rpx};
+        }
+
+        .value {
+            margin-left: #{10rpx};
+            color: #ff4544;
+            font-size: #{36rpx};
+        }
+    }
+
+    .scan-end {
+        color: #666;
+        background: #fff;
+        margin: 0 #{24rpx};
+        font-size: #{28rpx};
+        border-radius: #{16rpx};
+        padding: #{40rpx};
+
+        text {
+            word-break: break-all;
+            text-align: justify;
+        }
+    }
+
+    .scan-end > view {
+        margin-bottom: #{12rpx};
+    }
+
+    .scan-end .icon {
+        height: #{26rpx};
+        width: #{8rpx};
+        border-radius: #{4rpx};
+        background: #ff4544;
+        margin-right: #{16rpx};
+    }
+
+    .scan-btn {
+        margin: #{40rpx} auto;
+    }
+
+    .scan-modal {
+        position: fixed;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 2001;
+        transition: 200ms;
+    }
+
+    .scan-modal.show {
+        visibility: visible;
+        opacity: 1;
+    }
+
+    .scan-modal.bt {
+        -webkit-animation-name: fadeIn; /*动画名称*/
+        -webkit-animation-duration: 0.25s; /*动画持续时间*/
+        -webkit-animation-iteration-count: 1; /*动画次数*/
+        -webkit-animation-delay: 0s; /*延迟时间*/
+    }
+
+    .scan-modal .scan-modal-bg {
+        background: rgba(0, 0, 0, 0.8);
+        position: fixed;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 1;
+    }
+
+    .scan-modal .scan-modal-pic {
+        position: fixed;
+        left: 0;
+        top: #{188rpx};
+        width: 100%;
+        height: 100%;
+        z-index: 1;
+    }
+
+    .scan-modal .scan-modal-close image {
+        width: #{50rpx};
+        height: #{50rpx};
+        margin-top: #{50rpx};
+    }
+
+    .scan-modal .info-model {
+        height: #{360rpx};
+        width: #{620rpx};
+        background: #fff;
+        border-radius: #{16rpx};
+    }
+
+    .scan-modal .order-title {
+        margin: #{48rpx} 0
+    }
+
+    .scan-modal .place {
+        color: #cdcdcd
+    }
+
+    .scan-modal .info-box {
+        height: #{88rpx};
+        width: #{400rpx};
+        margin-bottom: #{48rpx};
+        border-radius: #{8rpx};
+        padding: 0 #{24rpx};
+        border: 1px solid #e2e2e2;
+    }
+
+    .scan-modal .info-input {
+        font-size: #{32rpx};
+        color: #353535;
+    }
+
+    .scan-modal .info-line {
+        height: #{32rpx} !important;
+        width: 1px !important;
+        background: #e2e2e2;
+    }
+
+    .scan-modal .info-end {
+        color: #666666;
+        height: #{88rpx};
+        font-size: #{32rpx};
+        border-top: #{1rpx} solid #e2e2e2;
+        width: 100%;
+    }
+
+    .scan-modal .info-end view {
+        height: 100%;
+        width: 100%;
+    }
+
+</style>

BIN
static/image/cart/cant-add.png