shish 2 lat temu
rodzic
commit
bf5746c0cc

+ 1 - 1
hdApp/dist/build/h5/index.html

@@ -1,3 +1,3 @@
 <!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>花掌柜</title><script>document.addEventListener('DOMContentLoaded', function() {
 <!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>花掌柜</title><script>document.addEventListener('DOMContentLoaded', function() {
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-			})</script><link rel="stylesheet" href="/static/index.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script>/*BAIDU_STAT*/</script><script src="/static/js/chunk-vendors.9240bb17.js"></script><script src="/static/js/index.83704617.js"></script></body></html>
+			})</script><link rel="stylesheet" href="/static/index.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script>/*BAIDU_STAT*/</script><script src="/static/js/chunk-vendors.9240bb17.js"></script><script src="/static/js/index.2c531b4f.js"></script></body></html>

Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/admin-clear-alipay.f5e108db.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/admin-clear-info.f6cc0b08.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/admin-clear-list.65b4f287.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/admin-ghs-pay.aa90bd49.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/admin-ghs-pay.b52270f0.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/index.2c531b4f.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/index.83704617.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-gatherPay.48b3c928.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-gatherPay.f3936ade.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-purDetails.5b2771a4.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-purDetails.61fe47da.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-wechatPay.1340e0c5.js


Plik diff jest za duży
+ 0 - 0
hdApp/dist/build/h5/static/js/pagesPurchase-wechatPay.1caad8aa.js


+ 215 - 0
hdApp/src/admin/clear/alipay.vue

