Browse Source

页面开发完成

wangxin 6 years ago
commit
37db32ae5d
100 changed files with 240 additions and 0 deletions
  1. BIN
      .DS_Store
  2. 60 0
      app.js
  3. 22 0
      app.json
  4. 6 0
      app.wxss
  5. 34 0
      component/empty/empty.js
  6. 4 0
      component/empty/empty.json
  7. 6 0
      component/empty/empty.wxml
  8. 26 0
      component/empty/empty.wxss
  9. 18 0
      component/parse/README.md
  10. 55 0
      component/parse/parse.js
  11. 4 0
      component/parse/parse.json
  12. 3 0
      component/parse/parse.wxml
  13. 2 0
      component/parse/parse.wxss
  14. BIN
      component/parse/wxParse/emojis/00.gif
  15. BIN
      component/parse/wxParse/emojis/01.gif
  16. BIN
      component/parse/wxParse/emojis/02.gif
  17. BIN
      component/parse/wxParse/emojis/03.gif
  18. BIN
      component/parse/wxParse/emojis/04.gif
  19. BIN
      component/parse/wxParse/emojis/05.gif
  20. BIN
      component/parse/wxParse/emojis/06.gif
  21. BIN
      component/parse/wxParse/emojis/07.gif
  22. BIN
      component/parse/wxParse/emojis/08.gif
  23. BIN
      component/parse/wxParse/emojis/09.gif
  24. BIN
      component/parse/wxParse/emojis/10.gif
  25. BIN
      component/parse/wxParse/emojis/100.gif
  26. BIN
      component/parse/wxParse/emojis/101.gif
  27. BIN
      component/parse/wxParse/emojis/102.gif
  28. BIN
      component/parse/wxParse/emojis/103.gif
  29. BIN
      component/parse/wxParse/emojis/104.gif
  30. BIN
      component/parse/wxParse/emojis/105.gif
  31. BIN
      component/parse/wxParse/emojis/106.gif
  32. BIN
      component/parse/wxParse/emojis/107.gif
  33. BIN
      component/parse/wxParse/emojis/108.gif
  34. BIN
      component/parse/wxParse/emojis/109.gif
  35. BIN
      component/parse/wxParse/emojis/11.gif
  36. BIN
      component/parse/wxParse/emojis/110.gif
  37. BIN
      component/parse/wxParse/emojis/111.gif
  38. BIN
      component/parse/wxParse/emojis/112.gif
  39. BIN
      component/parse/wxParse/emojis/113.gif
  40. BIN
      component/parse/wxParse/emojis/114.gif
  41. BIN
      component/parse/wxParse/emojis/115.gif
  42. BIN
      component/parse/wxParse/emojis/116.gif
  43. BIN
      component/parse/wxParse/emojis/117.gif
  44. BIN
      component/parse/wxParse/emojis/118.gif
  45. BIN
      component/parse/wxParse/emojis/119.gif
  46. BIN
      component/parse/wxParse/emojis/12.gif
  47. BIN
      component/parse/wxParse/emojis/120.gif
  48. BIN
      component/parse/wxParse/emojis/121.gif
  49. BIN
      component/parse/wxParse/emojis/122.gif
  50. BIN
      component/parse/wxParse/emojis/123.gif
  51. BIN
      component/parse/wxParse/emojis/124.gif
  52. BIN
      component/parse/wxParse/emojis/125.gif
  53. BIN
      component/parse/wxParse/emojis/126.gif
  54. BIN
      component/parse/wxParse/emojis/127.gif
  55. BIN
      component/parse/wxParse/emojis/128.gif
  56. BIN
      component/parse/wxParse/emojis/129.gif
  57. BIN
      component/parse/wxParse/emojis/13.gif
  58. BIN
      component/parse/wxParse/emojis/130.gif
  59. BIN
      component/parse/wxParse/emojis/131.gif
  60. BIN
      component/parse/wxParse/emojis/132.gif
  61. BIN
      component/parse/wxParse/emojis/133.gif
  62. BIN
      component/parse/wxParse/emojis/134.gif
  63. BIN
      component/parse/wxParse/emojis/14.gif
  64. BIN
      component/parse/wxParse/emojis/15.gif
  65. BIN
      component/parse/wxParse/emojis/16.gif
  66. BIN
      component/parse/wxParse/emojis/17.gif
  67. BIN
      component/parse/wxParse/emojis/18.gif
  68. BIN
      component/parse/wxParse/emojis/19.gif
  69. BIN
      component/parse/wxParse/emojis/20.gif
  70. BIN
      component/parse/wxParse/emojis/21.gif
  71. BIN
      component/parse/wxParse/emojis/22.gif
  72. BIN
      component/parse/wxParse/emojis/23.gif
  73. BIN
      component/parse/wxParse/emojis/24.gif
  74. BIN
      component/parse/wxParse/emojis/25.gif
  75. BIN
      component/parse/wxParse/emojis/26.gif
  76. BIN
      component/parse/wxParse/emojis/27.gif
  77. BIN
      component/parse/wxParse/emojis/28.gif
  78. BIN
      component/parse/wxParse/emojis/29.gif
  79. BIN
      component/parse/wxParse/emojis/30.gif
  80. BIN
      component/parse/wxParse/emojis/31.gif
  81. BIN
      component/parse/wxParse/emojis/32.gif
  82. BIN
      component/parse/wxParse/emojis/33.gif
  83. BIN
      component/parse/wxParse/emojis/34.gif
  84. BIN
      component/parse/wxParse/emojis/35.gif
  85. BIN
      component/parse/wxParse/emojis/36.gif
  86. BIN
      component/parse/wxParse/emojis/37.gif
  87. BIN
      component/parse/wxParse/emojis/38.gif
  88. BIN
      component/parse/wxParse/emojis/39.gif
  89. BIN
      component/parse/wxParse/emojis/40.gif
  90. BIN
      component/parse/wxParse/emojis/41.gif
  91. BIN
      component/parse/wxParse/emojis/42.gif
  92. BIN
      component/parse/wxParse/emojis/43.gif
  93. BIN
      component/parse/wxParse/emojis/44.gif
  94. BIN
      component/parse/wxParse/emojis/45.gif
  95. BIN
      component/parse/wxParse/emojis/46.gif
  96. BIN
      component/parse/wxParse/emojis/47.gif
  97. BIN
      component/parse/wxParse/emojis/48.gif
  98. BIN
      component/parse/wxParse/emojis/49.gif
  99. BIN
      component/parse/wxParse/emojis/50.gif
  100. 0 0
      component/parse/wxParse/emojis/51.gif

