From 4d1b99c033d27af5a83d8df7da5568dc3dcfbfc7 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 25 二月 2026 11:41:13 +0800
Subject: [PATCH] 经销商管理
---
mini-program/pagesA/pages/withdraw/withdraw.vue | 75 +++++++++++++++++++++++++++++++++----
1 files changed, 67 insertions(+), 8 deletions(-)
diff --git a/mini-program/pagesA/pages/withdraw/withdraw.vue b/mini-program/pagesA/pages/withdraw/withdraw.vue
index edd8dd0..af47ca1 100644
--- a/mini-program/pagesA/pages/withdraw/withdraw.vue
+++ b/mini-program/pagesA/pages/withdraw/withdraw.vue
@@ -3,14 +3,15 @@
<view class="bg">
<view class="bg-a">鍙彁鐜颁綑棰�(鍏�)</view>
<view class="bg-b">
- <text>1000</text>
- <text>.00</text>
+ <text>{{(shop.amount || 0).toFixed(2)}}</text>
+ <text></text>
</view>
<view class="form">
<view class="form-a">
<view class="form-a-label">鎻愮幇鑷�</view>
- <view class="form-a-val">
- <text>鏆傛棤閾惰淇℃伅锛岀偣鍑绘坊鍔�</text>
+ <view class="form-a-val" @click="jumpBank" >
+ <text v-if="!selectBank || !selectBank.id ">鏆傛棤閾惰淇℃伅锛岀偣鍑绘坊鍔�</text>
+ <text v-if="selectBank && selectBank.id ">{{selectBank.name}}</text>
<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
</view>
</view>
@@ -18,8 +19,8 @@
<view class="form-title">鎻愮幇閲戦</view>
<view class="form-input">
<view class="form-input-dw">锟�</view>
- <input type="text" placeholder="0" />
- <view class="form-input-tx">鍏ㄩ儴鎻愮幇</view>
+ <input type="text" placeholder="0" v-model="form.amount" />
+ <view class="form-input-tx" @click="inputAll">鍏ㄩ儴鎻愮幇</view>
</view>
<view class="form-error">杈撳叆鐨勯噾棰濆凡缁忚秴杩囧彲鎻愮幇閲戦</view>
<view class="form-btn disable">鎻愪氦鐢宠</view>
@@ -29,11 +30,69 @@
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+ },
data() {
- return {
-
+ return {
+ bankList:[],
+ selectBank:[],
+ id:null,
+ form{
+ amount:0
+ },
+ shop:{},
+ info:{}
};
+ },
+ onLoad(options) {
+ this.id = options.id
+ this.info={}
+ this.shop ={}
+ this.bankList = []
+ this.selectBank=[]
+ this.checkShopLogin()
+ this.shop = this.shopInfo || {}
+ this.getBankList()
+ },
+ methods:{
+ inputAll(){
+ this.form.amount = this.shop.amount ||0
+ },
+ jumpBank( ){
+ if(this.selectBank && this.selectBank.id){
+ uni.navigateTo({
+ url: '/pagesA/pages/withdraw-select/withdraw-select?id='+id
+ })
+ }else{
+ url: '/pagesA/pages/withdraw-select/withdraw-select'
+ }
+ },
+ async getBankList(){
+ let res = await that.$u.api.getShopInfo({tokenType:1 })
+ if (res.code === 200) {
+ await that.$store.commit('setShopInfo', res.data)
+ this.shop = res.data || {}
+ }
+
+ },
+ async checkShopLogin(){
+ var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }else{
+ let res = await that.$u.api.getShopInfo({tokenType:1 })
+ if (res.code === 200) {
+ await that.$store.commit('setShopInfo', res.data)
+ this.shop = res.data || {}
+ }
+ }
+
+ }
}
}
</script>
--
Gitblit v1.9.3