Jeffry Yu 6 年 前
コミット
abf0a81ca8
64 ファイル変更408 行追加0 行削除
  1. 2 0
      wechat/.gitignore
  2. 29 0
      wechat/app.js
  3. 41 0
      wechat/app.json
  4. 71 0
      wechat/app.wxss
  5. 18 0
      wechat/bower.json
  6. BIN
      wechat/images/btn_gonggao_n.png
  7. BIN
      wechat/images/btn_gonggao_n@2x.png
  8. BIN
      wechat/images/btn_gonggao_n@3x.png
  9. BIN
      wechat/images/btn_gonggao_s.png
  10. BIN
      wechat/images/btn_gonggao_s@2x.png
  11. BIN
      wechat/images/btn_gonggao_s@3x.png
  12. BIN
      wechat/images/btn_home_n.png
  13. BIN
      wechat/images/btn_home_n@2x.png
  14. BIN
      wechat/images/btn_home_n@3x.png
  15. BIN
      wechat/images/btn_home_s.png
  16. BIN
      wechat/images/btn_home_s@2x.png
  17. BIN
      wechat/images/btn_home_s@3x.png
  18. BIN
      wechat/images/btn_kaishi_01.png
  19. BIN
      wechat/images/btn_kaishi_01@2x.png
  20. BIN
      wechat/images/btn_kaishi_01@3x.png
  21. BIN
      wechat/images/btn_me_n.png
  22. BIN
      wechat/images/btn_me_n@2x.png
  23. BIN
      wechat/images/btn_me_n@3x.png
  24. BIN
      wechat/images/btn_me_s.png
  25. BIN
      wechat/images/btn_me_s@2x.png
  26. BIN
      wechat/images/btn_me_s@3x.png
  27. BIN
      wechat/images/btn_wenzhang_n.png
  28. BIN
      wechat/images/btn_wenzhang_n@2x.png
  29. BIN
      wechat/images/btn_wenzhang_n@3x.png
  30. BIN
      wechat/images/btn_wenzhang_s.png
  31. BIN
      wechat/images/btn_wenzhang_s@2x.png
  32. BIN
      wechat/images/btn_wenzhang_s@3x.png
  33. BIN
      wechat/images/icon_kecheng01.png
  34. BIN
      wechat/images/icon_kecheng01@2x.png
  35. BIN
      wechat/images/icon_kecheng01@3x.png
  36. BIN
      wechat/images/icon_qingjia.png
  37. BIN
      wechat/images/icon_qingjia@2x.png
  38. BIN
      wechat/images/icon_qingjia@3x.png
  39. BIN
      wechat/images/icon_xuexishijian.png
  40. BIN
      wechat/images/icon_xuexishijian@2x.png
  41. BIN
      wechat/images/icon_xuexishijian@3x.png
  42. BIN
      wechat/images/img_banner01.png
  43. BIN
      wechat/images/img_banner01@2x.png
  44. BIN
      wechat/images/img_banner01@3x.png
  45. BIN
      wechat/images/img_gqsj_01.png
  46. BIN
      wechat/images/img_gqsj_01@2x.png
  47. BIN
      wechat/images/img_gqsj_01@3x.png
  48. BIN
      wechat/images/img_shijian_01.png
  49. BIN
      wechat/images/img_shijian_01@2x.png
  50. BIN
      wechat/images/img_shijian_01@3x.png
  51. BIN
      wechat/images/img_shijianbg_01.png
  52. BIN
      wechat/images/img_shijianbg_01@2x.png
  53. BIN
      wechat/images/img_shijianbg_01@3x.png
  54. BIN
      wechat/images/img_touxiang.png
  55. BIN
      wechat/images/img_touxiang@2x.png
  56. BIN
      wechat/images/img_touxiang@3x.png
  57. 9 0
      wechat/pages/index/index.js
  58. 34 0
      wechat/pages/index/index.wxml
  59. 101 0
      wechat/pages/index/index.wxss
  60. 8 0
      wechat/pages/userinfo/userinfo.js
  61. 5 0
      wechat/pages/userinfo/userinfo.json
  62. 22 0
      wechat/pages/userinfo/userinfo.wxml
  63. 36 0
      wechat/pages/userinfo/userinfo.wxss
  64. 32 0
      wechat/project.config.json

+ 2 - 0
wechat/.gitignore

xqd
@@ -0,0 +1,2 @@
+bower_components
+**/.DS_Store

+ 29 - 0
wechat/app.js

