Browse Source

no message

DaMowang 2 years ago
parent
commit
5550d2e255

+ 3 - 3
src/app.scss

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

+ 14 - 14
src/pages.json

@@ -246,7 +246,7 @@
 				{
 				{
 					"path": "orderingfood/fineFood",
 					"path": "orderingfood/fineFood",
 					"style": {
 					"style": {
-						"navigationBarTitleText": ""
+						"navigationBarTitleText": "餐饮"
 					}
 					}
 				},
 				},
 				{
 				{
@@ -279,12 +279,6 @@
 						"navigationBarTitleText": "订单详情"
 						"navigationBarTitleText": "订单详情"
 					}
 					}
 				},
 				},
-				{
-					"path": "orderingfood/incomeExpenses",
-					"style": {
-						"navigationBarTitleText": "收支明细"
-					}
-				},
 				{
 				{
 					"path": "cinema/cinemaList",
 					"path": "cinema/cinemaList",
 					"style": {
 					"style": {
@@ -407,7 +401,13 @@
 						"navigationBarTitleText": "充值详情"
 						"navigationBarTitleText": "充值详情"
 					}
 					}
 				},
 				},
-				
+				{
+					"path": "my/shuZhiWallet",
+					"style": {
+						"navigationBarTextStyle":"white",
+						"navigationStyle": "custom"
+					}
+				},
 
 
 				{
 				{
 					"path": "order/verificationCode",
 					"path": "order/verificationCode",
@@ -469,12 +469,12 @@
 			]
 			]
 		}
 		}
 	],
 	],
