张延森 il y a 4 ans
révision
d2976bb3fb
100 fichiers modifiés avec 5197 ajouts et 0 suppressions
  1. 12
    0
      .editorconfig
  2. 5
    0
      .eslintrc.js
  3. 16
    0
      .gitignore
  4. 4
    0
      .npmrc
  5. BIN
      README.md
  6. 10
    0
      babel.config.js
  7. 11
    0
      config/dev.js
  8. 77
    0
      config/index.js
  9. 19
    0
      config/prod.js
  10. 60
    0
      package.json
  11. 46
    0
      project.config.json
  12. 51
    0
      src/app.config.js
  13. 62
    0
      src/app.js
  14. 56
    0
      src/app.scss
  15. 93
    0
      src/assets/css/iconfont.css
  16. BIN
      src/assets/css/iconfont.eot
  17. 1
    0
      src/assets/css/iconfont.js
  18. 142
    0
      src/assets/css/iconfont.json
  19. 83
    0
      src/assets/css/iconfont.svg
  20. BIN
      src/assets/css/iconfont.ttf
  21. BIN
      src/assets/css/iconfont.woff
  22. BIN
      src/assets/css/iconfont.woff2
  23. BIN
      src/assets/img/tabicon1-.png
  24. BIN
      src/assets/img/tabicon1.png
  25. BIN
      src/assets/img/tabicon2-.png
  26. BIN
      src/assets/img/tabicon2.png
  27. BIN
      src/assets/img/tabicon5-.png
  28. BIN
      src/assets/img/tabicon5.png
  29. 42
    0
      src/components/BodyCheckItem/index.vue
  30. 24
    0
      src/components/BodyCheckItem/page.scss
  31. 47
    0
      src/components/BookItem/index.vue
  32. 39
    0
      src/components/BookItem/page.scss
  33. 167
    0
      src/components/MainPage/index.vue
  34. 84
    0
      src/components/MainPage/page.scss
  35. 36
    0
      src/components/PageBottom/index.vue
  36. 33
    0
      src/components/PageBottom/page.scss
  37. 63
    0
      src/components/ReadedItem/index.vue
  38. 130
    0
      src/components/ReadedItem/page.scss
  39. 45
    0
      src/components/demo/index.vue
  40. 58
    0
      src/components/demo/page.scss
  41. 108
    0
      src/iconfont.scss
  42. 20
    0
      src/index.html
  43. 4
    0
      src/pages/Index/BookAnswer/index.config.js
  44. 172
    0
      src/pages/Index/BookAnswer/index.vue
  45. 68
    0
      src/pages/Index/BookAnswer/page.scss
  46. 5
    0
      src/pages/Index/BookDetail/index.config.js
  47. 188
    0
      src/pages/Index/BookDetail/index.vue
  48. 188
    0
      src/pages/Index/BookDetail/page.scss
  49. 4
    0
      src/pages/Index/Search/index.config.js
  50. 117
    0
      src/pages/Index/Search/index.vue
  51. 141
    0
      src/pages/Index/Search/page.scss
  52. 4
    0
      src/pages/Index/index.config.js
  53. 146
    0
      src/pages/Index/index.vue
  54. 199
    0
      src/pages/Index/page.scss
  55. 4
    0
      src/pages/Mine/MyBodyCheck/index.config.js
  56. 93
    0
      src/pages/Mine/MyBodyCheck/index.vue
  57. 53
    0
      src/pages/Mine/MyBodyCheck/page.scss
  58. 4
    0
      src/pages/Mine/MyCollected/index.config.js
  59. 102
    0
      src/pages/Mine/MyCollected/index.vue
  60. 21
    0
      src/pages/Mine/MyCollected/page.scss
  61. 4
    0
      src/pages/Mine/MyDoctorVisit/index.config.js
  62. 102
    0
      src/pages/Mine/MyDoctorVisit/index.vue
  63. 19
    0
      src/pages/Mine/MyDoctorVisit/page.scss
  64. 4
    0
      src/pages/Mine/MyInfo/index.config.js
  65. 170
    0
      src/pages/Mine/MyInfo/index.vue
  66. 72
    0
      src/pages/Mine/MyInfo/page.scss
  67. 4
    0
      src/pages/Mine/MyReaded/index.config.js
  68. 102
    0
      src/pages/Mine/MyReaded/index.vue
  69. 21
    0
      src/pages/Mine/MyReaded/page.scss
  70. 4
    0
      src/pages/Mine/index.config.js
  71. 124
    0
      src/pages/Mine/index.vue
  72. 172
    0
      src/pages/Mine/page.scss
  73. 4
    0
      src/pages/Study/GoodsDetail/index.config.js
  74. 96
    0
      src/pages/Study/GoodsDetail/index.vue
  75. 108
    0
      src/pages/Study/GoodsDetail/page.scss
  76. 4
    0
      src/pages/Study/index.config.js
  77. 141
    0
      src/pages/Study/index.vue
  78. 96
    0
      src/pages/Study/page.scss
  79. 33
    0
      src/store.js
  80. 26
    0
      src/store/index.js
  81. 38
    0
      src/store/index/index.js
  82. 78
    0
      src/store/user/index.js
  83. 290
    0
      src/towxml/config.js
  84. 26
    0
      src/towxml/decode.js
  85. 9
    0
      src/towxml/decode.json
  86. 1
    0
      src/towxml/decode.wxml
  87. 0
    0
      src/towxml/decode.wxss
  88. 98
    0
      src/towxml/img/img.js
  89. 3
    0
      src/towxml/img/img.json
  90. 1
    0
      src/towxml/img/img.wxml
  91. 0
    0
      src/towxml/img/img.wxss
  92. 19
    0
      src/towxml/index.js
  93. 107
    0
      src/towxml/parse/index.js
  94. 55
    0
      src/towxml/parse/markdown/index.js
  95. 4
    0
      src/towxml/parse/markdown/markdown.js
  96. 2
    0
      src/towxml/parse/markdown/plugins/emoji.js
  97. 1
    0
      src/towxml/parse/markdown/plugins/ins.js
  98. 1
    0
      src/towxml/parse/markdown/plugins/mark.js
  99. 1
    0
      src/towxml/parse/markdown/plugins/sub.js
  100. 0
    0
      src/towxml/parse/markdown/plugins/sup.js

+ 12
- 0
.editorconfig Voir le fichier

@@ -0,0 +1,12 @@
1
+# http://editorconfig.org
2
+root = true
3
+
4
+[*]
5
+indent_style = space
6
+indent_size = 2
7
+charset = utf-8
8
+trim_trailing_whitespace = true
9
+insert_final_newline = true
10
+
11
+[*.md]
12
+trim_trailing_whitespace = false

+ 5
- 0
.eslintrc.js Voir le fichier

@@ -0,0 +1,5 @@
1
+// ESLint 检查 .vue 文件需要单独配置编辑器:
2
+// https://eslint.vuejs.org/user-guide/#editor-integrations
3
+module.exports = {
4
+  'extends': ['taro/vue']
5
+}

+ 16
- 0
.gitignore Voir le fichier

@@ -0,0 +1,16 @@
1
+.DS_Store
2
+node_modules/
3
+dist/
4
+npm-debug.log*
5
+yarn-debug.log*
6
+yarn-error.log*
7
+package-lock.json
8
+tests/**/coverage/
9
+
10
+# Editor directories and files
11
+.idea
12
+.vscode
13
+*.suo
14
+*.ntvs*
15
+*.njsproj
16
+*.sln

+ 4
- 0
.npmrc Voir le fichier

@@ -0,0 +1,4 @@
1
+registry=https://r.cnpmjs.org
2
+disturl=https://r.cnpmjs.org/node
3
+sass_binary_site=https://r.cnpmjs.org/node-sass/
4
+fse_binary_host_mirror=https://r.cnpmjs.org/fsevents

BIN
README.md Voir le fichier


+ 10
- 0
babel.config.js Voir le fichier

@@ -0,0 +1,10 @@
1
+// babel-preset-taro 更多选项和默认值:
2
+// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
3
+module.exports = {
4
+  presets: [
5
+    ['taro', {
6
+      framework: 'vue',
7
+      ts: false
8
+    }]
9
+  ]
10
+}

+ 11
- 0
config/dev.js Voir le fichier

@@ -0,0 +1,11 @@
1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"development"'
4
+  },
5
+  defineConstants: {
6
+    // SERVER_API: '"http://medical.p.njyunzhi.com"'
7
+    SERVER_API: '"http://127.0.0.1:8080"'
8
+  },
9
+  mini: {},
10
+  h5: {}
11
+}

+ 77
- 0
config/index.js Voir le fichier

@@ -0,0 +1,77 @@
1
+const path = require('path')
2
+
3
+const config = {
4
+  projectName: 'myApp',
5
+  date: '2020-8-7',
6
+  designWidth: 750,
7
+  deviceRatio: {
8
+    640: 2.34 / 2,
9
+    750: 1,
10
+    828: 1.81 / 2
11
+  },
12
+  sourceRoot: 'src',
13
+  outputRoot: 'dist',
14
+  plugins: [],
15
+  defineConstants: {
16
+  },
17
+  copy: {
18
+    patterns: [
19
+      {from: 'src/towxml', to:'dist/towxml'}
20
+    ],
21
+    options: {
22
+    }
23
+  },
24
+  framework: 'vue',
25
+  mini: {
26
+    postcss: {
27
+      pxtransform: {
28
+        enable: true,
29
+        config: {
30
+
31
+        }
32
+      },
33
+      url: {
34
+        enable: true,
35
+        config: {
36
+          limit: 1024 // 设定转换尺寸上限
37
+        }
38
+      },
39
+      cssModules: {
40
+        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
41
+        config: {
42
+          namingPattern: 'module', // 转换模式,取值为 global/module
43
+          generateScopedName: '[name]__[local]___[hash:base64:5]'
44
+        }
45
+      }
46
+    }
47
+  },
48
+  h5: {
49
+    publicPath: '/',
50
+    staticDirectory: 'static',
51
+    postcss: {
52
+      autoprefixer: {
53
+        enable: true,
54
+        config: {
55
+        }
56
+      },
57
+      cssModules: {
58
+        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
59
+        config: {
60
+          namingPattern: 'module', // 转换模式,取值为 global/module
61
+          generateScopedName: '[name]__[local]___[hash:base64:5]'
62
+        }
63
+      }
64
+    }
65
+  },
66
+  alias: {
67
+    '@/components': path.resolve(__dirname, '..', 'src/components'),
68
+    '@/util': path.resolve(__dirname, '..', 'src/util')
69
+  }
70
+}
71
+
72
+module.exports = function (merge) {
73
+  if (process.env.NODE_ENV === 'development') {
74
+    return merge({}, config, require('./dev'))
75
+  }
76
+  return merge({}, config, require('./prod'))
77
+}

+ 19
- 0
config/prod.js Voir le fichier

@@ -0,0 +1,19 @@
1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"production"'
4
+  },
5
+  defineConstants: {
6
+    SERVER_API: '"http://medical.p.njyunzhi.com"'
7
+  },
8
+  mini: {},
9
+  h5: {
10
+    /**
11
+     * 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
12
+     * 参考代码如下:
13
+     * webpackChain (chain) {
14
+     *   chain.plugin('analyzer')
15
+     *     .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
16
+     * }
17
+     */
18
+  }
19
+}

+ 60
- 0
package.json Voir le fichier

@@ -0,0 +1,60 @@
1
+{
2
+  "name": "myApp",
3
+  "version": "1.0.0",
4
+  "private": true,
5
+  "description": "",
6
+  "templateInfo": {
7
+    "name": "vuex",
8
+    "typescript": false,
9
+    "css": "sass"
10
+  },
11
+  "scripts": {
12
+    "build:weapp": "taro build --type weapp",
13
+    "build:swan": "taro build --type swan",
14
+    "build:alipay": "taro build --type alipay",
15
+    "build:tt": "taro build --type tt",
16
+    "build:h5": "taro build --type h5",
17
+    "build:rn": "taro build --type rn",
18
+    "build:qq": "taro build --type qq",
19
+    "build:quickapp": "taro build --type quickapp",
20
+    "dev:weapp": "npm run build:weapp -- --watch",
21
+    "dev:swan": "npm run build:swan -- --watch",
22
+    "dev:alipay": "npm run build:alipay -- --watch",
23
+    "dev:tt": "npm run build:tt -- --watch",
24
+    "dev:h5": "npm run build:h5 -- --watch",
25
+    "dev:rn": "npm run build:rn -- --watch",
26
+    "dev:qq": "npm run build:qq -- --watch",
27
+    "dev:quickapp": "npm run build:quickapp -- --watch"
28
+  },
29
+  "browserslist": [
30
+    "last 3 versions",
31
+    "Android >= 4.1",
32
+    "ios >= 8"
33
+  ],
34
+  "author": "",
35
+  "license": "MIT",
36
+  "dependencies": {
37
+    "@babel/runtime": "^7.7.7",
38
+    "@tarojs/cli": "^3.0.7",
39
+    "@tarojs/components": "3.0.7",
40
+    "@tarojs/mini-runner": "3.0.0",
41
+    "@tarojs/runtime": "3.0.7",
42
+    "@tarojs/taro": "3.0.7",
43
+    "qs": "^6.9.4",
44
+    "vue": "^2.5.0",
45
+    "vue-template-compiler": "^2.5.0",
46
+    "vuex": "^3.5.1"
47
+  },
48
+  "devDependencies": {
49
+    "@babel/core": "^7.8.0",
50
+    "@tarojs/mini-runner": "3.0.7",
51
+    "@tarojs/webpack-runner": "3.0.7",
52
+    "@types/webpack-env": "^1.13.6",
53
+    "babel-preset-taro": "3.0.7",
54
+    "eslint": "^6.8.0",
55
+    "eslint-config-taro": "3.0.7",
56
+    "eslint-plugin-vue": "^6.x",
57
+    "stylelint": "9.3.0",
58
+    "vue-loader": "^15.9.2"
59
+  }
60
+}

+ 46
- 0
project.config.json Voir le fichier

@@ -0,0 +1,46 @@
1
+{
2
+  "miniprogramRoot": "dist/",
3
+  "projectname": "myApp",
4
+  "description": "",
5
+  "appid": "wxf2956bfef9daf0ae",
6
+  "setting": {
7
+    "urlCheck": false,
8
+    "es6": false,
9
+    "enhance": false,
10
+    "postcss": false,
11
+    "preloadBackgroundData": false,
12
+    "minified": false,
13
+    "newFeature": false,
14
+    "coverView": true,
15
+    "nodeModules": false,
16
+    "autoAudits": false,
17
+    "showShadowRootInWxmlPanel": true,
18
+    "scopeDataCheck": false,
19
+    "uglifyFileName": false,
20
+    "checkInvalidKey": true,
21
+    "checkSiteMap": true,
22
+    "uploadWithSourceMap": true,
23
+    "compileHotReLoad": false,
24
+    "useMultiFrameRuntime": true,
25
+    "useApiHook": true,
26
+    "useApiHostProcess": false,
27
+    "babelSetting": {
28
+      "ignore": [],
29
+      "disablePlugins": [],
30
+      "outputPath": ""
31
+    },
32
+    "enableEngineNative": false,
33
+    "bundle": false,
34
+    "useIsolateContext": true,
35
+    "useCompilerModule": false,
36
+    "userConfirmedUseCompilerModuleSwitch": false,
37
+    "userConfirmedBundleSwitch": false,
38
+    "packNpmManually": false,
39
+    "packNpmRelationList": [],
40
+    "minifyWXSS": true
41
+  },
42
+  "compileType": "miniprogram",
43
+  "simulatorType": "wechat",
44
+  "simulatorPluginLibVersion": {},
45
+  "condition": {}
46
+}

+ 51
- 0
src/app.config.js Voir le fichier

@@ -0,0 +1,51 @@
1
+
2
+export default {
3
+  pages: [
4
+    'pages/Index/index', // 首页
5
+    'pages/Index/Search/index', // 搜索页
6
+    'pages/Index/BookDetail/index', // 详情
7
+    'pages/Index/BookAnswer/index', // 答题
8
+
9
+    'pages/Study/index', // 学习天地
10
+
11
+    'pages/Mine/index', // 我的
12
+    'pages/Mine/MyCollected/index', // 我的收藏
13
+    'pages/Mine/MyReaded/index', // 我的阅读
14
+    'pages/Mine/MyDoctorVisit/index', // 我的就诊
15
+    'pages/Mine/MyBodyCheck/index', // 我的体检
16
+    'pages/Mine/MyInfo/index', // 基础信息
17
+  ],
18
+  tabBar: {
19
+    color: '#666666',
20
+    selectedColor: '#f4c819',
21
+    list: [
22
+      {
23
+        iconPath: 'assets/img/tabicon1.png',
24
+        selectedIconPath: 'assets/img/tabicon1-.png',
25
+        pagePath: 'pages/Index/index',
26
+        text: '首页推荐'
27
+      },
28
+      {
29
+        iconPath: 'assets/img/tabicon2.png',
30
+        selectedIconPath: 'assets/img/tabicon2-.png',
31
+        pagePath: 'pages/Study/index',
32
+        text: '学习天地'
33
+      },
34
+      {
35
+        iconPath: 'assets/img/tabicon5.png',
36
+        selectedIconPath: 'assets/img/tabicon5-.png',
37
+        pagePath: 'pages/Mine/index',
38
+        text: '我的'
39
+      }
40
+    ]
41
+  },
42
+  window: {
43
+    backgroundTextStyle: 'light',
44
+    navigationBarBackgroundColor: '#fff',
45
+    navigationBarTitleText: 'WeChat',
46
+    navigationBarTextStyle: 'black'
47
+  },
48
+  usingComponents: {
49
+    'towxml': '/towxml/towxml'
50
+  }
51
+}

+ 62
- 0
src/app.js Voir le fichier

@@ -0,0 +1,62 @@
1
+import Taro from '@tarojs/taro'
2
+import Vue from 'vue'
3
+import { vueAuthPlugin } from '@/util/auth-plugin'
4
+import store from './store/index'
5
+import { createNamespacedHelpers } from 'vuex'
6
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
7
+
8
+import './app.scss'
9
+import './assets/css/iconfont.css'
10
+
11
+// Vue.config.productionTip = false
12
+
13
+// 引入项目通用(顶层)方法对象
14
+import ToolClass from './util/PublicMethod/index'
15
+Vue.prototype.ToolClass = ToolClass
16
+
17
+Vue.use(vueAuthPlugin)
18
+
19
+const App = new Vue({
20
+  store,
21
+  onLaunch (options) {
22
+    // console.log(`options is`, options)
23
+    // this.login(options)
24
+  },
25
+  render (h) {
26
+    // this.$slots.default 是将要会渲染的页面
27
+    return h('block', this.$slots.default)
28
+  },
29
+  computed: {
30
+    ...mapUserState({
31
+      UserInfo: x => x.UserInfo // 用户信息
32
+    })
33
+  },
34
+  methods: {
35
+    ...mapUserActions([
36
+      'WxGetPhoneAuth',
37
+      'WxLogin'
38
+    ]),
39
+    login (options) {
40
+      const _that = this
41
+      wx.login({
42
+        success (res) {
43
+          if (res.code) {
44
+            _that.WxLogin({ queryData: { code: res.code } }).then((res) => {
45
+              console.log('------------->', res)
46
+              wx.setStorageSync('token', res.data.data.token)
47
+              wx.setStorageSync('tokentime', Date.now())
48
+            })
49
+          } else {
50
+            wx.showToast({
51
+              title: '初始化失败, 请退出重试',
52
+              icon: 'none',
53
+              duration: 3000
54
+            })
55
+          }
56
+        }
57
+      })
58
+    }
59
+  }
60
+})
61
+
62
+export default App

+ 56
- 0
src/app.scss Voir le fichier

@@ -0,0 +1,56 @@
1
+page {
2
+  width: 100%;
3
+  height: 100%;
4
+  background: #eee;
5
+
6
+  .centerLabel {
7
+    display: block;
8
+    position: absolute;
9
+    left: 50%;
10
+    top: 50%;
11
+    transform: translate(-50%, -50%);
12
+    -webkit-transform: translate(-50%, -50%);
13
+  }
14
+
15
+  .flex-h {
16
+    display: flex;
17
+    display: -webkit-flex;
18
+  }
19
+
20
+  .flex-v {
21
+    display: flex;
22
+    display: -webkit-flex;
23
+    flex-direction: column;
24
+    -webkit-flex-direction: column;
25
+  }
26
+
27
+  .flex-item {
28
+    flex: 1;
29
+    -webkit-flex: 1;
30
+    position: relative;
31
+    overflow: hidden;
32
+  }
33
+
34
+  .text-overflow-line2 {
35
+    overflow: hidden;
36
+    text-overflow: ellipsis;
37
+    display: -webkit-box;
38
+    -webkit-box-orient: vertical;
39
+    -webkit-line-clamp: 2;
40
+  }
41
+
42
+  image {
43
+    &.centerLabel {
44
+      &[mode=aspectFill] {
45
+        min-width: 100%;
46
+        min-height: 100%;
47
+      }
48
+    }
49
+  }
50
+
51
+  navigator {
52
+    &:active {
53
+      background: none;
54
+    }
55
+  }
56
+}

+ 93
- 0
src/assets/css/iconfont.css Voir le fichier

@@ -0,0 +1,93 @@
1
+@font-face {font-family: "iconfont";
2
+  src: url('iconfont.eot?t=1617786722253'); /* IE9 */
3
+  src: url('iconfont.eot?t=1617786722253#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+  url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAyAAAsAAAAAFmAAAAwwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCFVAqbYJV3ATYCJANQCyoABCAFhG0HgWsbhBIzklTGTrL/KoEHQ9RZP+xsAmEYmu2EXqiV7y9NTevx3mJr1BBzmNr5hBr+R4ClNfZ+PFBrr29v9+gTlFl16pBUVRWzkUDjgXxlbI2v4ksmtbWZzD+d+u9f2ka+SEWqrC9LjZsKTXU6yAWYCUwGKpmYlDn6MF3vQ+vQeuS5b31Xn0THJFcTgRVWQs78ndREIvPf/r1z7ydyEyZCleS3I4++cKHX5trkrvD9hEFjp9SE3IQbAziY3P/fWmpZAtCEXYSLUHFy5u4CszMHPzwhJIUodIS6De6FutuyA3bX58vKVDhZYXwhwDxzzYRSKTjp1T2dgJY1dgnHTqwzQCXRpUC/+3f27QBVIlcq8QoqU6G4M03CG7kqe5pZ8Nr78+Gf3aEik0e64tmby3eDQ035S1y4uNB5x4GhP4HFfUTsQiL8UJZ8FwO6y2Mt1dDkK9YYyFfvNaW2MRFPISLgvjQzze9mYXZ+7suigzLnVtpap4+z1UWwxnBel/aG/8qjqy1TKURJS9Az0FfKddSGRsaEAqwjXf+3jmlKK4UuTQtp04AMPgZU8BWAAr4dEOE7AAm+F0lf/CAgwM8AevAvgAF8BtCH/0ZyTnyBFHJm51PoMPcR1B7/BBjCPwNG8C8UG9PZxLljGw6QLpM/gfGtx9KXRbsLEWUGS44oBEpKmdcpjPK67ujYuqROaXvYuqkZtqSqC+vF7dq03rJOp7vsYWdcDjr9pIlNo/bKnbqdzvDoiG9iBx9M2yupvs/BO2x1A1F2i7179m3cabK/9B//Q35brEwqvEaru3zfCoKw55nE3fjebct6yz8FnTl/18O/Lel/oQd/mhO/rcJz8oK/oi83f/Q78sHKD157xrXu57zsTnPI2jRsjFxgPZZRQGygerMxbFVTjXr8WW84bGvjT+pNs/gim+kzzOj1vvKOXbWgdUiy/oKua2S9JfbtvrFPvPvDcq7f8UweGuMfumMpfefHFVoJsa54THvqw3QQrP3GV39Z8sRrhhK1+stIPYU7RKSuh3Wh+4iNPvx5l977FXrE5z34caee3O6DJ2mNV0iZVSHEoZsZT9cAcadNMh7XqUmG6PIswNzrvh1vVLWTgESAesNrtzNd8qbGkBK53Vd5Ui+EUnZHH/qjsqCVXXTfb2lW6Yzp3HgVqJX8Bo0pSuRxF2RSi0EaHGNoWqmkXZCt8XiciKq2jafzMd2B8aGR60rh/klUSj0p7VzdYye6DCljjt67dzfmNhEbpISwZ5ka77ejAAjBksLR5G35yYIABhHHnrvoCYrFpn01oO2Uhrv7Bjxvn9B2Als1bT3sQBjeKZXtgqgm2LELhscRm59D/SKHnqtKzWZkldmf6vX/eYpdRjNYVZeBARQqtZlCAM3VkBp46TN3cblJKJcgzPkr0NsjB8hzhNhLCDFs+kYag6Wy2oMkKwNIosUxHdtqpa3OdZdBBD76VkNu0MniXPk4pFWmoMJj5blZP74AGLyHFM+fHsZf9eLii3pQuF6X/MFftdKbRknTpP7g5M9NE2VlQrTSGzZtfjvf5URa3WxJxZg4/dIMlmgeF610zxyrwfHx3Pb7z5sSf+Y9+tdK/xrMbQKPQMaBMOXvQgBDyxFUnQo7tOsqphiWLSl3iRpQtWd991QvMh37tsjTEcruPY+o6yXE1nX1/LxsKNeN14TxhwULKjYterYS85FlafU0Go/5gv5xP6cfrI0ffIbxdiQEsUU7d6g0farlCAOxXC8VO4unR694jnt/POL+dpn/16fBv2ADKFbUSlaxVaKKB95JQqo7KXcEYnUiodr1L7tGR5f5wVoIGsCuAPKcvWyI13rhw+0LZkLfD9N3Doi4Hrr7zaKXdrooR1KV7vLYoTJJWZGaulxNz7qJd4lNTo6lx90O0on+suNSkR8xUhMbnu/vf/oUJpaLG/5o2HHsBJYRoyrlPdRaA64vcaSwEElCcIficyKV8KTCon6+yQkJBKeE+JQoy+JEYHgD44mVwbA++eS06LbWqQyGNfRhHd6PSMTx+kXSIhDIf5bAO5HWVbbVtlXWY42/u9r/dH3vd/dn6RwQDKK4+Intp7Z78mV5fXyD3C+317AvjwSzJiy55ZZz4tGGvhvX5J7wNI0pn7cp2+vdLif5RE4EjqhpywdVIhFJLByXzCNOOx1rgM3wrAmd6eyT23zIEPzzzwLj+CvTtv1aFJsCdJ2ot8v0F/+X3xwZKWGuUXP9+I/W6TT9PameqSnR+Y3zG/MXDdAmJIDPw0mwZRYcyvEDYHNM+ulZTEkGDHL3rZ7b+zbiTe/c6mHdY7feYUibSkD/QsE8zXzdfHZgyINN57xrEJNgGk7wEaQbuwF31oc4t2eRxxQjsakll/r0p3nII2nmQeqIOfQ0pPc5hzyJpPnnVeDM+JFd7eiHIKxNu43JX+dHF/W4NKbChLPmLE6um54qvrxyCW8OZ6V5ufsxVIFApE2fPpaJQt5kejRAUWazMD58DPgcx8EPCx+P/JpYeRh8UXY8aKbaIKukHdMatL+wr5Ye4Dc+BRwzL82ezplWnmm+DTKh6aOT1aSIE0WIKVQrZr2cvtBMPoDGbrQssWzKIOwlHuJYSHuRGfp1EsWBLAj2kQ+CmXepURNUArfvQJehJdu3l7gqd2yHJUEao+D06XKhSthWfXg0rKmBdvaYeeBoZAxCyB7N5wT2nQWTSfMayUsdJEyxL2yiNHatWrsutWDNul2CXZ3hYtYi5iJxouQwcT1jPdHybJUArFMgg4blJCEGZhAyCEnPHR8PwQxyS0cKpyzNgmAGIYVI/pTJWQCMkvkkQh976oZcwyxhauSbQ1WLrhIgVIMSoIIUknbxUJ8K/T1TyWfoYk8i8LuyEshZUZEAbNs3K1Wsl7iIY8QdfEEOPX4nZThOG6g98knhsVGewQCU7YHRpdqrlW6lOL2o77IOfiH/tqGEXoyXYJVPtTNSA7dTmDGKDVomOCKkDcQpOQm7C6iYoANERTFdmOIlQSpZbyKa9GR52x/qeEaiA5X+CZjU57J6pBgUqw2FGcByteOKip4Dv+6eFwiFQvaUP5wchkowfvvwnz+tzxCzFBiudR2UXXc6DsuY+xVlnOPcSXbjyKrE/Ccms5w80lRX9bO9hvk4zXROci5z9h0a6zahySazDUF2pmwm0M2w26PidiA2Y7eHSqDVn2TU6TLZmTrfYvZF1yKXGa8nk2MBBtW+A3FNtbVNcQf4D50vOj/kH4g0h5Zyjf7myAPYQ+yi/OQA7DPvM1hMx5es3h/TeNxkMew/uWSsyY452mOpNsx6RESxUcdSHJjdNHab9UK+LMFs8YVsW0UrfNoWI9VLYpLNbL1fMCh2jbHfw61p+oUjPaYxMoUoSlfLO2fR2OcpUd2XJPJjVUrSXcjQS/UM6kjfOC1uyLwL2l9T2SK1nkNCfVzqs7kTy5Ec/NkapGBmJdjzmpSp0xnZRl9dMfuBSy4R5Mb5Afo2CHI3MOLcTZFd4PgEcNyLa1F3L+pn5Khz9JFVBRodtDwMHxXfiT1lAEAdBjWf6SjVZwf8KybCX0T/ixtQQgi0wWs+lbCrJAhuV/lshad8yuD+kknwMz6xUMdxSTBemDZeBE49O/Q4lxH6nYj/Lk88aGwrkJnnWfJT5axqBaaEOfkbhenZPlPPm6St3tLVmJKcd03fe8zEl25ThpaxgilhxcjfORintQ2TYeM0QpnSahRVNjkm110o17YHFSoHUctO9/e3jXlLIY3ADq8CBQPfKNPzDUUDPxiM6y/KLfGPCoOAopZz4Upl25Yw6nDtISeoRDEJU6KTZgEd/P4PoLjOfTzTi3wBH0y9SKMk3X4PDnwfNkKvMiIppMdG3Ilng7pG0Xq0UFKkidpzHEuVzajEZnZwlAdy5CSuCIUptVFCjtybHDK//wFQWC3nS6bdpX4BvMCcXkhFkhqO98zVmvZchgY9JUOakIQ11kMN4U4ToDZakNCqz7NAiUR0i6bWWawtJ+uyaHxj8wkwL9+M+mufBCjJiqrphmnZjuv5WNg4uHhhd9Xk2Fld3E6CG72uah80cjl/pXQzA8xo3KLr1hfNE2wCcmDcjAzK4asBK9iQsQ0z63c5WFNqnmNz2EZx7gpzLHtGQq5B0npiqHhrDV80uL2ygNvytgoHd4q6e6M0zWYAAAA=') format('woff2'),
5
+  url('iconfont.woff?t=1617786722253') format('woff'),
6
+  url('iconfont.ttf?t=1617786722253') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
7
+  url('iconfont.svg?t=1617786722253#iconfont') format('svg'); /* iOS 4.1- */
8
+}
9
+
10
+.iconfont {
11
+  font-family: "iconfont" !important;
12
+  font-size: 16px;
13
+  font-style: normal;
14
+  -webkit-font-smoothing: antialiased;
15
+  -moz-osx-font-smoothing: grayscale;
16
+}
17
+
18
+.iconbiaoqian:before {
19
+  content: "\e63f";
20
+}
21
+
22
+.iconfenxiang:before {
23
+  content: "\e60b";
24
+}
25
+
26
+.iconshoucang1:before {
27
+  content: "\e629";
28
+}
29
+
30
+.iconweixin:before {
31
+  content: "\e62a";
32
+}
33
+
34
+.iconqq:before {
35
+  content: "\e6fd";
36
+}
37
+
38
+.iconzhuye:before {
39
+  content: "\e61a";
40
+}
41
+
42
+.iconsousuo:before {
43
+  content: "\e6e3";
44
+}
45
+
46
+.iconxuewei:before {
47
+  content: "\e613";
48
+}
49
+
50
+.iconwode:before {
51
+  content: "\e8a0";
52
+}
53
+
54
+.icontijian:before {
55
+  content: "\e63b";
56
+}
57
+
58
+.iconshoucang:before {
59
+  content: "\e60a";
60
+}
61
+
62
+.iconjichuxinxi:before {
63
+  content: "\e7ea";
64
+}
65
+
66
+.iconguanbi:before {
67
+  content: "\e607";
68
+}
69
+
70
+.iconjiantouleft:before {
71
+  content: "\e64a";
72
+}
73
+
74
+.iconyuedu:before {
75
+  content: "\e6b6";
76
+}
77
+
78
+.iconjiuzhen:before {
79
+  content: "\e6a3";
80
+}
81
+
82
+.iconjiantouup:before {
83
+  content: "\e8a1";
84
+}
85
+
86
+.iconjiantoudown:before {
87
+  content: "\e8a2";
88
+}
89
+
90
+.iconjiantouright:before {
91
+  content: "\e8a3";
92
+}
93
+