@@ -0,0 +1,215 @@
+<template>
+	<div class="app-content pay-wrap">
+		<div class="delivery-wrap">
+			<div class="btn-wrap">
+				<!-- #ifdef H5 -->
+				<button class="button-com red">正在打开支付宝...</button>
+				<!-- #endif -->
+			</div>
+		</div>
+	</div>
+</template>
+<script>
+import { purchaseClearAliPay } from '@/api/purchase'
+export default {
+    name: 'alipay',
+    components: {
+    },
+    mixins: [],
+    data() {
+        return {
+            constant: this.$constant
+        }
+    },
+    computed: {
+    },
+    onLoad() {
+        // #ifdef H5
+        this.payInit()
+        // #endif
+    },
+    mounted() {},
+    methods: {
+        init(){
+
+        },
+        payInit() {
+            let orderSn = this.option.orderSn ? this.option.orderSn:''
+            if (this.$util.isEmpty(orderSn)){
+                this.$msg('没有找到订单号')
+                return false
+            }
+            purchaseClearAliPay({orderSn:orderSn}).then(res=>{
+                if(res.code == 0){
+                    this.$msg(res.msg)
+                    return false
+                }
+                window.location.href = res.data.payUrl;
+            })
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+	.app-content {
+		min-height: calc(100vh - 20upx);
+		padding-top: 20upx;
+	}
+	.tabs-wrap {
+		position: fixed;
+		top: 0;
+		width: 100%;
+		height: 80upx;
+		line-height: 80upx;
+		text-align: center;
+		background-color: #fff;
+		font-size: 30upx;
+		box-shadow: 4upx 4upx 10upx #eee;
+	}
+	.pay-wrap {
+		.pay-input-wrap {
+			background-color: #fff;
+			border-top-left-radius: 20upx;
+			border-top-right-radius: 20upx;
+			padding: 50upx 80upx 28upx;
+			margin-bottom: 0 !important;
+			.balance {
+				margin-top: 30upx;
+				color: $fontColor2;
+			}
+			.btn-wrap {
+				width: 100%;
+				margin-top: 64upx;
+				.button-com {
+					display: block;
+					margin-bottom: 20upx;
+					padding-top: 30upx;
+					padding-bottom: 30upx;
+				}
+			}
+		}
+	}
+
+	// 我要配送
+	.delivery-wrap {
+		.module-com {
+			margin-bottom: 20upx;
+			background-color: #fff;
+			.module-tit {
+				padding: 20upx 18upx;
+				font-size: 28upx;
+				font-weight: 600;
+				border-bottom: 1upx solid $borderColor;
+			}
+			.module-det {
+				padding: 0 30upx;
+			}
+		}
+		// 金额
+		.pay-input-wrap {
+			padding: 50upx 36upx 38upx;
+			.balance {
+				margin-top: 30upx;
+				color: $fontColor2;
+			}
+		}
+		.shop-logo-wrap {
+			padding-bottom: 20upx;
+			@include disFlex(center, center);
+			.logo-img {
+				width: 100%;
+				margin: 10upx auto;
+				align-items: center;
+				.logo {
+					width: 100upx;
+					height:100upx;
+					border-radius: 10upx;
+					margin-left:10upx;
+					float: left;
+				}
+				.title{
+					margin-left:20upx;
+					float:left;
+					width:600upx;
+					height:100upx;
+					line-height:100upx;
+					font-size:38upx;
+					font-weight: bold;
+				}
+			}
+		}
+		// 可选优惠
+		.discount-wrap {
+			.module-det {
+				padding-top: 20upx;
+				padding-bottom: 20upx;
+			}
+		}
+		// 匿名派送
+		.none-name-delivery {
+			// padding-left: 30upx;
+			padding: 26upx 30upx;
+			// margin-top: 40upx;
+			margin-bottom: 20upx;
+			background-color: #fff;
+			.none-name-text {
+				margin-left: 14upx;
+				color: $fontColor2;
+			}
+		}
+		// 按钮
+		.btn-wrap {
+			width: calc(100% - 60upx);
+			margin: 64upx auto 0;
+			padding-bottom: 20upx;
+			.button-com {
+				display: block;
+				margin-bottom: 20upx;
+				padding-top: 30upx;
+				padding-bottom: 30upx;
+				&:last-child {
+					margin-bottom: 0;
+				}
+			}
+		}
+
+		// 查看更多
+		.view-more {
+			width: auto;
+			padding-bottom: 20upx;
+			margin-bottom: 20upx;
+			font-size: 28upx;
+			@include disFlex(center, center);
+			background-color: #fff;
+			color: #666565;
+			justify-content: flex-start;
+			z-index:9999999;
+			.view-more-text {
+				margin-right: 14upx;
+			}
+			padding-left:40upx;
+			i {
+				font-size: 30upx;
+				font-weight: 600;
+			}
+			.fill-get-man{
+				color:red;
+				margin-left:10upx;
+				font-weight:600;
+				text-decoration:underline;
+			}
+			.pack-up{
+				margin-left:20upx;
+				font-weight:600;
+				color:red;
+				text-decoration:underline;
+			}
+			&.open {
+				i {
+					transform: rotate(180deg);
+				}
+			}
+		}
+	}
+</style>

+ 4 - 0
hdApp/src/api/clear/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
 
 
+export const getAliPayClearCode = data => {
+	return https.get("/clear/get-ali-pay-clear-code", data);
+};
+
 export const getDetail = data => {
 export const getDetail = data => {
 	return https.get("/clear/get-full-info", data);
 	return https.get("/clear/get-full-info", data);
 };
 };

+ 2 - 1
hdApp/src/pages.json

@@ -478,7 +478,8 @@
 			"root": "admin/clear",
 			"root": "admin/clear",
 			"pages": [
 			"pages": [
 				{ "path": "list", "style": { "navigationBarTitleText": "结账单" } },
 				{ "path": "list", "style": { "navigationBarTitleText": "结账单" } },
-				{ "path": "info", "style": { "navigationBarTitleText": "详情" } }
+				{ "path": "info", "style": { "navigationBarTitleText": "详情" } },
+				{ "path": "alipay", "style": { "navigationBarTitleText": "付款" } }
 			]
 			]
 		}
 		}
 	],
 	],

+ 73 - 10
hdApp/src/pagesPurchase/gatherPay.vue

@@ -23,7 +23,30 @@
             <block v-if="orderTime>0">
             <block v-if="orderTime>0">
               <button v-if="getPayType == 1" class="button-com green pay-wx" @click="wxPayFn(1)" >微信支付</button>
               <button v-if="getPayType == 1" class="button-com green pay-wx" @click="wxPayFn(1)" >微信支付</button>
               <button v-else class="button-com green pay-wx" @click="wxPayFn(0)" >微信支付</button>
               <button v-else class="button-com green pay-wx" @click="wxPayFn(0)" >微信支付</button>
