chengjie 7 yıl önce
ebeveyn
işleme
3afbc46d19

+ 3 - 2
app.js

@@ -4,7 +4,8 @@ App({
4 4
 
5 5
   },
6 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
 })

BIN
images/0101.png


BIN
images/0102.png


BIN
images/0103.png


BIN
images/0104.png


BIN
images/0105.png


BIN
images/104.png


BIN
images/105.png


BIN
images/106.png


BIN
images/113.png


BIN
images/205.png


+ 46 - 37
pages/index/index.js

@@ -3,38 +3,28 @@ Page({
3 3
   data: {
4 4
     version: app.globalData.version,
5 5
   },
6
-  onReady: function (e) {
7
-  },
8 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 25
     wx.navigateToMiniProgram({
36
-      appId: 'wx331e8dd070f01d0e',
37
-      path: 'pages/index/index?SourceID=105',
26
+      appId: appid,
27
+      path: path,
38 28
       extraData: {
39 29
       },
40 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 65
   onShareAppMessage: function () {
57 66
     return {
58
-      title: '看词能读,听音能写',
67
+      title: '英语自然拼读',
59 68
       path: 'pages/index/index',
60 69
       imageUrl: '../../images/108.png',
61 70
       success: function (res) {

+ 3 - 3
pages/index/index.json

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

+ 2 - 8
pages/index/index.wxml

@@ -1,12 +1,6 @@
1 1
 <view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
-  <image class="btn" src="../../images/104.png" bindtap='gotoShuxue' />
3 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 5
   <text class="bottom">©2014-2018 小学生素质练习系列产品\n微信小程序 版本 {{version}}</text>
12 6
 </view>

+ 20 - 8
pages/index/index.wxss

@@ -1,20 +1,32 @@
1 1
 .container {
2
-  background-color: #3E4349;
2
+  background-color: #1E1E1E;
3 3
   justify-content: flex-start;
4 4
 } 
5
-.btn {
6
-  width:100%;
7
-  height:390rpx;
8
-}
5
+
9 6
 .line{
10 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 27
 .bottom{
16 28
   font-size:20rpx;
17 29
   color:#fff;
18 30
   text-align: center;
19
-  margin: 100rpx 0 40rpx 0;
31
+  margin: 60rpx 0 40rpx 0;
20 32
 }