chengjie 7 年之前
當前提交
68fed1d5e7
共有 15 個文件被更改,包括 211 次插入0 次删除
  1. 10 0
      app.js
  2. 11 0
      app.json
  3. 26 0
      app.wxss
  4. 二進制
      images/104.png
  5. 二進制
      images/105.png
  6. 二進制
      images/106.png
  7. 二進制
      images/108.png
  8. 二進制
      images/113.png
  9. 二進制
      images/205.png
  10. 72 0
      pages/index/index.js
  11. 8 0
      pages/index/index.json
  12. 12 0
      pages/index/index.wxml
  13. 20 0
      pages/index/index.wxss
  14. 33 0
      project.config.json
  15. 19 0
      utils/util.js

+ 10 - 0
app.js

@@ -0,0 +1,10 @@
1
+//app.js
2
+App({
3
+  onLaunch: function () {
4
+
5
+  },
6
+  globalData: {
7
+    version: "0.1.0",
8
+    userInfo: null
9
+  }
10
+})

+ 11 - 0
app.json

@@ -0,0 +1,11 @@
1
+{
2
+  "pages": [
3
+    "pages/index/index"
4
+  ],
5
+  "window": {
6
+    "backgroundTextStyle": "light",
7
+    "navigationBarBackgroundColor": "#fff",
8
+    "navigationBarTitleText": "自然拼读游戏",
9
+    "navigationBarTextStyle": "black"
10
+  }
11
+}

+ 26 - 0
app.wxss

@@ -0,0 +1,26 @@
1
+/**app.wxss**/
2
+.container {
3
+  width:100%;
4
+  justify-content: flex-start;
5
+} 
6
+
7
+::-webkit-scrollbar {
8
+  width: 0;
9
+  height: 0;
10
+  color: transparent;
11
+  display: none;
12
+}
13
+
14
+.FlexColumn {
15
+  display: flex;
16
+  flex-direction: column;
17
+  align-items: center;
18
+  justify-content: center;
19
+}
20
+
21
+.FlexRow {
22
+  display: flex;
23
+  flex-direction: row;
24
+  align-items: center;
25
+  justify-content: center;
26
+}

二進制
images/104.png


二進制
images/105.png


二進制
images/106.png


二進制
images/108.png


二進制
images/113.png


二進制
images/205.png


+ 72 - 0
pages/index/index.js

@@ -0,0 +1,72 @@
1
+const app = getApp()
2
+Page({
3
+  data: {
4
+    version: app.globalData.version,
5
+  },
6
+  onReady: function (e) {
7
+  },
8
+  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
+      }
21
+    });
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
+        // 打开成功
31
+      }
32
+    });
33
+  },
34
+  gotoYuwen: function (e) {
35
+    wx.navigateToMiniProgram({
36
+      appId: 'wx331e8dd070f01d0e',
37
+      path: 'pages/index/index?SourceID=105',
38
+      extraData: {
39
+      },
40
+      success(res) {
41
+        // 打开成功
42
+      }
43
+    });
44
+  },
45
+  gotoYingyu: function (e) {
46
+    wx.navigateToMiniProgram({
47
+      appId: 'wxb54a6d5aff836ee3',
48
+      path: 'pages/index/index?SourceID=105',
49
+      extraData: {
50
+      },
51
+      success(res) {
52
+        // 打开成功
53
+      }
54
+    });
55
+  },
56
+  onShareAppMessage: function () {
57
+    return {
58
+      title: '看词能读,听音能写',
59
+      path: 'pages/index/index',
60
+      imageUrl: '../../images/108.png',
61
+      success: function (res) {
62
+        server.shareGroup(res);
63
+      },
64
+      fail: function (err) {
65
+        console.log(err);
66
+      },
67
+      complete: function (res) {
68
+        console.log(res);
69
+      },
70
+    }
71
+  },
72
+})

+ 8 - 0
pages/index/index.json

@@ -0,0 +1,8 @@
1
+{
2
+  "navigationBarBackgroundColor": "#3E4349",
3
+  "navigationBarTextStyle": "#fff",
4
+  "navigationBarTitleText": "自然拼读游戏",
5
+  "backgroundColor": "#3E4349",
6
+  "backgroundTextStyle": "light",
7
+  "enablePullDownRefresh": false
8
+}

+ 12 - 0
pages/index/index.wxml

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

+ 20 - 0
pages/index/index.wxss

@@ -0,0 +1,20 @@
1
+.container {
2
+  background-color: #3E4349;
3
+  justify-content: flex-start;
4
+} 
5
+.btn {
6
+  width:100%;
7
+  height:390rpx;
8
+}
9
+.line{
10
+  width: 100%;
11
+  height:20rpx;
12
+  background-color: #1e1e1e;
13
+}
14
+
15
+.bottom{
16
+  font-size:20rpx;
17
+  color:#fff;
18
+  text-align: center;
19
+  margin: 100rpx 0 40rpx 0;
20
+}

+ 33 - 0
project.config.json

@@ -0,0 +1,33 @@
1
+{
2
+	"description": "项目配置文件。",
3
+	"setting": {
4
+		"urlCheck": true,
5
+		"es6": true,
6
+		"postcss": true,
7
+		"minified": true,
8
+		"newFeature": true
9
+	},
10
+	"compileType": "miniprogram",
11
+	"libVersion": "1.9.93",
12
+	"appid": "wx1fef080f74481cbd",
13
+	"projectname": "%E8%87%AA%E7%84%B6%E6%8B%BC%E8%AF%BB%E6%B8%B8%E6%88%8F",
14
+	"isGameTourist": false,
15
+	"condition": {
16
+		"search": {
17
+			"current": -1,
18
+			"list": []
19
+		},
20
+		"conversation": {
21
+			"current": -1,
22
+			"list": []
23
+		},
24
+		"game": {
25
+			"currentL": -1,
26
+			"list": []
27
+		},
28
+		"miniprogram": {
29
+			"current": -1,
30
+			"list": []
31
+		}
32
+	}
33
+}

+ 19 - 0
utils/util.js

@@ -0,0 +1,19 @@
1
+const formatTime = date => {
2
+  const year = date.getFullYear()
3
+  const month = date.getMonth() + 1
4
+  const day = date.getDate()
5
+  const hour = date.getHours()
6
+  const minute = date.getMinutes()
7
+  const second = date.getSeconds()
8
+
9
+  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10
+}
11
+
12
+const formatNumber = n => {
13
+  n = n.toString()
14
+  return n[1] ? n : '0' + n
15
+}
16
+
17
+module.exports = {
18
+  formatTime: formatTime
19
+}