邓平艺 4 years ago
parent
commit
86d16ed10a
  1. 4
      common/api.js
  2. 6
      pages/center/invite.vue
  3. 16
      pages/center/wallet.vue
  4. 124
      pages/center/widthdraw.vue
  5. 6
      pages/goodsDetail/index.vue
  6. 4
      pages/order/pay-success.vue

4
common/api.js

@ -69,4 +69,6 @@ export const API_WXBILL = '/api/salesman/qrcode'//微信小程序太阳码
/* 商户相关 */
export const API_CONFIRM_CODE = '/api/confirm/code'; // 扫码核销
export const API_CONFIRM_CODE = '/api/confirm/code'; // 扫码核销
export const API_WIDTHDRAW = '/api/income/extract'; // 提现

6
pages/center/invite.vue

@ -6,7 +6,7 @@
</view>
<view class="canvas-box">
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas" />
<canvas style="width: 375px;height: 600px;position:fixed;top:9999px" canvas-id="mycanvas" />
</view>
<view class="btn-bottom" style="bottom: 40rpx;">
@ -118,10 +118,10 @@
var context = wx.createCanvasContext('mycanvas');
console.log('画布', that.backgroundImg)
var path = that.backgroundImg;
context.drawImage(path, 0, 0, 375, 667);
context.drawImage(path, 0, 0, 375, 600);
//
let wxcode = that.onceCode
context.drawImage(wxcode, 18, 530, 120, 120);
context.drawImage(wxcode, 18, 460, 120, 120);
//
// context.setFontSize(24);
// context.setFillStyle('#fff');

16
pages/center/wallet.vue

@ -27,12 +27,12 @@
@refresherrefresh="onRefresherrefresh">
<view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom" v-for="(item, index) in tab_list[current].list" :key="item">
<view class="flex align-center text-center justify-between">
<view class="lf-font-36 lf-color-price">+¥{{item.add_price}}</view>
<view class="lf-font-32 text-black1">结余 ¥{{item.final_price}}</view>
<view class="lf-font-36 lf-color-price">+¥{{item.add_price || 0}}</view>
<view class="lf-font-32 text-black1">结余 ¥{{item.final_price || 0}}</view>
</view>
<view class="flex align-center text-center justify-between lf-m-t-10">
<view class="lf-font-24 lf-color-999">{{item.reffer}}</view>
<view class="lf-font-24 lf-color-999">{{item.created_at}}</view>
<view class="lf-font-24 lf-color-999">{{item.reffer || 0}}</view>
<view class="lf-font-24 lf-color-999">{{item.created_at || 0}}</view>
</view>
</view>
<!-- 空数据的情况 -->
@ -51,12 +51,12 @@
@refresherrefresh="onRefresherrefresh">
<view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom" v-for="(item, index) in tab_list[current].list" :key="item">
<view class="flex align-center text-center justify-between">
<view class="lf-font-36 lf-color-price">+¥{{item.extract_price}}</view>
<view class="lf-font-28 text-orange">{{item.state}}</view>
<view class="lf-font-36 lf-color-price">+¥{{item.extract_price || 0}}</view>
<view class="lf-font-28 text-orange">{{item.state || 0}}</view>
</view>
<view class="flex align-center text-center justify-between lf-m-t-10">
<view class="lf-font-24 lf-color-999">流水号 {{item.order_no}}</view>
<view class="lf-font-24 lf-color-999">{{item.created_at}}</view>
<view class="lf-font-24 lf-color-999">流水号 {{item.order_no || 0}}</view>
<view class="lf-font-24 lf-color-999">{{item.created_at || 0}}</view>
</view>
</view>
<!-- 空数据的情况 -->

124
pages/center/widthdraw.vue

