瀏覽代碼

first commit

liyongli 1 年之前
當前提交
4f0f101b39
共有 84 個文件被更改,包括 2587 次插入0 次删除
  1. 31 0
      .eslintrc.js
  2. 15 0
      .gitignore
  3. 29 0
      api/guests.js
  4. 19 0
      api/index.js
  5. 96 0
      api/meet.js
  6. 54 0
      api/news.js
  7. 29 0
      api/partners.js
  8. 27 0
      api/phone.js
  9. 27 0
      api/seatNumber.js
  10. 51 0
      api/stroke.js
  11. 27 0
      api/video.js
  12. 8 0
      app.js
  13. 48 0
      app.json
  14. 13 0
      app.wxss
  15. 二進制
      assets/btn1.png
  16. 二進制
      assets/btn2.png
  17. 二進制
      assets/btn3.png
  18. 二進制
      assets/btn4.png
  19. 二進制
      assets/btn5.png
  20. 二進制
      assets/btn6.png
  21. 二進制
      assets/btn7.png
  22. 二進制
      assets/homeicon.png
  23. 二進制
      assets/homeicon_select.png
  24. 二進制
      assets/partners.png
  25. 二進制
      assets/partners_select.png
  26. 二進制
      assets/service.png
  27. 二進制
      assets/service_select.png
  28. 二進制
      assets/test.png
  29. 4 0
      config/index.js
  30. 15 0
      package.json
  31. 90 0
      pages/detail/stroke.js
  32. 6 0
      pages/detail/stroke.json
  33. 17 0
      pages/detail/stroke.wxml
  34. 46 0
      pages/detail/stroke.wxss
  35. 75 0
      pages/detail/textImage.js
  36. 3 0
      pages/detail/textImage.json
  37. 4 0
      pages/detail/textImage.wxml
  38. 8 0
      pages/detail/textImage.wxss
  39. 77 0
      pages/guests/index.js
  40. 7 0
      pages/guests/index.json
  41. 39 0
      pages/guests/index.wxml
  42. 47 0
      pages/guests/index.wxss
  43. 85 0
      pages/home/home.js
  44. 9 0
      pages/home/home.json
  45. 72 0
      pages/home/home.wxml
  46. 72 0
      pages/home/home.wxss
  47. 139 0
      pages/livePhone/index.js
  48. 9 0
      pages/livePhone/index.json
  49. 11 0
      pages/livePhone/index.wxml
  50. 16 0
      pages/livePhone/index.wxss
  51. 120 0
      pages/liveVideo/index.js
  52. 7 0
      pages/liveVideo/index.json
  53. 9 0
      pages/liveVideo/index.wxml
  54. 32 0
      pages/liveVideo/index.wxss
  55. 95 0
      pages/news/index.js
  56. 4 0
      pages/news/index.json
  57. 13 0
      pages/news/index.wxml
  58. 32 0
      pages/news/index.wxss
  59. 76 0
      pages/partners/index.js
  60. 7 0
      pages/partners/index.json
  61. 9 0
      pages/partners/index.wxml
  62. 37 0
      pages/partners/index.wxss
  63. 96 0
      pages/seatNumber/index.js
  64. 7 0
      pages/seatNumber/index.json
  65. 15 0
      pages/seatNumber/index.wxml
  66. 38 0
      pages/seatNumber/index.wxss
  67. 79 0
      pages/service/index.js
  68. 7 0
      pages/service/index.json
  69. 8 0
      pages/service/index.wxml
  70. 7 0
      pages/service/index.wxss
  71. 149 0
      pages/signUp/index.js
  72. 9 0
      pages/signUp/index.json
  73. 25 0
      pages/signUp/index.wxml
  74. 20 0
      pages/signUp/index.wxss
  75. 120 0
      pages/stroke/index.js
  76. 8 0
      pages/stroke/index.json
  77. 19 0
      pages/stroke/index.wxml
  78. 40 0
      pages/stroke/index.wxss
  79. 16 0
      pnpm-lock.yaml
  80. 28 0
      project.config.json
  81. 21 0
      project.private.config.json
  82. 7 0
      sitemap.json
  83. 33 0
      utils/req.js
  84. 69 0
      utils/util.js

+ 31 - 0
.eslintrc.js

@@ -0,0 +1,31 @@
+/*
+ * Eslint config file
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
+ * Install the Eslint extension before using this feature.
+ */
+module.exports = {
+  env: {
+    es6: true,
+    browser: true,
+    node: true,
+  },
+  ecmaFeatures: {
+    modules: true,
+  },
+  parserOptions: {
+    ecmaVersion: 2018,
+    sourceType: 'module',
+  },
+  globals: {
+    wx: true,
+    App: true,
+    Page: true,
+    getCurrentPages: true,
+    getApp: true,
+    Component: true,
+    requirePlugin: true,
+    requireMiniProgram: true,
+  },
+  // extends: 'eslint:recommended',
+  rules: {},
+}

+ 15 - 0
.gitignore

@@ -0,0 +1,15 @@
+node_modules
+miniprogram_npm
+
+
+# Log files
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 29 - 0
api/guests.js

@@ -0,0 +1,29 @@
+import {
+  req
+} from "../utils/req";
+import {
+  config
+} from "../config/index"
+// 获取图片列表
+function getGuests({type = 1, success}) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/guest/list/${config.meetID}?type=${type}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getGuests
+}

+ 19 - 0
api/index.js

@@ -0,0 +1,19 @@
+import phone from "./phone";
+import stroke from "./stroke";
+import video from "./video";
+import seatNumber from "./seatNumber";
+import guests from "./guests";
+import partners from "./partners";
+import news from "./news";
+import meet from "./meet";
+
+export default {
+  ...phone,
+  ...stroke,
+  ...video,
+  ...seatNumber,
+  ...guests,
+  ...partners,
+  ...news,
+  ...meet
+}

+ 96 - 0
api/meet.js

