Sfoglia il codice sorgente

wxminiprogram all static file

Jeffry Yu 6 anni fa
parent
commit
36dd96e978
38 ha cambiato i file con 417 aggiunte e 27 eliminazioni
  1. 16 3
      wechat/app.json
  2. 5 1
      wechat/app.wxss
  3. 8 0
      wechat/pages/announce/announce.js
  4. 5 0
      wechat/pages/announce/announce.json
  5. 3 0
      wechat/pages/announce/announce.wxml
  6. 0 0
      wechat/pages/announce/announce.wxss
  7. 22 0
      wechat/pages/apply-leave/apply-leave.js
  8. 9 0
      wechat/pages/apply-leave/apply-leave.json
  9. 34 0
      wechat/pages/apply-leave/apply-leave.wxml
  10. 0 0
      wechat/pages/apply-leave/apply-leave.wxss
  11. 8 0
      wechat/pages/article/article.js
  12. 5 0
      wechat/pages/article/article.json
  13. 3 0
      wechat/pages/article/article.wxml
  14. 0 0
      wechat/pages/article/article.wxss
  15. 10 1
      wechat/pages/index/index.js
  16. 5 0
      wechat/pages/index/index.json
  17. 15 9
      wechat/pages/index/index.wxml
  18. 32 6
      wechat/pages/index/index.wxss
  19. 56 0
      wechat/pages/my-log/my-log.js
  20. 8 0
      wechat/pages/my-log/my-log.json
  21. 13 0
      wechat/pages/my-log/my-log.wxml
  22. 0 0
      wechat/pages/my-log/my-log.wxss
  23. 8 0
      wechat/pages/mycourse/mycourse.js
  24. 8 0
      wechat/pages/mycourse/mycourse.json
  25. 16 0
      wechat/pages/mycourse/mycourse.wxml
  26. 3 0
      wechat/pages/mycourse/mycourse.wxss
  27. 8 0
      wechat/pages/rate-review/rate-review.js
  28. 11 0
      wechat/pages/rate-review/rate-review.json
  29. 19 0
      wechat/pages/rate-review/rate-review.wxml
  30. 9 0
      wechat/pages/rate-review/rate-review.wxss
  31. 11 0
      wechat/pages/rate/rate.js
  32. 10 0
      wechat/pages/rate/rate.json
  33. 39 0
      wechat/pages/rate/rate.wxml
  34. 9 0
      wechat/pages/rate/rate.wxss
  35. 4 1
      wechat/pages/userinfo/userinfo.json
  36. 3 3
      wechat/pages/userinfo/userinfo.wxml
  37. 0 1
      wechat/pages/userinfo/userinfo.wxss
  38. 2 2
      wechat/project.config.json

+ 16 - 3
wechat/app.json

xqd xqd xqd
@@ -1,7 +1,14 @@
 {
   "pages":[
     "pages/index/index",
-    "pages/userinfo/userinfo"
+    "pages/announce/announce",
+    "pages/article/article",
+    "pages/userinfo/userinfo",
+    "pages/mycourse/mycourse",
+    "pages/rate/rate",
+    "pages/rate-review/rate-review",
+    "pages/my-log/my-log",
+    "pages/apply-leave/apply-leave"
   ],
   "window":{
     "backgroundTextStyle":"light",
@@ -19,13 +26,13 @@
         "selectedIconPath": "images/btn_home_s@2x.png"
       },
       {
-        "pagePath": "pages/index/index",
+        "pagePath": "pages/announce/announce",
         "text": "",
         "iconPath": "images/btn_gonggao_n@2x.png",
         "selectedIconPath": "images/btn_gonggao_s@2x.png"
       },
       {
-        "pagePath": "pages/index/index",
+        "pagePath": "pages/article/article",
         "text": "",
         "iconPath": "images/btn_wenzhang_n@2x.png",
         "selectedIconPath": "images/btn_wenzhang_s@2x.png"
@@ -37,5 +44,11 @@
         "selectedIconPath": "images/btn_me_s@2x.png"
       }
     ]
+  },
+  "plugins": {
+    "calendar": {
+      "version": "1.1.3",
+      "provider": "wx92c68dae5a8bb046"
+    }
   }
 }