BIN
src/assets/css/iconfont.eot Voir le fichier


+ 1
- 0
src/assets/css/iconfont.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 142
- 0
src/assets/css/iconfont.json Voir le fichier

@@ -0,0 +1,142 @@
1
+{
2
+  "id": "2461480",
3
+  "name": "医药平台",
4
+  "font_family": "iconfont",
5
+  "css_prefix_text": "icon",
6
+  "description": "",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "10468863",
10
+      "name": "标签",
11
+      "font_class": "biaoqian",
12
+      "unicode": "e63f",
13
+      "unicode_decimal": 58943
14
+    },
15
+    {
16
+      "icon_id": "3763979",
17
+      "name": "分享",
18
+      "font_class": "fenxiang",
19
+      "unicode": "e60b",
20
+      "unicode_decimal": 58891
21
+    },
22
+    {
23
+      "icon_id": "19954256",
24
+      "name": "收 藏",
25
+      "font_class": "shoucang1",
26
+      "unicode": "e629",
27
+      "unicode_decimal": 58921
28
+    },
29
+    {
30
+      "icon_id": "637798",
31
+      "name": "微信",
32
+      "font_class": "weixin",
33
+      "unicode": "e62a",
34
+      "unicode_decimal": 58922
35
+    },
36
+    {
37
+      "icon_id": "1898963",
38
+      "name": "qq",
39
+      "font_class": "qq",
40
+      "unicode": "e6fd",
41
+      "unicode_decimal": 59133
42
+    },
43
+    {
44
+      "icon_id": "720985",
45
+      "name": "首页",
46
+      "font_class": "zhuye",
47
+      "unicode": "e61a",
48
+      "unicode_decimal": 58906
49
+    },
50
+    {
51
+      "icon_id": "881745",
52
+      "name": "搜索",
53
+      "font_class": "sousuo",
54
+      "unicode": "e6e3",
55
+      "unicode_decimal": 59107
56
+    },
57
+    {
58
+      "icon_id": "1277603",
59
+      "name": "学位",
60
+      "font_class": "xuewei",
61
+      "unicode": "e613",
62
+      "unicode_decimal": 58899
63
+    },
64
+    {
65
+      "icon_id": "2076312",
66
+      "name": " 我的",
67
+      "font_class": "wode",
68
+      "unicode": "e8a0",
69
+      "unicode_decimal": 59552
70
+    },
71
+    {
72
+      "icon_id": "3879034",
73
+      "name": "体检管理",
74
+      "font_class": "tijian",
75
+      "unicode": "e63b",
76
+      "unicode_decimal": 58939
77
+    },
78
+    {
79
+      "icon_id": "4333444",
80
+      "name": "收藏",
81
+      "font_class": "shoucang",
82
+      "unicode": "e60a",
83
+      "unicode_decimal": 58890
84
+    },
85
+    {
86
+      "icon_id": "6129329",
87
+      "name": "283用户资料、个人信息、个人资料",
88
+      "font_class": "jichuxinxi",
89
+      "unicode": "e7ea",
90
+      "unicode_decimal": 59370
91
+    },
92
+    {
93
+      "icon_id": "9673157",
94
+      "name": "关  闭",
95
+      "font_class": "guanbi",
96
+      "unicode": "e607",
97
+      "unicode_decimal": 58887
98
+    },
99
+    {
100
+      "icon_id": "12686748",
101
+      "name": "箭头",
102
+      "font_class": "jiantouleft",
103
+      "unicode": "e64a",
104
+      "unicode_decimal": 58954
105
+    },
106
+    {
107
+      "icon_id": "15659289",
108
+      "name": "阅读",
109
+      "font_class": "yuedu",
110
+      "unicode": "e6b6",
111
+      "unicode_decimal": 59062
112
+    },
113
+    {
114
+      "icon_id": "18261776",
115
+      "name": "面性医生图标3",
116
+      "font_class": "jiuzhen",
117
+      "unicode": "e6a3",
118
+      "unicode_decimal": 59043
119
+    },
120
+    {
121
+      "icon_id": "20764695",
122
+      "name": "箭头",
123
+      "font_class": "jiantouup",
124
+      "unicode": "e8a1",
125
+      "unicode_decimal": 59553
126
+    },
127
+    {
128
+      "icon_id": "20764698",
129
+      "name": "箭头",
130
+      "font_class": "jiantoudown",
131
+      "unicode": "e8a2",
132
+      "unicode_decimal": 59554
133
+    },
134
+    {
135
+      "icon_id": "20764712",
136
+      "name": "箭头",
137
+      "font_class": "jiantouright",
138
+      "unicode": "e8a3",
139
+      "unicode_decimal": 59555
140
+    }
141
+  ]
142
+}

+ 83
- 0
src/assets/css/iconfont.svg Voir le fichier

