فهرست منبع

下载收款码

shish 2 سال پیش
والد
کامیت
f92f266551
2فایلهای تغییر یافته به همراه30 افزوده شده و 1 حذف شده
  1. 4 0
      ghsApp/src/api/custom/index.js
  2. 26 1
      ghsApp/src/pagesClient/member/detail.vue

+ 4 - 0
ghsApp/src/api/custom/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 getGatheringCode = data => {
+	return https.get('/custom/get-gathering-code', data)
+}
+
 export const getCustomBalanceChange = data => {
 export const getCustomBalanceChange = data => {
 	return https.get('/custom-balance-change/list', data)
 	return https.get('/custom-balance-change/list', data)
 }
 }

+ 26 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -44,6 +44,7 @@
       <view class="module-com user-address_bx">
       <view class="module-com user-address_bx">
           <view class="address-tit" style="position: relative;">
           <view class="address-tit" style="position: relative;">
             地址 
             地址 
+              <button class="admin-button-com mini-btn blue" @click="downloadCode()" style="position:absolute;right:200upx;top:-6upx;font-size:29upx;">下载收款码</button>
               <!-- #ifdef MP-WEIXIN -->
               <!-- #ifdef MP-WEIXIN -->
               <button class="admin-button-com mini-btn blue" open-type="share" style="position: absolute;right:16upx;top:-6upx;font-size:29upx;">邀请结账</button>
               <button class="admin-button-com mini-btn blue" open-type="share" style="position: absolute;right:16upx;top:-6upx;font-size:29upx;">邀请结账</button>
               <!-- #endif -->
               <!-- #endif -->
@@ -213,7 +214,7 @@ import { getUserDet,debt} from "@/api/member";
 import { IMGHOST } from '@/config'
 import { IMGHOST } from '@/config'
 import { mapGetters } from "vuex"
 import { mapGetters } from "vuex"
 import { changeShowStock,changeWlName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
 import { changeShowStock,changeWlName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
-import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn} from "@/api/custom";
+import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn,getGatheringCode} from "@/api/custom";
 export default {
 export default {
   name: "detail",
   name: "detail",
   components: {
   components: {
@@ -307,6 +308,30 @@ export default {
 
 
   },
   },
   methods: {
   methods: {
+    downloadCode(){
+      let that = this
+      getGatheringCode({id:this.option.id}).then(res=>{
+        if(res.code == 1){
+          let url = res.data.imgUrl ? res.data.imgUrl: ''
+          that.downloadImg(url)
+        }
+      })
+    },
+    downloadImg(url){
+      uni.downloadFile({
+        url: url,
+        success: (res) => {
+          if (res.statusCode === 200) {
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                uni.showToast({title:'保存成功'})
+              }
+            });
+          }
+        }
+      });
+    },
 		inviteToPay(){
 		inviteToPay(){
 			let that = this
 			let that = this
       let id = this.userInfo.ghsId ? this.userInfo.ghsId : 0
       let id = this.userInfo.ghsId ? this.userInfo.ghsId : 0