|
|
@@ -18,6 +18,7 @@ Page({
|
|
18
|
18
|
AwardDayNumber: 0,
|
|
19
|
19
|
IsShowRemind: false,
|
|
20
|
20
|
IsShowHelp: false,
|
|
|
21
|
+ IsShowUserAssociated: 0,
|
|
21
|
22
|
},
|
|
22
|
23
|
onPullDownRefresh: function () {
|
|
23
|
24
|
wx.redirectTo({
|
|
|
@@ -41,6 +42,8 @@ Page({
|
|
41
|
42
|
withShareTicket: true,
|
|
42
|
43
|
menus: ['shareAppMessage', 'shareTimeline']
|
|
43
|
44
|
});
|
|
|
45
|
+
|
|
|
46
|
+ that.getUserAssociatedInfo(app.globalData.userInfo.UserID, function (data) {});
|
|
44
|
47
|
},
|
|
45
|
48
|
onHide: function () {
|
|
46
|
49
|
wx.hideLoading();
|
|
|
@@ -343,44 +346,49 @@ Page({
|
|
343
|
346
|
},
|
|
344
|
347
|
setSelectUser: function (e) {
|
|
345
|
348
|
var that = this;
|
|
346
|
|
- if (app.globalData.userInfo.UserID == 1 ||
|
|
347
|
|
- app.globalData.userInfo.UserID == 2 ||
|
|
348
|
|
- app.globalData.userInfo.UserID == 3 ||
|
|
349
|
|
- app.globalData.userInfo.UserID == 4) {
|
|
350
|
|
- var userid = that.data.ChangeUserID;
|
|
351
|
|
- wx.setStorageSync("UserID", userid);
|
|
|
349
|
+
|
|
|
350
|
+ if (app.globalData.userInfo.UserID == 1 ||
|
|
|
351
|
+ app.globalData.userInfo.UserID == 2 ||
|
|
|
352
|
+ app.globalData.userInfo.UserID == 3 ||
|
|
|
353
|
+ app.globalData.userInfo.UserID == 4) {
|
|
|
354
|
+ var userid = that.data.ChangeUserID;
|
|
|
355
|
+ wx.setStorageSync("UserID", userid);
|
|
|
356
|
+
|
|
|
357
|
+ app.globalData.userInfo.UserID = userid;
|
|
|
358
|
+ var fieldStr = "";
|
|
|
359
|
+ that.getUserInfo(userid, fieldStr, function (data) {
|
|
|
360
|
+ wx.setNavigationBarTitle({
|
|
|
361
|
+ title: data.NickName
|
|
|
362
|
+ });
|
|
|
363
|
+ main.getUserConfig();
|
|
|
364
|
+ app.globalData.userInfo.ProductServiceTime = data.ProductServiceTime;
|
|
352
|
365
|
|
|
353
|
|
- app.globalData.userInfo.UserID = userid;
|
|
354
|
|
- var fieldStr = "";
|
|
355
|
|
- that.getUserInfo(userid, fieldStr, function (data) {
|
|
356
|
|
- wx.setNavigationBarTitle({
|
|
357
|
|
- title: data.NickName
|
|
358
|
|
- });
|
|
359
|
|
- main.getUserConfig();
|
|
360
|
|
- app.globalData.userInfo.ProductServiceTime = data.ProductServiceTime;
|
|
|
366
|
+ if (app.globalData.userInfo.UserID != 2) {
|
|
|
367
|
+ app.globalData.userInfo.NickName = data.NickName;
|
|
|
368
|
+ app.globalData.userInfo.AvatarUrl = data.AvatarUrl;
|
|
|
369
|
+ }
|
|
|
370
|
+ if (data.IsPromoter > 0) {
|
|
|
371
|
+ app.globalData.userInfo.IsPromoter = data.IsPromoter;
|
|
|
372
|
+ app.globalData.userInfo.PromotionLimitDays = data.PromotionLimitDays;
|
|
|
373
|
+ app.globalData.userInfo.PromotionLimitTime = data.PromotionLimitTime;
|
|
|
374
|
+ app.globalData.userInfo.WXServiceCharge = data.WXServiceCharge;
|
|
|
375
|
+ app.globalData.userInfo.IndividualIncomeTax = data.IndividualIncomeTax;
|
|
|
376
|
+ app.globalData.userInfo.WXAccount = data.WXAccount;
|
|
|
377
|
+ app.globalData.userInfo.RealName = data.RealName;
|
|
|
378
|
+ app.globalData.userInfo.IntroducerNickName = data.IntroducerNickName;
|
|
|
379
|
+ app.globalData.userInfo.IntroducerAvatarUrl = data.IntroducerAvatarUrl;
|
|
|
380
|
+ }
|
|
361
|
381
|
|
|
362
|
|
- if (app.globalData.userInfo.UserID != 2) {
|
|
363
|
|
- app.globalData.userInfo.NickName = data.NickName;
|
|
364
|
|
- app.globalData.userInfo.AvatarUrl = data.AvatarUrl;
|
|
365
|
|
- }
|
|
366
|
|
- if (data.IsPromoter > 0) {
|
|
367
|
|
- app.globalData.userInfo.IsPromoter = data.IsPromoter;
|
|
368
|
|
- app.globalData.userInfo.PromotionLimitDays = data.PromotionLimitDays;
|
|
369
|
|
- app.globalData.userInfo.PromotionLimitTime = data.PromotionLimitTime;
|
|
370
|
|
- app.globalData.userInfo.WXServiceCharge = data.WXServiceCharge;
|
|
371
|
|
- app.globalData.userInfo.IndividualIncomeTax = data.IndividualIncomeTax;
|
|
372
|
|
- app.globalData.userInfo.WXAccount = data.WXAccount;
|
|
373
|
|
- app.globalData.userInfo.RealName = data.RealName;
|
|
374
|
|
- app.globalData.userInfo.IntroducerNickName = data.IntroducerNickName;
|
|
375
|
|
- app.globalData.userInfo.IntroducerAvatarUrl = data.IntroducerAvatarUrl;
|
|
376
|
|
- }
|
|
377
|
|
- });
|
|
|
382
|
+ that.getUserAssociatedInfo(app.globalData.userInfo.UserID, function (data) {});
|
|
378
|
383
|
|
|
379
|
|
- that.setData({
|
|
380
|
|
- IsShowUserID: false,
|
|
381
|
|
- });
|
|
382
|
|
- that.onShow();
|
|
383
|
|
- }
|
|
|
384
|
+ });
|
|
|
385
|
+
|
|
|
386
|
+ that.setData({
|
|
|
387
|
+ IsShowUserID: false,
|
|
|
388
|
+ });
|
|
|
389
|
+ that.onShow();
|
|
|
390
|
+ }
|
|
|
391
|
+
|
|
384
|
392
|
},
|
|
385
|
393
|
getUserInfoFunction: function (e) {
|
|
386
|
394
|
var that = this;
|
|
|
@@ -414,6 +422,22 @@ Page({
|
|
414
|
422
|
}
|
|
415
|
423
|
});
|
|
416
|
424
|
},
|
|
|
425
|
+ //得到用户关联列表
|
|
|
426
|
+ getUserAssociatedInfo: function (userID, callback) {
|
|
|
427
|
+ var that = this;
|
|
|
428
|
+ var url = "GetUserAssociated?UserID=" + userID+"&IsWeb=false";
|
|
|
429
|
+ main.getData(url, function (data) {
|
|
|
430
|
+ if (data) {
|
|
|
431
|
+ that.setData({
|
|
|
432
|
+ IsShowUserAssociated: 1,
|
|
|
433
|
+ UserAssociatedNickName: common.getStringMaxLength(app.globalData.userInfo.NickName,12),
|
|
|
434
|
+ UserAssociatedAvatar: app.globalData.userInfo.AvatarUrl,
|
|
|
435
|
+ UserAssociated: data,
|
|
|
436
|
+ ChildUserID:app.globalData.userInfo.ChildUserID,
|
|
|
437
|
+ });
|
|
|
438
|
+ }
|
|
|
439
|
+ });
|
|
|
440
|
+ },
|
|
417
|
441
|
selectPayItem: function (e) {
|
|
418
|
442
|
var that = this;
|
|
419
|
443
|
var id = e.currentTarget.dataset.id;
|
|
|
@@ -481,6 +505,16 @@ Page({
|
|
481
|
505
|
//判断每30天是否是高级模式
|
|
482
|
506
|
wx.removeStorageSync('IsShowPatternMenu');
|
|
483
|
507
|
},
|
|
|
508
|
+ showUserAssociated: function () {
|
|
|
509
|
+ this.setData({
|
|
|
510
|
+ IsShowUserAssociated: 2,
|
|
|
511
|
+ });
|
|
|
512
|
+ },
|
|
|
513
|
+ closeUserAssociated: function () {
|
|
|
514
|
+ this.setData({
|
|
|
515
|
+ IsShowUserAssociated: 1,
|
|
|
516
|
+ });
|
|
|
517
|
+ },
|
|
484
|
518
|
setVersionStart: function (e) {
|
|
485
|
519
|
var flag = e.currentTarget.dataset.flag;
|
|
486
|
520
|
var versionid = e.currentTarget.dataset.versionid;
|