+ 5 - 1
wechat/app.wxss

xqd xqd
@@ -1,4 +1,9 @@
 @import "bower_components/zanui-weapp/dist/index.wxss";
+
+page {
+  font-family: HYQiHei-DES;
+}
+
 /* flex box */
 .flex-horizontal {
   display: flex;
@@ -13,7 +18,6 @@
 }
 .flex-2 {
   flex: 0 0 16.66667%;
-
 }
 .flex-3 {
   flex: 0 0 25%;

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

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

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

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

+ 3 - 0
wechat/pages/announce/announce.wxml

xqd
@@ -0,0 +1,3 @@
+<view>
+  已实现页面
+</view>

+ 0 - 0
wechat/pages/announce/announce.wxss


+ 22 - 0
wechat/pages/apply-leave/apply-leave.js

xqd
@@ -0,0 +1,22 @@
+
+var app = getApp()
+Page({
+  
+  onLoad: function () {
+    console.log('onLoad')
+  },
+  data: {
+    date: '2018/6/23',
+    typeEnum: [
+      '长假60天', '长假60天', '长假60天'
+    ],
+    selectedType: 0
+  },
+  bindDateChange: function(e) {
+    console.log('picker发送选择改变,携带值为', e.detail.value)
+    this.setData({
+      date: e.detail.value.replace(/-/g, '/')
+    })
+
+  }
+})

+ 9 - 0
wechat/pages/apply-leave/apply-leave.json

xqd
@@ -0,0 +1,9 @@
+{
+  "usingComponents": {
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index",
+    "zan-cell-group": "../../bower_components/zanui-weapp/dist/cell-group/index",
+    "zan-button": "../../bower_components/zanui-weapp/dist/btn/index",
+    "zan-button-group": "../../bower_components/zanui-weapp/dist/btn-group/index"
+  },
+  "navigationBarTitleText": "请假"
+}

+ 34 - 0
wechat/pages/apply-leave/apply-leave.wxml

xqd
@@ -0,0 +1,34 @@
+<view>
+  <zan-cell-group>
+    <zan-cell title="请假日期" is-link>
+      <picker
+        slot="footer"
+        mode="date"
+        value="{{date}}"
+        bindchange="bindDateChange"
+      >
+        {{date}}
+      </picker>
+    </zan-cell>
+    <zan-cell title="请假类型" is-link>
+      <picker
+        slot="footer"
+        mode="selector"
+        range="{{typeEnum}}"
+        value="{{selectedType}}"
+      >
+      {{typeEnum[selectedType]}}
+      </picker>
+    </zan-cell>
+    <zan-cell title="说明">
+      <view class="section">
+        <textarea placeholder="请输入请假说明"  auto-height />
+      </view>
+    </zan-cell>
+  </zan-cell-group>
+  <zan-cell></zan-cell>
+    <zan-cell></zan-cell>
+    <zan-button-group>
+      <zan-button type="primary" bindtap="onSubmit">提交</zan-button>
+    </zan-button-group>
+</view>

+ 0 - 0
wechat/pages/apply-leave/apply-leave.wxss


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

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

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

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

+ 3 - 0
wechat/pages/article/article.wxml

xqd
@@ -0,0 +1,3 @@
+<view>
+  已实现页面
+</view>

+ 0 - 0
wechat/pages/article/article.wxss


+ 10 - 1
wechat/pages/index/index.js

xqd
@@ -4,6 +4,15 @@ Page({
   
   onLoad: function () {
     console.log('onLoad')
-    
+    wx.getSystemInfo({
+      success: (res) => {
+        this.setData({
+          screenWidth: res.screenWidth,
+          screenHeight: res.screenHeight,
+          bannerWidth: res.screenWidth,
+          bannerHeight: res.screenWidth * 363 / 543
+        })
+      }
+    })
   }
 })

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

xqd
@@ -0,0 +1,5 @@
+{
+  "navigationBarBackgroundColor": "#000",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "首页"
+}

+ 15 - 9
wechat/pages/index/index.wxml

xqd xqd
@@ -1,20 +1,24 @@
 <!--index.wxml-->
-<view class="wrapper">
+<view class="wrapper flex-auto flex-vertical ">
   <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">
+  <swiper style="height: {{bannerHeight}}px">
+    <swiper-item class="swiper-item">
+     <image src="../../images/img_banner01@2x.png" style="width: 100%; height: {{bannerHeight}}px"/>
      <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 class="swiper-item">
+     <image src="../../images/img_banner01@2x.png" style="width: 100%; height: {{bannerHeight}}px"/>
+     <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>
   <view class="time">
@@ -23,12 +27,14 @@
     <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);">
