chengjie лет назад: 7
Родитель
Сommit
c8e5d4a60b

+ 4 - 4
app.js

@@ -14,10 +14,10 @@ App({
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
15
   },
15
   },
16
   globalData: {
16
   globalData: {
17
-    version: "1.0.0",
18
-    IsProduction: false,
17
+    version: "1.0.4",
18
+    IsProduction: true,
19
     ProgramID: 105,
19
     ProgramID: 105,
20
-    AppID: "wx313a8f2c0741efe1",
20
+    AppID: "wx1fef080f74481cbd",
21
     ShareTitle: "认真练习,告别粗心",
21
     ShareTitle: "认真练习,告别粗心",
22
     ShareImageUrl: '../../images/programsystem_screenshot_pic01.png',
22
     ShareImageUrl: '../../images/programsystem_screenshot_pic01.png',
23
 
23
 
@@ -25,7 +25,7 @@ App({
25
     serverUrl: "https://www.kylx365.com/apiData/",
25
     serverUrl: "https://www.kylx365.com/apiData/",
26
     serverUrlServer: "https://www.kylx365.com/apiData/",
26
     serverUrlServer: "https://www.kylx365.com/apiData/",
27
     serverUrlLocalhost: "http://localhost:3020/apiData/",
27
     serverUrlLocalhost: "http://localhost:3020/apiData/",
28
-    audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=1&spd=6&pit=5",
28
+    audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=6&pit=5",
29
     Key: "kylx365_chengjie",
29
     Key: "kylx365_chengjie",
30
     IV: "kylx365hongliren",
30
     IV: "kylx365hongliren",
31
     
31
     

+ 2 - 1
app.json

@@ -1,11 +1,12 @@
1
 {
1
 {
2
   "pages": [
2
   "pages": [
3
     "pages/index/index",
3
     "pages/index/index",
4
+    "pages/index/guide",
4
     "pages/main/item",
5
     "pages/main/item",
5
     "pages/main/answer",
6
     "pages/main/answer",
6
     "pages/main/detail",
7
     "pages/main/detail",
7
-    "pages/main/print",
8
     "pages/main/list",
8
     "pages/main/list",
9
+    "pages/about/payfinished",
9
     "pages/main/default"
10
     "pages/main/default"
10
   ],
11
   ],
11
   "window": {
12
   "window": {

BIN
images/Help_aside_savepaper.png


+ 144 - 0
pages/about/payfinished.js

@@ -0,0 +1,144 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+  },
9
+  onLoad: function (options) {
10
+    var text0 = "", text1 = "", text2 = "", text4 = "", text5 = "";
11
+    text0 = "用户登录";
12
+    text1 = "需要您的授权";
13
+    text2 = "去授权";
14
+    text4 = "提醒:授权仅获取微信头像和昵称,";
15
+    text5 = "其它信息均受到微信保护。不授权将使个性化功能无法正常运作,特别是解锁、优惠礼品等会员功能。为保障您的消费权益,请尽快授权用户信息。";
16
+
17
+    this.setData({
18
+      Height: common.getSystemHeight(),
19
+      Text0: text0,
20
+      Text1: text1,
21
+      Text2: text2,
22
+      Text4: text4,
23
+      Text5: text5,
24
+    });
25
+
26
+    //适配ipad
27
+    var systemInfo = wx.getSystemInfoSync();
28
+    if (systemInfo.model) {
29
+      if (systemInfo.model.indexOf("iPad") >= 0) {
30
+        this.setData({
31
+          ipad: "ipad",
32
+        })
33
+      }
34
+    }
35
+  },
36
+  onUnload: function () {
37
+    wx.reLaunch({
38
+      url: '../main/default'
39
+    });
40
+  },
41
+  deblocking: function () {
42
+    wx.reLaunch({
43
+      url: '../index/index'
44
+    });
45
+  },
46
+  goto: function () {
47
+    var that = this;
48
+    wx.getSetting({
49
+      success(res) {
50
+        if (!res.authSetting['scope.userInfo']) {
51
+          wx.authorize({
52
+            scope: 'scope.userInfo',
53
+            success() {
54
+              that.getUserInfo();
55
+            },
56
+            fail() {
57
+              wx.openSetting({
58
+                success(res) {
59
+                  that.getUserInfo();
60
+                },
61
+              });
62
+            }
63
+          })
64
+        }
65
+        else {
66
+          that.getUserInfo();
67
+        }
68
+      }
69
+    });
70
+  },
71
+  //得到用户信息
72
+  getUserInfo: function () {
73
+    var that = this
74
+    //调用登录接口
75
+    wx.login({
76
+      success: function (res0) {
77
+        wx.getUserInfo({
78
+          withCredentials: true,
79
+          success: function (res) {
80
+            var userID = app.globalData.userInfo.UserID;
81
+            app.globalData.userInfo = res.userInfo;
82
+            app.globalData.userInfo.UserID = userID;
83
+
84
+            app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
85
+            app.globalData.userInfo.AvatarUrl = app.globalData.userInfo.avatarUrl;
86
+
87
+            // that.hasGetShareInfo(app.globalData.userInfo);
88
+            that.setData({
89
+              IsAccredit: true,
90
+              NickName: app.globalData.userInfo.NickName,
91
+              AvatarUrl: app.globalData.userInfo.AvatarUrl
92
+            });
93
+
94
+            app.globalData.userInfo.Code = res0.code;
95
+            app.globalData.userInfo.iv = res.iv;
96
+            app.globalData.userInfo.encryptedData = res.encryptedData;
97
+            that.login(app.globalData.userInfo);
98
+          },
99
+          fail: function (res) {
100
+            wx.reLaunch({
101
+              url: '../main/default'
102
+            });
103
+          }
104
+        });
105
+      },
106
+      fail: function () {
107
+        wx.reLaunch({
108
+          url: '../main/default'
109
+        });
110
+      }
111
+    });
112
+  },
113
+  login: function (param) {
114
+    var that = this;
115
+    server.postData('MathLogin', {
116
+      Code: param.Code,
117
+      NickName: param.nickName,
118
+      Language: param.language,
119
+      Gender: param.gender,
120
+      City: param.city,
121
+      Province: param.province,
122
+      Country: param.country,
123
+      AvatarUrl: param.avatarUrl,
124
+      ProgramVersion: app.globalData.Version,
125
+      Introducer: app.globalData.introducer,
126
+      UserSource: app.globalData.userSource,
127
+      SourceID: app.globalData.SourceID,
128
+      LastUserSource: app.globalData.userSource,
129
+      iv: param.iv,
130
+      encryptedData: param.encryptedData,
131
+    }, function (data) {
132
+      wx.reLaunch({
133
+        url: '../main/default'
134
+      });
135
+    });
136
+  },
137
+  onShareAppMessage: function () {
138
+    return {
139
+      title: app.globalData.ShareTitle,
140
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
141
+      imageUrl: app.globalData.ShareImageUrl,
142
+    }
143
+  },
144
+})

+ 7 - 0
pages/about/payfinished.json

@@ -0,0 +1,7 @@
1
+{
2
+  "navigationBarBackgroundColor": "#99607C",
3
+  "navigationBarTextStyle": "white",
4
+  "navigationBarTitleText": "登录",
5
+  "backgroundColor": "#99607C",
6
+  "enablePullDownRefresh": false
7
+}

+ 19 - 0
pages/about/payfinished.wxml

@@ -0,0 +1,19 @@
1
+<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
+  <image src="../../images/universalpic_bg_illus01.png" class="bg" />
3
+  <image src="../../images/universalpic_face_default_blue_size01.png" class="universalpic_face_default_blue_size01" />
4
+
5
+  <text class="text0">{{Text0}}</text>
6
+  <text class="text1">{{Text1}}</text>
7
+
8
+  <view class="btn">
9
+    <view class="btn1">
10
+      <button open-type="getUserInfo" bindgetuserinfo="goto" class="btn2">{{Text2}}</button>
11
+    </view>
12
+  </view>
13
+
14
+  <view class="text3">
15
+    <text class="text4">{{Text4}}</text>
16
+    <text class="text5">{{Text5}}</text>
17
+  </view>
18
+
19
+</view>

+ 85 - 0
pages/about/payfinished.wxss

@@ -0,0 +1,85 @@
1
+.container {
2
+  background-color: #99607C;
3
+  justify-content: flex-start;
4
+  color: #FFD48B;
5
+  font-weight: 500;
6
+}
7
+
8
+.bg{
9
+  width: 100%;
10
+  height:490rpx;
11
+  position: fixed;
12
+  bottom: 0;
13
+  left:0;
14
+}
15
+
16
+.universalpic_face_default_blue_size01{
17
+  width: 160rpx;
18
+  height:160rpx;
19
+  border-radius: 50%;
20
+  margin-top: 80rpx;
21
+}
22
+
23
+.text0{
24
+  font-size:36rpx;
25
+  text-align: center;
26
+  margin-top: 40rpx;
27
+  z-index: 10;
28
+}
29
+
30
+.text1{
31
+  font-size:44rpx;
32
+  text-align: center;
33
+  margin-top: 10rpx;
34
+  z-index: 10;
35
+}
36
+
37
+
38
+.btn {
39
+  width: 520rpx;
40
+  height: 118rpx;
41
+  background-color:rgba(0,0,0,0.2);
42
+  border-radius: 14rpx;
43
+  margin-top: 50rpx;
44
+  z-index: 10;
45
+}
46
+
47
+.btn1 {
48
+  width: 100%;
49
+  height: 104rpx;
50
+  background-color: #D6A665;
51
+  border-radius: 14rpx;
52
+  position:relative;
53
+  top:0;
54
+}
55
+
56
+.btn2 {
57
+  width: 100%;
58
+  height: 90rpx;
59
+  background-color: #FFCD79;
60
+  border-radius: 14rpx;
61
+  position:relative;
62
+  top:0;
63
+  font-size: 36rpx;
64
+  text-align: center;
65
+  line-height: 90rpx;
66
+  color:#713312;
67
+}
68
+
69
+.ipad{
70
+  margin-top:140rpx;
71
+}
72
+
73
+.text3{
74
+  font-size:22rpx;
75
+  width:470rpx; 
76
+  margin-top: 40rpx;
77
+  z-index: 10;
78
+  font-weight: 400;
79
+}
80
+.text4{
81
+  color:#FFD48B;
82
+}
83
+.text5{
84
+  color:#C8A5C4;
85
+}

+ 42 - 0
pages/index/guide.js

@@ -0,0 +1,42 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+const app = getApp();
5
+
6
+Page({
7
+  data: {
8
+  },
9
+  onLoad: function (options) {
10
+    var that = this;
11
+    this.setData({
12
+      Containnerheight: server.getWindowHeight(),
13
+    });
14
+    common.getStorageValue(this, "HelpHidden0", false, function () {
15
+      that.showHelp();
16
+    });
17
+  },
18
+  goto:function(){
19
+    wx.setStorageSync("HelpHidden0", true);
20
+    this.audioCtx = wx.createAudioContext('myAudio');
21
+    this.audioCtx.pause();
22
+
23
+    wx.setStorageSync("IsStart", true);
24
+    wx.redirectTo({
25
+      url: '../main/default',
26
+    })
27
+  },
28
+  showHelp: function () {
29
+    if (!this.data.HelpHidden1) {
30
+      this.audioCtx = wx.createAudioContext('myAudio');
31
+      var str = "欢迎来到数学之星——迈思星球。我是陪你一道练习的小伙伴“算算”。怎么练习?看看上面的介绍吧!";
32
+      server.playAudio(this.audioCtx, str);
33
+    }
34
+  },
35
+  onShareAppMessage: function () {
36
+    return {
37
+      title: app.globalData.ShareTitle,
38
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
39
+      imageUrl: app.globalData.ShareImageUrl,
40
+    }
41
+  },
42
+});

+ 8 - 0
pages/index/guide.json

@@ -0,0 +1,8 @@
1
+{
2
+  "navigationBarBackgroundColor": "#99607C",
3
+  "navigationBarTextStyle": "white",
4
+  "navigationBarTitleText": "新手指南",
5
+  "backgroundColor": "#99607C",
6
+  "backgroundTextStyle": "light",
7
+  "enablePullDownRefresh": false
8
+}

+ 9 - 0
pages/index/guide.wxml

@@ -0,0 +1,9 @@
1
+<view class="container FlexColumn" style="height:{{Containnerheight}}rpx;">
2
+  <image class="welcomeguide_bg" src="../../images/welcomeguide_bg.png" />
3
+  <view class="panel FlexColumn">
4
+    <image class="welcomeguide_info" src="../../images/welcomeguide_info.png" />
5
+    <image class="welcomeguide_dialogue" src="../../images/welcomeguide_dialogue.png" />
6
+  </view>
7
+  <view class="btn" bindtap='goto'>开始</view>
8
+</view>
9
+<audio hidden='true' id="myAudio"></audio>

+ 39 - 0
pages/index/guide.wxss

@@ -0,0 +1,39 @@
1
+.container {
2
+  background-color: #99607C;
3
+  justify-content: flex-start;
4
+}
5
+
6
+.welcomeguide_bg {
7
+  width: 100%;
8
+  height: 1206rpx;
9
+  position: fixed;
10
+  top: 0;
11
+}
12
+
13
+.panel{
14
+  width:100%;
15
+  position: fixed;
16
+  top: 0;
17
+}
18
+.welcomeguide_info {
19
+  width: 630rpx;
20
+  height: 816rpx;
21
+  margin-top: 40rpx;
22
+}
23
+.welcomeguide_dialogue {
24
+  width: 593rpx;
25
+  height: 132rpx;
26
+  margin-top: 72rpx;
27
+}
28
+
29
+.btn {
30
+  width: 100%;
31
+  height: 130rpx;
32
+  position: fixed;
33
+  bottom: 0;
34
+  background-color: #FFCD79;
35
+  text-align: center;
36
+  line-height: 130rpx;
37
+  color:#713312;
38
+  font-size: 48rpx;
39
+}

+ 33 - 22
pages/index/index.js

@@ -7,9 +7,8 @@ var timeout2, timeout3;
7
 Page({
7
 Page({
8
   data: {
8
   data: {
9
     version: app.globalData.version,
9
     version: app.globalData.version,
10
-    FileUrl: app.globalData.fileUrl,
11
   },
10
   },
12
-  onLoad: function(options) {
11
+  onLoad: function (options) {
13
     if (options) {
12
     if (options) {
14
       if (options.UserID) {
13
       if (options.UserID) {
15
         console.log("UserID:" + options.UserID);
14
         console.log("UserID:" + options.UserID);
@@ -37,11 +36,11 @@ Page({
37
     this.getUserInfo();
36
     this.getUserInfo();
38
   },
37
   },
39
   //得到用户信息
38
   //得到用户信息
40
-  getUserInfo: function(cb) {
39
+  getUserInfo: function (cb) {
41
     var that = this
40
     var that = this
42
     //调用登录接口
41
     //调用登录接口
43
     wx.login({
42
     wx.login({
44
-      success: function(res0) {
43
+      success: function (res0) {
45
         app.globalData.userInfo = {};
44
         app.globalData.userInfo = {};
46
         app.globalData.userInfo.Code = res0.code;
45
         app.globalData.userInfo.Code = res0.code;
47
         //console.log("Code:" + res0.code);
46
         //console.log("Code:" + res0.code);
@@ -61,7 +60,7 @@ Page({
61
             } else {
60
             } else {
62
               wx.getUserInfo({
61
               wx.getUserInfo({
63
                 withCredentials: false,
62
                 withCredentials: false,
64
-                success: function(res) {
63
+                success: function (res) {
65
                   app.globalData.userInfo = res.userInfo;
64
                   app.globalData.userInfo = res.userInfo;
66
 
65
 
67
                   app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
66
                   app.globalData.userInfo.NickName = app.globalData.userInfo.nickName;
@@ -71,7 +70,7 @@ Page({
71
                   that.login(app.globalData.userInfo);
70
                   that.login(app.globalData.userInfo);
72
 
71
 
73
                 },
72
                 },
74
-                fail: function(res) {
73
+                fail: function (res) {
75
                   that.login(app.globalData.userInfo);
74
                   that.login(app.globalData.userInfo);
76
                 }
75
                 }
77
               });
76
               });
@@ -80,8 +79,8 @@ Page({
80
           }
79
           }
81
         });
80
         });
82
       },
81
       },
83
-      fail: function() {
84
-        timeout2 = setTimeout(function() {
82
+      fail: function () {
83
+        timeout2 = setTimeout(function () {
85
           that.getUserInfo();
84
           that.getUserInfo();
86
           console.log("reboot:" + new Date().getTime());
85
           console.log("reboot:" + new Date().getTime());
87
         }, 2000);
86
         }, 2000);
@@ -89,10 +88,10 @@ Page({
89
     });
88
     });
90
   },
89
   },
91
 
90
 
92
-  login: function(param) {
91
+  login: function (param) {
93
     var that = this;
92
     var that = this;
94
 
93
 
95
-    server.getLocalHost(function() {
94
+    server.getLocalHost(function () {
96
       server.postData('MathLogin', {
95
       server.postData('MathLogin', {
97
         Code: param.Code,
96
         Code: param.Code,
98
         NickName: param.nickName,
97
         NickName: param.nickName,
@@ -118,11 +117,11 @@ Page({
118
         System: app.globalData.systemInfo.system,
117
         System: app.globalData.systemInfo.system,
119
         Platform: app.globalData.systemInfo.platform,
118
         Platform: app.globalData.systemInfo.platform,
120
         SDKVersion: app.globalData.systemInfo.SDKVersion,
119
         SDKVersion: app.globalData.systemInfo.SDKVersion,
121
-        ProgramVersion: app.globalData.Version,
122
-      }, function(data) {
120
+        ProgramVersion: app.globalData.version,
121
+      }, function (data) {
123
         //console.log("UserInfo:" + data);
122
         //console.log("UserInfo:" + data);
124
         if (!data) {
123
         if (!data) {
125
-          timeout3 = setTimeout(function() {
124
+          timeout3 = setTimeout(function () {
126
             that.getUserInfo();
125
             that.getUserInfo();
127
             console.log("reboot:" + new Date().getTime());
126
             console.log("reboot:" + new Date().getTime());
128
           }, 2000);
127
           }, 2000);
@@ -130,12 +129,24 @@ Page({
130
           app.globalData.userInfo = data;
129
           app.globalData.userInfo = data;
131
 
130
 
132
           //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
131
           //app.globalData.userInfo.AvatarUrl = param.avatarUrl;
133
-          that.getQuestionType(function() {
134
-            setTimeout(function() {
135
-              wx.redirectTo({
136
-                url: '../main/default'
137
-              })
132
+          that.getQuestionType(function () {
133
+            setTimeout(function () {
134
+              common.getStorageValue(that, "IsStart", false, function () {
135
+                if (that.data.IsStart) {
136
+
137
+                  wx.redirectTo({
138
+                    url: '../main/default'
139
+                  })
140
+
141
+                }
142
+                else {
143
+                  wx.redirectTo({
144
+                    url: '../index/guide'
145
+                  })
146
+                }
147
+              });
138
             }, 2000);
148
             }, 2000);
149
+
139
           });
150
           });
140
         }
151
         }
141
       });
152
       });
@@ -143,12 +154,12 @@ Page({
143
     });
154
     });
144
 
155
 
145
   },
156
   },
146
-  getQuestionType: function(callback) {
157
+  getQuestionType: function (callback) {
147
     var that = this;
158
     var that = this;
148
-    server.getData('GetQuestionTypes?Mode=2', function(data) {
159
+    server.getData('GetQuestionTypes?Mode=2', function (data) {
149
       if (data) {
160
       if (data) {
150
         //var arr = common.Decrypt(data);
161
         //var arr = common.Decrypt(data);
151
-        var arr=data;
162
+        var arr = data;
152
         wx.setStorageSync("QuestionTypeList", arr);
163
         wx.setStorageSync("QuestionTypeList", arr);
153
         callback();
164
         callback();
154
       }
165
       }
@@ -156,7 +167,7 @@ Page({
156
 
167
 
157
     server.getData('GetBaiduToken', function (data) {
168
     server.getData('GetBaiduToken', function (data) {
158
       if (data) {
169
       if (data) {
159
-        app.globalData.BaiduToken=data;
170
+        app.globalData.BaiduToken = data;
160
       }
171
       }
161
     });
172
     });
162
   },
173
   },

+ 36 - 12
pages/main/answer.js

@@ -5,20 +5,24 @@ const app = getApp()
5
 Page({
5
 Page({
6
   data: {
6
   data: {
7
     version: app.globalData.version,
7
     version: app.globalData.version,
8
-    FileUrl: app.globalData.fileUrl,
9
     IsEdit: false,
8
     IsEdit: false,
10
     ListHeight: 1320,
9
     ListHeight: 1320,
11
     ListHeight2: 1490,
10
     ListHeight2: 1490,
12
     SelectedCount: 0,
11
     SelectedCount: 0,
13
   },
12
   },
14
   onLoad: function () {
13
   onLoad: function () {
14
+    var that = this;
15
     this.setData({
15
     this.setData({
16
       Containnerheight: server.getWindowHeight(),
16
       Containnerheight: server.getWindowHeight(),
17
     });
17
     });
18
     this.getList();
18
     this.getList();
19
+    common.getStorageValue(this, "HelpHidden5", false, function () { 
20
+      that.showHelp();
21
+    });
22
+
19
   },
23
   },
20
   getList: function () {
24
   getList: function () {
21
-    
25
+    //console.log(new Date().getTime());
22
     var that = this;
26
     var that = this;
23
     var list = wx.getStorageSync("AnswerList");
27
     var list = wx.getStorageSync("AnswerList");
24
     if (list && list.length > 0) {
28
     if (list && list.length > 0) {
@@ -41,6 +45,13 @@ Page({
41
         ListHeight2: ListHeight2,
45
         ListHeight2: ListHeight2,
42
         ListHeight3: ListHeight3,
46
         ListHeight3: ListHeight3,
43
       });
47
       });
48
+      //console.log(new Date().getTime());
49
+      if (arr.length>10){
50
+        wx.showToast({
51
+          title:"请删除不用试卷!",
52
+          duration:2000,
53
+        });
54
+      }
44
     }
55
     }
45
   },
56
   },
46
   selectItem: function (e) {
57
   selectItem: function (e) {
@@ -65,6 +76,8 @@ Page({
65
         wx.navigateTo({
76
         wx.navigateTo({
66
           url: '../main/item?id=' + id,
77
           url: '../main/item?id=' + id,
67
         });
78
         });
79
+
80
+        this.closeHelp();
68
       }
81
       }
69
     }
82
     }
70
   },
83
   },
@@ -72,6 +85,9 @@ Page({
72
     var list = this.data.AnswerList;
85
     var list = this.data.AnswerList;
73
     for (var i = list.length - 1; i >= 0; i--) {
86
     for (var i = list.length - 1; i >= 0; i--) {
74
       if (list[i].Selected) {
87
       if (list[i].Selected) {
88
+        wx.removeSavedFile({
89
+          filePath:list[i].TempImagePath
90
+        });
75
         list.splice(i, 1);
91
         list.splice(i, 1);
76
       }
92
       }
77
     }
93
     }
@@ -99,18 +115,26 @@ Page({
99
       AnswerList: that.data.AnswerList,
115
       AnswerList: that.data.AnswerList,
100
     });
116
     });
101
   },
117
   },
118
+  showHelp: function () {
119
+    if (!this.data.HelpHidden5) {
120
+      this.audioCtx = wx.createAudioContext('myAudio');
121
+      var str = "哇哦,已经做完了呀。接下来,根据卷子右上角的编号,从传送带上选择答案吧。";
122
+      server.playAudio(this.audioCtx, str);
123
+    }
124
+  },
125
+  closeHelp: function () {
126
+    this.setData({
127
+      HelpHidden5: true,
128
+    });
129
+    wx.setStorageSync("HelpHidden5", true);
130
+    this.audioCtx = wx.createAudioContext('myAudio');
131
+    this.audioCtx.pause();
132
+  },
102
   onShareAppMessage: function () {
133
   onShareAppMessage: function () {
103
     return {
134
     return {
104
-      title: '',
105
-      path: 'pages/index/index',
106
-      success: function (res) {
107
-      },
108
-      fail: function (err) {
109
-        console.log(err);
110
-      },
111
-      complete: function (res) {
112
-        console.log(res);
113
-      },
135
+      title: app.globalData.ShareTitle,
136
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
137
+      imageUrl: app.globalData.ShareImageUrl,
114
     }
138
     }
115
   },
139
   },
116
 })
140
 })

+ 4 - 2
pages/main/answer.wxml

@@ -54,7 +54,7 @@
54
         <view class="itemChild0 itemChild FlexRow">
54
         <view class="itemChild0 itemChild FlexRow">
55
           <view class="FlexRow">
55
           <view class="FlexRow">
56
             <image wx:if="{{IsEdit}}" class="universalpic_select_on_gray" src="../../images/universalpic_select_on_gray.png" />
56
             <image wx:if="{{IsEdit}}" class="universalpic_select_on_gray" src="../../images/universalpic_select_on_gray.png" />
57
-            <image wx:if="{{!IsEdit}}" class="questioncard_icon" src="{{FileUrl}}questioncard_icon_grade0602_size01.png" />
57
+            <image wx:if="{{!IsEdit}}" class="questioncard_icon" src="{{item.IconName}}" />
58
             <view class="title FlexColumn">
58
             <view class="title FlexColumn">
59
               <view class="title1">
59
               <view class="title1">
60
                 {{item.CreateTime}}
60
                 {{item.CreateTime}}
@@ -78,4 +78,6 @@
78
       </view>
78
       </view>
79
     </view>
79
     </view>
80
   </view>
80
   </view>
81
-</view>
81
+</view>
82
+<image hidden="{{HelpHidden5}}" bindtap='closeHelp' class="Help_aside_answerroom_list" src="../../images/Help_aside_answerroom_list.png" />
83
+<audio hidden='true' id="myAudio"></audio>

+ 8 - 0
pages/main/answer.wxss

@@ -297,3 +297,11 @@
297
   color: #4f92ba;
297
   color: #4f92ba;
298
   font-size: 22rpx;
298
   font-size: 22rpx;
299
 }
299
 }
300
+
301
+.Help_aside_answerroom_list{
302
+  width: 100%;
303
+  height: 270rpx;
304
+  position: fixed;
305
+  bottom: 0rpx;
306
+  z-index: 200;
307
+}

+ 44 - 18
pages/main/default.js

@@ -14,29 +14,15 @@ Page({
14
     IsAccredit: false,
14
     IsAccredit: false,
15
   },
15
   },
16
   onLoad: function() {
16
   onLoad: function() {
17
+    var that=this;
17
     this.setData({
18
     this.setData({
18
       Containnerheight: server.getWindowHeight(),
19
       Containnerheight: server.getWindowHeight(),
19
       ProgramList: server.getProgramList(),
20
       ProgramList: server.getProgramList(),
20
       NickName: app.globalData.userInfo.NickName,
21
       NickName: app.globalData.userInfo.NickName,
21
       AvatarUrl: app.globalData.userInfo.AvatarUrl,
22
       AvatarUrl: app.globalData.userInfo.AvatarUrl,
22
     });
23
     });
23
-
24
-    var that = this;
25
-    wx.getSetting({
26
-      success(res) {
27
-        if (res.authSetting['scope.userInfo']) {
28
-          that.setData({
29
-            IsAccredit: true,
30
-          });
31
-        } else {
32
-          //付费用户请去授权
33
-          if (app.globalData.userInfo.IsMember == 1) {
34
-            wx.navigateTo({
35
-              url: '../about/payfinished?type=accredit',
36
-            });
37
-          }
38
-        }
39
-      }
24
+    common.getStorageValue(this, "HelpHidden1", false, function () { 
25
+      that.showHelp();
40
     });
26
     });
41
 
27
 
42
     wx.login({
28
     wx.login({
@@ -46,6 +32,8 @@ Page({
46
     });
32
     });
47
     
33
     
48
     this.updateProgram();
34
     this.updateProgram();
35
+
36
+    
49
   },
37
   },
50
   onShow:function(){
38
   onShow:function(){
51
     var list = wx.getStorageSync("AnswerList");
39
     var list = wx.getStorageSync("AnswerList");
@@ -59,6 +47,27 @@ Page({
59
       AnswerLength: answerLength,
47
       AnswerLength: answerLength,
60
       AnswerNewDate: answerNewDate,
48
       AnswerNewDate: answerNewDate,
61
     });
49
     });
50
+
51
+    var that = this;
52
+    wx.getSetting({
53
+      success(res) {
54
+        if (res.authSetting['scope.userInfo']) {
55
+          that.setData({
56
+            IsAccredit: true,
57
+          });
58
+        } else {
59
+          //付费用户请去授权
60
+
61
+          common.getStorageValue(that, "HelpHidden3", false, function () {
62
+            if (that.data.HelpHidden3) {
63
+              wx.navigateTo({
64
+                url: '../about/payfinished',
65
+              });
66
+            }
67
+          });
68
+        }
69
+      }
70
+    });
62
   },
71
   },
63
   gotoList:function(e){
72
   gotoList:function(e){
64
     var id=e.currentTarget.dataset.id;
73
     var id=e.currentTarget.dataset.id;
@@ -67,6 +76,8 @@ Page({
67
     wx.navigateTo({
76
     wx.navigateTo({
68
       url: '../main/list?id=' + categoryArray[id].Array.join(",") + "&name=" + categoryArray[id].Name + "&num=" + categoryArray[id].Num,
77
       url: '../main/list?id=' + categoryArray[id].Array.join(",") + "&name=" + categoryArray[id].Name + "&num=" + categoryArray[id].Num,
69
     });
78
     });
79
+
80
+    this.closeHelp();
70
   },
81
   },
71
   gotoAnswer:function(){
82
   gotoAnswer:function(){
72
     wx.navigateTo({
83
     wx.navigateTo({
@@ -124,7 +135,7 @@ Page({
124
         Province: param.province,
135
         Province: param.province,
125
         Country: param.country,
136
         Country: param.country,
126
         AvatarUrl: param.avatarUrl,
137
         AvatarUrl: param.avatarUrl,
127
-        ProgramVersion: app.globalData.Version,
138
+        ProgramVersion: app.globalData.version,
128
         Introducer: app.globalData.introducer,
139
         Introducer: app.globalData.introducer,
129
         UserSource: app.globalData.userSource,
140
         UserSource: app.globalData.userSource,
130
         SourceID: app.globalData.SourceID,
141
         SourceID: app.globalData.SourceID,
@@ -150,6 +161,21 @@ Page({
150
   gotoFeedback: function() {
161
   gotoFeedback: function() {
151
     server.gotoFeedback();
162
     server.gotoFeedback();
152
   },
163
   },
164
+  showHelp:function(){
165
+    if (!this.data.HelpHidden1){
166
+      this.audioCtx = wx.createAudioContext('myAudio');
167
+      var str ="那么,就从选题目开始吧。在计算题工厂里包括了小学数学全年级最重要的知识点。其中“四年级及以上”,这个栏目囊括了四到六年级的题型。请选一个年级继续。";
168
+      server.playAudio(this.audioCtx, str);
169
+    }
170
+  },
171
+  closeHelp:function(){
172
+    this.setData({
173
+      HelpHidden1:true,
174
+    });
175
+    wx.setStorageSync("HelpHidden1", true);
176
+    this.audioCtx = wx.createAudioContext('myAudio');
177
+    this.audioCtx.pause();
178
+  },
153
   updateProgram: function() {
179
   updateProgram: function() {
154
     const updateManager = wx.getUpdateManager();
180
     const updateManager = wx.getUpdateManager();
155
 
181
 

+ 11 - 5
pages/main/default.wxml

@@ -1,6 +1,9 @@
1
 <view class="container FlexColumn" style="min-height:{{Containnerheight}}rpx;">
1
 <view class="container FlexColumn" style="min-height:{{Containnerheight}}rpx;">
2
   <scroll-view class="scroll-view_H" scroll-x>
2
   <scroll-view class="scroll-view_H" scroll-x>
3
     <image class="homepage_headline_illus" src="../../images/homepage_headline_illus.png" />
3
     <image class="homepage_headline_illus" src="../../images/homepage_headline_illus.png" />
4
+    <scroll-view scroll-y class="scrollview">
5
+    <image class="homepage_headline_info" src="../../images/homepage_headline_info.png" />
6
+    </scroll-view>
4
   </scroll-view>
7
   </scroll-view>
5
 
8
 
6
   <view class="panel FlexColumn">
9
   <view class="panel FlexColumn">
@@ -26,17 +29,17 @@
26
           <view class="panel0020 FlexRow">
29
           <view class="panel0020 FlexRow">
27
             <view class="panel00200 FlexColumn">
30
             <view class="panel00200 FlexColumn">
28
               <view class="text0">批改</view>
31
               <view class="text0">批改</view>
29
-              <view class="line"></view>
32
+              <view class="line3"></view>
30
               <view class="panel002000 FlexRow">
33
               <view class="panel002000 FlexRow">
31
                 <view class="text1">试卷张数</view>
34
                 <view class="text1">试卷张数</view>
32
                 <view class="text2">{{AnswerLength}}</view>
35
                 <view class="text2">{{AnswerLength}}</view>
33
               </view>
36
               </view>
34
-              <view class="line2 line"></view>
37
+              <view class="line4 line3"></view>
35
               <view class="panel002000 FlexRow">
38
               <view class="panel002000 FlexRow">
36
                 <view class="text1">制题日期</view>
39
                 <view class="text1">制题日期</view>
37
                 <view class="text">{{AnswerNewDate}}</view>
40
                 <view class="text">{{AnswerNewDate}}</view>
38
               </view>
41
               </view>
39
-              <view class="line2 line"></view>
42
+              <view class="line4 line3"></view>
40
               <view class="panel002000 FlexRow">
43
               <view class="panel002000 FlexRow">
41
                 <button wx:if="{{!IsAccredit}}" open-type="getUserInfo" class="btn" bindgetuserinfo="getBindGetUserInfo">
44
                 <button wx:if="{{!IsAccredit}}" open-type="getUserInfo" class="btn" bindgetuserinfo="getBindGetUserInfo">
42
                   <view class="btn1">
45
                   <view class="btn1">
@@ -71,7 +74,7 @@
71
         <view class="panel003 circularBottom FlexColumn">
74
         <view class="panel003 circularBottom FlexColumn">
72
           <view class="panel0030 FlexRow">
75
           <view class="panel0030 FlexRow">
73
             <view class="panel00300 FlexColumn">
76
             <view class="panel00300 FlexColumn">
74
-              <text class="text">©2018 唱意教育 - 数学计算题\n微信小程序 版本 1.0.0</text>
77
+              <text class="text">©2018 唱意教育 - 数学计算题\n微信小程序 版本 {{version}}</text>
75
               <view class="panel003000 FlexRow">
78
               <view class="panel003000 FlexRow">
76
                 <view>帮助</view>
79
                 <view>帮助</view>
77
                 <view class="line"></view>
80
                 <view class="line"></view>
@@ -109,4 +112,7 @@
109
       </view>
112
       </view>
110
     </view>
113
     </view>
111
   </view>
114
   </view>
112
-</view>
115
+</view>
116
+<image hidden="{{HelpHidden1}}" bindtap='closeHelp' class="Help_aside_homepage" src="../../images/Help_aside_homepage.png" />
117
+<audio hidden='true' id="myAudio"></audio>
118
+              

+ 33 - 11
pages/main/default.wxss

@@ -6,6 +6,7 @@
6
 .scroll-view_H {
6
 .scroll-view_H {
7
   width: 100%;
7
   width: 100%;
8
   height: 460rpx;
8
   height: 460rpx;
9
+  position: relative;
9
 }
10
 }
10
 
11
 
11
 .homepage_headline_illus {
12
 .homepage_headline_illus {
@@ -13,6 +14,19 @@
13
   height: 460rpx;
14
   height: 460rpx;
14
 }
15
 }
15
 
16
 
17
+.scrollview{
18
+  width: 514rpx;
19
+  height: 312rpx;
20
+  position: absolute;
21
+  left:910rpx;
22
+  top:34rpx;
23
+}
24
+
25
+.homepage_headline_info{
26
+  width: 445rpx;
27
+  height: 455rpx;
28
+}
29
+
16
 .panel {
30
 .panel {
17
   width: 100%;
31
   width: 100%;
18
   background-color: #583027;
32
   background-color: #583027;
@@ -21,12 +35,19 @@
21
 }
35
 }
22
 
36
 
23
 
37
 
24
-.line1 {
38
+.panel .line1 {
25
   width: 100%;
39
   width: 100%;
26
   height: 120rpx;
40
   height: 120rpx;
27
   background-color: #291112;
41
   background-color: #291112;
28
 }
42
 }
29
 
43
 
44
+.panel .line2 {
45
+  width: 100%;
46
+  height: 10rpx;
47
+  background-color: rgba(0, 0, 0, 0.30);
48
+  position: absolute;
49
+  top:0;
50
+}
30
 
51
 
31
 .panel0 {
52
 .panel0 {
32
   width: 100%;
53
   width: 100%;
@@ -48,13 +69,6 @@
48
   position: relative;
69
   position: relative;
49
 }
70
 }
50
 
71
 
51
-.line2 {
52
-  width: 100%;
53
-  height: 10rpx;
54
-  background-color: rgba(0, 0, 0, 0.30);
55
-  position: absolute;
56
-  top:0;
57
-}
58
 
72
 
59
 .panel000 .text {
73
 .panel000 .text {
60
   margin: 0 6rpx;
74
   margin: 0 6rpx;
@@ -118,7 +132,7 @@
118
   height: 57rpx;
132
   height: 57rpx;
119
   position: absolute;
133
   position: absolute;
120
   right: 77rpx;
134
   right: 77rpx;
121
-  bottom: 14rpx;
135
+  bottom: -5rpx;
122
 }
136
 }
123
 
137
 
124
 .panel00200 {
138
 .panel00200 {
@@ -143,7 +157,7 @@
143
                  3rpx 3rpx 4rpx #bd682d;
157
                  3rpx 3rpx 4rpx #bd682d;
144
 }
158
 }
145
 
159
 
146
-.panel00200 .line {
160
+.panel00200 .line3 {
147
   margin-top: 50rpx;
161
   margin-top: 50rpx;
148
   width: 430rpx;
162
   width: 430rpx;
149
   height: 4rpx;
163
   height: 4rpx;
@@ -151,7 +165,7 @@
151
   border-radius: 2rpx;
165
   border-radius: 2rpx;
152
 }
166
 }
153
 
167
 
154
-.panel00200 .line2 {
168
+.panel00200 .line4 {
155
   margin-top: 20rpx;
169
   margin-top: 20rpx;
156
 }
170
 }
157
 
171
 
@@ -329,3 +343,11 @@
329
   height: 26rpx;
343
   height: 26rpx;
330
   margin-right: 30rpx;
344
   margin-right: 30rpx;
331
 }
345
 }
346
+
347
+.Help_aside_homepage{
348
+  width: 100%;
349
+  height: 310rpx;
350
+  position: fixed;
351
+  bottom: 0rpx;
352
+  z-index: 100;
353
+}

+ 142 - 70
pages/main/detail.js

@@ -13,7 +13,6 @@ const waitTime = ["", "10秒钟", "15秒钟", "20秒钟", "25秒钟"];
13
 Page({
13
 Page({
14
   data: {
14
   data: {
15
     version: app.globalData.version,
15
     version: app.globalData.version,
16
-    FileUrl: app.globalData.fileUrl,
17
     IsShowMenu: false,
16
     IsShowMenu: false,
18
     filter: 'horizontal',
17
     filter: 'horizontal',
19
     //filter: 'vertical',
18
     //filter: 'vertical',
@@ -24,12 +23,23 @@ Page({
24
     ShowLoading: false,
23
     ShowLoading: false,
25
     IsDistabled: "",
24
     IsDistabled: "",
26
     NameClass:"",
25
     NameClass:"",
26
+    AddDisabled: "",
27
+    SubDisabled: "btnAddSubDisabled",
28
+    HelpHidden7:true,
29
+    ShowAndroidNotice:false,
27
   },
30
   },
28
   onLoad: function (options) {
31
   onLoad: function (options) {
32
+    var that = this;
29
     var id = options.id;
33
     var id = options.id;
34
+
35
+    isAndroid = false;
36
+    if (app.globalData.systemInfo.system && app.globalData.systemInfo.system.indexOf("Android") >= 0)
37
+      isAndroid = true;
38
+
30
     this.setData({
39
     this.setData({
31
       Containnerheight: server.getWindowHeight(),
40
       Containnerheight: server.getWindowHeight(),
32
       ID: id,
41
       ID: id,
42
+      ShowAndroidNotice:isAndroid,
33
     });
43
     });
34
     var systemInfo = wx.getSystemInfoSync();
44
     var systemInfo = wx.getSystemInfoSync();
35
     if (systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
45
     if (systemInfo.system && systemInfo.system.indexOf("Android") >= 0) {
@@ -37,9 +47,10 @@ Page({
37
     }
47
     }
38
     this.getDetail(id);
48
     this.getDetail(id);
39
 
49
 
40
-    isAndroid = false;
41
-    if (app.globalData.systemInfo.system && app.globalData.systemInfo.system.indexOf("Android") >= 0)
42
-      isAndroid = true;
50
+    
51
+    common.getStorageValue(this, "HelpHidden3", false, function () { 
52
+      that.showHelp();
53
+    });
43
 
54
 
44
   },
55
   },
45
   onUnload:function(){
56
   onUnload:function(){
@@ -54,6 +65,7 @@ Page({
54
           item = data[i].List[k];
65
           item = data[i].List[k];
55
           item.Example[0] = item.Example[0].replace("+", " + ").replace("-", " - ").replace("×", " × ").replace("÷", " ÷ ");
66
           item.Example[0] = item.Example[0].replace("+", " + ").replace("-", " - ").replace("×", " × ").replace("÷", " ÷ ");
56
           item.Example[1] = item.Example[1].replace("+", " + ").replace("-", " - ").replace("×", " × ").replace("÷", " ÷ ");
67
           item.Example[1] = item.Example[1].replace("+", " + ").replace("-", " - ").replace("×", " × ").replace("÷", " ÷ ");
68
+          item.IconName = app.globalData.fileUrl+item.IconName;
57
           if (item.Name.length>12)
69
           if (item.Name.length>12)
58
             item.NameClass="text2";
70
             item.NameClass="text2";
59
           break;
71
           break;
@@ -74,15 +86,46 @@ Page({
74
     wx.navigateTo({
86
     wx.navigateTo({
75
       url: '../main/answer',
87
       url: '../main/answer',
76
     });
88
     });
89
+    this.closeHelp2();
77
   },
90
   },
78
   getFinish: function () {
91
   getFinish: function () {
92
+    this.setData({
93
+      ShowLoading: true,
94
+    });
79
     wx.hideLoading();
95
     wx.hideLoading();
80
     arrAnswerID = [];
96
     arrAnswerID = [];
81
     tempAnswerList=[];
97
     tempAnswerList=[];
82
     this.getAnswerID();
98
     this.getAnswerID();
83
     this.getList(this.data.ID);
99
     this.getList(this.data.ID);
84
-  },
85
 
100
 
101
+    this.closeHelp();
102
+  },
103
+  //重新生成试卷
104
+  ResetFinish:function(){
105
+    var that=this;
106
+    wx.showLoading({
107
+      title:"正在重置",
108
+      complete:function(){
109
+        var list = that.data.arrPage;
110
+        for (var i = 0; i < list.length; i++) {
111
+          wx.removeSavedFile({
112
+            filePath: list[i].TempImagePath
113
+          });
114
+        }
115
+        that.setData({
116
+          arrPage: [],
117
+          PageNumber: 1,
118
+        });
119
+        var tempList = wx.getStorageSync("AnswerList");
120
+        for (var i = 0; i < list.length; i++) {
121
+          tempList.shift();
122
+        }
123
+        wx.setStorageSync("AnswerList", tempList);
124
+        wx.hideLoading();
125
+        that.getFinish();
126
+      }
127
+    });
128
+  },
86
   getList: function (id) {
129
   getList: function (id) {
87
     var that = this;
130
     var that = this;
88
     var pageNum = that.data.PageNumber;
131
     var pageNum = that.data.PageNumber;
@@ -95,7 +138,6 @@ Page({
95
       //console.log("UserInfo:" + data);
138
       //console.log("UserInfo:" + data);
96
       if (data) {
139
       if (data) {
97
         that.setData({
140
         that.setData({
98
-          ShowLoading: true,
99
           IsFinished: true,
141
           IsFinished: true,
100
           arrPage: [],
142
           arrPage: [],
101
           IsDistabled: "",
143
           IsDistabled: "",
@@ -103,8 +145,10 @@ Page({
103
         });
145
         });
104
 
146
 
105
         QuestionItem = data;
147
         QuestionItem = data;
148
+        QuestionItem.IconName = that.data.QuestionTypeItem.IconName;
106
 
149
 
107
         if (isAndroid) {
150
         if (isAndroid) {
151
+          console.log("android");
108
           var ctx = wx.createCanvasContext("Canvas", that);
152
           var ctx = wx.createCanvasContext("Canvas", that);
109
           ctx.fillRect(0, 0, 1050, 1485);
153
           ctx.fillRect(0, 0, 1050, 1485);
110
           ctx.draw(true, function (n) {
154
           ctx.draw(true, function (n) {
@@ -145,22 +189,14 @@ Page({
145
     item.AnswerID = arrAnswerID.shift();
189
     item.AnswerID = arrAnswerID.shift();
146
 
190
 
147
     var ctx = wx.createCanvasContext("Canvas", that);
191
     var ctx = wx.createCanvasContext("Canvas", that);
192
+    ctx.setTextAlign('left');
193
+    ctx.setTextBaseline('top');
194
+    ctx.setFontSize(12);
148
     ctx.setFillStyle('white');
195
     ctx.setFillStyle('white');
196
+
149
     ctx.fillRect(0, 0, 2100, 2970);
197
     ctx.fillRect(0, 0, 2100, 2970);
150
     ctx.fillStyle = "#000000";
198
     ctx.fillStyle = "#000000";
151
-
152
-    //计算数组最大长度
153
-    var maxLength = 0;
154
-    for (var l = 0; l < item.QuestionList.length; l++) {
155
-      var num1 = item.QuestionList[l];
156
-      if (num1.Vertical) {
157
-        for (var n = 0; n < num1.Vertical.length; n++) {
158
-          if (maxLength < num1.Vertical[n].Array.length)
159
-            maxLength = num1.Vertical[n].Array.length;
160
-        }
161
-      }
162
-    }
163
-
199
+    
164
     var xStart = 60;
200
     var xStart = 60;
165
     var yStart = 247;
201
     var yStart = 247;
166
 
202
 
@@ -173,7 +209,7 @@ Page({
173
       height = 250;
209
       height = 250;
174
     //括号
210
     //括号
175
     var index = 0;
211
     var index = 0;
176
-    ctx.setFontSize(12);
212
+    
177
     for (var i = 0; i < 3; i++) {
213
     for (var i = 0; i < 3; i++) {
178
       for (var j = 0; j < item.PageCount / 3; j++) {
214
       for (var j = 0; j < item.PageCount / 3; j++) {
179
         index++;
215
         index++;
@@ -236,11 +272,11 @@ Page({
236
             var len = getLength(equation[n]);
272
             var len = getLength(equation[n]);
237
             num += len;
273
             num += len;
238
             if (equation[n] == ".") {
274
             if (equation[n] == ".") {
239
-              ctx.fillText(equation[n], num + 3, yStart + j * 59);
275
+              ctx.fillText(equation[n], num + 3, yStart + j * 59-5);
240
             } else {
276
             } else {
241
-              var h = 0;
277
+              var h = -8;
242
               if (equation[n] == "_")
278
               if (equation[n] == "_")
243
-                h = 8;
279
+                h = 0;
244
               ctx.fillText(equation[n], num, yStart + j * 59 + h);
280
               ctx.fillText(equation[n], num, yStart + j * 59 + h);
245
             }
281
             }
246
           }
282
           }
@@ -255,44 +291,35 @@ Page({
255
           if (num1.OperateAB == "÷")
291
           if (num1.OperateAB == "÷")
256
             width = 240;
292
             width = 240;
257
 
293
 
258
-          //console.log(num1);
259
-          for (var n = 0; n < num1.Vertical.length; n++) {
260
-            if (maxLength > num1.Vertical[n].Array.length) {
261
-              if (num1.OperateAB != "÷"){
262
-                var str="";
263
-                if (num1.Vertical[n].Type=="line")
264
-                  str="1"
265
-                num1.Vertical[n].Array.splice(1, 0, str);
266
-              }
267
-            }
268
-          }
269
-          console.log(num1);
270
-
271
-
272
           for (var n = 0; n < num1.Vertical.length; n++) {
294
           for (var n = 0; n < num1.Vertical.length; n++) {
273
             var num = xStart + i * 310 + width;
295
             var num = xStart + i * 310 + width;
296
+            var num2=0;
274
             for (var m = num1.Vertical[n].Array.length - 1; m >= 0; m--) {
297
             for (var m = num1.Vertical[n].Array.length - 1; m >= 0; m--) {
275
               var str = "";
298
               var str = "";
276
               if (num1.Vertical[n].Type == "line") {
299
               if (num1.Vertical[n].Type == "line") {
300
+                if (num1.OperateAB != "÷") {
301
+                  //var lineLength = num1.Vertical[n].Array.length * 30 + 20;
302
+                  var lineLength = 6 * 30 + 20;
303
+                  var lineTop = 4;
304
+                  
305
+                  //console.log(yStart + j * height + n * 30 + lineTop);
306
+                  ctx.moveTo(num, yStart + j * height + n * 30 + lineTop);
307
+                  ctx.lineTo(num - lineLength, yStart + j * height + n * 30 + lineTop);
308
+                  ctx.stroke();
277
 
309
 
278
-                var lineLength = num1.Vertical[n].Array.length * 30 + 20;
279
-                if (num1.OperateAB == "÷") {
280
-                  lineLength = num1.A.toString().length * 30;
281
-                }
282
-                ctx.moveTo(num, yStart + j * height + n * 30);
283
-                ctx.lineTo(num - lineLength, yStart + j * height + n * 30);
284
-                ctx.stroke();
285
-
286
-                if (num1.OperateAB != "÷")
287
                   isAnswer = true;
310
                   isAnswer = true;
288
-                break;
311
+                  break;
312
+                }
289
               }
313
               }
290
               else {
314
               else {
291
                 str = num1.Vertical[n].Array[m];
315
                 str = num1.Vertical[n].Array[m];
292
 
316
 
293
                 if (num1.OperateAB == "÷" && str == "√") {
317
                 if (num1.OperateAB == "÷" && str == "√") {
294
                   isAnswer = true;
318
                   isAnswer = true;
295
-                  ctx.drawImage("../../images/formula_division_size02.png", num - (num1.Vertical[n].Array.length - m) * 30 - 20, yStart + j * height + n * 30 - 31, 56, 76);
319
+                  var lineLength = num1.A.toString().length;
320
+                  var lineWidth = Math.floor(57 * (1 + num1.A.toString().length) / 2);
321
+
322
+                  ctx.drawImage("../../images/formula_division_size0" + lineLength + ".png", num - (num1.Vertical[n].Array.length - m) * 30 - 8, yStart + j * height + n * 30-10, lineWidth, 39);
296
                   //break;
323
                   //break;
297
                 }
324
                 }
298
                 else if (num1.OperateAB == "÷" && n == 0) {
325
                 else if (num1.OperateAB == "÷" && n == 0) {
@@ -301,10 +328,19 @@ Page({
301
                   ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 10, yStart + j * height + n * 30);
328
                   ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 10, yStart + j * height + n * 30);
302
                 }
329
                 }
303
                 else {
330
                 else {
304
-                  ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 30, yStart + j * height + n * 30);
331
+                  if (str == ".") {
332
+                    ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 30 + 15, yStart + j * height + n * 30);
333
+                    num2 = 30;
334
+                  }
335
+                  else if (str == "+" || str == "-" || str == "−" || str == "×" || str == "÷") {
336
+                    var lineLength = 6 * 30 ;
337
+                    ctx.fillText(str, num - lineLength, yStart + j * height + n * 30);
338
+                    num2 = 30;
339
+                  }
340
+                  else
341
+                    ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 30+num2, yStart + j * height + n * 30);
305
                 }
342
                 }
306
               }
343
               }
307
-
308
             }
344
             }
309
             if (isAnswer)
345
             if (isAnswer)
310
               break;
346
               break;
@@ -315,14 +351,13 @@ Page({
315
     }
351
     }
316
 
352
 
317
     ctx.setTextAlign('left');
353
     ctx.setTextAlign('left');
318
-    ctx.setTextBaseline('top');
319
     ctx.setFontSize(32);
354
     ctx.setFontSize(32);
320
     ctx.fillText(item.Name, 60, 45);
355
     ctx.fillText(item.Name, 60, 45);
321
 
356
 
322
 
357
 
323
     ctx.setFontSize(12);
358
     ctx.setFontSize(12);
324
     ctx.fillText(item.CagegoryName, 60, 90);
359
     ctx.fillText(item.CagegoryName, 60, 90);
325
-    ctx.fillText("共" + item.QuestionList.length + "道题", 60, 125);
360
+    ctx.fillText("共" + item.PageCount + "道题", 60, 125);
326
     ctx.fillText("第 1 / 1 页", 60, 147);
361
     ctx.fillText("第 1 / 1 页", 60, 147);
327
     ctx.fillText("答案检索号", 768, 60);
362
     ctx.fillText("答案检索号", 768, 60);
328
 
363
 
@@ -343,8 +378,8 @@ Page({
343
         y: 0,
378
         y: 0,
344
         width: w * times,
379
         width: w * times,
345
         height: h * times,
380
         height: h * times,
346
-        //destWidth: w*times,
347
-        //destHeight: h*times,
381
+        destWidth: w*times,
382
+        destHeight: h*times,
348
         canvasId: 'Canvas',
383
         canvasId: 'Canvas',
349
         success: function (res2) {
384
         success: function (res2) {
350
           console.log(res2.tempFilePath);
385
           console.log(res2.tempFilePath);
@@ -367,10 +402,9 @@ Page({
367
             });
402
             });
368
 
403
 
369
             wx.pageScrollTo({
404
             wx.pageScrollTo({
370
-              scrollTop: 710,
405
+              scrollTop: 0,
371
               duration: 300
406
               duration: 300
372
             });
407
             });
373
-
374
             // wx.previewImage({
408
             // wx.previewImage({
375
             //   current: that.data.arrPage[0], // 当前显示图片的http链接
409
             //   current: that.data.arrPage[0], // 当前显示图片的http链接
376
             //   urls: that.data.arrPage // 需要预览的图片http链接列表
410
             //   urls: that.data.arrPage // 需要预览的图片http链接列表
@@ -394,6 +428,10 @@ Page({
394
             }
428
             }
395
             wx.setStorageSync("AnswerList", tempList);
429
             wx.setStorageSync("AnswerList", tempList);
396
 
430
 
431
+            common.getStorageValue(that, "HelpHidden7", false, function () {
432
+              that.showHelp2();
433
+            });
434
+            
397
           }
435
           }
398
         }
436
         }
399
       })
437
       })
@@ -443,17 +481,19 @@ Page({
443
               that.setData({
481
               that.setData({
444
                 IsDistabled: "Distabled",
482
                 IsDistabled: "Distabled",
445
               });
483
               });
446
-
447
               wx.pageScrollTo({
484
               wx.pageScrollTo({
448
-                scrollTop: 1010,
485
+                scrollTop: 400,
449
                 duration: 300
486
                 duration: 300
450
               });
487
               });
451
-
452
             }
488
             }
453
           },
489
           },
454
           fail(err3) {
490
           fail(err3) {
455
             console.log(err3);
491
             console.log(err3);
492
+            wx.openSetting();
456
           },
493
           },
494
+          complete(){
495
+            wx.hideLoading();
496
+          }
457
         })
497
         })
458
       }
498
       }
459
     }
499
     }
@@ -461,13 +501,20 @@ Page({
461
   changePageNumber: function (e) {
501
   changePageNumber: function (e) {
462
     var id = Number(e.currentTarget.dataset.id);
502
     var id = Number(e.currentTarget.dataset.id);
463
     this.data.PageNumber += id;
503
     this.data.PageNumber += id;
464
-    if (this.data.PageNumber < 1)
504
+    var addDisabled="",subDisabled="";
505
+    if (this.data.PageNumber < 1){
465
       this.data.PageNumber = 1;
506
       this.data.PageNumber = 1;
466
-    else if (this.data.PageNumber > 4)
507
+      subDisabled ="btnAddSubDisabled";
508
+    }
509
+    else if (this.data.PageNumber > 4){
467
       this.data.PageNumber = 4;
510
       this.data.PageNumber = 4;
511
+      addDisabled = "btnAddSubDisabled";
512
+    }
468
 
513
 
469
     this.setData({
514
     this.setData({
470
       PageNumber: this.data.PageNumber,
515
       PageNumber: this.data.PageNumber,
516
+      AddDisabled: addDisabled,
517
+      SubDisabled: subDisabled,
471
     });
518
     });
472
   },
519
   },
473
   showImage: function (e) {
520
   showImage: function (e) {
@@ -509,17 +556,42 @@ Page({
509
       IsShowMenu: true,
556
       IsShowMenu: true,
510
     });
557
     });
511
   },
558
   },
559
+  showHelp: function () {
560
+    if (!this.data.HelpHidden3) {
561
+      this.audioCtx = wx.createAudioContext('myAudio');
562
+      var str = "嘿嘿,找到我了吗?我在车间的窗户里制作例题呢。如果这是你要的题型,去点“出题”按钮就对了。还要告诉你,一张卷子就是一张图片,题目数量请看提示。";
563
+      server.playAudio(this.audioCtx, str);
564
+    }
565
+  },
566
+  closeHelp: function () {
567
+    this.setData({
568
+      HelpHidden3: true,
569
+    });
570
+    wx.setStorageSync("HelpHidden3", true);
571
+    this.audioCtx = wx.createAudioContext('myAudio');
572
+    this.audioCtx.pause();
573
+  },
574
+
575
+  showHelp2: function () {
576
+    if (!this.data.HelpHidden7) {
577
+      this.audioCtx = wx.createAudioContext('myAudio');
578
+      var str = "卷子出炉咯,棒棒哒!快去手机相册打印吧。我会等在首页上的答案资料室为你继续带路的。";
579
+      server.playAudio(this.audioCtx, str);
580
+    }
581
+  },
582
+  closeHelp2: function () {
583
+    this.setData({
584
+      HelpHidden7: true,
585
+    });
586
+    wx.setStorageSync("HelpHidden7", true);
587
+    this.audioCtx = wx.createAudioContext('myAudio');
588
+    this.audioCtx.pause();
589
+  },
512
   onShareAppMessage: function () {
590
   onShareAppMessage: function () {
513
     return {
591
     return {
514
-      title: '',
515
-      path: 'pages/index/index',
516
-      success: function (res) { },
517
-      fail: function (err) {
518
-        console.log(err);
519
-      },
520
-      complete: function (res) {
521
-        console.log(res);
522
-      },
592
+      title: app.globalData.ShareTitle,
593
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
594
+      imageUrl: app.globalData.ShareImageUrl,
523
     }
595
     }
524
   },
596
   },
525
 })
597
 })

+ 65 - 58
pages/main/detail.wxml

@@ -1,83 +1,87 @@
1
 <view class="container FlexColumn" style="min-height:{{Containnerheight}}rpx;">
1
 <view class="container FlexColumn" style="min-height:{{Containnerheight}}rpx;">
2
-  <image class="makepaper_headline_illus_lab" src="../../images/makepaper_headline_illus_lab.png" />
3
-  <image class="questioncard_icon desaturate" src="{{FileUrl}}questioncard_icon_grade0606_size01.png" />
4
-  <view class="Example">
5
-    <view class="Example1">
6
-      {{QuestionTypeItem.Example[0]}}
7
-    </view>
8
-    <view class="Example1">
9
-      {{QuestionTypeItem.Example[1]}}
2
+  <block wx:if="{{!IsFinished}}">
3
+    <image class="makepaper_headline_illus_lab" src="../../images/makepaper_headline_illus_lab.png" />
4
+    <image class="questioncard_icon desaturate" src="{{QuestionTypeItem.IconName}}" />
5
+    <view class="Example">
6
+      <view class="Example1">
7
+        {{QuestionTypeItem.Example[0]}}
8
+      </view>
9
+      <view class="Example1">
10
+        {{QuestionTypeItem.Example[1]}}
11
+      </view>
10
     </view>
12
     </view>
11
-  </view>
12
 
13
 
13
-  <image class="makepaper_headline_illus_windows" src="../../images/makepaper_headline_illus_windows.png" />
14
-  <view class="line0"></view>
15
-  <view class="line1 FlexColumn">
16
-    <image class="makepaper_headline_illus_board FlexColumn" src="../../images/makepaper_headline_illus_board.png" />
17
-    <view class="{{QuestionTypeItem.NameClass}} text">
18
-      {{QuestionTypeItem.Name}}
14
+    <image class="makepaper_headline_illus_windows" src="../../images/makepaper_headline_illus_windows.png" />
15
+    <view class="line0"></view>
16
+    <view class="line1 FlexColumn">
17
+      <image class="makepaper_headline_illus_board FlexColumn" src="../../images/makepaper_headline_illus_board.png" />
18
+      <view class="{{QuestionTypeItem.NameClass}} text">
19
+        {{QuestionTypeItem.Name}}
20
+      </view>
19
     </view>
21
     </view>
20
-  </view>
21
-  <view class="line2"></view>
22
-  <view class="line3">
23
-
24
-  </view>
25
-  <view class="line4"></view>
26
-  <view class="panel1 FlexColumn">
27
-    <view class="text1">算式类型</view>
22
+    <view class="line2"></view>
23
+    <view class="line3">
28
 
24
 
29
-    <block wx:if="{{QuestionTypeItem.QuestionNumber3==0}}">
30
-      <view class="text2">横式</view>
31
-      <view class="text3 FlexRow">
32
-        <image class="universalpic_attention_black_size01" src="../../images/universalpic_attention_black_size01.png" />
33
-        <view class="text31">本知识点不适用竖式运算</view>
34
-      </view>
35
-    </block>
25
+    </view>
26
+    <view class="line4"></view>
27
+    <view class="panel1 FlexColumn">
28
+      <view class="text1">算式类型</view>
29
+
30
+      <block wx:if="{{QuestionTypeItem.QuestionNumber3==0}}">
31
+        <view class="text2">横式</view>
32
+        <view class="text3 FlexRow">
33
+          <image class="universalpic_attention_black_size01" src="../../images/universalpic_attention_black_size01.png" />
34
+          <view class="text31">本知识点不适用竖式运算</view>
35
+        </view>
36
+      </block>
36
 
37
 
37
-    <block wx:if="{{QuestionTypeItem.QuestionNumber3>0}}">
38
-      <view class="text2_1"></view>
39
-      <image class="universalpic_indicator_cell_size01" src="../../images/universalpic_indicator_cell_size01.png" />
40
-      <view class="panel10 FlexRow" bindtap='openMenu'>
41
-        <view class="btnSelect">
38
+      <block wx:if="{{QuestionTypeItem.QuestionNumber3>0}}">
39
+        <view class="text2_1"></view>
40
+        <image class="universalpic_indicator_cell_size01" src="../../images/universalpic_indicator_cell_size01.png" />
41
+        <view class="panel10 FlexRow" bindtap='openMenu'>
42
+          <view class="btnSelect">
42
 
43
 
43
-          <block wx:if="{{filter=='horizontal'}}">横式</block>
44
-          <block wx:if="{{filter=='vertical'}}">竖式</block>
45
-          <!-- <block wx:if="{{filter=='all'}}">横式+竖式</block> -->
44
+            <block wx:if="{{filter=='horizontal'}}">横式</block>
45
+            <block wx:if="{{filter=='vertical'}}">竖式</block>
46
+            <!-- <block wx:if="{{filter=='all'}}">横式+竖式</block> -->
46
 
47
 
48
+          </view>
49
+          <view class="btnAddSub"></view>
47
         </view>
50
         </view>
48
-        <view class="btnAddSub"></view>
49
-      </view>
50
-    </block>
51
+      </block>
51
 
52
 
52
-    <image class="universalpic_line_dashed_size01" src="../../images/universalpic_line_dashed_size01.png" />
53
-
54
-    <view class="text4">制作几张</view>
53
+      <image class="universalpic_line_dashed_size01" src="../../images/universalpic_line_dashed_size01.png" />
55
 
54
 
56
-    <image class="universalpic_value_cell_size01" src="../../images/universalpic_value_cell_size01.png" />
57
-    <view class="panel10 FlexRow">
58
-      <view class="btnAddSub" bindtap='changePageNumber' data-id="-1"></view>
59
-      <view class="Number">{{PageNumber}}</view>
60
-      <view class="btnAddSub" bindtap='changePageNumber' data-id="1"></view>
61
-    </view>
55
+      <view class="text4">制作几张卷子</view>
62
 
56
 
63
-    <view class="text5">每张含 {{PageCount}} 道题目</view>
57
+      <image class="universalpic_value_cell_size01" src="../../images/universalpic_value_cell_size01.png" />
58
+      <view class="panel10 FlexRow">
59
+        <view class="{{SubDisabled}} btnAddSub" bindtap='changePageNumber' data-id="-1"></view>
60
+        <view class="Number">{{PageNumber}}</view>
61
+        <view class="{{AddDisabled}} btnAddSub" bindtap='changePageNumber' data-id="1"></view>
62
+      </view>
64
 
63
 
65
-    <image class="universalpic_line_dashed_size01" src="../../images/universalpic_line_dashed_size01.png" />
64
+      <view class="text5">每张含 {{PageCount}} 道题目</view>
66
 
65
 
67
-    <view class="btn" bindtap='getFinish'>
68
-      <view class="btn1">
69
-        出题
66
+      <view class="btnStart" bindtap='getFinish'>
67
+        <view class="btnStart1">
68
+          出题
69
+        </view>
70
       </view>
70
       </view>
71
     </view>
71
     </view>
72
-  </view>
73
-  <image class="universalpic_line_zigzag_black_down" src="../../images/universalpic_line_zigzag_black_down.png" />
72
+  </block>
73
+
74
   <block wx:if="{{IsFinished}}">
74
   <block wx:if="{{IsFinished}}">
75
-    <image class="universalpic_line_zigzag_black_up" src="../../images/universalpic_line_zigzag_black_up.png" />
76
     <view class="panel2 FlexColumn">
75
     <view class="panel2 FlexColumn">
77
       <view class="panel20 FlexRow">
76
       <view class="panel20 FlexRow">
78
         <image class="universalpic_right_white_size01" src="../../images/universalpic_right_white_size01.png" />
77
         <image class="universalpic_right_white_size01" src="../../images/universalpic_right_white_size01.png" />
79
       </view>
78
       </view>
80
       <view class="text6">题目出好了,共有 {{arrPage.length}} 张卷子图片</view>
79
       <view class="text6">题目出好了,共有 {{arrPage.length}} 张卷子图片</view>
80
+      <view class="androidPanel FlexRow" wx:if="{{ShowAndroidNotice}}" bindtap='ResetFinish'>
81
+        <image class="universalpic_attention_blue_size01" src="../../images/universalpic_attention_blue_size01.png" />
82
+        <view class="text">由于微信BUG,安卓用户如遇卷面紊乱请</view>
83
+        <view class="text2">重新出题</view>
84
+      </view>
81
       <view class="panel21 FlexRow">
85
       <view class="panel21 FlexRow">
82
         <image class="panel210" wx:for="{{arrPage}}" wx:key="index" src="{{item}}" data-id='{{index}}' bindtap='showImage' />
86
         <image class="panel210" wx:for="{{arrPage}}" wx:key="index" src="{{item}}" data-id='{{index}}' bindtap='showImage' />
83
       </view>
87
       </view>
@@ -161,4 +165,7 @@
161
   </view>
165
   </view>
162
 
166
 
163
 </view>
167
 </view>
168
+<image hidden="{{HelpHidden3}}" bindtap='closeHelp' class="Help_aside_makepaper" src="../../images/Help_aside_makepaper.png" />
169
+<image hidden="{{HelpHidden7}}" bindtap='closeHelp2' class="Help_aside_savepaper" src="../../images/Help_aside_savepaper.png" />
170
+<audio hidden='true' id="myAudio"></audio>
164
 <canvas class='Canvas' canvas-id="Canvas"></canvas>
171
 <canvas class='Canvas' canvas-id="Canvas"></canvas>

+ 79 - 11
pages/main/detail.wxss

@@ -87,15 +87,18 @@
87
 
87
 
88
 .panel1 {
88
 .panel1 {
89
   width: 680rpx;
89
   width: 680rpx;
90
-  height: 854rpx;
90
+  height: 782rpx;
91
   background-color: #262626;
91
   background-color: #262626;
92
   margin-top: -30rpx;
92
   margin-top: -30rpx;
93
   z-index: 10;
93
   z-index: 10;
94
   color:#9B9B9B;
94
   color:#9B9B9B;
95
   justify-content: flex-start;
95
   justify-content: flex-start;
96
+
97
+  border-bottom-left-radius: 40rpx;
98
+  border-bottom-right-radius: 40rpx;
96
 }
99
 }
97
 .panel1 .text1{
100
 .panel1 .text1{
98
-  font-size:32rpx;
101
+  font-size:36rpx;
99
   margin-top: 60rpx;
102
   margin-top: 60rpx;
100
 }
103
 }
101
 .panel1 .text2{
104
 .panel1 .text2{
@@ -131,22 +134,23 @@
131
   color:#D2D2D2;
134
   color:#D2D2D2;
132
   text-align: center;
135
   text-align: center;
133
   line-height: 90rpx;
136
   line-height: 90rpx;
137
+  margin-top: 15rpx;
134
 }
138
 }
135
 .universalpic_line_dashed_size01{
139
 .universalpic_line_dashed_size01{
136
   width:634rpx;
140
   width:634rpx;
137
   height:4rpx;
141
   height:4rpx;
138
-  margin-top: 40rpx;
142
+  margin-top: 52rpx;
139
 }
143
 }
140
 
144
 
141
 .panel1 .text4{
145
 .panel1 .text4{
142
-  font-size:32rpx;
146
+  font-size:36rpx;
143
   margin-top: 40rpx;
147
   margin-top: 40rpx;
144
 }
148
 }
145
 
149
 
146
 .universalpic_value_cell_size01{
150
 .universalpic_value_cell_size01{
147
   width:400rpx;
151
   width:400rpx;
148
   height:104rpx;
152
   height:104rpx;
149
-  margin-top: 20rpx;
153
+  margin-top: 30rpx;
150
 }
154
 }
151
 
155
 
152
 .panel1 .panel10{
156
 .panel1 .panel10{
@@ -158,22 +162,50 @@
158
 
162
 
159
 .panel1 .btnAddSub{
163
 .panel1 .btnAddSub{
160
   width:90rpx;
164
   width:90rpx;
161
-  height:104rpx;
165
+  height:84rpx;
166
+  margin-top: 5rpx;
167
+  border-radius: 8rpx;
168
+}
169
+.panel1 .btnAddSubDisabled{
170
+  background-color: rgba(46, 46, 46, 0.7);
162
 }
171
 }
163
 
172
 
164
 .panel1 .Number{
173
 .panel1 .Number{
165
   color:#D2D2D2;
174
   color:#D2D2D2;
166
   font-size: 36rpx;
175
   font-size: 36rpx;
167
-  margin-top: -14rpx;
176
+  margin-top: 0rpx;
168
 }
177
 }
169
 
178
 
170
 .panel1 .text5{
179
 .panel1 .text5{
171
   font-size:24rpx;
180
   font-size:24rpx;
172
-  margin-top: 20rpx;
181
+  margin-top: 30rpx;
173
   color:#868686;
182
   color:#868686;
174
   font-weight: 400;
183
   font-weight: 400;
175
 }
184
 }
176
 
185
 
186
+
187
+.btnStart {
188
+  width: 680rpx;
189
+  height: 160rpx;
190
+  background-color: #7D2B25;
191
+  border-bottom-left-radius: 40rpx;
192
+  border-bottom-right-radius: 40rpx;
193
+  position: relative;
194
+  margin-top: 80rpx;
195
+}
196
+
197
+.btnStart1 {
198
+  width: 100%;
199
+  height: 130rpx;
200
+  background-color: #B3443B;
201
+  border-bottom-left-radius: 40rpx;
202
+  border-bottom-right-radius: 40rpx;
203
+  line-height: 130rpx;
204
+  text-align: center;
205
+  color: #DEC2B8;
206
+  font-size: 56rpx;
207
+}
208
+
177
 .btn {
209
 .btn {
178
   width: 600rpx;
210
   width: 600rpx;
179
   height: 130rpx;
211
   height: 130rpx;
@@ -221,7 +253,7 @@
221
   width: 680rpx;
253
   width: 680rpx;
222
   height: 1384rpx;
254
   height: 1384rpx;
223
   background-color: #262626;
255
   background-color: #262626;
224
-  margin-top: -30rpx;
256
+  margin-top: 40rpx;
225
   z-index: 10;
257
   z-index: 10;
226
   border-bottom-left-radius: 20rpx;
258
   border-bottom-left-radius: 20rpx;
227
   border-bottom-right-radius: 20rpx;
259
   border-bottom-right-radius: 20rpx;
@@ -234,7 +266,7 @@
234
   width: 100rpx;
266
   width: 100rpx;
235
   height: 100rpx;
267
   height: 100rpx;
236
   background-color: #19C575;
268
   background-color: #19C575;
237
-  margin-top: 80rpx;
269
+  margin-top: 140rpx;
238
   border-radius: 50%;
270
   border-radius: 50%;
239
 }
271
 }
240
 
272
 
@@ -244,6 +276,28 @@
244
   color:#9B9B9B;
276
   color:#9B9B9B;
245
 }
277
 }
246
 
278
 
279
+.panel2 .androidPanel{
280
+  width: 100%;
281
+  height: 70rpx;
282
+  background-color: #2E2E2E;
283
+  margin: 30rpx 0 0 0;
284
+}
285
+
286
+.universalpic_attention_blue_size01{
287
+  width: 20rpx;
288
+  height: 20rpx;
289
+  margin-right: 10rpx;
290
+}
291
+.panel2 .androidPanel .text{
292
+  color:#787878;
293
+  font-size:24rpx;
294
+}
295
+.panel2 .androidPanel .text2{
296
+  color:#fff;
297
+  font-size:24rpx;
298
+  text-decoration:underline;
299
+}
300
+
247
 .btn2 {
301
 .btn2 {
248
   margin-top: 60rpx;
302
   margin-top: 60rpx;
249
 }
303
 }
@@ -252,7 +306,7 @@
252
   width: 600rpx;
306
   width: 600rpx;
253
   margin-top: 40rpx;
307
   margin-top: 40rpx;
254
   flex-wrap: wrap;
308
   flex-wrap: wrap;
255
-  justify-content: flex-start;
309
+  justify-content: center;
256
 }
310
 }
257
 .panel2 .panel210{
311
 .panel2 .panel210{
258
   width: 130rpx;
312
   width: 130rpx;
@@ -466,5 +520,19 @@
466
   height:26rpx;
520
   height:26rpx;
467
 }
521
 }
468
 
522
 
523
+.Help_aside_makepaper{
524
+  width: 100%;
525
+  height: 320rpx;
526
+  position: fixed;
527
+  bottom: 0rpx;
528
+  z-index: 100;
529
+}
469
 
530
 
531
+.Help_aside_savepaper{
532
+  width: 100%;
533
+  height: 270rpx;
534
+  position: fixed;
535
+  bottom: 0rpx;
536
+  z-index: 100;
537
+}
470
 
538
 

+ 34 - 20
pages/main/item.js

@@ -9,7 +9,6 @@ var audioArray = [];
9
 Page({
9
 Page({
10
   data: {
10
   data: {
11
     version: app.globalData.version,
11
     version: app.globalData.version,
12
-    FileUrl: app.globalData.fileUrl,
13
     IsPlaying: 0,
12
     IsPlaying: 0,
14
     PlayStr: "本",
13
     PlayStr: "本",
15
     selectTab0: "btn1",
14
     selectTab0: "btn1",
@@ -17,13 +16,17 @@ Page({
17
     selectTab2: "",
16
     selectTab2: "",
18
   },
17
   },
19
   onLoad: function (options) {
18
   onLoad: function (options) {
20
-    this.audioCtx = wx.createAudioContext('myAudio');
21
-
19
+    var that=this;
20
+    this.audioCtxNumber = wx.createAudioContext('numberAudio');
21
+    
22
     this.setData({
22
     this.setData({
23
       Containnerheight: server.getWindowHeight(),
23
       Containnerheight: server.getWindowHeight(),
24
       IsPlaying: 0,
24
       IsPlaying: 0,
25
     });
25
     });
26
     audioArray = [];
26
     audioArray = [];
27
+    currentIndex=0;
28
+    tempCurrentIndex = -1;
29
+
27
     var id = options.id;
30
     var id = options.id;
28
     this.getItem(id);
31
     this.getItem(id);
29
 
32
 
@@ -31,6 +34,13 @@ Page({
31
       title: "试卷答案 " + id,
34
       title: "试卷答案 " + id,
32
     });
35
     });
33
 
36
 
37
+    common.getStorageValue(this, "HelpHidden6", false, function () { 
38
+      that.showHelp();
39
+    });
40
+
41
+  },
42
+  onUnload:function(){
43
+    this.closeHelp();
34
   },
44
   },
35
   scrollTop: function (e) {
45
   scrollTop: function (e) {
36
     var id = Number(e.currentTarget.dataset.id);
46
     var id = Number(e.currentTarget.dataset.id);
@@ -131,10 +141,10 @@ Page({
131
   playAudioStart: function () {
141
   playAudioStart: function () {
132
 
142
 
133
     if (this.data.IsPlaying == 1) {
143
     if (this.data.IsPlaying == 1) {
134
-      this.audioCtx.pause();
144
+      this.audioCtxNumber.pause();
135
     }
145
     }
136
     else if (this.data.IsPlaying == -1) {
146
     else if (this.data.IsPlaying == -1) {
137
-      this.audioCtx.play();
147
+      this.audioCtxNumber.play();
138
     }
148
     }
139
     else if (this.data.IsPlaying == 0) {
149
     else if (this.data.IsPlaying == 0) {
140
       var arr = [];
150
       var arr = [];
@@ -180,12 +190,7 @@ Page({
180
       });
190
       });
181
       return;
191
       return;
182
     } else {
192
     } else {
183
-      var url = app.globalData.audioUrlBaidu;
184
-      url = url.replace("[token]", app.globalData.BaiduToken);
185
-      url = url.replace("[word]", audioArray[currentIndex].join(","));
186
-      console.log(url);
187
-      this.audioCtx.setSrc(url);
188
-      this.audioCtx.play();
193
+      server.playAudio(this.audioCtxNumber, audioArray[currentIndex].join(","));
189
     }
194
     }
190
   },
195
   },
191
   onPlayEnded: function (e) {
196
   onPlayEnded: function (e) {
@@ -208,17 +213,26 @@ Page({
208
       PlayStr: playstr,
213
       PlayStr: playstr,
209
     });
214
     });
210
   },
215
   },
216
+  showHelp: function () {
217
+    if (!this.data.HelpHidden6) {
218
+      this.audioCtx = wx.createAudioContext('myAudio');
219
+      var str = "Nice,让我用30秒讲完最后的帮助。答案靠左,题目居右,如果发现题目右侧有图标,说明这是一道竖式题,点击图标可以检查解题步骤,这是独门神器,对找出问题所在非常有效。期待你的好成绩,拜拜!";
220
+      server.playAudio(this.audioCtx, str);
221
+    }
222
+  },
223
+  closeHelp: function () {
224
+    this.setData({
225
+      HelpHidden6: true,
226
+    });
227
+    wx.setStorageSync("HelpHidden6", true);
228
+    this.audioCtx = wx.createAudioContext('myAudio');
229
+    this.audioCtx.pause();
230
+  },
211
   onShareAppMessage: function () {
231
   onShareAppMessage: function () {
212
     return {
232
     return {
213
-      title: '',
214
-      path: 'pages/index/index',
215
-      success: function (res) { },
216
-      fail: function (err) {
217
-        console.log(err);
218
-      },
219
-      complete: function (res) {
220
-        console.log(res);
221
-      },
233
+      title: app.globalData.ShareTitle,
234
+      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
235
+      imageUrl: app.globalData.ShareImageUrl,
222
     }
236
     }
223
   },
237
   },
224
 })
238
 })

+ 10 - 8
pages/main/item.wxml

@@ -80,13 +80,13 @@
80
     <!-- 算式(加减乘) -->
80
     <!-- 算式(加减乘) -->
81
     <view class="panelRowBody panel0 FlexColumn" wx:if="{{item.Vertical && item.OperateAB!='÷' && item.IsShowVertical}}">
81
     <view class="panelRowBody panel0 FlexColumn" wx:if="{{item.Vertical && item.OperateAB!='÷' && item.IsShowVertical}}">
82
       <view class="panelAnswer FlexColumn">
82
       <view class="panelAnswer FlexColumn">
83
-        <view class="panelAnswerRow FlexRow" wx:for='{{item.Vertical}}' wx:key="index">
84
-          <view class="panelAnswerCol FlexRow" wx:for='{{item.Array}}' wx:key="i" wx:for-item="col" wx:for-index="i">
85
-            <view class="colNumber" wx:if="{{item.Type=='number' && col!='√' && col!='.'}}">{{col}}</view>
86
-            <view class="colDot" wx:if="{{item.Type=='number' && col=='.'}}">{{col}}</view>
87
-            <view class="colLine" wx:if="{{item.Type=='line' && col=='1'}}"></view>
88
-            <view class="colLineHalf" wx:if="{{item.Type=='line' && col=='0.5'}}"></view>
89
-            <view class="colLineNull" wx:if="{{item.Type=='line' && col==''}}"></view>
83
+        <view class="panelAnswerRow FlexRow" wx:for='{{item.Vertical}}' wx:key="rowI" wx:for-item="itemChild" >
84
+          <view class="panelAnswerCol FlexRow" wx:for='{{itemChild.Array}}' wx:key="i" wx:for-item="col" wx:for-index="i">
85
+            <view class="colNumber" wx:if="{{itemChild.Type=='number' && col!='√' && col!='.'}}">{{col}}</view>
86
+            <view class="colDot" wx:if="{{itemChild.Type=='number' && col=='.'}}">{{col}}</view>
87
+            <view class="colLine" wx:if="{{itemChild.Type=='line' && col=='1'}}"></view>
88
+            <view class="colLineHalf" wx:if="{{itemChild.Type=='line' && col=='0.5'}}"></view>
89
+            <view class="colLineNull" wx:if="{{itemChild.Type=='line' && col==''}}"></view>
90
           </view>
90
           </view>
91
         </view>
91
         </view>
92
       </view>
92
       </view>
@@ -117,4 +117,6 @@
117
   <view wx:if="{{AnswerItem.PageCount<60}}" class="panelRowBody panel0 FlexRow" wx:for="{{[1,2,3]}}" wx:key="i"></view>
117
   <view wx:if="{{AnswerItem.PageCount<60}}" class="panelRowBody panel0 FlexRow" wx:for="{{[1,2,3]}}" wx:key="i"></view>
118
 
118
 
119
 </view>
119
 </view>
120
-<audio hidden='true' id="myAudio" bindended='onPlayEnded'></audio>
120
+<audio hidden='true' id="numberAudio" bindended='onPlayEnded'></audio>
121
+<audio hidden='true' id="myAudio"></audio>
122
+<image hidden="{{HelpHidden6}}" bindtap='closeHelp' class="Help_aside_answerroom_detail" src="../../images/Help_aside_answerroom_detail.png" />

+ 17 - 2
pages/main/item.wxss

@@ -235,7 +235,6 @@
235
   margin: 0rpx 0 0 28rpx;
235
   margin: 0rpx 0 0 28rpx;
236
   background-color: #000;
236
   background-color: #000;
237
 }
237
 }
238
-
239
 .imageShow{
238
 .imageShow{
240
   width: 65rpx;
239
   width: 65rpx;
241
   height:92rpx;
240
   height:92rpx;
@@ -248,4 +247,20 @@
248
   width: 16rpx;
247
   width: 16rpx;
249
   height:26rpx;
248
   height:26rpx;
250
   margin-right: 30rpx;
249
   margin-right: 30rpx;
251
-}
250
+}
251
+
252
+.Help_aside_questioncollection{
253
+  width: 100%;
254
+  height: 377rpx;
255
+  position: fixed;
256
+  bottom: 0rpx;
257
+  z-index: 100;
258
+}
259
+
260
+.Help_aside_answerroom_detail{
261
+  width: 100%;
262
+  height: 377rpx;
263
+  position: fixed;
264
+  bottom: 0rpx;
265
+  z-index: 200;
266
+}

+ 26 - 4
pages/main/list.js

@@ -10,21 +10,26 @@ var SelectID = 0;
10
 Page({
10
 Page({
11
   data: {
11
   data: {
12
     version: app.globalData.version,
12
     version: app.globalData.version,
13
-    FileUrl: app.globalData.fileUrl,
14
     filter: 'all',
13
     filter: 'all',
15
     CategoryID: 1,
14
     CategoryID: 1,
16
   },
15
   },
17
   onLoad: function (options) {
16
   onLoad: function (options) {
17
+    var that=this;
18
     categoryID = options.id;
18
     categoryID = options.id;
19
     categoryName = options.name;
19
     categoryName = options.name;
20
     categoryNum = options.num;
20
     categoryNum = options.num;
21
     //console.log(category);
21
     //console.log(category);
22
+    common.getStorageValue(this, "HelpHidden2", false, function () { 
23
+      that.showHelp();
24
+    });
25
+
22
     this.setData({
26
     this.setData({
23
       CategoryNum: categoryNum,
27
       CategoryNum: categoryNum,
24
       CategoryID: categoryID,
28
       CategoryID: categoryID,
25
       Containnerheight: server.getWindowHeight(),
29
       Containnerheight: server.getWindowHeight(),
26
     });
30
     });
27
     this.getList();
31
     this.getList();
32
+    
28
   },
33
   },
29
   getList: function () {
34
   getList: function () {
30
     this.buildList();
35
     this.buildList();
@@ -51,6 +56,8 @@ Page({
51
     wx.navigateTo({
56
     wx.navigateTo({
52
       url: '../main/detail?id=' + SelectID,
57
       url: '../main/detail?id=' + SelectID,
53
     });
58
     });
59
+
60
+    this.closeHelp();
54
   },
61
   },
55
   buildList: function () {
62
   buildList: function () {
56
     var that = this;
63
     var that = this;
@@ -65,10 +72,9 @@ Page({
65
         if (data[i].ID == arrID[j]) {
72
         if (data[i].ID == arrID[j]) {
66
           for (var k = 0; k < data[i].List.length; k++) {
73
           for (var k = 0; k < data[i].List.length; k++) {
67
             data[i].List[k].CategoryLevel = data[i].Name;
74
             data[i].List[k].CategoryLevel = data[i].Name;
68
-
69
-
75
+            data[i].List[k].IconName = app.globalData.fileUrl + data[i].List[k].IconName;
76
+            data[i].List[k].SelectItem = "boxCenter";
70
             for (var n = 0; n < arr.length; n++) {
77
             for (var n = 0; n < arr.length; n++) {
71
-              data[i].List[k].SelectItem = "boxCenter";
72
               if (arr[n] == data[i].List[k].ID) {
78
               if (arr[n] == data[i].List[k].ID) {
73
                 data[i].List[k].SelectItem = "boxLeft";
79
                 data[i].List[k].SelectItem = "boxLeft";
74
               }
80
               }
@@ -102,6 +108,22 @@ Page({
102
     });
108
     });
103
     this.buildList();
109
     this.buildList();
104
   },
110
   },
111
+  showHelp: function () {
112
+    if (!this.data.HelpHidden2) {
113
+      this.audioCtx = wx.createAudioContext('myAudio');
114
+      var str = "这里是仓库,每一层货架的箱子里都有一个知识点,很有意思吧!如果看到一个叫“有竖式”的标签,说明该题型可以打印竖式计算题,想要快速定位所有竖式题目的话,点击顶层货架就能帮你筛选。请选一只箱子继续。";
115
+      server.playAudio(this.audioCtx, str);
116
+    }
117
+  },
118
+  closeHelp: function () {
119
+    this.setData({
120
+      HelpHidden2: true,
121
+    });
122
+    wx.setStorageSync("HelpHidden2", true);
123
+    this.audioCtx = wx.createAudioContext('myAudio');
124
+    this.audioCtx.pause();
125
+  },
126
+  
105
   onShareAppMessage: function () {
127
   onShareAppMessage: function () {
106
     return {
128
     return {
107
       title: app.globalData.ShareTitle,
129
       title: app.globalData.ShareTitle,

+ 4 - 2
pages/main/list.wxml

@@ -34,7 +34,7 @@
34
       </view>
34
       </view>
35
       <view class="{{item.SelectItem}} cardCenter FlexRow">
35
       <view class="{{item.SelectItem}} cardCenter FlexRow">
36
         <image class="questioncollection_shelf_box" src="../../images/questioncollection_shelf_box.png" />
36
         <image class="questioncollection_shelf_box" src="../../images/questioncollection_shelf_box.png" />
37
-        <image class="questioncard_icon" src="{{FileUrl}}questioncard_icon_grade0602_size01.png" />
37
+        <image class="questioncard_icon" src="{{item.IconName}}" />
38
         <view class="title FlexColumn">
38
         <view class="title FlexColumn">
39
           <view class="title1">
39
           <view class="title1">
40
             {{item.Name}}
40
             {{item.Name}}
@@ -106,4 +106,6 @@
106
   <view class="line5"></view>
106
   <view class="line5"></view>
107
   <view class="line6" hidden="{{QuestionTypeList.length>0}}"></view>
107
   <view class="line6" hidden="{{QuestionTypeList.length>0}}"></view>
108
 
108
 
109
-</view>
109
+</view>
110
+<image hidden='{{HelpHidden2}}' bindtap='closeHelp' class="Help_aside_questioncollection" src="../../images/Help_aside_questioncollection.png" />
111
+<audio hidden='true' id="myAudio"></audio>

+ 12 - 1
pages/main/list.wxss

@@ -124,6 +124,7 @@
124
   width: 580rpx;
124
   width: 580rpx;
125
   height: 130rpx;
125
   height: 130rpx;
126
   position: absolute;
126
   position: absolute;
127
+  z-index: 10;
127
 }
128
 }
128
 
129
 
129
 .boxLeft {
130
 .boxLeft {
@@ -141,8 +142,9 @@
141
 .questioncard_icon {
142
 .questioncard_icon {
142
   width: 86rpx;
143
   width: 86rpx;
143
   height: 96rpx;
144
   height: 96rpx;
144
-  z-index: 10;
145
+  z-index: 20;
145
   margin-left: 30rpx;
146
   margin-left: 30rpx;
147
+  position: relative;
146
 }
148
 }
147
 
149
 
148
 .questioncard .title {
150
 .questioncard .title {
@@ -176,6 +178,7 @@
176
   position: absolute;
178
   position: absolute;
177
   left: 474rpx;
179
   left: 474rpx;
178
   top: 0;
180
   top: 0;
181
+  z-index: 20;
179
 }
182
 }
180
 
183
 
181
 .questioncard .title3 {
184
 .questioncard .title3 {
@@ -295,4 +298,12 @@
295
   width: 100%;
298
   width: 100%;
296
   height: 550rpx;
299
   height: 550rpx;
297
   background-color: #514a47;
300
   background-color: #514a47;
301
+}
302
+
303
+.Help_aside_questioncollection{
304
+  width: 100%;
305
+  height: 377rpx;
306
+  position: fixed;
307
+  bottom: 0rpx;
308
+  z-index: 100;
298
 }
309
 }

+ 20 - 17
pages/main/print.js

@@ -11,7 +11,7 @@ Page({
11
   },
11
   },
12
   onLoad: function (options) {
12
   onLoad: function (options) {
13
     var id = options.id;
13
     var id = options.id;
14
-    id = 183;
14
+    id = 130;
15
     var QuestionTypeCategory=3;
15
     var QuestionTypeCategory=3;
16
     this.getList(id, QuestionTypeCategory);
16
     this.getList(id, QuestionTypeCategory);
17
 
17
 
@@ -183,28 +183,32 @@ Page({
183
             for (var m = num1.Vertical[n].Array.length - 1; m >= 0; m--) {
183
             for (var m = num1.Vertical[n].Array.length - 1; m >= 0; m--) {
184
               var str = "";
184
               var str = "";
185
               if (num1.Vertical[n].Type == "line") {
185
               if (num1.Vertical[n].Type == "line") {
186
-
187
-                var lineLength = num1.Vertical[n].Array.length * 30+20;
188
-                var lineTop=-15;
189
-                if (num1.OperateAB == "÷") {
190
-                  lineLength = num1.A.toString().length * 30;
191
-                  lineTop=0;
186
+                if (num1.OperateAB != "÷") {
187
+                  var lineLength = num1.Vertical[n].Array.length * 30 + 20;
188
+                  var lineTop = -15;
189
+                  if (num1.OperateAB == "÷") {
190
+                    lineLength = num1.A.toString().length * 30;
191
+                    lineTop = 0;
192
+                  }
193
+
194
+                  ctx.moveTo(num, yStart + j * height + n * 30 + lineTop);
195
+                  ctx.lineTo(num - lineLength, yStart + j * height + n * 30 + lineTop);
196
+                  ctx.stroke();
197
+
198
+                  if (num1.OperateAB != "÷")
199
+                    isAnswer = true;
200
+                  break;
192
                 }
201
                 }
193
-                
194
-                ctx.moveTo(num, yStart + j * height + n * 30 + lineTop);
195
-                ctx.lineTo(num - lineLength, yStart + j * height + n * 30 + lineTop);
196
-                ctx.stroke();
197
-
198
-                if (num1.OperateAB != "÷")
199
-                  isAnswer = true;
200
-                break;
201
               }
202
               }
202
               else {
203
               else {
203
                 str = num1.Vertical[n].Array[m];
204
                 str = num1.Vertical[n].Array[m];
204
 
205
 
205
                 if (num1.OperateAB == "÷" && str == "√") {
206
                 if (num1.OperateAB == "÷" && str == "√") {
206
                   isAnswer = true;
207
                   isAnswer = true;
207
-                  ctx.drawImage("../../images/formula_division_size02.png", num - (num1.Vertical[n].Array.length - m) * 30 - 20, yStart + j * height + n * 30 - 31, 56, 76);
208
+                  var lineLength = num1.A.toString().length;
209
+                  var lineWidth = Math.floor(57 * (1 + num1.A.toString().length) / 2);
210
+
211
+                  ctx.drawImage("../../images/formula_division_size0" + lineLength + ".png", num - (num1.Vertical[n].Array.length - m) * 30 - 8, yStart + j * height + n * 30 - 31, lineWidth, 39);
208
                   //break;
212
                   //break;
209
                 }
213
                 }
210
                 else if (num1.OperateAB == "÷" && n == 0) {
214
                 else if (num1.OperateAB == "÷" && n == 0) {
@@ -216,7 +220,6 @@ Page({
216
                   ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 30, yStart + j * height + n * 30);
220
                   ctx.fillText(str, num - (num1.Vertical[n].Array.length - m) * 30, yStart + j * height + n * 30);
217
                 }
221
                 }
218
               }
222
               }
219
-
220
             }
223
             }
221
             if (isAnswer)
224
             if (isAnswer)
222
               break;
225
               break;

+ 15 - 3
project.config.json

@@ -30,7 +30,7 @@
30
 			"list": []
30
 			"list": []
31
 		},
31
 		},
32
 		"miniprogram": {
32
 		"miniprogram": {
33
-			"current": -1,
33
+			"current": 5,
34
 			"list": [
34
 			"list": [
35
 				{
35
 				{
36
 					"id": 0,
36
 					"id": 0,
@@ -42,19 +42,31 @@
42
 					"id": 1,
42
 					"id": 1,
43
 					"name": "detail",
43
 					"name": "detail",
44
 					"pathName": "pages/main/detail",
44
 					"pathName": "pages/main/detail",
45
-					"query": "id=101"
45
+					"query": "id=24"
46
 				},
46
 				},
47
 				{
47
 				{
48
 					"id": 2,
48
 					"id": 2,
49
 					"name": "print",
49
 					"name": "print",
50
 					"pathName": "pages/main/print",
50
 					"pathName": "pages/main/print",
51
-					"query": "id=172"
51
+					"query": "id=183"
52
 				},
52
 				},
53
 				{
53
 				{
54
 					"id": -1,
54
 					"id": -1,
55
 					"name": "item",
55
 					"name": "item",
56
 					"pathName": "pages/main/item",
56
 					"pathName": "pages/main/item",
57
 					"query": "id=46"
57
 					"query": "id=46"
58
+				},
59
+				{
60
+					"id": -1,
61
+					"name": "guide",
62
+					"pathName": "pages/index/guide",
63
+					"query": ""
64
+				},
65
+				{
66
+					"id": -1,
67
+					"name": "login",
68
+					"pathName": "pages/about/payfinished",
69
+					"query": ""
58
 				}
70
 				}
59
 			]
71
 			]
60
 		}
72
 		}

+ 10 - 0
utils/main.js

@@ -312,6 +312,15 @@ function gotoFeedback() {
312
   });
312
   });
313
 }
313
 }
314
 
314
 
315
+function playAudio(ctx, sentence) {
316
+  var url = app.globalData.audioUrlBaidu;
317
+  url = url.replace("[token]", app.globalData.BaiduToken);
318
+  url = url.replace("[word]", sentence);
319
+  //console.log(url);
320
+  ctx.setSrc(url);
321
+  ctx.play();
322
+}
323
+
315
 
324
 
316
 module.exports = {
325
 module.exports = {
317
   getData: getData,
326
   getData: getData,
@@ -326,4 +335,5 @@ module.exports = {
326
   getDifficulty: getDifficulty,
335
   getDifficulty: getDifficulty,
327
   getProgramList: getProgramList,
336
   getProgramList: getProgramList,
328
   gotoFeedback: gotoFeedback,
337
   gotoFeedback: gotoFeedback,
338
+  playAudio: playAudio,
329
 }
339
 }