shish 8 месяцев назад
Родитель
Сommit
ad765cb1e8
3 измененных файлов с 62 добавлено и 10 удалено
  1. 44 2
      ghsApp/src/admin/cg/code.vue
  2. 12 2
      hdApp/src/admin/cg/code.vue
  3. 6 6
      hdApp/src/admin/home/workbench.vue

+ 44 - 2
ghsApp/src/admin/cg/code.vue

@@ -3,23 +3,65 @@
     <view class="img_box" style="margin-top:30upx;">
       <image :src="gatherUrl" mode="heightFix" class="img_url"></image>
     </view>
-    <view style="font-size:32upx;text-align: center;margin:30upx 0 5upx 0;">打印尺寸 100mmx150mm</view>
+    <view style="font-size:30upx;text-align: center;margin:30upx 0 5upx 0;">支持信用卡和花呗,打印尺寸100mmx150mm</view>
     <view class="confirm-btn">
       <button class="admin-button-com big blue" style="width:60vw;" @click="downloadImg(gatherUrl)">下载收款码</button>
     </view>
+
+    <view class="confirm-btn">
+      <button class="admin-button-com big blue" style="width:60vw;" @click="startRenew(2,160)">购买音响</button>
+    </view>
+
+    <view style="margin-top:30upx;text-align:center;margin-bottom:30upx;">
+      <image :src="laba" mode="widthFix" style="width:640upx;margin:0 auto;border-radius: 10upx;"></image>
+    </view>
+
   </view>
 </template>
 <script>
 import { miniGatheringCode } from '@/api/shop'
+import wexinPay from "@/utils/pay/wxPay"
+import { renewShop,needRemind } from "@/api/renew"
 export default {
   data() {
     return {
-      gatherUrl:''
+      gatherUrl:'',
+      laba: `${this.$constant.hostUrl}/image/horn.jpg`,
     }
   },
   methods: {
     init() {
       this.getImg()
+    },
+		startRenew(type,price){
+            let that = this
+            // #ifdef APP-PLUS
+            that.$msg("APP不能操作,请打开微信小程序操作")
+            // #endif
+            // #ifdef MP-WEIXIN
+            uni.showLoading({mask:true})
+            if(type == 1){
+                if(Number(price) <= 0){
+                    that.$msg("请输入金额")
+                    return false
+                }
+            }
+            this.renewType = type
+            renewShop({price:price,type:type,remark:this.remark}).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="+this.renewType,type:2})
+		},
+		getError(){
+        },
+    closeRenew(){
+        uni.navigateBack()
     },
     downloadImg(url){
             // #ifdef APP-PLUS

+ 12 - 2
hdApp/src/admin/cg/code.vue

@@ -3,10 +3,19 @@
     <view class="img_box" style="margin-top:30upx;">
       <image :src="gatherUrl" mode="heightFix" class="img_url"></image>
     </view>
-    <view style="font-size:32upx;text-align: center;margin:30upx 0 5upx 0;">打印尺寸 100mmx150mm</view>
+    <view style="font-size:30upx;text-align: center;margin:30upx 0 5upx 0;">支持信用卡和花呗,打印尺寸100mmx150mm</view>
     <view class="confirm-btn">
       <button class="admin-button-com big blue" style="width:60vw;" @click="downloadImg(gatherUrl)">下载收款码</button>
     </view>
+
+    <view class="confirm-btn">
+      <button class="admin-button-com big blue" style="width:60vw;">购买音响</button>
+    </view>
+
+    <view style="margin-top:30upx;text-align:center;margin-bottom:30upx;">
+      <image :src="laba" mode="widthFix" style="width:640upx;margin:0 auto;border-radius: 10upx;"></image>
+    </view>
+
   </view>
 </template>
 <script>
@@ -14,7 +23,8 @@ import { miniGatheringCode } from '@/api/shop'
 export default {
   data() {
     return {
-      gatherUrl:''
+      gatherUrl:'',
+      laba: `${this.$constant.hostUrl}/image/horn.jpg`
     }
   },
   methods: {

+ 6 - 6
hdApp/src/admin/home/workbench.vue

@@ -274,18 +274,18 @@
               </view>
               <view class="icon-text">图文</view>
             </view>
-            <view class="icon-item" @click="goPage({url: '/admin/cg/code'})">
-              <view class="icon-wrapper">
-                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
-              </view>
-              <view class="icon-text">收款码</view>
-            </view>
             <view class="icon-item" @click="goPage({url: '/admin/order/scanPay'})">
               <view class="icon-wrapper">
                 <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/kcyjs2.png`" mode="aspectFit"></image>
               </view>
               <view class="icon-text">收款码流水</view>
             </view>
+            <view class="icon-item" @click="goPage({url: '/admin/cg/code'})">
+              <view class="icon-wrapper">
+                <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
+              </view>
+              <view class="icon-text">收款码</view>
+            </view>
           </view>
         </view>