chengjie 7 年之前
父节点
当前提交
3afbc46d19
共有 15 个文件被更改,包括 74 次插入58 次删除
  1. 3 2
      app.js
  2. 二进制
      images/0101.png
  3. 二进制
      images/0102.png
  4. 二进制
      images/0103.png
  5. 二进制
      images/0104.png
  6. 二进制
      images/0105.png
  7. 二进制
      images/104.png
  8. 二进制
      images/105.png
  9. 二进制
      images/106.png
  10. 二进制
      images/113.png
  11. 二进制
      images/205.png
  12. 46 37
      pages/index/index.js
  13. 3 3
      pages/index/index.json
  14. 2 8
      pages/index/index.wxml
  15. 20 8
      pages/index/index.wxss

+ 3 - 2
app.js

@@ -4,7 +4,8 @@ App({
4
 
4
 
5
   },
5
   },
6
   globalData: {
6
   globalData: {
7
-    version: "0.1.0",
8
-    userInfo: null
7
+    version: "0.1.3",
8
+    userInfo: null,
9
+    ProgramID: 105,
9
   }
10
   }
10
 })
11
 })

二进制
images/0101.png


二进制
images/0102.png


二进制
images/0103.png


二进制
images/0104.png


二进制
images/0105.png


二进制
images/104.png


二进制
images/105.png


二进制
images/106.png


二进制
images/113.png


二进制
images/205.png


+ 46 - 37
pages/index/index.js

