first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:27:25 +08:00
commit 85b89ccea7
1694 changed files with 168292 additions and 0 deletions

View File

@@ -0,0 +1,118 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;padding: 30rpx;">
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="200rpx">
<u-form-item label="真实姓名" prop="realname" borderBottom>
<u-input v-model="form.realname" placeholder="请输入" border="none" />
</u-form-item>
<u-form-item label="身份证号" prop="idcard" borderBottom>
<u-input v-model="form.idcard" placeholder="请输入" border="none" />
</u-form-item>
<u-form-item label="银行卡号" prop="num" borderBottom>
<u-input v-model="form.num" placeholder="请输入" border="none" />
</u-form-item>
<u-form-item label="预留手机号" prop="mobile" borderBottom>
<u-input v-model="form.mobile" placeholder="请输入" border="none" />
</u-form-item>
</u--form>
<view style="height: 50rpx;"></view>
<view>
<view style="font-size: 28rpx;color: coral;">请仔细核对信息填写错误会导致提现失败</view>
</view>
<view style="height: 50rpx;"></view>
<u-button type="primary" @click="submit">提交</u-button>
<view style="height: 50rpx;"></view>
</view>
</view>
</template>
<script>
let self;
export default {
data() {
return {
rules: {
idcard: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
realname: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
num: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
mobile: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
},
form: {
id: '',
type: 3,
role: 1,
subname: '',
realname: '',
idcard: '',
num: '',
mobile: '',
},
}
},
mounted() {
},
onLoad(option) {
self = this;
if (option && option.item) {
self.form = JSON.parse(decodeURIComponent(option.item));
}
},
onShow() {
},
onReady() {
//如果需要兼容微信小程序并且校验规则中含有方法等只能通过setRules方法设置规则。
self.$refs.uForm.setRules(self.rules)
},
methods: {
submit() {
this.$refs.uForm.validate().then(res => {
if (self.form.id) {
self.$http.post('/shop/v10/account/update', self.form).then(({
data,
success
}) => {
if (success) {
uni.navigateBack();
}
})
} else {
self.$http.post('/shop/v10/account/create', self.form).then(({
data,
success
}) => {
if (success) {
uni.navigateBack();
}
})
}
}).catch(errors => {
})
},
}
}
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,133 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<navigator url="/pages/wallet/account/form">
<u-button type="primary">添加银行卡</u-button>
</navigator>
<!-- <view style="height: 20rpx;"></view> -->
<!-- <navigator url="/pages/wallet/account/org">
<u-button type="warning">添加企业</u-button>
</navigator> -->
<view style="height: 20rpx;"></view>
<view>
<view v-if="!items.length" style="padding: 30rpx;background-color: #ffffff;border-radius: 10rpx;">
<u-empty mode="data"></u-empty>
</view>
<view v-else @click="check(item)" v-for="(item,index) in items" :key="index"
:class="item.id == current ? 'xkl_cur' : 'xkl_no'"
style="background-color: #ffffff;border-radius: 12rpx; padding: 20rpx;margin-bottom: 20rpx;">
<view class="u-flex u-flex-between">
<view>
<view style="font-size: 28rpx;">
<view class="u-flex u-flex-y-center">
<view>
<u-tag :text="config.role[item.role]" size="mini" type="success" plain
plainFill></u-tag>
</view>
<view style="width: 20rpx;"></view>
<view style="font-size: 26rpx;">{{item.realname}}</view>
<view style="width: 20rpx;"></view>
<view style="font-size: 26rpx;">{{item.mobile}}</view>
</view>
</view>
<view style="height: 20rpx;"></view>
<view style="color: #232323;">
<view style="font-size: 28rpx;">{{item.subname}}</view>
<view style="font-size: 28rpx;">{{item.num}}</view>
<view style="height: 10rpx;"></view>
<view style="font-size: 28rpx;">{{item.idcard}}</view>
</view>
</view>
<view>
<u-tag v-if="item.role == 1" text="编辑"
@click="tonav(`/pages/wallet/account/form?item=${encodeURIComponent(JSON.stringify(item))}`)">
</u-tag>
<u-tag v-if="item.role == 2" text="编辑"
@click="tonav(`/pages/wallet/account/org?item=${encodeURIComponent(JSON.stringify(item))}`)">
</u-tag>
<view style="height: 30rpx;"></view>
<u-tag text="删除" @click="delshowcli(item)" type="error"></u-tag>
</view>
</view>
</view>
</view>
<u-modal :show="delshow" @confirm="getAccountDel()" @close="delshow = false" showCancelButton
closeOnClickOverlay @cancel="delshow = false" content='确认删除?'></u-modal>
<view style="height: 100rpx;"></view>
<u-button v-if="show" @click="toback">返回上一页</u-button>
</view>
</template>
<script>
let self;
export default {
data() {
return {
delshow: false,
items: [],
current: '',
config: null,
show: 0,
form: {
id: ''
}
}
},
onLoad(option) {
self = this;
if (option && option.show) {
self.show = 1;
}
},
onShow() {
self.getAccountItems();
},
methods: {
tonav(url) {
uni.navigateTo({
url: url
})
},
delshowcli(item) {
self.delshow = true;
self.form.id = item.id;
},
toback() {
uni.navigateBack();
},
check(item) {
self.current = item.id;
},
getAccountDel() {
self.$http.get('/shop/v10/account/delete', self.form).then(({
data,
success
}) => {
self.delshow = false;
self.getAccountItems();
})
},
getAccountItems() {
self.$http.get('/shop/v10/account/items').then(({
data,
success
}) => {
self.items = data.items;
self.config = data.config;
})
},
}
}
</script>
<style lang="scss">
.xkl_cur {
border: 1px solid #71d5a1;
}
.xkl_no {
border: 1px solid #ffffff;
}
</style>

