58 lines
1.6 KiB
JavaScript
58 lines
1.6 KiB
JavaScript
$.ajax({
|
|
url: qlgUrl('app/users/setting_recive'),
|
|
method: "GET",
|
|
dataType: 'JSON',
|
|
success(res) {
|
|
// TODO: some ajax
|
|
if (!res.status) return alert(res.msg)
|
|
document.getElementById("realname").value = res.data.realname || '';
|
|
document.getElementById("bank_name").value = res.data.bankName || '';
|
|
document.getElementById("bank_no").value = res.data.bankNo || '';
|
|
document.getElementById("alipay_recive").value = res.data.alipayRecive || '';
|
|
document.getElementById("wechat_recive").value = res.data.wechatRecive || '';
|
|
document.getElementById("alipayReciveCode").src = hyhImgUrl(res.data.alipayRecive);
|
|
document.getElementById("wechatReciveCode").src = hyhImgUrl(res.data.wechatRecive);
|
|
},
|
|
error(err){
|
|
console.warn(err);
|
|
alert('请求异常')
|
|
}
|
|
})
|
|
|
|
mui.plusReady(function(){
|
|
|
|
|
|
$(".photos").on("tap", 'img', function() {
|
|
var _input = $(this).parent().parent().parent().prev()[0];
|
|
UP.init(_input.id, "test", this.id)
|
|
openCamera()
|
|
})
|
|
|
|
mui(".down").on("tap", "#true", function(){
|
|
var realname = document.getElementById("realname").value;
|
|
var bankName = document.getElementById("bank_name").value;
|
|
var bankNo = document.getElementById("bank_no").value;
|
|
var alipayRecive = document.getElementById("alipay_recive").value;
|
|
var wechatRecive = document.getElementById("wechat_recive").value;
|
|
|
|
var data = {
|
|
realname,
|
|
bankName,
|
|
bankNo,
|
|
alipayRecive,
|
|
wechatRecive,
|
|
}
|
|
$.ajax({
|
|
url: qlgUrl('app/users/setting_recive'),
|
|
method: "POST",
|
|
data: data,
|
|
dataType: 'JSON',
|
|
success(res) {
|
|
return alert(res.msg)
|
|
},
|
|
error(err){
|
|
alert('请求异常')
|
|
}
|
|
})
|
|
})
|
|
}) |