@@ -0,0 +1,96 @@
+import {
+  req
+} from "../utils/req";
+import {
+  config
+} from "../config/index"
+// 获取合作伙伴
+function getMeetDetail(data) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/conference/info/${config.meetID}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+// 获取会议信息
+function getMeetInfo(success) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/conf/type/service/${config.meetID}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+// 报名
+function postSignUp({data, success}) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/user-third/create?code=${data.code}`,
+      method: "POST",
+      data:{
+        ...data,
+        conferenceId: config.meetID
+      },
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+// 获取手机号
+function getPhone({success, code}) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/user-third/getPhone/${config.meetID}?code=${code}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+export default {
+  getMeetDetail,
+  getMeetInfo,
+  postSignUp,
+  getPhone
+}

+ 54 - 0
api/news.js

@@ -0,0 +1,54 @@
+import {
+  req
+} from "../utils/req";
+import {
+  config
+} from "../config/index"
+// 获取新闻列表
+function getNewList(data) {
+  return new Promise((resolve, reject) => {
+    let url = `/conference/news/list/${config.meetID}?page=${data.page || 1}&pageSize=${data.size || 10}`;
+    if (data.category) url += `&category=${data.category}`
+    req({
+      url,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+// 获取新闻详情
+function getNewDetail({
+  id,
+  success
+}) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/news/info/${id}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getNewList,
+  getNewDetail
+}

+ 29 - 0
api/partners.js

@@ -0,0 +1,29 @@
+import {
+  req
+} from "../utils/req";
+import {
+  config
+} from "../config/index"
+// 获取合作伙伴
+function getPartner(data) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/partner/list/${config.meetID}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getPartner
+}

+ 27 - 0
api/phone.js

@@ -0,0 +1,27 @@
+import {
+  req
+} from "../utils/req";
+
+// 获取图片列表
+function getLivePhone(data) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/live-photo/list/${data.id || ''}?page=${data.page || 1}&pageSize=${data.size || 10}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getLivePhone
+}

+ 27 - 0
api/seatNumber.js

@@ -0,0 +1,27 @@
+import {
+  req
+} from "../utils/req";
+
+// 获取座次图
+function getSeatImage(data) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/agenda/seat/info/${data.id || ''}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getSeatImage
+}

+ 51 - 0
api/stroke.js

@@ -0,0 +1,51 @@
+import {
+  req
+} from "../utils/req";
+import {
+  config
+} from "../config/index"
+
+// 获取日程
+function getStroke(success) {
+  return new Promise((resolve, reject)=>{
+    req({
+      url: `/conference/agenda/list/${config.meetID}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        success && success(res.data)
+        resolve(res.data)
+      }
+    })
+  });
+}
+
+// 获取议程
+function getStrokeList(params) {
+  return new Promise((resolve, reject)=>{
+    req({
+      url: `/conference/agenda-detail/list/${params.strokeID}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        params.success && params.success(res.data)
+        resolve(res.data)
+      }
+    })
+  });
+}
+
+export default {
+  getStroke,
+  getStrokeList
+}

+ 27 - 0
api/video.js

@@ -0,0 +1,27 @@
+import {
+  req
+} from "../utils/req";
+
+// 获取图片列表
+function getLiveVideo(data) {
+  return new Promise((resolve, reject) => {
+    req({
+      url: `/conference/live-video/list/${data.id || ''}?page=${data.page || 1}&pageSize=${data.size || 10}`,
+      success(res) {
+        if (res.code !== 0) {
+          wx.showToast({
+            title: res.message || "请稍后再试",
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data)
+        resolve(res.data);
+      }
+    });
+  })
+}
+
+export default {
+  getLiveVideo
+}

+ 8 - 0
app.js

@@ -0,0 +1,8 @@
+// app.js
+App({
+  onLaunch() {
+  },
+  globalData: {
+    systemInfo: wx.getSystemInfoSync(),
+  }
+})

+ 48 - 0
app.json

@@ -0,0 +1,48 @@
+{
+  "pages": [
+    "pages/home/home",
+    "pages/stroke/index",
+    "pages/livePhone/index",
+    "pages/liveVideo/index",
+    "pages/detail/textImage",
+    "pages/detail/stroke",
+    "pages/seatNumber/index",
+    "pages/guests/index",
+    "pages/partners/index",
+    "pages/service/index",
+    "pages/news/index",
+    "pages/signUp/index"
+  ],
+  "window": {
+    "navigationBarTextStyle": "black",
+    "navigationBarBackgroundColor": "#ffffff",
+    "onReachBottomDistance": 30
+  },
+  "componentFramework": "glass-easel",
+  "sitemapLocation": "sitemap.json",
+  "lazyCodeLoading": "requiredComponents",
+  "tabBar": {
+    "color": "#121212",
+    "selectedColor": "#3aa6b3",
+    "list": [
+      {
+        "pagePath": "pages/home/home",
+        "text": "首页",
+        "iconPath": "/assets/homeicon.png",
+        "selectedIconPath": "/assets/homeicon_select.png"
+      },
+      {
+        "pagePath": "pages/partners/index",
+        "text": "合作伙伴",
+        "iconPath": "/assets/partners.png",
+        "selectedIconPath": "/assets/partners_select.png"
+      },
+      {
+        "pagePath": "pages/service/index",
+        "text": "会议服务",
+        "iconPath": "/assets/service.png",
+        "selectedIconPath": "/assets/service_select.png"
+      }
+    ]
+  }
+}

+ 13 - 0
app.wxss

@@ -0,0 +1,13 @@
+/**app.wxss**/
+@import './miniprogram_npm/@vant/weapp/common/index.wxss';
+
+page{
+  --base-color: #ffffff;
+  --base-background-00: #ffffff00;
+  --base-background: linear-gradient(to right, #2a92bf, #41aaad 50%, #75c48c);
+
+  background: var(--base-background);
+  width: 750rpx;
+  overflow-y: auto;
+  box-sizing: border-box;
+}

二進制
assets/btn1.png


二進制
assets/btn2.png


二進制
assets/btn3.png


二進制
assets/btn4.png


二進制
assets/btn5.png


二進制
assets/btn6.png


二進制
assets/btn7.png


二進制
assets/homeicon.png


二進制
assets/homeicon_select.png


二進制
assets/partners.png


二進制
assets/partners_select.png


二進制
assets/service.png


二進制
assets/service_select.png


二進制
assets/test.png


+ 4 - 0
config/index.js

@@ -0,0 +1,4 @@
+export const config = {
+  base: "http://ssp-server.smcic.net",
+  meetID: 1066
+}

+ 15 - 0
package.json

@@ -0,0 +1,15 @@
+{
+  "name": "miniprogram-1",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "@vant/weapp": "^1.11.4"
+  }
+}

+ 90 - 0
pages/detail/stroke.js

@@ -0,0 +1,90 @@
+// pages/detail/stroke.js
+const {
+  globalData: {
+    systemInfo
+  }
+} = getApp();
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    steps: [],
+    cover: "",
+    agendavideo: ""
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    const {
+      agendavideo,
+      cover,
+      id
+    } = options;
+    this.id = id;
+    this.setData({
+      cover: decodeURIComponent(cover),
+      agendavideo: decodeURIComponent(agendavideo)
+    })
+    api.getStrokeList({
+      strokeID: this.id
+    }).then(r => {
+      this.setData({
+        steps: (r || [])
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 6 - 0
pages/detail/stroke.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "会议议程",
+  "usingComponents": {
+    "van-divider": "@vant/weapp/divider/index"
+  }
+}

+ 17 - 0
pages/detail/stroke.wxml

@@ -0,0 +1,17 @@
+<!--pages/detail/stroke.wxml-->
+<view class="stroke_detail">
+  <video style="{{'width: 750rpx;height: 422rpx;'}}" wx:if="{{agendavideo}}" src="{{agendavideo}}" poster="{{cover}}" />
+  <image style="{{'width: 750rpx;height: 422rpx;'}}" src="{{cover}}" wx:if="{{!agendavideo && cover}}" mode="scaleToFill"/>
+  <view class="stroke_item" wx:for="{{steps}}" wx:key="index">
+    <view class="stroke_line">
+      <view class="stroke_proint"></view>
+    </view>    
+    <view class="{{index !== 0 ? 'van-hairline--top' : ''}}" style="padding: 20rpx 0;">
+      <view class="title" wx:if="{{item.title}}">{{item.title}}</view>
+      <view class="time_start" wx:if="{{item.startTime}}">{{item.startTime}}</view>
+      <view class="time_end" wx:if="{{item.endTime}}">{{item.endTime}}</view>
+      <view class="jj" wx:if="{{item.speaker}}">{{item.speaker}}</view>
+      <view class="jj_detail" wx:if="{{item.speakerTags}}">{{item.speakerTags}}</view>
+    </view>
+  </view>
+</view>

+ 46 - 0
pages/detail/stroke.wxss

@@ -0,0 +1,46 @@
+/* pages/detail/stroke.wxss */
+.stroke_detail {
+  
+  height: 100vh;
+  box-sizing: border-box;
+  color: var(--base-color);
+  line-height: 1.8em;
+  overflow-y: auto;
+}
+
+.stroke_detail .van-step--vertical:after {
+  border: none;
+}
+
+.custom {
+  background-color: var(--base-background-00) !important;
+}
+
+
+.stroke_item {
+  min-height: 2em;
+  color: var(--base-color);
+  position: relative;
+  margin: 0 50rpx;
+  padding: 0 0 0 40rpx;
+  line-height: 1.5em;
+}
+
+.stroke_item .stroke_line {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  width: 3rpx;
+  left: 15rpx;
+  background-color: var(--base-color);
+  height: 100%;
+  padding-top: 1.2em;
+}
+
+.stroke_item .stroke_proint {
+  width: 10rpx;
+  height: 10rpx;
+  border-radius: 50%;
+  margin-left: -5rpx;
+  background-color: var(--base-color);
+}

+ 75 - 0
pages/detail/textImage.js

@@ -0,0 +1,75 @@
+// pages/detail/textImage.js
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    content: ''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getNewDetail({id: options.id}).then(r=>{
+      this.setData({
+        content: r.content
+      })
+      wx.setNavigationBarTitle({
+        title: r.title || ''
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 3 - 0
pages/detail/textImage.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 4 - 0
pages/detail/textImage.wxml

@@ -0,0 +1,4 @@
+<!--pages/detail/textImage.wxml-->
+<view class="textImage">
+<rich-text nodes="{{ content }}"></rich-text>
+</view>

+ 8 - 0
pages/detail/textImage.wxss

@@ -0,0 +1,8 @@
+/* pages/detail/textImage.wxss */
+.textImage {
+  
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+  color: var(--base-color)
+}

+ 77 - 0
pages/guests/index.js

@@ -0,0 +1,77 @@
+// pages/guests/index.js
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    guests_marster: [],
+    guests_participate_in: [],
+    guests_ordinary: []
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    Promise.all([api.getGuests({type: 1}),api.getGuests({type: 2}),api.getGuests({type: 3})]).then(list=>{
+      const [guests_marster, guests_participate_in, guests_ordinary] = list;
+      this.setData({
+        guests_marster: guests_marster || [],
+        guests_participate_in: guests_participate_in || [],
+        guests_ordinary: guests_ordinary || []
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 7 - 0
pages/guests/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "会议嘉宾",
+  "usingComponents": {
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index"
+  }
+}

+ 39 - 0
pages/guests/index.wxml

@@ -0,0 +1,39 @@
+<!--pages/guests/index.wxml-->
+<view class="guests">
+  <block wx:if="{{guests_marster.length}}">
+    <view class="guests_title">
+      主讲嘉宾
+    </view>
+    <swiper autoplay="{{true}}" circular="{{true}}" display-multiple-items="{{1.5}}" class="marster_phone" cache-extent="{{1}}" layout-type="stackLeft">
+      <block wx:for="{{guests_marster}}" wx:key="index">
+        <swiper-item>
+          <view class="m_phone_bg">
+            <image class="m_phone" src="{{item.photo}}" />
+            <view style="padding: 0 15rpx;" class="van-ellipsis">
+              {{item.userName}}
+            </view>
+            <view style="padding: 0 15rpx;" class="van-ellipsis">
+              {{item.tags}}
+            </view>
+          </view>
+        </swiper-item>
+      </block>
+    </swiper>
+  </block>
+  <block wx:if="{{guests_participate_in.length}}">
+    <view class="guests_title">
+      参会嘉宾
+    </view>
+    <van-cell-group inset>
+      <van-cell wx:for="{{guests_marster}}" wx:key="index" title="{{item.userName}}" label="{{item.tags}}" />
+    </van-cell-group>
+  </block>
+  <block wx:if="{{guests_ordinary.length}}">
+    <view class="guests_title">
+      参会嘉宾
+    </view>
+    <van-cell-group inset>
+      <van-cell wx:for="{{guests_ordinary}}" wx:key="index" title="{{item.userName}}" label="{{item.tags}}" />
+    </van-cell-group>
+  </block>
+</view>

+ 47 - 0
pages/guests/index.wxss

@@ -0,0 +1,47 @@
+/* pages/guests/index.wxss */
+.guests {
+  
+  color: var(--base-color);
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+  padding-top: 15rpx;
+}
+
+.guests_title {
+  line-height: 1.5em;
+  padding-left: 10rpx;
+  width: 5em;
+  border-left: 15rpx solid #6978ff;
+  margin-left: 30rpx;
+  margin-bottom: 15rpx;
+  margin-top: 15rpx;
+}
+
+.guests_title:first-child{
+  margin-top: 0;
+}
+
+.marster_phone {
+  display: block;
+  width: 750rpx;
+  height: 350rpx;
+}
+
+.m_phone{
+  width: 450rpx;
+  height: 253rpx;
+}
+
+.m_phone_bg {
+  display: block;
+  margin: 0 auto;
+  border-radius: 35rpx;
+  width: 450rpx;
+  height: 350rpx;
+  overflow: hidden;
+  background-color: var(--base-color);
+  position: relative;
+  color: #000;
+  font-size: 25rpx;
+}

+ 85 - 0
pages/home/home.js

@@ -0,0 +1,85 @@
+// pages/home/home.js
+import {
+  openFileFunc,
+  toNavigatePage
+} from "../../utils/util"
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    news: [],
+    meet: {}
+  },
+
+  openFile(e) {
+    const url = e.currentTarget.dataset.url || "";
+    const fileName = url.split("/").reverse()[0];
+    if (!url) return;
+    openFileFunc(url, fileName);
+  },
+
+  changeTab(e) {
+    wx.reLaunch({
+      url: e.currentTarget.dataset.url
+    })
+  },
+
+  toPage(e) {
+    toNavigatePage(e.currentTarget.dataset.url)
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    // console.log(__wxConfig)
+    Promise.all([api.getNewList({}), api.getMeetDetail({})]).then(list=>{
+      const meet  = list[1] || {};
+      meet.time = meet.startTime.split(" ")[0];
+      meet.sponsor = meet.sponsor.split(",");
+      meet.organizer = meet.organizer.split(",");
+      this.setData({
+        news: list[0].records || [],
+        meet: list[1] || {}
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {},
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {},
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+  onShareTimeline() {}
+})

+ 9 - 0
pages/home/home.json

@@ -0,0 +1,9 @@
+{
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "van-row": "@vant/weapp/row/index",
+    "van-col": "@vant/weapp/col/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-icon": "@vant/weapp/icon/index"
+  }
+}

+ 72 - 0
pages/home/home.wxml

@@ -0,0 +1,72 @@
+<!--pages/home/home.wxml-->
+<view class="home">
+  <view class="title">{{meet.conferenceName}}</view>
+  <view class="subtitle" style="margin-bottom: 38rpx;">互联互通 共同繁荣</view>
+  <view class="subtitle" wx:if="{{meet.time}}">{{meet.time}}</view>
+  <view class="subtitle" style="margin-bottom: 156rpx;" wx:if="{{meet.addr}}">{{meet.addr}}</view>
+  <image bindtap="openFile" data-url="https://cxzx.smcic.net/topic/tool/pdf/%E4%B8%89%E5%86%9C%E4%B8%AD%E5%BF%83%E4%BB%8B%E7%BB%8D.pdf" mode="scaleToFill" style="width: 710rpx;height: 220rpx;" class="card" src="../../assets/btn1.png" />
+
+
+  <view style="width: 710rpx;margin: 30rpx 0;padding: 0 20rpx">
+    <van-row gutter="5">
+      <van-col span="12">
+        <image bindtap="toPage" data-url="/pages/livePhone/index" mode="scaleToFill" style="width: 342rpx;height: 363rpx;" src="../../assets/btn2.png" />
+      </van-col>
+      <van-col span="12">
+        <image bindtap="toPage" data-url="/pages/stroke/index" mode="scaleToFill" style="width: 342rpx;height: 174rpx;" src="../../assets/btn3.png" />
+        <image bindtap="toPage" data-url="/pages/liveVideo/index" mode="scaleToFill" style="width: 342rpx;height: 174rpx;" src="../../assets/btn4.png" />
+      </van-col>
+    </van-row>
+  </view>
+  <view style="width: 710rpx;margin-bottom: 30rpx;padding: 0 20rpx">
+    <van-row gutter="5">
+      <van-col span="12">
+        <image bindtap="toPage" data-url="/pages/guests/index" mode="scaleToFill" style="width: 342rpx;height: 363rpx;" src="../../assets/btn5.png" />
+      </van-col>
+      <van-col span="12">
+        <image bindtap="toPage" data-url="/pages/signUp/index" mode="scaleToFill" style="width: 342rpx;height: 174rpx;" src="../../assets/btn6.png" />
+        <image bindtap="toPage" data-url="/pages/seatNumber/index" mode="scaleToFill" style="width: 342rpx;height: 174rpx;" src="../../assets/btn7.png" />
+      </van-col>
+    </van-row>
+  </view>
+
+  <!-- <view style="width: 710rpx;margin-bottom: 30rpx;padding: 0 20rpx">
+    <van-row>
+      <van-col span="12">
+        <van-button plain color="#149c50" hairline icon="share" open-type="share" round>转发分享</van-button>
+      </van-col>
+      <van-col span="12">
+        <van-button plain color="#149c50" hairline icon="photo" round>生成海报</van-button>
+      </van-col>
+    </van-row>
+  </view> -->
+
+  <view class="card_list">
+    <van-row>
+      <van-col span="12">
+        <view class="card_list_title">资讯论坛</view>
+      </van-col>
+      <van-col span="12" style="text-align: right;line-height: 65rpx;" bindtap="toPage" data-url="/pages/news/index">
+        查看更多
+        <van-icon name="arrow" />
+      </van-col>
+    </van-row>
+    <view class="item" wx:for="{{news}}" wx:key="index" style="margin-top: 37rpx;" bindtap="toPage" data-url="{{'/pages/detail/textImage?id=' + item.id }}">
+      <view class="item-title">
+        <view class="van-multi-ellipsis--l2">
+          {{item.title}}
+        </view>
+      </view>
+      <image wx:if="{{item.cover}}" src="{{item.cover}}" style="width: 187rpx;height: 150rpx;" />
+    </view>
+  </view>
+
+  <view class="tips" wx:if="{{meet.sponsor && meet.sponsor.length}}">
+    <view>主办单位</view>
+    <view wx:for="{{meet.sponsor}}" wx:key="index">{{item}}</view>
+  </view>
+  <view class="tips" wx:if="{{meet.organizer && meet.organizer.length}}">
+    <view>承办单位</view>
+    <view wx:for="{{meet.organizer}}" wx:key="index">{{item}}</view>
+  </view>
+</view>

+ 72 - 0
pages/home/home.wxss

@@ -0,0 +1,72 @@
+/* pages/home/home.wxss */
+.home {
+  
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+}
+
+.home {
+  padding-top: 182rpx;
+  text-align: center;
+  color: var(--base-color);
+}
+
+.title {
+  font-size: 42rpx;
+  line-height: 52rpx;
+  margin-bottom: 39rpx;
+}
+
+.subtitle {
+  line-height: 46.2rpx;
+  font-size: 36.2rpx;
+}
+
+.card {
+  border: 1rpx solid #8ad79b;
+  border-radius: 51rpx;
+  background-color: var(--base-color);
+}
+
+.card_list {
+  width: 711rpx;
+  margin: 0 auto;
+  margin-bottom: 75rpx;
+  text-align: left;
+  background-color: #d9feed;
+  border-radius: 28rpx;
+  color: #39aab0;
+  font-size: 35rpx;
+  font-weight: 500;
+  padding: 35rpx 32rpx;
+  box-sizing: border-box;
+}
+
+.card_list_title {
+  background-color: #3aa6b3;
+  display: inline-block;
+  color: var(--base-color);
+  padding: 15rpx 17rpx;
+  border-radius: 28rpx;
+}
+
+.item {
+  width: 100%;
+  overflow: hidden;
+}
+
+.item-title {
+  display: inline-block;
+  width: calc(100% - 200rpx);
+  padding-right: 10rpx;
+  min-height: 150rpx;
+  vertical-align: top;
+  overflow: hidden;
+}
+
+.tips{
+  text-align: center;
+  color: #e1c027;
+  margin-bottom: 42rpx;
+}

+ 139 - 0
pages/livePhone/index.js

@@ -0,0 +1,139 @@
+// pages/media/index.js
+import api from "../../api/index";
+const {
+  globalData: {
+    systemInfo
+  }
+} = getApp();
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    actMeet: '',
+    top: {
+      height: 0,
+      width: systemInfo.windowWidth
+    },
+    phone: {
+      width: (systemInfo.windowWidth - 20) / 3,
+      height: 0
+    },
+    tabs: [],
+    images: []
+  },
+  page: 1,
+  size: 10,
+  total: 0,
+  changeMeet(e) {
+    console.log(e.detail)
+  },
+  imageLoad(e) {
+    const {
+      width,
+      height
+    } = e.detail;
+    const image = e.currentTarget.dataset.image || 'top';
+    const p = {};
+    p[image] = {
+      ...this.data[image]
+    }
+    p[image].height = height / width * p[image].width
+    this.setData(p);
+  },
+  showImage(e) {
+    wx.previewMedia({
+      sources: this.data.images.map(v => {
+        return {
+          url: v.photo
+        }
+      }),
+      current: e.currentTarget.dataset.index
+    })
+  },
+
+  // 获取图片直播
+  getPhone(id) {
+    const {
+      page,
+      size
+    } = this;
+    api.getLivePhone({
+      page,
+      size,
+      id
+    }).then(res => {
+      console.log(res)
+      this.page += 1;
+      this.total = res.total;
+      this.setData({
+        images: res.records || []
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getStroke().then(strokeList => {
+      const item = strokeList[0] || {}
+      this.setData({
+        actMeet: item.id,
+        tabs: strokeList
+      })
+      this.getPhone(item.id);
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+    if( this.total <= this.data.images.length) return
+    this.getPhone(this.data.actMeet);
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 9 - 0
pages/livePhone/index.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "直播照片",
+  "usingComponents": {
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index",
+    "van-grid": "@vant/weapp/grid/index",
+    "van-grid-item": "@vant/weapp/grid-item/index"
+  }
+}

+ 11 - 0
pages/livePhone/index.wxml

@@ -0,0 +1,11 @@
+<!--pages/media/index.wxml-->
+<view class="media">
+  <image src="../../assets/test.png" style="{{'width:' + top.width + 'px;height:' + top.height + 'px'}}" bindload="imageLoad" data-width="{{top.width}}" data-image="top" mode="aspectFit" />
+
+  <van-tabs sticky="{{true}}" color="#ffffff" title-inactive-color="#cccccc" title-active-color="#ffffff" active="{{ actMeet }}" bind:change="changeMeet">
+    <van-tab wx:for="{{tabs}}" wx:key="index" title="{{item.agendaName}}" name="{{item.id + ''}}"></van-tab>
+  </van-tabs>
+  <view style="margin-top: 1em;text-align: center;padding-right: 5px;">
+    <image wx:for="{{images}}" wx:key="index" bindtap="showImage" data-index="{{index}}" src="{{item.photo}}" style="{{'width:' + phone.width + 'px;height:160rpx;margin-left:5px'}}" mode="aspectFit" />  
+  </view>
+</view>

+ 16 - 0
pages/livePhone/index.wxss

@@ -0,0 +1,16 @@
+/* pages/media/index.wxss */
+.media{
+  
+  box-sizing: border-box;
+  min-height: 100vh;
+  color: var(--base-color);
+  line-height: 1.8em;
+  overflow-y: auto;
+}
+
+.grid-class,
+.van-tabs__scroll {
+  background-color: var(--base-background-00)!important;
+  color: var(--base-color);
+  padding: 0;
+}

+ 120 - 0
pages/liveVideo/index.js

@@ -0,0 +1,120 @@
+// pages/liveVideo/index.js
+import api from "../../api/index";
+import {
+  config
+} from "../../config/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    videos: []
+  },
+  page: 1,
+  size: 10,
+  total: 0,
+
+  toPage(e) {
+    const item = this.data.videos[e.currentTarget.dataset.index]
+    if (item.type == 1) {
+      // 全屏放视频  木得办法  内容太少
+      wx.previewMedia({
+        sources: [{
+          url: item.video,
+          type: 'video',
+          poster: item.cover
+        }]
+      })
+      return
+    }
+    if (item.type == 2) { // 视频号视频 
+      const [finderUserName, feedId] = item.video.split(',')
+      wx.openChannelsActivity({
+        finderUserName,
+        feedId,
+        fail() {
+          wx.showToast({
+            title: '请稍后再试',
+          })
+        }
+      })
+      return
+    }
+  },
+
+  getLiveVideo(id) {
+    const {
+      page,
+      size
+    } = this;
+    api.getLiveVideo({
+      page,
+      size,
+      id
+    }).then(r => {
+      this.page += 1;
+      this.total = r.total;
+      this.setData({
+        videos: r.records || []
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.getLiveVideo(config.meetID)
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+    this.getLiveVideo(config.meetID)
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 7 - 0
pages/liveVideo/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "精彩视频",
+  "usingComponents": {
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index"
+  }
+}

+ 9 - 0
pages/liveVideo/index.wxml

@@ -0,0 +1,9 @@
+<!--pages/liveVideo/index.wxml-->
+<view class="media">
+  <view class="media-card">
+    <view class="media-card-item" bindtap="toPage" data-index="{{index}}" wx:for="{{videos}}" wx:key="index">
+      <image src="{{item.cover}}" style="width:650rpx;height: 380rpx" mode="aspectFit" />
+      <view class="media-card-item-title van-multi-ellipsis--l2">{{item.title}}</view>
+    </view>
+  </view>
+</view>

+ 32 - 0
pages/liveVideo/index.wxss

@@ -0,0 +1,32 @@
+/* pages/liveVideo/index.wxss */
+.media{
+  
+  box-sizing: border-box;
+  min-height: 100vh;
+  line-height: 1.8em;
+  overflow-y: auto;
+  padding: 1em 0;
+}
+
+.media-card {
+  width: 92vw;
+  margin: 0 auto;
+  border-radius: var(--cell-group-inset-border-radius,8px);
+  background-color: var(--base-color);
+  padding: 3vw;
+  box-sizing: border-box;
+}
+
+.media-card-item {
+  border-top: 1rpx solid #eeeeee;
+  margin-bottom: .5em;
+  padding-top: .5em;
+}
+
+.media-card-item:first-child {
+  border: none
+}
+
+.media-card-item-title {
+  line-height: 1.5em;
+}

+ 95 - 0
pages/news/index.js

@@ -0,0 +1,95 @@
+// pages/news/index.js
+import api from "../../api/index"
+import {
+  toNavigatePage
+} from "../../utils/util"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  page: 1,
+  size: 10,
+  getNewList() {
+    const {
+      page,
+      size,
+      category
+    } = this;
+    console.log(category)
+    api.getNewList({
+      page,
+      size,
+      category
+    }).then(r => {
+      this.page += 1;
+      this.setData({
+        news: r.records || []
+      })
+    })
+  },
+
+  toPage(e) {
+    toNavigatePage(e.currentTarget.dataset.url)
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.category = options.type
+    this.getNewList();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+    this.getNewList();
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 4 - 0
pages/news/index.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "资讯论坛",
+  "usingComponents": {}
+}

+ 13 - 0
pages/news/index.wxml

@@ -0,0 +1,13 @@
+<!--pages/news/index.wxml-->
+<view class="news">
+  <view class="newsList">
+    <view class="item" wx:for="{{news}}" wx:key="index" style="margin-top: 37rpx;" bindtap="toPage" data-url="{{'/pages/detail/textImage?id=' + item.id }}">
+      <view class="item-title">
+        <view class="van-multi-ellipsis--l2">
+          {{item.title}}
+        </view>
+      </view>
+      <image wx:if="{{item.cover}}" src="{{item.cover}}" style="width: 187rpx;height: 150rpx;" />
+    </view>
+  </view>
+</view>

+ 32 - 0
pages/news/index.wxss

@@ -0,0 +1,32 @@
+/* pages/news/index.wxss */
+.news {
+  
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+  padding: 1em;
+  box-sizing: border-box;
+}
+
+.newsList{
+  background-color: var(--base-color);
+  color: #000000;
+  border-radius: 35rpx;
+  padding: .5em;
+  
+}
+
+
+.item {
+  width: 100%;
+  overflow: hidden;
+}
+
+.item-title {
+  display: inline-block;
+  width: calc(100% - 200rpx);
+  padding-right: 10rpx;
+  min-height: 150rpx;
+  vertical-align: top;
+  overflow: hidden;
+}

+ 76 - 0
pages/partners/index.js

@@ -0,0 +1,76 @@
+// pages/partners/index.js
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    partners: {}
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getPartner({}).then(r=>{
+      const partners = {};
+      for (let i = 0; i < r.length; i++) {
+        const v = r[i];
+        if(!partners[v.partnerType]) partners[v.partnerType] = [];
+        partners[v.partnerType].push(v);
+      }
+      this.setData({partners})
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 7 - 0
pages/partners/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "合作伙伴",
+  "usingComponents": {
+    "van-grid": "@vant/weapp/grid/index",
+    "van-grid-item": "@vant/weapp/grid-item/index"
+  }
+}

+ 9 - 0
pages/partners/index.wxml

@@ -0,0 +1,9 @@
+<!--pages/partners/index.wxml-->
+<view class="partners">
+  <block wx:for="{{partners}}" wx:key="index">
+    <view class="guests_title">{{index}}</view>
+    <view style="text-align: center;">
+      <image src="{{son_item.logo}}"  wx:for="{{ item }}" wx:for-item="son_item" wx:for-idnex="son_index" wx:key="son_index" mode="aspectFit" class="img" />
+    </view>
+  </block>
+</view>

+ 37 - 0
pages/partners/index.wxss

@@ -0,0 +1,37 @@
+/* pages/partners/index.wxss */
+.partners {
+
+  color: var(--base-color);
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+  padding-top: 15rpx;
+}
+
+.partners .van-grid-item__content {
+  background-color: #ffffff00 !important;
+}
+
+
+.guests_title {
+  line-height: 1.5em;
+  padding-left: 10rpx;
+  border-left: 15rpx solid #6978ff;
+  margin-left: 30rpx;
+  margin-bottom: 15rpx;
+  margin-top: 15rpx;
+}
+
+.guests_title:first-child {
+  margin-top: 0;
+}
+
+.img {
+  margin: 10rpx 10rpx;
+  width: 200rpx;
+  height: 135rpx;
+  /* border-radius: 15rpx;
+  background-color: var(--base-color);
+  box-shadow: 0 0 15rpx #12121230; 
+  padding: 15rpx;*/
+}

+ 96 - 0
pages/seatNumber/index.js

@@ -0,0 +1,96 @@
+// pages/stroke/index.js
+import api from "../../api/index";
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    meetingList: {}
+  },
+
+  toPage(e) {
+    const {
+      id
+    } = e.currentTarget.dataset;
+    api.getSeatImage({
+      id
+    }).then(r => {
+      wx.previewMedia({
+        sources: [{
+          url: r.content
+        }]
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getStroke().then(strokeList => {
+      console.log(strokeList)
+      const sl = {}
+      for (let i = 0; i < strokeList.length; i++) {
+        const v = strokeList[i];
+        const time = (v.agendaTime || "").split(" ");
+        if (!time.length) continue
+        if (!sl[time[0]]) sl[time[0]] = [];
+        sl[time[0]].push(v);
+      }
+      this.setData({
+        meetingList: sl
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 7 - 0
pages/seatNumber/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "座次",
+  "usingComponents": {
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index"
+  }
+}

+ 15 - 0
pages/seatNumber/index.wxml

@@ -0,0 +1,15 @@
+<!--pages/stroke/index.wxml-->
+<view class="stroke">
+  <van-tabs color="#ffffff" title-inactive-color="#cccccc" title-active-color="#ffffff" active="{{ active }}" bind:change="tabChange">
+    <van-tab title="{{index}}" wx:for="{{meetingList}}" wx:key="index">
+      <view class="meetingList" bindtap="toPage" data-cover="{{son_item.agendaCover}}" data-agendaVideo="{{son_item.agendaVideo}}" data-id="{{son_item.id}}" wx:for="{{item}}" wx:for-item="son_item" wx:for-index="son_index" wx:key="son_index">
+        <text style="margin-left: -0.5em;float: left;">· </text>
+        <view class="sh" wx:if="{{son_item.agendaName}}">
+          {{son_item.agendaName}}
+        </view>
+        <view wx:if="{{son_item.agendaTime}}">时间:{{son_item.agendaTime}}</view>
+        <image wx:if="{{son_item.agendaCover}}" style="width: 600rpx;height: 300rpx;margin-top: 15rpx;" mode="aspectFit" src="{{son_item.agendaCover}}" />
+      </view>
+    </van-tab>
+  </van-tabs>
+</view>

+ 38 - 0
pages/seatNumber/index.wxss

@@ -0,0 +1,38 @@
+/* pages/stroke/index.wxss */
+.stroke {
+  
+  padding: 1em;
+  height: 100vh;
+  box-sizing: border-box;
+  color: var(--base-color);
+  line-height: 1.8em;
+  overflow-y: auto;
+}
+
+.meetingList {
+  margin-bottom: 1em;
+  padding: 1em .5em 1em 1.5em;
+  background-color: #ffffff20;
+  border-radius: 15rpx;
+}
+
+.sh {
+  display: -webkit-box;
+  /* 使用弹性盒子布局 */
+  -webkit-box-orient: vertical;
+  /* 设置为垂直方向排列 */
+  -webkit-line-clamp: 3;
+  /* 指定显示的行数 */
+  overflow: hidden;
+  /* 隐藏超出高度的内容 */
+  text-overflow: ellipsis;
+  /* 显示省略号 */
+  white-space: normal;
+  /* 处理空白符 */
+}
+
+.van-tabs__scroll {
+  background-color: var(--base-background-00)!important;
+  color: var(--base-color);
+  padding: 0;
+}

+ 79 - 0
pages/service/index.js

@@ -0,0 +1,79 @@
+// pages/service/index.js
+import api from "../../api/index";
+import {
+  toNavigatePage
+} from "../../utils/util";
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    info: []
+  },
+  toPage(e){
+    toNavigatePage(e.currentTarget.dataset.url)
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getMeetInfo().then(r=>{
+      console.log(r)
+      this.setData({
+        info: r || []
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 7 - 0
pages/service/index.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "会议服务",
+  "usingComponents": {
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index"
+  }
+}

+ 8 - 0
pages/service/index.wxml

@@ -0,0 +1,8 @@
+<!--pages/service/index.wxml-->
+<view class="service">
+  <view style="margin-bottom: 30rpx;" wx:for="{{info}}" wx:key="index">
+    <van-cell-group inset>
+      <van-cell url="{{'/pages/news/index?type=' + item.confKey}}" center title="{{item.confName}}" is-link label="{{item.confContent}}" />
+    </van-cell-group>
+  </view>
+</view>

+ 7 - 0
pages/service/index.wxss

@@ -0,0 +1,7 @@
+/* pages/service/index.wxss */
+.service {
+  padding-top: 30rpx;
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+}

+ 149 - 0
pages/signUp/index.js

@@ -0,0 +1,149 @@
+// pages/signUp/index.js
+import api from "../../api/index"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    userName: "",
+    photo: wx.getStorageSync('photo') || "",
+    phone: wx.getStorageSync('phone') || "",
+    code: wx.getStorageSync('code') || "",
+    email: "",
+    company: "",
+    department: "",
+    position: "",
+    loading: false,
+    isBorder: false
+  },
+  chooseavatar(e) {
+    const url = e.detail.avatarUrl || "";
+    wx.setStorageSync('userUrl', url);
+    this.setData({
+      photo: url
+    })
+  },
+  getPhone(e) {
+    const {
+      detail: {
+        code
+      }
+    } = e;
+    if(!code) return wx.showToast({
+      title: '未授权获取手机号',
+      icon: 'none'
+    })
+    api.getPhone({
+      code
+    }).then(r => {
+      const {
+        phone
+      } = r;
+      wx.setStorageSync('phone', phone);
+      wx.setStorageSync('code', code);
+      this.data.phone = phone;
+      this.data.code = code;
+    })
+  },
+  submit() {
+    this.setData({
+      loading: true
+    })
+    const {
+      userName,
+      photo,
+      phone,
+      email,
+      company,
+      department,
+      position
+    } = this.data;
+    if (!phone) return wx.showToast({
+      title: '未获取手机号',
+      icon: 'none'
+    })
+    api.postSignUp({
+      data: {
+        "openId": "",
+        "source": "微信",
+        userName,
+        photo,
+        phone,
+        email,
+        company,
+        department,
+        position
+      }
+    }).then(r => {
+      console.log(r)
+      wx.showToast({
+        title: '报名成功',
+        icon: 'none'
+      })
+      this.setData({
+        loading: false
+      })
+    }).catch(() => {
+      this.setData({
+        loading: false
+      })
+    })
+
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 9 - 0
pages/signUp/index.json

@@ -0,0 +1,9 @@
+{
+  "navigationBarTitleText": "报名",
+  "usingComponents": {
+    "van-field": "@vant/weapp/field/index",
+    "van-button": "@vant/weapp/button/index",
+    "van-cell-group": "@vant/weapp/cell-group/index",
+    "van-image": "@vant/weapp/image/index"
+  }
+}

+ 25 - 0
pages/signUp/index.wxml

@@ -0,0 +1,25 @@
+<!--pages/signUp/index.wxml-->
+<view class="signUp">
+  <button open-type="chooseAvatar" bindchooseavatar="chooseavatar" class="user_img" wx:if="{{!photo}}">
+    <van-image width="250rpx" height="250rpx" fit="cover" round src="" />
+  </button>
+  <van-image wx:else class="user_img" width="250rpx" height="250rpx" fit="cover" round src="{{photo}}" />
+
+  <van-cell-group inset>
+    <van-field label="用户名" type="nickname" model:value="{{ userName }}" placeholder="请输入用户名" border="{{ isBorder }}" />
+    <van-field label="手机号" disabled type="number" model:value="{{ phone }}" placeholder="请输入手机号" border="{{ isBorder }}">
+      <van-button wx:if="{{!code}}" open-type="getPhoneNumber" bind:getphonenumber="getPhone" openType="getPhoneNumber" slot="button" size="small">
+        获取手机号
+      </van-button>
+    </van-field>
+    <van-field label="邮箱" type="email" model:value="{{ email }}" placeholder="请输入邮箱" border="{{ isBorder }}" />
+    <van-field label="公司" type="text" model:value="{{ company }}" placeholder="请输入公司" border="{{ isBorder }}" />
+    <van-field label="部门" type="text" model:value="{{ department }}" placeholder="请输入部门" border="{{ isBorder }}" />
+    <van-field label="职位" type="text" model:value="{{ position }}" placeholder="请输入职位" border="{{ isBorder }}" />
+  </van-cell-group>
+  <view style="margin-top: 30rpx;">
+    <van-cell-group inset>
+      <van-button loading="{{loading}}" bind:tap="submit" type="primary" style="width: 15em;" size="large">提 交</van-button>
+    </van-cell-group>
+  </view>
+</view>

+ 20 - 0
pages/signUp/index.wxss

@@ -0,0 +1,20 @@
+/* pages/signUp/index.wxss */
+.signUp {
+  color: var(--base-color);
+  width: 100%;
+  min-height: 100vh;
+  padding-bottom: 15rpx;
+  padding-top: 450rpx;
+  position: relative;
+}
+
+.user_img {
+  position: absolute;
+  top: 100rpx;
+  left: 250rpx;
+  width: 250rpx;
+  height: 250rpx;
+  border-radius: 50%;
+  padding: 0;
+  box-shadow: 0 0 15rpx #eeeeee;
+}

+ 120 - 0
pages/stroke/index.js

@@ -0,0 +1,120 @@
+// pages/stroke/index.js
+import {
+  toNavigatePage
+} from "../../utils/util"
+import api from "../../api/index";
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    meetingList: [],
+    active: ""
+  },
+
+  tabChange(){},
+  toPage(e) {
+    const {agendavideo, cover, url, id} = e.currentTarget.dataset;
+    toNavigatePage(url +'?id=' + id + '&cover=' + cover + '&agendavideo=' + agendavideo)
+  },
+
+  async getChannelsLive(finderUserName){
+    const info = await new Promise((resolve, reject)=>{
+      wx.getChannelsLiveInfo({
+        finderUserName,
+        success: res => {
+          const {	status } = res;
+          resolve(status);
+          // status -> 2 直播中
+        },
+        fail: err => {
+          console.log(err)
+        }
+      })
+    })
+    return info
+  },
+
+  openChannels(e){
+    const finderUserName = e.currentTarget.dataset.channelsid || "";
+    wx.openChannelsLive({
+      finderUserName
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    api.getStroke().then(strokeList => {
+      const sl = {};
+      for (let i = 0; i < strokeList.length; i++) {
+        const v = strokeList[i];
+        const time = v.agendaTime.split(" ") || [];
+        if(!time || !time.length) continue
+        if(!sl[time[0]]) sl[time[0]] = [];
+        v.localTime = time[1];
+        if(v.wxVideoUid){
+          // 判断是否正在直播
+          const status = this.getChannelsLive(v.wxVideoUid);
+          v.liveing = status === 2;
+        }
+        sl[time[0]].push(v);
+      }
+      this.setData({
+        meetingList: sl
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  onShareTimeline() {}
+})

+ 8 - 0
pages/stroke/index.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "会议日程",
+  "usingComponents": {
+    "van-tab": "@vant/weapp/tab/index",
+    "van-tabs": "@vant/weapp/tabs/index",
+    "van-button": "@vant/weapp/button/index"
+  }
+}

+ 19 - 0
pages/stroke/index.wxml

@@ -0,0 +1,19 @@
+<!--pages/stroke/index.wxml-->
+<view class="stroke">
+  <van-tabs color="#ffffff" title-inactive-color="#cccccc" title-active-color="#ffffff" active="{{ active }}" bind:change="tabChange">
+    <van-tab title="{{index}}" wx:for="{{meetingList}}" wx:key="index">
+      <view class="meetingList">
+        <view class="{{index < item.length - 1 ? 'van-hairline--bottom': '' }}" style="padding-bottom: 15rpx;" bindtap="toPage" data-url="{{'/pages/detail/stroke'}}" data-cover="{{item.agendaCover}}" data-agendaVideo="{{item.agendaVideo}}" data-id="{{item.id}}" wx:for="{{item}}" wx:key="index">
+          <text style="margin-left: -0.5em;float: left;">· </text>
+          <view class="sh" wx:if="{{item.agendaName}}">
+            {{item.agendaName}}
+          </view>
+          <view wx:if="{{item.localTime}}">时间:{{item.localTime}}</view>
+          <view wx:if="{{item.agendaDesc}}">简介:{{item.agendaDesc}}</view>
+          <van-button wx:if="{{item.liveing}}" bingdtap="openChannels" data-channelsid="{{v.wxVideoUid}}" style="margin-top: 15rpx;" plain size="small">看直播</van-button>
+          <!-- <image wx:if="{{item.agendaCover}}" style="width: 600rpx;height: 300rpx;margin-top: 15rpx;" mode="aspectFit" src="{{item.agendaCover}}" /> -->
+        </view>
+      </view>
+    </van-tab>
+  </van-tabs>
+</view>

+ 40 - 0
pages/stroke/index.wxss

@@ -0,0 +1,40 @@
+/* pages/stroke/index.wxss */
+.stroke {
+  
+  padding: 1em;
+  height: 100vh;
+  box-sizing: border-box;
+  color: var(--base-color);
+  line-height: 1.8em;
+  overflow-y: auto;
+}
+
+.meetingList {
+  margin-bottom: 1em;
+  margin-top: 15rpx;
+  padding: 1em .5em 1em 1.5em;
+  background-color: var(--base-color);
+  border-radius: 15rpx;
+  color: #000;
+}
+
+.van-tabs__scroll {
+  background-color: var(--base-background-00)!important;
+  color: var(--base-color);
+  padding: 0;
+}
+
+.sh {
+  display: -webkit-box;
+  /* 使用弹性盒子布局 */
+  -webkit-box-orient: vertical;
+  /* 设置为垂直方向排列 */
+  -webkit-line-clamp: 3;
+  /* 指定显示的行数 */
+  overflow: hidden;
+  /* 隐藏超出高度的内容 */
+  text-overflow: ellipsis;
+  /* 显示省略号 */
+  white-space: normal;
+  /* 处理空白符 */
+}

+ 16 - 0
pnpm-lock.yaml

@@ -0,0 +1,16 @@
+lockfileVersion: '6.0'
+
+settings:
+  autoInstallPeers: true
+  excludeLinksFromLockfile: false
+
+dependencies:
+  '@vant/weapp':
+    specifier: ^1.11.4
+    version: 1.11.4
+
+packages:
+
+  /@vant/weapp@1.11.4:
+    resolution: {integrity: sha512-egOsWO4hVMP1SQSqQ46jy8UD3WysvlnUecRzPM21Y3ovkOFZ6wlaO7oHQmTXRpwr+V41Qri1qEbtNjhVxFqdyw==}
+    dev: false

+ 28 - 0
project.config.json

@@ -0,0 +1,28 @@
+{
+  "compileType": "miniprogram",
+  "libVersion": "trial",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "setting": {
+    "coverView": true,
+    "es6": true,
+    "postcss": true,
+    "minified": true,
+    "enhance": true,
+    "showShadowRootInWxmlPanel": true,
+    "packNpmRelationList": [],
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    }
+  },
+  "condition": {},
+  "editorSetting": {
+    "tabIndent": "auto",
+    "tabSize": 2
+  },
+  "appid": "wxddc99c73392c3a53"
+}

+ 21 - 0
project.private.config.json

@@ -0,0 +1,21 @@
+{
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "miniprogram-1",
+  "setting": {
+    "compileHotReLoad": true,
+    "urlCheck": false
+  },
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "pages/signUp/index",
+          "pathName": "pages/signUp/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
+}

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
+{
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+  "rules": [{
+  "action": "allow",
+  "page": "*"
+  }]
+}

+ 33 - 0
utils/req.js

@@ -0,0 +1,33 @@
+import {
+  config
+} from "../config/index"
+
+export function req(data) {
+  wx.showLoading({
+    title: '请求中',
+  })
+  return new Promise((resolve, reject) => {
+    wx.request({
+      url: config.base + data.url,
+      method: data.method || 'GET',
+      data: data.data || undefined,
+      success(res) {
+        if (res.statusCode !== 200) {
+          wx.showToast({
+            title: '网络错误',
+            icon: 'none'
+          })
+          reject(res)
+          return
+        }
+        data.success && data.success(res.data);
+        resolve(res.data)
+        wx.hideLoading()
+      },
+      fail(res) {
+          reject(res)
+          wx.hideLoading()
+      }
+    })
+  })
+}

+ 69 - 0
utils/util.js

@@ -0,0 +1,69 @@
+const FileSystemManager = wx.getFileSystemManager();
+
+const formatTime = date => {
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1
+  const day = date.getDate()
+  const hour = date.getHours()
+  const minute = date.getMinutes()
+  const second = date.getSeconds()
+
+  return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
+}
+
+const formatNumber = n => {
+  n = n.toString()
+  return n[1] ? n : `0${n}`
+}
+
+const openFileFunc = (url, fileName = '') => {
+  wx.showLoading({
+    title: '',
+  })
+  wx.downloadFile({
+    url,
+    success: function (res) {
+      const filePath = res.tempFilePath;
+      FileSystemManager.saveFile({
+        tempFilePath: filePath,
+        filePath: wx.env.USER_DATA_PATH + '/' + decodeURI(fileName || '文件'),
+        success() {
+          wx.openDocument({
+            filePath: wx.env.USER_DATA_PATH + '/' + decodeURI(fileName || '文件'),
+            success: function (res) {
+              wx.hideLoading();
+            },
+            fail() {
+              wx.hideLoading();
+            }
+          })
+        },
+        fail(e) {
+          wx.hideLoading()
+          wx.showToast({
+            title: '请稍后再试!',
+          })
+        }
+      })
+
+    },
+    fail() {
+      wx.hideLoading();
+      wx.showToast({
+        title: '请稍后再试!',
+      })
+    }
+  })
+}
+
+const toNavigatePage = (url = '') => {
+  wx.navigateTo({
+    url
+  })
+}
+
+module.exports = {
+  formatTime,
+  openFileFunc,
+  toNavigatePage
+}