@@ -3,38 +3,28 @@ Page({
3
   data: {
3
   data: {
4
     version: app.globalData.version,
4
     version: app.globalData.version,
5
   },
5
   },
6
-  onReady: function (e) {
7
-  },
8
   onLoad: function () {
6
   onLoad: function () {
9
-    this.gotoYingyu();
10
-  },
11
-  
12
-  gotoShuxue: function (e) {
13
-    wx.navigateToMiniProgram({
14
-      appId: 'wx46a7b4c420e6d38f',
15
-      path: 'pages/index/start?SourceID=105',
16
-      extraData: {
17
-      },
18
-      success(res) {
19
-        // 打开成功
20
-      }
7
+    var list = this.getProgramList();
8
+    this.setData({
9
+      List: list,
21
     });
10
     });
22
-  },
23
-  gotoZhuyili: function (e) {
24
-    wx.navigateToMiniProgram({
25
-      appId: 'wxa5e33c61fe37dd01',
26
-      path: 'pages/index/index?SourceID=105',
27
-      extraData: {
28
-      },
29
-      success(res) {
30
-        // 打开成功
11
+
12
+    var obj = {
13
+      currentTarget: {
14
+        dataset: {
15
+          appid: list[3].appId,
16
+          path: list[3].path,
17
+        }
31
       }
18
       }
32
-    });
19
+    }
20
+    this.goto(obj);
33
   },
21
   },
34
-  gotoYuwen: function (e) {
22
+  goto: function (e) {
23
+    var appid = e.currentTarget.dataset.appid;
24
+    var path = e.currentTarget.dataset.path;
35
     wx.navigateToMiniProgram({
25
     wx.navigateToMiniProgram({
36
-      appId: 'wx331e8dd070f01d0e',
37
-      path: 'pages/index/index?SourceID=105',
26
+      appId: appid,
27
+      path: path,
38
       extraData: {
28
       extraData: {
39
       },
29
       },
40
       success(res) {
30
       success(res) {
@@ -42,20 +32,39 @@ Page({
42
       }
32
       }
43
     });
33
     });
44
   },
34
   },
45
-  gotoYingyu: function (e) {
46
-    wx.navigateToMiniProgram({
47
-      appId: 'wxb54a6d5aff836ee3',
48
-      path: 'pages/index/index?SourceID=105',
49
-      extraData: {
35
+  getProgramList: function () {
36
+    return [
37
+      {
38
+        ImageUrl: "0101.png",
39
+        appId: 'wx46a7b4c420e6d38f',
40
+        path: 'pages/index/start?SourceID=' + app.globalData.ProgramID,
41
+
50
       },
42
       },
51
-      success(res) {
52
-        // 打开成功
53
-      }
54
-    });
43
+      {
44
+        ImageUrl: "0103.png",
45
+        appId: 'wx313a8f2c0741efe1',
46
+        path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
47
+      },
48
+      {
49
+        ImageUrl: "0102.png",
50
+        appId: 'wx331e8dd070f01d0e',
51
+        path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
52
+      },
53
+      {
54
+        ImageUrl: "0104.png",
55
+        appId: 'wxb54a6d5aff836ee3',
56
+        path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
57
+      },
58
+      {
59
+        ImageUrl: "0105.png",
60
+        appId: 'wxa5e33c61fe37dd01',
61
+        path: 'pages/index/index?SourceID=' + app.globalData.ProgramID,
62
+      },
63
+    ];
55
   },
64
   },
56
   onShareAppMessage: function () {
65
   onShareAppMessage: function () {
57
     return {
66
     return {
58
-      title: '看词能读,听音能写',
67
+      title: '英语自然拼读',
59
       path: 'pages/index/index',
68
       path: 'pages/index/index',
60
       imageUrl: '../../images/108.png',
69
       imageUrl: '../../images/108.png',
61
       success: function (res) {
70
       success: function (res) {

+ 3 - 3
pages/index/index.json

@@ -1,8 +1,8 @@
1
 {
1
 {
2
-  "navigationBarBackgroundColor": "#3E4349",
2
+  "navigationBarBackgroundColor": "#003579",
3
   "navigationBarTextStyle": "#fff",
3
   "navigationBarTextStyle": "#fff",
4
-  "navigationBarTitleText": "自然拼读游戏",
5
-  "backgroundColor": "#3E4349",
4
+  "navigationBarTitleText": "唱意教育系列产品",
5
+  "backgroundColor": "#1E1E1E",
6
   "backgroundTextStyle": "light",
6
   "backgroundTextStyle": "light",
7
   "enablePullDownRefresh": false
7
   "enablePullDownRefresh": false
8
 }
8
 }

+ 2 - 8
pages/index/index.wxml

@@ -1,12 +1,6 @@
1
 <view class="container FlexColumn" style='height:{{Height}}rpx;'>
1
 <view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
-  <image class="btn" src="../../images/104.png" bindtap='gotoShuxue' />
3
   <view class="line"></view>
2
   <view class="line"></view>
4
-  <image class="btn" src="../../images/105.png" bindtap='gotoYuwen' />
5
-  <view class="line"></view>
6
-  <image class="btn" src="../../images/205.png" bindtap='gotoYingyu' />
7
-  <view class="line"></view>
8
-  <image class="btn" src="../../images/106.png" bindtap='gotoZhuyili' />
9
-  <view class="line"></view>
10
-  
3
+  <view class="line2"></view>
4
+  <image wx:for="{{List}}" wx:key="index" class="btn" src="../../images/{{item.ImageUrl}}" bindtap='goto' data-appid="{{item.appId}}" data-path="{{item.path}}" />
11
   <text class="bottom">©2014-2018 小学生素质练习系列产品\n微信小程序 版本 {{version}}</text>
5
   <text class="bottom">©2014-2018 小学生素质练习系列产品\n微信小程序 版本 {{version}}</text>
12
 </view>
6
 </view>

+ 20 - 8
pages/index/index.wxss

@@ -1,20 +1,32 @@
1
 .container {
1
 .container {
2
-  background-color: #3E4349;
2
+  background-color: #1E1E1E;
3
   justify-content: flex-start;
3
   justify-content: flex-start;
4
 } 
4
 } 
5
-.btn {
6
-  width:100%;
7
-  height:390rpx;
8
-}
5
+
9
 .line{
6
 .line{
10
   width: 100%;
7
   width: 100%;
11
-  height:20rpx;
12
-  background-color: #1e1e1e;
8
+  height:30rpx;
9
+  background-color: #00214C;
10
+  position: fixed;
11
+  top:0;
12
+}
13
+
14
+.line2{
15
+  width: 100%;
16
+  height:30rpx;
17
+  background-color: #1E1E1E;
18
+  margin-bottom: 30rpx;
19
+}
20
+
21
+.btn {
22
+  height:350rpx;
23
+  width:710rpx;
24
+  margin-bottom: 20rpx;
13
 }
25
 }
14
 
26
 
15
 .bottom{
27
 .bottom{
16
   font-size:20rpx;
28
   font-size:20rpx;
17
   color:#fff;
29
   color:#fff;
18
   text-align: center;
30
   text-align: center;
19
-  margin: 100rpx 0 40rpx 0;
31
+  margin: 60rpx 0 40rpx 0;
20
 }
32
 }