View File

@@ -0,0 +1,99 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;padding: 30rpx;">
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="200rpx">
<u-form-item label="公司名称" prop="realname" borderBottom>
<u-input v-model="form.realname" placeholder="请输入" border="none" />
</u-form-item>
<u-form-item label="开户行" prop="subname" borderBottom>
<u-input v-model="form.subname" placeholder="请输入" border="none" />
</u-form-item>
<u-form-item label="银行账号" prop="num" borderBottom>
<u-input v-model="form.num" placeholder="请输入" border="none" />
</u-form-item>
</u--form>
<view style="height: 50rpx;"></view>
<view>
<view style="font-size: 28rpx;color: coral;">请仔细核对信息填写错误会导致提现失败</view>
</view>
<view style="height: 50rpx;"></view>
<u-button type="primary" @click="submit">提交</u-button>
<view style="height: 50rpx;"></view>
</view>
</view>
</template>
<script>
let self;
export default {
data() {
return {
rules: {
subname: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
realname: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
num: [{
required: true,
message: '请输入',
trigger: ['blur', 'change']
}],
},
form: {
id: '',
role: 2,
subname: '',
realname: '',
idcard: '',
num: '',
mobile: '',
},
}
},
mounted() {
},
onLoad(option) {
self = this;
if (option && option.item) {
self.form = JSON.parse(decodeURIComponent(option.item));
}
},
onShow() {
},
onReady() {
//如果需要兼容微信小程序并且校验规则中含有方法等只能通过setRules方法设置规则。
self.$refs.uForm.setRules(self.rules)
},
methods: {
submit() {
this.$refs.uForm.validate().then(res => {
self.$http.post('/shop/v10/account/org', self.form).then(({
data,
success
}) => {
if (success) {
uni.navigateBack();
}
})
}).catch(errors => {
})
},
}
}
</script>
<style lang="scss">
</style>

254
pages/wallet/index.vue Normal file
View File

