chengjie 3 роки тому
батько
коміт
1865323a93

Різницю між файлами не показано, бо вона завелика
+ 2 - 2
app.js


+ 1 - 0
app.json

@@ -42,6 +42,7 @@
42 42
         
43 43
     "pages/other/family",
44 44
     "pages/other/recover",
45
+    "pages/other/grade",
45 46
     "pages/other/video",
46 47
     "pages/other/menu",
47 48
     "pages/other/lessonlist",

+ 75 - 89
pages/index/accredit.js

@@ -6,118 +6,113 @@ const app = getApp();
6 6
 Page({
7 7
   data: {
8 8
     IsIPad:"",
9
-    AgeList:[{Name:"学龄前",Grade:0},{Name:"一年级",Grade:1},{Name:"二年级",Grade:2},{Name:"三年级",Grade:3},{Name:"四年级",Grade:4},{Name:"五年级",Grade:5},{Name:"六年级",Grade:6},{Name:"初中及以上",Grade:100}],
10
-  },
9
+ },
11 10
   onLoad: function (options) {
11
+
12
+    var nickname=app.globalData.userInfo.NickName;
13
+    if (app.globalData.userInfo.NickName=="陌生用户")
14
+      nickname="";
12 15
     this.setData({
13 16
       Containnerheight: main.getWindowHeight(),
14
-      IsAccredit:true,
17
+      NickName: nickname,
18
+      AvatarUrl: app.globalData.userInfo.AvatarUrl,
15 19
     });
16 20
 
17 21
     var that = this;
18 22
     var hType=0;
19 23
     if (options.Type)
20 24
       hType=options.Type;
21
-    main.getData("GetAccreditInfo?Type=" + hType, function (data) {
25
+
26
+    
27
+    main.getData("GetAccreditInfo2?Type="+hType, function (data) {
22 28
       that.setData({
23 29
         Info: data,
24
-        Htype:hType,
25 30
       });
26 31
     });
27
-
28
-    if (!app.globalData.userInfo)
29
-      app.globalData.userInfo = {};
32
+    
30 33
 
31 34
     if (app.globalData.IsIPad) {
32 35
       that.setData({
33 36
         IsIPad: "_iPad",
34 37
       });
35 38
     }
36
-
37 39
   },
38
-  //得到用户信息
39
-  getUserInfo: function () {
40
-    var that = this
41
-
42
-    wx.getUserProfile({
43
-      desc: "登录注册",
44
-      success: function (res2) {
45
-        that.data.Info.Text3=null;
40
+  onChooseAvatar:function(e){
41
+    var that = this;
42
+    console.log(e);
43
+    that.uploadFileToServer(e.detail.avatarUrl, function (data) {
44
+      if (data) {
46 45
         that.setData({
47
-          Info: that.data.Info,
48
-        });
49
-
50
-        app.globalData.userInfo.NickName = res2.userInfo.nickName;
51
-        app.globalData.userInfo.AvatarUrl = res2.userInfo.avatarUrl;
52
-        
53
-        //调用登录接口
54
-        wx.login({
55
-          success: function (res0) {
56
-            app.globalData.userInfo.Code = res0.code;
57
-            that.login(app.globalData.userInfo, res2.userInfo);
58
-          }
46
+          AvatarUrl:app.globalData.uploadImageUrl + data.Target,
59 47
         });
60
-      },
61
-      fail: function (res) {
62
-        console.log(res);
63
-        that.gotoReturn();
48
+        that.save();
64 49
       }
65 50
     });
66 51
   },
67
-  login: function (param, param2) {
68
-    var that = this;
69
-    var url = "MiaoguoLogin";
70
-    main.postData(url, {
71
-      Code: param.Code,
72
-      NickName: param2.nickName,
73
-      AvatarUrl: param2.avatarUrl,
74
-      Language: param2.language,
75
-      Gender: param2.gender,
76
-      City: param2.city,
77
-      Province: param2.province,
78
-      Country: param2.country,
79
-      ProgramVersion: app.globalData.Version,
80
-      Introducer: app.globalData.introducer,
81
-      UserSource: app.globalData.userSource,
82
-      SourceID: app.globalData.SourceID,
83
-      LastUserSource: app.globalData.userSource,
84
-      iv: param.iv,
85
-      encryptedData: param.encryptedData,
86
-    }, function (data) {
87
-      app.globalData.userInfo.NickName = data.NickName;
88
-      app.globalData.userInfo.AvatarUrl = data.AvatarUrl;
89
-      app.globalData.userInfo.Language = data.Language;
90
-      app.globalData.userInfo.Gender = data.Gender;
91
-      app.globalData.userInfo.City = data.City;
92
-      app.globalData.userInfo.Province = data.Province;
93
-      app.globalData.userInfo.Country = data.Country;
94
-
95
-      app.globalData.userInfo.IsMember = data.IsMember;
96
-
97
-      if (app.globalData.userInfo.UserID){
98
-        if (that.data.Htype==1){
99
-          that.setData({
100
-            IsAccredit:false,
52
+  onKeyInput: function (e) {
53
+    var that=this;
54
+    var nickname = e.detail.value;    
55
+    that.setData({
56
+      NickName: nickname,
57
+    });
58
+    that.save();
59
+  },
60
+  save:function(){
61
+    var that=this;
62
+    app.globalData.userInfo.NickName=that.data.NickName;
63
+    app.globalData.userInfo.AvatarUrl=that.data.AvatarUrl;
64
+    
65
+    var param={};
66
+    param.NickName=app.globalData.userInfo.NickName;
67
+    param.AvatarUrl=app.globalData.userInfo.AvatarUrl;
68
+    main.postData('UpdateUserNickNameAndAvatar?UserID=' + app.globalData.userInfo.UserID, param, function (data) {
69
+      
70
+    });
71
+  },
72
+  uploadFileToServer: function (file, callback) {
73
+    var url = common.Encrypt("MiaoguoUploadFile2");
74
+    wx.showLoading({
75
+      title: '上传中',
76
+      mask: true,
77
+    });
78
+    wx.uploadFile({
79
+      url: app.globalData.serverUrl + url,
80
+      filePath: file,
81
+      name: 'file',
82
+      success(res) {
83
+        var err = JSON.parse(res.data);
84
+        if (err.errcode == 10000) {
85
+          wx.hideLoading();
86
+          callback(err.result);
87
+        } else {
88
+          wx.hideLoading();
89
+          wx.showModal({
90
+            title: '上传文件失败',
91
+            showCancel: false,
92
+            content: JSON.stringify(err.errMsg),
101 93
           });
102 94
         }
103
-        else{
104
-          that.gotoReturn();
105
-        }
106
-      }
107
-      else {
108
-        app.globalData.userInfo.UserID = data.UserID;
109
-        that.gotoReturn();
95
+      },
96
+      fail: function (err) {
97
+        wx.hideLoading();
98
+        wx.showModal({
99
+          title: '上传文件失败',
100
+          showCancel: false,
101
+          content: JSON.stringify(err),
102
+        });
110 103
       }
111
-      wx.setStorageSync("AccreditLimitTime",common.formatTime(new Date(),"-",true)+" 23:59:59");
112 104
     });
113 105
   },
114 106
   gotoReturn: function () {
115
-    var that = this;
116
-    if (app.globalData.userInfo.IsShow == 1 && that.data.Info.Text3){
107
+    var that=this;
108
+    if (app.globalData.userInfo.isShow == 1 
109
+      && that.data.Info.Remind
110
+      && (that.data.NickName=="陌生用户" || that.data.NickName=="")
111
+      ){
117 112
       wx.showModal({
118 113
         title: '提醒',
119 114
         showCancel: false,
120
-        content: that.data.Info.Text3,
115
+        content: that.data.Info.Remind,
121 116
         confirmText: '知道了',
122 117
         success(res) {
123 118
           if (res.confirm) {
@@ -127,22 +122,13 @@ Page({
127 122
       });
128 123
     }
129 124
     else{
125
+      wx.setStorageSync("AccreditLimitTime",common.formatTime(new Date(),"-",true)+" 23:59:59");
126
+
130 127
       wx.navigateBack({
131 128
         delta: 1
132 129
       });
133 130
     }
134 131
   },
135
-  setGrade:function(e){
136
-    var that=this;
137
-    var grade=e.currentTarget.dataset.grade;
138
-    console.log(grade);
139
-    var url = 'SetGrade?UserID=' + app.globalData.userInfo.UserID+'&Grade='+grade;
140
-    main.getData(url, function (data) {
141
-      wx.navigateBack({
142
-        delta: 1
143
-      });
144
-    });
145
-  },
146 132
   onShareAppMessage: function () {
147 133
     return {
148 134
       title: app.globalData.ShareTitle,

+ 20 - 21
pages/index/accredit.wxml

@@ -3,30 +3,29 @@
3 3
   </view>
4 4
 </navigation-bar>
5 5
 
6
-<view wx:if="{{IsAccredit}}" class="container{{IsIPad}} FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
7
-  <image src="../images/universalpic_logo_200x200.png" class='img' />
6
+<view class="container{{IsIPad}} FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
7
+  <view class="text1">{{Info.Text1}}</view>
8 8
 
9
+  <text class="panel3 panel1" wx:if="{{Info.Text2}}">{{Info.Text2}}</text>
9 10
 
10
-  <text class="text0">{{Info.Text1}}</text>
11
-  <text class="text1">{{Info.Text2}}</text>
12
-
13
-  <button catchtap="getUserInfo" class="btn FlexRow">
14
-    <view>{{Info.Btn1}}</view>
15
-  </button>
16
-  <view catchtap="gotoReturn" class="btn2 btn FlexRow">
17
-    <view>{{Info.Btn2}}</view>
11
+  <view class="panel1 FlexRow">
12
+    <view class="text3">头像</view>
13
+    <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
14
+      <image class="avatar" src="{{AvatarUrl}}"></image>
15
+    </button> 
18 16
   </view>
19
-  
20
-</view>
21
-
22
-<view wx:if="{{!IsAccredit}}" class="container{{IsIPad}}  FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
23
-  <image src="../images/universalpic_logo_200x200.png" class='img{{IsIPad}}' />
17
+  <view class="line1"></view>
18
+  <view class="panel2 panel1 FlexRow">
19
+    <view class="text3">用户名字</view>
20
+    <input type="nickname" class="weui-input" placeholder-class="placeholder" bindinput="onKeyInput" placeholder="请输入名字" value="{{NickName}}" />
21
+  </view>
22
+  <view class="line2 line1"></view>
24 23
 
24
+  <block wx:if="{{Info.Text3}}">
25
+    <view class="text4">友情提示</view>
26
+    <view class="line3 line1"></view>
27
+    <view class="text5 text4">{{Info.Text3}}</view>
28
+  </block>
25 29
 
26
-  <text class="text2{{IsIPad}}">选择孩子的年级</text>
27
-  <view class="panel1 FlexRow">
28
-    <view wx:for="{{AgeList}}" wx:key="*this" class="btn3" bindtap="setGrade" data-grade="{{item.Grade}}">{{item.Name}}</view>
29
-  </view>
30
-  
31
-  
30
+  <view class="btn1" bindtap="gotoReturn">{{Info.Text4}}</view>
32 31
 </view>

+ 58 - 51
pages/index/accredit.wxss

@@ -12,79 +12,86 @@
12 12
   color:#fff;
13 13
 }
14 14
 
15
-.img{
16
-  width:200rpx;
17
-  height:200rpx;
18
-  border-radius: 50%;
19
-  margin-top: 150rpx;
15
+.text1{
16
+  font-size: 54rpx;
17
+  margin-top: 120rpx;
20 18
 }
21 19
 
22
-.img_iPad{
23
-  width:200rpx;
24
-  height:200rpx;
25
-  border-radius: 50%;
20
+.panel1{
21
+  width:630rpx;
22
+  margin-top: 80rpx;
23
+  justify-content:space-between;
24
+}
25
+
26
+.panel3{
26 27
   margin-top: 30rpx;
28
+  font-size: 24rpx;
29
+}
30
+.panel2{
31
+  margin-top: 60rpx;
27 32
 }
28 33
 
29
-.text0{
30
-  font-size:48rpx;
31
-  margin-top: 120rpx;
32
-  text-align: center;
34
+.text3{
35
+  font-size: 28rpx;
33 36
 }
34 37
 
35
-.text1{
36
-  font-size:32rpx;
37
-  margin-top: 20rpx;
38
-  text-align: center;
38
+.avatar-wrapper{
39
+  width:100rpx;
40
+  height:100rpx;
41
+  margin: 0rpx;
42
+  padding: 0rpx;
43
+  border-radius: 50%;
44
+}
45
+
46
+.avatar{
47
+  width:100rpx;
48
+  height:100rpx;
49
+  border-radius: 50%;
39 50
 }
40 51
 
41
-.btn{
52
+.weui-input{
42 53
   width:400rpx;
43
-  height:110rpx;
44
-  border-radius: 14rpx;
45
-  border:1rpx solid #fff;
46
-  background-color: #0B8457;
47
-  margin-top: 60rpx;
48
-  color:#fff;
49
-  font-size:36rpx;
54
+  text-align: right;
50 55
 }
51
-.btn2{
52
-  border:1rpx solid #0B8457;
53
-  margin: 40rpx 0 0 0;
54
-  font-size:28rpx;
56
+
57
+.placeholder{
58
+  font-size: 28rpx;
59
+  color: #B6F57F;
60
+  text-align: right;
55 61
 }
56 62
 
57
-.universalpic_share_white_52x40{
58
-  width: 52rpx;
59
-  height: 41rpx;
60
-  margin-right: 20rpx;
63
+.line1{
64
+  background: rgba(0,0,0,0.25);
65
+  width: 630rpx;
66
+  height:1rpx;
67
+  margin: 30rpx 0 0 0;
61 68
 }
62 69
 
63
-.text2{
64
-  font-size:54rpx;
65
-  margin-top: 170rpx;
66
-  text-align: center;
70
+.line2{
71
+  margin: 60rpx 0 0 0;
67 72
 }
68 73
 
69
-.text2_iPad{
70
-  font-size:54rpx;
71
-  margin-top: 20rpx;
72
-  text-align: center;
74
+.line3{
75
+  margin: 20rpx 0 0 0;
73 76
 }
74 77
 
75
-.panel1{
76
-  margin-top:25rpx;
77
-  flex-wrap: wrap;
78
+.text4{
79
+  font-size: 24rpx;
80
+  width:630rpx;
81
+  text-align: left;
82
+  margin-top: 60rpx;
83
+}
84
+.text5{
85
+  margin-top: 20rpx;
78 86
 }
79 87
 
80
-.btn3{
81
-  background: #0B8457;
82
-  border: 1rpx solid #FFFFFF;
88
+.btn1{
89
+  width:630rpx;
90
+  height:110rpx;
91
+  background: rgba(0,0,0,0.25);
83 92
   border-radius: 14rpx;
84 93
   font-size: 36rpx;
85
-  color: #FFFFFF;
86 94
   text-align: center;
87
-  width:285rpx;
88
-  line-height:90rpx;
89
-  margin: 15rpx;
95
+  line-height: 110rpx;
96
+  margin-top: 80rpx;
90 97
 }

+ 1 - 1
pages/index/index.js

@@ -258,7 +258,7 @@ Page({
258 258
               isShow = 1;
259 259
             }
260 260
           }
261
-          app.globalData.userInfo.IsShow = isShow;
261
+          app.globalData.userInfo.isShow = isShow;
262 262
 
263 263
           if (app.globalData.userInfo.IsMember == 1)
264 264
             app.globalData.IsLocked = 0;

+ 1 - 1
pages/main/add.js

@@ -99,7 +99,7 @@ Page({
99 99
       UpdateType: options.type,
100 100
       MiaoguoCardID: options.id,
101 101
       FieldNumber: fieldNumber,
102
-      IsShow: app.globalData.userInfo.IsShow,
102
+      IsShow: app.globalData.userInfo.isShow,
103 103
       CardType: cardtype,
104 104
       PracticeCardType: constant1.arrStudyPattern[cardtype] + "题卡",
105 105
       FolderID: folderid,

+ 1 - 1
pages/main/addInfomationDetail.wxml

@@ -37,7 +37,7 @@
37 37
       </view>
38 38
       <view></view>
39 39
     </view>
40
-    <text wx:if="{{Result.CHN.Book}}" class="panelRemark">该内容出现在《{{Result.CHN.Book}}》\n除了自制题卡还可以试一试语文「知识检验」</text>
40
+    <text wx:if="{{Result.CHN.Book}}" class="panelRemark">该内容出现在\n<block wx:for="{{Result.CHN.Book}}" wx:key="*this">《{{item}}》\n</block>除了自制题卡还可以试一试语文「知识检验」</text>
41 41
   </block>
42 42
 
43 43
   <!-- 拼音 -->

+ 1 - 1
pages/main/addInfomationDetail.wxss

@@ -183,9 +183,9 @@
183 183
 
184 184
 .panelRemark{
185 185
   width: 670rpx;
186
-  height:97rpx;
187 186
   font-size:24rpx;
188 187
   color:#4D4D4D;
188
+  padding-bottom: 20rpx;
189 189
   border-bottom:1rpx solid #d2d2d2;
190 190
 }
191 191
 

+ 1 - 8
pages/main/cardmain.js

@@ -16,9 +16,7 @@ Page({
16 16
     var that = this;
17 17
     that.setData({
18 18
       Containnerheight: main.getWindowHeight(),
19
-      AvatarUrl: app.globalData.userInfo.AvatarUrl,
20
-      NickName: app.globalData.userInfo.NickName,
21
-      IsShow: app.globalData.userInfo.IsShow,
19
+      IsShow: app.globalData.userInfo.isShow,
22 20
     });
23 21
 
24 22
     var year = new Date(app.globalData.userInfo.CreateTime).getFullYear();
@@ -211,11 +209,6 @@ Page({
211 209
       }
212 210
     }
213 211
   },
214
-  gotoAccredit: function () {
215
-    wx.navigateTo({
216
-      url: '../index/accredit',
217
-    });
218
-  },
219 212
   openOrder: function () {
220 213
     this.setData({
221 214
       IsShowOrder: true,

+ 0 - 11
pages/main/cardmain.wxml

@@ -6,17 +6,6 @@
6 6
       <view>搜题卡</view>
7 7
     </view>
8 8
   </view>
9
-  <block wx:if="{{IsShow==0}}">
10
-    <view class="panelTemp FlexRow" bindtap="gotoAccredit">
11
-      <view class="panelTemp1 FlexRow">
12
-        <image class="avatar" src='{{AvatarUrl}}' />
13
-        <view class="text6" wx:if="{{NickName=='陌生用户'}}">点击这里登录</view>
14
-        <view class="text6" wx:if="{{NickName!='陌生用户'}}">{{NickName}}</view>
15
-      </view>
16
-      <view>
17
-      </view>
18
-    </view>
19
-  </block>
20 9
   <view class="panelItem2 FlexRow">
21 10
     <view class="panelItem21 FlexColumn" bindtap="getList" data-id="0">
22 11
       <image class="tabbar_allcards_56x50" src='../images/tabbar_allcards_56x50.png' />

+ 5 - 5
pages/main/default.js

@@ -56,7 +56,7 @@ Page({
56 56
   },
57 57
   onShow: function () {
58 58
     var that = this;
59
-    if (app.globalData.userInfo.IsNewUser && app.globalData.userInfo.IsNewUser == 1 && app.globalData.userInfo.IsShow == 1) {
59
+    if (app.globalData.userInfo.IsNewUser && app.globalData.userInfo.IsNewUser == 1 && app.globalData.userInfo.isShow == 1) {
60 60
       if (app.globalData.userInfo.Subscribe == 0) {
61 61
         wx.navigateTo({
62 62
           url: '../other/newuser',
@@ -65,12 +65,12 @@ Page({
65 65
     } else {
66 66
       wx.getSetting({
67 67
         success(res) {
68
-          if (app.globalData.userInfo.NickName == "陌生用户" && app.globalData.userInfo.IsMember == 1 && app.globalData.userInfo.IsShow == 1) {
68
+          if (app.globalData.userInfo.NickName == "陌生用户" && app.globalData.userInfo.IsMember == 1 && app.globalData.userInfo.isShow == 1) {
69 69
             wx.navigateTo({
70 70
               url: '../index/accredit',
71 71
             });
72 72
           } else {
73
-            if (!app.globalData.userInfo.IsTryOut && app.globalData.userInfo.IsShow == 1) {
73
+            if (!app.globalData.userInfo.IsTryOut && app.globalData.userInfo.isShow == 1) {
74 74
               if (app.globalData.userInfo.Subscribe == 1) {
75 75
                 wx.navigateTo({
76 76
                   url: '../other/userbook',
@@ -81,7 +81,7 @@ Page({
81 81
                   url: '../other/newuser',
82 82
                 });
83 83
               }
84
-            } else if (app.globalData.userInfo.IsTryOut && app.globalData.userInfo.IsShow == 1) {
84
+            } else if (app.globalData.userInfo.IsTryOut && app.globalData.userInfo.isShow == 1) {
85 85
               if (app.globalData.GotoUrl.indexOf("../other/pay?PayType=6") >= 0) {
86 86
                 wx.navigateTo({
87 87
                   url: app.globalData.GotoUrl,
@@ -103,7 +103,7 @@ Page({
103 103
                 }
104 104
               }
105 105
 
106
-            } else if (app.globalData.userInfo.IsShow == 0) {
106
+            } else if (app.globalData.userInfo.isShow == 0) {
107 107
               var url = 'SetGrade?UserID=' + app.globalData.userInfo.UserID+'&Grade=1';
108 108
               main.getData(url, function (data) {});
109 109
             }

+ 5 - 3
pages/main/preview.js

@@ -57,6 +57,8 @@ Page({
57 57
       Containnerheight: height,
58 58
       ShowType: options.type,
59 59
       MiaoguoCardID: id,
60
+      IsShow:app.globalData.userInfo.isShow,
61
+      ShowText:app.globalData.userInfo.ShowText1,
60 62
       Color: main.getDetailColor(app.globalData.ColorIndex),
61 63
     });
62 64
     console.log("MiaoguoCardID:" + id);
@@ -79,7 +81,7 @@ Page({
79 81
     else {
80 82
       if (options.type == "share") {
81 83
         wx.setNavigationBarTitle({
82
-          title: "来自分享"
84
+          title: "来自"+app.globalData.userInfo.ShowText1,
83 85
         });
84 86
       }
85 87
       else if (options.type == "play") {
@@ -154,7 +156,7 @@ Page({
154 156
           else {
155 157
             var time = 2000;
156 158
             wx.showToast({
157
-              title: '分享人已删除',
159
+              title: +app.globalData.userInfo.ShowText1+'人已删除',
158 160
               mask: true,
159 161
               duration: time,
160 162
               complete: function () {
@@ -679,7 +681,7 @@ Page({
679 681
     }
680 682
     
681 683
     return {
682
-      title: '我的分享',
684
+      title: '我的'+app.globalData.userInfo.ShowText1,
683 685
       path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID + '&type=share&ColorIndex=' + app.globalData.ColorIndex + '&MiaoguoCardID=' + this.data.MiaoguoCardID,
684 686
     }
685 687
   },

+ 3 - 2
pages/main/preview.wxml

@@ -86,8 +86,9 @@
86 86
       <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{PrevID}}" wx:if="{{PrevID>0}}">
87 87
         <image class="universalpic_next_gray_30x30" src='../images/universalpic_prev_gray_30x30.png' />
88 88
       </view>
89
-      <button class="btn21" open-type='share' wx:if="{{!PrintID}}">分享给大家</button>
90
-      <view class='btn21' wx:if="{{PrintID}}">{{CurrentIndex}}</view>
89
+      <button class="btn21" open-type='share' wx:if="{{!PrintID && IsShow==1}}">{{ShowText}}给大家</button>
90
+      <view class="btn21" wx:if="{{PrintID && IsShow==1}}">{{CurrentIndex}}</view>
91
+      <view class='btn21' wx:if="{{IsShow!=1}}"></view>
91 92
       <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{NextID}}" wx:if="{{NextID>0}}">
92 93
         <image class="universalpic_next_gray_30x30" src='../images/universalpic_next_gray_30x30.png' />
93 94
       </view>

+ 1 - 1
pages/main/systemsetting.js

@@ -16,7 +16,7 @@ Page({
16 16
       Containnerheight: main.getWindowHeight(),
17 17
       ProgramName: app.globalData.ProgramName,
18 18
       Version: app.globalData.Version,
19
-      IsShow: app.globalData.userInfo.IsShow,
19
+      IsShow: app.globalData.userInfo.isShow,
20 20
       ShowUserID:app.globalData.userInfo.ShowUserID,
21 21
       IsPromoter:app.globalData.userInfo.IsPromoter,
22 22
     });

+ 2 - 2
pages/other/binding.js

@@ -110,11 +110,11 @@ Page({
110 110
   },
111 111
   onShow: function (options) {
112 112
     var that = this;
113
-    if (app.globalData.userInfo.IsShow == 1) {
113
+    if (app.globalData.userInfo.isShow == 1) {
114 114
       var today=wx.getStorageSync("AccreditLimitTime");
115 115
       if (common.formatTime(new Date(),"-")>today){
116 116
         wx.navigateTo({
117
-          url: '../index/accredit',
117
+          url: '../index/accredit?Type=binding',
118 118
         });
119 119
       }
120 120
     }

+ 2 - 2
pages/other/family.js

@@ -30,11 +30,11 @@ Page({
30 30
   },
31 31
   onShow: function (options) {
32 32
     var that = this;
33
-    if (app.globalData.userInfo.IsShow == 1) {
33
+    if (app.globalData.userInfo.isShow == 1) {
34 34
       var today=wx.getStorageSync("AccreditLimitTime");
35 35
       if (common.formatTime(new Date(),"-")>today){
36 36
         wx.navigateTo({
37
-          url: '../index/accredit',
37
+          url: '../index/accredit?Type=family',
38 38
         });
39 39
       }
40 40
     }

+ 34 - 0
pages/other/grade.js

@@ -0,0 +1,34 @@
1
+import common from '../../utils/util';
2
+import main from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    IsIPad:"",
9
+    AgeList:[{Name:"学龄前",Grade:0},{Name:"一年级",Grade:1},{Name:"二年级",Grade:2},{Name:"三年级",Grade:3},{Name:"四年级",Grade:4},{Name:"五年级",Grade:5},{Name:"六年级",Grade:6},{Name:"初中及以上",Grade:100}],
10
+  },
11
+  onLoad: function (options) {
12
+    this.setData({
13
+      Containnerheight: main.getWindowHeight(),
14
+    });
15
+  },
16
+  setGrade:function(e){
17
+    var that=this;
18
+    var grade=e.currentTarget.dataset.grade;
19
+    console.log(grade);
20
+    var url = 'SetGrade?UserID=' + app.globalData.userInfo.UserID+'&Grade='+grade;
21
+    main.getData(url, function (data) {
22
+      wx.navigateBack({
23
+        delta: 1
24
+      });
25
+    });
26
+  },
27
+  onShareAppMessage: function () {
28
+    return {
29
+      title: app.globalData.ShareTitle,
30
+      path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
31
+      imageUrl: app.globalData.ShareImage,
32
+    }
33
+  },
34
+})

+ 10 - 0
pages/other/grade.json

@@ -0,0 +1,10 @@
1
+{
2
+  "navigationBarTitleText": "秒过",
3
+  "usingComponents": {
4
+    "navigation-bar": "/components/navigation-bar/navigation-bar"
5
+  },  
6
+  "navigationStyle": "custom",
7
+  "navigationBarBackgroundColor": "#0B8457",
8
+  "navigationBarTextStyle": "white",
9
+  "backgroundColor": "#0B8457"
10
+}

+ 12 - 0
pages/other/grade.wxml

@@ -0,0 +1,12 @@
1
+<navigation-bar title="秒过" background="#0B8457" color="#fff" show="true" left="true">
2
+  <view slot="left" >
3
+  </view>
4
+</navigation-bar>
5
+
6
+<view class="container{{IsIPad}}  FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
7
+  <image src="../images/universalpic_logo_200x200.png" class='img{{IsIPad}}' />
8
+  <text class="textGrade{{IsIPad}}">选择孩子的年级</text>
9
+  <view class="panelGrade FlexRow">
10
+    <view wx:for="{{AgeList}}" wx:key="*this" class="btnGrade" bindtap="setGrade" data-grade="{{item.Grade}}">{{item.Name}}</view>
11
+  </view>
12
+</view>

+ 62 - 0
pages/other/grade.wxss

@@ -0,0 +1,62 @@
1
+.container {
2
+  background-color: #0B8457;
3
+  position: fixed;
4
+  top:120rpx;
5
+  color:#fff;
6
+}
7
+
8
+.container_iPad {
9
+  background-color: #0B8457;
10
+  position: fixed;
11
+  top:0rpx;
12
+  color:#fff;
13
+}
14
+
15
+.universalpic_share_white_52x40{
16
+  width: 52rpx;
17
+  height: 41rpx;
18
+  margin-right: 20rpx;
19
+}
20
+
21
+.img{
22
+  width:200rpx;
23
+  height:200rpx;
24
+  border-radius: 50%;
25
+  margin-top: 150rpx;
26
+}
27
+
28
+.img_iPad{
29
+  width:200rpx;
30
+  height:200rpx;
31
+  border-radius: 50%;
32
+  margin-top: 30rpx;
33
+}
34
+
35
+.textGrade{
36
+  font-size:54rpx;
37
+  margin-top: 170rpx;
38
+  text-align: center;
39
+}
40
+
41
+.textGrade_iPad{
42
+  font-size:54rpx;
43
+  margin-top: 20rpx;
44
+  text-align: center;
45
+}
46
+
47
+.panelGrade{
48
+  margin-top:25rpx;
49
+  flex-wrap: wrap;
50
+}
51
+
52
+.btnGrade{
53
+  background: #0B8457;
54
+  border: 1rpx solid #FFFFFF;
55
+  border-radius: 14rpx;
56
+  font-size: 36rpx;
57
+  color: #FFFFFF;
58
+  text-align: center;
59
+  width:285rpx;
60
+  line-height:90rpx;
61
+  margin: 15rpx;
62
+}

+ 1 - 2
pages/other/newuser.js

@@ -53,7 +53,6 @@ Page({
53 53
   },
54 54
   goto: function (e) {
55 55
     var url = e.currentTarget.dataset.url;
56
-    
57 56
     wx.navigateTo({
58 57
       url: url,
59 58
     });
@@ -97,7 +96,7 @@ Page({
97 96
       });
98 97
       if (app.globalData.userInfo.NickName=="陌生用户" && app.globalData.userInfo.IsShow == 1){
99 98
         wx.navigateTo({
100
-          url: '../index/accredit?Type=1',
99
+          url: '../other/grade',
101 100
         });
102 101
       }
103 102
     });

+ 0 - 1
pages/other/newuser.wxml

@@ -1,5 +1,4 @@
1 1
 <view wx:if="{{PanelShow==0}}" class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;'>
2
-
3 2
     <image id="Image{{index}}" wx:for="{{List}}" wx:key="*this" class="img" lazy-load="true" mode="widthFix" 
4 3
     src='{{ImagePath}}web/{{item.Image}}' bindtap="{{item.BindTap}}" data-url="{{item.Url}}"  
5 4
     bindtouchmove="scroll"/>

+ 1 - 1
pages/other/paycustom.js

@@ -35,7 +35,7 @@ Page({
35 35
       that.showToast('输入用户ID');
36 36
     }
37 37
     else {
38
-      main.getData("GetMiaoguoWXUserInfo?FieldStr=UserID,NickName,AvatarUrl &UserID=" + that.data.SearchUserID, function (data) {
38
+      main.getData("GetMiaoguoWXUserInfo?FieldStr=UserID,NickName,NickNameRemark,AvatarUrl &GetWechatUserID=1&UserID=" + that.data.SearchUserID, function (data) {
39 39
         if (data) {
40 40
           that.setData({
41 41
             UserInfo: data,

+ 6 - 1
pages/other/paycustom.wxml

@@ -8,7 +8,12 @@
8 8
   </view>
9 9
   <view class="panelTitle3 FlexRow">
10 10
     <image src="{{UserInfo.AvatarUrl}}" class="avatar" />
11
-    <view class="btn2 btn" bindtap="getUserInfo">头像查验</view>
11
+    <view class="panelTitle31 FlexColumn">
12
+      <view>用户昵称:{{UserInfo.NickName}}</view>
13
+      <view>服务号ID:{{UserInfo.WechatUserID}}</view>
14
+      <view>客服备注:{{UserInfo.NickNameRemark}}</view>
15
+    </view>
16
+    <view class="btn2 btn" bindtap="getUserInfo">身份查验</view>
12 17
   </view>
13 18
   <view class="panelTitle FlexRow">
14 19
     <view class="panelTitle1">增加有效期(天)</view>

+ 6 - 1
pages/other/paycustom.wxss

@@ -52,6 +52,11 @@
52 52
   justify-content: space-between;
53 53
 }
54 54
 
55
+.panelTitle31{
56
+  align-items: flex-start;
57
+  font-size: 24rpx;
58
+}
59
+
55 60
 
56 61
 .avatar{
57 62
   width:90rpx;
@@ -62,7 +67,7 @@
62 67
 }
63 68
 
64 69
 .btn2{
65
-  width:260rpx;
70
+  width:180rpx;
66 71
   margin-top: 0rpx;
67 72
   margin-right: 30rpx;
68 73
 }

+ 2 - 1
pages/other/userbook.js

@@ -73,7 +73,7 @@ Page({
73 73
       ProductServiceTime: productServiceTime,
74 74
       EndDate: endDate,
75 75
       ArrInformation: arrInformation,
76
-      IsShow: app.globalData.userInfo.IsShow,
76
+      IsShow: app.globalData.userInfo.isShow,
77 77
       IsMember: app.globalData.userInfo.IsMember,
78 78
       IsPay: app.globalData.userInfo.IsPay,
79 79
       IsLoseEfficacy: app.globalData.userInfo.IsLoseEfficacy,
@@ -81,6 +81,7 @@ Page({
81 81
       ChildUserID: app.globalData.userInfo.ChildUserID,
82 82
       MainUserID: app.globalData.userInfo.MainUserID,
83 83
       UserID:app.globalData.userInfo.UserID,
84
+      ShowUserID:app.globalData.userInfo.ShowUserID,
84 85
     });
85 86
 
86 87
     that.init();

+ 8 - 1
pages/other/userbook.wxml

@@ -12,7 +12,14 @@
12 12
     <view class='userinfo FlexRow'>
13 13
       <view class="left FlexRow" bindtap="updateMember">
14 14
         <image class='avatar' src="{{AvatarUrl}}" />
15
-        <view class="nickname">{{NickName}}</view>
15
+        <view class="userinfo1 FlexColumn">
16
+          <view class="userinfo11 FlexRow">
17
+            <view wx:if="{{NickName!='陌生用户'}}" class="nickname">{{NickName}}</view>
18
+            <view wx:if="{{NickName=='陌生用户'}}" class="nickname">添加名字</view>
19
+            <image src='../images/universalpic_indicator_right_gray.png' class="Arrow" />
20
+          </view>
21
+          <view class="showuserid">{{ShowUserID}}</view>
22
+        </view>
16 23
       </view>
17 24
       <view class="right FlexRow" bindtap="goto" data-url="../main/systemsetting" wx:if="{{IsShow==1 && !IsLoseEfficacy && ((ClassDayNumber<ClassTotalDayNumber && IsPay==0) || IsPay==1 || PanelShow===2)}}">
18 25
         <image class='universalpic_setup_white_50x50' src="../images/universalpic_setup_white_50x50.png" />

+ 20 - 0
pages/other/userbook.wxss

@@ -78,12 +78,32 @@
78 78
   border-radius: 50%;
79 79
 }
80 80
 
81
+.userinfo1{
82
+  align-items: flex-start;
83
+}
84
+
81 85
 .nickname {
82 86
   margin-left: 20rpx;
83 87
   font-size: 28rpx;
84 88
   color: #fff;
85 89
 }
86 90
 
91
+.showuserid{
92
+  margin-left: 20rpx;
93
+  font-size: 24rpx;
94
+  color: #fff;
95
+}
96
+
97
+.userinfo11{
98
+  justify-content: flex-start;
99
+}
100
+
101
+.Arrow{
102
+  width:16rpx;
103
+  height:26rpx;
104
+  margin-left: 20rpx;
105
+}
106
+
87 107
 .panel1 {
88 108
   width: 100%;
89 109
   height: 134rpx;

+ 4 - 4
pages/share/shareitem.js

@@ -59,7 +59,7 @@ Page({
59 59
     wx.showLoading({
60 60
       title: '读取中',
61 61
     });
62
-    var url = 'GetShareItemInfo?IsShow='+app.globalData.userInfo.IsShow+'&IsHistory=' + isHistory + '&UserID=' + app.globalData.userInfo.UserID + "&TaskID=" + taskid;
62
+    var url = 'GetShareItemInfo?IsShow='+app.globalData.userInfo.isShow+'&IsHistory=' + isHistory + '&UserID=' + app.globalData.userInfo.UserID + "&TaskID=" + taskid;
63 63
     main.getData(url, function (data) {
64 64
       wx.hideLoading();
65 65
       if (!data.MilestoneDayNumber && !that.data.IsHistory && data.Remark)
@@ -152,7 +152,7 @@ Page({
152 152
         innerAudioContext1.stop();
153 153
     }
154 154
   },
155
-  //生成里程碑分享图片
155
+  //生成里程碑图片
156 156
   buildShareImageMilestone: function () {
157 157
     var that = this;
158 158
 
@@ -251,7 +251,7 @@ Page({
251 251
       });
252 252
     });
253 253
   },
254
-  //生成分享图片
254
+  //生成图片
255 255
   buildShareImage: function () {
256 256
     var that = this;
257 257
 
@@ -383,7 +383,7 @@ Page({
383 383
       });
384 384
     });
385 385
   },
386
-  //生成分享图片(历史)
386
+  //生成图片(历史)
387 387
   buildShareImageHistory: function () {
388 388
     var that = this;
389 389
 

+ 0 - 6
pages_agent/main/enter.js

@@ -57,10 +57,4 @@ Page({
57 57
 
58 58
   },
59 59
 
60
-  /**
61
-   * 用户点击右上角分享
62
-   */
63
-  onShareAppMessage: function () {
64
-
65
-  }
66 60
 })

+ 2 - 2
utils/main.js

@@ -99,7 +99,7 @@ function payMoney(payType, remark, money, detail, callback) {
99 99
       if (res.code) {
100 100
         console.log('获取用户登录态成功!' + res.code);
101 101
         //预支付
102
-        getData('ProductPayLogin500?code=' + res.code + '&payType=' + payType + '&money=' + money + '&detail=' + detail + '&productID=' + app.globalData.ProgramID + '&Remark=' + remark, function (data) {
102
+        getData('ProductPayLogin500?code=' + res.code + '&payType=' + payType + '&money=' + money + '&detail=' + detail + '&productID=' + app.globalData.ProgramID + '&Remark=' + remark+'&UserID='+app.globalData.userInfo.ShowUserID, function (data) {
103 103
           if (data && data.timeStamp) {
104 104
             //微信支付
105 105
             wx.requestPayment({
@@ -1151,7 +1151,7 @@ function GetTestReportInfo(reportid, callback) {
1151 1151
         if (obj.BookID >= 43 && obj.BookID <= 60)
1152 1152
           name1 = name1[0] + "生词" + name1[2].substr(0, 1);
1153 1153
         else if (obj.BookID == 73)
1154
-          name1 = name1[0] + name1[1].substr(2, 3) + name1[2];
1154
+          name1 = name1[1].substr(2, 3) + name1[2];
1155 1155
         else if (obj.BookID == 86)
1156 1156
           name1 = name1[1] + name1[2];
1157 1157
         else