@@ -0,0 +1,83 @@
1
+<?xml version="1.0" standalone="no"?>
2
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+<!--
4
+2013-9-30: Created.
5
+-->
6
+<svg>
7
+<metadata>
8
+Created by iconfont
9
+</metadata>
10
+<defs>
11
+
12
+<font id="iconfont" horiz-adv-x="1024" >
13
+  <font-face
14
+    font-family="iconfont"
15
+    font-weight="500"
16
+    font-stretch="normal"
17
+    units-per-em="1024"
18
+    ascent="896"
19
+    descent="-128"
20
+  />
21
+    <missing-glyph />
22
+    
23
+    <glyph glyph-name="biaoqian" unicode="&#58943;" d="M444.30480288-37.875a17.57778113 17.57778113 0 0 0-12.4450686 5.15028955L95.315544 304.04799188000004a17.57778113 17.57778113 0 0 0 1e-8 24.85498151L567.20864634 800.70818728c3.72648944 3.7089116 8.98224609 5.60731201 14.15011348 5.0624003L891.53627923 775.23798266a17.57778113 17.57778113 0 0 0 15.78484699-15.97820251l26.50729367-306.04674106a17.57778113 17.57778113 0 0 0-5.07997897-13.93918011L456.73229364-32.724710449999975a17.52504758 17.52504758 0 0 0-12.42749076-5.15028955zM132.61559412 316.47548264l311.68920876-311.91772L898.09279105 458.34575079 873.53663135 741.68199902 586.19264972 769.96464817 132.61559412 316.47548264zM732.56283026 518.8308948700001a85.0588808 85.0588808 0 0 0-60.66092175 25.18895984c-33.39778381 33.29231671-33.41536084 87.71312632-0.01757785 121.26910913 16.2242916 16.20671375 37.75707339 25.11864844 60.6784996 25.11864925s44.45420718-8.91193469 60.64334308-25.08349355a85.28739203 85.28739203 0 0 0 25.18895984-60.90701002 84.90068096 84.90068096 0 0 0-25.2065377-60.46756622 85.14677004 85.14677004 0 0 0-60.62576522-25.11864843z m0 136.42115679a50.2724534 50.2724534 0 0 1-35.7883624-14.80049148 50.69431934 50.69431934 0 0 1-0.01757702-71.57672397c19.15978106-19.23009247 52.46967563-19.19493677 71.59430099-0.03515487a49.93847507 49.93847507 0 0 1 14.88837992 35.64773877 50.44823108 50.44823108 0 0 1-14.87080207 35.98171792 50.36034183 50.36034183 0 0 1-35.80593942 14.78291364z"  horiz-adv-x="1024" />
24
+
25
+    
26
+    <glyph glyph-name="fenxiang" unicode="&#58891;" d="M293.54666667 230.08969707000006c-96.81454507 0-176.2521216 79.43757547-176.2521216 176.2521216 0 96.81454507 79.43757547 176.2521216 176.2521216 176.25212053s176.2521216-79.43757547 176.2521216-176.25212053c2.48242453-94.3321216-76.955152-176.2521216-176.2521216-176.2521216z m0 305.33818133c-69.5078784 0-126.60363627-57.09575787-126.60363627-126.60363627s57.09575787-126.60363627 126.60363627-126.60363626 126.60363627 57.09575787 126.60363626 126.60363626-57.09575787 126.60363627-126.60363626 126.60363627zM750.31272747 550.32242453c-62.06060587 0-111.7090912 49.64848533-111.7090912 111.70909014s49.64848533 111.7090912 111.7090912 111.7090912 111.7090912-49.64848533 111.7090912-111.7090912-49.64848533-111.7090912-111.7090912-111.70909014z m0 176.25212054c-34.7539392 0-62.06060587-27.30666667-62.06060587-62.06060587s27.30666667-62.06060587 62.06060587-62.06060587 62.06060587 27.30666667 62.06060586 62.06060587-27.30666667 62.06060587-62.06060586 62.06060587zM772.65454507-8.22303039999997c-74.47272747 0-134.0509088 59.57818133-134.0509088 134.0509088 0 74.47272747 59.57818133 134.0509088 134.0509088 134.05090987 74.47272747 0 134.0509088-59.57818133 134.05090986-134.05090987 0-74.47272747-59.57818133-134.0509088-134.05090986-134.0509088z m0 218.45333333c-47.1660608 0-84.40242453-37.23636373-84.40242347-84.40242453s37.23636373-84.40242453 84.40242347-84.40242347 84.40242453 37.23636373 84.40242453 84.40242347-37.23636373 84.40242453-84.40242453 84.40242453zM440.63030293 357.14016960000004l250.4517824-156.6906176-26.3385216-42.10191573-250.4517824 156.69061866zM659.505648 647.4348608l23.78162453-43.56654613-248.41619413-135.54036267-23.78162347 43.56654507z"  horiz-adv-x="1024" />
27
+
28
+    
29
+    <glyph glyph-name="shoucang1" unicode="&#58921;" d="M928.25-65.10000000000002c-13.05 0-27.9 3.6-41.4 10.8L691.55 43.35000000000002l-196.65-97.65c-12.6-6.75-26.55-10.35-41.4-10.35-18.9 0-37.35 5.85-52.2 17.1-27.45 20.7-41.4 56.25-35.1 89.1l40.05 208.35-154.35 143.55c-23.85 24.3-32.85 58.95-23.85 91.8l0.45 0.9c11.25 33.75 39.15 57.15 72.9 61.65l214.2 39.15L611.45 782.25C626.75 813.3 658.25 833.1 691.55 833.1c34.65 0 67.05-20.7 80.55-51.3l95.85-194.85 214.2-37.35c33.75-4.95 62.1-29.25 71.55-62.55 10.8-32.4 1.8-67.95-22.5-92.25l-0.45-0.45-153.45-144.9 38.7-208.8c6.3-33.3-7.2-67.05-34.65-88.2-15.75-11.25-34.2-17.55-53.1-17.55z"  horiz-adv-x="1426" />
30
+
31
+    
32
+    <glyph glyph-name="weixin" unicode="&#58922;" d="M511.609097-65.619254M889.618407 108.916874c41.7468 38.149878 67.083861 88.273463 67.083861 143.163607 0 95.53382-76.727499 176.60423-183.177949 205.317179-6.348592 153.081491-162.17152 275.610128-353.493963 275.610128-195.352223 0-353.714997-127.743406-353.714997-285.319258 0-72.363098 33.395598-138.433886 88.432075-188.729385 17.22122-15.737426-2.939959-58.810431-27.714202-94.395904 41.866526 11.564383 86.519516 19.088754 125.611859 19.088754 18.300808 0 35.388998-1.65264 50.386574-5.305843 36.623106-10.348696 75.996858-15.981996 117.000737-15.981996 7.963369 0 15.862269 0.239454 23.699772 0.657986 42.0937-75.114768 135.796826-127.388319 244.639766-127.388319 31.104415 0 60.974723 4.26821 88.757486 12.126178 11.382235 2.77623 24.338315 4.028757 38.222533 4.028757 29.65439 0 63.530942-5.709025 95.28925-14.483876-18.787902 26.993794-34.088376 59.664891-21.020756 71.607898L889.620453 108.916874zM420.035472 214.483188c-35.33067 0-69.922513 4.716418-102.824877 14.014178l-0.907673 0.254803-0.916882 0.225127c-18.48398 4.50971-39.590694 6.795776-62.738903 6.795776-13.301957 0-26.589588-0.730641-39.585577-1.979074 2.76088 30.538527-8.94165 50.646494-23.152303 63.637366-22.955828 20.97573-40.786938 44.560892-52.993958 70.099545-12.261255 25.645077-18.478863 52.615335-18.478863 80.157621 0 60.140729 29.904077 117.384477 84.204797 161.187099 27.724435 22.364357 60.207243 39.98876 96.537683 52.384068 38.179554 13.029758 78.840626 19.632129 120.857579 19.632129s82.678024-6.608511 120.857579-19.632129c36.329417-12.395308 68.812225-30.019711 96.537683-52.384068 48.465828-39.09132 77.472466-88.892563 83.153862-141.900847l0.005117 0c-10.565636 1.01819-21.313422 1.561565-32.218796 1.561565-148.19725 0-268.334421-96.90812-268.334421-216.45382 0-12.8077 1.39272-25.361621 4.033873-37.559431 0 0 0 0 0 0.005117C422.719604 214.512864 421.38112 214.483188 420.035472 214.483188L420.035472 214.483188zM854.454536 147.378861c-8.422833-7.698333-19.530822-21.845541-21.547759-43.989887-5.820566 0.330528-11.689227 0.5137-17.557888 0.5137-18.566868 0-35.58138-1.854231-50.573839-5.513574l-0.916882-0.225127-0.911766-0.254803c-23.844058-6.743588-48.936549-10.157337-74.576509-10.157337-30.485315 0-59.96779 4.783956-87.620593 14.21577-26.167986 8.9263-49.516764 21.585621-69.403696 37.625946-38.174438 30.79333-59.198264 70.739111-59.198264 112.485911 0 41.7468 21.023826 81.697697 59.198264 112.491027 19.886933 16.040325 43.23571 28.699646 69.403696 37.626969 27.65178 9.431813 57.134255 14.214746 87.620593 14.214746 30.484292 0 59.966767-4.782933 87.618547-14.214746 26.167986-8.93244 49.516764-21.587668 69.399603-37.626969 38.174438-30.79333 59.20031-70.744227 59.20031-112.491027 0-19.002796-4.303003-37.636179-12.789281-55.381331C883.235023 178.792315 870.672916 162.199405 854.454536 147.378861L854.454536 147.378861zM854.454536 147.378861M264.813225 503.462812c0.284479 30.082132 19.104103 54.31914 42.286082 54.31914 23.348778 0 42.284035-24.611537 42.284035-54.966892 0-30.361495-18.930141-54.973032-42.284035-54.973032-23.181979 0-42.001603 24.241101-42.280966 54.286394L264.813225 503.462812zM264.813225 503.462812M484.761636 503.462812c0.284479 30.082132 19.104103 54.31914 42.280966 54.31914 23.353894 0 42.284035-24.611537 42.284035-54.966892 0-30.361495-18.930141-54.973032-42.284035-54.973032-23.176862 0-41.996486 24.241101-42.280966 54.286394L484.761636 503.462812zM484.761636 503.462812M582.250994 292.305625c0.284479 23.119557 14.763239 41.71917 32.584116 41.71917 17.999956 0 32.589233-18.97005 32.589233-42.366923 0-23.403013-14.589276-42.366923-32.589233-42.366923-17.821901 0-32.30066 18.599613-32.584116 41.679261L582.250994 292.305625zM582.250994 292.305625M739.250724 292.305625c0.284479 23.119557 14.767332 41.71917 32.589233 41.71917 17.999956 0 32.594349-18.97005 32.594349-42.366923 0-23.403013-14.594393-42.366923-32.594349-42.366923-17.821901 0-32.304753 18.599613-32.589233 41.679261L739.250724 292.305625zM739.250724 292.305625"  horiz-adv-x="1024" />
33
+
34
+    
35
+    <glyph glyph-name="qq" unicode="&#59133;" d="M217.26004453 426.36830392c-3.28459845 8.015625-3.76674142 16.00111642-3.76674061 24.46875 0 13.19866095 8.46763357 34.3828125 16.48325858 44.2667406-0.48214297 12.234375 4.70089298 37.18526797 14.1328125 45.20089298 0 87.1171875 67.31919607 196.8046875 145.96875 234.47209845C438.56361642 797.859375 489.4296875 805.84486643 542.64620547 805.84486643c41.43415155 0 86.63504452-9.88392892 125.23660703-25.88504536 110.65178595-46.6171875 135.60267893-133.25223202 159.13727655-243.90401714l0.48214297-2.3504469c13.65066952-20.73214298 25.88504453-45.20089298 25.88504453-70.6339281 0-12.71651798-8.46763357-25.43303595-8.46763357-36.7332594 0-0.93415156 2.83258906-4.70089298 3.28459845-5.63504453 40.5-59.78571406 77.203125-124.78459844 77.203125-199.15513357 0-16.48325858-8.94977655-73.91852656-35.31696488-73.91852738-18.3515625 0-38.6015625 44.71875-45.20089297 56.98325939-0.48214297 0.48214297-0.93415156 0.48214297-1.41629453 0.48214299l-2.35044607-1.8984375c-15.06696405-39.08370547-31.55022345-75.81696405-62.16629453-104.98660785 26.84933047-25.88504453 70.15178595-23.53459845 78.16741013-68.28348203-2.35044608-5.18303595-1.41629453-10.81808048-5.18303513-16.0011156-26.84933047-40.5-98.86941952-45.68303595-142.20200939-45.68303595-57.43526798 0-104.05245547 15.06696405-158.20312501 31.06808048-11.30022345 3.28459845-28.265625 1.41629453-40.49999999 2.83258905C482.31808047-29.407366430000025 412.16629453-37.875 371.66629453-37.875c-35.79910703 0-174.20424142 2.35044608-174.2042406 63.55245548 0 26.3671875 5.63504452 33.90066952 24.0167406 50.8359375 14.58482107 2.83258906 25.43303595 10.81808048 42.36830392 11.7823656 2.35044608 0 4.24888357 0.48214297 6.59933048 0.93415236 0.48214297 0.48214297 0.93415156 0.48214297 0.93415155 1.8984375l-0.93415155 1.41629454c-32.484375 7.53348202-78.16741095 89.46763357-85.21875 123.3683031l-2.3504469 1.41629535c-3.28459845 0-4.70089298-7.05133906-5.63504453-9.43192035-10.36607107-24.01674142-34.83482108-49.90178595-62.16629452-52.734375H114.59375c-3.76674142 0-2.35044608 3.76674142-5.18303595 4.70089297-6.59933047 15.54910702-10.81808048 29.65178595-10.81808048 47.09933048 0 94.16852655 45.20089298 163.83816952 118.66741095 219.4051344z"  horiz-adv-x="1024" />
36
+
37
+    
38
+    <glyph glyph-name="zhuye" unicode="&#58906;" d="M753.9972229 4.140289299999949c-1.61746216 0-2.91769409 0.04449463-3.84960938 0.09146119L257.6126709 4.231750489999968c-32.99359131 0-51.98538208 13.89633179-62.10708618 25.55392456-22.18057251 25.54568482-20.3991394 60.18063354-19.39883423 69.79064941l0 296.24359132 52.734375-1e-8 0-299.85507202-0.24884033-1.55154419c-0.62704468-5.27426148-0.68637085-21.65158081 6.82992554-30.16488647 1.59027099-1.80120849 6.42947388-7.2822876 22.19128417-7.2822876l494.63854981 0 0.61798095-0.06756591c1.77401734-0.06262207 18.38699341-0.35760498 28.83581544 9.52267455 6.96588135 6.58685302 10.49743653 17.47814941 10.49743651 32.37231446L792.20327758 396.04733276l52.734375 0 0-297.25378417c0-37.7965393-15.03506469-59.63186646-27.64846801-71.29440309C794.60186768 6.520751949999976 765.85998535 4.141113280000013 753.9972229 4.140289299999949zM202.47311401 371.07348633000004L121.43603516 371.07348633000004c-10.95144653 0-20.76168823 6.76812744-24.65002442 17.00601196-3.88751221 10.23788453-1.04315185 21.81225586 7.14715577 29.08135986l389.09646606 345.31951904c9.90417481 8.79016114 24.79092407 8.87091065 34.79067993 0.18704224l394.50338745-342.6012268c8.20266724-7.12408448 11.19616699-18.55014038 7.54019165-28.78060914s-13.21243286-17.17163086-24.07324219-17.48391723l-86.46624756-2.48181152c-0.25790406-0.00823974-0.51416016-0.01153565-0.77124023-0.01153565-14.21109008 0-25.93130493 11.31234742-26.34246826 25.61077881-0.41775513 14.55633545 11.04373169 26.6951294 25.60006714 27.11288452l18.89456177 0.54217529L510.72119141 707.67453003 190.86907959 423.80786133l11.60403442 0c14.56210328 0 26.3671875-11.80508422 26.3671875-26.3671875S217.03521729 371.07348633000004 202.47311401 371.07348633000004zM422.18676758 30.34927368000001c-12.28710938 0-22.24731445 9.96020508-22.24731445 22.24731445L399.93945312 238.68795776000002c0.00164795 4.00946045 1.01678467 20.51696778 16.49679566 36.25076294 18.78662109 19.09396362 50.63983154 28.77566528 94.67550659 28.77566529 43.37237549 0 74.87951661-9.81436157 93.64636231-29.1711731 15.84091187-16.33776856 16.86181641-33.54071045 16.83050537-38.10388184l0-183.12835693c0-12.28710938-9.96020508-22.24731445-22.24731446-22.24731445s-22.24731445 9.96020508-22.24731445 22.24731445L577.09399414 236.17730713000003c-0.14749146 0.96157837-1.07775879 5.02954102-6.60580445 9.50949097-6.23666382 5.05426026-22.24484253 13.53295898-59.37725829 13.53295898-43.07080078 0-58.37695313-10.83114624-62.95825195-15.48660278-2.24945068-2.28652954-3.19372559-4.23193359-3.59005738-5.46047974-0.06015015-0.18539429-0.10134888-0.33865357-0.12936402-0.45236206l0-185.22372437C444.43408203 40.30947876000005 434.47387695 30.34927368000001 422.18676758 30.34927368000001z"  horiz-adv-x="1024" />
39
+
40
+    
41
+    <glyph glyph-name="sousuo" unicode="&#59107;" d="M633.14346747 218.10993425000004C578.5991241 173.47483981000005 508.87612711 146.6953125 432.8984375 146.6953125 258.15209052 146.6953125 116.4921875 288.35521552 116.4921875 463.1015625 116.4921875 637.84790948 258.15209052 779.5078125 432.8984375 779.5078125 607.64478448 779.5078125 749.3046875 637.84790948 749.3046875 463.1015625 749.3046875 387.12387289 722.52516019 317.40087589999996 677.89006575 262.85653253L875.86906693 64.87753521000002C888.22446218 52.52213997000001 888.30976828 32.57539327999996 875.8671875 20.1328125 863.51075483 7.776379829999996 843.52820617 7.725194780000038 831.12246479 20.13093306999997L633.14346747 218.10993425000004ZM432.8984375 209.9765625C572.69551493 209.9765625 686.0234375 323.30448507000006 686.0234375 463.1015625 686.0234375 602.89863993 572.69551493 716.2265625 432.8984375 716.2265625 293.10136007 716.2265625 179.7734375 602.89863993 179.7734375 463.1015625 179.7734375 323.30448507000006 293.10136007 209.9765625 432.8984375 209.9765625Z"  horiz-adv-x="1024" />
42
+
43
+    
44
+    <glyph glyph-name="xuewei" unicode="&#58899;" d="M511.4931875 300.01874998999995a18.225 18.225 0 0 0-15.525 2e-8l-265.8375 126V279.375c0-6.975 3.88125001-13.33125001 10.06875-16.425l255.375-128.5875a18.16875001 18.16875001 0 0 1 16.3125 0l255.375 128.5875a18.3375 18.3375 0 0 1 10.06875 16.425V425.9625L511.4931875 299.9625M933.8744375 590.8312500100001L510.3681875 760.03125001a18.1125 18.1125 0 0 1-13.44375-2e-8L73.5869375 590.8312500100001a18.3375 18.3375 0 0 1 0-34.14375001l156.54375-62.55v-27.5625l273.6-129.65625001 273.6 129.65625001v27.5625l72.95625 29.1375v-445.44375001c0-10.125 8.15625001-18.3375 18.225-18.33749998 10.125 0 18.225 8.2125 18.225 18.3375V537l-0.1125 0.7875 47.25 18.9a18.39375001 18.39375001 0 0 1 0 34.14375001"  horiz-adv-x="1024" />
45
+
46
+    
47
+    <glyph glyph-name="wode" unicode="&#59552;" d="M680.75 544.70625C680.75 649.9875002900001 609.425 721.5 512 721.5s-168.75-71.51249971-168.75-176.79375C343.25 434.30624971 419.84375029 346.49999971 512 346.49999971s168.75 87.80625 168.75 198.20625029z m37.50000029 0C718.25000029 415.01249971 626.4125 309.00000029 512 309.00000029s-206.25000029 106.01250029-206.25000029 235.70624971C305.74999971 674.43749971 397.5875 759.00000029 512 759.00000029s206.25000029-84.56249971 206.25000029-214.29375029zM512.09375029 271.5c359.4375 0 355.8375-225.45 355.8375-225.45 2.71874971-20.45625029-11.85000029-37.05000029-32.60625029-37.05000029H188.84375c-20.71874971 0-36.1125 16.81875-32.58749971 37.05000029 0 0-3.6 225.45 355.8375 225.45zM193.75624971 46.5l0.05625-3.39374971-0.61875-3.4875c0.60000029 3.41250029-2.49374971 6.88124971-4.34999971 6.88124971H835.325c-1.89375029 0-4.8375-3.35625029-4.57499971-5.4l-0.37500029 2.77499971 0.05625 2.77500058c0 0.74999971-0.1125 2.94374971-0.46874971 6.26249971a142.21874971 142.21874971 0 0 1-3.75000029 20.28750029 169.59375 169.59375 0 0 1-30.97500029 62.49375C747.83750029 196.38750029000005 658.45625029 233.99999971 512.09375029 233.99999971c-146.38124971 0-235.74375-37.61250029-283.1625-98.30624942a169.59375 169.59375 0 0 1-30.97500029-62.49375c-1.9125-7.40625029-3.11249971-14.23125-3.75000029-20.28750029a71.23124971 71.23124971 0 0 1-0.45-6.4125z"  horiz-adv-x="1024" />
48
+
49
+    
50
+    <glyph glyph-name="tijian" unicode="&#58939;" d="M796.60494995 163.0965271h-0.04943847v31.381073c0 63.87451172-52.38006592 115.92086792-116.78604127 115.92086792h-7.51464843c-64.23294067 0.19775391-116.52648926-51.67556763-116.84783936-115.92086792v-82.31506348c0-35.02716065-28.71139526-63.55316162-64.02282715-63.55316162h-7.56408691c-35.31143188 0-64.03518677 28.52600097-64.03518677 63.55316162V266.31170654000005h21.83944703v23.33496094c131.69174195 12.12478638 158.69750977 171.89758301 178.49761962 289.22744751l4.58541871 27.11700439c9.28207398 52.77557373 2.43484497 93.61175537-20.35629273 121.49505616A89.63195801 89.63195801 0 0 1 541.29229737 760.22680664h-40.70022584a37.02941895 37.02941895 0 0 1-26.82037353 11.54388428 36.95526123 36.95526123 0 0 1-37.10357667-36.81930542v-0.03707886a36.95526123 36.95526123 0 0 1 62.09472657-27.01812744h40.98449707a37.51144409 37.51144409 0 0 0 23.61923218-13.434906c12.61917114-15.32592773 15.8203125-42.82608032 9.40567017-79.5465088l-4.69665528-27.40127563C545.90243531 456.05657959 522.1348877 353.94140625 441.56253052 342.36044312v21.14730834h-98.95111084v-21.72821044c-84.09484864 8.3921814-108.35678101 111.79275513-130.9501648 245.72158813a6690.01464844 6690.01464844 0 0 1-4.6472168 27.45071411c-6.30340576 36.13952637-3.26293945 63.39248657 8.87420655 78.86672974A37.6473999 37.6473999 0 0 0 240.08837891 707.88381958h40.94741821a36.96762085 36.96762085 0 0 1 62.08236694 27.06756592A36.96762085 36.96762085 0 0 1 306.0145874 771.72125244c-10.18432617 0-19.88662719-4.12811279-26.82037353-11.4944458H238.43218994a89.70611573 89.70611573 0 0 1-62.99697876-32.75299072C152.63171386 699.63995362 145.79684448 658.7419738799999 155.05419922 605.97875977l4.61013794-27.16644287C179.69927979 460.18469239 207.10055542 298.22424316 342.67321777 289.30059815000004v-22.98889161h24.34844971v-154.14916992c0-63.88687133 52.38006592-115.92086792 116.79840088-115.92086792h7.51464844c64.25765992-0.19775391 116.52648926 51.67556763 116.86019897 115.92086792v82.31506348c0 35.01480102 28.71139526 63.540802 64.01046753 63.540802h7.57644654c35.29907227 0 64.01046753-28.52600097 64.01046753-63.540802v-31.86309815c-33.84063721-11.21017456-58.34976196-42.9373169-58.34976197-80.37460327 0-46.80587768 38.24066162-84.72518921 85.36788941-84.72518921 47.18902588 0 85.47912598 37.91931153 85.47912597 84.72518921a84.94766235 84.94766235 0 0 1-59.68460083 80.85662842z m-28.14285278-123.10180664a41.03393555 41.03393555 0 0 0-33.13613892 16.9203186 26.98104859 26.98104859 0 0 0-3.31237793 3.76968384 27.74734497 27.74734497 0 0 0-4.68429565 21.20910645 41.15753174 41.15753174 0 0 0 82.31506348-0.70449829 41.16989136 41.16989136 0 0 0-41.18225098-41.1946106z"  horiz-adv-x="1024" />
51
+
52
+    
53
+    <glyph glyph-name="shoucang" unicode="&#58890;" d="M716.609375 721.5H307.390625c-18.72070313 0-34.01367188-15.29296875-34.01367188-34.01367188v-606.88476562c0-12.04101563 6.15234375-22.93945313 16.5234375-29.1796875 10.28320313-6.24023438 22.8515625-6.59179688 33.48632813-0.87890625L512 150.47460937000005l188.61328125-99.93164062c5.00976563-2.63671875 10.45898438-4.04296875 15.90820313-4.04296875 6.06445313 0 12.12890625 1.66992188 17.49023437 4.921875 10.28320313 6.24023438 16.43554688 17.13867188 16.43554688 29.1796875V687.48632813c0.17578125 18.72070313-15.1171875 34.01367188-33.83789063 34.01367187z m-10.546875-623.58398438L527.90820313 192.3984375c-9.93164063 5.2734375-21.88476563 5.2734375-31.81640626 0L317.9375 97.91601562000005V677.02734375h388.21289063v-579.11132813z"  horiz-adv-x="1024" />
54
+
55
+    
56
+    <glyph glyph-name="jichuxinxi" unicode="&#59370;" d="M860.57421875 667.62304688H162.45898437c-42.45117188 0-43.41796875-21.88476563-43.41796874-73.82812501v-448.68164062c0-24.69726563 19.86328125-44.73632813 44.38476562-44.73632813h696.26953125c24.52148438 0 44.38476563 20.0390625 44.38476563 44.73632813V593.70703125c0.17578125 24.78515625 9.66796875 73.91601563-43.50585938 73.91601563zM387.37109375 562.68164063c-44.82421875-2.19726563-81.38671875-38.84765625-84.375-83.58398438-3.69140625-52.29492188 38.05664063-96.328125 89.56054688-96.328125 50.00976563 0 89.56054688 40.34179688 89.56054687 89.56054688 0.79101563 51.59179688-42.5390625 93.33984375-94.74609375 90.35156249M392.55664062 354.46875c-59.67773438 0-179.12109375-29.8828125-179.12109374-89.56054688v-44.82421874c0-8.17382813 6.6796875-14.94140625 14.94140624-14.94140625H556.82421875c8.17382813 0 14.94140625 6.6796875 14.94140625 14.94140625v45.52734375c-0.08789063 58.97460938-119.44335938 88.85742188-179.20898438 88.85742187M810.56445313 503.00390625H571.67773438v-29.8828125h238.88671874v29.8828125M810.56445313 562.68164063H571.67773438v-29.88281251h238.88671874v29.8828125M810.56445313 443.23828125H691.12109375v-29.79492188h119.44335938v29.79492188"  horiz-adv-x="1024" />
57
+
58
+    
59
+    <glyph glyph-name="guanbi" unicode="&#58887;" d="M560.31838608 376.00487137000005L815.11965943 630.80614472c12.86172866 12.86172866 12.86172866 34.06620026-1e-8 46.92792891l-1.39045715 1.39045716c-12.86172866 12.86172866-34.06620026 12.86172866-46.92792893 0L512 423.97564316l-254.80127334 255.14888763c-12.86172866 12.86172866-34.06620026 12.86172866-46.92792893 0l-1.39045715-1.39045716c-13.20934297-12.86172866-13.20934297-34.06620026 0-46.92792891l254.80127334-254.80127335L208.88034057 121.20359801999996c-12.86172866-12.86172866-12.86172866-34.06620026 1e-8-46.92792892l1.39045715-1.39045716c12.86172866-12.86172866 34.06620026-12.86172866 46.92792893 0L512 327.68648528000006l254.80127334-254.80127334c12.86172866-12.86172866 34.06620026-12.86172866 46.92792893 0l1.39045715 1.39045716c12.86172866 12.86172866 12.86172866 34.06620026 0 46.92792892L560.31838608 376.00487137000005z"  horiz-adv-x="1024" />
60
+
61
+    
62
+    <glyph glyph-name="jiantouleft" unicode="&#58954;" d="M663.70370347 54.80296320000002c-5.86587627 0-11.6306176 2.22498773-16.080592 6.6749632l-303.407408 303.40740693c-8.89995093 8.89995093-8.89995093 23.26123413 0 32.16118507l0.50567893 0.50567893 302.90172907 302.90172907c8.89995093 8.89995093 23.26123413 8.89995093 32.16118506 0s8.89995093-23.26123413 0-32.16118613L392.4574816 380.96592639999994l287.32681493-287.32681493c8.89995093-8.89995093 8.89995093-23.26123413 0-32.16118507-4.44997547-4.44997547-10.21471573-6.6749632-16.08059306-6.6749632z"  horiz-adv-x="1024" />
63
+
64
+    
65
+    <glyph glyph-name="yuedu" unicode="&#59062;" d="M849.921875 696.46875H664.11230469c-45.19335938 0-89.16503906-12.92871094-127.125-37.37109375l-24.89941407-15.96972656-24.83789062 15.92578125c-37.92480469 24.47753906-81.90527344 37.41503906-127.18652344 37.41503906H174.25390625c-29.37304688 0-53.27929688-23.90625-53.27929688-53.27929688v-461.27636718c0-29.37304688 23.90625-53.27929688 53.27929688-53.27929688h185.80957031c34.70800781 0 68.45800781-9.92285156 97.62011719-28.70507812L494.25488281 76.3828125c5.4140625-3.32226563 11.56640625-5.08007813 17.75390625-5.08007813 6.89941406 0 13.50878906 2.05664063 18.26367188 5.39648438l36.04394531 23.22070313c29.23242188 18.78222656 63.04394531 28.71386719 97.79589844 28.71386718h185.80957031c29.37304688 0 53.27929688 23.90625 53.27929688 53.27929688V643.19824219c0 29.37304688-23.90625 53.27050781-53.27929688 53.27050781zM360.06347656 183.21386718999997H175.54589844V641.89746094h184.51757812c34.76074219 0 68.51074219-9.92285156 97.65527344-28.73144531l27.30761719-17.51660157c-0.08789063-0.88769531-0.26367188-1.74902344-0.26367188-2.65429687v-445.70214844c-37.42382813 23.45800781-80.45507813 35.92089844-124.69921875 35.92089844z m488.56640625 0H664.11230469c-44.24414063 0-87.28417969-12.4453125-124.77832032-35.88574219V592.98632813c0 0.89648438-0.17578125 1.74023438-0.26367187 2.61035156l27.421875 17.58691406c29.17089844 18.7734375 62.92089844 28.70507813 97.62011719 28.70507812h184.51757812v-458.67480468zM397.01269531 509.68359375H289.24121094c-15.07324219 0-27.29003906-12.21679688-27.29003907-27.29003906s12.21679688-27.29003906 27.29003907-27.29003906h107.77148437c15.07324219 0 27.29003906 12.21679688 27.29003907 27.29003906S412.0859375 509.68359375 397.01269531 509.68359375zM599.79394531 482.39355469c0-15.07324219 12.21679688-27.29003906 27.29003907-27.29003907h107.77148437c15.07324219 0 27.29003906 12.21679688 27.29003906 27.29003907S749.91992188 509.68359375 734.84667969 509.68359375H627.08398438c-15.07324219 0-27.29003906-12.21679688-27.29003907-27.29003906zM397.01269531 395.98828125H289.24121094c-15.07324219 0-27.29003906-12.21679688-27.29003907-27.29003906s12.21679688-27.29003906 27.29003907-27.29003906h107.77148437c15.07324219 0 27.29003906 12.21679688 27.29003907 27.29003906s-12.21679688 27.29003906-27.29003907 27.29003906zM734.84667969 395.98828125H627.08398438c-15.07324219 0-27.29003906-12.21679688-27.29003907-27.29003906s12.21679688-27.29003906 27.29003906-27.29003906h107.77148438c15.07324219 0 27.29003906 12.21679688 27.29003906 27.29003906-0.00878906 15.07324219-12.22558594 27.29003906-27.29882812 27.29003906z"  horiz-adv-x="1024" />
66
+
67
+    
68
+    <glyph glyph-name="jiuzhen" unicode="&#59043;" d="M513.071167 752.97583008c52.3223877 0 99.7833252-21.25854492 134.06066894-55.61828614 34.35974122-34.35974122 55.53588867-81.82067872 55.53588867-134.30786132 0-52.40478516-21.25854492-99.86572266-55.53588867-134.22546387-34.27734375-34.35974122-81.73828125-55.61828614-134.06066895-55.61828614-52.40478516 0-99.7833252 21.25854492-134.06066894 55.61828614-34.35974122 34.35974122-55.53588867 81.82067872-55.53588867 134.22546387 0 52.40478516 21.25854492 99.86572266 55.53588867 134.30786132 34.19494629 34.27734375 81.65588379 55.61828614 134.06066895 55.61828614M664.18811036 344.94360352v-82.72705079c25.87280273-5.35583497 42.43469239-18.45703125 52.0751953-30.1574707 26.11999512-31.640625 26.77917481-75.14648438 25.46081543-95.41625976 3.87268067-4.61425781 6.67419434-10.1348877 7.99255371-16.23229981 0.49438477-2.30712891 0.82397461-4.69665528 0.82397461-7.1685791 0-19.77539063-15.4083252-35.84289551-34.44213867-35.84289551-10.62927247 0-20.02258301 5.10864258-26.3671875 13.01879883-5.02624512 6.17980958-8.15734864 14.08996583-8.15734863 22.82409668 0 11.45324708 5.52062989 21.17614747 13.51318359 27.76794433 0.82397461 15.65551758-0.82397461 43.09387208-14.41955567 59.4909668-8.81652833 10.62927247-22.00012208 15.73791504-40.37475585 15.73791504-20.84655762 0-35.34851075-5.52062989-44.16503907-16.80908203-13.10119629-16.72668458-12.52441406-44.74182129-10.79406738-57.51342773 8.6517334-6.50939942 14.66674805-16.64428711 14.66674805-28.59191895 0-19.77539063-15.4083252-35.84289551-34.44213867-35.84289551-19.03381348 0-34.44213867 16.06750489-34.44213867 35.84289551 0 8.48693848 3.21350098 15.90270997 7.91015625 22.00012207-2.30712891 17.38586426-5.10864258 61.71569825 20.84655762 94.83947754C573.7980957 247.87939453 593.16149903 258.75585937000005 617.46875 262.87573241999996V348.65148925000005H401.34020996c-0.74157715 0-1.4831543-0.08239747-2.3071289-0.16479492v-153.01208495c19.03381348-10.62927247 32.13500977-31.2286377 32.13500976-55.20629883 0-34.68933106-27.02636719-62.8692627-60.39733887-62.8692627s-60.39733887 28.09753418-60.39733887 62.8692627c0 25.70800781 14.91394043 47.79052734 36.17248536 57.51342773V342.63647461000005c-116.26281739-25.21362305-203.52172852-129.03442383-203.52172852-253.45458984v-74.15771485h737.8692627v74.15771485c0.08239747 129.03442383-93.85070801 235.8215332-216.70532226 255.76171875"  horiz-adv-x="1024" />
69
+
70
+    
71
+    <glyph glyph-name="jiantouup" unicode="&#59553;" d="M182.8029632 232.29629652999995c0 5.86587627 2.22498773 11.6306176 6.6749632 16.080592l303.40740693 303.407408c8.89995093 8.89995093 23.26123413 8.89995093 32.16118507 0l0.50567893-0.50567893 302.90172907-302.90172908c8.89995093-8.89995093 8.89995093-23.26123413 0-32.16118505s-23.26123413-8.89995093-32.16118613 0L508.9659264 503.5425184l-287.32681493-287.32681493c-8.89995093-8.89995093-23.26123413-8.89995093-32.16118507 0-4.44997547 4.44997547-6.6749632 10.21471573-6.6749632 16.08059306z"  horiz-adv-x="1024" />
72
+
73
+    
74
+    <glyph glyph-name="jiantoudown" unicode="&#59554;" d="M841.1970368 535.7037034699999c0-5.86587627-2.22498773-11.6306176-6.6749632-16.080592l-303.40740693-303.407408c-8.89995093-8.89995093-23.26123413-8.89995093-32.16118507 0l-0.50567893 0.50567893-302.90172907 302.90172908c-8.89995093 8.89995093-8.89995093 23.26123413 0 32.16118505s23.26123413 8.89995093 32.16118613 0L515.0340736 264.45748160000005l287.32681493 287.32681493c8.89995093 8.89995093 23.26123413 8.89995093 32.16118507 0 4.44997547-4.44997547 6.6749632-10.21471573 6.6749632-16.08059306z"  horiz-adv-x="1024" />
75
+
76
+    
77
+    <glyph glyph-name="jiantouright" unicode="&#59555;" d="M360.29629653 713.1970368c5.86587627 0 11.6306176-2.22498773 16.080592-6.6749632l303.407408-303.40740693c8.89995093-8.89995093 8.89995093-23.26123413 0-32.16118507l-0.50567893-0.50567893-302.90172908-302.90172907c-8.89995093-8.89995093-23.26123413-8.89995093-32.16118505 0s-8.89995093 23.26123413 0 32.16118613L631.5425184 387.0340736l-287.32681493 287.32681493c-8.89995093 8.89995093-8.89995093 23.26123413 0 32.16118507 4.44997547 4.44997547 10.21471573 6.6749632 16.08059306 6.6749632z"  horiz-adv-x="1024" />
78
+
79
+    
80
+
81
+
82
+  </font>
83
+</defs></svg>

BIN
src/assets/css/iconfont.ttf Voir le fichier


BIN
src/assets/css/iconfont.woff Voir le fichier


BIN
src/assets/css/iconfont.woff2 Voir le fichier


BIN
src/assets/img/tabicon1-.png Voir le fichier


BIN
src/assets/img/tabicon1.png Voir le fichier


BIN
src/assets/img/tabicon2-.png Voir le fichier


BIN
src/assets/img/tabicon2.png Voir le fichier


BIN
src/assets/img/tabicon5-.png Voir le fichier


BIN
src/assets/img/tabicon5.png Voir le fichier


+ 42
- 0
src/components/BodyCheckItem/index.vue Voir le fichier

@@ -0,0 +1,42 @@
1
+<template>
2
+  <view class="BodyCheckItem flex-h">
3
+    <view class="flex-item">
4
+      <text>{{Data.name}}</text>
5
+      <text>{{ToolClass.DateFormat(Data.createDate)}}</text>
6
+    </view>
7
+    <navigator url="" hover-class="none">查看报告</navigator>
8
+  </view>
9
+</template>
10
+
11
+<script>
12
+export default {
13
+  name: 'BodyCheckItem',
14
+  props: {
15
+    Data: {
16
+      default: () => {
17
+        return {}
18
+      },
19
+      type: Object
20
+    }
21
+  },
22
+  data () {
23
+    return {
24
+      TestImg: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606120989360&di=8610f1678b51e26de6d4c6af39d1cf63&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2F201503%2F19%2F211608ztcq7higicydxhsy.jpg'
25
+    }
26
+  },
27
+  computed: {
28
+  },
29
+  components: {
30
+  },
31
+  created () {
32
+  },
33
+  methods: {
34
+    Init () {
35
+    }
36
+  }
37
+}
38
+</script>
39
+
40
+<style lang="scss">
41
+@import "page.scss";
42
+</style>

+ 24
- 0
src/components/BodyCheckItem/page.scss Voir le fichier

@@ -0,0 +1,24 @@
1
+.BodyCheckItem {
2
+  padding: 20px 30px;
3
+  align-items: center;
4
+  > .flex-item {
5
+    > text {
6
+      font-size: 26px;
7
+      line-height: 40px;
8
+      display: block;
9
+      color: #999;
10
+      &:first-child {
11
+        font-size: 28px;
12
+        color: #333;
13
+      }
14
+    }
15
+  }
16
+  > navigator {
17
+    width: 160px;
18
+    text-align: center;
19
+    line-height: 60px;
20
+    background: #f4c819;
21
+    color: #fff;
22
+    font-size: 28px;
23
+  }
24
+}

+ 47
- 0
src/components/BookItem/index.vue Voir le fichier

@@ -0,0 +1,47 @@
1
+<template>
2
+  <navigator class="BookItem flex-h" :url="`/pages/Index/BookDetail/index?id=${Data.postId}`" hover-class="none">
3
+    <view class="Img">
4
+      <image mode="aspectFill" :src="Data.poster" class="centerLabel"></image>
5
+    </view>
6
+    <view class="flex-item">
7
+      <view class="Title">
8
+        <text>{{Data.name}}</text>
9
+      </view>
10
+      <view class="Desc">
11
+        <text>{{Data.summary}}</text>
12
+      </view>
13
+    </view>
14
+  </navigator>
15
+</template>
16
+
17
+<script>
18
+export default {
19
+  name: 'BookItem',
20
+  props: {
21
+    Data: {
22
+      default: () => {
23
+        return {}
24
+      },
25
+      type: Object
26
+    }
27
+  },
28
+  data () {
29
+    return {
30
+    }
31
+  },
32
+  computed: {
33
+  },
34
+  components: {
35
+  },
36
+  created () {
37
+  },
38
+  methods: {
39
+    Init () {
40
+    }
41
+  }
42
+}
43
+</script>
44
+
45
+<style lang="scss">
46
+@import "page.scss";
47
+</style>

+ 39
- 0
src/components/BookItem/page.scss Voir le fichier

@@ -0,0 +1,39 @@
1
+.BookItem {
2
+  > .Img {
3
+    width: 180px;
4
+    height: 240px;
5
+    position: relative;
6
+    overflow: hidden;
7
+    background: #eee;
8
+    > image {
9
+      width: 100%;
10
+      height: 100%;
11
+    }
12
+  }
13
+  > .flex-item {
14
+    margin-left: 20px;
15
+    > .Title {
16
+      > text {
17
+        display: block;
18
+        font-size: 32px;
19
+        line-height: 40px;
20
+        white-space: nowrap;
21
+        overflow: hidden;
22
+        text-overflow: ellipsis;
23
+      }
24
+    }
25
+    > .Desc {
26
+      > text {
27
+        font-size: 28px;
28
+        line-height: 40px;
29
+        overflow: hidden;
30
+        text-overflow: ellipsis;
31
+        display: -webkit-box;
32
+        -webkit-box-orient: vertical;
33
+        -webkit-line-clamp: 3;
34
+        margin-top: 10px;
35
+        color: #999;
36
+      }
37
+    }
38
+  }
39
+}

+ 167
- 0
src/components/MainPage/index.vue Voir le fichier