BIN
.DS_Store


+ 60 - 0
app.js

@@ -0,0 +1,60 @@
+//app.js
+App({
+
+  /**
+   * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
+   */
+  onLaunch: function() {
+
+  },
+
+  /**
+   * 当小程序启动,或从后台进入前台显示,会触发 onShow
+   */
+  onShow: function(options) {
+    if (wx.getUpdateManager) {
+      const updateManager = wx.getUpdateManager()
+      updateManager.onCheckForUpdate(res => {
+        if (res.hasUpdate) {
+          updateManager.onUpdateReady(res => {
+            wx.showModal({
+              title: '更新提示',
+              content: '新版本上线了,重启应用更新!',
+              showCancel: false,
+              success: res => {
+                if (res.confirm) {
+                  updateManager.applyUpdate()
+                }
+              }
+            })
+          })
+          updateManager.onUpdateFailed(res => {
+            wx.showModal({
+              title: '更新提示',
+              content: '新版本已上线,请删除当前小程序,重新搜索进入',
+              showCancel: false,
+            })
+          })
+        }
+      })
+    }
+  },
+
+  /**
+   * 当小程序从前台进入后台,会触发 onHide
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 当小程序发生脚本错误,或者 api 调用失败时,会触发 onError 并带上错误信息
+   */
+  onError: function(msg) {
+
+  },
+  globalData: {
+    userInfo: null,
+    phone_zz: /1[0-9]{10}/
+  }
+})

+ 22 - 0
app.json

@@ -0,0 +1,22 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/login/login",
+    "pages/login-success/login-success",
+    "pages/person/person",
+    "pages/detail/detail",
+    "pages/userinfo/userinfo",
+    "pages/my-apply/my-apply",
+    "pages/my-order/my-order",
+    "pages/payment-records/payment-records",
+    "pages/payment-records-detail/payment-records-detail",
+    "pages/tax-certificate/tax-certificate"
+  ],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "开心灵工",
+    "navigationBarTextStyle": "black"
+  },
+  "sitemapLocation": "sitemap.json"
+}