xqd
@@ -0,0 +1,29 @@
+//app.js
+App({
+  onLaunch: function() {
+    //调用API从本地缓存中获取数据
+    var logs = wx.getStorageSync('logs') || []
+    logs.unshift(Date.now())
+    wx.setStorageSync('logs', logs)
+  },
+
+  getUserInfo: function(cb) {
+    var that = this
+    if (this.globalData.userInfo) {
+      typeof cb == "function" && cb(this.globalData.userInfo)
+    } else {
+      //调用登录接口
+      wx.getUserInfo({
+        withCredentials: false,
+        success: function(res) {
+          that.globalData.userInfo = res.userInfo
+          typeof cb == "function" && cb(that.globalData.userInfo)
+        }
+      })
+    }
+  },
+
+  globalData: {
+    userInfo: null
+  }
+})

+ 41 - 0
wechat/app.json

xqd
@@ -0,0 +1,41 @@
+{
+  "pages":[
+    "pages/index/index",
+    "pages/userinfo/userinfo"
+  ],
+  "window":{
+    "backgroundTextStyle":"light",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "WeChat",
+    "navigationBarTextStyle":"black"
+  },
+  "tabBar":{
+    "backgroundColor": "#111111",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "text": "",
+        "iconPath": "images/btn_home_n@2x.png",
+        "selectedIconPath": "images/btn_home_s@2x.png"
+      },
+      {
+        "pagePath": "pages/index/index",
+        "text": "",
+        "iconPath": "images/btn_gonggao_n@2x.png",
+        "selectedIconPath": "images/btn_gonggao_s@2x.png"
+      },
+      {
+        "pagePath": "pages/index/index",
+        "text": "",
+        "iconPath": "images/btn_wenzhang_n@2x.png",
+        "selectedIconPath": "images/btn_wenzhang_s@2x.png"
+      },
+      {
+        "pagePath": "pages/userinfo/userinfo",
+        "text": "",
+        "iconPath": "images/btn_me_n@2x.png",
+        "selectedIconPath": "images/btn_me_s@2x.png"
+      }
+    ]
+  }
+}

+ 71 - 0
wechat/app.wxss

xqd
@@ -0,0 +1,71 @@
+@import "bower_components/zanui-weapp/dist/index.wxss";
+/* flex box */
+.flex-horizontal {
+  display: flex;
+  flex-direction: row;
+}
+.flex-vertical {
+  display: flex;
+  flex-direction: column;
+}
+.flex-1 {
+  flex: 0 0 8.33333%;
+}
+.flex-2 {
+  flex: 0 0 16.66667%;
+
+}
+.flex-3 {
+  flex: 0 0 25%;
+}
+.flex-4 {
+  flex: 0 0 33.33333%;
+}
+.flex-5 {
+  flex: 0 0 41.66667%;
+}
+.flex-6 {
+  flex: 0 0 50%;
+}
+.flex-7 {
+  flex: 0 0 58.33333%;
+}
+.flex-8 {
+  flex: 0 0 66.66667%;
+}
+.flex-9 {
+  flex: 0 0 75%;
+}
+.flex-10 {
+  flex: 0 0 83.33333%;
+}
+.flex-11 {
+  flex: 0 0 91.66667%;
+}
+.flex-12 {
+  flex: 0 0 100%;
+}
+.flex-auto {
+  flex: auto;
+}
+.flex-none {
+  flex: none;
+}
+
+.flex-middle {
+  align-self: center;
+}
+.flex-center {
+  justify-content: center;
+}
+.flex-middle-helper {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
+/* */
+.block-center {
+  margin-left: auto;
+  margin-right: auto;
+}

+ 18 - 0
wechat/bower.json

xqd
@@ -0,0 +1,18 @@
+{
+  "name": "piano_time",
+  "description": "piano time mini program",
+  "main": "",
+  "license": "MIT",
+  "homepage": "",
+  "private": true,
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "zanui-weapp": "^3.0.4"
+  }
+}

BIN
wechat/images/btn_gonggao_n.png


BIN
wechat/images/btn_gonggao_n@2x.png


BIN
wechat/images/btn_gonggao_n@3x.png


BIN
wechat/images/btn_gonggao_s.png


BIN
wechat/images/btn_gonggao_s@2x.png


BIN
wechat/images/btn_gonggao_s@3x.png


BIN
wechat/images/btn_home_n.png


BIN
wechat/images/btn_home_n@2x.png


BIN
wechat/images/btn_home_n@3x.png


BIN
wechat/images/btn_home_s.png


BIN
wechat/images/btn_home_s@2x.png


BIN
wechat/images/btn_home_s@3x.png


BIN
wechat/images/btn_kaishi_01.png


BIN
wechat/images/btn_kaishi_01@2x.png


BIN
wechat/images/btn_kaishi_01@3x.png


BIN
wechat/images/btn_me_n.png


BIN
wechat/images/btn_me_n@2x.png


BIN
wechat/images/btn_me_n@3x.png


