Skip to content

Commit 8915f46

Browse files
author
myxingke
committed
小修改
1 parent 39027b1 commit 8915f46

File tree

7 files changed

+210
-43
lines changed

7 files changed

+210
-43
lines changed
3.26 KB
Loading
1.04 KB
Loading

src/module/merchant/assets/style/expense/account.less

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
top: 18px;
4949
color: #FFFFFF;
5050

51-
button>span {
51+
button > span {
5252
color: #FFFFFF;
5353
}
5454
}
@@ -147,3 +147,18 @@
147147
align-items: center
148148
}
149149
}
150+
151+
.withdraw-tips {
152+
font-size: 14px;
153+
154+
p {
155+
height: 30px;
156+
}
157+
158+
.withdraw-money {
159+
display: flex;
160+
flex-direction: row;
161+
height: 40px;
162+
line-height: 40px;
163+
}
164+
}

src/module/merchant/assets/style/public/bind.less

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939

4040
.footer {
41-
height: 110px;
41+
height: auto;
4242
width: 100%;
4343
margin-top: 20px;
4444
padding-top: 20px;
@@ -51,13 +51,105 @@
5151
text-align: center
5252
}
5353

54-
.button {
54+
.auth-button {
5555
text-align: center;
5656
margin-top: 25px;
57+
58+
.button-green {
59+
display: inline-block;
60+
height: 50px;
61+
line-height: 50px;
62+
background-color: #5fbf31;
63+
font-size: 16px;
64+
color: #fff;
65+
padding: 0 15px;
66+
-webkit-border-radius: 3px;
67+
-moz-border-radius: 3px;
68+
border-radius: 3px;
69+
text-align: center;
70+
min-width: 200px;
71+
}
72+
73+
.button-green:before {
74+
content: "";
75+
display: inline-block;
76+
width: 35px;
77+
height: 29px;
78+
background: url(../../images/weixin-logo.png) no-repeat;
79+
margin-right: 8px;
80+
vertical-align: middle;
81+
}
5782
}
5883
}
5984
}
6085

6186
.red {
6287
color: #db4d4d;
6388
}
89+
90+
.auth-intros {
91+
margin-top: 30px;
92+
margin-bottom: 50px;
93+
border: 1px solid #e0e0e0;
94+
border-radius: 3px;
95+
position: relative;
96+
97+
h4 {
98+
position: relative;
99+
background: #FFFFFF;
100+
position: absolute;
101+
top: -10px;
102+
left: 50%;
103+
margin-left: -95px;
104+
font-size: 14px;
105+
padding: 0 20px;
106+
color: #999;
107+
}
108+
109+
ul {
110+
padding: 40px 0;
111+
overflow: hidden;
112+
113+
li {
114+
float: left;
115+
width: 33%;
116+
text-align: center;
117+
118+
dt {
119+
font-size: 16px;
120+
}
121+
122+
dd {
123+
color: #999;
124+
}
125+
}
126+
127+
li:before {
128+
content: "";
129+
width: 91px;
130+
height: 91px;
131+
display: inline-block;
132+
margin-bottom: 10px;
133+
background: url(../../images/auth-icons.png) no-repeat;
134+
opacity: 0.5;
135+
filter: "alpha(opacity=50)";
136+
filter: alpha(opacity=50);
137+
}
138+
139+
li.free:before {
140+
background-position: 0 -91px;
141+
height: 90px;
142+
margin-bottom: 9px;
143+
}
144+
145+
li.safe:before {
146+
background-position: 0 -181px;
147+
height: 90px;
148+
margin-bottom: 9px;
149+
}
150+
}
151+
}
152+
153+
.fn-clear {
154+
zoom: 1;
155+
}