-	"preloadRule": {
-		"pages/index/index": {
-			"network": "all",
-			"packages": ["pagesB"]
-		}
-	},
+	// "preloadRule": {
+	// 	"pages/orderingfood/merchantlist": {
+	// 		"network": "all",
+	// 		"packages": ["pagesB"]
+	// 	}
+	// },
 	"tabBar": {
 	"tabBar": {
 		"color": "#999",
 		"color": "#999",
 		"selectedColor": "#18bb88",
 		"selectedColor": "#18bb88",

+ 7 - 11
src/pages/my/index.vue

@@ -57,10 +57,10 @@
         <view class="fun_container">
         <view class="fun_container">
             <view class="fun mar_t30">
             <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>
-                        <view class="fun_text">我的用户</view>
+                <view class="fun_con mar_t50 flex_r flex_ac">
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/shuZhiWallet" hover-class="none">
+                        <image class="fun_img" src="/static/my/deposit.png"></image>
+                        <view class="fun_text">数智钱包</view>
                     </navigator>
                     </navigator>
                     <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/orderlist" hover-class="none">
                     <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/orderlist" hover-class="none">
                         <image class="fun_img" src="/static/my/order_history.png"></image>
                         <image class="fun_img" src="/static/my/order_history.png"></image>
@@ -70,13 +70,9 @@
                         <image class="fun_img" src="/static/my/upgrade.png"></image>
                         <image class="fun_img" src="/static/my/upgrade.png"></image>
                         <view class="fun_text">激活升级</view>
                         <view class="fun_text">激活升级</view>
                     </navigator>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/incomeExpenses" hover-class="none">
-                        <image class="fun_img" src="/static/my/detail.png"></image>
-                        <view class="fun_text">收支明细</view>
-                    </navigator>
-                    <navigator class="fun_list flex_c flex_ac" @click="getToCash('local')" hover-class="none">
-                        <image class="fun_img" src="/static/my/deposit.png"></image>
-                        <view class="fun_text">提现</view>
+                    <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>
+                        <view class="fun_text">我的用户</view>
                     </navigator>
                     </navigator>
                 </view>
                 </view>
             </view>
             </view>

+ 33 - 31
src/pages/to-pay-list/index.vue

@@ -126,10 +126,10 @@
             </view>
             </view>
             <view class="order_list flex_r flex_ac flex_jb" v-if="['1','2','3'].includes(Data.type)">
             <view class="order_list flex_r flex_ac flex_jb" v-if="['1','2','3'].includes(Data.type)">
                 <view class="list_name">可用云宝</view>
                 <view class="list_name">可用云宝</view>
-                <view class="list_con p_color">¥{{ userinfo.user_money }}</view>
+                <view class="list_con g_color">¥{{ userinfo.user_money }}</view>
             </view>
             </view>
-            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type==4 && isAct">
-                <view class="list_name">佣金余额</view>
+            <view class="order_list flex_r flex_ac flex_jb" v-if="['1','2','3', '4'].includes(Data.type) && isAct">
+                <view class="list_name">数智余额</view>
                 <view class="list_con g_color">¥{{ local_uinfo.property }}</view>
                 <view class="list_con g_color">¥{{ local_uinfo.property }}</view>
             </view>
             </view>
 
 
@@ -178,11 +178,11 @@ export default {
     },
     },
     onLoad(e) {
     onLoad(e) {
         this.Data = e;
         this.Data = e;
-        this.getLU();
-		this.isActivation();
-        this.getuserInfo();
-        this.loadAddress();
-        this.loadData(e);
+		this.isActivation();    //查询是否激活数智生活
+        this.getLU();   //获取数智生活用户信息
+        this.getuserInfo(); //获取云店用户信息
+        this.loadAddress(); //获取收货地址
+        this.loadData(e);   //加载订单商品数据
 
 
         this.modularName = this.tidyTpye(e.type);
         this.modularName = this.tidyTpye(e.type);
     },
     },
@@ -220,41 +220,43 @@ export default {
                     if (this.goodsInfo.shipping_method != 2) this.prom_type = this.goodsInfo.shipping_method
                     if (this.goodsInfo.shipping_method != 2) this.prom_type = this.goodsInfo.shipping_method
                     post("v1/goods/freight", { type: da.type, id: da.id }).then((res) => {
                     post("v1/goods/freight", { type: da.type, id: da.id }).then((res) => {
                         if (res.code === 0) this.freight = res.data.freight;
                         if (res.code === 0) this.freight = res.data.freight;
+
+                        let type = this.Data.type;  // 商品类型(零售、批发 ...)
 						
 						
                         // 计算待支付
                         // 计算待支付
-                        let p = this.Data.type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
-                        let y = 0;  //运费
-                        if(this.Data.type == 2){
-                            if(this.Data.is_sell == 1){
-                                y = this.freight.service
-                            }
-                            else if(this.prom_type != 1 && this.Data.is_sell != 1){
-                                y = this.freight.freight
-                            }
-                        }else{
-                            y = this.prom_type == 1 ? 0 : this.freight; // 运费单价   寄卖、自提 运费为0
+                        let p = type == 2 ? this.goodsInfo.trade_price : this.goodsInfo.cost_price; //商品单价
+                        let y = 0;  //运费单价
+                        if(type == 2){
+                            if(this.Data.is_sell == 1) y = this.freight.service
+                            else if(this.prom_type != 1 && this.Data.is_sell != 1) y = this.freight.freight
                         }
                         }
+                        else y = this.prom_type == 1 ? 0 : this.freight; // 运费单价   寄卖、自提 运费为0
                         let ps = this.$h.Mul(p, this.Data.num); //商品总价
                         let ps = this.$h.Mul(p, this.Data.num); //商品总价
-						this.originalPrice = ps; this.CommodityPrice = ps;
                         let ys = this.$h.Mul(y, this.Data.num) //运费总价
                         let ys = this.$h.Mul(y, this.Data.num) //运费总价
                         let a = this.$h.Add(ps, ys); //商品总价加运费
                         let a = this.$h.Add(ps, ys); //商品总价加运费
-                        let b = this.$h.Sub(a, this.userinfo.user_money); //待支付金额
-                        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 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.originalPrice = ps; this.CommodityPrice = ps;
+
+                        let um = 0; //数智生活余额
+                        if(this.isAct) um = this.local_uinfo.property; //数智生活余额
+                        let userBalance = this.$h.Add(this.userinfo.user_money, um); //用户总余额(数智生活余额+云宝)
+
+                        let b = this.$h.Sub(a, userBalance); //待支付金额
+                        let b1 = this.$h.Sub(ps, userBalance); //待支付金额 - 零售&批发&云宝货易 运费必须现金支付
+
+                        if (type == 4) {
+                            if(this.isAct){
+                                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;
 								this.CommodityPrice = sp;
 								let b2 = this.$h.Sub(sp, um); //消费金电商  可以使用数智生活佣金支付
 								let b2 = this.$h.Sub(sp, um); //消费金电商  可以使用数智生活佣金支付
 								this.obligation = b2 > 0 ? b2 : 0;
 								this.obligation = b2 > 0 ? b2 : 0;
 							}
 							}
 							else this.obligation = a;
 							else this.obligation = a;
 						}
 						}
-                        else if (["5", "6"].includes(this.Data.type)) this.obligation = a;
-                        else if (["1", "2", "3"].includes(this.Data.type)) this.obligation = b1 > 0 ? this.$h.Add(b1, ys) : ys;
+                        else if (["5", "6"].includes(type)) this.obligation = a;
+                        else if (["1", "2", "3"].includes(type)) this.obligation = b1 > 0 ? this.$h.Add(b1, ys) : ys;
                         else this.obligation = b > 0 ? b : 0;
                         else this.obligation = b > 0 ? b : 0;
                     });
                     });
                 }
                 }