@@ -0,0 +1,167 @@
1
+<template>
2
+  <view class="MainPage">
3
+    <slot></slot>
4
+    <view class="PhoneAuthPopup" v-show="ShowPhoneAuthPopup">
5
+      <view class="centerLabel">
6
+        <text>授权手机号</text>
7
+        <text>申请使用您的手机号</text>
8
+        <view class="flex-h">
9
+          <text @tap="ShowPhoneAuthPopup = false; $emit('UserInfoChange')">拒绝</text>
10
+          <view class="flex-item"></view>
11
+          <text>允许</text>
12
+          <button open-type="getPhoneNumber" @getphonenumber="GetUserPhone">获取授权</button>
13
+        </view>
14
+      </view>
15
+    </view>
16
+    <view class="UserIconAuthPopup" v-show="ShowUserIconAuthPopup">
17
+      <view class="centerLabel">
18
+        <text>授权头像</text>
19
+        <text>申请使用您的头像</text>
20
+        <view class="flex-h">
21
+          <text @tap="ShowUserIconAuthPopup = false; $emit('UserInfoChange')">拒绝</text>
22
+          <view class="flex-item"></view>
23
+          <text>允许</text>
24
+          <button open-type="getUserInfo" @getuserinfo="GetUserIcon">获取授权</button>
25
+        </view>
26
+      </view>
27
+    </view>
28
+    <view class="StudentIdPopup" v-show="ShowStudentIdPopup">
29
+      <view class="centerLabel">
30
+        <text>完善信息</text>
31
+        <text>去完善您的个人信息</text>
32
+        <view>
33
+          <navigator url="/pages/Mine/MyInfo/index">去完善</navigator>
34
+        </view>
35
+      </view>
36
+    </view>
37
+  </view>
38
+</template>
39
+
40
+<script>
41
+import Taro from '@tarojs/taro'
42
+import { createNamespacedHelpers } from 'vuex'
43
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
44
+export default {
45
+  name: 'MainPage',
46
+  props: {
47
+    Data: {
48
+      default: null,
49
+      type: Object
50
+    }
51
+  },
52
+  data () {
53
+    return {
54
+      ShowPhoneAuthPopup: false,
55
+      ShowUserIconAuthPopup: false,
56
+      ShowStudentIdPopup: false,
57
+      WxInfoData: {
58
+        encryptedData: null,
59
+        iv: null,
60
+        rawData: null,
61
+        signature: null
62
+      }
63
+    }
64
+  },
65
+  computed: {
66
+    ...mapUserState({
67
+      UserInfo: x => x.UserInfo // 用户信息
68
+    })
69
+  },
70
+  components: {
71
+  },
72
+  created () {
73
+    this.Init()
74
+  },
75
+  methods: {
76
+    ...mapUserActions([
77
+      'WxGetPhoneAuth',
78
+      'WxLogin',
79
+      'PutUserInfo'
80
+    ]),
81
+    ...mapUserMutations([
82
+      'EditUserInfo'
83
+    ]),
84
+    Init () {
85
+      const _that = this
86
+      let CurrentPageRoute = Taro.getCurrentPages()[Taro.getCurrentPages().length - 1].route
87
+      if (this.UserInfo === null) {
88
+        wx.login({
89
+          success (res) {
90
+            _that.WxLogin({ queryData: { code: res.code } }).then((res) => {
91
+              wx.setStorageSync('token', res.data.data.token)
92
+              wx.setStorageSync('tokentime', Date.now())
93
+              if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
94
+                // if (CurrentPageRoute !== '') { // 非首页
95
+                if (!_that.UserInfo.avatar) { // 未授权头像
96
+                  _that.ShowUserIconAuthPopup = true
97
+                } else if (!_that.UserInfo.phone) { // 未授权手机号
98
+                  _that.ShowPhoneAuthPopup = true
99
+                } else {
100
+                  _that.$emit('UserInfoChange')
101
+                }
102
+              } else {
103
+                _that.$emit('UserInfoChange')
104
+              }
105
+            })
106
+          }
107
+        })
108
+      } else {
109
+        if (CurrentPageRoute !== 'pages/Index/index') { // 非首页
110
+          // if (CurrentPageRoute !== '') { // 非首页
111
+          if (!_that.UserInfo.avatar) { // 未授权头像
112
+            _that.ShowUserIconAuthPopup = true
113
+          } else if (!_that.UserInfo.phone) { // 未授权手机号
114
+            _that.ShowPhoneAuthPopup = true
115
+          } else {
116
+            _that.$emit('UserInfoChange')
117
+          }
118
+        } else {
119
+          _that.$emit('UserInfoChange')
120
+        }
121
+      }
122
+    },
123
+    GetUserIcon (e) {
124
+      if (e.detail.userInfo.avatarUrl) {
125
+        this.PutUserInfo({ data: { data: { avatar: e.detail.userInfo.avatarUrl, personId: this.UserInfo.personId } } }).then(() => {
126
+          this.EditUserInfo({ name: 'avatar', value: e.detail.userInfo.avatarUrl })
127
+          this.ShowUserIconAuthPopup = false
128
+          if (!this.UserInfo.phone) {
129
+            this.ShowPhoneAuthPopup = true
130
+          }
131
+        })
132
+      } else {
133
+        if (!this.UserInfo.phone) {
134
+          this.ShowPhoneAuthPopup = true
135
+        }
136
+      }
137
+    },
138
+    GetUserPhone (e) {
139
+      console.log('------------->', e)
140
+      for (let key in this.WxInfoData) {
141
+        this.WxInfoData[key] = e.detail[key]
142
+      }
143
+      this.WxGetPhoneAuth({ data: { data: { ...this.WxInfoData, sessionKey: this.UserInfo.sessionKey } } }).then((res) => {
144
+        if (res.data.data.phone) {
145
+          this.PutUserInfo({ data: { data: { phone: res.data.data.phone, personId: this.UserInfo.personId } } }).then(() => {
146
+            this.EditUserInfo({ name: 'phone', value: res.data.data.phone })
147
+            this.ShowPhoneAuthPopup = false
148
+            this.$emit('UserInfoChange')
149
+          })
150
+        } else {
151
+          wx.showToast({
152
+            title: '获取手机号失败',
153
+            icon: 'none',
154
+            duration: 2000
155
+          })
156
+          this.ShowPhoneAuthPopup = false
157
+          this.$emit('UserInfoChange')
158
+        }
159
+      })
160
+    }
161
+  }
162
+}
163
+</script>
164
+
165
+<style lang="scss">
166
+@import "page.scss";
167
+</style>

+ 84
- 0
src/components/MainPage/page.scss Voir le fichier

@@ -0,0 +1,84 @@
1
+.MainPage {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  overflow: hidden;
6
+  > .PhoneAuthPopup,
7
+  > .UserIconAuthPopup,
8
+  > .StudentIdPopup {
9
+    width: 100%;
10
+    position: fixed;
11
+    left: 0;
12
+    top: 0;
13
+    bottom: 0;
14
+    z-index: 10000;
15
+    background: rgba(0, 0, 0, 0.7);
16
+    > view {
17
+      width: 600px;
18
+      background: #fff;
19
+      border-radius: 10px;
20
+      padding: 40px 0;
21
+      > text {
22
+        display: block;
23
+        text-align: center;
24
+        font-size: 28px;
25
+        color: #666;
26
+        line-height: 40px;
27
+        &:first-child {
28
+          font-size: 36px;
29
+          font-weight: bold;
30
+          color: #000;
31
+          line-height: 60px;
32
+        }
33
+      }
34
+      > view {
35
+        padding: 0 60px;
36
+        position: relative;
37
+        overflow: hidden;
38
+        align-items: center;
39
+        margin-top: 60px;
40
+        > text {
41
+          width: 200px;
42
+          font-size: 28px;
43
+          color: #000;
44
+          line-height: 80px;
45
+          border-radius: 40px;
46
+          background: #f4c819;
47
+          text-align: center;
48
+          position: relative;
49
+          z-index: 1;
50
+          &:first-child {
51
+            background: #ccc;
52
+          }
53
+        }
54
+        > button {
55
+          display: block;
56
+          width: 200px;
57
+          position: absolute;
58
+          right: 60px;
59
+          line-height: 80px;
60
+          height: 80px;
61
+          max-height: 80px;
62
+          top: 0;
63
+          z-index: 2;
64
+          opacity: 0;
65
+        }
66
+      }
67
+    }
68
+  }
69
+  > .StudentIdPopup {
70
+    > view {
71
+      > view {
72
+        padding: 0 60px;
73
+        > navigator {
74
+          text-align: center;
75
+          display: block;
76
+          line-height: 80px;
77
+          border-radius: 40px;
78
+          background: #f4c819 !important;
79
+          width: 100%;
80
+        }
81
+      }
82
+    }
83
+  }
84
+}

+ 36
- 0
src/components/PageBottom/index.vue Voir le fichier

@@ -0,0 +1,36 @@
1
+<template>
2
+  <view class="PageBottom">
3
+    <text>我们是有底线的</text>
4
+    <view>
5
+      <text class="iconfont iconweixin"></text>
6
+      <text class="iconfont iconqq"></text>
7
+    </view>
8
+  </view>
9
+</template>
10
+
11
+<script>
12
+export default {
13
+  name: 'PageBottom',
14
+  props: {
15
+  },
16
+  data () {
17
+    return {
18
+    }
19
+  },
20
+  computed: {
21
+  },
22
+  components: {
23
+  },
24
+  created () {
25
+    this.Init()
26
+  },
27
+  methods: {
28
+    Init () {
29
+    }
30
+  }
31
+}
32
+</script>
33
+
34
+<style lang="scss">
35
+@import "page.scss";
36
+</style>

+ 33
- 0
src/components/PageBottom/page.scss Voir le fichier

@@ -0,0 +1,33 @@
1
+.PageBottom {
2
+  position: relative;
3
+  overflow: hidden;
4
+  padding: 0 30px;
5
+  > text {
6
+    display: block;
7
+    text-align: center;
8
+    font-size: 28px;
9
+    color: #999;
10
+    border-top: 2px solid #eee;
11
+    line-height: 40px;
12
+    padding-top: 20px;
13
+  }
14
+  > view {
15
+    font-size: 0;
16
+    white-space: nowrap;
17
+    margin-top: 20px;
18
+    padding-bottom: 40px;
19
+    text-align: center;
20
+    > text {
21
+      display: inline-block;
22
+      vertical-align: middle;
23
+      font-size: 40px;
24
+      line-height: 60px;
25
+      margin-left: 30px;
26
+      color: #12cfe7;
27
+      &:first-child {
28
+        margin-left: 0;
29
+        color: #11c23f;
30
+      }
31
+    }
32
+  }
33
+}

+ 63
- 0
src/components/ReadedItem/index.vue Voir le fichier

@@ -0,0 +1,63 @@
1
+<template>
2
+  <navigator class="ReadedItem flex-h" :url="`/pages/Index/BookDetail/index?id=${Data.postId}`" hover-class="none">
3
+    <view class="Img">
4
+      <image mode="aspectFill" :src="Data.poster" class="centerLabel"></image>
5
+    </view>
6
+    <view class="flex-item">
7
+      <view class="Title">
8
+        <text>名称:{{Data.name}}</text>
9
+      </view>
10
+      <view class="Desc">
11
+        <text>作者:{{Data.author}}</text>
12
+      </view>
13
+      <view class="Desc">
14
+        <text>类型:{{Data.tags && Data.tags.length ? Data.tags[0] : '-'}}</text>
15
+      </view>
16
+    </view>
17
+    <!-- <view class="ProgressContainer">
18
+      <view class="centerLabel">
19
+        <view class="Progress">
20
+          <view class="Sector"></view>
21
+          <view class="SubSector"></view>
22
+          <view class="Layer"></view>
23
+        </view>
24
+        <text class="ProgressTips">完成进度</text>
25
+        <text class="ProgressNum">50%</text>
26
+        <text class="Length">总时长</text>
27
+        <text class="Length">1小时25分钟36秒</text>
28
+      </view>
29
+    </view> -->
30
+  </navigator>
31
+</template>
32
+
33
+<script>
34
+export default {
35
+  name: 'ReadedItem',
36
+  props: {
37
+    Data: {
38
+      default: () => {
39
+        return {}
40
+      },
41
+      type: Object
42
+    }
43
+  },
44
+  data () {
45
+    return {
46
+    }
47
+  },
48
+  computed: {
49
+  },
50
+  components: {
51
+  },
52
+  created () {
53
+  },
54
+  methods: {
55
+    Init () {
56
+    }
57
+  }
58
+}
59
+</script>
60
+
61
+<style lang="scss">
62
+@import "page.scss";
63
+</style>

+ 130
- 0
src/components/ReadedItem/page.scss Voir le fichier

@@ -0,0 +1,130 @@
1
+.ReadedItem {
2
+  > .Img {
3
+    width: 180px;
4
+    height: 240px;
5
+    position: relative;
6
+    overflow: hidden;
7
+    background: #eee;
8
+    > image {
9
+      width: 100%;
10
+      height: 100%;
11
+    }
12
+  }
13
+  > .flex-item {
14
+    margin-left: 20px;
15
+    > .Title {
16
+      > text {
17
+        display: block;
18
+        font-size: 32px;
19
+        line-height: 40px;
20
+        white-space: nowrap;
21
+        overflow: hidden;
22
+        text-overflow: ellipsis;
23
+      }
24
+    }
25
+    > .Desc {
26
+      > text {
27
+        font-size: 28px;
28
+        line-height: 40px;
29
+        overflow: hidden;
30
+        text-overflow: ellipsis;
31
+        display: -webkit-box;
32
+        -webkit-box-orient: vertical;
33
+        -webkit-line-clamp: 3;
34
+        margin-top: 10px;
35
+        color: #999;
36
+      }
37
+    }
38
+  }
39
+  > .ProgressContainer {
40
+    position: relative;
41
+    overflow: hidden;
42
+    width: 150px;
43
+    margin-right: 30px;
44
+    > view {
45
+      width: 100%;
46
+      > .Progress {
47
+        width: 100%;
48
+        height: 75px;
49
+        position: relative;
50
+        overflow: hidden;
51
+        z-index: 1;
52
+        > .Sector {
53
+          position: absolute;
54
+          width: 150px;
55
+          height: 150px;
56
+          transform: rotate(0deg);
57
+          clip: rect(0px, 150px, 75px, 0);
58
+          border-radius: 100%;
59
+          background-color: rgba(41, 141, 248, 0.3);
60
+          top: 0;
61
+          left: 0;
62
+          z-index: 1;
63
+        }
64
+        > .SubSector {
65
+          position: absolute;
66
+          width: 150px;
67
+          height: 150px;
68
+          transform: rotate(-30deg);
69
+          -webkit-transform: rotate(-30deg);
70
+          clip: rect(0px, 150px, 75px, 0);
71
+          border-radius: 100%;
72
+          background-color: rgba(41, 141, 248, 1);
73
+          top: 0;
74
+          left: 0;
75
+          z-index: 2;
76
+        }
77
+        > .Layer {
78
+          position: absolute;
79
+          width: 130px;
80
+          height: 130px;
81
+          transform: rotate(0deg);
82
+          clip: rect(0px, 150px, 75px, 0);
83
+          border-radius: 100%;
84
+          background-color: #fff;
85
+          top: 10px;
86
+          left: 6px;
87
+          z-index: 3;
88
+        }
89
+      }
90
+      > .ProgressTips {
91
+        display: block;
92
+        width: 100px;
93
+        text-align: center;
94
+        background: rgba(41, 141, 248, 1);
95
+        color: #fff;
96
+        font-size: 20px;
97
+        border-radius: 4px;
98
+        line-height: 32px;
99
+        margin: -10px auto 0;
100
+        position: relative;
101
+        z-index: 2;
102
+      }
103
+      > .ProgressNum {
104
+        display: block;
105
+        width: 100%;
106
+        text-align: center;
107
+        font-size: 20px;
108
+        color: #333;
109
+        position: relative;
110
+        z-index: 3;
111
+        margin-top: -76px;
112
+        font-size: 28px;
113
+        & + text {
114
+          margin-top: 40px;
115
+        }
116
+      }
117
+      > .Length {
118
+        width: 100%;
119
+        display: block;
120
+        text-align: center;
121
+        font-size: 24px;
122
+        color: #333;
123
+        line-height: 32px;
124
+        white-space: nowrap;
125
+        overflow: hidden;
126
+        text-overflow: ellipsis;
127
+      }
128
+    }
129
+  }
130
+}

+ 45
- 0
src/components/demo/index.vue Voir le fichier

@@ -0,0 +1,45 @@
1
+<template>
2
+  <view class="ActivityListItem">
3
+    <view class="Img">
4
+      <image mode="aspectFill" :src="TestImg" class="centerLabel"></image>
5
+    </view>
6
+    <view class="Info flex-h">
7
+      <view class="flex-item">
8
+        <text>核销拼团</text>
9
+        <text>参与截止时间:2019年10月20日 10:00:00</text>
10
+      </view>
11
+      <text class="active">未开始</text>
12
+    </view>
13
+  </view>
14
+</template>
15
+
16
+<script>
17
+export default {
18
+  name: 'ActivityListItem',
19
+  props: {
20
+    Data: {
21
+      default: null,
22
+      type: Object
23
+    }
24
+  },
25
+  data () {
26
+    return {
27
+      TestImg: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606120989360&di=8610f1678b51e26de6d4c6af39d1cf63&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2F201503%2F19%2F211608ztcq7higicydxhsy.jpg'
28
+    }
29
+  },
30
+  computed: {
31
+  },
32
+  components: {
33
+  },
34
+  created () {
35
+  },
36
+  methods: {
37
+    Init () {
38
+    }
39
+  }
40
+}
41
+</script>
42
+
43
+<style lang="scss">
44
+@import "page.scss";
45
+</style>

+ 58
- 0
src/components/demo/page.scss Voir le fichier

@@ -0,0 +1,58 @@
1
+.ActivityListItem {
2
+  width: 100%;
3
+  position: relative;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  border-radius: 12px;
7
+  > .Img {
8
+    width: 100%;
9
+    padding-bottom: 56.25%;
10
+    position: relative;
11
+    overflow: hidden;
12
+    background: #ccc;
13
+    > image {
14
+      width: 100%;
15
+      height: 100%;
16
+      z-index: 1;
17
+    }
18
+  }
19
+  > .Info {
20
+    padding: 0 20px;
21
+    position: relative;
22
+    overflow: hidden;
23
+    align-items: center;
24
+    > .flex-item {
25
+      position: relative;
26
+      overflow: hidden;
27
+      margin-right: 20px;
28
+      padding: 24px 0;
29
+      > text {
30
+        display: block;
31
+        font-size: 24px;
32
+        color: #999;
33
+        line-height: 40px;
34
+        white-space: nowrap;
35
+        overflow: hidden;
36
+        text-overflow: ellipsis;
37
+        &:first-child {
38
+          color: #333;
39
+          font-size: 32px;
40
+          font-weight: bold;
41
+          margin-bottom: 10px;
42
+        }
43
+      }
44
+    }
45
+    > text {
46
+      font-size: 30px;
47
+      color: #333;
48
+      line-height: 60px;
49
+      padding: 0 30px;
50
+      border-radius: 60px;
51
+      background: #ccc;
52
+      &.active {
53
+        color: #f35844;
54
+        background: rgba(243, 88, 68, 0.3);
55
+      }
56
+    }
57
+  }
58
+}

+ 108
- 0
src/iconfont.scss
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 20
- 0
src/index.html Voir le fichier

@@ -0,0 +1,20 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
5
+  <meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport">
6
+  <meta name="apple-mobile-web-app-capable" content="yes">
7
+  <meta name="apple-touch-fullscreen" content="yes">
8
+  <meta name="format-detection" content="telephone=no,address=no">
9
+  <meta name="apple-mobile-web-app-status-bar-style" content="white">
10
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
11
+  <link rel="stylesheet" href="//at.alicdn.com/t/font_1998922_g8nkn1klezi.css">
12
+  <title></title>
13
+  <script>
14
+    !function(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);
15
+  </script>
16
+</head>
17
+<body>
18
+  <div id="app"></div>
19
+</body>
20
+</html>

+ 4
- 0
src/pages/Index/BookAnswer/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '答题'
4
+}

+ 172
- 0
src/pages/Index/BookAnswer/index.vue Voir le fichier

@@ -0,0 +1,172 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage ref="MainPage" @UserInfoChange="Init">
4
+      <view class="page">
5
+        <scroll-view :scroll-y="true" :enhanced="true" :show-scrollbar="false" style="height: 100%;">
6
+          <view class="QuestionList" v-if="ArticleInfo.postTestList && ArticleInfo.postTestList !== null && ArticleInfo.postTestList.length">
7
+            <view v-for="(item, index) in ArticleInfo.postTestList" :key="index">
8
+              <view class="Title">
9
+                <text>{{item.title}}</text>
10
+              </view>
11
+
12
+              <checkbox-group @change="CheckboxChange(item, index, $event)" v-if="item.answerType === 'checkbox'" style="padding-top: 10px;">
13
+                <label class="checkbox">
14
+                  <checkbox value="A" :checked="false" />{{item.optionA}}
15
+                </label>
16
+                <label class="checkbox">
17
+                  <checkbox value="B" :checked="false" />{{item.optionB}}
18
+                </label>
19
+                <label class="checkbox">
20
+                  <checkbox value="C" :checked="false" />{{item.optionC}}
21
+                </label>
22
+                <label class="checkbox">
23
+                  <checkbox value="D" :checked="false" />{{item.optionD}}
24
+                </label>
25
+              </checkbox-group>
26
+
27
+              <radio-group @change="RadioChange(item, index, $event)" v-if="item.answerType === 'radio'">
28
+                <label>
29
+                  <view>
30
+                    <radio value="A" :checked="false" />
31
+                  </view>
32
+                  <view>{{item.optionA}}</view>
33
+                </label>
34
+                <label>
35
+                  <view>
36
+                    <radio value="B" :checked="false" />
37
+                  </view>
38
+                  <view>{{item.optionB}}</view>
39
+                </label>
40
+                <label>
41
+                  <view>
42
+                    <radio value="C" :checked="false" />
43
+                  </view>
44
+                  <view>{{item.optionC}}</view>
45
+                </label>
46
+                <label>
47
+                  <view>
48
+                    <radio value="D" :checked="false" />
49
+                  </view>
50
+                  <view>{{item.optionD}}</view>
51
+                </label>
52
+              </radio-group>
53
+
54
+              <radio-group @change="RadioChange(item, index, $event)" v-if="item.answerType === 'switch'">
55
+                <label>
56
+                  <view>
57
+                    <radio value="A" :checked="false" />
58
+                  </view>
59
+                  <view>{{item.optionA}}</view>
60
+                </label>
61
+                <label>
62
+                  <view>
63
+                    <radio value="B" :checked="false" />
64
+                  </view>
65
+                  <view>{{item.optionB}}</view>
66
+                </label>
67
+              </radio-group>
68
+
69
+            </view>
70
+          </view>
71
+          <view class="Submit">
72
+            <text @tap="Submit">提交</text>
73
+          </view>
74
+        </scroll-view>
75
+        <PageBottom></PageBottom>
76
+      </view>
77
+    </MainPage>
78
+  </view>
79
+</template>
80
+
81
+<script>
82
+import Taro from '@tarojs/taro'
83
+import MainPage from '../../../components/MainPage'
84
+import PageBottom from '../../../components/PageBottom'
85
+import { createNamespacedHelpers } from 'vuex'
86
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
87
+const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
88
+export default {
89
+  name: 'BookDetail',
90
+  data () {
91
+    return {
92
+      ArticleInfo: {},
93
+      DataLock: false
94
+    }
95
+  },
96
+  computed: {
97
+    ...mapUserState({
98
+      UserInfo: x => x.UserInfo // 用户信息
99
+    })
100
+  },
101
+  components: {
102
+    MainPage,
103
+    PageBottom
104
+  },
105
+  created () {
106
+  },
107
+  mounted () {
108
+    this.$nextTick(() => {
109
+    })
110
+  },
111
+  methods: {
112
+    ...mapUserActions([
113
+      'GetArticleDetail'
114
+    ]),
115
+    ...mapUserMutations([
116
+    ]),
117
+    ...mapIndexActions([
118
+      'PostArticleAnswer'
119
+    ]),
120
+    Submit () {
121
+      let Bool = true
122
+      this.ArticleInfo.postTestList.map((item) => {
123
+        if (item.correctAnswers === null || item.correctAnswers === '') {
124
+          Bool = false
125
+        }
126
+      })
127
+      if (Bool && !this.DataLock) {
128
+        this.DataLock = true
129
+        this.PostArticleAnswer({ data: { data: this.ArticleInfo.postTestList } }).then(() => {
130
+          wx.showToast({
131
+            title: '提交成功',
132
+            icon: 'none',
133
+            duration: 2000
134
+          })
135
+          this.DataLock = false
136
+          wx.navigateBack({ changed: true })
137
+        }).catch(() => {
138
+          this.DataLock = false
139
+        })
140
+      }
141
+    },
142
+    RadioChange (item, index, e) { // 单选
143
+      item.correctAnswers = e.detail.value
144
+    },
145
+    CheckboxChange (item, index, e) { // 多选
146
+      let Arr = []
147
+      if (item.correctAnswers !== null && item.correctAnswers !== '') {
148
+        Arr = item.correctAnswers.split(',')
149
+      }
150
+      Arr.push(e.detail.value)
151
+      Arr = [...new Set(Arr)]
152
+      item.correctAnswers = Arr[Arr.length - 1].join(',')
153
+    },
154
+    Init () {
155
+      if (this.UserInfo !== null) {
156
+        this.GetArticleDetail({ urlData: { id: Taro.getCurrentInstance().router.params.id } }).then((res) => {
157
+          this.ArticleInfo = res.data.data || {}
158
+        })
159
+        if (this.UserInfo.studentId === null || this.UserInfo.studentId === '') {
160
+          if (this.$refs.MainPage) {
161
+            this.$refs.MainPage.ShowStudentIdPopup = true
162
+          }
163
+        }
164
+      }
165
+    }
166
+  }
167
+}
168
+</script>
169
+
170
+<style lang="scss">
171
+@import "page.scss";
172
+</style>

+ 68
- 0
src/pages/Index/BookAnswer/page.scss Voir le fichier

@@ -0,0 +1,68 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  .QuestionList {
7
+    position: relative;
8
+    overflow: hidden;
9
+    padding: 0 30px;
10
+    > view {
11
+      position: relative;
12
+      overflow: hidden;
13
+      border-bottom: 2px solid #eee;
14
+      padding: 30px 0;
15
+      > .Title {
16
+        position: relative;
17
+        overflow: hidden;
18
+        > text {
19
+          font-size: 28px;
20
+          line-height: 40px;
21
+          display: block;
22
+        }
23
+      }
24
+      > checkbox-group {
25
+        font-size: 28px;
26
+        white-space: nowrap;
27
+        display: block;
28
+        position: relative;
29
+        overflow: hidden;
30
+        > view {
31
+          display: inline-block;
32
+          vertical-align: middle;
33
+        }
34
+      }
35
+      > radio-group {
36
+        position: relative;
37
+        overflow: hidden;
38
+        > label {
39
+          display: block;
40
+          position: relative;
41
+          overflow: hidden;
42
+          font-size: 28px;
43
+          white-space: nowrap;
44
+          margin-top: 20px;
45
+          > view {
46
+            display: inline-block;
47
+            vertical-align: middle;
48
+            font-size: 28px;
49
+          }
50
+        }
51
+      }
52
+    }
53
+  }
54
+  .Submit {
55
+    padding: 30px;
56
+    position: relative;
57
+    overflow: hidden;
58
+    > text {
59
+      display: block;
60
+      text-align: center;
61
+      font-size: 28px;
62
+      color: #333;
63
+      background: #f4c819;
64
+      line-height: 80px;
65
+      border-radius: 40px;
66
+    }
67
+  }
68
+}

+ 5
- 0
src/pages/Index/BookDetail/index.config.js Voir le fichier

@@ -0,0 +1,5 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  enableShareAppMessage: true,
4
+  navigationBarTitleText: '详情'
5
+}

+ 188
- 0
src/pages/Index/BookDetail/index.vue Voir le fichier

