wpfw_ewei_wxapp/pages/member/accountsdl/index.js
2023-02-26 08:10:18 +08:00

53 lines
1.3 KiB
JavaScript

var t = getApp(), e = t.requirejs("core");
Page({
data: {
type: 0,
search: "",
jflg: !1
},
onLoad: function(e) {
e.type || wx.switchTab({
url: "/pages/member/index/index"
}), this.setData({
type: e.type,
search: e.search
}), this.getToUser(e.search), wx.setNavigationBarTitle({
title: (2 == +e.type ? "余额" : "积分") + "转账"
});
var a = t.getCache("transfer_account", "");
"" != a && this.setData({
set: a
});
},
setjflg: function() {
this.setData({
jflg: !0
});
},
disflg: function() {
this.setData({
jflg: !1
});
},
getToUser: function(t) {
var a = this;
e.get("transfer_account/getToUser", {
uid: t
}, function(t) {
-1 == t.error && wx.showModal({
title: t.message,
success: function(t) {
1 != t.confirm && 1 != t.cancel || wx.navigateBack();
}
}), a.setData({
user: t.user
});
});
},
resetAccount: function() {
wx.navigateBack({
complete: function(t) {}
});
}
});