+
+                <!-- #ifdef MP-WEIXIN -->
+                <view style="margin-top:30upx;text-align: center;">
+                <block v-if="hasRenew == 0">
+                  <view style="width:290upx;height:290upx;margin:0 auto;position: relative;" @click="openAliPay()">
+                    <image :src="aliPayCodeImg" mode="heightFix" style="width:290upx;height:290upx;margin:0 auto;"></image>
+                    <view style="font-size:32upx;width:290upx;height:140upx;line-height:140upx;background-color: white;z-index: 9999;position: absolute;top:70upx;left:0upx;font-weight: bold;color:#3385ff;">
+                      点此显示完整
+                    </view>
+                  </view>
+                </block>
+                <block v-else>
+                  <image :src="aliPayCodeImg" mode="heightFix" style="width:290upx;height:290upx;margin:0 auto;"></image>
+                </block>
+                <view style="margin-top:10upx;font-size:32upx;">支付宝扫此二维码付款</view>
+              </view>
+              <button class="button-com ali-btn" @click="savePayCode" style="margin-top:10upx;">保存二维码</button>
+              <button class="button-com ali-btn" @click="goDetail" style="margin-top:10upx;">我已经付款</button>
+              <view style="margin-top:25upx;font-size:32upx;text-decoration: underline;" @click="teachPayFn()">不会用支付宝付款?点这里教您</view>
+              <!-- #endif -->
+
+              <!-- #ifdef APP-PLUS -->
               <button class="button-com green pay-wx ali-btn" @click="aliPay()">支付宝支付</button>
               <button class="button-com green pay-wx ali-btn" @click="aliPay()">支付宝支付</button>
+              <!-- #endif -->
             </block>
             </block>
             <block v-else>
             <block v-else>
               <button class="button-com disable pay-wx">微信支付</button>
               <button class="button-com disable pay-wx">微信支付</button>
@@ -37,6 +60,7 @@
 </template>
 </template>
 <script>
 <script>
 import { purchaseClearWxPay,purchaseClearAliPay } from "@/api/purchase";
 import { purchaseClearWxPay,purchaseClearAliPay } from "@/api/purchase";
+import { getAliPayClearCode,detail } from "@/api/clear";
 import wexinPay from "@/utils/pay/wxPay";
 import wexinPay from "@/utils/pay/wxPay";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import { postWxCode } from '@/api/mini'
 import { postWxCode } from '@/api/mini'
