shish 2 år sedan
förälder
incheckning
d7bcbe854a

+ 4 - 1
ghsApp/src/admin/home/me.vue

@@ -31,7 +31,7 @@
           <view class="image-box" >
           <view class="image-box" >
             <view class="dec">
             <view class="dec">
               <block v-if="showDeadline">
               <block v-if="showDeadline">
-                到期时间 {{ myInfo.shopInfo && myInfo.shopInfo.deadline ? myInfo.shopInfo.deadline.substr(0,11) : '' }}
+                <text @click="goRenew()">到期时间 {{ myInfo.shopInfo && myInfo.shopInfo.deadline ? myInfo.shopInfo.deadline.substr(0,11) : '' }}</text>
               </block>
               </block>
             </view>
             </view>
             <image :src="`${constant.imgUrl}/ghs/me/upgrade2.png`"></image> 
             <image :src="`${constant.imgUrl}/ghs/me/upgrade2.png`"></image> 
@@ -251,6 +251,9 @@ export default {
     // #endif
     // #endif
   },
   },
   methods: {
   methods: {
+    goRenew(){
+      this.$util.pageTo({ url: '/admin/shop/renew'})
+    },
     getCityVideo(){
     getCityVideo(){
 			const that = this;
 			const that = this;
       that.$util.pageTo({ url: '/admin/book/index' })
       that.$util.pageTo({ url: '/admin/book/index' })

+ 105 - 0
ghsApp/src/admin/shop/renew.vue

@@ -0,0 +1,105 @@
+<template>
+    <view>
+        <view style="padding:40upx 20upx 40upx 20upx;height:auto;width:95vw;font-size:36upx;">
+			<view>为了加快系统的开发进度,实现大家需要的<text style="font-weight:bold;color:#3385FF;">上下游连通</text>、<text style="font-weight:bold;color:#3385FF;">连麦芽田一键发跑腿</text>、<text style="font-weight:bold;color:#3385FF;">会员充值</text>、<text style="font-weight:bold;color:#3385FF;">散客到店自助下单</text>等重要功能</view>
+			<view style="margin-top:24upx;">特向您收取未来时间的年费,感谢您对公司的支持</view>
+			<view style="margin-top:24upx;">当前系统到期时间:{{ currentDeadline }}</view>
+			<view style="margin-top:24upx;">续期一年到期时间:<text style="color:#3385FF;">{{ newDeadline }}</text></view>
+			<view style="margin-top:40upx;text-align:center;">
+				<button class="admin-button-com big default" @click="closeRenew()">稍后再说</button>
+        		<button class="admin-button-com big blue" @click="startRenew()" style="margin-left:80upx;">支持公司,续期一年</button>
+			</view>
+        </view>
+    </view>
+</template>
+<script>
+import wexinPay from "@/utils/pay/wxPay";
+import { renewShop,needRemind } from "@/api/renew"
+export default {
+    name: "renew",
+    data(){
+        return {
+			currentDeadline:'',
+			newDeadline:''
+        }
+    },
+    computed: {
+    },
+    components: {
+    },
+    onLoad(){
+        let that = this
+        needRemind().then(res=>{
+            if(res.code == 1){
+                that.currentDeadline = res.data.currentDeadline
+                that.newDeadline = res.data.newDeadline
+            }
+        })
+    },
+    onUnload() {
+
+    },
+    methods: {
+        init(){
+
+        },
+		startRenew(){
+            // #ifdef APP-PLUS
+            let that = this
+            let type = uni.getSystemInfoSync().platform
+            that.$msg("请在小程序上续期")
+            if(type == 'android'){
+                if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
+                    plus.share.getServices(function(s){
+                        var sweixin
+                        for (var i = 0; i < s.length; i++) {
+                        var t = s[i];
+                        if (t.id == 'weixin') {
+                            sweixin = t;
+                        }
+                        }
+                        let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
+                        if (sweixin && sweixin.nativeClient) {
+                        sweixin.launchMiniProgram({
+                            id: miniOriginalId,
+                            path: '/admin/home/workbench',
+                            type: 0
+                        });
+                        } else {
+                        that.$msg("没有找到微信服务")
+                        //that.$msg("获取微信失败:" + e.message)
+                        //console.log(JSON.stringify(e));
+                        }
+                    }, function(e){
+                        that.$msg("没有找到微信服务哦")
+                        //that.$msg("获取微信失败:" + e.message)
+                        //console.log(JSON.stringify(e));
+                    });
+                } else {
+                    that.$msg("请安装微信,再打开小程序")
+                    return false
+                }
+                return true
+            }
+            // #endif
+            // #ifdef MP-WEIXIN
+            uni.showLoading({mask:true})
+            renewShop().then(res=>{
+                uni.hideLoading()
+                if(res.code == 1){
+                    wexinPay(res.data, this.getSuccess, this.getError)
+                }
+            })
+            // #endif
+        },
+		getSuccess(){
+			this.$util.pageTo({url:"/admin/shop/renewSuccess",type:2})
+		},
+		getError(){
+
+        }
+    }
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 2 - 1
ghsApp/src/pages.json

@@ -210,7 +210,8 @@
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动记录"}},
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动记录"}},
 				{"path": "selectShop","style": {"navigationBarTitleText": "选择门店"}},
 				{"path": "selectShop","style": {"navigationBarTitleText": "选择门店"}},
 				{"path": "wl","style": {"navigationBarTitleText": "物流列表"}},
 				{"path": "wl","style": {"navigationBarTitleText": "物流列表"}},
-				{"path": "myShop","style": {"navigationBarTitleText": "我的门店"}}
+				{"path": "myShop","style": {"navigationBarTitleText": "我的门店"}},
+				{"path": "renew","style": {"navigationBarTitleText": "续期"}}
 			]
 			]
 		},
 		},
 		{
 		{

+ 8 - 3
hdApp/src/admin/cg/alipay.vue

@@ -3,7 +3,7 @@
 		<div class="delivery-wrap">
 		<div class="delivery-wrap">
 			<div class="btn-wrap">
 			<div class="btn-wrap">
 				<!-- #ifdef H5 -->
 				<!-- #ifdef H5 -->
-				<button class="button-com red">正在打开支付宝...</button>
+				<button class="button-com red" @click="go()">正在打开支付宝...</button>
 				<!-- #endif -->
 				<!-- #endif -->
 			</div>
 			</div>
 		</div>
 		</div>
@@ -18,7 +18,8 @@ export default {
     mixins: [],
     mixins: [],
     data() {
     data() {
         return {
         return {
-            constant: this.$constant
+            constant: this.$constant,
+			payUrl:''
         }
         }
     },
     },
     computed: {
     computed: {
@@ -33,6 +34,9 @@ export default {
         init(){
         init(){
 
 
         },
         },
+		go(){
+			window.location.href = this.payUrl
+		},
         payInit() {
         payInit() {
             let orderSn = this.option.orderSn ? this.option.orderSn:''
             let orderSn = this.option.orderSn ? this.option.orderSn:''
             if (this.$util.isEmpty(orderSn)){
             if (this.$util.isEmpty(orderSn)){
@@ -44,7 +48,8 @@ export default {
                     this.$msg(res.msg)
                     this.$msg(res.msg)
                     return false
                     return false
                 }
                 }
-                window.location.href = res.data.payUrl;
+				this.payUrl = res.data.payUrl
+				window.location.href = this.payUrl
             })
             })
         }
         }
     }
     }

+ 8 - 4
hdApp/src/admin/clear/alipay.vue

@@ -3,7 +3,7 @@
 		<div class="delivery-wrap">
 		<div class="delivery-wrap">
 			<div class="btn-wrap">
 			<div class="btn-wrap">
 				<!-- #ifdef H5 -->
 				<!-- #ifdef H5 -->
-				<button class="button-com red">正在打开支付宝...</button>
+				<button class="button-com red" @click="go()">正在打开支付宝...</button>
 				<!-- #endif -->
 				<!-- #endif -->
 			</div>
 			</div>
 		</div>
 		</div>
@@ -18,7 +18,8 @@ export default {
     mixins: [],
     mixins: [],
     data() {
     data() {
         return {
         return {
-            constant: this.$constant
+            constant: this.$constant,
+			payUrl:''
         }
         }
     },
     },
     computed: {
     computed: {
@@ -33,6 +34,9 @@ export default {
         init(){
         init(){
 
 
         },
         },
+		go(){
+			window.location.href = this.payUrl
+		},
         payInit() {
         payInit() {
             let orderSn = this.option.orderSn ? this.option.orderSn:''
             let orderSn = this.option.orderSn ? this.option.orderSn:''
             if (this.$util.isEmpty(orderSn)){
             if (this.$util.isEmpty(orderSn)){
@@ -44,13 +48,13 @@ export default {
                     this.$msg(res.msg)
                     this.$msg(res.msg)
                     return false
                     return false
                 }
                 }
-                window.location.href = res.data.payUrl;
+                this.payUrl = res.data.payUrl
+				window.location.href = this.payUrl
             })
             })
         }
         }
     }
     }
 }
 }
 </script>
 </script>
-
 <style lang="scss">
 <style lang="scss">
 	.app-content {
 	.app-content {
 		min-height: calc(100vh - 20upx);
 		min-height: calc(100vh - 20upx);