1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<template>
<view class="bank">
<view
style="width: 100%; height: 25vh; color: #fff; text-align: center; margin-bottom: 10px; background-size: 100% 100%; background-position: center; background-repeat: no-repeat; display: flex; align-items: center; justify-content: center;">
<view
style="width: 60px; height: 60px; background-image: url('static/wx4.png'); background-size: 100% 100%; background-position: center; background-repeat: no-repeat;">
</view>
</view>
<view class="addbank">
<view class="content">
<view class="item">
<text>授权人姓名</text>
<input class="inp" v-model="xsName" type="text" placeholder="请输入您的真实姓名" :disabled="bd"
style="background-color: #f7f7f7; text-align: left;" />
</view>
<view class="item">
<text>授权人身份证</text>
<input class="inp" v-model="xsId" type="text" placeholder="请输入您的身份证号" :disabled="bd"
style="background-color: #f7f7f7; text-align: left;" />
</view>
<view style="width: 90%;margin-left: 5%;">注:所填的资料请于金砖世界银行账户登记的实名信息一致,否则不予通过</view>
</view>
</view>
<!-- 第一个 view: 没有数据时显示 -->
<view v-if="!bd" class="an"
style="width: 95%; margin: 40px auto; height: 40px; line-height: 40px; color: #fff; text-align: center; font-size: 20px; border-radius: 8px; background-image: url('../static/wx3.png'); background-size: 100% 100%; background-position: center; background-repeat: no-repeat;"
@click="add">
<!-- 这里可以是按钮的内容,比如“提交” -->
</view>
<!-- 第二个 view: 有数据时显示 -->
<view v-else class="an"
style="width: 95%; margin: 40px auto; height: 40px; line-height: 40px; color: #fff; text-align: center; font-size: 20px; border-radius: 8px; background-color:#00a3e8;"
@click="add">
成功绑定
</view>
<view style="width: 90%;margin-left: 5%;color: red;text-align: center;">绑定支付宝享受6大特权</view>
<view class="nav bgimg"
style=" width: 90%; height: 160px;margin-top: 10px;display: flex;flex-wrap: wrap;justify-content: center;margin-left: 20px; border-radius: 5px;">
<view @click="go4"
style="width: 33%;height: 50%; display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf1.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>扫码支付</view>
</view>
<view @click="gomc3123"
style="width: 33%;height: 50%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf5.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>JSAPI支付</view>
</view>
<view @click="gotx"
style="width: 33%;height: 50%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf6.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>小程序支付</view>
</view>
<view @click="gozijin"
style="width: 33%;height: 50%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf3.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>APP支付</view>
</view>
<view @click="go1"
style="width: 33%;height: 50%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf2.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>刷脸支付</view>
</view>
<view @click="go22"
style="width: 33%;height: 50%; display: flex;flex-direction: column;justify-content: center;align-items: center;">
<view
style="width: 35px;height: 35px; background-image: url('../../../static/zf4.png');background-size: 100% 100%; background-position: center; background-repeat: no-repeat;border-radius: 5px;margin-bottom: 5px;">
</view>
<view>刷掌支付</view>
</view>
</view>
<u-popup :show="show" @close="closepop" mode="center" closeable :round="10">
<view class="walletcontainer"
style=" width: 300px;height: 250px;border-radius: 10px;display: flex;justify-content: space-between;flex-direction: column;">
<!-- <view class="title" style="height: 50px;">
<view class="text"></view>
</view> -->
<view
style="display: flex;justify-content: center;align-items: center;width: 90%;font-size: 18px;margin:50px auto 0;">
卡片未激活,请先激活卡片
</view>
<view @click="payb"
style=" height: 30px;background-color: #f76126;width: 66%;color: #fff;display: flex;justify-content: center;align-items: center;font-size: 18px;margin: 10px auto 30px;border-radius: 5px;">
前往激活</view>
</view>
</u-popup>
<Payup @close='payclose' :show="payshow" :url="urls" wechat="1" zfb="1" :mony=paymony :title="paytitle"
:type="paytype" payway="0" :zfsm="paysm" btn="立即支付" :ysf="ysf" :isBindpay="isBindpay">
</Payup>
</view>
</template>
<script>
import Payup from '@/components/payup/payup.vue'
export default {
components: {
Payup,
},
data() {
return {
bd: false,
xsName: '',
xsId: '',
bdlist: [],
extend1: '',
payshow: false,
show: false,
paysm: '',
paytitle: '付费激活',
paytype: 26,
paymony: 399,
urls: '/ops/daybook',
payshow: false,
xm: '',
dh: '',
sfz: '',
ysf: '',
isBindpay: true,
};
},
onShow() {
this.getBdList();
this.getuserinfo()
},
methods: {
getuserinfo() {
this.$request("/system/user/", {}, "get").then((res) => {
if (res.data.data == "true") {
}
this.extend1 = res.data.extend1;
});
},
payclose(i) {
this.payshow = i
},
payb() {
this.payshow = true
},
closepop() {
this.show = false
uni.switchTab({
url: '/pages/index/index'
})
},
add() {
if (this.xsName == '' || this.xsId == '') {
uni.showToast({
title: "内容不能为空!",
icon: "none",
});
return
}
if (this.extend1 != 4) {
// uni.showToast({
// title: "请先激活卡片",
// icon: "none",
// });
setTimeout(() => {
this.show = true
}, 500)
return
}
if (!this.bd) {
const data = {
xsName: this.xsName,
xsId: this.xsId,
userName: 1,
};
this.$request("/system/xs/add", data, "post")
.then((res) => {
if (res.code == 200) {
this.getuserinfo()
} else {
uni.showToast({
title: res.data.msg,
icon: "none",
});
}
})
.catch((error) => {
console.error("请求失败:", error);
});
} else {
alert("已绑定信息,无法修改。如需更改,请联系客服。");
}
},
getBdList() {
this.$request("/system/xs/list?userName=1", {}, "get")
.then((res) => {
if (res.data && res.data.rows) {
this.bdlist = res.data.rows;
// 判断是否有绑定数据
if (this.bdlist.length > 0) {
this.xsName = this.bdlist[0].xsName || '';
this.xsId = this.bdlist[0].xsId || '';
this.bd = true; // 有数据时,bd为true
} else {
this.bd = false; // 没有数据时,bd为false
}
}
})
.catch((error) => {
console.error("请求失败:", error);
});
},
},
};
</script>
<style lang="scss" scoped>
.bank {
width: 100%;
height: 95vh;
background: linear-gradient(180deg, #FFFFFF 20%, #FED0D0 100%);
background-size: 100% 100%;
background-position: center;
background-repeat: no-repeat;
}
.an {}
.addbank {
background-color: #fff;
width: 95%;
margin: 0 auto;
border-radius: 12px;
.item {
display: flex;
height: 50px;
align-items: center;
font-size: 18px;
justify-content: space-around;
color: rgba(0, 0, 0, 1);
margin: 0 auto;
width: 90%;
border-bottom: 1px solid #ccc;
.inp {
width: 60%;
border-radius: 6px;
height: 40px;
text-indent: 20px;
color: #3c4951;
}
}
}
.alert-message {
color: red;
text-align: center;
margin-top: 20px;
}
.nav {
display: flex;
// flex-direction: column;
justify-content: space-around;
flex-wrap: wrap;
// background-image: url('../../static/my/navbg.png');
// height: 300px;
padding: 10px 0;
.nav-item {
// background-color: red;
// border-bottom: 1px solid #ccc;
// border-radius: 6px;
// height: 45px;
display: flex;
text-align: center;
// flex-direction: column;
align-items: center;
// background-color: rebeccapurple;
justify-content: center;
box-sizing: border-box;
padding: 7px 0;
margin: 0px auto;
width: 32%;
color: #000;
}
.zh {
border-bottom: none;
}
}
</style>