BIN
wechat/images/btn_me_s.png


BIN
wechat/images/btn_me_s@2x.png


BIN
wechat/images/btn_me_s@3x.png


BIN
wechat/images/btn_wenzhang_n.png


BIN
wechat/images/btn_wenzhang_n@2x.png


BIN
wechat/images/btn_wenzhang_n@3x.png


BIN
wechat/images/btn_wenzhang_s.png


BIN
wechat/images/btn_wenzhang_s@2x.png


BIN
wechat/images/btn_wenzhang_s@3x.png


BIN
wechat/images/icon_kecheng01.png


BIN
wechat/images/icon_kecheng01@2x.png


BIN
wechat/images/icon_kecheng01@3x.png


BIN
wechat/images/icon_qingjia.png


BIN
wechat/images/icon_qingjia@2x.png


BIN
wechat/images/icon_qingjia@3x.png


BIN
wechat/images/icon_xuexishijian.png


BIN
wechat/images/icon_xuexishijian@2x.png


BIN
wechat/images/icon_xuexishijian@3x.png


BIN
wechat/images/img_banner01.png


BIN
wechat/images/img_banner01@2x.png


BIN
wechat/images/img_banner01@3x.png


BIN
wechat/images/img_gqsj_01.png


BIN
wechat/images/img_gqsj_01@2x.png


BIN
wechat/images/img_gqsj_01@3x.png


BIN
wechat/images/img_shijian_01.png


BIN
wechat/images/img_shijian_01@2x.png


BIN
wechat/images/img_shijian_01@3x.png


BIN
wechat/images/img_shijianbg_01.png


BIN
wechat/images/img_shijianbg_01@2x.png


BIN
wechat/images/img_shijianbg_01@3x.png


BIN
wechat/images/img_touxiang.png


BIN
wechat/images/img_touxiang@2x.png


BIN
wechat/images/img_touxiang@3x.png


+ 9 - 0
wechat/pages/index/index.js

xqd
@@ -0,0 +1,9 @@
+
+var app = getApp()
+Page({
+  
+  onLoad: function () {
+    console.log('onLoad')
+    
+  }
+})

+ 34 - 0
wechat/pages/index/index.wxml

xqd
@@ -0,0 +1,34 @@
+<!--index.wxml-->
+<view class="wrapper">
+  <view class="logo">
+    <image class="logo-img" src="../../images/img_gqsj_01@2x.png" style="width:208px; height:71px" />
+  </view>
+  <swiper>
+    <swiper-item class="swiper-item"  style="background-image: url(../../images/img_banner01@2x.png); background-size: 100%, 100%; background-repeat: no-repeat">
+     <view class="swiper-item__text">
+        <text class="swiper-item__title">钢琴课程</text>
+        <text class="swiper-item__subtitle">带您提高音乐素养</text>
+        <text class="swiper-item__desc">为您打造一系列定制课程</text>
+     </view>
+    </swiper-item>
+    <swiper-item class="swiper-item"  style="background-image: url(../../images/img_banner01@2x.png); background-size: 100%, 100%;">
+      <text class="swiper-item__title">钢琴课程
+      <text class="swiper-item__subtitle">带您提高音乐素养</text></text>
+      <text class="swiper-item__desc">为您打造一系列定制课程</text>
+    </swiper-item>
+  </swiper>
+  <view class="time">
+    <view class="line"></view>
+    <view class="line"></view>
+    <view class="line"></view>
+    <view class="line"></view>
+    <view class="line"></view>
+    <view class="time-clock" style="background-image: url(../../images/img_shijianbg_01@2x.png);">
+      <image class="time-icon" src="../../images/img_shijian_01@2x.png" />
+      <text class="time-text">00:00:00</text>
+    </view>
+  </view>
+  <view class="start flex-horizontal" style="background-image: url(../../images/btn_kaishi_01@2x.png)">
+    <button class="start-btn">开始</button>
+  </view>
+</view>

+ 101 - 0
wechat/pages/index/index.wxss