+ 33 - 22
src/pages/top-up/index.vue

@@ -1,19 +1,23 @@
 <template>
 <template>
     <view class="container">
     <view class="container">
         <view class="con">
         <view class="con">
-            <view class="list flex_r flex_ac">
-                <view class="list_name">当前云宝:</view>
-                <input class="list_input flex_grow" type="text" v-model="userinfo.user_money" readonly placeholder="当前云宝" />
+            <view class="list flex_r flex_ac" v-if="type == 'local'">
+                <view class="list_name">当前余额:</view>
+                <span>{{localInfo.property}}</span>
+            </view>
+            <view class="list flex_r flex_ac" v-else>
+                <view class="list_name">当前云宝:</view>
+                <span>{{userinfo.user_money}}</span>
             </view>
             </view>
             <view class="list flex_r flex_ac">
             <view class="list flex_r flex_ac">
-                <view class="list_name">充值金额:</view>
+                <view class="list_name">充值金额</view>
                 <input class="list_input flex_grow" type="text" v-model="price" placeholder="请输入充值金额" />
                 <input class="list_input flex_grow" type="text" v-model="price" placeholder="请输入充值金额" />
             </view>
             </view>
             <view class="list flex_r flex_ac">
             <view class="list flex_r flex_ac">
-                <view class="list_name">支付方式:</view>
+                <view class="list_name">支付方式</view>
                 <view class="flex_r flex_ac">
                 <view class="flex_r flex_ac">
                     <view class="way_con flex_r flex_ac">
                     <view class="way_con flex_r flex_ac">
-                        <image class="way_img" src="/static/weixin_icon.png" mode=""></image>
+                        <span class="iconfont icow">&#xe650;</span>
                         <view class="way_text">微信支付</view>
                         <view class="way_text">微信支付</view>
                     </view>
                     </view>
                 </view>
                 </view>
@@ -48,19 +52,21 @@ export default {
             detail: {},
             detail: {},
             array: ["云宝充值"],
             array: ["云宝充值"],
             index: 0,
             index: 0,
-            userinfo: undefined, // 获取用户信息
+            userinfo: uni.getStorageSync("userinfo"), // 获取用户信息
+            localInfo: uni.getStorageSync("localInfo"), // 获取数智生活用户信息
             isDisabled: false, //是否选中协议
             isDisabled: false, //是否选中协议
             advertisingImg: "", //广告图片
             advertisingImg: "", //广告图片
+
+            type: undefined
         };
         };
     },
     },
