|
|
@@ -0,0 +1,80 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+
|
|
|
+Page({
|
|
|
+ data: {
|
|
|
+ condition: "",
|
|
|
+ sc_points_balanceid: '',
|
|
|
+ userid: '',
|
|
|
+ id: 2026052510110906,
|
|
|
+ content: {
|
|
|
+ nocache: true,
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ total: null,
|
|
|
+ sc_points_balanceid: "",
|
|
|
+ userid: '',
|
|
|
+ where: {
|
|
|
+ condition: "",
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ list: []
|
|
|
+ },
|
|
|
+
|
|
|
+ onChange({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ this.setData({
|
|
|
+ condition: detail
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ onSearch({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ this.setData({
|
|
|
+ condition: detail
|
|
|
+ });
|
|
|
+ this.data.content.where.condition = detail;
|
|
|
+ this.getList(true);
|
|
|
+ },
|
|
|
+
|
|
|
+ getList(init = false) {
|
|
|
+ if (init) this.selectComponent('#ListBox').goTop();
|
|
|
+ _Http.init(this.data.content, init).then(content => {
|
|
|
+ _Http.basic({
|
|
|
+ id: this.data.id,
|
|
|
+ content
|
|
|
+ }).then(res => {
|
|
|
+ this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
+ if (res.code != '1') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ content: _Http.paging(content, res),
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ onLoad(options) {
|
|
|
+ getApp().globalData.Language.getLanguagePackage(this, '积分账户');
|
|
|
+ if (options.id) {
|
|
|
+ this.setData({
|
|
|
+ sc_points_balanceid: options.id,
|
|
|
+ userid: options.userid,
|
|
|
+ 'content.sc_points_balanceid': options.id,
|
|
|
+ 'content.userid': options.userid
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // callPhone(e) {
|
|
|
+ // wx.makePhoneCall({
|
|
|
+ // phoneNumber: e.currentTarget.dataset.number
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+});
|