@ -1,6 +1,74 @@
<template>
<view class="wrap">
<web-view :src="'http://192.168.3.14:8080/?token='+userInfoToken"></web-view>
<view class="lf-p-l-30 lf-p-r-30 lf-m-t-30" style="height: auto;">
<view class="bg-white lf-h-100 lf-p-30 flex align-center" style="border-radius: 10rpx; box-sizing: border-box;">
<view>
<img :src="info.avatar" mode="aspectFill" style="height: 120rpx;width: 120rpx;border-radius: 50%;"></img>
</view>
<view class="lf-m-l-20 text-black1 lf-font-32">
{{info.nickname}}
</view>
</view>
</view>
<view class="lf-p-l-30 lf-p-r-30 lf-m-t-30" style="height: auto;">
<view class="bg-white lf-h-100 lf-p-l-30 lf-p-r-30 flex flex-direction" style="border-radius: 10rpx; box-sizing: border-box;padding-bottom: 50rpx;padding-top: 34rpx;">
<view class="flex align-start flex-direction solid-bottom">
<view class="text-black lf-font-28 lf-m-b-30">支付宝姓名</view>
<input type="text" v-model="name" placeholder="请输入您的姓名" class="lf-font-28 lf-color-999">
</view>
<view style="margin-top: 60rpx;" class="flex align-start flex-direction solid-bottom">
<view class="text-black lf-font-28 lf-m-b-30">支付宝账号</view>
<input type="text" v-model="account" placeholder="请输入支付宝账号" class="lf-font-28 lf-color-999">
</view>
</view>
</view>
<view class="lf-p-30" style="height: 408rpx;">
<view class="bg-white lf-h-100" style="border-radius: 10rpx;">
<view class="text-black lf-font-28 lf-p-l-30 lf-p-t-30">提取金额</view>
<view class="lf-p-l-20 flex solid-bottom align-center" style="padding-top: 90rpx;">
<text class="text-black lf-font-48 unit"></text>
<!-- <u-input v-model="num" :type="type" :border="border" :height="height" :auto-height="autoHeight"/> -->
<input type="number" v-model="num" class="lf-p-l-10 text-black1" style="width: 80%;padding-right: 30rpx;font-size: 72rpx;height: 100rpx;" />
<view v-if="num != ''">
<u-icon @click="clearAble()" name="close-circle" color="#999999" size="40"></u-icon>
</view>
</view>
<view class="lf-font-28 lf-color-999 lf-p-t-26 lf-p-l-30" v-if="!ifshow">
可用余额
<text>{{info.income || 0}}</text>
</view>
<view v-else class="lf-color-price lf-font-28 lf-p-t-26 lf-p-l-30">输入金额超过可用余额</view>
</view>
</view>
<view class="lf-p-l-30 lf-p-r-30 lf-p-b-30" style="height: auto;">
<view class="bg-white lf-h-100 lf-p-30" style="border-radius: 10rpx; box-sizing: border-box;">
<view class="text-black lf-font-28">提现说明</view>
<view class="flex flex-direction justify-around lf-p-t-20">
<view class="lf-font-28" style="color: #555;">
1提现到账时间为T+1
</view>
<view class="lf-font-28" style="color: #555;">
2提现最高单笔金额为1000元
</view>
<view class="lf-font-28" style="color: #555;">
3提现手续费单笔收费10%
</view>
</view>
</view>
</view>
<view class="lf-m-b-30">
<view class="padding-lr-lg">
<button class="cu-btn block bg-orange lg" style="border-radius: 42rpx;" @tap="submitWidthdraw()">
<text class="lf-font-32 text-white">提现</text>
</button>
</view>
</view>
</view>
</template>
@ -8,16 +76,60 @@
export default {
data() {
return {
userInfoToken: ''
userInfo: '',
info: '',
name: '',
account: '',
num: ''
}
},
computed: {
ifshow() {
if(Number(this.num) > Number(this.info.income)) {
return true
}else {
return false
}
}
},
methods: {
getData(){
this.$http(this.API.API_USER_CENTER).then(res => {
this.info = res.data;
console.log(this.info)
})
},
clearAble() {
this.num = ''
this.showClean = false
},
submitWidthdraw() {
if(!this.name) {
this.$msg('请输入支付宝姓名!')
return
}
if(!this.account) {
this.$msg('请输入支付宝账号!')
return
}
if(!this.num) {
this.$msg('请输入提现金额!')
return
}
this.$http(this.API.API_WIDTHDRAW, {
account: this.account,
username: this.name,
extract_price:this.num,
channel:this.alipay,
token: this.userInfo.token
}).then(res => {
console.log(res)
})
}
},
onLoad(e) {
let userInfo = uni.getStorageSync('userinfo') || {};
this.userInfoToken = userInfo.token
console.log(this.userInfoToken)
this.userInfo = uni.getStorageSync('userinfo') || {};
this.getData()
}
}
</script>

6
pages/goodsDetail/index.vue

@ -10,7 +10,7 @@
@click="lookImg(index)"></image>
</swiper-item>
</swiper>
<view class="bill-position" @tap='formSubmit()' v-if="isShowButtonCount == 2">
<view class="bill-position" @tap='formSubmit()' v-if="isShowButtonCount >= 2">
<button class="cu-btn1 margin-left-sm lf-font-28 lf-m-20">
分享海报
</button>
@ -265,13 +265,13 @@
let goodsBackground = that.goodShare
context.drawImage(path, 0, 0, 375, 500);
context.drawImage(path, 0, 0, 375, 496);
context.drawImage(goodsBackground, 10, 10, 355, 300);
//
let wxcode = that.onceCode
context.drawImage(wxcode, 238, 324, 120, 120);
context.drawImage(wxcode, 244, 324, 120, 120);
let message = '长按识别小程序码'
context.setFontSize(16);
context.setFillStyle('#999');

4
pages/order/pay-success.vue

@ -5,7 +5,7 @@
<image src="@/static/images/system/paysuccess.png" mode="widthFix" style="height: 100px;width: 100px;"></image>
</view>
<view class="text-xxl margin-tb text-orange text-bold">订单支付成功</view>
<view class="text-gray">
<view class="text-gray" v-if="type!=3">
您可以在我的订单中查询订单详情
</view>
</view>
@ -14,7 +14,7 @@
<image src="@/static/images/system/payfail.png" mode="widthFix" style="height: 100px;width: 100px;"></image>
</view>
<view class="text-xxl margin-tb text-gray text-bold">订单支付失败</view>
<view class="text-gray">
<view class="text-gray" v-if="type!=3">
您可以在我的订单中查询订单详情
</view>
</view>

Loading…
Cancel
Save