shish 1 год назад
Родитель
Сommit
f09f502b29
2 измененных файлов с 44 добавлено и 5 удалено
  1. 9 5
      hdApp/src/admin/home/workbench.vue
  2. 35 0
      hdApp/src/pagesPurchase/order.vue

+ 9 - 5
hdApp/src/admin/home/workbench.vue

@@ -229,7 +229,7 @@
             </view>
           </view>
           <block v-if="ghsInfo.live == 1">
-            <view class="button_7 flex-col" @click="kmCg()"><text class="text_13">昆明直采</text></view>
+            <view class="button_7 flex-col" @click.stop="fnOpenKmCg()" v-if="ghsInfo.openKmCg && ghsInfo.openKmCg == 1"><text class="text_13">昆明直采</text></view>
             <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
             <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
           </block>
@@ -516,18 +516,22 @@ export default {
     fillCg(item){
       this.pageTo({url:'/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
     },
-    kmCg(){
-      // #ifdef MP-WEIXIN
+    fnOpenKmCg(){
+      console.log('yes')
       let self = this
+      // #ifdef MP-WEIXIN
       uni.navigateToMiniProgram({
-        appId: this.getappIdList.mall.miniAppId,
-        path: url + '?account=' + self.loginInfo.shopId,
+        appId: self.currentGhs.kmCgAppId,
+        path: self.currentGhs.kmCgUrl,
         //develop 开发版 trial 体验版 release 正式版
         envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
         extraData: {},
         success (res) {}
       })
       // #endif
+      // #ifdef APP-PLUS
+      self.$msg('开发中')
+      // #endif
     },
     enterShop(item) {
       let that = this

+ 35 - 0
hdApp/src/pagesPurchase/order.vue

@@ -93,6 +93,7 @@
                 </view>
               </view>
               <block v-if="ghsInfo.live == 1">
+                <view class="button_7 flex-col" @click.stop="fnOpenKmCg()" v-if="ghsInfo.openKmCg && ghsInfo.openKmCg == 1"><text class="text_13">昆明直采</text></view>
                 <view class="button_4 flex-col" v-if="ghsInfo.isOpen == 1" @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
                 <view class="button_5 flex-col" v-else @click="enterShop(ghsInfo)"><text class="text_13">买花</text></view>
               </block>
@@ -215,6 +216,23 @@ export default {
     fillCg(item){
       this.pageTo({url: '/pagesPurchase/addCg?ghsId='+item.id+'&ghsName='+item.name})
     },
+    fnOpenKmCg(){
+      console.log('ok')
+      let self = this
+      // #ifdef MP-WEIXIN
+      uni.navigateToMiniProgram({
+        appId: self.currentGhs.kmCgAppId,
+        path: self.currentGhs.kmCgUrl,
+        //develop 开发版 trial 体验版 release 正式版
+        envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+        extraData: {},
+        success (res) {}
+      })
+      // #endif
+      // #ifdef APP-PLUS
+      self.$msg('开发中')
+      // #endif
+    },
     enterShop(item) {
       let that = this
       if(item.isOpen == 0){
@@ -553,6 +571,23 @@ export default {
           font-weight:bold;
         }
       }
+      .button_7 {
+        height: 80upx;
+        line-height:80upx;
+        text-align:center;
+        background-color:#09C567;
+        background-size: 137upx 137upx;
+        width: 180upx;
+        position: absolute;
+        left: 300upx;
+        top: 100upx;
+        border-radius:39upx;
+        .text_13 {
+          color: rgba(255, 255, 255, 1);
+          font-size: 30upx;
+          font-weight:bold;
+        }
+      }
     }
   }
 }