Browse Source

前端接入

master
yangrz 2 years ago
parent
commit
8ff920ce17
  1. 60
      agentApp/common/api.js
  2. 2
      agentApp/common/config.js
  3. 15
      agentApp/manifest.json
  4. 14
      agentApp/pages.json
  5. 0
      agentApp/pages/agent-login/index.vue
  6. 2
      agentApp/pages/allpages/index.vue
  7. 550
      agentApp/pages/payment/payment.vue
  8. 34
      agentApp/pages/user-login/index.vue
  9. 696
      agentApp/pages/user-orders/user-orders.vue
  10. 437
      agentApp/pages/withdrawal-management/withdrawal-management.vue
  11. 18
      agentApp/template.h5.html

60
agentApp/common/api.js

@ -1,3 +1,57 @@
const { http } = uni.$u
// 获取菜单
export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)
import {
baseUrl
} from "./config"
const {
http
} = uni.$u
// 响应拦截
http.interceptors.response.use((response) => {
/* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data
// 自定义参数
const custom = response.config?.custom
if (data.code !== 200) {
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
if (custom.toast !== false) {
uni.$u.toast(data.msg)
}
// 如果需要catch返回,则进行reject
if (custom?.catch) {
return Promise.reject(data)
} else {
// 否则返回一个pending中的promise,请求不会进入catch中
return new Promise(() => {})
}
}
return data.data === undefined ? {} : data.data
}, (response) => {
// 对响应错误做点什么 (statusCode !== 200)
return Promise.reject(response)
})
// 带上用户token
const userConfig = function() {
return {
header: {
'User-Token': uni.getStorageSync('user_token')
}
}
}
export const userGetMerchantInfo = (params) => http.post(baseUrl + '/api/user/getMerchantInfo', params, userConfig())
export const userCreateOrder = (params) => http.post(baseUrl + '/api/user/createOrder', params, userConfig())
export const userAccountInfo = () => http.post(baseUrl + '/api/user/accountInfo', {}, userConfig())
export const userQueueRebateList = (params) => http.post(baseUrl + '/api/user/queueRebateList', params, userConfig())
export const userOrderList = (params) => http.post(baseUrl + '/api/user/orderList', params, userConfig())
export const userFillAlipayAccount = (params) => http.post(baseUrl + '/api/user/fillAlipayAccount', params, userConfig())
export const userWithdraw = (params) => http.post(baseUrl + '/api/user/withdraw', params, userConfig())

2
agentApp/common/config.js

@ -1,3 +1,3 @@
module.exports = {
baseUrl: 'https://api.youzixy.com'
baseUrl: 'https://pdsk.leadfyy.com'
}

15
agentApp/manifest.json

@ -1,6 +1,6 @@
{
"name" : "agentApp",
"appid" : "__UNI__41F40AB",
"name" : "排队收款",
"appid" : "__UNI__A0FF0B7",
"description" : "多平台快速开发的UI框架",
"versionName" : "2.0.36",
"versionCode" : 1,
@ -130,18 +130,21 @@
"template" : "template.h5.html",
"router" : {
"mode" : "history",
"base" : "/wap/"
"base" : "/h5/"
},
"optimization" : {
"treeShaking" : {
"enable" : false
"enable" : true
}
},
"title" : "星链创动",
"title" : "排队收款",
"sdkConfigs" : {
"maps" : {}
},
"domain" : ""
"domain" : "",
"devServer" : {
"https" : false
}
},
"vueVersion" : "2"
}

14
agentApp/pages.json

@ -14,7 +14,19 @@
},
{
"path" : "pages/login/index",
"path" : "pages/user-login/index",
"style" :
{
"navigationBarTitleText": "用户登录",
"navigationBarBackgroundColor": "#1783FF",
"navigationBarTextStyle": "white"
// "enablePullDownRefresh": false
}
},
{
"path" : "pages/agent-login/index",
"style" :
{
"navigationBarTitleText": "代理登录",

0
agentApp/pages/login/index.vue → agentApp/pages/agent-login/index.vue

2
agentApp/pages/allpages/index.vue

@ -32,7 +32,7 @@
switch(num) {
case 1:
uni.navigateTo({
url: '/pages/login/index'
url: '/pages/agent-login/index'
});
break;
case 2:

550
agentApp/pages/payment/payment.vue

@ -4,14 +4,16 @@
<view class="pam-shop">
<view class="pam-mess">
<view class="picon">
<img src="../../static/page/people.png" style="width: 110rpx;height: 110rpx;" alt="" srcset="" />
<img v-if="merchant.logo" :src="merchant.logo" style="width: 110rpx;height: 110rpx; border-radius: 50%;"
alt="" srcset="" />
<img v-else src="../../static/page/people.png" style="width: 110rpx;height: 110rpx;" alt="" srcset="" />
</view>
<view class="pam-address">
<view class="pname">
付款给李姐烧烤(普罗旺斯店)
{{merchant.name}}
</view>
<view class="paddre">
广西南宁市江南区波尔多庄园2-109号商铺
{{merchant.address}}
</view>
</view>
</view>
@ -29,7 +31,8 @@
</view>
<view class="num">
<input type="text" class="pr-num" v-model="amount" placeholder="请输入金额" placeholder-style="color: #cfcfcf;" />
<input type="text" class="pr-num" v-model="amount" placeholder="请输入金额"
placeholder-style="color: #cfcfcf;" />
</view>
</view>
<view class="pfooter u-border-top">
@ -52,318 +55,371 @@
查看活动规则
</view>
</view>
<!-- <u-keyboard confirmText="1" mode="number" :closeOnClickOverlay="true" @close="close" :show="show" @confirm="confirm" @cancel="cancel"></u-keyboard> -->
<cu-keyboard ref="cukeyboard" @change="change" @confirm="confirm" @hide="hide"></cu-keyboard>
<!-- <u-keyboard confirmText="1" mode="number" :closeOnClickOverlay="true" @close="close" :show="show" @confirm="confirm" @cancel="cancel"></u-keyboard> -->
<cu-keyboard ref="cukeyboard" @change="change" @confirm="confirm" @hide="hide"></cu-keyboard>
</view>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
amount:''
}
},
onReady() {
this.$refs.cukeyboard.open();
},
methods: {
playFoucus() {
if(this.show){
return
}
this.show = true;
this.$refs.cukeyboard.open();
},
confirm() {
//this.show = false;
if(!this.checkMoney( this.amount)){
//alert("");
uni.showModal({
content:"请输入正确金额",
showCancel:false,
confirmText:"知道了"
})
return
import {
userGetMerchantInfo,
userCreateOrder
} from '../../common/api.js'
export default {
data() {
return {
show: false,
amount: '',
payment_code: '',
merchant: {
name: '加载中...',
address: '',
logo: ''
}
}
console.log("pay:",this.amount)
},
cancel() {
this.show = false;
},
close() {
this.show = false;
onReady() {
this.$refs.cukeyboard.open();
},
change(v){
console.log("change :",v)
this.amount = v
onLoad() {
this.payment_code = uni.getStorageSync('payment_code')
this.getMerchantInfo()
},
hide(){
methods: {
getMerchantInfo() {
userGetMerchantInfo({
payment_code: this.payment_code
}).then(data => this.merchant = data);
},
playFoucus() {
if (this.show) {
return
}
this.show = true;
this.$refs.cukeyboard.open();
},
confirm() {
//this.show = false;
if (!this.checkMoney(this.amount)) {
//alert("");
uni.showModal({
content: "请输入正确金额",
showCancel: false,
confirmText: "知道了"
})
return
}
},
checkMoney(val) {
//
var rechargeMoney = val;
var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
if (rechargeMoney == "") {
return false;
} else if (rechargeMoney.trim() == "") {
return false;
} else if (!reg.test(rechargeMoney)){
return false;
} else if (rechargeMoney == 0){
return false;
} else {
return true;
userCreateOrder({
payment_code: this.payment_code,
amount: this.amount
}).then(data => {
const onBridgeReady = function() {
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
appId: data.app_id, //ID
timeStamp: data.time_stamp, //1970
nonceStr: data.nonce_str, //
package: data.package,
signType: data.sign_type, //
paySign: data.pay_sign //
},
function(res) {
console.log(res)
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使,
//res.err_msgok
}
}
);
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
} else {
onBridgeReady();
}
});
},
cancel() {
this.show = false;
},
close() {
this.show = false;
},
change(v) {
console.log("change :", v)
this.amount = v
},
hide() {
},
checkMoney(val) {
//
var rechargeMoney = val;
var reg = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
if (rechargeMoney == "") {
return false;
} else if (rechargeMoney.trim() == "") {
return false;
} else if (!reg.test(rechargeMoney)) {
return false;
} else if (rechargeMoney == 0) {
return false;
} else {
return true;
}
},
showDetail() {
console.log("showDetail")
}
},
showDetail(){
console.log("showDetail")
}
}
}
}
</script>
<style lang="scss">
.uni-page-body {
background: #ededed;
}
.pam-content {
padding-top: 50rpx;
padding-left: 30rpx;
padding-right: 30rpx;
.uni-page-body {
background: #ededed;
}
.pam-shop {
display: flex;
justify-content: space-between;
.pam-content {
padding-top: 50rpx;
padding-left: 30rpx;
padding-right: 30rpx;
.pam-mess {
.pam-shop {
display: flex;
height: 110rpx;
justify-content: space-between;
.picon {
width: 110rpx;
.pam-mess {
display: flex;
height: 110rpx;
}
.pam-address {
margin-left: 20rpx;
.pname {
margin-top: 15rpx;
color: #454545;
font-size: 32rpx;
line-height: 1.5;
font-weight: bold;
.picon {
width: 110rpx;
height: 110rpx;
}
.paddre {
margin-top: 5rpx;
color: #666;
font-size: 24rpx;
line-height: 1.5;
.pam-address {
margin-left: 20rpx;
.pname {
margin-top: 15rpx;
color: #454545;
font-size: 32rpx;
line-height: 1.5;
font-weight: bold;
}
.paddre {
margin-top: 5rpx;
color: #666;
font-size: 24rpx;
line-height: 1.5;
}
}
}
}
.pam-local {
width: 30rpx;
height: 36rpx;
margin-top: 60rpx;
}
}
.pam-main {
margin-top: 97rpx;
padding-top: 30rpx;
height: 380rpx;
background: #fff;
box-sizing: border-box;
.pm-title {
padding-left: 40rpx;
color: #454545;
font-size: 30rpx;
line-height: 1.5;
.pam-local {
width: 30rpx;
height: 36rpx;
margin-top: 60rpx;
}
}
.pfooter {
margin-top: 60rpx;
padding-left: 40rpx;
padding-top: 40rpx;
color: #666;
font-size: 24rpx;
line-height: 1.5;
}
.pam-main {
margin-top: 97rpx;
padding-top: 30rpx;
height: 380rpx;
background: #fff;
box-sizing: border-box;
.u-border-bottom,
.u-border-top {
border-color: #eee !important;
}
.pm-title {
padding-left: 40rpx;
color: #454545;
font-size: 30rpx;
line-height: 1.5;
}
.pm-write {
display: flex;
height: 60rpx;
padding-left: 40rpx;
margin-top: 70rpx;
.pfooter {
margin-top: 60rpx;
padding-left: 40rpx;
padding-top: 40rpx;
color: #666;
font-size: 24rpx;
line-height: 1.5;
}
.font {
height: 60rpx;
line-height: 60rpx;
font-size: 30rpx;
color: #454545;
font-weight: bold;
.u-border-bottom,
.u-border-top {
border-color: #eee !important;
}
.num {
margin-left: 20rpx;
line-height: 60rpx;
.pm-write {
display: flex;
height: 60rpx;
padding-left: 40rpx;
margin-top: 70rpx;
.pr-num {
font-size: 68rpx;
line-height: 70rpx;
min-height: 70rpx;
height: 70rpx;
.font {
height: 60rpx;
line-height: 60rpx;
font-size: 30rpx;
color: #454545;
font-weight: bold;
}
.num {
margin-left: 20rpx;
line-height: 60rpx;
height: 60rpx;
.pr-num {
font-size: 68rpx;
line-height: 70rpx;
min-height: 70rpx;
height: 70rpx;
color: #454545;
}
}
}
}
}
.pac-cont {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.pac-left {
.pac-cont {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.pcfont {
font-size: 24rpx;
color: #666;
height: 30rpx;
line-height: 30rpx;
}
.pac-left {
display: flex;
.pcline {
height: 28rpx;
width: 2rpx;
margin-left: 20rpx;
background: #ccc;
.pcfont {
font-size: 24rpx;
color: #666;
height: 30rpx;
line-height: 30rpx;
}
.pcline {
height: 28rpx;
width: 2rpx;
margin-left: 20rpx;
background: #ccc;
}
.pc-aplay {
padding-left: 40rpx;
margin-left: 20rpx;
font-size: 24rpx;
height: 30rpx;
line-height: 30rpx;
color: #999;
background: url(../../static/page/aplay.png) no-repeat left center;
background-size: 30rpx 30rpx;
}
}
.pc-aplay {
padding-left: 40rpx;
margin-left: 20rpx;
.pac-link {
color: #1783FF;
font-size: 24rpx;
height: 30rpx;
line-height: 30rpx;
color: #999;
background: url(../../static/page/aplay.png) no-repeat left center;
background-size: 30rpx 30rpx;
cursor: pointer;
}
}
.pac-link {
color: #1783FF;
font-size: 24rpx;
height: 30rpx;
line-height: 30rpx;
cursor: pointer;
}
}
.pac-list {
display: flex;
display: none;
justify-content: space-between;
position: absolute;
width: 100%;
left: 0;
right: 0;
bottom: 0;
padding: 14rpx;
height: 415rpx;
background: #f7f7f7;
box-sizing: border-box;
.pl-left {
width: 537rpx;
}
.p-num {
.pac-list {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
margin: 0;
border: none;
border-radius: 5rpx;
background: #fff;
font-size: 18px;
color: #454545;
font-weight: bold;
display: none;
justify-content: space-between;
position: absolute;
width: 100%;
left: 0;
right: 0;
bottom: 0;
padding: 14rpx;
height: 415rpx;
background: #f7f7f7;
box-sizing: border-box;
.pl-left {
width: 537rpx;
}
&:after {
.p-num {
display: flex;
justify-content: center;
align-items: center;
height: 88rpx;
margin: 0;
border: none;
border-radius: 5rpx;
background: #fff;
font-size: 18px;
color: #454545;
font-weight: bold;
&:after {
border: none;
}
}
}
.pleft-num {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.pleft-num {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.p-num {
width: 170rpx;
.p-num {
width: 170rpx;
&.p-mar {
margin-top: 14rpx;
&.p-mar {
margin-top: 14rpx;
}
}
}
}
.pleft-btom {
display: flex;
justify-content: space-between;
margin-top: 14rpx;
.pleft-btom {
display: flex;
justify-content: space-between;
margin-top: 14rpx;
.p-num {
width: 170rpx;
}
.p-num {
width: 170rpx;
}
.pu-zero {
width: 354rpx;
margin-right: 14rpx;
.pu-zero {
width: 354rpx;
margin-right: 14rpx;
}
}
}
.pl-right {
width: 170rpx;
.pl-right {
width: 170rpx;
.pr-del {
background: #fff url(../../static/page/del.png) no-repeat center center;
background-size: 48rpx 34rpx;
}
.pr-del {
background: #fff url(../../static/page/del.png) no-repeat center center;
background-size: 48rpx 34rpx;
}
.pr-sure {
flex: 1;
height: 290rpx;
margin-top: 14rpx;
color: #caf2d8;
background: #ace4c1;
.pr-sure {
flex: 1;
height: 290rpx;
margin-top: 14rpx;
color: #caf2d8;
background: #ace4c1;
}
}
}
}
}
</style>

34
agentApp/pages/user-login/index.vue

@ -0,0 +1,34 @@
<template>
<view class="app-container">
登录中...
</view>
</template>
<script>
export default {
data() {
return {
};
},
onLoad(q) {
let payment_code = q.payment_code;
let user_token = q.token;
if (!payment_code || !user_token) {
uni.showToast({
title:'缺少参数',
icon:'none'
})
return;
}
uni.setStorageSync('user_token', user_token);
uni.setStorageSync('payment_code', payment_code);
uni.redirectTo({
url:'/pages/payment/payment'
})
}
}
</script>

696
agentApp/pages/user-orders/user-orders.vue

@ -1,352 +1,394 @@
<template>
<view class="app-container" style="background-color: #f7f7f7;">
<view class="app-container" style="background-color: #f7f7f7;">
<view class="page-bg">
<view class="withdrawal-management">
<navigator hover-class="none" url="/pages/withdrawal-management/withdrawal-management">
<button class="withdrawal-button">提现管理</button>
</navigator>
</view>
<view class="withdrawal-limit">
<view class="limit-symbol"></view>
<view class="withdrawal-volume">458.00</view>
</view>
<view class="Withdrawable-text">可提现</view>
<view class="withdrawal-content">
<image class="withdrawal-line" src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/withdrawal-line.png" />
</view>
<view class="to-be-credited">待入账200.00</view>
<view class="divider-style"></view>
<view class="information-id-content">
<view class="content-id-item">
<view class="id-text">
用户ID
<view class="page-bg">
<view class="withdrawal-management">
<navigator hover-class="none" url="/pages/withdrawal-management/withdrawal-management">
<button class="withdrawal-button">提现管理</button>
</navigator>
</view>
<view class="id-value">
54568gh
<view class="withdrawal-limit">
<view class="limit-symbol"></view>
<view class="withdrawal-volume">{{accountInfo.wallet_balance}}</view>
</view>
</view>
</view>
<view class="Withdrawable-text">可提现</view>
<view class="withdrawal-content">
<image class="withdrawal-line"
src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/withdrawal-line.png" />
</view>
<view class="to-be-credited">待入账{{accountInfo.waiting_amount}}</view>
<view class="divider-style"></view>
<view class="information-id-content">
<view class="content-id-item">
<view class="id-text">
用户ID
</view>
<view class="id-value">
{{accountInfo.id}}
</view>
</view>
</view>
<view class="queuing-information-content">
<view class="recent-orders-title">
<image class="title-stlye" src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/title-stlye.png" />
<view class="title-text">最近排队信息</view>
</view>
<view class="information-item">
<view class="item-content">
<view class="item-content-titie">李姐烧烤普罗旺斯店</view>
<view class="item-content-text">购买时排队<span class="style-text">10</span>当前<span class="style-text">2</span></view>
</view>
<view class="item-content">
<view class="item-content-titie">李姐烧烤青秀万达店</view>
<view class="item-content-text">购买时排队<span class="style-text">200</span>当前<span class="style-text">48</span></view>
</view>
<navigator hover-class="none" url="/pages/queuing-information/queuing-information">
<view class="see-more-content">
<view class="see-more-text">查看更多</view>
<view class="see-more-icon"></view>
</view>
</navigator>
</view>
</view>
<view class="ordering-information">
<view class="ordering-information-item">
<view class="order-number">订单编号 22398983498</view>
<view class="ordering-item-content">
<view class="ordering-pic">
<image class="order-chart" src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/order-chart.png" />
</view>
<view class="ordering-text">
<view class="ordering-text-title">李姐烧烤(普罗旺斯店)</view>
<view class="amount-of-money">金额<span class="price-style">450.00</span></view>
<view class="order-time">订单时间2023-10-24 20:39:56</view>
</view>
</view>
</view>
<view class="ordering-information-item">
<view class="order-number">订单编号 22398983498</view>
<view class="ordering-item-content">
<view class="ordering-pic">
<image class="order-chart" src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/order-chart.png" />
</view>
<view class="ordering-text">
<view class="ordering-text-title">李姐烧烤(普罗旺斯店)</view>
<view class="amount-of-money">金额<span class="price-style">450.00</span></view>
<view class="order-time">订单时间2023-10-24 20:39:56</view>
</view>
</view>
</view>
<view class="ordering-information-item">
<view class="order-number">订单编号 22398983498</view>
<view class="ordering-item-content">
<view class="ordering-pic">
<image class="order-chart" src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/order-chart.png" />
</view>
<view class="ordering-text">
<view class="ordering-text-title">李姐烧烤(普罗旺斯店)</view>
<view class="amount-of-money">金额<span class="price-style">450.00</span></view>
<view class="order-time">订单时间2023-10-24 20:39:56</view>
</view>
</view>
</view>
</view>
<view class="queuing-information-content">
<view class="recent-orders-title">
<image class="title-stlye"
src="https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/title-stlye.png" />
<view class="title-text">最近排队信息</view>
</view>
<view class="information-item">
<view class="item-content" v-if="!queueList.length">
<view class="item-content-text">暂无排队</view>
</view>
<view class="item-content" v-for="item in queueList" :key="item.id">
<view class="item-content-titie">{{item.merchant.name}}</view>
<view class="item-content-text">购买时排队<span class="style-text">{{item.buy_queue_index}}</span>当前<span
class="style-text">{{item.now_queue_index}}</span>
</view>
</view>
<navigator hover-class="none" url="/pages/queuing-information/queuing-information">
<view class="see-more-content">
<view class="see-more-text">查看更多</view>
<view class="see-more-icon"></view>
</view>
</navigator>
</view>
</view>
<view class="ordering-information">
<view class="ordering-information-item" v-if="!orderList.length">
<view class="order-number">暂无订单</view>
</view>
<view class="ordering-information-item" v-for="order in orderList" :key="order.out_trade_no">
<view class="order-number">订单编号 {{order.out_trade_no}}</view>
<view class="ordering-item-content">
<view class="ordering-pic">
<image class="order-chart" :src="order.merchant.logo" />
</view>
<view class="ordering-text">
<view class="ordering-text-title">{{order.merchant.name}}</view>
<view class="amount-of-money">金额<span class="price-style">{{order.amount}}</span></view>
<view class="order-time">订单时间{{order.paid_at}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
userAccountInfo,
userQueueRebateList,
userOrderList
} from '../../common/api.js'
export default {
data() {
return {
accountInfo: {},
queueList: [],
orderList: []
}
},
onLoad() {
this.getAccountInfo();
this.getQueueList();
this.getOrderList();
},
methods: {
getAccountInfo() {
userAccountInfo().then(data => this.accountInfo = data)
},
getQueueList() {
userQueueRebateList({
page: 1,
page_size: 2,
status: 0,
sort_type: 1
}).then(data => this.queueList = data.list)
},
getOrderList() {
userOrderList({
page: 1,
page_size: 5
}).then(data => this.orderList = data.list)
},
}
}
</script>
<style>
.uni-page-body {
background: #f7f7f7;
}
.page-bg{
height: 525rpx;
background: url("https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/withdrawal-bg.png") no-repeat center center;
background-size:cover;
padding: 0 30rpx;
}
.withdrawal-management{
position: absolute;
top: 0;
right: 0;
}
button.withdrawal-button{
width: 160rpx;
height: 60rpx;
line-height: 60rpx;
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
background: #FCC565;
margin: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 30rpx;
}
button::after{
border: none;
}
.withdrawal-limit{
display: flex;
justify-content: center;
align-items: baseline;
padding-top: 30rpx;
text-align: center;
}
.limit-symbol{
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
}
.withdrawal-volume{
font-family: "Din";
font-size: 60rpx;
color: #fff;
font-weight: bold;
margin-left: 10rpx;
}
.Withdrawable-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
text-align: center;
margin-top: 10rpx;
}
.withdrawal-content{
display: flex;
justify-content: center;
align-items: center;
padding: 15rpx 0;
}
image.withdrawal-line{
text-align: center;
width: 200rpx;
height: 1rpx;
background-size: cover;
}
.to-be-credited{
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
text-align: center;
}
.divider-style{
width: 690rpx;
height: 1rpx;
background: #F8A0A6;
margin: 20rpx 0;
}
.information-id-content{
display: flex;
justify-content: center;
align-items: center;
}
.content-id-item{
display: flex;
justify-content: center;
align-items: center;
}
.id-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.id-value{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.queuing-information-content{
background: #fff;
border-radius: 20rpx;
padding: 30rpx 0;
margin-top: 30rpx;
}
.recent-orders-title {
display: flex;
justify-content: left;
align-items: center;
padding: 0 30rpx;
border-bottom: 1rpx solid #eeeeee;
padding-bottom: 30rpx;
}
image.title-stlye {
width: 15rpx;
height: 19rpx;
background-size: cover;
margin-right: 20rpx;
}
.title-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #454545;
font-weight: bold;
}
.information-item{
padding: 0 30rpx;
}
.item-content{
display: flex;
justify-content: left;
align-items: center;
margin-top: 30rpx;
}
.item-content-titie{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #454545;
font-weight: bold;
}
.item-content-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #666;
}
span.style-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
font-weight: bold;
padding: 0 15rpx;
}
.see-more-content{
display: flex;
justify-content: center;
align-items: center;
margin-top: 30rpx;
}
.see-more-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
}
.see-more-icon{
width: 0;
height: 0;
border-left: 14rpx solid #FDD5D8;
border-top: 14rpx solid transparent;
border-bottom: 14rpx solid transparent;
margin-left: 10rpx;
border-radius: 10rpx;
}
.ordering-information{
padding: 30rpx;
background: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding-top: 0;
}
.order-number {
font-family: PingFangSC-Regular, sans-serif;
font-size: 26rpx;
color: #454545;
padding: 30rpx 0;
}
.ordering-pic {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
image.order-chart {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
.ordering-text {
margin-left: 30rpx;
}
.ordering-text-title {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #454545;
}
.amount-of-money {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
padding: 10rpx 0;
}
span.price-style {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
}
.order-time {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
}
.ordering-item-content{
display: flex;
justify-content: left;
align-items: center;
border-bottom: 1rpx solid #eee;
padding-bottom: 30rpx;
}
.uni-page-body {
background: #f7f7f7;
}
.page-bg {
height: 525rpx;
background: url("https://common-1257637852.cos.ap-guangzhou.myqcloud.com/paidui-pay/withdrawal-bg.png") no-repeat center center;
background-size: cover;
padding: 0 30rpx;
}
.withdrawal-management {
position: absolute;
top: 0;
right: 0;
}
button.withdrawal-button {
width: 160rpx;
height: 60rpx;
line-height: 60rpx;
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
background: #FCC565;
margin: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 30rpx;
}
button::after {
border: none;
}
.withdrawal-limit {
display: flex;
justify-content: center;
align-items: baseline;
padding-top: 30rpx;
text-align: center;
}
.limit-symbol {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
}
.withdrawal-volume {
font-family: "Din";
font-size: 60rpx;
color: #fff;
font-weight: bold;
margin-left: 10rpx;
}
.Withdrawable-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
text-align: center;
margin-top: 10rpx;
}
.withdrawal-content {
display: flex;
justify-content: center;
align-items: center;
padding: 15rpx 0;
}
image.withdrawal-line {
text-align: center;
width: 200rpx;
height: 1rpx;
background-size: cover;
}
.to-be-credited {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
text-align: center;
}
.divider-style {
width: 690rpx;
height: 1rpx;
background: #F8A0A6;
margin: 20rpx 0;
}
.information-id-content {
display: flex;
justify-content: center;
align-items: center;
}
.content-id-item {
display: flex;
justify-content: center;
align-items: center;
}
.id-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.id-value {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.queuing-information-content {
background: #fff;
border-radius: 20rpx;
padding: 30rpx 0;
margin-top: 30rpx;
}
.recent-orders-title {
display: flex;
justify-content: left;
align-items: center;
padding: 0 30rpx;
border-bottom: 1rpx solid #eeeeee;
padding-bottom: 30rpx;
}
image.title-stlye {
width: 15rpx;
height: 19rpx;
background-size: cover;
margin-right: 20rpx;
}
.title-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #454545;
font-weight: bold;
}
.information-item {
padding: 0 30rpx;
}
.item-content {
display: flex;
justify-content: left;
align-items: center;
margin-top: 30rpx;
}
.item-content-titie {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #454545;
font-weight: bold;
}
.item-content-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #666;
}
span.style-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
font-weight: bold;
padding: 0 15rpx;
}
.see-more-content {
display: flex;
justify-content: center;
align-items: center;
margin-top: 30rpx;
}
.see-more-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
}
.see-more-icon {
width: 0;
height: 0;
border-left: 14rpx solid #FDD5D8;
border-top: 14rpx solid transparent;
border-bottom: 14rpx solid transparent;
margin-left: 10rpx;
border-radius: 10rpx;
}
.ordering-information {
padding: 30rpx;
background: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding-top: 0;
}
.order-number {
font-family: PingFangSC-Regular, sans-serif;
font-size: 26rpx;
color: #454545;
padding: 30rpx 0;
}
.ordering-pic {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
image.order-chart {
width: 120rpx;
height: 120rpx;
background-size: cover;
border-radius: 15rpx;
}
.ordering-text {
margin-left: 30rpx;
}
.ordering-text-title {
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #454545;
}
.amount-of-money {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
padding: 10rpx 0;
}
span.price-style {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #F52F3E;
}
.order-time {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #999;
}
.ordering-item-content {
display: flex;
justify-content: left;
align-items: center;
border-bottom: 1rpx solid #eee;
padding-bottom: 30rpx;
}
</style>

437
agentApp/pages/withdrawal-management/withdrawal-management.vue

@ -10,7 +10,7 @@
</view>
<view class="au-num">
458.00
{{accountInfo.wallet_balance}}
</view>
</view>
<view class="age-font">
@ -20,20 +20,20 @@
<img src="../../static/page/line-style.png" style="width: 200rpx;height: 2rpx;" alt="" srcset="" />
</view>
<view class="age-wait">
总提现500.00
总提现{{accountInfo.withdraw_total}}
</view>
<view class="age-linemore">
<img src="../../static/page/divider-style.png" style="width: 690rpx;height: 2rpx;" alt="" srcset="" />
</view>
<div class="age-mnum">
<view class="mtext">
待入账1000
待入账{{accountInfo.waiting_amount}}
</view>
<view class="mline">
</view>
<view class="mtext">
提现中458
提现中{{accountInfo.withdrawing_amount}}
</view>
</div>
</view>
@ -44,179 +44,360 @@
支付宝账户
</view>
</view>
<view class="agp-detail">
<view class="agp-make" @click="makecash">
<view class="agp-detail" v-if="!accountInfo.alipay_account">
<view class="agp-make" @click="showInputForm(1)">
去开通
</view>
</view>
</view>
<template v-if="isInputForm">
<view class="apt-main u-border-top u-border-bottom" v-if="isInputForm">
<view class="apm-cell">
<view class="am-title">
支付宝账号
</view>
<view class="am-value" style="width:70%;">
<u--input placeholder="绑定的手机号或邮箱" border="surround" v-model="inputAlipayAccount"></u--input>
</view>
</view>
<view class="apm-cell">
<view class="am-title">
支付宝姓名
</view>
<view class="am-value" style="width:70%;">
<u--input placeholder="账号真实姓名" border="surround" v-model="inputAlipayName"></u--input>
</view>
</view>
</view>
<view class="apt-btn">
<view class="savebtn" @click="saveAlipayAccount">
保存
</view>
</view>
</template>
<template v-if="accountInfo.alipay_account && !isInputForm">
<view class="apt-main u-border-top u-border-bottom">
<view class="apm-cell">
<view class="am-title">
提现账户
</view>
<view class="am-value">
<view class="mphone">
{{accountInfo.alipay_account}}
</view>
<view class="mlink" @click="showInputForm(2)">
修改
</view>
</view>
</view>
<view class="apm-cell">
<view class="am-title">
可提现金额
</view>
<view class="am-value">
<view class="mnum">
{{accountInfo.wallet_balance}}
</view>
</view>
</view>
</view>
<view class="apt-btn">
<view class="cashbtn" @click="showWithdrawForm">
提现
</view>
</view>
</template>
</view>
</view>
<u-modal title="确认提现金额" :show="isWithdrawForm" :showCancelButton="true" @confirm="confirmWithdraw" @cancel="isWithdrawForm=false">
<view class="slot-content">
<u--input prefixIcon="¥" placeholder="提现金额" border="surround" v-model="withdrawAmount"></u--input>
</view>
</u-modal>
</view>
</template>
<script>
export default {
data() {
return {
import {
userAccountInfo,
userFillAlipayAccount,
userWithdraw
} from '../../common/api.js'
}
},
methods: {
makecash() {
uni.navigateTo({
url: '/pages/account-opened/account-opened'
});
export default {
data() {
return {
accountInfo: {},
isInputForm: false,
inputAlipayAccount: '',
inputAlipayName: '',
isWithdrawForm: false,
withdrawAmount: ''
}
},
onLoad() {
this.getAccountInfo();
},
cashManager() {
uni.navigateTo({
url: '/pages/withdrawal-history/withdrawal-history'
});
methods: {
getAccountInfo() {
userAccountInfo().then(data => this.accountInfo = data)
},
saveAlipayAccount() {
userFillAlipayAccount({
alipay_account: this.inputAlipayAccount,
alipay_name: this.inputAlipayName,
}).then(() => {
this.getAccountInfo()
this.isInputForm = false
})
},
showInputForm(flag) {
this.isInputForm = true
if (flag == 2) {
this.inputAlipayAccount = this.accountInfo.alipay_account
this.inputAlipayName = this.accountInfo.alipay_name
}
// uni.navigateTo({
// url: '/pages/account-opened/account-opened'
// });
},
showWithdrawForm() {
this.isWithdrawForm = true
this.withdrawAmount = this.accountInfo.wallet_balance
},
confirmWithdraw() {
userWithdraw({
amount: this.accountInfo.wallet_balance
}).then(() => {
this.isWithdrawForm = false
})
},
cashManager() {
uni.navigateTo({
url: '/pages/withdrawal-history/withdrawal-history'
});
}
}
}
}
</script>
<style lang="scss">
.uni-page-body {
background:#f7f7f7;
}
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
background: url(../../static/page/merchant-account-opening-bg.png) no-repeat top center;
background-size: 100% 414rpx;
box-sizing: border-box;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
box-sizing: border-box;
cursor: pointer;
background: #f7f7f7;
}
.agent-top {
text-align: center;
padding-top: 40rpx;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
color: #fff;
.au-font {
margin-top: 40rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 1.5;
}
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
.au-num {
font-size: 30px;
font-weight: bold;
}
}
background: url(../../static/page/merchant-account-opening-bg.png) no-repeat top center;
background-size: 100% 414rpx;
box-sizing: border-box;
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
box-sizing: border-box;
cursor: pointer;
}
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
.agent-top {
text-align: center;
padding-top: 40rpx;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
color: #fff;
.au-font {
margin-top: 40rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 1.5;
}
img {
display: block;
margin: 0 auto;
.au-num {
font-size: 30px;
font-weight: bold;
}
}
}
.age-wait {
margin-top: 20rpx;
color: #fff;
font-size: 14px;
}
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
color: #fff;
}
.age-linemore {}
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
.age-mnum {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
img {
display: block;
margin: 0 auto;
}
}
.mtext {
.age-wait {
margin-top: 20rpx;
color: #fff;
font-size: 14px;
margin: 0 20rpx;
line-height: 1.5;
}
.mline {
height: 28rpx;
width: 2rpx;
background: #F86E78;
.age-linemore {}
.age-mnum {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
.mtext {
color: #fff;
font-size: 14px;
margin: 0 20rpx;
line-height: 1.5;
}
.mline {
height: 28rpx;
width: 2rpx;
background: #F86E78;
}
}
}
}
.ag-paylist {
padding-left: 30rpx;
padding-right: 30rpx;
margin-top: 36rpx;
background: #fff;
.ag-paylist {
padding-left: 30rpx;
padding-right: 30rpx;
margin-top: 36rpx;
background: #fff;
.agp-item {
display: flex;
justify-content: space-between;
height: 100rpx;
.agp-item {
display: flex;
justify-content: space-between;
height: 100rpx;
.agp-title {
.agp-title {
.zhifubao {
padding-left: 55rpx;
height: 100rpx;
line-height: 100rpx;
color: #454545;
font-size: 14px;
font-weight: bold;
background: url(../../static/page/payment-icon.png) no-repeat left center;
background-size: 40rpx 40rpx;
.zhifubao {
padding-left: 55rpx;
height: 100rpx;
line-height: 100rpx;
color: #454545;
font-size: 14px;
font-weight: bold;
background: url(../../static/page/payment-icon.png) no-repeat left center;
background-size: 40rpx 40rpx;
}
}
.agp-detail {
.agp-make {
padding-right: 30rpx;
height: 100rpx;
line-height: 100rpx;
color: #999;
font-size: 12px;
background: url(../../static/page/open-icon.png) no-repeat right center;
background-size: 14rpx 24rpx;
cursor: pointer;
}
}
}
}
.apt-main {
padding: 10rpx 0;
.agp-detail {
.apm-cell {
display: flex;
justify-content: space-between;
.agp-make {
padding-right: 30rpx;
height: 100rpx;
line-height: 100rpx;
color: #999;
.am-title {
height: 70rpx;
line-height: 70rpx;
color: 454545;
font-size: 12px;
background: url(../../static/page/open-icon.png) no-repeat right center;
background-size: 14rpx 24rpx;
cursor: pointer;
}
.am-value {
display: flex;
justify-content: flex-end;
height: 70rpx;
line-height: 70rpx;
.mphone {
margin-right: 20rpx;
font-size: 12px;
color: #454545;
}
.mlink {
font-size: 12px;
color: #32A2FC;
}
.mnum {
font-size: 14px;
color: 454545;
font-weight: bold;
}
}
}
}
.u-border-bottom,
.u-border-top {
border-color: #eee !important;
}
.apt-btn {
display: flex;
justify-content: flex-end;
padding: 30rpx 0;
.cashbtn {
width: 110rpx;
height: 48rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 12px;
background: #F52F3E;
border-radius: 100rpx;
}
.savebtn {
width: 110rpx;
height: 48rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 12px;
background: #00aaff;
border-radius: 100rpx;
}
}
}
}
</style>

18
agentApp/template.h5.html

@ -7,17 +7,19 @@
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<% if (process.env.NODE_ENV == 'production') { %>
<!-- 正式发布的时候使用,开发期间不启用。↓ -->
<script src="/static/common/js/touch-emulator.js"></script>
<script src="/static/common/js/touch-emulator.js"></script>
<script>
TouchEmulator();
TouchEmulator();
</script>
<style>
::-webkit-scrollbar{
display: none;
}
</style>
<!-- 正式发布的时候使用,开发期间不启用。↑ -->
<style>
::-webkit-scrollbar {
display: none;
}
</style>
<!-- 正式发布的时候使用,开发期间不启用。↑ -->
<% } %>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'

Loading…
Cancel
Save