fuwei 5 лет назад
Родитель
Сommit
91030f8cea
2 измененных файлов с 19 добавлено и 10 удалено
  1. 16 10
      ghs/src/admin/home/me.vue
  2. 3 0
      ghs/src/api/home/index.js

+ 16 - 10
ghs/src/admin/home/me.vue

@@ -67,7 +67,7 @@
                             可提现余额 ¥ {{infoData.txBalance}}
                         </view>
                     </view>
-                    <button class="admin-button-com default" >提现</button>
+                    <button @click="applyCach" class="admin-button-com default" >提现</button>
                 </view>
                 <view class="module-com content_box user-open_bx">
                     <view class="input-line-wrap">
@@ -87,6 +87,7 @@
         ref="dorpdownSelect"
         :menuObj.sync="menuObj"  
         top="0px"
+        :isShowTit="false"
         :selectItemId.sync="shopId"
         @selectSussess="selectSussess"></DorpdownSelect>
 </view>
@@ -95,7 +96,7 @@
 <script>
     import AppAvatarModule from '@/components/module/app-avatar'
     import TuiListCell from '@/components/plugin/list-cell'
-    import { mainMy } from '@/api/home'
+    import { mainMy,applyCash } from '@/api/home'
     import { toggleShop } from '@/api/common'
     import DorpdownSelect from "@/components/module/dorpdownSelect";
     import { selectShop } from '@/mixins'
@@ -150,15 +151,20 @@
               }
               
             },
-            changeShop(){
-              let idx = this.userShopAll.findIndex(i=>i.id == this.getLoginInfo.shopId)
-              let shopId = null
-              if(idx === this.userShopAll.length - 1) {
-                  shopId = this.userShopAll[0].id
-              }else{
-                  shopId = this.userShopAll[idx+1].id
+           async applyCach(){
+                uni.showLoading({
+                    title: '加载中'
+                });
+                
+               try {
+                   const { data } = await applyCash({})
+                   uni.showToast({
+                    title: '提现成功',
+                    duration: 2000
+                });
+               }finally {
+                 uni.hideLoading(); 
               }
-              this.selectSussess(shopId)
             }
         }
     }

+ 3 - 0
ghs/src/api/home/index.js

@@ -10,3 +10,6 @@ export const getMainIndex = data => {
 export const mainMy = async (data) => {
 	return https.get("/main/my", data);
 };
+export const applyCash = async (data) => {
+	return https.get("/cash/apply", data);
+};