@@ -0,0 +1,254 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<view style="
background: linear-gradient(185deg, #59A0DE 0%, #255C9A 100%);
border-radius: 10rpx;padding: 50rpx;">
<view class="u-flex u-flex-between u-flex-y-center">
<view style="color: #ffffff;">
<view style="font-size: 24rpx;color: #EEEEEE;">当前余额()</view>
<view style="font-size: 40rpx;font-weight: 800;">
<view>{{walletInfo.money}}</view>
</view>
</view>
<navigator :url="`/pages/wallet/temp?data=${encodeURIComponent(JSON.stringify(walletInfo))}`"
style="width: 120rpx;height: 56rpx;line-height: 56rpx; height: 56rpx;text-align: center;font-size: 28rpx;background: #F7F7F7;border-radius: 12rpx;opacity: 1; color: #2CA164;">
转赠
</navigator>
</view>
<view style="height: 50rpx;"></view>
<!-- <view class="u-flex u-flex-between u-flex-y-center"
style="font-size: 28rpx;text-align: center;color: #ffffff;">
<view>
<view>100</view>
<view style="color: #EEEEEE;">冻结中</view>
</view>
<view>
<view>100</view>
<view style="color: #EEEEEE;">可提现</view>
</view>
</view> -->
<u-grid :border="false" :col="2">
<u-grid-item :customStyle="{padding:'20rpx'}" @click="navto('/pages/wallet/list?status=-3')">
<view style="color: #fff;">{{walletInfo.freeze_money}}</view>
<view style="color: #c8c9cc;font-size: 28rpx;">冻结中</view>
</u-grid-item>
<u-grid-item class="u-flex" :customStyle="{padding:'20rpx'}" @click="navto('/pages/wallet/withdraw')">
<view style="color: #fff;">{{walletInfo.money}}</view>
<view style="color: #c8c9cc;font-size: 28rpx;">可提现</view>
</u-grid-item>
</u-grid>
</view>
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff; border-radius: 10rpx;">
<u-grid :border="false" :col="5">
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/list')">
<u-icon name="/static/icon/money-list.png" size="50rpx"></u-icon>
<view style="height: 10rpx;"></view>
<text class="grid-text-mini">账单</text>
</u-grid-item>
<u-grid-item :customStyle="{padding:'20rpx'}" @click="topay()">
<u-icon name="/static/icon/money-list.png" size="50rpx"></u-icon>
<view style="height: 10rpx;"></view>
<text class="grid-text-mini">充值</text>
</u-grid-item>
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/withdraw')">
<u-icon name="/static/icon/withdraw.png" size="50rpx"></u-icon>
<view style="height: 10rpx;"></view>
<text class="grid-text-mini">提现</text>
</u-grid-item>
<u-grid-item :customStyle="{padding:'20rpx 0'}"
@click="navto(`/pages/wallet/temp?data=${encodeURIComponent(JSON.stringify(walletInfo))}`)">
<u-icon name="gift" size="66rpx"></u-icon>
<text class="grid-text-mini">转赠</text>
</u-grid-item>
<u-grid-item :customStyle="{padding:'20rpx 0'}" @click="navto('/pages/wallet/account/index')">
<u-icon name="/static/icon/bank.png" size="50rpx"></u-icon>
<view style="height: 10rpx;"></view>
<text class="grid-text-mini">银行卡</text>
</u-grid-item>
</u-grid>
</view>
<view style="height: 20rpx;"></view>
<!-- <u-subsection :list="tabData.list" keyName="name" :current="tabData.current" @change="sectionChange"
activeColor="#2CCE7F"></u-subsection>
<view style="height: 20rpx;"></view> -->
<view class="u-flex">
<view style="width: 6rpx;background-color: #26418A;"></view>
<view style="width: 6rpx;"></view>
<view style="font-size: 28rpx;color: #2a2a2a;font-weight: 700;">最新记录</view>
</view>
<view style="height: 20rpx;"></view>
<view>
<view v-for="(item,index) in walletItems" :key="index"
style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 16rpx;margin-bottom: 20rpx;">
<view class="u-flex u-flex-between u-flex-y-center">
<view style="color: #232323;font-size: 30rpx;">
<view class="u-flex u-flex-between">
<view>{{config.type[item.type]}}</view>
</view>
<view style="height: 10rpx;"></view>
<view style="color: #999999;font-size: 26rpx;">{{item.note}}</view>
<view style="height: 16rpx;"></view>
<view class="u-flex">
<view>{{item.created_at}}</view>
<view style="width: 20rpx;"></view>
<view style="color: #909399;">{{config.status[item.status]}}</view>
</view>
<view style="height: 16rpx;"></view>
</view>
<view style="font-size: 28rpx;">
<text v-if="item.money > 0" style="color: #FF2727;">{{item.money}}</text>
<text v-else>{{item.money}}</text>
</view>
</view>
<view v-if="item.admin_note">
<u-line></u-line>
<view style="height: 14rpx;"></view>
<view style="font-size: 26rpx;">{{item.admin_note}}</view>
</view>
<view v-if="item.account">
<u-line></u-line>
<view style="height: 14rpx;"></view>
<view class="u-flex u-flex-between">
<view>{{item.account.realname}} </view>
<view>{{item.account.mobile}} </view>
</view>
<view style="height: 10rpx;"></view>
<view>{{item.subname}}</view>
<view>{{item.account.num}}</view>
<view style="height: 10rpx;"></view>
<view>{{item.account.idcard}}</view>
</view>
</view>
</view>
<!-- <u-loadmore :status="loadStatus" /> -->
<view style="height: 400rpx;"></view>
</view>
</template>
<script>
import {
API_URL,
STATIC_URL
} from '@/env'
let self;
export default {
data() {
return {
walletInfo: {},
walletItems: [],
tabData: {
list: [{
"name": "全部",
"symbol": ""
}, {
"name": "收入",
"symbol": "+"
}, {
"name": "支出",
"symbol": "-"
}, ],
current: 0
},
loadStatus: 'loadmore',
search: {
symbol: '',
page: 1,
status: 0,
},
page: {
current: 0,
last_page: 1
},
config: null
}
},
onLoad() {
self = this;
},
onShow() {
self.getWalletInfo();
self.walletItems = [];
self.getWalletItems();
},
onPullDownRefresh() {
self.search.page = 1;
self.walletItems = [];
self.getWalletInfo();
self.getWalletItems();
uni.stopPullDownRefresh();
},
methods: {
topay() {
uni.navigateTo({
url: '/pages/wallet/recharge?data=' + encodeURIComponent(JSON.stringify(self.walletInfo))
})
// var ua = window.navigator.userAgent.toLowerCase();
// if (ua.match(/micromessenger/i) == 'micromessenger') {
// location.href = API_URL + '/shop/v10/auth/wxoauthshoprecharge?data=' + encodeURIComponent(JSON
// .stringify(self.walletInfo));
// return true;
// } else {
// uni.navigateTo({
// url: '/pages/wallet/recharge?data=' + encodeURIComponent(JSON.stringify(self.walletInfo))
// })
// return false;
// }
},
navto(url) {
uni.navigateTo({
url: url
})
},
sectionChange(index) {
self.tabData.current = index;
self.search.symbol = self.tabData.list[index].symbol;
self.search.page = 1;
self.walletItems = [];
self.getWalletItems();
},
pageStatus() {
self.loadStatus = 'loadmore';
if (self.search.page >= self.page.last_page) {
self.loadStatus = 'nomore';
return false;
}
return true;
},
getWalletItems() {
self.$http.get('/shop/v10/wallet/items', self.search).then(({
data,
success
}) => {
if (success) {
self.walletItems = self.walletItems.concat(data.items.data);
self.config = data.config;
self.page.last_page = data.items.last_page;
self.pageStatus();
}
})
},
getWalletInfo() {
self.$http.get('/shop/v10/wallet/info').then(({
data,
success
}) => {
if (success) {
self.walletInfo = data;
}
})
},
}
}
</script>
<style lang="scss">
</style>

260
pages/wallet/list.vue Normal file
View File

@@ -0,0 +1,260 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<view v-if="false" style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;">
<view class="u-flex">
<view style="width: 160rpx;font-size: 30rpx;">日期选择</view>
<view @click="screen.showcalendar = true" style="color: #232323;">
<text v-if="search.start_date">{{search.start_date}} - {{search.end_date}}</text>
<text v-else>请选择日期</text>
</view>
</view>
<u-divider text=""></u-divider>
<view>
<view style="font-size: 30rpx;">充电桩</view>
<view style="height: 20rpx;"></view>
<view class="u-flex" style="font-size: 30rpx;">
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.scene == 2 ? 'xkl_cur' : 'xkl_no'" @click="checkscene(2)">全部</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 21 ? 'xkl_cur' : 'xkl_no'" @click="checktype(21)">购买</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 22 ? 'xkl_cur' : 'xkl_no'" @click="checktype(22)">直推奖</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 23 ? 'xkl_cur' : 'xkl_no'" @click="checktype(23)">团队奖</view>
</view>
</view>
<u-divider text=""></u-divider>
<view>
<view style="font-size: 30rpx;">服务费</view>
<view style="height: 20rpx;"></view>
<view class="u-flex" style="font-size: 30rpx;">
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.scene == 3 ? 'xkl_cur' : 'xkl_no'" @click="checkscene(3)">全部</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 31 ? 'xkl_cur' : 'xkl_no'" @click="checktype(31)">投资奖</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 32 ? 'xkl_cur' : 'xkl_no'" @click="checktype(32)">直推奖</view>
<view style="width: 30rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx; padding: 10rpx;"
:class="search.type == 33 ? 'xkl_cur' : 'xkl_no'" @click="checktype(33)">团队奖</view>
</view>
</view>
<u-divider text=""></u-divider>
<view class="u-flex u-flex-y-center">
<view style="font-size: 30rpx;">设备ID</view>
<u--input placeholder="请输入设备id" border="bottom" v-model="search.device_id"></u--input>
</view>
<u-divider text=""></u-divider>
<view class="u-flex">
<u-button>重置</u-button>
<u-button type="primary">确定</u-button>
</view>
</view>
<!-- <view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;border-radius: 10rpx;">
<u-grid :border="false" :col="2">
<u-grid-item :customStyle="{padding:'20rpx 0'}">
<view style="font-size: 30rpx;">100</view>
<text class="grid-text-mini">收入</text>
</u-grid-item>
<u-grid-item :customStyle="{padding:'20rpx 0'}">
<view style="font-size: 30rpx;">100</view>
<text class="grid-text-mini">支出</text>
</u-grid-item>
</u-grid>
</view> -->
<view style="height: 20rpx;"></view>
<!-- <u-subsection :list="tabData.list" keyName="name" :current="tabData.current"
@change="sectionChange"></u-subsection>
<view style="height: 20rpx;"></view> -->
<view>
<view v-for="(item,index) in walletItems" :key="index"
style="padding: 20rpx;background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;margin-bottom: 20rpx;">
<view class="u-flex u-flex-between u-flex-y-center">
<view style="color: #232323;font-size: 30rpx;">
<view class="u-flex u-flex-between">
<view>{{config.type[item.type]}}</view>
</view>
<view style="height: 10rpx;"></view>
<view style="color: #999999;font-size: 26rpx;">{{item.note}}</view>
<view style="height: 16rpx;"></view>
<view class="u-flex">
<view>{{item.created_at}}</view>
<view style="width: 20rpx;"></view>
<view style="color: #909399;">{{config.status[item.status]}}</view>
</view>
<view style="height: 16rpx;"></view>
</view>
<view style="font-size: 28rpx;">
<text v-if="item.money > 0" style="color: #FF2727;">{{item.money}}</text>
<text v-else>{{item.money}}</text>
</view>
</view>
<view v-if="item.admin_note">
<u-line></u-line>
<view style="height: 14rpx;"></view>
<view style="font-size: 26rpx;">{{item.admin_note}}</view>
</view>
<view v-if="item.account">
<u-line></u-line>
<view style="height: 14rpx;"></view>
<view class="u-flex u-flex-between">
<view>{{item.account.realname}} </view>
<view>{{item.account.mobile}} </view>
</view>
<view style="height: 10rpx;"></view>
<view>{{item.subname}}</view>
<view>{{item.account.num}}</view>
<view style="height: 10rpx;"></view>
<view>{{item.account.idcard}}</view>
</view>
</view>
</view>
<u-loadmore :status="loadStatus" />
<view style="height: 400rpx;"></view>
<u-calendar :show="screen.showcalendar" minDate="2024-03-01" mode="range" @confirm="confirmcalendar"
@close="screen.showcalendar = false" :showTitle="false" :defaultDate="[]"></u-calendar>
</view>
</template>
<script>
let self;
export default {
data() {
return {
screen: {
showcalendar: false,
},
walletItems: [],
tabData: {
list: [{
"name": "全部",
"symbol": ""
}, {
"name": "冻结",
"symbol": ""
}, {
"name": "收入",
"symbol": "+"
}, {
"name": "支出",
"symbol": "-"
}, ],
current: 0
},
loadStatus: 'loadmore',
search: {
symbol: '',
page: 1,
status: 0,
start_date: '',
end_date: '',
type: '',
scene: '',
},
page: {
current: 0,
last_page: 1
},
config: null
}
},
onLoad(option) {
self = this;
if (option && option.status) {
self.search.status = option.status;
}
self.getWalletItems();
},
onPullDownRefresh() {
self.search.page = 1;
self.walletItems = [];
self.getWalletItems();
uni.stopPullDownRefresh();
},
onReachBottom() {
if (!self.pageStatus()) {
return;
}
self.loadStatus = 'loading';
self.search.page = ++self.search.page;
self.getWalletItems();
},
methods: {
checktype(type) {
if (self.search.type == type) {
self.search.type = '';
} else {
self.search.type = type;
}
},
checkscene(scene) {
if (self.search.scene == scene) {
self.search.scene = '';
} else {
self.search.scene = scene;
}
},
confirmcalendar(e) {
self.search.start_date = e[0];
self.search.end_date = e[e.length - 1];
self.screen.showcalendar = false;
},
sectionChange(index) {
self.tabData.current = index;
self.search.symbol = self.tabData.list[index].symbol;
self.search.page = 1;
self.walletItems = [];
self.getWalletItems();
},
pageStatus() {
self.loadStatus = 'loadmore';
if (self.search.page >= self.page.last_page) {
self.loadStatus = 'nomore';
return false;
}
return true;
},
getWalletItems() {
self.$http.get('/shop/v10/wallet/items', self.search).then(({
data,
success
}) => {
self.walletItems = self.walletItems.concat(data.items.data);
self.config = data.config;
self.page.last_page = data.items.last_page;
self.pageStatus();
})
},
}
}
</script>
<style lang="scss" scoped>
.xkl_cur {
border: 1px solid #26418A;
color: #26418A;
}
.xkl_no {
border: 1px solid #999999;
color: #999999;
}
.xkl-com-bg {
min-height: 100vh;
}
</style>

150
pages/wallet/recharge.vue Normal file
View File

@@ -0,0 +1,150 @@
<template>
<view class="xkl-com-bg">
<view style="height: 100rpx;"></view>
<view>
<view style="font-size: 30rpx; color: #949494;">当前余额 {{info.info.money}}最低充值{{info.recharge.min_money}}
</view>
<view style="height:20rpx"></view>
<u--input :customStyle="{backgroundColor: '#ffffff'}" type="number" placeholder="请输入充值金额" border="surround"
v-model="form.money"></u--input>
</view>
<view style="height: 30rpx;"></view>
<view style="background-color: #fff; padding: 30rpx;border-radius: 10rpx;">
<view style="font-size: 28rpx;#606266">支付方式</view>
<view style="height: 20rpx;"></view>
<u-radio-group v-model="form.pay_type" iconPlacement="right" :borderBottom="true" placement="column">
<u-radio :name="1">
<view class="u-flex u-flex-y-center">
<u-icon name="/static/icon/weixin.png" size="50rpx" />
<view style="width: 20rpx;"></view>
<view>
<view style="font-size: 30rpx;">微信支付</view>
<view style="font-size: 28rpx;color: #909399;">微信快捷支付</view>
</view>
</view>
</u-radio>
</u-radio-group>
</view>
<view style="height: 100rpx;"></view>
<u-button type="primary" @click="getRecharge">立即支付</u-button>
<view style="height: 100rpx;"></view>
<u-modal :show="paynoticeshow" content='未检测到支付结果, 您可以查看余额' @confirm="navback()" @close="paynoticeshow = false"
@cancel="paynoticeshow = false" showCancelButton confirmText="查看余额" cancelText="取消"
closeOnClickOverlay></u-modal>
</view>
</template>
<script>
let self;
export default {
data() {
return {
paynoticeshow: false,
info: {
recharge: {
min_money: 0
}
},
current: 0,
items: [],
form: {
money: '',
pay_type: 1,
},
ossdata: null,
filelist: [],
order_no: '',
}
},
onLoad(option) {
self = this;
if (option && option.data) {
self.info = JSON.parse(decodeURIComponent(option.data));
}
},
onShow() {
let options = uni.getEnterOptionsSync();
const shop_recharge_show = uni.getStorageSync('shop_recharge_show');
if (options.scene == '1038' &&
options.referrerInfo.appId == 'wxef277996acc166c3' && shop_recharge_show == 1) {
uni.setStorageSync('shop_recharge_show', 0);
// 代表从收银台小程序返回
let extraData = options.referrerInfo.extraData;
if (!extraData) {
// "当前通过物理按键返回,未接收到返参,建议自行查询交易结果";
self.paynoticeshow = true;
} else {
if (extraData.code == 'success') {
// "支付成功";
uni.showToast({
title: '支付成功',
icon: 'none',
duration: 3500
});
uni.navigateBack();
} else if (extraData.code == 'cancel') {
// "支付已取消";
uni.showToast({
title: '支付已取消',
icon: 'none',
duration: 3500
})
} else {
// "支付失败:" + extraData.errmsg;
uni.showToast({
title: "支付失败:" + extraData.errmsg,
icon: 'none',
duration: 3500
})
}
}
}
},
methods: {
navback(url) {
uni.navigateBack();
},
getRecharge() {
if (self.form.money < self.info.recharge.min_money) {
uni.showToast({
title: `最低充值${self.info.recharge.min_money}`,
icon: 'none'
})
return;
}
uni.showLoading({
title: '',
mask: true
});
self.$http.post('/shop/v10/wallet/recharge', self.form).then(({
data,
success
}) => {
uni.hideLoading();
self.order_no = data.extraData.reqsn;
uni.openEmbeddedMiniProgram({
appId: data.appid,
extraData: data.extraData,
success(res) {
// 打开成功
uni.setStorageSync('shop_recharge_show', 1);
}
})
})
},
}
}
</script>
<style lang="scss">
.xkl-no {
background-color: #f1f1f1;
}
.xkl-cur {
background-color: #2CCE7F;
color: #ffffff;
}
</style>

165
pages/wallet/temp.vue Normal file
View File

@@ -0,0 +1,165 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 10rpx;font-size: 30rpx; color: #949494;">
当前余额
{{info.info.money}}最低转赠{{info.recharge.min_money}}
</view>
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;padding: 30rpx;border-radius: 10rpx;">
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" labelWidth="300rpx">
<u-form-item label="转赠金额" prop="money" borderBottom>
<u--input v-model="form.money" type="number" placeholder="请输入转赠金额" border="none"></u--input>
</u-form-item>
<u-form-item label="转赠给(用户名)" prop="username" borderBottom>
<u-input v-model="form.username" placeholder="请输入用户名" border="none" />
</u-form-item>
<u-form-item label="手机号">
<u-input v-model="info.info.mobile" disabled placeholder="" />
</u-form-item>
<u-form-item label="验证码" prop="code" borderBottom>
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
<view slot="right">
<u-toast ref="uToast"></u-toast>
<u-code :seconds="code.seconds" @end="end" @start="start" ref="uCode"
@change="codeChange"></u-code>
<u-button type="primary" @tap="getCode">{{code.tips}}</u-button>
</view>
</u-form-item>
</u--form>
</view>
<view style="height: 20rpx;"></view>
<view style="background-color: #ffffff;border-radius: 12rpx;padding: 30rpx;">
<view style="color: #f29100;">温馨提示</view>
<view style="height: 10rpx;"></view>
<view style="font-size: 28rpx;color: #909399;">
<view>1.只能转赠给团队成员直线上级直线下级</view>
<view style="height: 10rpx;"></view>
<view>2.转赠金额实时到账不扣手续费</view>
<view style="height: 10rpx;"></view>
<view>3.转赠成功后实时生效不支持撤回</view>
</view>
</view>
<view style="height: 100rpx;"></view>
<u-button type="primary" @click="submit">确认</u-button>
<view style="height: 100rpx;"></view>
</view>
</template>
<script>
let self;
export default {
data() {
return {
info: {
recharge: {
min_money: 0
}
},
current: 0,
items: [],
form: {
money: '',
username: '',
mobile: '',
code: ''
},
rules: {
money: [{
required: true,
message: '请输入转赠金额',
trigger: ['blur', 'change']
}],
username: [{
required: true,
message: '请输入用户名',
trigger: ['blur', 'change']
}],
code: [{
required: true,
message: '请输入验证码',
trigger: ['blur', 'change']
}],
},
code: {
tips: '获取验证码',
// refCode: null,
seconds: 60,
}
}
},
onLoad(option) {
self = this;
if (option && option.data) {
self.info = JSON.parse(decodeURIComponent(option.data));
}
},
onReady() {
//onReady 为uni-app支持的生命周期之一
self.$refs.uForm.setRules(self.rules)
},
methods: {
codeChange(text) {
self.code.tips = text;
},
getCode() {
if (self.info.info.mobile.length != 11) {
uni.$u.toast('请输入手机号');
return;
}
if (self.$refs.uCode.canGetCode) {
// 模拟向后端请求验证码
uni.showLoading({
title: '正在获取验证码'
})
self.$http.get('/com/sms/sendcode', {
mobile: self.info.info.mobile
}).then(res => {
if (res.success) {
uni.hideLoading();
// 这里此提示会被this.start()方法中的提示覆盖
uni.$u.toast('验证码已发送有效期5分钟');
// 通知验证码组件内部开始倒计时
self.$refs.uCode.start();
}
})
} else {
uni.$u.toast('倒计时结束后再发送');
}
},
end() {
//uni.$u.toast('倒计时结束');
},
start() {
//uni.$u.toast('倒计时开始');
},
submit() {
this.$refs.uForm.validate().then(res => {
self.$http.post('/shop/v10/wallet/temp', self.form).then(({
data,
success
}) => {
if (success) {
uni.navigateBack();
}
})
}).catch(errors => {
})
},
}
}
</script>
<style lang="scss">
.xkl-no {
background-color: #f1f1f1;
}
.xkl-cur {
background-color: #2CCE7F;
color: #ffffff;
}
</style>

286
pages/wallet/withdraw.vue Normal file
View File

@@ -0,0 +1,286 @@
<template>
<view class="xkl-com-bg">
<view style="height: 20rpx"></view>
<view style="font-size: 30rpx; color: #232323">可提现 {{ money }}</view>
<view style="height: 20rpx"></view>
<view style="background-color: #ffffff; border-radius: 12rpx; padding: 30rpx">
<u--form labelPosition="top" :model="form" :rules="rules" ref="uForm" errorType="border-bottom" labelWidth="300rpx">
<u-form-item label="提现金额" prop="money" borderBottom>
<u--input v-model="form.money" type="number" placeholder="请输入提现金额" border="none"></u--input>
</u-form-item>
<u-form-item label="手机号">
<u-input v-model="shopinfo.mobile" disabled placeholder="" />
</u-form-item>
<u-form-item label="验证码" prop="code" borderBottom>
<u-code-input v-model="form.code" :maxlength="4" mode="line"></u-code-input>
<view slot="right">
<u-toast ref="uToast"></u-toast>
<u-code :seconds="code.seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
<u-button type="primary" @tap="getCode">{{ code.tips }}</u-button>
</view>
</u-form-item>
</u--form>
<view style="height: 30rpx"></view>
<view style="color: #f29100">提现须知</view>
<view style="height: 10rpx"></view>
<view style="font-size: 28rpx; color: #909399">
<view>1.最低提现{{ w.min_money }}100的倍数单人单月限额9万</view>
<view style="height: 10rpx"></view>
<view>2.根据国家税务标准提现申请发起规则如下</view>
<view style="height: 30rpx"></view>
<view class="listTable">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="listTable_header">
<view v-for="(item,inde) in list_table" :key="index">{{item.title}}</view>
</view>
<view class="listTable_header" v-for="(item,inde) in list_data" :key="index">
<view>{{item.arrive_day}}{{item.arrive_day == 30 || item.arrive_day == 31 ? '(月底)' : ''}}到账</view>
<view>{{item.apply_min}}-{{item.apply_max}}{{item.end_hour}}:00</view>
<view>{{item.fee}}%</view>
</view>
<view class="listTable_header" style="width: 632rpx;border: 1rpx solid #ccc;padding: 10rpx 10rpx;">
每个自然日的9号101920号以及月底当月最后两天发起的提现申请都将会被驳回此类发起提现用户需在下一个提现申请窗口期内再次提交提现申请才会被受理处理
</view>
</scroll-view>
</view>
<view style="height: 30rpx"></view>
<view>3.若提现申请发起日和财务付款日系节假日等非工作日的则处理日期将顺延至下一个工作日进行</view>
<!-- <view>2.根据国家税务标准提现征收{{w.fee}}%的手续费</view>
<view style="height: 10rpx;"></view>
<view>3.到账时间T+1到账金额(提现金额 - 手续费)</view> -->
</view>
</view>
<view>
<u-divider text="选择银行卡"></u-divider>
<u-button @click="tochard">添加银行卡</u-button>
<view style="height: 20rpx"></view>
<view
@click="check(item)"
v-for="(item, index) in items"
:key="index"
:class="item.id == form.acc_id ? 'xkl_cur' : 'xkl_no'"
style="background-color: #ffffff; border-radius: 12rpx; padding: 20rpx; margin-bottom: 20rpx"
>
<view class="u-flex u-flex-y-center" style="font-size: 28rpx">
<view>
<u-tag :text="config.role[item.role]" size="mini" type="success" plain plainFill></u-tag>
</view>
<view style="width: 30rpx"></view>
<view style="font-size: 26rpx">{{ item.realname }}</view>
<view style="width: 30rpx"></view>
<view style="font-size: 26rpx">{{ item.mobile }}</view>
</view>
<view style="height: 20rpx"></view>
<view style="color: #232323">
<view style="font-size: 28rpx">{{ item.subname }}</view>
<view style="font-size: 28rpx">{{ item.num }}</view>
<view style="height: 10rpx"></view>
<view style="font-size: 28rpx">{{ item.idcard }}</view>
</view>
</view>
</view>
<view style="height: 30rpx"></view>
<u-button @click="withdraw()" type="primary">提交申请</u-button>
<view style="height: 100rpx"></view>
</view>
</template>
<script>
let self;
export default {
data() {
return {
items: [],
config: null,
form: {
money: '',
acc_id: '',
code: ''
},
shopinfo: {
mobile: ''
},
w: {
day: '',
min_money: ''
},
money: 0,
rules: {
money: [
{
required: true,
message: '请输入提现金额',
trigger: ['blur', 'change']
}
],
code: [
{
required: true,
message: '请输入验证码',
trigger: ['blur', 'change']
}
]
},
code: {
tips: '获取验证码',
// refCode: null,
seconds: 60
},
list_table: [
{ title: '计划到账时间', name: 'arrive_day' },
{ title: '提现-申请时间', name: 'apply_min' },
// { title: '最晚申请', name: 'apply_max' },
{ title: '提现-手续费', name: 'fee' }
],
list_data:[]
};
},
onLoad(option) {
self = this;
if (option && option.id) {
self.form.acc_id = option.id;
}
self.shopinfo = self.$store.state.auth.user;
this.tableList()
},
onShow() {
self.getAccountItems();
},
onReady() {
//onReady 为uni-app支持的生命周期之一
self.$refs.uForm.setRules(self.rules);
},
methods: {
tableList(){
self.$http.get('/shop/v10/withdraw_config/items', self.form).then(({ data, success, msg }) => {
if (success) {
this.list_data = data
} else {
uni.showToast({
title: msg,
icon: 'none'
});
}
});
},
codeChange(text) {
self.code.tips = text;
},
getCode() {
if (self.shopinfo.mobile.length != 11) {
uni.$u.toast('请输入手机号');
return;
}
if (self.$refs.uCode.canGetCode) {
// 模拟向后端请求验证码
uni.showLoading({
title: '正在获取验证码'
});
self.$http
.get('/com/sms/sendcode', {
mobile: self.shopinfo.mobile
})
.then((res) => {
if (res.success) {
uni.hideLoading();
// 这里此提示会被this.start()方法中的提示覆盖
uni.$u.toast('验证码已发送有效期5分钟');
// 通知验证码组件内部开始倒计时
self.$refs.uCode.start();
}
});
} else {
uni.$u.toast('倒计时结束后再发送');
}
},
end() {
//uni.$u.toast('倒计时结束');
},
start() {
//uni.$u.toast('倒计时开始');
},
tochard() {
uni.navigateTo({
url: '/pages/wallet/account/index?show=1'
});
},
check(item) {
self.form.acc_id = item.id;
},
withdraw() {
this.$refs.uForm
.validate()
.then((res) => {
self.$http.get('/shop/v10/wallet/withdraw', self.form).then(({ data, success, msg }) => {
if (success) {
uni.navigateBack();
} else {
uni.showToast({
title: msg,
icon: 'none'
});
}
});
})
.catch((errors) => {
uni.$u.toast(errors[0].message);
});
},
getAccountItems() {
self.$http.get('/shop/v10/account/items').then(({ data, success }) => {
self.items = data.items;
self.config = data.config;
self.w = data.shop_withdraw;
self.money = data.money;
if (data.items.length) {
self.form.acc_id = data.items[0].id;
}
});
}
}
};
</script>
<style lang="scss">
.xkl_cur {
border: 1px solid #71d5a1;
}
.xkl_no {
border: 1px solid #ffffff;
}
.scroll-view_H {
white-space: normal;
width: 100%;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
height: 300rpx;
line-height: 300rpx;
text-align: center;
font-size: 36rpx;
}
.listTable {
width: 100%;
&_header {
width: 631rpx;
display: flex;
align-items: center;
box-sizing: border-box;
font-size: 26rpx;
view{
// min-width: 220rpx;
flex: 1;
padding: 10rpx 0rpx;
text-align: center;
border: 1rpx solid #ccc;
box-sizing: border-box;
}
}
}
</style>