@@ -0,0 +1,188 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage ref="MainPage" @UserInfoChange="Init">
4
+      <view class="page flex-v">
5
+        <!-- 内容 -->
6
+        <view class="flex-item">
7
+          <view>
8
+
9
+            <!-- 封面内容 -->
10
+            <view class="FrontInfo">
11
+              <view class="Img">
12
+                <view>
13
+                  <image mode="aspectFit" :src="ArticleInfo.poster" class="centerLabel"></image>
14
+                </view>
15
+              </view>
16
+              <view class="SubInfo">
17
+                <view class="Tag">
18
+                  <text class="iconfont iconbiaoqian"></text>
19
+                  <text>分类:</text>
20
+                  <text v-for="(item, index) in (ArticleInfo.tags || [])" :key="index">{{item}}</text>
21
+                </view>
22
+                <view class="flex-h">
23
+                  <view class="flex-item flex-h">
24
+                    <text>名称:</text>
25
+                    <text class="flex-item">{{ArticleInfo.name}}</text>
26
+                  </view>
27
+                  <view class="flex-item flex-h">
28
+                    <text>阅读量:</text>
29
+                    <text class="flex-item">{{ArticleInfo.answerNum}}</text>
30
+                  </view>
31
+                </view>
32
+                <view class="flex-h">
33
+                  <view class="flex-item flex-h">
34
+                    <text>作者:</text>
35
+                    <text class="flex-item">{{ArticleInfo.author}}</text>
36
+                  </view>
37
+                  <view class="flex-item flex-h">
38
+                    <text>发布时间:</text>
39
+                    <text class="flex-item">{{ToolClass.DateFormat(ArticleInfo.publishDate, 'YY:MM:DD')}}</text>
40
+                  </view>
41
+                </view>
42
+                <view class="Desc">
43
+                  <text>简介:{{ArticleInfo.summary}}</text>
44
+                </view>
45
+              </view>
46
+
47
+              <!-- 正文 -->
48
+              <view class="Article">
49
+                <rich-text :nodes="ArticleInfo.content"></rich-text>
50
+              </view>
51
+
52
+              <!-- 去答题 -->
53
+              <view class="ToAnswer">
54
+                <navigator :url="`/pages/Index/BookAnswer/index?id=${ArticleInfo.postId}`" hover-class="none">去答题</navigator>
55
+              </view>
56
+
57
+            </view>
58
+
59
+            <PageBottom></PageBottom>
60
+          </view>
61
+        </view>
62
+
63
+        <!-- 底部 -->
64
+        <view class="flex-h Bottom">
65
+          <view class="Share" @tap="ShareArticle">
66
+            <text class="iconfont iconfenxiang"></text>
67
+            <text>分享</text>
68
+          </view>
69
+          <view class="Like" @tap="TriggerSave">
70
+            <text class="iconfont iconshoucang1" :class="{'active': ArticleInfo.isSaved}"></text>
71
+            <text>收藏</text>
72
+          </view>
73
+          <view class="flex-item"></view>
74
+          <view class="Answer">
75
+            <navigator :url="`/pages/Index/BookAnswer/index?id=${ArticleInfo.postId}`" hover-class="none">去答题</navigator>
76
+          </view>
77
+          <!-- <view class="ReadInfo">
78
+            <text>阅读时长:1小时22分钟22秒</text>
79
+            <view class="Progress flex-h">
80
+              <view class="flex-item">
81
+                <view :style="{width: '50%'}"></view>
82
+              </view>
83
+              <text>完成进度</text>
84
+            </view>
85
+          </view> -->
86
+        </view>
87
+      </view>
88
+    </MainPage>
89
+  </view>
90
+</template>
91
+
92
+<script>
93
+import Taro from '@tarojs/taro'
94
+import MainPage from '../../../components/MainPage'
95
+import PageBottom from '../../../components/PageBottom'
96
+import { createNamespacedHelpers } from 'vuex'
97
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
98
+export default {
99
+  name: 'BookDetail',
100
+  data () {
101
+    return {
102
+      Timer: null,
103
+      ArticleInfo: {},
104
+      DataLock: false
105
+    }
106
+  },
107
+  computed: {
108
+    ...mapUserState({
109
+      UserInfo: x => x.UserInfo // 用户信息
110
+    })
111
+  },
112
+  components: {
113
+    MainPage,
114
+    PageBottom
115
+  },
116
+  onShareAppMessage () {
117
+    return {
118
+      title: this.ArticleInfo.shareSetting === null ? this.ArticleInfo.name : this.ArticleInfo.shareSetting.title,
119
+      imageUrl:this.ArticleInfo.shareSetting === null ? this.ArticleInfo.poster : this.ArticleInfo.shareSetting.imageUrl,
120
+      path: `/pages/Index/BookDetail/index?id=${Taro.getCurrentInstance().router.params.id}`
121
+    }
122
+  },
123
+  created () {
124
+  },
125
+  mounted () {
126
+    this.$nextTick(() => {
127
+    })
128
+  },
129
+  methods: {
130
+    ...mapUserActions([
131
+      'GetArticleDetail',
132
+      'SaveArticle',
133
+      'DeleteSaveArticle'
134
+    ]),
135
+    ...mapUserMutations([
136
+    ]),
137
+    Init () {
138
+      if (this.UserInfo !== null) {
139
+        this.GetArticleDetail({ urlData: { id: Taro.getCurrentInstance().router.params.id } }).then((res) => {
140
+          this.ArticleInfo = res.data.data || {}
141
+        })
142
+        if (this.UserInfo.studentId === null || this.UserInfo.studentId === '') {
143
+          if (this.$refs.MainPage) {
144
+            this.$refs.MainPage.ShowStudentIdPopup = true
145
+          }
146
+        }
147
+      }
148
+    },
149
+    ShareArticle () { // 分享
150
+
151
+    },
152
+    TriggerSave () {
153
+      if (!this.DataLock && this.ArticleInfo.postId) {
154
+        this.DataLock = true
155
+        if (this.ArticleInfo.isSaved) { // 取消收藏
156
+          this.DeleteSaveArticle({ queryData: { postId: this.ArticleInfo.postId } }).then(() => {
157
+            wx.showToast({
158
+              title: '取消收藏成功',
159
+              icon: 'none',
160
+              duration: 2000
161
+            })
162
+            this.ArticleInfo.isSaved = false
163
+            this.DataLock = false
164
+          }).catch(() => {
165
+            this.DataLock = false
166
+          })
167
+        } else { // 收藏
168
+          this.SaveArticle({ queryData: { postId: this.ArticleInfo.postId } }).then(() => {
169
+            wx.showToast({
170
+              title: '收藏成功',
171
+              icon: 'none',
172
+              duration: 2000
173
+            })
174
+            this.ArticleInfo.isSaved = true
175
+            this.DataLock = false
176
+          }).catch(() => {
177
+            this.DataLock = false
178
+          })
179
+        }
180
+      }
181
+    }
182
+  }
183
+}
184
+</script>
185
+
186
+<style lang="scss">
187
+@import "page.scss";
188
+</style>

+ 188
- 0
src/pages/Index/BookDetail/page.scss Voir le fichier

@@ -0,0 +1,188 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .flex-item {
7
+    position: relative;
8
+    overflow: hidden;
9
+    > view {
10
+      width: 100%;
11
+      position: absolute;
12
+      left: 0;
13
+      top: 0;
14
+      bottom: 0;
15
+      overflow-y: scroll;
16
+      -webkit-overflow-scrolling: touch;
17
+      > .FrontInfo {
18
+        position: relative;
19
+        overflow: hidden;
20
+        > .Img {
21
+          padding: 30px 120px;
22
+          > view {
23
+            width: 100%;
24
+            padding-bottom: 120%;
25
+            position: relative;
26
+            overflow: hidden;
27
+            > image {
28
+              width: 100%;
29
+              height: 100%;
30
+            }
31
+          }
32
+        }
33
+        > .SubInfo {
34
+          position: relative;
35
+          overflow: hidden;
36
+          > .Tag {
37
+            font-size: 0;
38
+            white-space: nowrap;
39
+            padding: 0 30px;
40
+            > text {
41
+              display: inline-block;
42
+              vertical-align: middle;
43
+              font-size: 28px;
44
+              font-weight: bold;
45
+              line-height: 60px;
46
+              margin-right: 10px;
47
+              &.iconfont {
48
+                font-weight: normal;
49
+                font-size: 40px;
50
+              }
51
+            }
52
+          }
53
+          > .flex-h {
54
+            align-items: center;
55
+            padding: 0 30px;
56
+            > view {
57
+              align-items: center;
58
+              > text {
59
+                font-size: 28px;
60
+                line-height: 40px;
61
+                white-space: nowrap;
62
+                overflow: hidden;
63
+                text-overflow: ellipsis;
64
+                color: #999;
65
+                &:first-child {
66
+                  margin-right: 10px;
67
+                }
68
+              }
69
+            }
70
+          }
71
+          > .Desc {
72
+            padding: 0 30px;
73
+            position: relative;
74
+            overflow: hidden;
75
+            > text {
76
+              width: 100%;
77
+              display: block;
78
+              font-size: 28px;
79
+              line-height: 40px;
80
+              color: #999;
81
+            }
82
+          }
83
+        }
84
+        > .Article {
85
+          position: relative;
86
+          overflow: hidden;
87
+          border-top: 2px solid #eee;
88
+          padding: 30px;
89
+          margin-top: 30px;
90
+        }
91
+        > .ToAnswer {
92
+          padding: 30px;
93
+          position: relative;
94
+          overflow: hidden;
95
+          > navigator {
96
+            display: block;
97
+            text-align: center;
98
+            font-size: 28px;
99
+            background: #f4c819;
100
+            line-height: 80px;
101
+            border-radius: 40px;
102
+            color: #333;
103
+          }
104
+        }
105
+      }
106
+    }
107
+  }
108
+  > .Bottom {
109
+    position: relative;
110
+    overflow: hidden;
111
+    background: #fff;
112
+    align-items: center;
113
+    padding-left: 30px;
114
+    z-index: 2;
115
+    box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.05);
116
+    > .Share,
117
+    .Like {
118
+      font-size: 0;
119
+      white-space: nowrap;
120
+      margin-right: 30px;
121
+      > text {
122
+        display: inline-block;
123
+        vertical-align: middle;
124
+        font-size: 28px;
125
+        color: #333;
126
+        line-height: 40px;
127
+        &:first-child {
128
+          font-size: 36px;
129
+          &.active {
130
+            color: #f4c819;
131
+          }
132
+        }
133
+      }
134
+    }
135
+    > .Answer {
136
+      position: relative;
137
+      overflow: hidden;
138
+      > navigator {
139
+        display: block;
140
+        width: 180px;
141
+        text-align: center;
142
+        line-height: 100px;
143
+        background: #f4c819;
144
+        color: #333;
145
+        font-size: 28px;
146
+      }
147
+    }
148
+    > .ReadInfo {
149
+      position: relative;
150
+      overflow: hidden;
151
+      > text {
152
+        display: block;
153
+        white-space: nowrap;
154
+        font-size: 26px;
155
+        color: #333;
156
+        line-height: 32px;
157
+        overflow: hidden;
158
+        text-overflow: ellipsis;
159
+        text-align: right;
160
+      }
161
+      > .Progress {
162
+        align-items: center;
163
+        margin-top: 10px;
164
+        > .flex-item {
165
+          height: 10px;
166
+          background: rgba(41, 141, 248, 0.5);
167
+          border-radius: 10px;
168
+          position: relative;
169
+          overflow: hidden;
170
+          margin-right: 20px;
171
+          > view {
172
+            width: 0;
173
+            height: 100%;
174
+            position: absolute;
175
+            left: 0;
176
+            top: 0;
177
+            background: rgba(41, 141, 248, 1);
178
+          }
179
+        }
180
+        > text {
181
+          font-size: 26px;
182
+          color: #333;
183
+          line-height: 32px;
184
+        }
185
+      }
186
+    }
187
+  }
188
+}

+ 4
- 0
src/pages/Index/Search/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '搜索'
4
+}

+ 117
- 0
src/pages/Index/Search/index.vue Voir le fichier

@@ -0,0 +1,117 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage>
4
+      <view class="page flex-v">
5
+        <!-- 搜索 -->
6
+        <view class="SearchContainer">
7
+          <view class="flex-h">
8
+            <text class="iconfont iconsousuo"></text>
9
+            <view class="flex-item">
10
+              <input :focus="true" confirm-type="search" placeholder="搜索你感兴趣的内容" v-model="SearchKey" @confirm="Search" @focus="ShowHistory = false" @blur="SearchBlur">
11
+            </view>
12
+          </view>
13
+        </view>
14
+
15
+        <!-- 内容 -->
16
+        <view class="flex-item">
17
+          <view>
18
+            <view>
19
+
20
+              <!-- 热门搜索 -->
21
+              <!-- <view class="HotSearch" v-show="!ShowHistory">
22
+            <view class="Title">
23
+              <text>热门搜索</text>
24
+            </view>
25
+            <view class="List">
26
+              <navigator url="" v-for="(item, index) in 10" :key="index" hover-class="none">关键词</navigator>
27
+            </view>
28
+          </view> -->
29
+
30
+              <!-- 最近搜索 -->
31
+              <!-- <view class="SearchHistory" v-show="!ShowHistory">
32
+            <view class="Title">
33
+              <text>最近搜索</text>
34
+            </view>
35
+            <view class="List">
36
+              <navigator url="" v-for="(item, index) in 10" :key="index" hover-class="none">关键词</navigator>
37
+            </view>
38
+          </view> -->
39
+
40
+              <!-- 搜索结果 -->
41
+              <view class="ResultContainer" v-show="ShowHistory">
42
+                <view class="flex-h" v-for="(item, index) in SearchResult" :key="index">
43
+                  <BookItem :Data="item"></BookItem>
44
+                </view>
45
+              </view>
46
+
47
+              <PageBottom v-show="ShowHistory"></PageBottom>
48
+
49
+            </view>
50
+          </view>
51
+        </view>
52
+      </view>
53
+    </MainPage>
54
+  </view>
55
+</template>
56
+
57
+<script>
58
+import MainPage from '../../../components/MainPage'
59
+import BookItem from '../../../components/BookItem'
60
+import PageBottom from '../../../components/PageBottom'
61
+import { createNamespacedHelpers } from 'vuex'
62
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
63
+const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
64
+export default {
65
+  name: 'Search',
66
+  data () {
67
+    return {
68
+      ShowHistory: false,
69
+      Timer: null,
70
+      SearchKey: '',
71
+      SearchResult: []
72
+    }
73
+  },
74
+  computed: {
75
+    ...mapUserState({
76
+      UserInfo: x => x.UserInfo // 用户信息
77
+    })
78
+  },
79
+  components: {
80
+    MainPage,
81
+    BookItem,
82
+    PageBottom
83
+  },
84
+  created () {
85
+  },
86
+  mounted () {
87
+    this.$nextTick(() => {
88
+    })
89
+  },
90
+  methods: {
91
+    ...mapUserActions([
92
+    ]),
93
+    ...mapUserMutations([
94
+    ]),
95
+    ...mapIndexActions([
96
+      'GetSearchArticleList'
97
+    ]),
98
+    Init () {
99
+    },
100
+    Search () {
101
+      this.GetSearchArticleList({ queryData: { pageNum: 1, pageSize: 10000, name: this.SearchKey } }).then((res) => {
102
+        this.SearchResult = [...res.data.data.records]
103
+      })
104
+    },
105
+    SearchBlur () {
106
+      clearTimeout(this.Timer)
107
+      this.Timer = setTimeout(() => {
108
+        this.ShowHistory = true
109
+      }, 300)
110
+    }
111
+  }
112
+}
113
+</script>
114
+
115
+<style lang="scss">
116
+@import "page.scss";
117
+</style>

+ 141
- 0
src/pages/Index/Search/page.scss Voir le fichier

@@ -0,0 +1,141 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .SearchContainer {
7
+    position: relative;
8
+    overflow: hidden;
9
+    padding: 20px 30px;
10
+    > view {
11
+      box-sizing: border-box;
12
+      width: 100%;
13
+      position: relative;
14
+      overflow: hidden;
15
+      border: 2px solid #eee;
16
+      border-radius: 10px;
17
+      align-items: center;
18
+      background: #fff;
19
+      > text {
20
+        font-size: 40px;
21
+        line-height: 80px;
22
+        width: 60px;
23
+        text-align: center;
24
+        color: #ccc;
25
+      }
26
+      > view {
27
+        > input {
28
+          display: block;
29
+          width: 100%;
30
+          height: 80px;
31
+          font-size: 28px;
32
+          color: #333;
33
+        }
34
+      }
35
+    }
36
+  }
37
+  > .flex-item {
38
+    position: relative;
39
+    overflow: hidden;
40
+    > view {
41
+      width: 100%;
42
+      position: absolute;
43
+      left: 0;
44
+      top: 0;
45
+      bottom: 0;
46
+      overflow-y: scroll;
47
+      -webkit-overflow-scrolling: touch;
48
+      > view {
49
+        padding: 0 30px;
50
+        position: relative;
51
+        overflow: hidden;
52
+        > .HotSearch,
53
+        > .SearchHistory {
54
+          margin-top: 30px;
55
+          position: relative;
56
+          overflow: hidden;
57
+          &:first-child {
58
+            margin-top: 0;
59
+          }
60
+          > .Title {
61
+            > text {
62
+              display: block;
63
+              font-size: 28px;
64
+              font-weight: bold;
65
+              line-height: 60px;
66
+            }
67
+          }
68
+          > .List {
69
+            font-size: 0;
70
+            > navigator {
71
+              display: inline-block;
72
+              vertical-align: middle;
73
+              margin-bottom: 20px;
74
+              margin-right: 20px;
75
+              border: 2px solid #eee;
76
+              padding: 0 20px;
77
+              background: #fff;
78
+              font-size: 28px;
79
+              line-height: 60px;
80
+              border-radius: 10px;
81
+            }
82
+          }
83
+        }
84
+        > .ResultContainer {
85
+          position: relative;
86
+          overflow: hidden;
87
+          padding: 10px 0;
88
+          margin-bottom: 30px;
89
+          > view {
90
+            position: relative;
91
+            overflow: hidden;
92
+            margin-bottom: 30px;
93
+            padding-bottom: 30px;
94
+            border-bottom: 2px solid #eee;
95
+            &:last-child {
96
+              border-bottom: none;
97
+              padding-bottom: 0;
98
+            }
99
+            > .Img {
100
+              width: 180px;
101
+              height: 240px;
102
+              position: relative;
103
+              overflow: hidden;
104
+              background: #eee;
105
+              > image {
106
+                width: 100%;
107
+                height: 100%;
108
+              }
109
+            }
110
+            > .flex-item {
111
+              margin-left: 20px;
112
+              > .Title {
113
+                > text {
114
+                  display: block;
115
+                  font-size: 32px;
116
+                  line-height: 40px;
117
+                  white-space: nowrap;
118
+                  overflow: hidden;
119
+                  text-overflow: ellipsis;
120
+                }
121
+              }
122
+              > .Desc {
123
+                > text {
124
+                  font-size: 28px;
125
+                  line-height: 40px;
126
+                  overflow: hidden;
127
+                  text-overflow: ellipsis;
128
+                  display: -webkit-box;
129
+                  -webkit-box-orient: vertical;
130
+                  -webkit-line-clamp: 3;
131
+                  margin-top: 10px;
132
+                  color: #999;
133
+                }
134
+              }
135
+            }
136
+          }
137
+        }
138
+      }
139
+    }
140
+  }
141
+}

+ 4
- 0
src/pages/Index/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '健康知识'
4
+}

+ 146
- 0
src/pages/Index/index.vue Voir le fichier

@@ -0,0 +1,146 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="UserInfoChange">
4
+      <view class="page flex-v">
5
+
6
+        <!-- 搜索 -->
7
+        <view class="Search">
8
+          <view class="flex-h">
9
+            <text class="iconfont iconsousuo"></text>
10
+            <view class="flex-item">
11
+              <navigator url="/pages/Index/Search/index" hover-class="none">搜索你感兴趣的内容</navigator>
12
+            </view>
13
+          </view>
14
+        </view>
15
+
16
+        <!-- 内容 -->
17
+        <view class="flex-item">
18
+          <view>
19
+            <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
20
+              <view class="Content">
21
+
22
+                <!-- 轮播图 -->
23
+                <view class="BannerContainer">
24
+                  <view>
25
+                    <swiper :indicator-dots="true" :autoplay="true" :interval="3000">
26
+                      <swiper-item v-for="(item, index) in BannerList" :key="index">
27
+                        <view class="BannerItem">
28
+                          <image mode="aspectFill" :src="item.image" class="centerLabel"></image>
29
+                        </view>
30
+                      </swiper-item>
31
+                    </swiper>
32
+                  </view>
33
+                </view>
34
+
35
+                <!-- 热门推荐 -->
36
+                <view class="HotRecommend">
37
+                  <view class="Title">
38
+                    <text>热门推荐</text>
39
+                  </view>
40
+                  <view class="ListContainer">
41
+                    <scroll-view class="ScrollContainer" scroll-x="true" style="width: 100%">
42
+                      <navigator class="RecommendItem" v-for="(item, index) in HotList" :key="index" :url="`/pages/Index/BookDetail/index?id=${item.targetId}`" hover-class="none">
43
+                        <view class="Img">
44
+                          <image mode="aspectFill" :src="item.poster" class="centerLabel"></image>
45
+                        </view>
46
+                        <view class="Title">
47
+                          <text>{{item.targetTitle}}</text>
48
+                        </view>
49
+                      </navigator>
50
+                    </scroll-view>
51
+                  </view>
52
+                </view>
53
+
54
+                <!-- 最新文章 -->
55
+                <view class="NewstArticle">
56
+                  <view class="Title">
57
+                    <text>最新文章</text>
58
+                  </view>
59
+                  <view class="ListContainer">
60
+                    <view class="ArticleItem flex-h" v-for="(item, index) in NewestArticleList">
61
+                      <BookItem :Data="item"></BookItem>
62
+                    </view>
63
+                  </view>
64
+                </view>
65
+
66
+                <PageBottom></PageBottom>
67
+
68
+              </view>
69
+            </scroll-view>
70
+          </view>
71
+        </view>
72
+      </view>
73
+    </MainPage>
74
+
75
+  </view>
76
+</template>
77
+
78
+<script>
79
+import MainPage from '../../components/MainPage'
80
+import BookItem from '../../components/BookItem'
81
+import PageBottom from '../../components/PageBottom'
82
+import { createNamespacedHelpers } from 'vuex'
83
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
84
+const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
85
+export default {
86
+  name: 'Index',
87
+  data () {
88
+    return {
89
+      IsPull: false,
90
+      BannerList: [],
91
+      HotList: [],
92
+      NewestArticleList: []
93
+    }
94
+  },
95
+  computed: {
96
+    ...mapUserState({
97
+      UserInfo: x => x.UserInfo // 用户信息
98
+    })
99
+  },
100
+  components: {
101
+    MainPage,
102
+    BookItem,
103
+    PageBottom
104
+  },
105
+  created () {
106
+  },
107
+  mounted () {
108
+    this.$nextTick(() => {
109
+    })
110
+  },
111
+  methods: {
112
+    ...mapUserActions([
113
+    ]),
114
+    ...mapUserMutations([
115
+    ]),
116
+    ...mapIndexActions([
117
+      'GetIndexBanner',
118
+      'GetIndexHotList',
119
+      'GetIndexNewestArticle'
120
+    ]),
121
+    UserInfoChange () {
122
+      this.GetIndexBanner().then((res) => {
123
+        this.BannerList = [...res.data.data]
124
+      })
125
+      this.GetIndexHotList().then((res) => {
126
+        this.HotList = [...res.data.data]
127
+      })
128
+      this.GetIndexNewestArticle({ urlData: { pageSize: 10, pageNum: 1 } }).then((res) => {
129
+        this.NewestArticleList = [...res.data.data.records]
130
+      })
131
+    },
132
+    Init () {
133
+    },
134
+    OnRefresh (e) {
135
+      this.IsPull = true
136
+      window.setTimeout(() => {
137
+        this.IsPull = false
138
+      }, 1000)
139
+    }
140
+  }
141
+}
142
+</script>
143
+
144
+<style lang="scss">
145
+@import "page.scss";
146
+</style>

+ 199
- 0
src/pages/Index/page.scss Voir le fichier

@@ -0,0 +1,199 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .Search {
7
+    position: relative;
8
+    overflow: hidden;
9
+    background: #f4c819;
10
+    padding: 20px 30px;
11
+    > view {
12
+      position: relative;
13
+      overflow: hidden;
14
+      background: #fff;
15
+      border-radius: 6px;
16
+      align-items: center;
17
+      > text {
18
+        font-size: 32px;
19
+        color: #333;
20
+        margin-left: 20px;
21
+        margin-right: 10px;
22
+      }
23
+      > view {
24
+        > navigator {
25
+          display: block;
26
+          width: 100%;
27
+          font-size: 28px;
28
+          line-height: 60px;
29
+          color: #999;
30
+        }
31
+      }
32
+    }
33
+  }
34
+  > .flex-item {
35
+    position: relative;
36
+    overflow: hidden;
37
+    > view {
38
+      width: 100%;
39
+      position: absolute;
40
+      left: 0;
41
+      top: 0;
42
+      bottom: 0;
43
+      overflow: hidden;
44
+      .Content {
45
+        width: 100%;
46
+        position: relative;
47
+        > .BannerContainer {
48
+          width: 100%;
49
+          position: relative;
50
+          overflow: hidden;
51
+          height: 0;
52
+          padding-bottom: 40%;
53
+          background: #eee;
54
+          > view {
55
+            width: 100%;
56
+            position: absolute;
57
+            left: 0;
58
+            top: 0;
59
+            bottom: 0;
60
+            .BannerItem {
61
+              width: 100%;
62
+              height: 100%;
63
+              position: relative;
64
+              overflow: hidden;
65
+              > image {
66
+                width: 100%;
67
+                height: 100%;
68
+              }
69
+            }
70
+          }
71
+        }
72
+        > .HotRecommend {
73
+          position: relative;
74
+          overflow: hidden;
75
+          background: #fff;
76
+          margin-top: 30px;
77
+          padding: 10px 30px;
78
+          > .Title {
79
+            > text {
80
+              display: block;
81
+              font-size: 32px;
82
+              font-weight: bold;
83
+              line-height: 60px;
84
+            }
85
+          }
86
+          > .ListContainer {
87
+            width: 100%;
88
+            position: relative;
89
+            overflow: hidden;
90
+            > .ScrollContainer {
91
+              font-size: 0;
92
+              white-space: nowrap;
93
+              margin-top: 10px;
94
+              .RecommendItem {
95
+                display: inline-block;
96
+                vertical-align: middle;
97
+                width: 180px;
98
+                position: relative;
99
+                overflow: hidden;
100
+                margin-right: 30px;
101
+                > .Img {
102
+                  width: 100%;
103
+                  height: 240px;
104
+                  position: relative;
105
+                  overflow: hidden;
106
+                  background: #eee;
107
+                  > image {
108
+                    width: 100%;
109
+                    height: 100%;
110
+                  }
111
+                }
112
+                > .Title {
113
+                  > text {
114
+                    margin-top: 6px;
115
+                    display: block;
116
+                    font-size: 28px;
117
+                    line-height: 40px;
118
+                    white-space: nowrap;
119
+                    overflow: hidden;
120
+                    text-overflow: ellipsis;
121
+                  }
122
+                }
123
+              }
124
+            }
125
+          }
126
+        }
127
+        > .NewstArticle {
128
+          position: relative;
129
+          overflow: hidden;
130
+          background: #fff;
131
+          margin-top: 30px;
132
+          padding: 10px 30px;
133
+          margin-bottom: 30px;
134
+          > .Title {
135
+            > text {
136
+              display: block;
137
+              font-size: 32px;
138
+              font-weight: bold;
139
+              line-height: 60px;
140
+            }
141
+          }
142
+          > .ListContainer {
143
+            position: relative;
144
+            overflow: hidden;
145
+            margin-top: 10px;
146
+            > view {
147
+              position: relative;
148
+              overflow: hidden;
149
+              margin-bottom: 30px;
150
+              padding-bottom: 30px;
151
+              border-bottom: 2px solid #eee;
152
+              &:last-child {
153
+                border-bottom: none;
154
+                padding-bottom: 0;
155
+              }
156
+              > .Img {
157
+                width: 180px;
158
+                height: 240px;
159
+                position: relative;
160
+                overflow: hidden;
161
+                background: #eee;
162
+                > image {
163
+                  width: 100%;
164
+                  height: 100%;
165
+                }
166
+              }
167
+              > .flex-item {
168
+                margin-left: 20px;
169
+                > .Title {
170
+                  > text {
171
+                    display: block;
172
+                    font-size: 32px;
173
+                    line-height: 40px;
174
+                    white-space: nowrap;
175
+                    overflow: hidden;
176
+                    text-overflow: ellipsis;
177
+                  }
178
+                }
179
+                > .Desc {
180
+                  > text {
181
+                    font-size: 28px;
182
+                    line-height: 40px;
183
+                    overflow: hidden;
184
+                    text-overflow: ellipsis;
185
+                    display: -webkit-box;
186
+                    -webkit-box-orient: vertical;
187
+                    -webkit-line-clamp: 3;
188
+                    margin-top: 10px;
189
+                    color: #999;
190
+                  }
191
+                }
192
+              }
193
+            }
194
+          }
195
+        }
196
+      }
197
+    }
198
+  }
199
+}