-    onLoad: function() {
-        this.userinfo = uni.getStorageSync("userinfo");
+    onLoad(e) {
+        this.type = e.type
         this.getAdvImg();
         this.getAdvImg();
     },
     },
     methods: {
     methods: {
         confimTopUp() {
         confimTopUp() {
-            console.log(this.isDisabled, "qqqq")
-            if (this.price == 0 || this.prioce == "") {
+            if (!this.price) {
                 appEv.errTips("充值不能为0");
                 appEv.errTips("充值不能为0");
                 return;
                 return;
             } else if (!this.isDisabled) {
             } else if (!this.isDisabled) {
@@ -78,6 +84,7 @@ export default {
                 type = "jsapi";
                 type = "jsapi";
                 // #endif
                 // #endif
                 let data = {
                 let data = {
+                    type: this.type == "local" ? 2 : 1,
                     trade_type: type,
                     trade_type: type,
                     amount: this.price,
                     amount: this.price,
                 };
                 };
@@ -87,8 +94,9 @@ export default {
                         if (!rea) {
                         if (!rea) {
                             // 支付成功
                             // 支付成功
                             appEv.errTips("支付成功");
                             appEv.errTips("支付成功");
-                            this.price = 0;
-                            this.getuserInfo();
+                            this.price = undefined;
+                            if(this.type == "local") this.getLU();
+                            else this.getuserInfo();
                         } else {
                         } else {
                             // 支付失败
                             // 支付失败
                             appEv.errTips("支付已取消");
                             appEv.errTips("支付已取消");
@@ -100,7 +108,6 @@ export default {
         getAdvImg() {
         getAdvImg() {
             post("v1/adImgages").then((res) => {
             post("v1/adImgages").then((res) => {
                 if (res.code === 0) {
                 if (res.code === 0) {
-                    console.log(res.data.data);
                     this.advertisingImg = res.data.data;
                     this.advertisingImg = res.data.data;
                 }
                 }
             });
             });
@@ -108,6 +115,9 @@ export default {
         async getuserInfo() {
         async getuserInfo() {
             this.userinfo = await uni.userfun();
             this.userinfo = await uni.userfun();
         },
         },
+        async getLU() {
+            this.localInfo = await uni.Luserfun()
+        },
         checkboxChange(e) {
         checkboxChange(e) {
             var value = e.detail.value;
             var value = e.detail.value;
             if (value.length == 0) {
             if (value.length == 0) {
@@ -150,9 +160,9 @@ page {
 
 
 .list_name {
 .list_name {
     font-size: 28rpx;
     font-size: 28rpx;
-    color: #333333;
+    color: #333;
     font-weight: "SourceHanSansCN-Medium";
     font-weight: "SourceHanSansCN-Medium";
-    width: 130rpx;
+    width: 150rpx;
 }
 }
 
 
 .list_input {
 .list_input {
@@ -209,17 +219,18 @@ page {
     background-position: center center;
     background-position: center center;
 }
 }
 
 
-.way_img {
-    width: 52rpx;
-    height: 52rpx;
-    margin-right: 8rpx;
-}
-
 .way_text {
 .way_text {
     font-size: 22rpx;
     font-size: 22rpx;
     color: #333333;
     color: #333333;
     font-family: "SourceHanSansCN-Medium";
     font-family: "SourceHanSansCN-Medium";
 }
 }
 
 
+.icow{
+    color: #00C800;
+    margin-right: 6rpx;
+}
+.way_text,.icow{
+    vertical-align: middle;
+}
 // 页面内容-end
 // 页面内容-end
 </style>
 </style>

+ 21 - 1
src/pagesB/cinema/confirmOrder.vue

@@ -81,6 +81,26 @@ export default {
             })
             })
         },
         },
         pay(){
         pay(){
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let ar = []
             let ar = []
             for (let it of this.OrderDa.oldArray) {
             for (let it of this.OrderDa.oldArray) {
                 ar.push({
                 ar.push({
@@ -106,7 +126,7 @@ export default {
                         // 支付失败
                         // 支付失败
                       }
                       }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         },
         },
         cinemaDesc(){
         cinemaDesc(){

+ 21 - 1
src/pagesB/directCharge/coupon.vue

@@ -135,6 +135,26 @@ export default {
             this.egralf();
             this.egralf();
         },
         },
         pay() {
         pay() {
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let da = {
             let da = {
                 type: 3,
                 type: 3,
                 count: this.count,
                 count: this.count,
@@ -151,7 +171,7 @@ export default {
                             // 支付失败
                             // 支付失败
                         }
                         }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         }
         }
     },
     },

+ 21 - 6
src/pagesB/directCharge/payment.vue

@@ -114,11 +114,26 @@ export default {
             this.chabao = this.$h.Mul(this.actuallypaid,i2).toFixed(2);
             this.chabao = this.$h.Mul(this.actuallypaid,i2).toFixed(2);
         },
         },
         pay() {
         pay() {
-            // var reg =/^0?1[3|4|5|6|7|8][0-9]\d{8}$/;
-            // if(!reg.test(this.phone)){
-            //     uni.showToast({title: `请输入正确的${this.topupBrand.name}账号`, icon: "none"})
-            //     return;
-            // }
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let da = {
             let da = {
                 type: 2,
                 type: 2,
                 count: 1,
                 count: 1,
@@ -135,7 +150,7 @@ export default {
                             // 支付失败
                             // 支付失败
                         }
                         }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         },
         },
     },
     },

+ 21 - 1
src/pagesB/hotel/hotelDetail.vue

@@ -170,6 +170,26 @@ export default {
             this.qda.arriveTime = va
             this.qda.arriveTime = va
         },
         },
         onpay() {
         onpay() {
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let RI = Object.assign({},this.roomInfo)
             let RI = Object.assign({},this.roomInfo)
             let da = {
             let da = {
                 ...this.qda,
                 ...this.qda,
@@ -193,7 +213,7 @@ export default {
                             // 支付失败
                             // 支付失败
                         }
                         }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         }
         }
     },
     },

+ 226 - 0
src/pagesB/my/shuZhiWallet.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class='shuZhiWallet'>
+        <view class="hander-top">
+            <view class="icon-back-wrap" @click="onBack">
+                <image class="icon-back" src="@/pagesB/static/preview/icon-back.png" mode="widthFix" />
+            </view>
+            <!-- <view class="count">数智钱包</view> -->
+            <view class="capsule"></view>
+        </view>
+        <div class="h_top">
+            <div class="balance_box">
+                <div class="b_teg">我的余额(元)</div>
+                <div class="dinB balance">{{ local_uinfo.property }}</div>
+            </div>
+        </div>
+        <div class="btn_bar flex_r flex_jse">
+            <div class="btn_item" @click="getToCash('local')">
+                <span class="ico iconfont">&#xe603;</span>
+                <span class="btn_txt">提现</span>
+            </div>
+            <div class="btn_item corc" @click="getTotopup('local')">
+                <span class="ico iconfont">&#xe68a;</span>
+                <span class="btn_txt">充值</span>
+            </div>
+        </div>
+        <div class="detailList" v-if="List.length">
+            <div class="tit"><span>收支明细</span></div>
+            <div class="li" v-for="(i,s) in List" :key="s">
+                <p class="flex_r flex_jb">
+                    <span class="s1">{{ i.remark }}</span>
+                    <span class="s2">{{ parseFloat(i.money).toFixed(2) }}</span>
+                </p>
+                <p class="flex_r flex_jb">
+                    <span class="s3">{{ i.create_time }}</span>
+                </p>
+            </div>
+        </div>
+  </div>
+</template>
+
+<script>
+import { post } from "@/request/api.js";
+  export default {
+    name: 'shuZhiWallet',
+    props: {},
+    components: {},
+    data () {
+      return {
+            local_uinfo: {
+                property:0
+            },
+            List: [],
+            Query: {
+                page: 1,
+                rows: 20
+            },
+      }
+    },
+    methods: {
+        getList() {
+            post("local/revenue").then(res => {
+                if (res.code == 0) {
+                    let list = res.data.data;
+                    this.List = [...this.List, ...list]
+                    this.Query.page++
+                }
+            })
+        },
+        async getLU() {
+            this.local_uinfo = await uni.Luserfun();
+        },
+        onBack() {
+            uni.navigateBack();
+        },
+        // 跳转到提现页面
+        getToCash(type) {
+            this.goto("/pages/cash/index", { type })
+        },
+        // 跳转到充值页面
+        getTotopup(type) {
+            this.goto("/pages/top-up/index", { type })
+        },
+    },
+    onLoad(da) {
+        this.getList();
+        this.getLU();
+    },
+    onShow() {},
+    mounted() {},
+    onReachBottom() {
+        if (this.Query.page < this.merchant.last_page) this.getlists();
+    },
+  }
+</script>
+
+<style scoped lang='scss'>
+.h_top{
+    background: linear-gradient(#d3aa79, #f3d6b2);
+    height: 360rpx;
+    position: relative;
+    .balance_box{
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        padding: 0 32rpx 38rpx;
+        width: 100%;
+        text-align: center;
+        .b_teg{
+            font-size: 28rpx;
+            margin-bottom: 3rpx;
+            color: rgba($color: #000, $alpha: 0.65);
+        }
+        .balance{
+            font-size: 60rpx;
+            color: #333;
+        }
+    }
+}
+.btn_bar{
+    padding: 30rpx 0;
+    .btn_item{
+        width: 280rpx;
+        height: 70rpx;
+        line-height: 70rpx;
+        text-align: center;
+        background: rgba($color: #000, $alpha: 0.15);
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        border-radius: 10rpx;
+        &.corc{
+            background-color: #d3aa79;
+            color: #fff;
+        }
+    }
+    .ico{
+        color: #d3aa79;
+        width: 50rpx;
+        height: 50rpx;
+        background: #fff;
+        border-radius: 50%;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        font-size: 36rpx;
+    }
+    .btn_txt{
+        height: 50rpx;
+        width: calc(76% - 50rpx);
+        line-height: 50rpx;
+    }
+}
+.detailList{
+    width: calc(100% - 64rpx);
+    border-radius: 12rpx;
+    background-color: #fff;
+    margin-left: 32rpx;
+    .tit{
+        padding: 28rpx 32rpx 10rpx;
+        span{
+            display: inline-block;
+            padding-left: 16rpx;
+            font-size: 32rpx;
+            font-weight: 600;
+            height: 32rpx;
+            line-height: 32rpx;
+            border-left: 8rpx solid #d3aa79;
+        }
+    }
+    .li{
+        padding: 22rpx 30rpx;
+        border-bottom: 1px solid rgba($color: #d3aa79, $alpha: 0.3);
+        p{
+            margin-bottom: 8rpx;
+            font-size: 30rpx;
+            &:last-child{
+                margin-bottom: 0;
+                font-size: 25rpx;
+                color: #999;
+            }
+        }
+        .s2{
+            font-weight: bold;
+            &::before{
+                content: "¥";
+                font-size: 25rpx;
+            }
+        }
+        &:last-child{
+            border: none;
+        }
+    }
+}
+.hander-top {
+    position: absolute;
+    z-index: 1000;
+    top: 108rpx;
+    left: 0;
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    padding: 0 32rpx;
+    box-sizing: border-box;
+
+    .icon-back-wrap {
+        width: 64rpx;
+        height: 64rpx;
+
+        .icon-back {
+            width: 64rpx;
+            height: 64rpx;
+        }
+    }
+
+    .count {
+        color: #222;
+        font-size: 35rpx;
+        line-height: 64rpx;
+    }
+    .capsule{
+        width: 120rpx;
+    }
+}
+</style>

+ 0 - 100
src/pagesB/orderingfood/incomeExpenses.vue

@@ -1,100 +0,0 @@
-<template>
-    <div class="incomeExpenses">
-        <div class="head_card">
-            <div class="property">余额:{{local_uinfo.property}}</div>
-        </div>
-        <div class="detailList" v-if="List.length">
-            <div class="li" v-for="(i,s) in List" :key="s">
-                <p class="flex_r flex_jb">
-                    <span class="s1">{{ i.remark }}</span>
-                    <span class="s2">{{ parseFloat(i.money).toFixed(2) }}</span>
-                </p>
-                <p class="flex_r flex_jb">
-                    <span class="s3">{{ i.create_time }}</span>
-                </p>
-            </div>
-        </div>
-        <div class="zanwu" v-else>
-            <img src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/5a3c6b1e2d098aa6695394c927c38586545188b8png" alt="" class="zanwuimg">
-            <view class="zanwutxt">暂无收支记录</view>
-        </div>
-    </div>
-</template>
-<script>
-import { post } from "@/request/api.js";
-export default {
-    name: "incomeExpenses",
-    props: {},
-    components: {},
-    data() {
-        return {
-            List: [],
-            Query: {
-                page: 1,
-                rows: 20
-            },
-            local_uinfo: {},
-        };
-    },
-    methods: {
-        async getLU() {
-            this.local_uinfo = await uni.Luserfun()
-        },
-        getList() {
-            post("local/revenue").then(res => {
-                if (res.code == 0) {
-                    let list = res.data.data;
-                    this.List = [...this.List, ...list]
-                    this.Query.page++
-                }
-            })
-        },
-    },
-    onLoad(da) {
-        this.getList();
-        this.getLU();
-    },
-    onShow() {},
-    mounted() {},
-    onReachBottom() {
-        if (this.Query.page < this.merchant.last_page) this.getlists();
-    },
-};
-</script>
-<style scoped lang='scss'>
-.incomeExpenses{
-    min-height: 100vh;
-    background-color: #fff;
-}
-.head_card {
-    background-color: #d3aa79;
-    padding: 30rpx;
-    margin-bottom: 20rpx;
-
-    .property {
-        color: #fff;
-    }
-}
-.detailList{
-    .li{
-        padding: 22rpx 30rpx;
-        border-bottom: 1px solid rgba($color: #d3aa79, $alpha: 0.3);
-        p{
-            margin-bottom: 8rpx;
-            font-size: 30rpx;
-            &:last-child{
-                margin-bottom: 0;
-                font-size: 25rpx;
-                color: #999;
-            }
-        }
-        .s2{
-            font-weight: bold;
-            &::before{
-                content: "¥";
-                font-size: 25rpx;
-            }
-        }
-    }
-}
-</style>

+ 21 - 1
src/pagesB/orderingfood/payTheBill.vue

@@ -105,6 +105,26 @@ export default {
             this.userinfo = await uni.userfun();
             this.userinfo = await uni.userfun();
         },
         },
         payBill(){
         payBill(){
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let Arr = []
             let Arr = []
             for (const it of this.cartList) {
             for (const it of this.cartList) {
                 let spec = JSON.parse(it.spec)
                 let spec = JSON.parse(it.spec)
@@ -133,7 +153,7 @@ export default {
                         // 支付失败
                         // 支付失败
                       }
                       }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         }
         }
     },
     },

+ 22 - 2
src/pagesB/prepaidRefill/index.vue

@@ -120,8 +120,28 @@ export default {
             }
             }
         },
         },
         onpay() {
         onpay() {
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.selectItem.actual_price ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             post("local/ofpay/onlineorde", this.qda).then((res) => {
             post("local/ofpay/onlineorde", this.qda).then((res) => {
-                if (res.code == 0) {
+                if (res.code == 0 && res.data.prepayid) {
                     toPayOpre.toPay(res.data, (rea) => {
                     toPayOpre.toPay(res.data, (rea) => {
                         if (!rea) {
                         if (!rea) {
                             // 支付成功
                             // 支付成功
@@ -130,7 +150,7 @@ export default {
                             // 支付失败
                             // 支付失败
                         }
                         }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             });
             });
         },
         },
     },
     },

+ 21 - 1
src/pagesB/scenicSpotTicket/scenicDetail.vue

@@ -164,6 +164,26 @@ export default {
             this.selectDay = va
             this.selectDay = va
         },
         },
         onpay() {
         onpay() {
+            let that = this
+            let localInfo = uni.getStorageSync("localInfo");
+            let um = localInfo.property;
+            let str = um > this.actuallypaid ? "将优先使用余额支付" : "将使用余额抵扣部分支付"
+            if(um > 0){
+                uni.showModal({
+                    title: "温馨提示",
+                    content: `您的数智生活余额 ${um} 元,` + str,
+                    showCancel: true,
+                    confirmText: "确认",
+                    confirmColor: "#f02f2f",
+                    success(res) {
+                        if (res.confirm) {
+                            that.payok();
+                        }
+                    },
+                });
+            }else this.payok();
+        },
+        payok(){
             let da = {
             let da = {
                 ...this.qda,
                 ...this.qda,
                 travelDate: this.selectDay.date,
                 travelDate: this.selectDay.date,
@@ -182,7 +202,7 @@ export default {
                             // 支付失败
                             // 支付失败
                         }
                         }
                     });
                     });
-                }
+                }else this.goto("/pagesB/orderingfood/orderlist")
             })
             })
         },
         },
         thatDay(va){
         thatDay(va){