src/module/merchant/pages/expense/account.vue

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="usage">
99
<span>{{merchant.balance}}<span class="unit">&nbsp;元</span></span>
1010
<div class="withdraw">
11-
<Button type="primary" size="small">提现</Button>
11+
<Button type="primary" size="small" @click="withdraw = true">提现</Button>
1212
</div>
1313
</div>
1414
</div>
@@ -42,9 +42,7 @@
4242
<div class="option-box">
4343
<Radio-group v-model="money">
4444
<Radio :label="item" style="padding: 5px 10px;" v-for="(item, index) of configs.amounts" :key="index">{{item}}元</Radio>
45-
<Radio label="0" style="padding: 5px 10px;"><Input v-model="customize_money"
46-
placeholder="请输入充值金额"
47-
style="width: 120px"></Input>&nbsp;&nbsp;
45+
<Radio label="0" style="padding: 5px 10px;"><Input v-model="customize_money" @on-focus="money = 0" placeholder="请输入充值金额" style="width: 120px"></Input>&nbsp;&nbsp;
4846
</Radio>
4947
</Radio-group>
5048
</div>
@@ -58,7 +56,7 @@
5856
<span>线下汇款</span>
5957
</div>
6058
<div class="explain">
61-
<Table stripe :columns="columns1" :data="configs.banks"></Table>
59+
<Table stripe :columns="columns" :data="configs.banks"></Table>
6260
<div class="well">
6361
<h5>线下汇款处理说明</h5>
6462
<div v-html="configs.desc" style="line-height: 28px;"></div>
@@ -88,6 +86,26 @@
8886
<!--<Button type="error" size="large" long :loading="modal_loading" @click="del">删除</Button>-->
8987
</div>
9088
</Modal>
89+
90+
<Modal v-model="withdraw" width="480">
91+
<p slot="header" style="color:#f60;text-align:center">
92+
<Icon type="information-circled"></Icon>
93+
<span>提现确认</span>
94+
</p>
95+
<div class="withdraw-tips">
96+
<p>您目前有 <span style="color: orangered; font-weight: bold;">{{merchant.balance}}</span> 元,可提现!</p>
97+
<p>对于提现操作我们将收取 1% 的手续费用!</p>
98+
<p>提现后我们会在3个工作日内转到你的支付宝或银行帐号。</p>
99+
<p class="withdraw-money">
100+
<span>提现金额:</span>
101+
<span><Input v-model="withdrawForm.money" placeholder="请输入您要提现的金额..." @on-change="validateMoney" style="width: 300px"></Input></span>
102+
</p>
103+
</div>
104+
<div slot="footer">
105+
<Button type="ghost" size="large" @click="withdraw = false">取消</Button>
106+
<Button type="info" size="large">确认</Button>
107+
</div>
108+
</Modal>
91109
</div>
92110
</template>
93111