+ 6 - 0
app.wxss

@@ -0,0 +1,6 @@
+/**app.wxss**/
+.container {
+  display: flex;
+  flex-direction: column;
+  box-sizing: border-box;
+} 

+ 34 - 0
component/empty/empty.js

@@ -0,0 +1,34 @@
+// component/empty/empty.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    src: {
+      type: String,
+      value: '/images/empty.png'
+    },
+    title: {
+      type: String,
+      value: '空空如也'
+    },
+    message: {
+      type: String,
+      value: ''
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
component/empty/empty.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 6 - 0
component/empty/empty.wxml

@@ -0,0 +1,6 @@
+<!--component/empty/empty.wxml-->
+  <view class="empty">
+    <image src="{{src}}"></image>
+    <text class="empty-text">{{title}}</text>
+    <text class="empty-message">{{message}}</text>
+  </view>

+ 26 - 0
component/empty/empty.wxss

@@ -0,0 +1,26 @@
+/* component/empty/empty.wxss */
+
+.empty {
+  height: 70vh;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.empty image {
+  height: 325rpx;
+  width: 340rpx;
+}
+
+.empty-text {
+  font-size: 42rpx;
+  color: #31364c;
+  margin-top: 45rpx;
+}
+
+.empty-message {
+  font-size: 32rpx;
+  color: #888a8e;
+  margin-top: 15rpx;
+}

+ 18 - 0
component/parse/README.md

@@ -0,0 +1,18 @@
+# 使用方法
+#### .json文件 
+
+```
+"usingComponents": {
+    "parse": "/component/parse/parse"
+  }
+```
+#### .js 文件
+
+```
+获取数据添加到setData到data中
+```
+#### .wxml
+
+```
+<parse parseContent='{{wxparse}}' /> //parseContent为获取参数的名字
+```

+ 55 - 0
component/parse/parse.js

@@ -0,0 +1,55 @@
+// component/parse/parse.js
+const wxparse = require('./wxParse/wxParse.js')
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    parseContent: {
+      type: null,
+      observer(parseContent) {
+        let json = '';
+        if (typeof parseContent === 'object') {
+          json = Object.assign({
+            content: '数据不能为空',
+            padding: 0
+          }, parseContent)
+        } else {
+          try {
+            json = {
+              content: parseContent.toString(),
+              padding: 0
+            }
+          } catch (e) {
+            console.log(`参数格式为:
+            {
+              content: '数据',
+              padding: 0
+            }
+            或者
+
+            字符串
+        `)
+            throw new TypeError('参数格式错误!')
+            return
+          }
+        }
+        wxparse.wxParse('article', 'html', json.content, this, json.padding)
+      }
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
component/parse/parse.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 3 - 0
component/parse/parse.wxml

@@ -0,0 +1,3 @@
+<!--component/parse/parse.wxml-->
+<import src='./wxParse/wxParse.wxml' />
+<template is="wxParse" data="{{wxParseData:article.nodes}}" />

+ 2 - 0
component/parse/parse.wxss

@@ -0,0 +1,2 @@
+/* component/parse/parse.wxss */
+@import './wxParse/wxParse.wxss';

BIN
component/parse/wxParse/emojis/00.gif


BIN
component/parse/wxParse/emojis/01.gif


BIN
component/parse/wxParse/emojis/02.gif


BIN
component/parse/wxParse/emojis/03.gif


BIN
component/parse/wxParse/emojis/04.gif


BIN
component/parse/wxParse/emojis/05.gif


BIN
component/parse/wxParse/emojis/06.gif


BIN
component/parse/wxParse/emojis/07.gif


BIN
component/parse/wxParse/emojis/08.gif


BIN
component/parse/wxParse/emojis/09.gif


BIN
component/parse/wxParse/emojis/10.gif


BIN
component/parse/wxParse/emojis/100.gif


BIN
component/parse/wxParse/emojis/101.gif


BIN
component/parse/wxParse/emojis/102.gif


BIN
component/parse/wxParse/emojis/103.gif


BIN
component/parse/wxParse/emojis/104.gif


BIN
component/parse/wxParse/emojis/105.gif


BIN
component/parse/wxParse/emojis/106.gif


BIN
component/parse/wxParse/emojis/107.gif


BIN
component/parse/wxParse/emojis/108.gif


BIN
component/parse/wxParse/emojis/109.gif


BIN
component/parse/wxParse/emojis/11.gif


BIN
component/parse/wxParse/emojis/110.gif


BIN
component/parse/wxParse/emojis/111.gif


BIN
component/parse/wxParse/emojis/112.gif


BIN
component/parse/wxParse/emojis/113.gif


BIN
component/parse/wxParse/emojis/114.gif


BIN
component/parse/wxParse/emojis/115.gif


BIN
component/parse/wxParse/emojis/116.gif


BIN
component/parse/wxParse/emojis/117.gif


BIN
component/parse/wxParse/emojis/118.gif


BIN
component/parse/wxParse/emojis/119.gif


BIN
component/parse/wxParse/emojis/12.gif


BIN
component/parse/wxParse/emojis/120.gif


BIN
component/parse/wxParse/emojis/121.gif


BIN
component/parse/wxParse/emojis/122.gif


BIN
component/parse/wxParse/emojis/123.gif


BIN
component/parse/wxParse/emojis/124.gif


BIN
component/parse/wxParse/emojis/125.gif


BIN
component/parse/wxParse/emojis/126.gif


BIN
component/parse/wxParse/emojis/127.gif


BIN
component/parse/wxParse/emojis/128.gif


BIN
component/parse/wxParse/emojis/129.gif


BIN
component/parse/wxParse/emojis/13.gif


BIN
component/parse/wxParse/emojis/130.gif


BIN
component/parse/wxParse/emojis/131.gif


BIN
component/parse/wxParse/emojis/132.gif


BIN
component/parse/wxParse/emojis/133.gif


BIN
component/parse/wxParse/emojis/134.gif


BIN
component/parse/wxParse/emojis/14.gif


BIN
component/parse/wxParse/emojis/15.gif


BIN
component/parse/wxParse/emojis/16.gif


BIN
component/parse/wxParse/emojis/17.gif


BIN
component/parse/wxParse/emojis/18.gif


BIN
component/parse/wxParse/emojis/19.gif


BIN
component/parse/wxParse/emojis/20.gif


BIN
component/parse/wxParse/emojis/21.gif


BIN
component/parse/wxParse/emojis/22.gif


BIN
component/parse/wxParse/emojis/23.gif


BIN
component/parse/wxParse/emojis/24.gif


BIN
component/parse/wxParse/emojis/25.gif


BIN
component/parse/wxParse/emojis/26.gif


BIN
component/parse/wxParse/emojis/27.gif


BIN
component/parse/wxParse/emojis/28.gif


BIN
component/parse/wxParse/emojis/29.gif


BIN
component/parse/wxParse/emojis/30.gif


BIN
component/parse/wxParse/emojis/31.gif


BIN
component/parse/wxParse/emojis/32.gif


BIN
component/parse/wxParse/emojis/33.gif


BIN
component/parse/wxParse/emojis/34.gif


BIN
component/parse/wxParse/emojis/35.gif


BIN
component/parse/wxParse/emojis/36.gif


BIN
component/parse/wxParse/emojis/37.gif


BIN
component/parse/wxParse/emojis/38.gif


BIN
component/parse/wxParse/emojis/39.gif


BIN
component/parse/wxParse/emojis/40.gif


BIN
component/parse/wxParse/emojis/41.gif


BIN
component/parse/wxParse/emojis/42.gif


BIN
component/parse/wxParse/emojis/43.gif


BIN
component/parse/wxParse/emojis/44.gif


BIN
component/parse/wxParse/emojis/45.gif


BIN
component/parse/wxParse/emojis/46.gif


BIN
component/parse/wxParse/emojis/47.gif


BIN
component/parse/wxParse/emojis/48.gif


BIN
component/parse/wxParse/emojis/49.gif


BIN
component/parse/wxParse/emojis/50.gif


+ 0 - 0
component/parse/wxParse/emojis/51.gif


Some files were not shown because too many files changed in this diff