@@ -55,7 +79,9 @@ export default {
       actPrice: '',
       actPrice: '',
       getPayType:1,
       getPayType:1,
       hasRequestApi:false,
       hasRequestApi:false,
-      needCheck:0
+      needCheck:0,
+      aliPayCodeImg:'',
+      hasRenew:0
     };
     };
   },
   },
   onLoad (options) {
   onLoad (options) {
@@ -64,7 +90,16 @@ export default {
     this.actPrice = options.actPrice
     this.actPrice = options.actPrice
     this.getPayType = options.getPayType
     this.getPayType = options.getPayType
     this.orderTime = options.remainSecond - 10 > 0 ? (options.remainSecond - 10) : 0
     this.orderTime = options.remainSecond - 10 > 0 ? (options.remainSecond - 10) : 0
-    this.orderTimeFun();
+    this.orderTimeFun()
+    this.aliPayCodeImg = `${this.$constant.imgUrl}/default-img.png`
+    // #ifdef MP-WEIXIN
+    this.getPayCodeFn(this.orderSn)
+    // #endif
+    detail({id:this.id}).then(res => {
+				if(res.code == 1){
+          this.hasRenew = res.data.hasRenew ? res.data.hasRenew : 0
+				}
+		})
   },
   },
   computed: {
   computed: {
     ...mapGetters(["getLoginInfo", 'getDictionariesInfo']),
     ...mapGetters(["getLoginInfo", 'getDictionariesInfo']),
@@ -79,9 +114,42 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    openAliPay(){
+      this.$msg('商家还未开通此功能')
+    },
     init(){
     init(){
-     
     },
     },
+    getPayCodeFn(orderSn){
+      getAliPayClearCode({orderSn:orderSn}).then(res=>{
+        if(res.code == 1){
+          if(res.data.imgUrl){
+            this.aliPayCodeImg = res.data.imgUrl
+          }
+        }
+      })
+    },
+    savePayCode(){
+      let url = this.aliPayCodeImg
+      uni.downloadFile({
+        url: url,
+        success: (res) => {
+          if (res.statusCode === 200) {
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                uni.showToast({title:'下载成功'})
+              }
+            });
+          }
+        }
+      })
+    },
+    goDetail(){
+      this.$util.pageTo({url: "/admin/clear/info?id="+this.id,type:2})
+    },
+    teachPayFn() {
+				this.pageTo({ url: "/admin/ghs/teachPay"})
+		},
     orderTimeFun(){
     orderTimeFun(){
       if(this.orderTime==0)return;
       if(this.orderTime==0)return;
       setTimeout(()=>{
       setTimeout(()=>{
@@ -91,11 +159,6 @@ export default {
     },
     },
     aliPay(){
     aliPay(){
       let that = this
       let that = this
-      // #ifdef MP-WEIXIN
-      this.$util.confirmModal({content:'支付宝付款,请到【应用市场】下载花掌柜,登录即可支付'},() => { })
-      return false
-      // #endif
-
       //解决重复提交问题
       //解决重复提交问题
       if(this.hasRequestApi == true){
       if(this.hasRequestApi == true){
         this.$msg('正在请求,请5秒后重试')
         this.$msg('正在请求,请5秒后重试')
@@ -163,6 +226,7 @@ export default {
       purchaseClearWxPay({ orderSn: this.orderSn,currentMiniOpenId:currentMiniOpenId }).then(res => {
       purchaseClearWxPay({ orderSn: this.orderSn,currentMiniOpenId:currentMiniOpenId }).then(res => {
         that.orderSn = res.data.orderSn
         that.orderSn = res.data.orderSn
         wexinPay(res.data, this.getSuccess, this.getError)
         wexinPay(res.data, this.getSuccess, this.getError)
+        that.getPayCodeFn(that.orderSn)
       })
       })
     },
     },
     confirmWxPayFnOld() {
     confirmWxPayFnOld() {
@@ -205,7 +269,6 @@ export default {
   }
   }
 };
 };
 </script>
 </script>
-
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .app-content {
 .app-content {
   .ali-btn{
   .ali-btn{
@@ -250,7 +313,7 @@ export default {
       // 一个按钮
       // 一个按钮
       .call-one-btn {
       .call-one-btn {
         .button-com {
         .button-com {
-          width: 80%;
+          width: 70%;
           padding-top: 22upx;
           padding-top: 22upx;
           padding-bottom: 22upx;
           padding-bottom: 22upx;
           font-size: 32upx;
           font-size: 32upx;

+ 4 - 2
hdApp/src/pagesPurchase/wechatPay.vue

@@ -190,7 +190,9 @@ export default {
               }
               }
             },1000);
             },1000);
           }
           }
+          // #ifdef MP-WEIXIN
           that.getAliPayCodeFn(this.orderSn)
           that.getAliPayCodeFn(this.orderSn)
+          // #endif
         }
         }
       })
       })
     },
     },
@@ -213,7 +215,6 @@ export default {
     appAliPayFn(){
     appAliPayFn(){
       let that = this
       let that = this
       // #ifdef MP-WEIXIN
       // #ifdef MP-WEIXIN
-
       // #endif
       // #endif
       // #ifdef APP-PLUS
       // #ifdef APP-PLUS
       uni.showLoading()
       uni.showLoading()
@@ -297,7 +298,9 @@ export default {
                     this.pageId = res.data.id
                     this.pageId = res.data.id
                     this.orderSn = res.data.orderSn
                     this.orderSn = res.data.orderSn
                     wexinPay(res.data, this.getSuccess, this.getError)
                     wexinPay(res.data, this.getSuccess, this.getError)
+                    // #ifdef MP-WEIXIN
                     this.getAliPayCodeFn(this.orderSn)
                     this.getAliPayCodeFn(this.orderSn)
+                    // #endif
                 }
                 }
               })
               })
             }
             }
@@ -400,7 +403,6 @@ export default {
   }
   }
 };
 };
 </script>
 </script>
-
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .app-content {
 .app-content {
   .ali-btn{
   .ali-btn{

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików