shish vor 2 Monaten
Ursprung
Commit
0656a24bcd
1 geänderte Dateien mit 40 neuen und 4 gelöschten Zeilen
  1. 40 4
      ghsApp/src/admin/home/me.vue

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

@@ -46,7 +46,11 @@
                   </view>
                 </block>
                 <block v-else>
-                  <text>微信小程序上可以查看时间</text>
+                  <text class="dec-deadline-text" @click="">请打开微信小程序查看时间</text>
+                  <view class="dec-renew" @click="">
+                    <text class="dec-renew-label">去查看</text>
+                    <text class="iconfont iconxiangyou dec-renew-arrow"></text>
+                  </view>
                 </block>
               </block>
             </view>
@@ -336,7 +340,7 @@ export default {
   },
   mixins: [list],
   computed: {
-    ...mapGetters(["getLoginInfo"]),
+    ...mapGetters(["getLoginInfo", "getDictionariesInfo"]),
   },
   data () {
     return {
@@ -396,8 +400,40 @@ export default {
 		},
     selectShopFn(){
     },
-    goRenew(){
-      this.$util.pageTo({ url: '/admin/shop/renew'})
+    goRenew () {
+      let that = this
+      // #ifdef APP-PLUS
+      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 d = that.getDictionariesInfo
+          let miniOriginalId = d && d.miniOriginalId && d.miniOriginalId.current && d.miniOriginalId.current.ghs ? d.miniOriginalId.current.ghs : ''
+          if (sweixin && sweixin.nativeClient) {
+            sweixin.launchMiniProgram({
+              id: miniOriginalId,
+              path: '/admin/shop/renew',
+              type: 0
+            })
+          } else {
+            that.$msg('没有找到微信服务')
+          }
+        }, function (e) {
+          that.$msg('没有找到微信服务哦')
+        })
+      } else {
+        that.$msg('请安装微信,再打开小程序')
+      }
+      return
+      // #endif
+      // #ifndef APP-PLUS
+      this.$util.pageTo({ url: '/admin/shop/renew' })
+      // #endif
     },
     goOldRenew(){
       this.$util.pageTo({ url: '/admin/shop/renewal'})