chengjie 7 年之前
父節點
當前提交
8a7e0dfd69
共有 14 個文件被更改,包括 110 次插入14 次删除
  1. 2 1
      app.js
  2. 2 1
      app.json
  3. 二進制
      images/108.png
  4. 二進制
      images/1528426913008.png
  5. 二進制
      images/Artboard.png
  6. 22 0
      pages/index/detail.js
  7. 1 0
      pages/index/detail.json
  8. 12 0
      pages/index/detail.wxml
  9. 38 0
      pages/index/detail.wxss
  10. 19 8
      pages/index/index.js
  11. 1 1
      pages/index/index.json
  12. 6 0
      pages/index/list.js
  13. 1 1
      pages/index/list.wxml
  14. 6 2
      project.config.json

+ 2 - 1
app.js

@@ -15,13 +15,14 @@ App({
15 15
   },
16 16
   globalData: {
17 17
     version: "0.1.3",
18
-    IsProduction: true,
18
+    IsProduction: false,
19 19
     ProgramID: 105,
20 20
     StartSecond: 4,
21 21
     fileUrl: "https://kylx365-1253256735.file.myqcloud.com/",
22 22
     serverUrl: "https://www.kylx365.com/apiData/",
23 23
     serverUrlServer: "https://www.kylx365.com/apiData/",
24 24
     serverUrlLocalhost: "http://localhost:3020/apiData/",
25
+    audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=1&spd=8&pit=5",
25 26
     Key: "kylx365_chengjie",
26 27
     IV: "kylx365hongliren",
27 28
   }

+ 2 - 1
app.json

@@ -1,12 +1,13 @@
1 1
 {
2 2
   "pages": [
3 3
     "pages/index/index",
4
+    "pages/index/detail",
4 5
     "pages/index/list"
5 6
   ],
6 7
   "window": {
7 8
     "backgroundTextStyle": "light",
8 9
     "navigationBarBackgroundColor": "#fff",
9
-    "navigationBarTitleText": "自然拼读游戏",
10
+    "navigationBarTitleText": "数学计算题",
10 11
     "navigationBarTextStyle": "black"
11 12
   }
12 13
 }

二進制
images/108.png


二進制
images/1528426913008.png


二進制
images/Artboard.png


+ 22 - 0
pages/index/detail.js

@@ -0,0 +1,22 @@
1
+import common from '../../utils/util';
2
+import server from '../../utils/main';
3
+
4
+var app = getApp();
5
+
6
+Page({
7
+  data: {
8
+    List:[],
9
+  },
10
+  onLoad: function (options) {
11
+    var id=options.id;
12
+    this.gotoDetail(id);
13
+  },
14
+  gotoDetail: function (id) {
15
+    var that=this;
16
+    server.getData('GetQuestionTypesPrint?ID=' + id, function (data) {
17
+      that.setData({
18
+        List:data.QuestionList,
19
+      })
20
+    });
21
+  },
22
+})

+ 1 - 0
pages/index/detail.json

@@ -0,0 +1 @@
1
+{}

+ 12 - 0
pages/index/detail.wxml

@@ -0,0 +1,12 @@
1
+<view class="container FlexColumn">
2
+  <movable-area class="movable">
3
+    <movable-view class="table FlexColumn" inertia="true" out-of-bounds="true" damping="30" friction="1" scale="true" scale-min="0.05" scale-max="10" scale-value="1" x="{{x}}" y="{{y}}" direction="all">
4
+      <view class="td FlexRow" wx:for="{{List}}" wx:key="index">
5
+        <view class="tdIndex">({{index+1}})</view>
6
+        <view class="tdNumA">{{item.A}}</view>
7
+        <view class="tdNumAB">{{item.OperateAB}}</view>
8
+        <view class="tdNumA">{{item.B}}</view>
9
+      </view>
10
+    </movable-view>
11
+  </movable-area>
12
+</view>

+ 38 - 0
pages/index/detail.wxss

@@ -0,0 +1,38 @@
1
+.container {
2
+  background-color: #fff;
3
+  justify-content: flex-start;
4
+  align-items: flex-start;
5
+} 
6
+
7
+.movable{
8
+  width:100%;
9
+  height:1334rpx;
10
+}
11
+
12
+.table{
13
+  width:2100rpx;
14
+  height:2970rpx;
15
+  font-size:72rpx;
16
+  justify-content: flex-start;
17
+  flex-wrap: wrap;
18
+}
19
+
20
+.td{
21
+  width:800rpx;
22
+  height:200rpx;
23
+  text-align: center;
24
+  line-height: 200rpx;
25
+}
26
+
27
+.tdIndex{
28
+  width:20rpx;
29
+  color:#dddddd;
30
+  margin-right: 60rpx;
31
+  font-size:40rpx;
32
+}
33
+
34
+.bg{
35
+  width:2100rpx;
36
+  height:2970rpx;
37
+}
38
+

+ 19 - 8
pages/index/index.js

@@ -1,5 +1,6 @@
1 1
 import common from '../../utils/util';
2 2
 import server from '../../utils/main';
3
+const innerAudioContext1 = wx.createInnerAudioContext();
3 4
 
4 5
 const app = getApp()
5 6
 Page({
@@ -8,19 +9,29 @@ Page({
8 9
     FileUrl: app.globalData.fileUrl,
9 10
   },
10 11
   onLoad: function () {
11
-    var that=this;
12
-    that.getEnumerationData(function(){
13
-      that.getQuestionTypesList(function(){
14
-        var data = wx.getStorageSync('QuestionTypeList');
15
-        that.setData({
16
-          QuestionCategory: data,
17
-          Containnerheight: common.getSystemHeight(),
12
+    var that = this;
13
+    server.getLocalHost(function () {
14
+      that.getEnumerationData(function () {
15
+        that.getQuestionTypesList(function () {
16
+          var data = wx.getStorageSync('QuestionTypeList');
17
+          that.setData({
18
+            QuestionCategory: data,
19
+            Containnerheight: common.getSystemHeight(),
18 20
 
21
+          });
19 22
         });
20 23
       });
21 24
     });
25
+
26
+    var url = app.globalData.audioUrlBaidu;
27
+    url = url.replace("[token]", "24.6dbece3e76e486120456e6f6fc5dee15.2592000.1531286017.282335-10850912");
28
+    url = url.replace("[word]", "答案:45,159,55,197,781,1456,745,159,55,197,781,1456,7");
29
+    url = encodeURI(url);
30
+    innerAudioContext1.src=url;
31
+    innerAudioContext1.play();
32
+
22 33
   },
23
-  gotoList:function(e){
34
+  gotoList: function (e) {
24 35
     var questionTypeID = e.currentTarget.dataset.id;
25 36
     wx.navigateTo({
26 37
       url: './list?id=' + questionTypeID

+ 1 - 1
pages/index/index.json

@@ -1,7 +1,7 @@
1 1
 {
2 2
   "navigationBarBackgroundColor": "#fff",
3 3
   "navigationBarTextStyle": "black",
4
-  "navigationBarTitleText": "小学数学计算题大全",
4
+  "navigationBarTitleText": "数学计算题",
5 5
   "backgroundColor": "#1E1E1E",
6 6
   "backgroundTextStyle": "light",
7 7
   "enablePullDownRefresh": false

+ 6 - 0
pages/index/list.js

@@ -53,6 +53,12 @@ Page({
53 53
       }
54 54
     }
55 55
   },
56
+  gotoDetail: function (e) {
57
+    var questionTypeID = e.currentTarget.dataset.id;
58
+    wx.navigateTo({
59
+      url: './detail?id=' + questionTypeID
60
+    });
61
+  },
56 62
   gotoPrint: function (e) {
57 63
     var that=this;
58 64
     var id = e.currentTarget.dataset.id;

+ 1 - 1
pages/index/list.wxml

@@ -6,7 +6,7 @@
6 6
     </view>
7 7
     <view></view>
8 8
   </view>
9
-  <view class="ViewContainerContent2 Width100 FlexRow" wx:for="{{QuestionTypeList}}" wx:key="index" bindtap="gotoPrint" data-id="{{item.ID}}">
9
+  <view class="ViewContainerContent2 Width100 FlexRow" wx:for="{{QuestionTypeList}}" wx:key="index" bindtap="gotoDetail" data-id="{{item.ID}}">
10 10
     <view class="ViewContainerContent2_1 Left FlexColumn">
11 11
       <view class="FlexRow">
12 12
         <image class="ListIcon" src="{{FileUrl}}images/QuestionLibrary/QuestionTypesIcon1.png?2"  />

+ 6 - 2
project.config.json

@@ -1,7 +1,7 @@
1 1
 {
2 2
 	"description": "项目配置文件。",
3 3
 	"setting": {
4
-		"urlCheck": true,
4
+		"urlCheck": false,
5 5
 		"es6": true,
6 6
 		"postcss": true,
7 7
 		"minified": true,
@@ -10,7 +10,7 @@
10 10
 	"compileType": "miniprogram",
11 11
 	"libVersion": "1.9.93",
12 12
 	"appid": "wx1fef080f74481cbd",
13
-	"projectname": "%E8%87%AA%E7%84%B6%E6%8B%BC%E8%AF%BB%E6%B8%B8%E6%88%8F",
13
+	"projectname": "%E6%95%B0%E5%AD%A6%E8%AE%A1%E7%AE%97%E9%A2%98",
14 14
 	"isGameTourist": false,
15 15
 	"condition": {
16 16
 		"search": {
@@ -21,6 +21,10 @@
21 21
 			"current": -1,
22 22
 			"list": []
23 23
 		},
24
+		"plugin": {
25
+			"current": -1,
26
+			"list": []
27
+		},
24 28
 		"game": {
25 29
 			"currentL": -1,
26 30
 			"list": []