+ 4
- 0
src/pages/Mine/MyBodyCheck/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '我的体检'
4
+}

+ 93
- 0
src/pages/Mine/MyBodyCheck/index.vue Voir le fichier

@@ -0,0 +1,93 @@
1
+<template>
2
+  <view class="page flex-v">
3
+    <view class="UserInfo">
4
+      <view class="flex-h">
5
+        <view class="flex-h flex-item">
6
+          <text>姓名:</text>
7
+          <text class="flex-item">{{UserInfo.name || '-'}}</text>
8
+        </view>
9
+        <view class="flex-h flex-item">
10
+          <text>学号:</text>
11
+          <text class="flex-item">{{UserInfo.studentId || '-'}}</text>
12
+        </view>
13
+        <view class="flex-h flex-item">
14
+          <text>性别:</text>
15
+          <text class="flex-item">{{UserInfo.sex - 0 === 1 ? '男' : '女'}}</text>
16
+        </view>
17
+        <view class="flex-h flex-item">
18
+          <text>学校:</text>
19
+          <text class="flex-item">{{UserInfo.schoolName || '-'}}</text>
20
+        </view>
21
+        <view class="flex-h flex-item">
22
+          <text>专业:</text>
23
+          <text class="flex-item">{{UserInfo.specialtyName || '-'}}</text>
24
+        </view>
25
+        <view class="flex-h flex-item">
26
+          <text>创建时间:</text>
27
+          <text class="flex-item">-</text>
28
+        </view>
29
+      </view>
30
+    </view>
31
+    <view class="flex-item">
32
+      <view>
33
+        <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
34
+          <view class="Content">
35
+            <view class="ListItem" v-for="(item, index) in PageList" :key="index">
36
+              <BodyCheckItem></BodyCheckItem>
37
+            </view>
38
+          </view>
39
+          <PageBottom></PageBottom>
40
+        </scroll-view>
41
+      </view>
42
+    </view>
43
+  </view>
44
+</template>
45
+
46
+<script>
47
+import BodyCheckItem from '../../../components/BodyCheckItem'
48
+import PageBottom from '../../../components/PageBottom'
49
+import { createNamespacedHelpers } from 'vuex'
50
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
51
+export default {
52
+  name: 'MyBodyCheck',
53
+  data () {
54
+    return {
55
+      IsPull: false,
56
+      PageList: ['', '', '', '', '', '', '', '', '', '', '', '']
57
+    }
58
+  },
59
+  computed: {
60
+    ...mapUserState({
61
+      UserInfo: x => x.UserInfo // 用户信息
62
+    })
63
+  },
64
+  components: {
65
+    BodyCheckItem,
66
+    PageBottom
67
+  },
68
+  created () {
69
+  },
70
+  mounted () {
71
+    this.$nextTick(() => {
72
+    })
73
+  },
74
+  methods: {
75
+    ...mapUserActions([
76
+    ]),
77
+    ...mapUserMutations([
78
+    ]),
79
+    Init () {
80
+    },
81
+    OnRefresh (e) {
82
+      this.IsPull = true
83
+      window.setTimeout(() => {
84
+        this.IsPull = false
85
+      }, 1000)
86
+    }
87
+  }
88
+}
89
+</script>
90
+
91
+<style lang="scss">
92
+@import "page.scss";
93
+</style>

+ 53
- 0
src/pages/Mine/MyBodyCheck/page.scss Voir le fichier

@@ -0,0 +1,53 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .UserInfo {
7
+    // background: #f4c819;
8
+    background: #fff;
9
+    position: relative;
10
+    overflow: hidden;
11
+    padding: 20px 30px;
12
+    > view {
13
+      align-items: center;
14
+      flex-wrap: wrap;
15
+      > view {
16
+        min-width: 35%;
17
+        > text {
18
+          font-size: 28px;
19
+          line-height: 48px;
20
+          margin-right: 10px;
21
+          white-space: nowrap;
22
+          overflow: hidden;
23
+          text-overflow: ellipsis;
24
+        }
25
+      }
26
+    }
27
+  }
28
+  > .flex-item {
29
+    position: relative;
30
+    overflow: hidden;
31
+    > view {
32
+      width: 100%;
33
+      position: absolute;
34
+      left: 0;
35
+      top: 0;
36
+      bottom: 0;
37
+      overflow: hidden;
38
+      .Content {
39
+        position: relative;
40
+        overflow: hidden;
41
+        > .ListItem {
42
+          position: relative;
43
+          overflow: hidden;
44
+          margin-bottom: 30px;
45
+          background: #fff;
46
+          &:first-child {
47
+            margin-top: 30px;
48
+          }
49
+        }
50
+      }
51
+    }
52
+  }
53
+}

+ 4
- 0
src/pages/Mine/MyCollected/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '我的收藏'
4
+}

+ 102
- 0
src/pages/Mine/MyCollected/index.vue Voir le fichier

@@ -0,0 +1,102 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" @scrolltolower="Infinite" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
5
+        <view class="Content">
6
+          <view class="ListItem" v-for="(item, index) in PageList" :key="index">
7
+            <BookItem :Data="item"></BookItem>
8
+          </view>
9
+        </view>
10
+        <PageBottom></PageBottom>
11
+      </scroll-view>
12
+    </MainPage>
13
+  </view>
14
+</template>
15
+
16
+<script>
17
+import MainPage from '../../../components/MainPage'
18
+import BookItem from '../../../components/BookItem'
19
+import PageBottom from '../../../components/PageBottom'
20
+import { createNamespacedHelpers } from 'vuex'
21
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
22
+export default {
23
+  name: 'MyCollected',
24
+  data () {
25
+    return {
26
+      IsInfinite: false,
27
+      IsPull: false,
28
+      PageList: [],
29
+      PageData: {
30
+        pageSize: 10,
31
+        pageNum: 1
32
+      },
33
+      HasNextPage: true,
34
+      DataLock: false
35
+    }
36
+  },
37
+  computed: {
38
+    ...mapUserState({
39
+      UserInfo: x => x.UserInfo // 用户信息
40
+    })
41
+  },
42
+  components: {
43
+    MainPage,
44
+    BookItem,
45
+    PageBottom
46
+  },
47
+  created () {
48
+  },
49
+  mounted () {
50
+    this.$nextTick(() => {
51
+    })
52
+  },
53
+  methods: {
54
+    ...mapUserActions([
55
+      'GetMySavedArticleList'
56
+    ]),
57
+    ...mapUserMutations([
58
+    ]),
59
+    Init () {
60
+      if (this.UserInfo !== null && !this.DataLock) {
61
+        this.PageList = []
62
+        this.PageData.pageNum = 1
63
+        this.HasNextPage = true
64
+        this.ToGetPageList()
65
+      }
66
+    },
67
+    ToGetPageList () {
68
+      if (!this.DataLock && this.HasNextPage) {
69
+        this.DataLock = true
70
+        this.GetMySavedArticleList({ queryData: { ...this.PageData } }).then((res) => {
71
+          this.PageList = this.PageList.concat(res.data.data.records || [])
72
+          this.HasNextPage = res.data.data.current - 0 < res.data.data.pages - 0
73
+          this.DataLock = false
74
+          this.IsPull = false
75
+          this.IsInfinite = false
76
+        }).catch(() => {
77
+          this.DataLock = false
78
+          this.IsPull = false
79
+          this.IsInfinite = false
80
+        })
81
+      }
82
+    },
83
+    OnRefresh () {
84
+      this.IsPull = true
85
+      this.Init()
86
+    },
87
+    Infinite () {
88
+      if (this.HasNextPage && !this.IsInfinite && !this.DataLock) {
89
+        this.IsInfinite = true
90
+        this.PageData.pageNum += 1
91
+        this.ToGetPageList()
92
+      } else {
93
+        this.IsInfinite = false
94
+      }
95
+    }
96
+  }
97
+}
98
+</script>
99
+
100
+<style lang="scss">
101
+@import "page.scss";
102
+</style>

+ 21
- 0
src/pages/Mine/MyCollected/page.scss Voir le fichier

@@ -0,0 +1,21 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  .Content {
7
+    position: relative;
8
+    overflow: hidden;
9
+    padding: 0 30px;
10
+    > .ListItem {
11
+      position: relative;
12
+      overflow: hidden;
13
+      border-top: 2px solid #eee;
14
+      padding-top: 30px;
15
+      margin-bottom: 30px;
16
+      &:first-child {
17
+        border-top: none;
18
+      }
19
+    }
20
+  }
21
+}

+ 4
- 0
src/pages/Mine/MyDoctorVisit/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '我的就诊'
4
+}

+ 102
- 0
src/pages/Mine/MyDoctorVisit/index.vue Voir le fichier

@@ -0,0 +1,102 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" @scrolltolower="Infinite" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
5
+        <view class="Content">
6
+          <view class="ListItem" v-for="(item, index) in PageList" :key="index">
7
+            <BodyCheckItem :Data="item"></BodyCheckItem>
8
+          </view>
9
+        </view>
10
+        <PageBottom></PageBottom>
11
+      </scroll-view>
12
+    </MainPage>
13
+  </view>
14
+</template>
15
+
16
+<script>
17
+import MainPage from '../../../components/MainPage'
18
+import BodyCheckItem from '../../../components/BodyCheckItem'
19
+import PageBottom from '../../../components/PageBottom'
20
+import { createNamespacedHelpers } from 'vuex'
21
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
22
+export default {
23
+  name: 'MyDoctorVisit',
24
+  data () {
25
+    return {
26
+      IsInfinite: false,
27
+      IsPull: false,
28
+      PageList: [],
29
+      PageData: {
30
+        pageSize: 10,
31
+        pageNum: 1
32
+      },
33
+      HasNextPage: true,
34
+      DataLock: false
35
+    }
36
+  },
37
+  computed: {
38
+    ...mapUserState({
39
+      UserInfo: x => x.UserInfo // 用户信息
40
+    })
41
+  },
42
+  components: {
43
+    MainPage,
44
+    BodyCheckItem,
45
+    PageBottom
46
+  },
47
+  created () {
48
+  },
49
+  mounted () {
50
+    this.$nextTick(() => {
51
+    })
52
+  },
53
+  methods: {
54
+    ...mapUserActions([
55
+      'GetMyMedicalRecords'
56
+    ]),
57
+    ...mapUserMutations([
58
+    ]),
59
+    Init () {
60
+      if (this.UserInfo !== null && !this.DataLock) {
61
+        this.PageList = []
62
+        this.PageData.pageNum = 1
63
+        this.HasNextPage = true
64
+        this.ToGetPageList()
65
+      }
66
+    },
67
+    ToGetPageList () {
68
+      if (!this.DataLock && this.HasNextPage) {
69
+        this.DataLock = true
70
+        this.GetMyMedicalRecords({ queryData: { ...this.PageData } }).then((res) => {
71
+          this.PageList = this.PageList.concat(res.data.data.records || [])
72
+          this.HasNextPage = res.data.data.current - 0 < res.data.data.pages - 0
73
+          this.DataLock = false
74
+          this.IsPull = false
75
+          this.IsInfinite = false
76
+        }).catch(() => {
77
+          this.DataLock = false
78
+          this.IsPull = false
79
+          this.IsInfinite = false
80
+        })
81
+      }
82
+    },
83
+    OnRefresh () {
84
+      this.IsPull = true
85
+      this.Init()
86
+    },
87
+    Infinite () {
88
+      if (this.HasNextPage && !this.IsInfinite && !this.DataLock) {
89
+        this.IsInfinite = true
90
+        this.PageData.pageNum += 1
91
+        this.ToGetPageList()
92
+      } else {
93
+        this.IsInfinite = false
94
+      }
95
+    }
96
+  }
97
+}
98
+</script>
99
+
100
+<style lang="scss">
101
+@import "page.scss";
102
+</style>

+ 19
- 0
src/pages/Mine/MyDoctorVisit/page.scss Voir le fichier

@@ -0,0 +1,19 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  .Content {
7
+    position: relative;
8
+    overflow: hidden;
9
+    > .ListItem {
10
+      position: relative;
11
+      overflow: hidden;
12
+      margin-bottom: 30px;
13
+      background: #fff;
14
+      &:first-child {
15
+        margin-top: 30px;
16
+      }
17
+    }
18
+  }
19
+}

+ 4
- 0
src/pages/Mine/MyInfo/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '基础信息'
4
+}

+ 170
- 0
src/pages/Mine/MyInfo/index.vue Voir le fichier

@@ -0,0 +1,170 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
5
+        <view class="Content" v-if="UserInfo !== null">
6
+          <view class="flex-h">
7
+            <view>头像</view>
8
+            <view class="flex-item">
9
+              <view class="UserIcon">
10
+                <image mode="aspectFill" :src="UserInfo.avatar" class="centerLabel"></image>
11
+              </view>
12
+            </view>
13
+          </view>
14
+          <view class="flex-h">
15
+            <view>昵称</view>
16
+            <view class="flex-item">
17
+              <text>{{UserInfo.nickName}}</text>
18
+              <!-- <input placeholder="请输入昵称" /> -->
19
+            </view>
20
+          </view>
21
+          <view class="flex-h">
22
+            <view>姓名</view>
23
+            <view class="flex-item">
24
+              <input placeholder="请输入姓名" v-model="Form.name" />
25
+              <!-- <input placeholder="请输入姓名" /> -->
26
+            </view>
27
+          </view>
28
+          <view class="flex-h">
29
+            <view>性别</view>
30
+            <view class="flex-item">
31
+              <!-- <text>{{Form.sex - 0 === 1 ? '男' : '女'}}</text> -->
32
+              <picker @change="SexChange" :value="SexIndex" :range="SexList" range-key="name">
33
+                <view class="picker" style="font-size: 14px">{{SexList[SexIndex].name}}</view>
34
+              </picker>
35
+            </view>
36
+          </view>
37
+          <view class="flex-h">
38
+            <view><text class="Point">*</text>手机号</view>
39
+            <view class="flex-item">
40
+              <input placeholder="请输入手机号" v-model="Form.phone" />
41
+            </view>
42
+          </view>
43
+          <view class="flex-h">
44
+            <view>邮箱</view>
45
+            <view class="flex-item">
46
+              <input placeholder="请输入邮箱" v-model="Form.email" />
47
+            </view>
48
+          </view>
49
+          <view class="flex-h">
50
+            <view><text class="Point">*</text>学校</view>
51
+            <view class="flex-item">
52
+              <input placeholder="请输入学校" v-model="Form.schoolName" />
53
+            </view>
54
+          </view>
55
+          <view class="flex-h">
56
+            <view>学届</view>
57
+            <view class="flex-item">
58
+              <input placeholder="请输入学届" v-model="Form.schoolBatch" />
59
+            </view>
60
+          </view>
61
+          <view class="flex-h">
62
+            <view><text class="Point">*</text>学号</view>
63
+            <view class="flex-item">
64
+              <input placeholder="请输入学号" v-model="Form.studentId" />
65
+            </view>
66
+          </view>
67
+          <view class="Save">
68
+            <view @tap="Save">保存</view>
69
+          </view>
70
+        </view>
71
+      </scroll-view>
72
+    </MainPage>
73
+  </view>
74
+</template>
75
+
76
+<script>
77
+import MainPage from '../../../components/MainPage'
78
+import { createNamespacedHelpers } from 'vuex'
79
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
80
+export default {
81
+  name: 'MyInfo',
82
+  data () {
83
+    return {
84
+      SexIndex: 0,
85
+      SexList: [
86
+        { id: 1, name: '男' },
87
+        { id: 2, name: '女' }
88
+      ],
89
+      IsPull: false,
90
+      DataLock: false,
91
+      Form: {
92
+        name: null,
93
+        personId: null,
94
+        sex: null,
95
+        phone: null,
96
+        email: null,
97
+        schoolName: null,
98
+        schoolBatch: null,
99
+        studentId: null
100
+      }
101
+    }
102
+  },
103
+  computed: {
104
+    ...mapUserState({
105
+      UserInfo: x => x.UserInfo // 用户信息
106
+    })
107
+  },
108
+  components: {
109
+    MainPage
110
+  },
111
+  created () {
112
+  },
113
+  mounted () {
114
+    this.$nextTick(() => {
115
+    })
116
+  },
117
+  methods: {
118
+    ...mapUserActions([
119
+      'PutUserInfo'
120
+    ]),
121
+    ...mapUserMutations([
122
+      'UpdateUserInfo'
123
+    ]),
124
+    Init () {
125
+      if (this.UserInfo !== null) {
126
+        for (let key in this.Form) {
127
+          this.Form[key] = this.UserInfo[key]
128
+        }
129
+      }
130
+    },
131
+    SexChange (e) {
132
+      this.SexIndex = e.detail.value - 0
133
+      this.Form.sex = this.SexList[e.detail.value - 0].id
134
+    },
135
+    Save () {
136
+      if (!this.DataLock) {
137
+        this.DataLock = true
138
+        let Data = {}
139
+        for (let key in this.Form) {
140
+          if (this.Form[key] !== null && this.Form[key] !== '') {
141
+            Data[key] = this.Form[key]
142
+          }
143
+        }
144
+        this.PutUserInfo({ data: { data: { ...Data } } }).then((res) => {
145
+          console.log(res.data.data)
146
+          this.UpdateUserInfo({ ...res.data.data })
147
+          wx.showToast({
148
+            title: '保存成功',
149
+            icon: 'none',
150
+            duration: 2000
151
+          })
152
+          this.DataLock = false
153
+        }).catch(() => {
154
+          this.DataLock = false
155
+        })
156
+      }
157
+    },
158
+    OnRefresh (e) {
159
+      this.IsPull = true
160
+      window.setTimeout(() => {
161
+        this.IsPull = false
162
+      }, 1000)
163
+    }
164
+  }
165
+}
166
+</script>
167
+
168
+<style lang="scss">
169
+@import "page.scss";
170
+</style>

+ 72
- 0
src/pages/Mine/MyInfo/page.scss Voir le fichier

@@ -0,0 +1,72 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  .Content {
7
+    position: relative;
8
+    overflow: hidden;
9
+    > view {
10
+      align-items: center;
11
+      background: #fff;
12
+      position: relative;
13
+      overflow: hidden;
14
+      border-top: 2px solid #f8f8f8;
15
+      padding: 0 30px;
16
+      &:first-child {
17
+        border-top: none;
18
+      }
19
+      > view {
20
+        &:first-child {
21
+          font-size: 28px;
22
+          line-height: 100px;
23
+          min-width: 120px;
24
+          > .Point {
25
+            color: #f4c819;
26
+            font-size: 28px;
27
+            line-height: 100px;
28
+          }
29
+        }
30
+        &.flex-item {
31
+          position: relative;
32
+          overflow: hidden;
33
+          text-align: right;
34
+          > input {
35
+            width: 100%;
36
+            display: block;
37
+            text-align: right;
38
+            font-size: 28px;
39
+          }
40
+          > text {
41
+            width: 100%;
42
+            display: block;
43
+            text-align: right;
44
+            font-size: 28px;
45
+          }
46
+          > .UserIcon {
47
+            width: 80px;
48
+            height: 80px;
49
+            display: inline-block;
50
+            position: relative;
51
+            overflow: hidden;
52
+            background: #eee;
53
+            border-radius: 100%;
54
+          }
55
+        }
56
+      }
57
+      &.Save {
58
+        background: none;
59
+        margin-top: 80px;
60
+        margin-bottom: 80px;
61
+        > view {
62
+          width: 100%;
63
+          text-align: center;
64
+          line-height: 80px;
65
+          color: #333;
66
+          border-radius: 6px;
67
+          background: #f4c819;
68
+        }
69
+      }
70
+    }
71
+  }
72
+}

+ 4
- 0
src/pages/Mine/MyReaded/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '我的阅读'
4
+}

+ 102
- 0
src/pages/Mine/MyReaded/index.vue Voir le fichier

@@ -0,0 +1,102 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" @scrolltolower="Infinite" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
5
+        <view class="Content">
6
+          <view class="ListItem" v-for="(item, index) in PageList" :key="index">
7
+            <ReadedItem :Data="item"></ReadedItem>
8
+          </view>
9
+        </view>
10
+        <PageBottom></PageBottom>
11
+      </scroll-view>
12
+    </MainPage>
13
+  </view>
14
+</template>
15
+
16
+<script>
17
+import MainPage from '../../../components/MainPage'
18
+import ReadedItem from '../../../components/ReadedItem'
19
+import PageBottom from '../../../components/PageBottom'
20
+import { createNamespacedHelpers } from 'vuex'
21
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
22
+export default {
23
+  name: 'MyReaded',
24
+  data () {
25
+    return {
26
+      IsInfinite: false,
27
+      IsPull: false,
28
+      PageList: [],
29
+      PageData: {
30
+        pageSize: 10,
31
+        pageNum: 1
32
+      },
33
+      HasNextPage: true,
34
+      DataLock: false
35
+    }
36
+  },
37
+  computed: {
38
+    ...mapUserState({
39
+      UserInfo: x => x.UserInfo // 用户信息
40
+    })
41
+  },
42
+  components: {
43
+    MainPage,
44
+    ReadedItem,
45
+    PageBottom
46
+  },
47
+  created () {
48
+  },
49
+  mounted () {
50
+    this.$nextTick(() => {
51
+    })
52
+  },
53
+  methods: {
54
+    ...mapUserActions([
55
+      'GetMyReadRecords'
56
+    ]),
57
+    ...mapUserMutations([
58
+    ]),
59
+    Init () {
60
+      if (this.UserInfo !== null && !this.DataLock) {
61
+        this.PageList = []
62
+        this.PageData.pageNum = 1
63
+        this.HasNextPage = true
64
+        this.ToGetPageList()
65
+      }
66
+    },
67
+    ToGetPageList () {
68
+      if (!this.DataLock && this.HasNextPage) {
69
+        this.DataLock = true
70
+        this.GetMyReadRecords({ queryData: { ...this.PageData } }).then((res) => {
71
+          this.PageList = this.PageList.concat(res.data.data.records || [])
72
+          this.HasNextPage = res.data.data.current - 0 < res.data.data.pages - 0
73
+          this.DataLock = false
74
+          this.IsPull = false
75
+          this.IsInfinite = false
76
+        }).catch(() => {
77
+          this.DataLock = false
78
+          this.IsPull = false
79
+          this.IsInfinite = false
80
+        })
81
+      }
82
+    },
83
+    OnRefresh () {
84
+      this.IsPull = true
85
+      this.Init()
86
+    },
87
+    Infinite () {
88
+      if (this.HasNextPage && !this.IsInfinite && !this.DataLock) {
89
+        this.IsInfinite = true
90
+        this.PageData.pageNum += 1
91
+        this.ToGetPageList()
92
+      } else {
93
+        this.IsInfinite = false
94
+      }
95
+    }
96
+  }
97
+}
98
+</script>
99
+
100
+<style lang="scss">
101
+@import "page.scss";
102
+</style>

+ 21
- 0
src/pages/Mine/MyReaded/page.scss Voir le fichier

@@ -0,0 +1,21 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  .Content {
7
+    position: relative;
8
+    overflow: hidden;
9
+    padding: 0 30px;
10
+    > .ListItem {
11
+      position: relative;
12
+      overflow: hidden;
13
+      border-top: 2px solid #eee;
14
+      padding-top: 30px;
15
+      margin-bottom: 30px;
16
+      &:first-child {
17
+        border-top: none;
18
+      }
19
+    }
20
+  }
21
+}

+ 4
- 0
src/pages/Mine/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  navigationStyle: 'custom',
3
+  // navigationBarTextStyle: 'white'
4
+}

+ 124
- 0
src/pages/Mine/index.vue Voir le fichier

@@ -0,0 +1,124 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" :refresher-triggered="IsPull" refresher-background="#f4c819" refresher-default-style="white">
5
+        <view class="Content">
6
+
7
+          <!-- 头部 -->
8
+          <view class="TopContainer">
9
+            <view class="UserIcon">
10
+              <image mode="aspectFill" :src="UserInfo.avatar" class="centerLabel"></image>
11
+            </view>
12
+            <view class="UserName">{{UserInfo.nickName || '-'}}</view>
13
+            <view class="UserNo">学号:{{UserInfo.studentId || '-'}}</view>
14
+          </view>
15
+
16
+          <!-- 信息卡 -->
17
+          <view class="UserInfoCard">
18
+            <view>
19
+              <view class="School flex-h">
20
+                <text>学校:</text>
21
+                <text class="flex-item">{{UserInfo.schoolName || '-'}}</text>
22
+                <navigator url="/pages/Mine/MyInfo/index" hover-class="none">
23
+                  <text>完善信息</text>
24
+                  <text class="iconfont iconjiantouright"></text>
25
+                </navigator>
26
+              </view>
27
+              <view class="OtherInfo flex-h">
28
+                <view>
29
+                  <view class="flex-h">
30
+                    <text>专业:</text>
31
+                    <text class="flex-item">{{UserInfo.specialtyName || '-'}}</text>
32
+                  </view>
33
+                  <view class="flex-h">
34
+                    <text>手机号:</text>
35
+                    <text class="flex-item">{{UserInfo.phone || '-'}}</text>
36
+                  </view>
37
+                  <view class="flex-h">
38
+                    <text>学届:</text>
39
+                    <text class="flex-item">{{UserInfo.schoolBatch}}</text>
40
+                  </view>
41
+                </view>
42
+                <view class="flex-item">
43
+                  <text>积分</text>
44
+                  <text>{{UserInfo.personData ? UserInfo.personData.pointNum : '-'}}</text>
45
+                </view>
46
+              </view>
47
+            </view>
48
+          </view>
49
+
50
+          <!-- 用户选项 -->
51
+          <view class="UserOption">
52
+            <navigator v-for="(item, index) in UserOption" :key="index" class="flex-h" :url="item.url" hover-class="none">
53
+              <view class="flex-h">
54
+                <text class="iconfont" :class="item.icon"></text>
55
+                <text class="flex-item">{{item.name}}</text>
56
+                <text class="iconfont iconjiantouright"></text>
57
+              </view>
58
+            </navigator>
59
+          </view>
60
+
61
+        </view>
62
+      </scroll-view>
63
+    </MainPage>
64
+  </view>
65
+</template>
66
+
67
+<script>
68
+import MainPage from '../../components/MainPage'
69
+import { createNamespacedHelpers } from 'vuex'
70
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
71
+export default {
72
+  name: 'Mine',
73
+  data () {
74
+    return {
75
+      IsPull: false,
76
+      UserOption: [
77
+        { name: '我的收藏', icon: 'iconshoucang', url: '/pages/Mine/MyCollected/index' },
78
+        { name: '我的阅读', icon: 'iconyuedu', url: '/pages/Mine/MyReaded/index' },
79
+        { name: '我的就诊', icon: 'iconjiuzhen', url: '/pages/Mine/MyDoctorVisit/index' },
80
+        { name: '我的体检', icon: 'icontijian', url: '/pages/Mine/MyBodyCheck/index' },
81
+        { name: '基础信息', icon: 'iconjichuxinxi', url: '/pages/Mine/MyInfo/index' }
82
+      ]
83
+    }
84
+  },
85
+  computed: {
86
+    ...mapUserState({
87
+      UserInfo: x => x.UserInfo // 用户信息
88
+    })
89
+  },
90
+  components: {
91
+    MainPage
92
+  },
93
+  created () {
94
+  },
95
+  mounted () {
96
+    this.$nextTick(() => {
97
+    })
98
+  },
99
+  methods: {
100
+    ...mapUserActions([
101
+      'GetCurrentPersonInfo'
102
+    ]),
103
+    ...mapUserMutations([
104
+    ]),
105
+    Init () {
106
+      console.log(111)
107
+      if (this.UserInfo !== null) {
108
+        console.log(222)
109
+        this.GetCurrentPersonInfo()
110
+      }
111
+    },
112
+    OnRefresh (e) {
113
+      this.IsPull = true
114
+      window.setTimeout(() => {
115
+        this.IsPull = false
116
+      }, 1000)
117
+    }
118
+  }
119
+}
120
+</script>
121
+
122
+<style lang="scss">
123
+@import "page.scss";
124
+</style>

