邓平艺 4 years ago
parent
commit
f49df35baf
  1. 2
      common/api.js
  2. 1
      pages/center/invite.vue
  3. 63
      pages/center/wallet.vue
  4. 2
      pages/order/confirm-order.vue

2
common/api.js

@ -73,6 +73,8 @@ export const API_CONFIRM_CODE = '/api/confirm/code'; // 扫码核销
export const API_WIDTHDRAW = '/api/income/extract'; // 提现 export const API_WIDTHDRAW = '/api/income/extract'; // 提现
export const API_WIDTHDRAWIMG = '/api/income/extractImg'; // 提现图片
/* token相关 */ /* token相关 */
export const API_WAREHOUSE_SET = '/api/warehouse/set'; // 存储token export const API_WAREHOUSE_SET = '/api/warehouse/set'; // 存储token
export const API_WAREHOUSE_GET = '/api/warehouse/get'; // 获取token export const API_WAREHOUSE_GET = '/api/warehouse/get'; // 获取token

1
pages/center/invite.vue

@ -81,7 +81,6 @@
let options = { let options = {
route: 'home', route: 'home',
pt: 2, pt: 2,
id: 2,
share_id: userInfo.id, share_id: userInfo.id,
scene_code: this.$scene.V2_INVITE_SHAREPOSTER scene_code: this.$scene.V2_INVITE_SHAREPOSTER
} }

63
pages/center/wallet.vue

@ -6,7 +6,7 @@
<view class="text-black1 text-price1" style="font-size: 72rpx;">{{walletBalance}}</view> <view class="text-black1 text-price1" style="font-size: 72rpx;">{{walletBalance}}</view>
<view class="text-gray lf-font-24 lf-m-b-20">佣金</view> <view class="text-gray lf-font-24 lf-m-b-20">佣金</view>
<view> <view>
<button class="btn" @click="$url('/pages/center/widthdraw')">提取佣金</button>
<button class="btn" @click="getWidthdraw()">提取佣金</button>
</view> </view>
</view> </view>
</view> </view>
@ -66,6 +66,10 @@
</view> </view>
</scroll-view> </scroll-view>
</block> </block>
<view class='imagePathBox' v-if="maskHidden == true" @click="maskHidden = false ">
<image :src="widthdrawImg" mode="aspectFill" class='shengcheng'></image>
</view>
</view> </view>
</template> </template>
@ -92,7 +96,9 @@
loadingText: '正在加载中' loadingText: '正在加载中'
}], }],
windowHeight: 0, windowHeight: 0,
walletBalance: 0
walletBalance: 0,
widthdrawImg: '',
maskHidden: false
} }
}, },
onLoad(){ onLoad(){
@ -100,6 +106,18 @@
this.getIncomeList() this.getIncomeList()
}, },
methods: { methods: {
getWidthdraw() {
let userInfo = uni.getStorageSync('userinfo') || {};
this.$http(this.API.API_WIDTHDRAWIMG, {
token: userInfo.token
}).then(res => {
this.widthdrawImg = res.data.img.url
console.log(this.widthdrawImg)
if(this.widthdrawImg) {
this.maskHidden = true
}
})
},
changeTab(index) { changeTab(index) {
if(this.current == index) { if(this.current == index) {
return return
@ -179,6 +197,47 @@
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.imagePathBox {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.shengcheng {
width: 80%;
height: 80%;
position: fixed;
top: 136rpx;
left: 50%;
margin-left: -40%;
z-index: 10;
}
.baocun {
display: block;
width: 80%;
height: 80rpx;
padding: 0;
line-height: 80rpx;
text-align: center;
position: fixed;
bottom: 50rpx;
left: 10%;
background: #ffe200;
color: #333;
font-size: 32rpx;
border-radius: 44rpx;
}
button[class="baocun"]::after {
border: 0;
}
.tab-item{ .tab-item{
font-size: 32rpx; font-size: 32rpx;
width: 50%; width: 50%;

2
pages/order/confirm-order.vue

@ -202,7 +202,7 @@
goods_specs_id: this.goods_specs_id, goods_specs_id: this.goods_specs_id,
number: this.num, number: this.num,
payment_desc: this.pt, payment_desc: this.pt,
share_one: this.share_id
share_one: this.share_id || 0
}).then(res => { }).then(res => {
this.order_id = res.data.order_id this.order_id = res.data.order_id
uni.requestPayment({ uni.requestPayment({

Loading…
Cancel
Save