+    <view class="time-clock">
+      <image class="time-bg" src="../../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)">
+  <view class="start flex-auto flex-horizontal">
+    <image class="start-bg" src="../../images/btn_kaishi_01@2x.png" />
     <button class="start-btn">开始</button>
   </view>
 </view>

+ 32 - 6
wechat/pages/index/index.wxss

xqd xqd xqd xqd
@@ -1,9 +1,9 @@
 page {
-  height: 100%;
+  min-height: 100%;
+  display: flex;
 }
 .wrapper {
   background: #000;
-  height: 100%;
 }
 .logo {
   padding: 5.5px 0 8.68px;
@@ -21,6 +21,9 @@ swiper {
   height: 600px;
 }
 .swiper-item__text {
+  position: absolute;
+  top: 0;
+  left: 0;
   margin-top: 63.88px;
   margin-left: 11.8px;
   font-family: PingFangSC-Semibold;
@@ -65,12 +68,24 @@ swiper {
   font-size: 18px;
   font-family: HYQiHei-DES;
 }
+.time-bg {
+  position: absolute;
+  left: 0;
+  right: 0;
+  margin: auto;
+  width: 195px;
+  height: 50px;
+}
 .time-icon {
+  position: relative;
+  z-index: 1;
   width: 18px;
   height: 18px;
   vertical-align: middle;
 }
 .time-text {
+  position: relative;
+  z-index: 2;
   font-size: 18px;
   margin-left: 10px;
   vertical-align: middle;
@@ -80,15 +95,26 @@ swiper {
   border-top: 1px solid #B1B1B1;
 }
 .start {
-  height: calc(100% - 434px);
-  background-size: 86.88px 86.88px;
+  position: relative;
+  /*height: calc(100% - 434px);
+  line-height: calc(100% - 434px);*/
   background-repeat: no-repeat;
   background-position: center;
-  line-height: calc(100% - 434px);
   text-align: center;
 }
+.start-bg {
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+  width: 86.88px;
+  height: 86.88px
+}
 .start-btn {
-  position: static;
+  position: relative;
+  z-index: 1;
   overflow: initial;
   margin: auto;
   display: inline-block;

+ 56 - 0
wechat/pages/my-log/my-log.js

xqd
@@ -0,0 +1,56 @@
+
+var app = getApp()
+Page({
+  
+  onLoad: function () {
+    console.log('onLoad')
+  },
+  data: {
+    loged: [
+      {
+        month: 'current',
+        day: '1',
+        color: '#77b9b9'
+      },
+      {
+        month: 'current',
+        day: '2',
+        color: '#77b9b9'
+      },
+      {
+        month: 'current',
+        day: '3',
+        color: '#f65556'
+      },
+      {
+        month: 'current',
+        day: '4',
+        color: '#f65556'
+      },
+      {
+        month: 'current',
+        day: '5',
+        color: '#f65556'
+      }, {
+        month: 'current',
+        day: '6',
+        color: '#77b9b9'
+      },
+      {
+        month: 'current',
+        day: '7',
+        color: '#77b9b9'
+      },
+      {
+        month: 'current',
+        day: '8',
+        color: '#77b9b9'
+      },
+      {
+        month: 'current',
+        day: '9',
+        color: '#77b9b9'
+      },
+    ]
+  }
+})

+ 8 - 0
wechat/pages/my-log/my-log.json

xqd
@@ -0,0 +1,8 @@
+{
+  "usingComponents": {
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index",
+    "zan-cell-group": "../../bower_components/zanui-weapp/dist/cell-group/index",
+    "calendar": "plugin://calendar/calendar"
+  },
+  "navigationBarTitleText": "我的学习时间"
+}

+ 13 - 0
wechat/pages/my-log/my-log.wxml

xqd
@@ -0,0 +1,13 @@
+<view>
+  <calendar
+    bindnextMonth="next"
+    days-color="{{loged}}"
+    weeks-type="cn"
+    show-more-days="true"
+  />
+  <zan-cell-group>
+    <zan-cell title="本月积累学习时长" value="8小时56分"> </zan-cell>
+    <zan-cell title="总学习时间" value="131小时28分"> </zan-cell>
+    <zan-cell title="总打卡天数" value="16天"> </zan-cell>
+  </zan-cell-group>
+</view>

+ 0 - 0
wechat/pages/my-log/my-log.wxss


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

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

+ 8 - 0
wechat/pages/mycourse/mycourse.json

xqd
@@ -0,0 +1,8 @@
+{
+  "usingComponents": {
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index",
+    "zan-cell-group": "../../bower_components/zanui-weapp/dist/cell-group/index",
+    "zan-panel": "../../bower_components/zanui-weapp/dist/panel/index"
+  },
+  "navigationBarTitleText": "我的课程"
+}

+ 16 - 0
wechat/pages/mycourse/mycourse.wxml

xqd
@@ -0,0 +1,16 @@
+<zan-panel title='成人钢琴培训初级'>
+  <zan-cell-group>
+    <zan-cell title="主讲老师" value="余军"></zan-cell>
+    <zan-cell title="报名日期" value="2018/5/27"></zan-cell>
+    <zan-cell title="课程截至日期" value="2018/5/27"></zan-cell>
+    <zan-cell title="评价讲师" is-link url="/pages/rate/rate">
+    <view slot="footer">
+      <text class="text-new">NEW</text>
+
+    </view> 
+    </zan-cell>
+    <zan-cell title="课程剩余天数" value="332天"></zan-cell>
+    <zan-cell title="剩余请假次数(短假)" value="8次"></zan-cell>
+    <zan-cell title="剩余请假次数(长假)" value="2次"></zan-cell>
+  </zan-cell-group>
+</zan-panel>

+ 3 - 0
wechat/pages/mycourse/mycourse.wxss

xqd
@@ -0,0 +1,3 @@
+.text-new {
+  color: red;
+}

+ 8 - 0
wechat/pages/rate-review/rate-review.js

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

+ 11 - 0
wechat/pages/rate-review/rate-review.json

xqd
@@ -0,0 +1,11 @@
+{
+  "usingComponents": {
+    "zan-field": "../../bower_components/zanui-weapp/dist/field/index",
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index",
+    "zan-cell-group": "../../bower_components/zanui-weapp/dist/cell-group/index",
+    "zan-panel": "../../bower_components/zanui-weapp/dist/panel/index",
+    "zan-button": "../../bower_components/zanui-weapp/dist/btn/index",
+    "zan-button-group": "../../bower_components/zanui-weapp/dist/btn-group/index"
+  },
+  "navigationBarTitleText": "评价讲师"
+}

+ 19 - 0
wechat/pages/rate-review/rate-review.wxml

xqd
@@ -0,0 +1,19 @@
+<zan-panel title='课程名称:成人钢琴培训初级\n讲师姓名:余军'>
+  <zan-cell-group>
+    <view>
+      <zan-cell title="2018/6/3">
+        <zan-cell title="平均分" value="8.9分"></zan-cell>
+      </zan-cell>
+    </view>
+    <view>
+      <zan-cell title="2018/5/31">
+        <zan-cell title="平均分" value="8.9分"></zan-cell>
+      </zan-cell>
+    </view>
+    <view>
+      <zan-cell title="2018/5/24">
+        <zan-cell title="平均分" value="8.9分"></zan-cell>
+      </zan-cell>
+    </view>
+  </zan-cell-group>
+</zan-panel>

+ 9 - 0
wechat/pages/rate-review/rate-review.wxss

xqd
@@ -0,0 +1,9 @@
+.wrapper {
+  padding: 0 15px;
+}
+.text-new {
+  color: red;
+}
+.zan-field {
+  border-bottom: 1px solid #9a9a9a;
+}

+ 11 - 0
wechat/pages/rate/rate.js

xqd
@@ -0,0 +1,11 @@
+
+var app = getApp()
+Page({
+  
+  onLoad: function () {
+    console.log('onLoad')
+  },
+  onSubmit: function() {
+    wx.navigateTo({url: '/pages/rate-review/rate-review'})
+  }
+})

+ 10 - 0
wechat/pages/rate/rate.json

xqd
@@ -0,0 +1,10 @@
+{
+  "usingComponents": {
+    "zan-field": "../../bower_components/zanui-weapp/dist/field/index",
+    "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index",
+    "zan-panel": "../../bower_components/zanui-weapp/dist/panel/index",
+    "zan-button": "../../bower_components/zanui-weapp/dist/btn/index",
+    "zan-button-group": "../../bower_components/zanui-weapp/dist/btn-group/index"
+  },
+  "navigationBarTitleText": "评价讲师"
+}

+ 39 - 0
wechat/pages/rate/rate.wxml

xqd
@@ -0,0 +1,39 @@
+<zan-panel title='课程名称:成人钢琴培训初级\n讲师姓名:余军'>
+  <view>
+    <view>
+      <zan-cell title="Q1:礼貌礼仪/精神面貌">
+        <zan-field
+          placeholder="(满分10.0)"
+          value="{{ field.value }}"
+          type="digit"
+        >
+        </zan-field>
+      </zan-cell>
+    </view>
+    <view>
+      <zan-cell title="Q2:准备充分,技巧成熟">
+        <zan-field
+          placeholder="(满分10.0)"
+          value="{{ field.value }}"
+          type="digit"
+        >
+        </zan-field>
+      </zan-cell>
+    </view>
+    <view>
+      <zan-cell title="Q3:使用清楚、容易理解的语言讲解">
+        <zan-field
+          placeholder="(满分10.0)"
+          value="{{ field.value }}"
+          type="digit"
+        >
+        </zan-field>
+      </zan-cell>
+    </view>
+    <zan-cell></zan-cell>
+    <zan-cell></zan-cell>
+    <zan-button-group>
+      <zan-button type="primary" bindtap="onSubmit">提交</zan-button>
+    </zan-button-group>
+  </view>
+</zan-panel>

+ 9 - 0
wechat/pages/rate/rate.wxss

xqd
@@ -0,0 +1,9 @@
+.wrapper {
+  padding: 0 15px;
+}
+.text-new {
+  color: red;
+}
+.zan-field {
+  border-bottom: 1px solid #9a9a9a;
+}

+ 4 - 1
wechat/pages/userinfo/userinfo.json

xqd
@@ -1,5 +1,8 @@
 {
   "usingComponents": {
     "zan-cell": "../../bower_components/zanui-weapp/dist/cell/index"
-  }
+  },
+  "navigationBarBackgroundColor": "#000",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "我的"
 }

+ 3 - 3
wechat/pages/userinfo/userinfo.wxml

xqd
@@ -4,17 +4,17 @@
     <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>
+  <zan-cell title="我的课程" class="userinfo-list__item" is-link url="/pages/mycourse/mycourse">
     <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>
+  <zan-cell title="我的学习时间" class="userinfo-list__item" is-link url="/pages/my-log/my-log">
     <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>
+  <zan-cell title="请假" class="userinfo-list__item" is-link url="/pages/apply-leave/apply-leave">
     <view class="userinfo-list__icon" slot="icon">
       <image src="../../images/icon_qingjia@2x.png" />
     </view>

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

xqd
@@ -1,6 +1,5 @@
 .wrapper {
   background: #000;
-  font-family: HYQiHei-DES;
 }
 .avatar {
   height: 189px;

+ 2 - 2
wechat/project.config.json

xqd
@@ -8,8 +8,8 @@
 		"newFeature": true
 	},
 	"compileType": "miniprogram",
-	"libVersion": "1.9.94",
-	"appid": "wx98e7bce25e638940",
+	"libVersion": "2.1.1",
+	"appid": "wxfb6faa99fcc0f67a",
 	"projectname": "PianoTime",
 	"condition": {
 		"search": {