第一次上传
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="" v-if="props.show">
|
||||
<qf-image-cropper :src="props.url" :width="props.width" :height="props.height" :radius="20"
|
||||
@crop="handleCrop"></qf-image-cropper>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { onBeforeUnmount, onMounted, reactive } from 'vue';
|
||||
import { Service, BycAdminService } from '@/Service/Byc/BycAdminService'
|
||||
// const props = defineProps({
|
||||
// show : string,
|
||||
// // url : string,
|
||||
// // width : number,
|
||||
// // height:number,
|
||||
// // upType:string,
|
||||
// // retFun:Function
|
||||
// });
|
||||
|
||||
|
||||
let props = defineProps(["show","url",'width','height','upType',"retFun","imgName"]);
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
|
||||
const handleCrop = (e) => {
|
||||
let arr = e.tempFilePath.split('.')
|
||||
let name = arr[arr.length - 1]
|
||||
Service.UpLoadMedia(props.upType, name, '', e.tempFilePath).then(rest => {
|
||||
if (rest.code == 0) {
|
||||
uni.showToast({
|
||||
title: rest.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
props.retFun( {name:props.imgName,url:rest.data.file})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: rest.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<view style=" padding: 60rpx 40rpx 20rpx; ">
|
||||
|
||||
<view class="" style="font-size: 26rpx;">
|
||||
提现金额
|
||||
</view>
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
<up-input v-model="account" type="digit" :customStyle="{'padding':'12rpx 0','height':'100rpx'}"
|
||||
fontSize='18' prefixIconStyle="font-size: 28px;color: #000;font-weight:bold" placeholder="请输入金额"
|
||||
border="bottom" prefixIcon="rmb"></up-input>
|
||||
</view>
|
||||
<view class="" style="font-size: 26rpx; display: flex; align-items: center; ">
|
||||
<view class="" style="color: #999; ">
|
||||
当前剩余 {{ Number(userData.integral).toFixed(2) }} 元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="" style="margin: 40rpx 20rpx; ">
|
||||
<u-button type="primary" @click="save" :custom-style="contactButtonStyle">立即提现</u-button>
|
||||
</view>
|
||||
<view class="" style="margin: 20rpx; padding: 20rpx 30rpx; background-color: #f6f6f6; border-radius: 20rpx; ">
|
||||
<view class="" style="font-weight: bold; font-size: 30rpx;">
|
||||
提示
|
||||
</view>
|
||||
|
||||
<view class="" style="font-size: 28rpx;">
|
||||
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
|
||||
1.单笔最小提现1元
|
||||
</view>
|
||||
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
|
||||
2.单笔最多可提现200元
|
||||
</view>
|
||||
<view class="" style="text-indent: 1em; margin-top: 10rpx; ">
|
||||
3.每次最多一次申请提现
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" v-if="withLog!==null"
|
||||
style="margin: 20rpx; padding: 20rpx 30rpx 30rpx; background-color: #f6f6f6; border-radius: 10rpx; ">
|
||||
<view class="" style="font-weight: bold; font-size: 30rpx; display: flex; gap: 6rpx; ">
|
||||
<img :src="Service.GetIconImg('/static/index/pay/light.png')" style="width: 40rpx; height: 40rpx;" alt="" />
|
||||
待收款提醒
|
||||
</view>
|
||||
|
||||
<view class="" style="font-size: 28rpx; margin: 20rpx 0; text-indent: 2em; ">
|
||||
金额: {{ Number(withLog.amount).toFixed(2) }}
|
||||
</view>
|
||||
<view class="" style="font-size: 28rpx; margin: 20rpx 0; text-indent: 2em; ">
|
||||
时间: {{ withLog.addTime }}
|
||||
</view>
|
||||
<view class=""
|
||||
style=" display: flex; justify-content: flex-end; width: 100%; ">
|
||||
|
||||
<button @click="withdrow(withdrowData)" class="button-withdrow" style=" ">确认收款</button>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { ref } from "vue";
|
||||
import { Service, vpMerchService } from '@/Service/vp/vpMerchService'
|
||||
import { vpLoginService } from '@/Service/vp/vpLoginService'
|
||||
import { vpUserService } from '@/Service/vp/vpUserService'
|
||||
|
||||
let name = ref('')
|
||||
let account = ref<number>()
|
||||
let userData = ref({
|
||||
integral: 0,
|
||||
merchId: ''
|
||||
})
|
||||
// 按钮样式
|
||||
const contactButtonStyle = ref({
|
||||
backgroundColor: '#FF6600',
|
||||
borderColor: '#FF6600',
|
||||
color: '#FFFFFF',
|
||||
fontSize: '28rpx',
|
||||
height: '90rpx',
|
||||
borderRadius: '45rpx',
|
||||
marginRight: '20rpx'
|
||||
});
|
||||
|
||||
|
||||
let withdrowData = ref({
|
||||
data:{
|
||||
appId: '',
|
||||
mchId: '',
|
||||
packInfo: '',
|
||||
withId:''
|
||||
}
|
||||
})
|
||||
|
||||
let withLog = ref<any>(null)
|
||||
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
getData()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
const getData = () => {
|
||||
vpMerchService.GetMerchAccInfo('', 1).then(res => {
|
||||
if (res.code == 0) {
|
||||
userData.value = res.data.merchAcc
|
||||
if(res.data.withLog!==null){
|
||||
withLog.value = res.data.withLog
|
||||
withdrowData.value.data.mchId = res.data.mchId
|
||||
withdrowData.value.data.appId = res.data.appId
|
||||
withdrowData.value.data.packInfo = res.data.withLog.packInfo
|
||||
withdrowData.value.data.withId=res.data.withLog.withId
|
||||
}
|
||||
|
||||
} else {
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const save = () => {
|
||||
if (account.value === 0 || !account.value) {
|
||||
Service.Msg('请输入金额')
|
||||
return
|
||||
}
|
||||
if (account.value < 1) {
|
||||
Service.Msg('单笔最小提现1元')
|
||||
return
|
||||
}
|
||||
if (account.value > 200) {
|
||||
Service.Msg('单笔最多可提现200元')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Service.LoadIng('提现中')
|
||||
uni.getProvider({
|
||||
service: 'oauth',
|
||||
success: function (res : any) {
|
||||
uni.login({
|
||||
onlyAuthorize: true,
|
||||
provider: res.provider,
|
||||
success: function (loginRes) {
|
||||
vpLoginService.GetOpenIdByWeixin(loginRes.code, res.provider == 'weixin' ? 1 : 3).then(content => {
|
||||
if (content.code == 0) {
|
||||
vpUserService.WxWith(content.data, account.value, '').then(wxres => {
|
||||
Service.LoadClose()
|
||||
if (wxres.code == 0) {
|
||||
withdrow(wxres)
|
||||
} else {
|
||||
Service.Msg(wxres.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
Service.Msg(content.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
const withdrow = (wxres) => {
|
||||
if (wx.canIUse('requestMerchantTransfer')) {
|
||||
wx.requestMerchantTransfer({
|
||||
mchId: wxres.data.mchId,
|
||||
appId: wxres.data.appId,
|
||||
package: wxres.data.packInfo,
|
||||
success: () => {
|
||||
vpUserService.UpdateWith(wxres.data.withId).then(withdrow => {
|
||||
|
||||
})
|
||||
|
||||
Service.Msg('提现成功!')
|
||||
setTimeout(() => {
|
||||
Service.GoPageBack()
|
||||
}, 1000)
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('fail:', res);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
wx.showModal({
|
||||
content: '你的微信版本过低,请更新至最新版本。',
|
||||
showCancel: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
padding: 30rpx 30rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
.button-withdrow {
|
||||
width: 36%;
|
||||
color: #fff;
|
||||
background-color: var(--nav-mian);
|
||||
border-color: #f6f6f6;
|
||||
border-radius: 16rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.button-withdrow::after {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Reference in New Issue
Block a user