+ 172
- 0
src/pages/Mine/page.scss Voir le fichier

@@ -0,0 +1,172 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  .Content {
7
+    position: relative;
8
+    overflow: hidden;
9
+    min-height: 100vh;
10
+    > .TopContainer {
11
+      width: 100%;
12
+      position: relative;
13
+      height: 260px;
14
+      background: #f4c819;
15
+      overflow: visible;
16
+      > .UserIcon {
17
+        width: 200px;
18
+        height: 200px;
19
+        border-radius: 100%;
20
+        position: absolute;
21
+        overflow: hidden;
22
+        background: #eee;
23
+        left: 50%;
24
+        transform: translateX(-50%);
25
+        -webkit-transform: translateX(-50%);
26
+        bottom: -100px;
27
+        > image {
28
+          width: 100%;
29
+          height: 100%;
30
+        }
31
+      }
32
+      > .UserName {
33
+        font-size: 32px;
34
+        font-weight: bold;
35
+        line-height: 60px;
36
+        color: #000;
37
+        width: calc(((100% - 200px) / 2) - 20px);
38
+        position: absolute;
39
+        left: 0;
40
+        bottom: 10px;
41
+        white-space: nowrap;
42
+        overflow: hidden;
43
+        text-overflow: ellipsis;
44
+        text-indent: 30px;
45
+      }
46
+      > .UserNo {
47
+        font-size: 28px;
48
+        line-height: 40px;
49
+        color: #666;
50
+        width: calc(((100% - 200px) / 2) - 20px);
51
+        position: absolute;
52
+        right: 30px;
53
+        bottom: -60px;
54
+        white-space: nowrap;
55
+        overflow: hidden;
56
+        text-overflow: ellipsis;
57
+        text-align: right;
58
+      }
59
+    }
60
+    > .UserInfoCard {
61
+      position: relative;
62
+      overflow: visible;
63
+      padding: 0 30px;
64
+      margin-top: 140px;
65
+      > view {
66
+        position: relative;
67
+        overflow: hidden;
68
+        border-radius: 16px;
69
+        background: #fff;
70
+        padding: 20px 30px;
71
+        box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.05);
72
+        > .School {
73
+          align-items: center;
74
+          > text {
75
+            font-size: 28px;
76
+            color: #666;
77
+            line-height: 60px;
78
+            white-space: nowrap;
79
+            overflow: hidden;
80
+            text-overflow: ellipsis;
81
+            &:first-child {
82
+              margin-left: 0;
83
+              min-width: 120px;
84
+            }
85
+          }
86
+          > navigator {
87
+            font-size: 0;
88
+            white-space: nowrap;
89
+            margin-left: 20px;
90
+            > text {
91
+              display: inline-block;
92
+              vertical-align: middle;
93
+              font-size: 28px;
94
+              line-height: 60px;
95
+              color: #f4c819;
96
+            }
97
+          }
98
+        }
99
+        > .OtherInfo {
100
+          align-items: flex-start;
101
+          > view {
102
+            &:first-child {
103
+              flex: 2;
104
+              -webkit-box-flex: 2;
105
+              margin-right: 20px;
106
+            }
107
+            > text {
108
+              display: block;
109
+              font-size: 52px;
110
+              font-weight: bold;
111
+              color: #000;
112
+              line-height: 60px;
113
+              &:first-child {
114
+                font-size: 28px;
115
+                font-weight: normal;
116
+                color: #666;
117
+              }
118
+            }
119
+            > view {
120
+              align-items: center;
121
+              > text {
122
+                font-size: 28px;
123
+                color: #666;
124
+                line-height: 60px;
125
+                white-space: nowrap;
126
+                overflow: hidden;
127
+                text-overflow: ellipsis;
128
+                &:first-child {
129
+                  min-width: 120px;
130
+                }
131
+              }
132
+            }
133
+          }
134
+        }
135
+      }
136
+    }
137
+    > .UserOption {
138
+      position: relative;
139
+      overflow: hidden;
140
+      margin-top: 60px;
141
+      > navigator {
142
+        position: relative;
143
+        overflow: hidden;
144
+        padding-left: 30px;
145
+        display: block;
146
+        &:first-child {
147
+          > view {
148
+            border-top: none;
149
+          }
150
+        }
151
+        > view {
152
+          align-items: center;
153
+          border-top: 2px solid #eee;
154
+          > text {
155
+            font-size: 28px;
156
+            color: #333;
157
+            line-height: 100px;
158
+            &:nth-child(1) {
159
+              font-size: 50px;
160
+              margin-right: 20px;
161
+            }
162
+            &:nth-child(3) {
163
+              margin-left: 20px;
164
+              font-size: 40px;
165
+              margin-right: 30px;
166
+            }
167
+          }
168
+        }
169
+      }
170
+    }
171
+  }
172
+}

+ 4
- 0
src/pages/Study/GoodsDetail/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '商品详情'
4
+}

+ 96
- 0
src/pages/Study/GoodsDetail/index.vue Voir le fichier

@@ -0,0 +1,96 @@
1
+<template>
2
+  <view class="page flex-v">
3
+    <view class="flex-item">
4
+      <view>
5
+        <scroll-view scroll-y="true" style="height: 100%;" :refresher-enabled="true" @refresherrefresh="OnRefresh" :refresher-triggered="IsPull" refresher-background="none" refresher-default-style="black">
6
+          <view class="Content">
7
+
8
+            <!-- banner -->
9
+            <view class="BannerSwiper">
10
+              <view>
11
+                <swiper :autoplay="true" :circular="true" :indicator-dots="true" indicator-color="rgba(0,0,0,0.4)" indicator-active-color="rgba(255,255,255,0.8)">
12
+                  <swiper-item class="SwiperItem" v-for="(item, index) in BannerList" :key="index">
13
+                    <view class="BannerItem">
14
+                      <image mode="aspectFill" :src="item.img"></image>
15
+                    </view>
16
+                  </swiper-item>
17
+                </swiper>
18
+              </view>
19
+            </view>
20
+
21
+            <!-- title -->
22
+            <view class="Title flex-h">
23
+              <view class="flex-item">商品名称</view>
24
+            </view>
25
+
26
+            <!-- 详情 -->
27
+            <view class="Detail">
28
+              <view class="Text">商品详情</view>
29
+              <image mode="widthFix" :src="TestImg"></image>
30
+            </view>
31
+
32
+          </view>
33
+        </scroll-view>
34
+      </view>
35
+    </view>
36
+    <view class="Bottom flex-h">
37
+      <view class="flex-item">
38
+        <view>¥3000</view>
39
+      </view>
40
+      <view class="Btn active" @tap="ToBuy">立即购买</view>
41
+    </view>
42
+  </view>
43
+</template>
44
+
45
+<script>
46
+import Taro from '@tarojs/taro'
47
+import { createNamespacedHelpers } from 'vuex'
48
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
49
+export default {
50
+  name: 'GoodsDetail',
51
+  data () {
52
+    return {
53
+      IsPull: false,
54
+      BannerList: [
55
+        { img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606120989360&di=8610f1678b51e26de6d4c6af39d1cf63&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2F201503%2F19%2F211608ztcq7higicydxhsy.jpg' },
56
+        { img: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606120989359&di=46ae1d0f0d4f1f3740139191398f2a81&imgtype=0&src=http%3A%2F%2Fpic.baike.soso.com%2Fp%2F20131230%2F20131230165604-1960511167.jpg' }
57
+      ],
58
+      TestImg: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606120989360&di=8610f1678b51e26de6d4c6af39d1cf63&imgtype=0&src=http%3A%2F%2Fattachments.gfan.com%2Fforum%2F201503%2F19%2F211608ztcq7higicydxhsy.jpg'
59
+    }
60
+  },
61
+  computed: {
62
+    ...mapUserState({
63
+      UserInfo: x => x.UserInfo // 用户信息
64
+    })
65
+  },
66
+  components: {
67
+  },
68
+  created () {
69
+  },
70
+  mounted () {
71
+    this.$nextTick(() => {
72
+    })
73
+  },
74
+  methods: {
75
+    ...mapUserActions([
76
+    ]),
77
+    ...mapUserMutations([
78
+    ]),
79
+    Init () {
80
+    },
81
+    ToBuy () {
82
+      Taro.navigateTo({ url: `/pages/Index/SubmitOrder/index?order=123` })
83
+    },
84
+    OnRefresh (e) {
85
+      this.IsPull = true
86
+      window.setTimeout(() => {
87
+        this.IsPull = false
88
+      }, 1000)
89
+    }
90
+  }
91
+}
92
+</script>
93
+
94
+<style lang="scss">
95
+@import "page.scss";
96
+</style>

+ 108
- 0
src/pages/Study/GoodsDetail/page.scss Voir le fichier

@@ -0,0 +1,108 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .flex-item {
7
+    position: relative;
8
+    overflow: hidden;
9
+    > view {
10
+      width: 100%;
11
+      position: absolute;
12
+      left: 0;
13
+      top: 0;
14
+      bottom: 0;
15
+      overflow: hidden;
16
+      .Content {
17
+        position: relative;
18
+        overflow: hidden;
19
+        > .BannerSwiper {
20
+          width: 100%;
21
+          padding-bottom: 56.25%;
22
+          position: relative;
23
+          overflow: hidden;
24
+          height: 0;
25
+          > view {
26
+            width: 100%;
27
+            position: absolute;
28
+            left: 0;
29
+            top: 0;
30
+            bottom: 0;
31
+            overflow: hidden;
32
+            > swiper {
33
+              width: 100%;
34
+              height: 100%;
35
+            }
36
+            .BannerItem {
37
+              width: 100%;
38
+              height: 100%;
39
+              position: relative;
40
+              overflow: hidden;
41
+              > image {
42
+                width: 100%;
43
+                height: 100%;
44
+              }
45
+            }
46
+          }
47
+        }
48
+        > .Title {
49
+          padding: 0 30px;
50
+          background: #fff;
51
+          position: relative;
52
+          overflow: hidden;
53
+          > view {
54
+            font-size: 32px;
55
+            font-weight: bold;
56
+            color: #333;
57
+            line-height: 40px;
58
+            padding: 20px 0;
59
+          }
60
+        }
61
+        > .Detail {
62
+          position: relative;
63
+          overflow: hidden;
64
+          margin-top: 30px;
65
+          background: #fff;
66
+          > .Text {
67
+            padding: 0 30px;
68
+            font-size: 28px;
69
+            line-height: 80px;
70
+            border-bottom: 2px solid #eee;
71
+          }
72
+          > image {
73
+            width: 100%;
74
+            height: auto;
75
+            display: block;
76
+          }
77
+        }
78
+      }
79
+    }
80
+  }
81
+  > .Bottom {
82
+    background: #fff;
83
+    border-top: 2px solid #eee;
84
+    > .flex-item {
85
+      padding: 0 30px;
86
+      > view {
87
+        font-size: 32px;
88
+        color: #e00f3a;
89
+        font-weight: bold;
90
+        line-height: 84px;
91
+        white-space: nowrap;
92
+        overflow: hidden;
93
+        text-overflow: ellipsis;
94
+      }
95
+    }
96
+    > .Btn {
97
+      width: 200px;
98
+      text-align: center;
99
+      font-size: 28px;
100
+      color: #fff;
101
+      background: #ccc;
102
+      line-height: 84px;
103
+      &.active {
104
+        background: #e00f3a;
105
+      }
106
+    }
107
+  }
108
+}

+ 4
- 0
src/pages/Study/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  // navigationStyle: 'custom',
3
+  navigationBarTitleText: '学习天地'
4
+}

+ 141
- 0
src/pages/Study/index.vue Voir le fichier

@@ -0,0 +1,141 @@
1
+<template>
2
+  <view class="page">
3
+    <MainPage @UserInfoChange="Init">
4
+      <view class="page flex-v">
5
+
6
+        <!-- 搜索 -->
7
+        <view class="Search">
8
+          <view class="flex-h">
9
+            <text class="iconfont iconsousuo"></text>
10
+            <view class="flex-item">
11
+              <navigator url="/pages/Index/Search/index" hover-class="none">搜索你感兴趣的内容</navigator>
12
+            </view>
13
+          </view>
14
+        </view>
15
+
16
+        <!-- 内容 -->
17
+        <view class="flex-item">
18
+          <view class="flex-h">
19
+
20
+            <!-- 左侧菜单 -->
21
+            <view class="LeftMenu">
22
+              <scroll-view :scroll-y="true" :enhanced="true" :show-scrollbar="false" style="height: 100%;">
23
+                <view v-for="(item, index) in MenuList" :key="index" class="MenuItem" :class="{'active': item.typeId === CurrentMenuId}" @tap="CutMenu(item)">{{item.name}}</view>
24
+              </scroll-view>
25
+            </view>
26
+
27
+            <!-- 右侧内容 -->
28
+            <view class="RightContent flex-item">
29
+              <view>
30
+                <scroll-view :scroll-y="true" :enhanced="true" :show-scrollbar="false" style="height: 100%;" @scrolltolower="Infinite">
31
+                  <view class="BookList">
32
+                    <view v-for="(item, index) in PageList" :key="index">
33
+                      <BookItem :Data="item"></BookItem>
34
+                    </view>
35
+                  </view>
36
+                </scroll-view>
37
+              </view>
38
+            </view>
39
+
40
+          </view>
41
+        </view>
42
+      </view>
43
+    </MainPage>
44
+  </view>
45
+</template>
46
+
47
+<script>
48
+import MainPage from '../../components/MainPage'
49
+import BookItem from '../../components/BookItem'
50
+import { createNamespacedHelpers } from 'vuex'
51
+const { mapState: mapUserState, mapActions: mapUserActions, mapMutations: mapUserMutations } = createNamespacedHelpers('user')
52
+const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
53
+export default {
54
+  name: 'Study',
55
+  data () {
56
+    return {
57
+      IsInfinite: false,
58
+      DataLock: false,
59
+      CurrentMenuId: null,
60
+      MenuList: [],
61
+      PageData: {
62
+        pageNum: 1,
63
+        pageSize: 10
64
+      },
65
+      PageList: [],
66
+      HasNextPage: true
67
+    }
68
+  },
69
+  computed: {
70
+    ...mapUserState({
71
+      UserInfo: x => x.UserInfo // 用户信息
72
+    })
73
+  },
74
+  components: {
75
+    MainPage,
76
+    BookItem
77
+  },
78
+  created () {
79
+  },
80
+  mounted () {
81
+    this.$nextTick(() => {
82
+    })
83
+  },
84
+  methods: {
85
+    ...mapIndexActions([
86
+      'GetSearchArticleList'
87
+    ]),
88
+    ...mapUserActions([
89
+      'GetArticleTypeList'
90
+    ]),
91
+    ...mapUserMutations([
92
+    ]),
93
+    Init () {
94
+      if (this.UserInfo !== null) {
95
+        this.MenuList = []
96
+        this.GetArticleTypeList({ pageNum: 1, pageSize: 1000, status: 1 }).then((res) => {
97
+          this.MenuList = res.data.data.records || []
98
+          if (this.MenuList.length) {
99
+            this.CurrentMenuId = this.MenuList[0].typeId
100
+            this.ToGetPageList()
101
+          }
102
+        })
103
+      }
104
+    },
105
+    ToGetPageList () {
106
+      if (!this.DataLock && this.HasNextPage) {
107
+        this.DataLock = true
108
+        this.GetSearchArticleList({ queryData: { ...this.PageData, status: 1, typeId: this.CurrentMenuId } }).then((res) => {
109
+          this.HasNextPage = res.data.data.current - 0 < res.data.data.pages - 0
110
+          this.PageList = this.PageList.concat(res.data.data.records || [])
111
+          this.DataLock = false
112
+        }).then((res) => {
113
+          this.DataLock = false
114
+        })
115
+      }
116
+    },
117
+    CutMenu (item) {
118
+      if (!this.DataLock) {
119
+        this.PageData.pageNum = 1
120
+        this.HasNextPage = true
121
+        this.PageList = []
122
+        this.CurrentMenuId = item.typeId
123
+        this.ToGetPageList()
124
+      }
125
+    },
126
+    Infinite () {
127
+      if (this.HasNextPage && !this.IsInfinite && !this.DataLock) {
128
+        this.IsInfinite = true
129
+        this.PageData.pageNum += 1
130
+        this.ToGetPageList()
131
+      } else {
132
+        this.IsInfinite = false
133
+      }
134
+    }
135
+  }
136
+}
137
+</script>
138
+
139
+<style lang="scss">
140
+@import "page.scss";
141
+</style>

+ 96
- 0
src/pages/Study/page.scss Voir le fichier

@@ -0,0 +1,96 @@
1
+.page {
2
+  width: 100%;
3
+  height: 100%;
4
+  overflow: hidden;
5
+  background: #f8f8f8;
6
+  > .Search {
7
+    position: relative;
8
+    overflow: hidden;
9
+    background: #f4c819;
10
+    padding: 20px 30px;
11
+    > view {
12
+      position: relative;
13
+      overflow: hidden;
14
+      background: #fff;
15
+      border-radius: 6px;
16
+      align-items: center;
17
+      > text {
18
+        font-size: 32px;
19
+        color: #333;
20
+        margin-left: 20px;
21
+        margin-right: 10px;
22
+      }
23
+      > view {
24
+        > navigator {
25
+          display: block;
26
+          width: 100%;
27
+          font-size: 28px;
28
+          line-height: 60px;
29
+          color: #999;
30
+        }
31
+      }
32
+    }
33
+  }
34
+  > .flex-item {
35
+    position: relative;
36
+    overflow: hidden;
37
+    > view {
38
+      position: absolute;
39
+      width: 100%;
40
+      left: 0;
41
+      top: 0;
42
+      bottom: 0;
43
+      overflow: hidden;
44
+      > .LeftMenu {
45
+        width: 200px;
46
+        background: #e7e7e7;
47
+        position: relative;
48
+        .MenuItem {
49
+          width: 100%;
50
+          font-size: 32px;
51
+          line-height: 100px;
52
+          text-align: center;
53
+          position: relative;
54
+          overflow: hidden;
55
+          &:first-child {
56
+            margin-top: 20px;
57
+          }
58
+          &.active {
59
+            background: #f8f8f8;
60
+            color: #f4c819;
61
+            &::after {
62
+              content: "";
63
+              width: 10px;
64
+              height: 100%;
65
+              position: absolute;
66
+              left: 0;
67
+              top: 0;
68
+              background: #f4c819;
69
+            }
70
+          }
71
+        }
72
+      }
73
+      > .RightContent {
74
+        position: relative;
75
+        overflow: hidden;
76
+        > view {
77
+          width: 100%;
78
+          position: absolute;
79
+          left: 0;
80
+          top: 0;
81
+          bottom: 0;
82
+          overflow: hidden;
83
+          .BookList {
84
+            padding: 0 30px;
85
+            > view {
86
+              position: relative;
87
+              overflow: hidden;
88
+              border-bottom: 2px solid #eee;
89
+              padding: 30px 0;
90
+            }
91
+          }
92
+        }
93
+      }
94
+    }
95
+  }
96
+}

+ 33
- 0
src/store.js Voir le fichier

@@ -0,0 +1,33 @@
1
+import Vue from 'vue'
2
+import Vuex from 'vuex'
3
+
4
+Vue.use(Vuex)
5
+
6
+const state = {
7
+  numbers: [1, 2, 3]
8
+}
9
+
10
+const mutations = {
11
+  ADD_NUMBER(state, payload) {
12
+    state.numbers.push(payload)
13
+  }
14
+}
15
+
16
+const actions = {
17
+  addNumber(context, number) {
18
+    context.commit('ADD_NUMBER', number)
19
+  }
20
+}
21
+
22
+const getters = {
23
+  getNumbers(state) {
24
+    return state.numbers
25
+  }
26
+}
27
+
28
+export default new Vuex.Store({
29
+  state,
30
+  mutations,
31
+  actions,
32
+  getters
33
+})

+ 26
- 0
src/store/index.js Voir le fichier

@@ -0,0 +1,26 @@
1
+import Vue from 'vue'
2
+import Vuex from 'vuex'
3
+import { storeAuthPlugin } from '@/util/auth-plugin'
4
+
5
+Vue.use(Vuex)
6
+
7
+const store = new Vuex.Store({
8
+  plugins: [storeAuthPlugin],
9
+  state: {
10
+  },
11
+  mutations: {
12
+  }
13
+})
14
+
15
+export const modules = {
16
+  user: () => require('./user/index').default,
17
+  index: () => require('./index/index').default
18
+}
19
+
20
+Object.keys(modules).forEach(modKey => {
21
+  const modNS = modKey.split('/')
22
+  const getMod = modules[modKey]
23
+  store.registerModule(...modNS, getMod())
24
+})
25
+
26
+export default store

+ 38
- 0
src/store/index/index.js Voir le fichier