xqd
@@ -0,0 +1,101 @@
+page {
+  height: 100%;
+}
+.wrapper {
+  background: #000;
+  height: 100%;
+}
+.logo {
+  padding: 5.5px 0 8.68px;
+}
+.logo-img {
+  display: block;
+  margin: 0 auto;
+}
+swiper {
+  height: 250px;
+}
+.swiper-item {
+  position: relative;
+  width: 100%;
+  height: 600px;
+}
+.swiper-item__text {
+  margin-top: 63.88px;
+  margin-left: 11.8px;
+  font-family: PingFangSC-Semibold;
+  color: #fff;
+}
+.swiper-item__title {
+  display: block;
+  font-size: 24.3px;
+}
+.swiper-item__subtitle {
+  display: block;
+  font-size: 18.75px;
+}
+.swiper-item__desc {
+  margin-top: 23px;
+  display: block;
+  font-size: 14.58px;
+  font-family: PingFangSC-Thin;
+}
+.time {
+  margin-top: 28.82px;
+  height: 50px;
+  position: relative;
+  padding-top: 20px;
+}
+.time-clock {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom:0;
+  display: block;
+  margin: auto;
+  width: 195px;
+  height: 50px; 
+  background-size: 195px 50px;
+  background-repeat: no-repeat;
+  background-position: center;
+  line-height: 50px;
+  text-align: center;
+  color: #fff;
+  font-size: 18px;
+  font-family: HYQiHei-DES;
+}
+.time-icon {
+  width: 18px;
+  height: 18px;
+  vertical-align: middle;
+}
+.time-text {
+  font-size: 18px;
+  margin-left: 10px;
+  vertical-align: middle;
+}
+.line {
+  height: 5px;
+  border-top: 1px solid #B1B1B1;
+}
+.start {
+  height: calc(100% - 434px);
+  background-size: 86.88px 86.88px;
+  background-repeat: no-repeat;
+  background-position: center;
+  line-height: calc(100% - 434px);
+  text-align: center;
+}
+.start-btn {
+  position: static;
+  overflow: initial;
+  margin: auto;
+  display: inline-block;
+  width: 86.88px;
+  height: 86.88px;
+  background: none;
+  color: #fff;
+  line-height: 86.88px;
+  border: none;
+}

+ 8 - 0
wechat/pages/userinfo/userinfo.js

xqd
@@ -0,0 +1,8 @@
+
+var app = getApp()
+Page({
+  
+  onLoad: function () {
+    console.log('onLoad')
+  }
+})

+ 5 - 0
wechat/pages/userinfo/userinfo.json

xqd
@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index"
+  }
+}

+ 22 - 0
wechat/pages/userinfo/userinfo.wxml

xqd
@@ -0,0 +1,22 @@
+<!--index.wxml-->
+<view class="wrapper">
+  <view class='avatar flex-horizontal'>
+    <image class="avatar-img" src="../../images/img_touxiang@2x.png" />
+    <text class="avatar-text">学员0226</text>
+  </view>
+  <zan-cell title="我的课程" class="userinfo-list__item" is-link>
+    <view class="userinfo-list__icon" slot="icon">
+      <image mode="aspectFit" src="../../images/icon_kecheng01@2x.png" />
+    </view>
+  </zan-cell>
+  <zan-cell title="我的学习时间" class="userinfo-list__item" is-link>
+    <view class="userinfo-list__icon" slot="icon">
+      <image src="../../images/icon_xuexishijian@2x.png" />
+    </view>
+  </zan-cell>
+  <zan-cell title="请假" class="userinfo-list__item" is-link>
+    <view class="userinfo-list__icon" slot="icon">
+      <image src="../../images/icon_qingjia@2x.png" />
+    </view>
+  </zan-cell>
+</view>

+ 36 - 0
wechat/pages/userinfo/userinfo.wxss

xqd
@@ -0,0 +1,36 @@
+.wrapper {
+  background: #000;
+  font-family: HYQiHei-DES;
+}
+.avatar {
+  height: 189px;
+  position: relative;
+}
+.avatar-img {
+  width: 97px;
+  height: 97px;
+  margin: auto;
+}
+.avatar-text {
+  position: absolute;
+  left: 0;
+  right: 0;
+  margin: 150px auto 0;
+  color: #fff;
+  text-align: center;
+  font-size: 16.67px;
+}
+.userinfo-list__item {
+  height: 94px;
+  border-bottom: 1px solid #EEEEEE;
+}
+.userinfo-list__icon {
+  height: 17px;
+  width: 17px;
+  margin-left: 8px;
+  margin-right: 28px;
+}
+.userinfo-list__icon image {
+  width: 17px;
+  height: 17px;
+}

+ 32 - 0
wechat/project.config.json

xqd
@@ -0,0 +1,32 @@
+{
+	"description": "项目配置文件。",
+	"setting": {
+		"urlCheck": false,
+		"es6": true,
+		"postcss": true,
+		"minified": true,
+		"newFeature": true
+	},
+	"compileType": "miniprogram",
+	"libVersion": "1.9.94",
+	"appid": "touristappid",
+	"projectname": "PianoTime",
+	"condition": {
+		"search": {
+			"current": -1,
+			"list": []
+		},
+		"conversation": {
+			"current": -1,
+			"list": []
+		},
+		"game": {
+			"currentL": -1,
+			"list": []
+		},
+		"miniprogram": {
+			"current": -1,
+			"list": []
+		}
+	}
+}