@@ -103,14 +121,15 @@
103121
customize_money: '',
104122
//确认充值modal
105123
recharge_confirm_modal: false,
124+
//提现modal
125+
withdraw: false,
106126
type1: true,
107127
type2: false,
108128
configs: {
109129
banks: [],
110130
pay_type: {}
111131
},
112-
113-
columns1: [
132+
columns: [
114133
{
115134
title: '开户名',
116135
key: 'payee'
@@ -123,7 +142,11 @@
123142
title: '银行帐号',
124143
key: 'account'
125144
}
126-
]
145+
],
146+
//提现表单
147+
withdrawForm: {
148+
money: ''
149+
}
127150
}
128151
},
129152
methods: {
@@ -175,6 +198,26 @@
175198
}).catch((err) => {
176199
this.$Message.error(err);
177200
})
201+
},
202+
//表单金额变化时
203+
validateMoney(e) {
204+
const reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
205+
if (!reg.test(this.withdrawForm.money)) {
206+
this.withdrawForm.money = '';
207+
this.$Message.error("提现金额不正确");
208+
return false;
209+
};
210+
211+
if(this.withdrawForm.money > this.merchant.balance) {
212+
this.withdrawForm.money = '';
213+
this.$Message.error("提现金额不能大于余额");
214+
return false;
215+
}
216+
217+
},
218+
//确认提现
219+
confirmWithdraw() {
220+
178221
}
179222
},
180223
mounted() {

src/module/merchant/pages/public/bind.vue

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,58 @@
11
<style src="../../assets/style/public/bind.less" lang="less" scoped></style>
22
<template>
3-
<Row class="bp203">
4-
<div class="auth-body">
5-
<div class="header">
6-
<div class="title" style="">
7-
一键授权绑定
8-
<span class="small-title">一键绑定后无需再手工绑定</span>
3+
<div>
4+
<Row class="bp203">
5+
<div class="auth-body">
6+
<div class="header">
7+
<div class="title" style="">
8+
一键授权绑定
9+
<span class="small-title">一键绑定后无需再手工绑定</span>
10+
</div>
911
</div>
10-
</div>
11-
<div class="content">
12-
<p>1、为了更好的服务目前我们只支持【已认证的订阅号】和【已认证的服务号】接入。暂不支持未认证的公众号接入,谢谢理解</p>
13-
<p>2、登陆微信公众平台,链接地址:<a class="red" href="https://mp.weixin.qq.com/" target="_blank">https://mp.weixin.qq.com/</a></p>
14-
<p>3、在<span class="red">【开发&gt;基本配置】</span>关闭服务器配置选项和取消其他同类第三方平台授权,以兔服务冲突</p>
15-
<p>4、请点击下方“<span class="red">一键授权绑定</span>”,<span class="red">扫描</span>显示的二维码</p>
16-
<p>5、关注您自己的微信公众号并发送“<span class="red">绑定平台</span>”四个字</p>
17-
<p>6、收到&nbsp;<span class="red">恭喜您已经成功绑定到无限智能的代码兔微信公众平台</span>&nbsp;说明绑定成功</p>
18-
<p>7、<span class="red">如果没有弹出打开新页面,请检查是否被拦截了</span></p>
19-
</div>
20-
<div class="footer">
21-
<div class="confirm">
22-
<i-switch v-model="isSwitch" @on-change="change">
23-
<span slot="open">是</span>
24-
<span slot="close">否</span>
25-
</i-switch>
26-
<span style="padding-left: 10px;">我已阅读上述绑定说明</span>
12+
<div class="content">
13+
<p>1、为了更好的服务目前我们只支持【已认证的订阅号】和【已认证的服务号】接入。暂不支持未认证的公众号接入,谢谢理解</p>
14+
<p>2、登陆微信公众平台,链接地址:<a class="red" href="https://mp.weixin.qq.com/" target="_blank">https://mp.weixin.qq.com/</a></p>
15+
<p>3、在<span class="red">【开发&gt;基本配置】</span>关闭服务器配置选项和取消其他同类第三方平台授权,以兔服务冲突</p>
16+
<p>4、请点击下方“<span class="red">一键授权绑定</span>”,<span class="red">扫描</span>显示的二维码</p>
17+
<p>5、关注您自己的微信公众号并发送“<span class="red">绑定平台</span>”四个字</p>
18+
<p>6、收到&nbsp;<span class="red">恭喜您已经成功绑定到无限智能的代码兔微信公众平台</span>&nbsp;说明绑定成功</p>
19+
<p>7、<span class="red">如果没有弹出打开新页面,请检查是否被拦截了</span></p>
2720
</div>
28-
<div class="button">
29-
<Button size="large" style="width: 200px;" :loading="loading" @click="bind">一键绑定授权</Button>
21+
<div class="footer">
22+
<div class="confirm">
23+
<i-switch v-model="isSwitch" @on-change="change">
24+
<span slot="open">是</span>
25+
<span slot="close">否</span>
26+
</i-switch>
27+
<span style="padding-left: 10px;">我已阅读上述绑定说明</span>
28+
</div>
29+
<div class="auth-button">
30+
<a href="javascript: void(0);" class="button-green" @click="bind">微信一键绑定授权</a>
31+
</div>
32+
3033
</div>
3134
</div>
35+
</Row>
3236

37+
<div class="auth-intros">
38+
<h4>什么是公众号登录授权?</h4>
39+
<ul class="fn-clear">
40+
<li class="grant">
41+
<dt>微信官方许可</dt>
42+
<dd>微信官方推出的授权登录模式</dd>
43+
</li>
44+
<li class="free">
45+
<dt>公众号免繁琐设置</dt>
46+
<dd>公众号运营者不再需要理解繁琐参数设置</dd>
47+
</li>
48+
<li class="safe">
49+
<dt>安全可靠的授权</dt>
50+
<dd>密码不提供给开发者,保证公众号安全</dd>
51+
</li>
52+
</ul>
3353
</div>
54+
55+
<!--弹出modal-->
3456
<Modal v-model="modal" width="360">
3557
<p slot="header" style="color:#f60;text-align:center">
3658
<Icon type="information-circled"></Icon>
@@ -44,7 +66,7 @@
4466
<Button type="success" size="large" long :loading="modalLoading" @click="confirm">确认授权成功</Button>
4567
</div>
4668
</Modal>
47-
</Row>
69+
</div>
4870
</template>
4971

5072
<script>
@@ -54,7 +76,6 @@
5476
return {
5577
isSwitch: false,
5678
type: 'default',
57-
loading: false,
5879
modal: false,
5980
modalLoading: false,
6081
}
@@ -74,11 +95,7 @@
7495
}
7596
window.open(Api.auth_call_back + "/merchants/public_signal/bind");
7697
this.$Message.success("请注意是否有打开新的授权页面");
77-
this.loading = true;
7898
this.modal = true;
79-
setTimeout(() => {
80-
this.loading = false
81-
}, 1000);
8299
},
83100
confirm() {
84101
this.modal_loading = true;

src/module/merchant/pages/setting/merchant.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!--<Tag color="blue">一级商户 todo 后面这个可能取消</Tag>-->
2323
</Form-item>
2424
<Form-item label="帐户余额">
25-
{{data.balance}} 元 <Tag color="blue">提现</Tag>
25+
{{data.balance}} 元
2626
</Form-item>
2727
<Form-item label="已消费金额">
2828
{{data.consume}} 元

0 commit comments

Comments
 (0)