@@ -0,0 +1,38 @@
1
+
2
+import Api from '../../util/Api/index'
3
+import ToolClass from '../../util/PublicMethod/index'
4
+
5
+export default {
6
+  namespaced: true,
7
+  state: {
8
+  },
9
+  mutations: {
10
+  },
11
+  actions: {
12
+    GetIndexBanner (context, payload) { // 获取首页banner
13
+      return new Promise((resolve, reject) => {
14
+        ToolClass.ToolRequest({ url: Api.GetIndexBanner.url, method: Api.GetIndexBanner.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
15
+      })
16
+    },
17
+    GetIndexHotList (context, payload) { // 获取首页热门列表
18
+      return new Promise((resolve, reject) => {
19
+        ToolClass.ToolRequest({ url: Api.GetIndexHotList.url, method: Api.GetIndexHotList.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
20
+      })
21
+    },
22
+    GetIndexNewestArticle (context, payload) { // 获取最新文章
23
+      return new Promise((resolve, reject) => {
24
+        ToolClass.ToolRequest({ url: Api.GetIndexNewestArticle.url, method: Api.GetIndexNewestArticle.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
25
+      })
26
+    },
27
+    GetSearchArticleList (context, payload) { // 获取搜索文章列表
28
+      return new Promise((resolve, reject) => {
29
+        ToolClass.ToolRequest({ url: Api.GetSearchArticleList.url, method: Api.GetSearchArticleList.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
30
+      })
31
+    },
32
+    PostArticleAnswer (context, payload) { // 提交答题结果
33
+      return new Promise((resolve, reject) => {
34
+        ToolClass.ToolRequest({ url: Api.PostArticleAnswer.url, method: Api.PostArticleAnswer.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
35
+      })
36
+    }
37
+  }
38
+}

+ 78
- 0
src/store/user/index.js Voir le fichier

@@ -0,0 +1,78 @@
1
+
2
+import Api from '../../util/Api/index'
3
+import ToolClass from '../../util/PublicMethod/index'
4
+
5
+export default {
6
+  namespaced: true,
7
+  state: {
8
+    UserInfo: null // 用户信息
9
+  },
10
+  mutations: {
11
+    EditUserInfo (state, data) { // 编辑用户信息
12
+      state.UserInfo = {
13
+        ...state.UserInfo || {},
14
+        [data.name]: data.value
15
+      }
16
+    },
17
+    UpdateUserInfo (state, data) {
18
+      state.UserInfo = { ...state.UserInfo, ...data }
19
+    }
20
+  },
21
+  actions: {
22
+    WxGetPhoneAuth (context, payload) { // 微信获取手机号
23
+      return new Promise((resolve, reject) => {
24
+        ToolClass.ToolRequest({ url: Api.WxGetPhoneAuth.url, method: Api.WxGetPhoneAuth.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
25
+      })
26
+    },
27
+    WxLogin (context, payload) { // 微信登录
28
+      return new Promise((resolve, reject) => {
29
+        ToolClass.ToolRequest({ url: Api.WxLogin.url, method: Api.WxLogin.method, ...payload, success (res) { context.commit('UpdateUserInfo', { ...res.data.data.person, sessionKey: res.data.data.sessionKey }); resolve(res) }, error (res) { reject(res) } })
30
+      })
31
+    },
32
+    PutUserInfo (context, payload) { // 更新用户信息
33
+      return new Promise((resolve, reject) => {
34
+        ToolClass.ToolRequest({ url: Api.UpdateUserInfo.url, method: Api.UpdateUserInfo.method, ...payload, success (res) { context.commit('UpdateUserInfo', res.data.data.person); resolve(res) }, error (res) { reject(res) } })
35
+      })
36
+    },
37
+    GetCurrentPersonInfo (context, payload) { // 获取当前人员信息
38
+      return new Promise((resolve, reject) => {
39
+        ToolClass.ToolRequest({ url: Api.GetCurrentPersonInfo.url, method: Api.GetCurrentPersonInfo.method, ...payload, success (res) { context.commit('UpdateUserInfo', res.data.data); resolve(res) }, error (res) { reject(res) } })
40
+      })
41
+    },
42
+    GetArticleDetail (context, payload) { // 获取文章详情
43
+      return new Promise((resolve, reject) => {
44
+        ToolClass.ToolRequest({ url: Api.GetArticleDetail.url, method: Api.GetArticleDetail.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
45
+      })
46
+    },
47
+    SaveArticle (context, payload) { // 收藏文章
48
+      return new Promise((resolve, reject) => {
49
+        ToolClass.ToolRequest({ url: Api.SaveArticle.url, method: Api.SaveArticle.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
50
+      })
51
+    },
52
+    DeleteSaveArticle (context, payload) { // 取消收藏文章
53
+      return new Promise((resolve, reject) => {
54
+        ToolClass.ToolRequest({ url: Api.DeleteSaveArticle.url, method: Api.DeleteSaveArticle.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
55
+      })
56
+    },
57
+    GetMySavedArticleList (context, payload) { // 获取我的收藏文章列表
58
+      return new Promise((resolve, reject) => {
59
+        ToolClass.ToolRequest({ url: Api.GetMySavedArticleList.url, method: Api.GetMySavedArticleList.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
60
+      })
61
+    },
62
+    GetMyReadRecords (context, payload) { // 获取我的阅读记录
63
+      return new Promise((resolve, reject) => {
64
+        ToolClass.ToolRequest({ url: Api.GetMyReadRecords.url, method: Api.GetMyReadRecords.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
65
+      })
66
+    },
67
+    GetMyMedicalRecords (context, payload) { // 获取我的就诊记录
68
+      return new Promise((resolve, reject) => {
69
+        ToolClass.ToolRequest({ url: Api.GetMyMedicalRecords.url, method: Api.GetMyMedicalRecords.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
70
+      })
71
+    },
72
+    GetArticleTypeList (context, payload) { // 获取文章分类
73
+      return new Promise((resolve, reject) => {
74
+        ToolClass.ToolRequest({ url: Api.GetArticleTypeList.url, method: Api.GetArticleTypeList.method, ...payload, success (res) { resolve(res) }, error (res) { reject(res) } })
75
+      })
76
+    }
77
+  }
78
+}

+ 290
- 0
src/towxml/config.js Voir le fichier

@@ -0,0 +1,290 @@
1
+module.exports = {
2
+    // LaTex公式、yuml解析服务架设参见 https://github.com/sbfkcel/markdown-server
3
+
4
+    // // 数学公式解析API
5
+    // latex:{
6
+    //     api:'http://towxml.vvadd.com/?tex'
7
+    // },
8
+
9
+    // // yuml图解析APPI
10
+    // yuml:{
11
+    //     api:'http://towxml.vvadd.com/?yuml'
12
+    // },
13
+
14
+    // markdown解析配置,保留需要的选项即可
15
+    markdown:[
16
+        'sub',                      // 下标支持
17
+        'sup',                      // 上标支持
18
+        'ins',                      // 文本删除线支持
19
+        'mark',                     // 文本高亮支持
20
+        'emoji',                    // emoji表情支持
21
+        'todo'                      // todo支持
22
+    ],
23
+
24
+    // 代码高亮配置,保留需要的选项即可(尽量越少越好,不要随意调整顺序。部分高亮有顺序依赖)
25
+    highlight:[
26
+        // 'c-like',
27
+        // 'c',
28
+        // 'bash',
29
+        // 'css',
30
+        // 'dart',
31
+        // 'go',
32
+        // 'java',
33
+        // 'javascript',
34
+        // 'json',
35
+        // 'less',
36
+        // 'scss',
37
+        // 'shell',
38
+        // 'xml',
39
+        // 'htmlbars',
40
+        // 'nginx',
41
+        // 'php',
42
+        // 'python',
43
+        // 'python-repl',
44
+        // 'typescript',
45
+        
46
+        // 'csharp',
47
+        // 'http',
48
+        // 'swift',
49
+        // 'yaml',
50
+        // 'markdown',
51
+        // 'powershell',
52
+        // 'ruby',
53
+        // 'makefile',
54
+        // 'lua',
55
+        // 'stylus',
56
+        // 'basic',
57
+        // '1c',
58
+        // 'abnf',
59
+        // 'accesslog',
60
+        // 'actionscript',
61
+        // 'ada',
62
+        // 'angelscript',
63
+        // 'apache',
64
+        // 'applescript',
65
+        // 'arcade',
66
+        // 'cpp',
67
+        // 'arduino',
68
+        // 'armasm',
69
+        // 'asciidoc',
70
+        // 'aspectj',
71
+        // 'autohotkey',
72
+        // 'autoit',
73
+        // 'avrasm',
74
+        // 'awk',
75
+        // 'axapta',
76
+        // 'bnf',
77
+        // 'brainfuck',
78
+        // 'cal',
79
+        // 'capnproto',
80
+        // 'ceylon',
81
+        // 'clean',
82
+        // 'clojure-repl',
83
+        // 'clojure',
84
+        // 'cmake',
85
+        // 'coffeescript',
86
+        // 'coq',
87
+        // 'cos',
88
+        // 'crmsh',
89
+        // 'crystal',
90
+        // 'csp',
91
+        // 'd',
92
+        // 'delphi',
93
+        // 'diff',
94
+        // 'django',
95
+        // 'dns',
96
+        // 'dockerfile',
97
+        // 'dos',
98
+        // 'dsconfig',
99
+        // 'dts',
100
+        // 'dust',
101
+        // 'ebnf',
102
+        // 'elixir',
103
+        // 'elm',
104
+        // 'erb',
105
+        // 'erlang-repl',
106
+        // 'erlang',
107
+        // 'excel',
108
+        // 'fix',
109
+        // 'flix',
110
+        // 'fortran',
111
+        // 'fsharp',
112
+        // 'gams',
113
+        // 'gauss',
114
+        // 'gcode',
115
+        // 'gherkin',
116
+        // 'glsl',
117
+        // 'gml',
118
+        // 'golo',
119
+        // 'gradle',
120
+        // 'groovy',
121
+        // 'haml',
122
+        // 'handlebars',
123
+        // 'haskell',
124
+        // 'haxe',
125
+        // 'hsp',
126
+        // 'hy',
127
+        // 'inform7',
128
+        // 'ini',
129
+        // 'irpf90',
130
+        // 'isbl',
131
+        // 'jboss-cli',
132
+        // 'julia-repl',
133
+        // 'julia',
134
+        // 'kotlin',
135
+        // 'lasso',
136
+        // 'latex',
137
+        // 'ldif',
138
+        // 'leaf',
139
+        // 'lisp',
140
+        // 'livecodeserver',
141
+        // 'livescript',
142
+        // 'llvm',
143
+        // 'lsl',
144
+        // 'mathematica',
145
+        // 'matlab',
146
+        // 'maxima',
147
+        // 'mel',
148
+        // 'mercury',
149
+        // 'mipsasm',
150
+        // 'mizar',
151
+        // 'mojolicious',
152
+        // 'monkey',
153
+        // 'moonscript',
154
+        // 'n1ql',
155
+        // 'nim',
156
+        // 'nix',
157
+        // 'nsis',
158
+        // 'objectivec',
159
+        // 'ocaml',
160
+        // 'openscad',
161
+        // 'oxygene',
162
+        // 'parser3',
163
+        // 'perl',
164
+        // 'pf',
165
+        // 'pgsql',
166
+        // 'php-template',
167
+        // 'plaintext',
168
+        // 'pony',
169
+        // 'processing',
170
+        // 'profile',
171
+        // 'prolog',
172
+        // 'properties',
173
+        // 'protobuf',
174
+        // 'puppet',
175
+        // 'purebasic',
176
+        // 'q',
177
+        // 'qml',
178
+        // 'r',
179
+        // 'reasonml',
180
+        // 'rib',
181
+        // 'roboconf',
182
+        // 'routeros',
183
+        // 'rsl',
184
+        // 'ruleslanguage',
185
+        // 'rust',
186
+        // 'sas',
187
+        // 'scala',
188
+        // 'scheme',
189
+        // 'scilab',
190
+        // 'smali',
191
+        // 'smalltalk',
192
+        // 'sml',
193
+        // 'sqf',
194
+        // 'sql',
195
+        // 'stan',
196
+        // 'stata',
197
+        // 'step21',
198
+        // 'subunit',
199
+        // 'taggerscript',
200
+        // 'tap',
201
+        // 'tcl',
202
+        // 'thrift',
203
+        // 'tp',
204
+        // 'twig',
205
+        // 'vala',
206
+        // 'vbnet',
207
+        // 'vbscript-html',
208
+        // 'vbscript',
209
+        // 'verilog',
210
+        // 'vhdl',
211
+        // 'vim',
212
+        // 'x86asm',
213
+        // 'xl',
214
+        // 'xquery',
215
+        // 'zephir'
216
+    ],
217
+
218
+    // wxml原生标签,该系列标签将不会被转换
219
+    wxml:[
220
+        'view',
221
+        'video',
222
+        'text',
223
+        'image',
224
+        'navigator',
225
+        'swiper',
226
+        'swiper-item',
227
+        'block',
228
+        'form',
229
+        'input',
230
+        'textarea',
231
+        'button',
232
+        'checkbox-group',
233
+        'checkbox',
234
+        'radio-group',
235
+        'radio',
236
+
237
+        // 可以解析的标签(html或markdown中会很少使用)
238
+        // 'canvas',
239
+        // 'map',
240
+        // 'slider',
241
+        // 'scroll-view',
242
+        // 'movable-area',
243
+        // 'movable-view',
244
+        // 'progress',
245
+        // 'label',
246
+        // 'switch',
247
+        // 'picker',
248
+        // 'picker-view',
249
+        // 'switch',
250
+        // 'contact-button'
251
+    ],
252
+
253
+    // 自定义组件
254
+    components:[
255
+        // 'audio-player',             // 音频组件,建议保留,由于小程序原生audio存在诸多问题,towxml解决了原生音频播放器的相关问题
256
+        // 'echarts',                  // echarts图表支持
257
+        // 'latex',                    // 数学公式支持
258
+        'table',                    // 表格支持
259
+        'todogroup',                // todo支持
260
+        // 'yuml',                     // yuml图表支持
261
+        'img'                       // 图片解析组件
262
+    ],
263
+
264
+    // 保留原本的元素属性(建议不要变动)
265
+    attrs:[
266
+        'class',
267
+        'data',
268
+        'id',
269
+        'style'
270
+    ],
271
+
272
+    // 事件绑定方式(catch或bind),catch 会阻止事件向上冒泡。更多请参考:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/event.html
273
+    bindType:'catch',
274
+
275
+    // 需要激活的事件
276
+    events:[
277
+        // 'touchstart',
278
+        // 'touchmove',
279
+        // 'touchcancel',
280
+        // 'touchend',
281
+        'tap',                      // 用于元素的点击事件
282
+        'change',                   // 用于todoList的change事件
283
+    ],
284
+
285
+    // 图片倍数
286
+    dpr:1,
287
+
288
+    // 代码块显示行号
289
+    showLineNumber:true
290
+}

+ 26
- 0
src/towxml/decode.js Voir le fichier

@@ -0,0 +1,26 @@
1
+const config = require('./config');
2
+
3
+Component({
4
+	options: {
5
+		styleIsolation: 'apply-shared'
6
+	},
7
+	properties: {
8
+		nodes: {
9
+			type: Object,
10
+			value: {}
11
+		}
12
+	},
13
+	lifetimes: {
14
+		attached: function () {
15
+			const _ts = this;
16
+
17
+			config.events.forEach(item => {
18
+				_ts['_' + item] = function (...arg) {
19
+					if (global._events && typeof global._events[item] === 'function') {
20
+						global._events[item](...arg);
21
+					}
22
+				};
23
+			});
24
+		}
25
+	}
26
+})

+ 9
- 0
src/towxml/decode.json Voir le fichier

@@ -0,0 +1,9 @@
1
+{
2
+  "component": true,
3
+  "usingComponents": {
4
+    "decode": "/towxml/decode",
5
+    "table": "/towxml/table/table",
6
+    "todogroup": "/towxml/todogroup/todogroup",
7
+    "img": "/towxml/img/img"
8
+  }
9
+}

+ 1
- 0
src/towxml/decode.wxml Voir le fichier

@@ -0,0 +1 @@
1
+<block wx:for="{{nodes.child}}" wx:for-index="i" wx:for-item="item" wx:key="i"><block wx:if="{{item.tag===undefined}}">{{item.text}}</block><view wx:if="{{item.tag==='view'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></view><video wx:if="{{item.tag==='video'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" poster="{{item.attr.poster}}" src="{{item.attr.src}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></video><text wx:if="{{item.tag==='text'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></text><image wx:if="{{item.tag==='image'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" src="{{item.attr.src}}" mode="{{item.attr.mode ? item.attr.mode : 'widthFix'}}" lazy-load="{{item.attr['lazy-load']}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></image><navigator wx:if="{{item.tag==='navigator'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" url="{{item.attr.href}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></navigator><swiper wx:if="{{item.tag==='swiper'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></swiper><swiper-item wx:if="{{item.tag==='swiper-item'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></swiper-item><block wx:if="{{item.tag==='block'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></block><form wx:if="{{item.tag==='form'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></form><input wx:if="{{item.tag==='input'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></input><textarea wx:if="{{item.tag==='textarea'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></textarea><button wx:if="{{item.tag==='button'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></button><checkbox-group wx:if="{{item.tag==='checkbox-group'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" catch:change="_change" bindchange="{{item.attr.bindchange}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></checkbox-group><checkbox wx:if="{{item.tag==='checkbox'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" checked="{{item.attr.checked}}" value="{{item.attr.value}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></checkbox><radio-group wx:if="{{item.tag==='radio-group'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap"><decode wx:if="{{item.child}}" nodes="{{item}}"/></radio-group><radio wx:if="{{item.tag==='radio'}}" data-data="{{item}}" class="{{item.attr.class}}" data="{{item.attr.data}}" id="{{item.attr.id}}" style="{{item.attr.style}}" catch:tap="_tap" checked="{{item.attr.checked}}"><decode wx:if="{{item.child}}" nodes="{{item}}"/></radio><block wx:if="{{item.tag==='table'}}"><table data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='todogroup'}}"><todogroup data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block><block wx:if="{{item.tag==='img'}}"><img data="{{item}}" data-data="{{item}}" catch:tap="_tap"/></block></block>

+ 0
- 0
src/towxml/decode.wxss Voir le fichier


+ 98
- 0
src/towxml/img/img.js Voir le fichier

@@ -0,0 +1,98 @@
1
+const config = require('../config');
2
+Component({
3
+	options: {
4
+		styleIsolation: 'shared'
5
+	},
6
+	properties: {
7
+		data: {
8
+			type: Object,
9
+			value: {}
10
+		}
11
+	},
12
+	data: {
13
+		attr:{
14
+			src:'',
15
+			class:'',
16
+			style:''
17
+		},
18
+		size:{
19
+			w:0,
20
+			h:0
21
+		},
22
+		styleObj:{}
23
+	},
24
+	lifetimes:{
25
+		attached:function(){
26
+			const _ts = this;
27
+			let dataAttr = this.data.data.attr;
28
+
29
+			// 将图片大小处理到对象中
30
+			if(dataAttr.width){
31
+				_ts.data.size.w = +dataAttr.width / config.dpr;
32
+			};
33
+
34
+			if(dataAttr.height){
35
+				_ts.data.size.h = +dataAttr.height / config.dpr;
36
+			};
37
+
38
+			// 将样式合并到样式对象中
39
+			if(dataAttr.style){
40
+				let re = /;\s{0,}/ig;
41
+				dataAttr.style = dataAttr.style.replace(re,';');
42
+				dataAttr.style.split(';').forEach(item => {
43
+					let itemArr = item.split(':');
44
+					if(/^(width|height)$/i.test(itemArr[0])){
45
+						let num = parseInt(itemArr[1]) || 0,
46
+							key = '';
47
+						// itemArr[1] = num / config.dpr + itemArr[1].replace(num,'');
48
+						switch (itemArr[0].toLocaleLowerCase()) {
49
+							case 'width':
50
+								key = 'w';
51
+							break;
52
+							case 'height':
53
+								key = 'h';
54
+							break;
55
+						};
56
+						_ts.data.size[key] = num / config.dpr;
57
+					}else{
58
+						_ts.data.styleObj[itemArr[0]] = itemArr[1];
59
+					};
60
+				});
61
+			};
62
+
63
+			// 设置公式图片
64
+			_ts.setData({
65
+				attr:{
66
+					src:dataAttr.src,
67
+					class:dataAttr.class,
68
+					style:_ts.setStyle(_ts.data.styleObj)
69
+				},
70
+				size:_ts.data.size
71
+			});
72
+		}
73
+	},
74
+	methods: {
75
+		// 设置图片样式
76
+		setStyle:function(o){
77
+			let str = ``;
78
+			for(let key in o){
79
+				str += `${key}:${o[key]};`;
80
+			};
81
+			return str;
82
+		},
83
+
84
+		// 图片加载完成设置图片大小
85
+		load:function(e){
86
+			const _ts = this;
87
+
88
+			if(!_ts.data.size.w || !_ts.data.size.h){
89
+				_ts.setData({
90
+					size:{
91
+						w:e.detail.width / config.dpr,
92
+						h:e.detail.height / config.dpr
93
+					}
94
+				});
95
+			};
96
+		}
97
+	}
98
+})

+ 3
- 0
src/towxml/img/img.json Voir le fichier

@@ -0,0 +1,3 @@
1
+{
2
+  "component": true
3
+}

+ 1
- 0
src/towxml/img/img.wxml Voir le fichier

@@ -0,0 +1 @@
1
+<image class="{{attr.class}}" lazy-load="true" mode="{{attr.mode || 'widthFix'}}" src="{{attr.src}}" style="{{attr.style}} width:{{size.w}}px;height:{{size.h}}px;" bindload="load"></image>

+ 0
- 0
src/towxml/img/img.wxss Voir le fichier


+ 19
- 0
src/towxml/index.js Voir le fichier

@@ -0,0 +1,19 @@
1
+const md = require('./parse/markdown/index'),
2
+    parse = require('./parse/index')
3
+
4
+module.exports = (str,type,option)=>{
5
+    option = option || {};
6
+    let result;
7
+    switch (type) {
8
+        case 'markdown':
9
+            result = parse(md(str),option);
10
+        break;
11
+        case 'html':
12
+            result = parse(str,option);
13
+        break;
14
+        default:
15
+            throw new Error('Invalid type, only markdown and html are supported');
16
+        break;
17
+    };
18
+    return result;
19
+};

+ 107
- 0
src/towxml/parse/index.js Voir le fichier

@@ -0,0 +1,107 @@
1
+const parse2 = require('./parse2/index'),
2
+    // parse5 = require('./parse5/index').parse,
3
+    config = require('../config'),
4
+
5
+    // html与wxml转换关系
6
+    correspondTag = (()=>{
7
+        let result = {
8
+                a:'navigator',
9
+                todogroup:'checkbox-group',
10
+                audio:'audio-player'
11
+            };
12
+        
13
+        // // 该系列的标签都转换为text
14
+        // ['span','b','strong','i','em','code','sub','sup','g-emoji','mark','ins'].forEach(item => {
15
+        //     result[item] = 'text';
16
+        // });
17
+
18
+        // 该系列小程序原生tag,不需转换
19
+        [...config.wxml,...config.components].forEach(item => {
20
+            result[item] = item;
21
+        });
22
+        return result;
23
+    })(),
24
+
25
+    // 元素与html对应的wxml标签名
26
+    getWxmlTag = tagStr => !tagStr ? undefined : correspondTag[tagStr] || 'view',
27
+
28
+    // 精简数据,并初始化相关事件等
29
+    initObj = (obj,option)=>{
30
+        const result = {
31
+                theme:option.theme || 'light',
32
+                _e:{}
33
+            },
34
+            events = global._events = {},
35
+            base = option.base;
36
+
37
+        // 主题保存到全局
38
+        global._theme = result.theme;
39
+
40
+        // 事件添加到全局中,各个组件在触发事件时会从全局调用
41
+        if(option.events){
42
+            for(let key in option.events){
43
+                events[key] = option.events[key];
44
+            };
45
+        };
46
+
47
+        // 遍历原始数据,处理成能解析的数据
48
+        let eachFn;
49
+        (eachFn = (arr,obj,_e) => {
50
+            obj.child = obj.child || [];
51
+            _e.child = _e.child || [];
52
+
53
+            arr.forEach(item => {
54
+                if(item.type === 'comment'){
55
+                    return;
56
+                };
57
+                let o = {},
58
+                    e = {};
59
+                o.type = e.type = item.type;
60
+                o._e = e;
61
+                if(item.type === 'text'){
62
+                    o.text = e.text = item.data;
63
+                }else{
64
+                    o.tag = getWxmlTag(item.name);      // 转换之后的标签
65
+                    // o.tag = o.tag === 'text' ? 'view' : o.tag;
66
+                    e.tag = item.name;                  // 原始
67
+                    o.attr = item.attribs;
68
+                    e.attr = JSON.parse(JSON.stringify(item.attribs));
69
+
70
+                    o.attr.class = o.attr.class ? `h2w__${item.name} ${o.attr.class}` : `h2w__${item.name}`;
71
+
72
+                    // 处理资源相对路径
73
+                    if(base && o.attr.src){
74
+                        let src = o.attr.src;
75
+                        switch (src.indexOf('//')) {
76
+                            case 0:
77
+                                o.attr.src = `https:${src}`;
78
+                            break;
79
+                            case -1:
80
+                                o.attr.src = `${base}${src}`;
81
+                            break;
82
+                        };
83
+                    };
84
+
85
+                    if(item.children){
86
+                        eachFn(item.children,o,e);
87
+                    };
88
+                };
89
+                _e.child.push(e);
90
+                obj.child.push(o);
91
+            });
92
+        })(obj,result,result._e);
93
+        return result;
94
+    };
95
+
96
+module.exports = (str,option) => {
97
+    str = (()=>{
98
+        let re = /<body[^>]*>([\s\S]*)<\/body>/i;
99
+        if(re.test(str)){
100
+            let result = re.exec(str);
101
+            return result[1] || str;
102
+        }else{
103
+            return str;
104
+        };
105
+    })();
106
+    return initObj(parse2(str,{decodeEntities:true}),option);
107
+};

+ 55
- 0
src/towxml/parse/markdown/index.js Voir le fichier

@@ -0,0 +1,55 @@
1
+let hljs;
2
+// hljs = require('../highlight/index');
3
+
4
+const config = require('../../config'),
5
+    mdOption = (()=>{
6
+        let result = {
7
+            html: true,
8
+            xhtmlOut: true,
9
+            typographer: true,
10
+            breaks: true,
11
+        };
12
+
13
+        if(config.highlight.length && hljs){
14
+            result.highlight = (code,lang,callback)=>{
15
+                let lineLen = code.split(/\r|\n/ig).length,
16
+                    result = hljs.highlightAuto(code).value;
17
+
18
+                    result = result.replace(/\r|\n/g,'<br/>').replace(/ /g,'&nbsp;').replace(/\t/g,'&nbsp;&nbsp;&nbsp;&nbsp;');
19
+
20
+                if(config.showLineNumber){
21
+                    let lineStr = (()=>{
22
+                        let str = `<ul class="h2w__lineNum">`;
23
+                        for(let i=0;i<lineLen-1;i++){
24
+                            str += `<li class="h2w__lineNumLine">${i+1}</li>`
25
+                        };
26
+
27
+                        str += `</ul>`;
28
+                        return str;
29
+                    })();
30
+                    return lineStr + result;
31
+                };
32
+                return result;
33
+            }
34
+        };
35
+        return result;
36
+    })(),
37
+    md = require('./markdown')(mdOption);
38
+
39
+// 应用Markdown解析扩展,包括自定义组件(['sub','sup','ins','mark','emoji','todo','latex','yuml','echarts'])
40
+[...config.markdown,...config.components].forEach(item => {
41
+    if(!/^audio-player|table|todogroup|img$/.test(item)){
42
+        md.use(require(`./plugins/${item}`));
43
+    };
44
+});
45
+
46
+// 定义emoji渲染规则
47
+md.renderer.rules.emoji = (token,index)=>{
48
+    let item = token[index];
49
+    return `<g-emoji class="h2w__emoji h2w__emoji--${item.markup}">${item.content}</g-emoji>`;
50
+};
51
+
52
+// 导出模块
53
+module.exports = str => {
54
+    return md.render(str);
55
+};

+ 4
- 0
src/towxml/parse/markdown/markdown.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 2
- 0
src/towxml/parse/markdown/plugins/emoji.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 1
- 0
src/towxml/parse/markdown/plugins/ins.js Voir le fichier

@@ -0,0 +1 @@
1
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.markdownitIns=e()}}(function(){return function e(n,t,o){function r(s,f){if(!t[s]){if(!n[s]){var u="function"==typeof require&&require;if(!f&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=t[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return r(t?t:e)},p,p.exports,e,n,t,o)}return t[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,n,t){"use strict";n.exports=function(e){function n(e,n){var t,o,r,i,s,f=e.pos,u=e.src.charCodeAt(f);if(n)return!1;if(43!==u)return!1;if(o=e.scanDelims(e.pos,!0),i=o.length,s=String.fromCharCode(u),2>i)return!1;for(i%2&&(r=e.push("text","",0),r.content=s,i--),t=0;i>t;t+=2)r=e.push("text","",0),r.content=s+s,e.delimiters.push({marker:u,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function t(e){var n,t,o,r,i,s=[],f=e.delimiters,u=e.delimiters.length;for(n=0;u>n;n++)o=f[n],43===o.marker&&-1!==o.end&&(r=f[o.end],i=e.tokens[o.token],i.type="ins_open",i.tag="ins",i.nesting=1,i.markup="++",i.content="",i=e.tokens[r.token],i.type="ins_close",i.tag="ins",i.nesting=-1,i.markup="++",i.content="","text"===e.tokens[r.token-1].type&&"+"===e.tokens[r.token-1].content&&s.push(r.token-1));for(;s.length;){for(n=s.pop(),t=n+1;t<e.tokens.length&&"ins_close"===e.tokens[t].type;)t++;t--,n!==t&&(i=e.tokens[t],e.tokens[t]=e.tokens[n],e.tokens[n]=i)}}e.inline.ruler.before("emphasis","ins",n),e.inline.ruler2.before("emphasis","ins",t)}},{}]},{},[1])(1)});

+ 1
- 0
src/towxml/parse/markdown/plugins/mark.js Voir le fichier

@@ -0,0 +1 @@
1
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.markdownitMark=e()}}(function(){return function e(n,t,o){function r(s,f){if(!t[s]){if(!n[s]){var u="function"==typeof require&&require;if(!f&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=t[s]={exports:{}};n[s][0].call(p.exports,function(e){var t=n[s][1][e];return r(t?t:e)},p,p.exports,e,n,t,o)}return t[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,n,t){"use strict";n.exports=function(e){function n(e,n){var t,o,r,i,s,f=e.pos,u=e.src.charCodeAt(f);if(n)return!1;if(61!==u)return!1;if(o=e.scanDelims(e.pos,!0),i=o.length,s=String.fromCharCode(u),2>i)return!1;for(i%2&&(r=e.push("text","",0),r.content=s,i--),t=0;i>t;t+=2)r=e.push("text","",0),r.content=s+s,e.delimiters.push({marker:u,jump:t,token:e.tokens.length-1,level:e.level,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function t(e){var n,t,o,r,i,s=[],f=e.delimiters,u=e.delimiters.length;for(n=0;u>n;n++)o=f[n],61===o.marker&&-1!==o.end&&(r=f[o.end],i=e.tokens[o.token],i.type="mark_open",i.tag="mark",i.nesting=1,i.markup="==",i.content="",i=e.tokens[r.token],i.type="mark_close",i.tag="mark",i.nesting=-1,i.markup="==",i.content="","text"===e.tokens[r.token-1].type&&"="===e.tokens[r.token-1].content&&s.push(r.token-1));for(;s.length;){for(n=s.pop(),t=n+1;t<e.tokens.length&&"mark_close"===e.tokens[t].type;)t++;t--,n!==t&&(i=e.tokens[t],e.tokens[t]=e.tokens[n],e.tokens[n]=i)}}e.inline.ruler.before("emphasis","mark",n),e.inline.ruler2.before("emphasis","mark",t)}},{}]},{},[1])(1)});

+ 1
- 0
src/towxml/parse/markdown/plugins/sub.js Voir le fichier

@@ -0,0 +1 @@
1
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownitSub=e()}}(function(){return function e(r,o,n){function t(i,u){if(!o[i]){if(!r[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var a=o[i]={exports:{}};r[i][0].call(a.exports,function(e){var o=r[i][1][e];return t(o?o:e)},a,a.exports,e,r,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}({1:[function(e,r){"use strict";function o(e,r){var o,t,s,i=e.posMax,u=e.pos;if(126!==e.src.charCodeAt(u))return!1;if(r)return!1;if(u+2>=i)return!1;for(e.pos=u+1;e.pos<i;){if(126===e.src.charCodeAt(e.pos)){o=!0;break}e.md.inline.skipToken(e)}return o&&u+1!==e.pos?(t=e.src.slice(u+1,e.pos),t.match(/(^|[^\\])(\\\\)*\s/)?(e.pos=u,!1):(e.posMax=e.pos,e.pos=u+1,s=e.push("sub_open","sub",1),s.markup="~",s=e.push("text","",0),s.content=t.replace(n,"$1"),s=e.push("sub_close","sub",-1),s.markup="~",e.pos=e.posMax+1,e.posMax=i,!0)):(e.pos=u,!1)}var n=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;r.exports=function(e){e.inline.ruler.after("emphasis","sub",o)}},{}]},{},[1])(1)});

+ 0
- 0
src/towxml/parse/markdown/plugins/sup.js Voir le fichier


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff