Эх сурвалжийг харах

1、”甄选好物“改“消费金电商”
2、 添加手机话费充值模块

DaMowang 2 жил өмнө
parent
commit
e320665d52

+ 3 - 3
src/app.scss

@@ -47,9 +47,9 @@ view,text,div {
 /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
 @font-face {
     font-family: 'iconfont';  /* Project id 3748689 */
-    src: url('//at.alicdn.com/t/c/font_3748689_kegthozgmse.woff2?t=1691048284790') format('woff2'),
-         url('//at.alicdn.com/t/c/font_3748689_kegthozgmse.woff?t=1691048284790') format('woff'),
-         url('//at.alicdn.com/t/c/font_3748689_kegthozgmse.ttf?t=1691048284790') format('truetype');
+    src: url('//at.alicdn.com/t/c/font_3748689_m400xxa92vs.woff2?t=1691745421754') format('woff2'),
+         url('//at.alicdn.com/t/c/font_3748689_m400xxa92vs.woff?t=1691745421754') format('woff'),
+         url('//at.alicdn.com/t/c/font_3748689_m400xxa92vs.ttf?t=1691745421754') format('truetype');
   }
 
 .iconfont {

+ 16 - 3
src/pages.json

@@ -21,7 +21,7 @@
 		{
 			"path": "pages/orderingfood/merchantlist",
 			"style": {
-				"navigationBarTitleText": "本地生活",
+				"navigationBarTitleText": "数智生活",
 				"onReachBottomDistance": 200,
 				"navigationStyle": "custom"
 			}
@@ -246,7 +246,7 @@
 				{
 					"path": "orderingfood/orderingfood",
 					"style": {
-						"navigationBarTitleText": "本地生活"
+						"navigationBarTitleText": "数智生活"
 					}
 				},
 				{
@@ -401,6 +401,19 @@
 						"navigationBarTitleText": "景区·门票"
 					}
 				},
+				{
+					"path": "prepaidRefill/index",
+					"style": {
+						"navigationBarTitleText": "手机充值"
+					}
+				},
+				{
+					"path": "prepaidRefill/orderDetail",
+					"style": {
+						"navigationBarTitleText": "充值详情"
+					}
+				},
+				
 
 				{
 					"path": "order/verificationCode",
@@ -484,7 +497,7 @@
 				"pagePath": "pages/orderingfood/merchantlist",
 				"iconPath": "static/nav/local_.png",
 				"selectedIconPath": "static/nav/local.png",
-				"text": "本地生活"
+				"text": "数智生活"
 			},
 			{
 				"pagePath": "pages/sign/index",

+ 18 - 20
src/pages/index/index.vue

@@ -27,11 +27,11 @@
             </view>
             <!-- 金刚区-end -->
             <!-- 活动 -->
-            <view class="activity" v-if="spc_list.length">
-                <image class="act_img act_one_img" :src="spc_list[0].url" @click="setPageUrl({ type: 4 })" mode=""></image>
+            <view class="activity" v-if="homeImg.length">
+                <image class="act_img act_one_img" :src="homeImg[0].image" @click="setPageUrl({ type: 4 })" mode=""></image>
                 <view class="act_other">
-                    <image class="act_img act_two_img" :src="spc_list[1].url" @click="goto('/pagesB/specialregion/index')" mode=""></image>
-                    <image class="act_img act_two_img" :src="spc_list[2].url" mode="" @click="goNoticeList"></image>
+                    <image class="act_img act_two_img" :src="homeImg[1].image" @click="goto('/pagesB/specialregion/index')" mode=""></image>
+                    <image class="act_img act_two_img" :src="homeImg[2].image" mode="" @click="goNoticeList"></image>
                 </view>
             </view>
             <!-- 活动-end -->
@@ -76,8 +76,9 @@ export default {
     },
     data() {
         return {
-            BannerImg: [], // 轮播图列表
-            not_list: [], // 公告列表
+            BannerImg: [],  // 轮播图列表
+            not_list: [],   // 公告列表
+            homeImg: "",    //活动列表
             // 金刚区
             area_list: [
                 {
@@ -96,16 +97,6 @@ export default {
                     type: 6,
                 },
             ],
-            spc_list: [{
-                    url: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/480112538cdee825e06f70d8bea95ca715b3763apng",
-                },
-                {
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/menu/02.jpg",
-                },
-                {
-                    url: "https://teaclub.oss-cn-chengdu.aliyuncs.com/ShuZiTea/ShuZiTeaHT/202210/49886d9c-ce5a-49ca-a281-12910541344f.jpg",
-                },
-            ], //活动列表
             productList: [], //商品数据
         };
     },
@@ -115,6 +106,7 @@ export default {
         this.loadData();
         this.getBanner(); //获取轮播图
         this.getAnnounce(); //获取公告列表
+        this.gethomeImg();  //活动列表
     },
     onHide() {},
     methods: {
@@ -129,6 +121,7 @@ export default {
         NavToGoodsDetail(id, type) {
             this.goto("/pages/product/p_details", { id, type });
         },
+        // 跳转公告列表页
         goNoticeList() {
             this.goto("/pages/consultation-list/index");
         },
@@ -143,12 +136,17 @@ export default {
                 }
             });
         },
+        // 活动列表
+        gethomeImg() {
+            post("v1/homeImg").then((res) => {
+                if (res.code === 0) {
+                    this.homeImg = res.data.data
+                }
+            });
+        },
         // 获取公告列表
         getAnnounce() {
-            let data = {
-                is_index: 1
-            }
-            post("v1/notice", data).then((res) => {
+            post("v1/notice", { is_index: 1 }).then((res) => {
                 if (res.code === 0) {
                     this.not_list = res.data.data;
                 }

+ 3 - 3
src/pages/my/index.vue

@@ -56,7 +56,7 @@
         <!-- 功能列表 -->
         <view class="fun_container">
             <view class="fun mar_t30">
-                <view class="fun_title">本地生活</view>
+                <view class="fun_title">数智生活</view>
                 <view class="fun_con mar_t50 flex_r flex_ac flex_jb">
                     <navigator v-if="local_uinfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/group" hover-class="none">
                         <image class="fun_img" src="/static/my/l_group.png"></image>
@@ -222,7 +222,7 @@ export default {
             allChaYou: "",
 
             isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
-            local_uinfo: {}, //本地生活信息
+            local_uinfo: {}, //数智生活信息
         };
     },
     onLoad(options) {
@@ -233,7 +233,7 @@ export default {
         }
         this.closeAuto(); //关闭实名功能
         this.getchayou(); //获取茶友
-        this.getLU(); //本地生活信息
+        this.getLU(); //数智生活信息
     },
     onShow() {
         let token = uni.getStorageSync("token");

+ 2 - 2
src/pages/orderingfood/merchantlist.vue

@@ -94,7 +94,7 @@ export default {
                 restaurant_id: da.restaurant_id
             })
         },
-        // 是否激活本地生活
+        // 是否激活数智生活
         isActivation() {
             post("local/isActivation", this.Query).then(res => {
                 if (res.code == -1) {
@@ -150,7 +150,7 @@ export default {
         width: calc(100% - 60rpx);
         margin: -110rpx 30rpx 0;
         // background-color: #473D31;
-        background: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/2e672c48ad6a5293a86a3aa0ac258f47ca5b2931jpg");
+        background: url("http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/33ce780a63d0cedd92868b1784a355d2bfaad827jpg");
         background-size: 100% 100%;
         border-radius: 16rpx;
         padding: 28rpx 30rpx;

+ 14 - 9
src/pages/orderingfood/tabs.js

@@ -26,7 +26,7 @@ export default [
   },
   {
       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/06b44cf0c78938c9740a13826cd7b3777c7bb1c6png",
-      url: "",
+      url: "/pagesB/prepaidRefill/index",
       tit: "手机充值"
   },
   {
@@ -45,18 +45,23 @@ export default [
       tit: "景区景点"
   },
   {
-      ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/4089ec6a9c87e91d4ed8207562b87e9bd48b8c9dpng",
-      url: "",
-      tit: "休闲娱乐"
+      ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/26e490aca87654a65d5e1a8b4bb2702e6f835ef6png",
+      url: "/pages/product/productRetail?type=4",
+      tit: "消费金电商"
   },
 //   {
+//       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/4089ec6a9c87e91d4ed8207562b87e9bd48b8c9dpng",
+//       url: "",
+//       tit: "休闲娱乐"
+//   },
+//   {
 //       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/9595dbbd82b99db56de906743b9456962d01857bpng",
 //       url: "",
 //       tit: "丽人医美"
 //   },
-  // {
-  //     ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/67e25d80a52975f21eebe115c782984aa2dfa2d3png",
-  //     url: "",
-  //     tit: "婚纱摄影"
-  // }
+//   {
+//       ico: "http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/67e25d80a52975f21eebe115c782984aa2dfa2d3png",
+//       url: "",
+//       tit: "婚纱摄影"
+//   }
 ]

+ 1 - 1
src/pages/sign/index.vue

@@ -130,7 +130,7 @@ export default {
             });
         },
 
-        // 获取甄选好物
+        // 获取消费金电商
         goodsDay() {
             let that = this;
             let data = { page, type: 4 };

+ 1 - 1
src/pages/szw-order-list/index.vue

@@ -269,7 +269,7 @@ export default {
           case 3:
             return "货易优选";
           case 4:
-            return "甄选好物";
+            return "消费金电商";
           case 5:
             return "茶宝兑换";
           case 6:

+ 5 - 5
src/pages/to-pay-list/index.vue

@@ -151,7 +151,7 @@ export default {
             local_uinfo: {},
 
             prom_type: 0,
-			isAct: false, //是否激活本地生活
+			isAct: false, //是否激活数智生活
         };
     },
     components: {
@@ -184,7 +184,7 @@ export default {
             this.prom_type = va
             this.loadData(this.Data);
         },
-        // 是否激活本地生活
+        // 是否激活数智生活
         async isActivation() {
             let res = await post("local/isActivation", this.Query);
 			if (res.code === 0) {
@@ -213,13 +213,13 @@ export default {
                         let b1 = this.$h.Sub(ps, this.userinfo.user_money); //待支付金额 零售&批发   运费必须现金支付
                         if (this.Data.type == 4) {
 							if(this.isAct){
-								let um = this.local_uinfo.property; //本地生活模块佣金余额
-								let up = this.local_uinfo.integral; //本地生活模块消费金
+								let um = this.local_uinfo.property; //数智生活模块佣金余额
+								let up = this.local_uinfo.integral; //数智生活模块消费金
 								let goldnum = this.$h.Mul(this.goodsInfo.consume, this.Data.num)
 								this.goldNum = up > goldnum ? goldnum : up;
 								let sp = this.$h.Sub(ps, this.goldNum);
 								this.CommodityPrice = sp;
-								let b2 = this.$h.Sub(sp, um); //甄选好物  可以使用本地生活佣金支付
+								let b2 = this.$h.Sub(sp, um); //消费金电商  可以使用数智生活佣金支付
 								this.obligation = b2 > 0 ? b2 : 0;
 							}
 							else this.obligation = a;

+ 1 - 0
src/pagesB/directCharge/orderDetail.vue

@@ -43,6 +43,7 @@
                 <p>产品品牌:{{ order.restaurant_name }}</p>
                 <p>产品名称:{{ order.product_name }}</p>
             </template>
+            <p>账号:{{ order.phone }}</p>
             <p>数量:{{ order.number }}</p>
             <p>订单金额:¥{{ order.pay_amount }}</p>
             <p>订单编号:{{ order.trade_no }}</p>

+ 19 - 1
src/pagesB/hotel/hotel.vue

@@ -15,7 +15,7 @@
                 </div>
                 <div class="iconfont ico" @click="openm">&#xe6b3;</div>
             </div>
-            <div class="RatePlan">
+            <div class="RatePlan" v-if="RatePlan.length">
                 <div class="Room" v-for="(i,s) in RatePlan" :key="s">
                     <div class="Room_row flex_r flex_jb" @click="onshow(s)">
                         <div class="h_img" @click="onpreview2(i.pictures)">
@@ -56,6 +56,10 @@
                     </div>
                 </div>
             </div>
+            <div class="onlist" v-else>
+                <image class="errimg" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/cb726a97066e6a5d5cad82fb5612f053b9d5f135png" mode="widthFix" />
+                <div class="errmsg">没有搜索到可售房间喔~</div>
+            </div>
         </div>
         <!-- 图片查看组件 -->
         <preview ref="previewimg" />
@@ -79,6 +83,7 @@ export default {
     },
     methods: {
         gethotel() {
+            uni.showLoading();
             let { checkInDate, checkOutDate } = this.query;
             post("local/hotel/detail", {
                 hotelID: this.hotelID,
@@ -96,6 +101,7 @@ export default {
             }).then((res) => {
                 if (res.code == 0) {
                     this.RatePlan = res.data.data.rooms;
+                    uni.hideLoading();
                 }
             });
         },
@@ -364,4 +370,16 @@ export default {
         }
     }
 }
+
+.onlist{
+    padding-top: 100rpx;
+    text-align: center;
+    .errimg{
+        width: 500rpx;
+    }
+    .errmsg{
+        font-size: 28rpx;
+        color: #999;
+    }
+}
 </style>

+ 1 - 1
src/pagesB/hotel/index.vue

@@ -428,9 +428,9 @@ export default {
         display: grid;
         justify-content: space-between;
         grid-template-columns: repeat(auto-fill, 160rpx);
+        grid-gap: 0 1px;
         margin-bottom: -10rpx;
         margin-top: 45rpx;
-        grid-gap: 0 1px;
 
         .num_item {
             color: #333;

+ 2 - 1
src/pagesB/orderingfood/orderlist.vue

@@ -25,7 +25,7 @@
                     <image class="poster" mode="aspectFill" :src="a.product_img" />
                 </div>
             </div>
-            <div class="p2 flex_r flex_jb" v-else-if="[2,3].includes(i.type)">
+            <div class="p2 flex_r flex_jb" v-else-if="[2,3,6].includes(i.type)">
                 <div class="goods good2 ellipsis">
                     <div class="p" v-for="(a,b) in i.orderGoods" :key="b">{{ a.product_name }}</div>
                 </div>
@@ -95,6 +95,7 @@ export default {
             else if ([2,3].includes(i.type)) this.goto('/pagesB/directCharge/orderDetail', { trade_no: i.trade_no })
             else if (i.type == 4) this.goto('/pagesB/hotel/orderDetail', { trade_no: i.trade_no })
             else if (i.type == 5) this.goto('/pagesB/scenicSpotTicket/orderDetail', { trade_no: i.trade_no })
+            else if (i.type == 6) this.goto('/pagesB/prepaidRefill/orderDetail', { trade_no: i.trade_no })
         },
         neaten1(va,type){
             if(va && type == 1){

+ 284 - 0
src/pagesB/prepaidRefill/index.vue

@@ -0,0 +1,284 @@
+<template>
+    <div class="prepaidRefill">
+        <div class="input_phone flex_r flex_jb flex_wrap">
+            <textarea
+                v-model="qda.phoneno"
+                placeholder="请输入手机号"
+                class="inp dinB"
+                :auto-height="true"
+                @input="inphone"
+                @blur="inphone"
+                @confirm="inphone"
+                placeholder-class="inpc"
+            />
+            <div class="ico iconfont" @click="openContact">&#xe8fb;</div>
+            <div class="phonemsg" v-if="gameArea">{{ gameArea }}</div>
+        </div>
+        <div class="items">
+            <div class="tit">充话费</div>
+            <div class="li flex_r">
+                <div
+                    :class="{ li_it: 1, active: qda.cardnum == i }"
+                    v-for="(i, s) in CallingList"
+                    :key="s"
+                    @click="qda.cardnum = i"
+                >
+                    {{ i }}元
+                </div>
+            </div>
+        </div>
+        <div class="money card">
+            <div class="li flex_r flex_jb">
+                <span>消费金额</span>
+                <span>¥{{ cartTotal || 0 }}</span>
+            </div>
+            <div class="li flex_r flex_jb">
+                <span
+                    >消费金抵扣<span class="corg">{{ Integral }}%</span></span
+                >
+                <span class="corg">-¥{{ deduction || 0 }}</span>
+            </div>
+            <div class="li flex_r flex_jb">
+                <span>实付金额</span>
+                <span>¥{{ actuallypaid || 0 }}</span>
+            </div>
+        </div>
+        <div class="money card mar_b60">
+            <div class="li flex_r flex_jb">
+                <span>赠送茶宝</span>
+                <span>{{ chabao || 0 }}</span>
+            </div>
+        </div>
+        <div class="footbtn" @click="onpay">立即支付</div>
+    </div>
+</template>
+
+<script>
+import { ToPayOpre } from "@/utils/reqTools.js";
+let toPayOpre = new ToPayOpre();
+import { post } from "@/request/api.js";
+export default {
+    name: "prepaidRefill",
+    props: {},
+    components: {},
+    data() {
+        return {
+            CallingList: [], //可充话费列表
+            qda: {
+                cardnum: 100,
+            },
+            isvalid: false,
+            userinfo: uni.getStorageSync("userinfo"),
+            gameArea: "",
+
+            ratio: {},
+            cartTotal: 0,
+            Integral: 0,
+            deduction: 0,
+            actuallypaid: 0,
+            chabao: 0,
+        };
+    },
+    methods: {
+        openContact() {
+            let that = this;
+            uni.chooseContact({
+                success: (res) => {
+                    if (that.checkPhone(res.phoneNumber)) {
+                        that.qda.phoneno = res.phoneNumber;
+                    }
+                },
+                fail: (err) => {
+                    console.log("获取通讯录失败:", err);
+                },
+            });
+        },
+        getCallingList() {
+            post("local/ofpay/getMoney").then((res) => {
+                if (res.code == 0) {
+                    this.CallingList = res.data;
+                    this.qda.cardnum = res.data[0];
+                    this.inphone();
+                }
+            });
+        },
+        inphone() {
+            if (this.checkPhone(this.qda.phoneno)) {
+                post("local/ofpay/telCheck", this.qda).then((res) => {
+                    if (res.code == 0) {
+                        this.isvalid = true;
+                        post("local/ofpay/telQuery", this.qda).then((res) => {
+                            if (res.code == 0) {
+                                if (res.data.error_code == 0) {
+                                    this.gameArea = res.data.result.game_area;
+                                    this.getIntegral();
+                                }
+                            }
+                        });
+                    } else this.isvalid = false;
+                });
+            }
+        },
+        checkPhone(phone) {
+            if (/^1[3456789]\d{9}$/.test(phone)) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        getIntegral() {
+            post("local/getIntegral", { type: 6 }).then((res) => {
+                if (res.code == 0) {
+                    this.ratio = res.data;
+                    this.computef();
+                }
+            });
+        },
+        computef() {
+            let { integral, chabao } = this.ratio;
+            let i1 = integral,
+                i2 = chabao;
+            this.cartTotal = this.qda.cardnum;
+            this.Integral = this.$h.Mul(i1, 100);
+            this.deduction = this.$h.Mul(this.cartTotal, i1);
+            this.actuallypaid = this.$h.Sub(this.cartTotal, this.deduction);
+            this.chabao = this.$h.Mul(this.actuallypaid, i2).toFixed(2);
+        },
+        onpay() {
+            post("local/ofpay/onlineorde", this.qda).then((res) => {
+                if (res.code == 0) {
+                    toPayOpre.toPay(res.data, (rea) => {
+                        if (!rea) {
+                            // 支付成功
+                            this.goto("/pagesB/orderingfood/orderlist");
+                        } else {
+                            // 支付失败
+                        }
+                    });
+                }
+            });
+        },
+    },
+    onLoad(da) {
+        this.qda.phoneno = this.userinfo.mobile;
+        this.getCallingList();
+    },
+    watch: {
+        'qda.cardnum': {
+            immediate: true,
+            deep: true,
+            handler(va) {
+                this.computef();
+            }
+        }
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.prepaidRefill {
+    min-height: 100vh;
+    background-color: #fff;
+    padding: 28rpx 32rpx;
+}
+.input_phone {
+    border-bottom: 1rpx solid rgba($color: #000, $alpha: 0.15);
+    padding: 12rpx 16rpx;
+    margin-bottom: 60rpx;
+    .inp {
+        font-size: 40rpx;
+    }
+    .ico{
+        font-size: 50rpx;
+        font-weight: bold;
+    }
+    .phonemsg {
+        width: 100%;
+        font-size: 24rpx;
+        margin-top: 12rpx;
+        color: #666;
+    }
+}
+.items {
+    margin-bottom: 60rpx;
+    .tit {
+        font-size: 26rpx;
+        color: #666;
+        margin-bottom: 20rpx;
+    }
+    .li {
+        display: grid;
+        justify-content: space-between;
+        grid-template-columns: repeat(auto-fill, 210rpx);
+    }
+    .li_it {
+        font-size: 38rpx;
+        font-weight: 600;
+        width: 210rpx;
+        text-align: center;
+        height: 120rpx;
+        line-height: 120rpx;
+        border-radius: 12rpx;
+        border: 1rpx solid rgba($color: #000, $alpha: 0.15);
+        margin-bottom: 16rpx;
+        color: #555;
+        &.active {
+            color: #18bb88;
+            border-color: #18bb88;
+            box-shadow: 4rpx 4rpx 16rpx 10rpx rgba($color: #18bb88, $alpha: 0.1);
+        }
+    }
+}
+.money {
+    .li {
+        margin-bottom: 16rpx;
+
+        &:last-child {
+            margin-bottom: 0;
+        }
+
+        span {
+            font-size: 30rpx;
+        }
+    }
+
+    .corg {
+        color: #18bb88;
+        margin-left: 12rpx;
+    }
+}
+.card {
+    background-color: #fff;
+    border-radius: 16rpx;
+    margin-bottom: 30rpx;
+    padding: 28rpx 30rpx;
+    font-size: 32rpx;
+    box-shadow: 4rpx 4rpx 16rpx 10rpx rgba($color: #000, $alpha: 0.15);
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+.footbtn {
+    width: calc(100% - 60rpx);
+    height: 80rpx;
+    background: #17bb87;
+    border-radius: 45rpx;
+    position: fixed;
+    bottom: 50rpx;
+    left: 30rpx;
+    color: #fff;
+    font-size: 36rpx;
+    text-align: center;
+    line-height: 80rpx;
+}
+</style>
+<style lang='scss'>
+.prepaidRefill {
+    .inpc {
+        font-size: 34rpx;
+    }
+}
+</style>

+ 158 - 0
src/pagesB/prepaidRefill/orderDetail.vue

@@ -0,0 +1,158 @@
+<template>
+    <div class="orderDetail">
+        <div class="Detail_con">
+            <div class="p_t">{{ order.product_name }}</div>
+        </div>
+        <div class="money card">
+            <div class="li flex_r flex_jb">
+                <span>消费金额</span>
+                <span>¥{{ order.order_amount || 0 }}</span>
+            </div>
+            <div class="li flex_r flex_jb">
+                <span>消费金抵扣<span class="corg">{{Integral}}%</span></span>
+                <span class="corg">-¥{{ deduction || 0 }}</span>
+            </div>
+            <div class="li flex_r flex_jb">
+                <span>实付金额</span>
+                <span>¥{{ order.pay_amount || 0 }}</span>
+            </div>
+        </div>
+        <div class="info card">
+            <p>产品品牌:{{ order.restaurant_name }}</p>
+            <p>产品名称:{{ order.product_name }}</p>
+            <p>充值手机号:{{ order.phone }}</p>
+            <p>订单金额:¥{{ order.pay_amount }}</p>
+            <p>订单编号:{{ order.trade_no }}</p>
+            <p>下单时间:{{ order.create_time }}</p>
+        </div>
+        <div class="footbtn" v-if="order.status == 0" @click="pay">立即支付</div>
+    </div>
+</template>
+
+<script>
+import { ToPayOpre } from "@/utils/reqTools.js";
+let toPayOpre = new ToPayOpre();
+import { post } from "@/request/api.js";
+export default {
+    name: "orderDetail",
+    props: {},
+    data() {
+        return {
+            order: {},
+            orders: [],
+            pda: {},
+            Integral: 0,
+            deduction: 0,
+        };
+    },
+    methods: {
+        getOrderDetail(da) {
+            post("local/ofpay/orderDetail", da).then(res => {
+                if (res.code == 0) {
+                    let da = res.data.order
+                    da.product_name = da.orderGoods[0].product_name;
+                    delete da.orderGoods;
+                    this.order = da;
+                    this.getIntegral()
+                }
+            })
+        },
+        getIntegral() {
+            post("local/getIntegral", { type: 6 }).then(res => {
+                if (res.code == 0) {
+                    let i1 = res.data.integral;
+                    this.Integral = this.$h.Mul(i1, 100);
+                    this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
+                }
+            })
+        },
+        pay() {
+            post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
+                if (res.code == 0 && res.data.data.prepayid) {
+                    toPayOpre.toPay(res.data.data, (rea) => {
+                        if (!rea) {
+                            // 支付成功
+                            this.getOrderDetail(this.pda);
+                        } else {
+                            // 支付失败
+                        }
+                    });
+                }
+            })
+        },
+    },
+    onLoad(da) {
+        this.getOrderDetail(da);
+        this.pda = da;
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+
+<style scoped lang='scss'>
+.orderDetail{
+    padding: 28rpx 30rpx;
+}
+.Detail_con{
+    background-color: #fff;
+    border-radius: 20rpx;
+    padding: 28rpx 30rpx;
+    margin-bottom: 30rpx;
+    box-shadow: 4rpx 4rpx 16rpx 10rpx rgba($color: #000, $alpha: 0.15);
+    .p_t{
+        font-size: 30rpx;
+        font-weight: bold;
+    }
+}
+.info{
+    p{
+        font-size: 28rpx;
+        color: #666;
+        margin-bottom: 8rpx;
+        &:last-child {
+            margin-bottom: 0;
+        }
+    }
+}
+.card {
+    background-color: #fff;
+    border-radius: 20rpx;
+    margin-bottom: 30rpx;
+    padding: 28rpx 30rpx;
+    font-size: 32rpx;
+    box-shadow: 4rpx 4rpx 16rpx 10rpx rgba($color: #000, $alpha: 0.15);
+
+    &:last-child {
+        margin-bottom: 0;
+    }
+}
+.footbtn {
+    width: calc(100% - 60rpx);
+    height: 80rpx;
+    background: #17bb87;
+    border-radius: 45rpx;
+    position: fixed;
+    bottom: 50rpx;
+    left: 30rpx;
+    color: #fff;
+    font-size: 36rpx;
+    text-align: center;
+    line-height: 80rpx;
+}
+.money{
+    .li{
+        margin-bottom: 16rpx;
+        &:last-child{
+            margin-bottom: 0;
+        }
+        span{
+            font-size: 30rpx;
+        }
+    }
+    .corg{
+        color: #18bb88;
+        margin-left: 5rpx;
+    }
+}
+</style>

+ 1 - 1
src/pagesB/scenicSpotTicket/index.vue

@@ -93,7 +93,7 @@ export default {
         // 获取列表
         getlist() {
             let da = Object.assign({}, this.qda);
-            uni.showLoading({ title: '' });
+            uni.showLoading();
             post("local/ticket/scenicList", da).then((res) => {
                 if (res.code == 0) {
                     if (this.qda.pageIndex == 1) this.list = [];

+ 1 - 0
src/pagesB/scenicSpotTicket/orderDetail.vue

@@ -26,6 +26,7 @@
             <p>产品品牌:{{ order.restaurant_name }}</p>
             <p>产品名称:{{ order.product_name }}</p>
             <p>数量:{{ order.number }}</p>
+            <p>手机号:{{ order.phone }}</p>
             <p>订单金额:¥{{ order.pay_amount }}</p>
             <p>订单编号:{{ order.trade_no }}</p>
             <p>下单时间:{{ order.create_time }}</p>

+ 1 - 1
src/utils/myfun.js

@@ -70,7 +70,7 @@ export function tidyTpye(va) {
         case 1: return "零售专区";
         case 2: return "批发专区";
         case 3: return "货易优选";
-        case 4: return "甄选好物";
+        case 4: return "消费金电商";
         case 5: return "茶宝兑换";
         case 6: return "天天捡漏";
         default: return ""