Compare commits

...

6 Commits

  1. 28
      eslint.config.js
  2. 28
      eslint.config.mjs
  3. 316
      keymap.json
  4. 9
      package.json
  5. 2604
      pnpm-lock.yaml
  6. 9
      project.private.config.json
  7. 1
      src/app.json
  8. 48
      src/app.ts
  9. 11
      src/components/popup/index.scss
  10. 3
      src/components/popup/index.wxml
  11. BIN
      src/images/bg32.png
  12. BIN
      src/images/icon82.png
  13. BIN
      src/images/icon83.png
  14. BIN
      src/images/icon84.png
  15. BIN
      src/images/icon85.png
  16. BIN
      src/images/icon86.png
  17. BIN
      src/images/icon87.png
  18. BIN
      src/images/za-images/live-banner.png
  19. 254
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.js
  20. 4
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.json
  21. 37
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxml
  22. 1
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxss
  23. 144
      src/miniprogram_npm/crypto-js/index.js
  24. 1
      src/miniprogram_npm/crypto-js/index.js.map
  25. 4
      src/miniprogram_npm/dayjs/index.js
  26. 2
      src/patient/pages/index/index.scss
  27. 2
      src/patient/pages/index/index.ts
  28. 117
      src/patient/pages/liveDetail/index.ts
  29. 18
      src/patient/pages/liveDetail/index.wxml
  30. 9
      src/patient/pages/liveDetailVideo/index.json
  31. 126
      src/patient/pages/liveDetailVideo/index.scss
  32. 192
      src/patient/pages/liveDetailVideo/index.ts
  33. 86
      src/patient/pages/liveDetailVideo/index.wxml
  34. 18
      src/patient/pages/liveResult/index.ts
  35. 2
      src/patient/pages/liveResult/index.wxml
  36. 8
      src/patient/pages/personalInformation/index.scss
  37. 36
      src/patient/pages/personalInformation/index.ts
  38. 14
      src/patient/pages/personalInformation/index.wxml
  39. 2
      typings/index.d.ts

28
eslint.config.js

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
import antfu from '@antfu/eslint-config'
export default antfu({
env: {
es6: true,
},
parserOptions: { project: ['./tsconfig.json'] },
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'ts/no-require-imports': 'off',
eqeqeq: 'off',
},
formatters: {
css: 'prettier',
html: 'prettier',
markdown: 'prettier',
},
})

28
eslint.config.mjs

@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
import prettierConfig from 'eslint-config-prettier'
export default antfu(
{
env: {
es6: true,
},
stylistic: false,
parserOptions: { project: ['./tsconfig.json'] },
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'ts/no-require-imports': 'off',
},
},
prettierConfig,
)

316
keymap.json

@ -1,316 +0,0 @@ @@ -1,316 +0,0 @@
[
// emmet
{
"key": "alt+e",
"command": "workbench.action.showEmmetCommands"
},
// console
{
"key": "ctrl+shift+l",
"command": "js-console.insertConsoleLog",
"when": "editorTextFocus"
},
{
"key": "shift+alt+l",
"command": "-js-console.insertConsoleLog",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+t",
"command": "js-console.insertConsoleTable",
"when": "editorTextFocus"
},
{
"key": "shift+alt+t",
"command": "-js-console.insertConsoleTable",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+w",
"command": "js-console.insertConsoleWarn",
"when": "editorTextFocus"
},
{
"key": "shift+alt+w",
"command": "-js-console.insertConsoleWarn",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+d",
"command": "workbench.debug.panel.action.clearReplAction"
},
{
"key": "ctrl+shift+e",
"command": "js-console.insertConsoleError",
"when": "editorTextFocus"
},
{
"key": "shift+alt+e",
"command": "-js-console.insertConsoleError",
"when": "editorTextFocus"
},
// Explorer
{
"key": "enter",
"command": "list.select",
"when": "listFocus && !inputFocus"
},
{
"key": "a",
"command": "explorer.newFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "shift+a",
"command": "explorer.newFolder",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "y",
"command": "filesExplorer.copy",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "x",
"command": "filesExplorer.cut",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "p",
"command": "filesExplorer.paste",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "r",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "m",
"command": "workbench.files.action.refreshFilesExplorer",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// {
// "key": "m",
// "command": "editor.action.showContextMenu",
// "when": "explorerViewletVisible && filesExplorerFocus && !inputFocus"
// },
{
"key": "q",
"command": "workbench.action.toggleSidebarVisibility",
"when": "explorerResourceMoveableToTrash && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
// "command": "workbench.files.action.refreshFilesExplorer",
{
"key": "d",
"command": "moveFileToTrash",
"when": "explorerResourceMoveableToTrash && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "shift+d",
"command": "deleteFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "c",
"command": "workbench.files.action.collapseExplorerFolders",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
},
{
"key": "s",
"command": "explorer.openToSide",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
{
"key": "f",
"command": "revealFileInOS",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
{
"key": "t",
"command": "openInTerminal",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
},
{
"key": "u",
"command": "copyFilePath",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
{
"key": "i",
"command": "copyRelativeFilePath",
"when": "explorerViewletFocus && explorerViewletVisible && !inputFocus"
},
// select
{
"key": "ctrl+n",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+n",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+p",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
// focus
{
"key": "ctrl+h",
"command": "workbench.action.navigateLeft",
"when": "terminalFocus || sideBarFocus"
},
{
"key": "ctrl+l",
"command": "workbench.action.navigateRight",
"when": "terminalFocus || sideBarFocus"
},
{
"key": "ctrl+p",
"command": "workbench.action.navigateUp",
"when": "terminalFocus || sideBarFocus"
},
{
"key": "ctrl+n",
"command": "workbench.action.navigateDown",
"when": "terminalFocus || sideBarFocus"
},
// changeCase
{
"key": "alt+;",
"command": "extension.changeCase.commands"
},
// focus
{
"key": "alt+`",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "alt+1",
"command": "workbench.view.explorer"
},
{
"key": "alt-2",
"command": "outline.focus"
},
{
"key": "alt-3",
"command": "workbench.view.extension.project-manager"
},
{
"key": "alt-4",
"command": "todo-tree-view.focus"
},
{
"key": "alt-5",
"command": "workbench.view.extension.dockerView"
},
{
"key": "alt+9",
"command": "workbench.view.scm"
},
{
"key": "alt-0",
"command": "workbench.action.toggleActivityBarVisibility"
},
{
"key": "tab",
"command": "markdown.extension.onTabKey",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !suggestWidgetVisible && editorLangId == 'markdown' && vim.mode =='Insert'"
},
{
"key": "tab",
"command": "-markdown.extension.onTabKey",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !suggestWidgetVisible && editorLangId == 'markdown'"
},
{
"key": "shift+tab",
"command": "-markdown.extension.onShiftTabKey",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !suggestWidgetVisible && editorLangId == 'markdown'"
},
{
"key": "shift+tab",
"command": "markdown.extension.onShiftTabKey",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !suggestWidgetVisible && editorLangId == 'markdown' && vim.mode =='Insert'"
},
// nav buffer
{
"key": "tab",
"command": "workbench.action.nextEditor",
"when": "vim.mode != 'Insert' && vim.mode != 'CommandlineInProgress' && !panelFocus"
},
{
"key": "shift+tab",
"command": "workbench.action.previousEditor",
"when": "vim.mode != 'Insert' && vim.mode != 'CommandlineInProgress' && !panelFocus"
},
//
{
"key": "alt+-",
"command": "color-conversion.colorConversion",
"when": "editorTextFocus && editorHasSelection"
},
// whichkey
{
"key": "space",
"command": "whichkey.show",
"when": "!inputFocus"
},
{
"key": "e",
"command": "whichkey.triggerKey",
"args": {
"key": "e",
"when": "sideBarVisible && explorerViewletVisible"
},
"when": "whichkeyVisible && sideBarVisible && explorerViewletVisible"
},
//
{
"key": "shift+ctrl+0",
"command": "workbench.action.evenEditorWidths"
},
{
"key": "ctrl+down",
"command": "workbench.action.decreaseViewHeight"
},
{
"key": "ctrl+up",
"command": "workbench.action.increaseViewHeight"
},
{
"key": "ctrl+right",
"command": "workbench.action.decreaseViewWidth"
},
{
"key": "ctrl+left",
"command": "workbench.action.increaseViewWidth"
},
{
"key": "alt+j",
"command": "workbench.action.togglePanel"
},
{
"key": "ctrl+j",
"command": "-workbench.action.togglePanel"
},
// replace vim C-d C-u
{
"key": "ctrl+d",
"command": "cursorPageDown",
"when": "textInputFocus"
},
{
"key": "ctrl+u",
"command": "cursorPageUp",
"when": "textInputFocus"
}
]

9
package.json

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@miniprogram-component-plus/video-swiper": "^1.0.1",
"@vant/weapp": "^1.11.6",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
@ -17,10 +18,10 @@ @@ -17,10 +18,10 @@
"typescript": "^5.3.3"
},
"devDependencies": {
"@antfu/eslint-config": "^3.7.3",
"eslint": "^9.12.0",
"eslint-config-prettier": "^9.1.0",
"miniprogram-api-typings": "^4.0.1",
"@antfu/eslint-config": "^6.2.0",
"eslint": "^9.38.0",
"eslint-plugin-format": "^1.0.2",
"miniprogram-api-typings": "^4.1.0",
"prettier": "3.3.3"
}
}

2604
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

9
project.private.config.json

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
"projectname": "xinda-miniprogram",
"setting": {
"compileHotReLoad": true,
"urlCheck": true,
"urlCheck": false,
"coverView": false,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": true,
@ -23,6 +23,13 @@ @@ -23,6 +23,13 @@
"miniprogram": {
"list": [
{
"name": "patient/pages/liveDetail/index",
"pathName": "patient/pages/liveDetail/index",
"query": "id=33",
"scene": null,
"launchMode": "default"
},
{
"name": "患者-个人信息",
"pathName": "patient/pages/personalInformation/index",
"query": "bottom=1",

1
src/app.json

@ -56,6 +56,7 @@ @@ -56,6 +56,7 @@
"pages/live/index",
"pages/liveDetail/index",
"pages/liveResult/index",
"pages/liveDetailVideo/index",
"pages/signIn/index",
"pages/adl/index",
"pages/adlShare/index",

48
src/app.ts

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
import dayjs from 'dayjs'
import licia from 'miniprogram-licia'
import component from '@/utils/component'
import relativeTime from '@/utils/dayjs/relativeTime.js'
import page from '@/utils/page'
import { request } from '@/utils/request'
import { parseScene } from './utils/util'
const dayjs = require('dayjs')
const licia = require('miniprogram-licia')
require('/utils/dayjs/day-zh-cn.js')
@ -97,6 +97,11 @@ App<IAppOption>({ @@ -97,6 +97,11 @@ App<IAppOption>({
99: '取消',
100: '已删除',
},
liveSubscribe: {
sub: false,
tmplIds: [],
},
},
onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor
@ -114,7 +119,8 @@ App<IAppOption>({ @@ -114,7 +119,8 @@ App<IAppOption>({
onShow(options) {
if (options.query.scene) {
this.globalData.scene = parseScene(options.query.scene)
} else if (options.query.proMethodId) {
}
else if (options.query.proMethodId) {
this.globalData.scene.proMethodId = options.query.proMethodId
}
},
@ -235,7 +241,7 @@ App<IAppOption>({ @@ -235,7 +241,7 @@ App<IAppOption>({
data: {},
}) as Promise<never>
},
mpBehavior(data: { doctor?: boolean; PageName: string }) {
mpBehavior(data: { doctor?: boolean, PageName: string }) {
let url = '?r=zd/mp-behavior/add'
if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add'
@ -267,9 +273,10 @@ App<IAppOption>({ @@ -267,9 +273,10 @@ App<IAppOption>({
})
},
// zd相关函数
zdMpBehavior(data: { PageName: string; doctor?: boolean }) {
zdMpBehavior(data: { PageName: string, doctor?: boolean }) {
const { loginType } = this.globalData
if (loginType === 0) return
if (loginType === 0)
return
let url = '?r=zd/mp-behavior/add'
if (data.doctor) {
url = '?r=zd/doctor/mp-behavior/add'
@ -296,13 +303,15 @@ App<IAppOption>({ @@ -296,13 +303,15 @@ App<IAppOption>({
if (this.zdVerifySys(pub)) {
if (this.globalData.loginType === 1) {
this.zdRegistrationVerification(() => resolve(), loginPage)
} else {
}
else {
resolve()
}
}
}
const unRegFun = (resolve) => {
if (!this.zdVerifySys(pub)) return
if (!this.zdVerifySys(pub))
return
resolve()
}
return new Promise((resolve: (value?) => void) => {
@ -360,11 +369,14 @@ App<IAppOption>({ @@ -360,11 +369,14 @@ App<IAppOption>({
let urlKey = ''
if (!PatientId) {
urlKey = 'enterInfo'
} else if (AuditStatus == 0) {
}
else if (AuditStatus == 0) {
urlKey = 'noCert'
} else if (AuditStatus == 1) {
}
else if (AuditStatus == 1) {
urlKey = isFollow ? 'nopending' : 'pending'
} else if (AuditStatus == 2) {
}
else if (AuditStatus == 2) {
urlKey = 'reject'
}
const navUrl = {
@ -415,7 +427,8 @@ App<IAppOption>({ @@ -415,7 +427,8 @@ App<IAppOption>({
})
return false
}
if (ignorePath.includes(url)) return true
if (ignorePath.includes(url))
return true
if (loginType === 1) {
if (url.includes('doctor/pages')) {
@ -423,14 +436,16 @@ App<IAppOption>({ @@ -423,14 +436,16 @@ App<IAppOption>({
url: '/pages/index/index',
})
return false
} else {
}
else {
return true
}
}
if (loginType === 2 && !pub) {
if (url.includes('doctor/pages')) {
return true
} else {
}
else {
const params = Object.entries(options)
.map(([key, value]) => `${key}=${value}`)
.join('&')
@ -455,7 +470,8 @@ App<IAppOption>({ @@ -455,7 +470,8 @@ App<IAppOption>({
url: '/patient/pages/login/index',
})
isReject = true
} else if (!isNewReg) {
}
else if (!isNewReg) {
wx.reLaunch({
url: '/patient/pages/enterInfo/index',
})
@ -464,7 +480,7 @@ App<IAppOption>({ @@ -464,7 +480,7 @@ App<IAppOption>({
}
if (isReject) {
that.globalData.backPage = backPage
reject(null)
reject(new Error('非登录用户拦截'))
return
}
resolve(null)

11
src/components/popup/index.scss

@ -129,10 +129,19 @@ @@ -129,10 +129,19 @@
.popup6 {
width: 590rpx;
height: 880rpx;
position: relative;
.p-img {
width: 100%;
height: 100%;
}
.code {
position: absolute;
top: 350rpx;
left: 50%;
transform: translateX(-50%);
width: 290rpx;
height: 290rpx;
}
}
.popup7 {
@ -187,7 +196,7 @@ @@ -187,7 +196,7 @@
width: 100%;
height: 100%;
}
.code{
.code {
position: absolute;
top: 372rpx;
left: 50%;

3
src/components/popup/index.wxml

@ -55,7 +55,8 @@ @@ -55,7 +55,8 @@
</view>
</view>
<view class="popup6" wx:if="{{type==='popup6'}}">
<image class="p-img" src="{{imageUrl}}bg20.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="p-img" src="{{imageUrl}}bg32.png?t={{Timestamp}}"></image>
<image class="code" src="{{params.qrCode}}" show-menu-by-longpress></image>
</view>
<view class="popup7" wx:if="{{type==='popup7'}}">
<image class="badge" src="{{imageUrl}}icon78.png?t={{Timestamp}}"></image>

BIN
src/images/bg32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

BIN
src/images/icon82.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/icon83.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

BIN
src/images/icon84.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

BIN
src/images/icon85.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

BIN
src/images/icon86.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

BIN
src/images/icon87.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
src/images/za-images/live-banner.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 682 KiB

254
src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.js

@ -0,0 +1,254 @@ @@ -0,0 +1,254 @@
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Component({
options: {
addGlobalClass: true,
pureDataPattern: /^_/
},
properties: {
duration: {
type: Number,
value: 500
},
easingFunction: {
type: String,
value: 'default'
},
loop: {
type: Boolean,
value: true
},
videoList: {
type: Array,
value: [],
observer: function observer() {
var newVal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
this._videoListChanged(newVal);
}
}
},
data: {
nextQueue: [],
prevQueue: [],
curQueue: [],
circular: false,
_last: 1,
_change: -1,
_invalidUp: 0,
_invalidDown: 0,
_videoContexts: []
},
lifetimes: {
attached: function attached() {
this.data._videoContexts = [wx.createVideoContext('video_0', this), wx.createVideoContext('video_1', this), wx.createVideoContext('video_2', this)];
}
},
methods: {
_videoListChanged: function _videoListChanged(newVal) {
var _this = this;
var data = this.data;
newVal.forEach(function (item) {
data.nextQueue.push(item);
});
if (data.curQueue.length === 0) {
this.setData({
curQueue: data.nextQueue.splice(0, 3)
}, function () {
_this.playCurrent(1);
});
}
},
animationfinish: function animationfinish(e) {
var _data = this.data,
_last = _data._last,
_change = _data._change,
curQueue = _data.curQueue,
prevQueue = _data.prevQueue,
nextQueue = _data.nextQueue;
var current = e.detail.current;
var diff = current - _last;
if (diff === 0) return;
this.data._last = current;
this.playCurrent(current);
this.triggerEvent('change', { activeId: curQueue[current].id });
var direction = diff === 1 || diff === -2 ? 'up' : 'down';
if (direction === 'up') {
if (this.data._invalidDown === 0) {
var change = (_change + 1) % 3;
var add = nextQueue.shift();
var remove = curQueue[change];
if (add) {
prevQueue.push(remove);
curQueue[change] = add;
this.data._change = change;
} else {
this.data._invalidUp += 1;
}
} else {
this.data._invalidDown -= 1;
}
}
if (direction === 'down') {
if (this.data._invalidUp === 0) {
var _change2 = _change;
var _remove = curQueue[_change2];
var _add = prevQueue.pop();
if (_add) {
curQueue[_change2] = _add;
nextQueue.unshift(_remove);
this.data._change = (_change2 - 1 + 3) % 3;
} else {
this.data._invalidDown += 1;
}
} else {
this.data._invalidUp -= 1;
}
}
var circular = true;
if (nextQueue.length === 0 && current !== 0) {
circular = false;
}
if (prevQueue.length === 0 && current !== 2) {
circular = false;
}
this.setData({
curQueue: curQueue,
circular: circular
});
},
playCurrent: function playCurrent(current) {
this.data._videoContexts.forEach(function (ctx, index) {
index !== current ? ctx.pause() : ctx.play();
});
},
onPlay: function onPlay(e) {
this.trigger(e, 'play');
},
onPause: function onPause(e) {
this.trigger(e, 'pause');
},
onEnded: function onEnded(e) {
this.trigger(e, 'ended');
},
onError: function onError(e) {
this.trigger(e, 'error');
},
onTimeUpdate: function onTimeUpdate(e) {
this.trigger(e, 'timeupdate');
},
onWaiting: function onWaiting(e) {
this.trigger(e, 'wait');
},
onProgress: function onProgress(e) {
this.trigger(e, 'progress');
},
onLoadedMetaData: function onLoadedMetaData(e) {
this.trigger(e, 'loadedmetadata');
},
trigger: function trigger(e, type) {
var ext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var detail = e.detail;
var activeId = e.target.dataset.id;
this.triggerEvent(type, Object.assign(Object.assign(Object.assign({}, detail), { activeId: activeId }), ext));
}
}
});
/***/ })
/******/ ]);

4
src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.json

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

37
src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxml

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
<view class="container">
<swiper
class="video-swiper"
circular="{{circular}}"
easing-function="{{easingFunction}}"
vertical
current="1"
duration="{{duration}}"
bindanimationfinish="animationfinish">
<!-- curQueue 循环会导致video重新插入,objectFit 不可变更 -->
<swiper-item wx:for="{{curQueue}}" wx:key="*this">
<video
id="video_{{index}}"
class="video_item"
loop="{{loop}}"
enable-play-gesture
enable-progress-gesture
show-center-play-btn="{{false}}"
controls="{{false}}"
src="{{item.url}}"
data-id="{{item.id}}"
object-fit="{{item.objectFit || 'cover'}}"
data-index="{{index}}"
bindplay="onPlay"
bindpause="onPause"
bindended="onEnded"
binderror="onError"
bindtimeupdate="onTimeUpdate"
bindwaiting="onWaiting"
bindprogress="onProgress"
bindloadedmetadata="onLoadedMetaData"
>
</video>
</swiper-item>
</swiper>
</view>

1
src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxss

@ -0,0 +1 @@ @@ -0,0 +1 @@
.container{width:100%;height:100%}.video-swiper{width:100%;height:100%}.video_item{height:100%;width:100%}

144
src/miniprogram_npm/crypto-js/index.js

@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport @@ -4,7 +4,7 @@ var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexport
var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
__DEFINE__(1734488773777, function(require, module, exports) {
__DEFINE__(1761790169779, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -23,8 +23,8 @@ __DEFINE__(1734488773777, function(require, module, exports) { @@ -23,8 +23,8 @@ __DEFINE__(1734488773777, function(require, module, exports) {
return CryptoJS;
}));
}, function(modId) {var map = {"./core":1734488773778,"./x64-core":1734488773779,"./lib-typedarrays":1734488773780,"./enc-utf16":1734488773781,"./enc-base64":1734488773782,"./enc-base64url":1734488773783,"./md5":1734488773784,"./sha1":1734488773785,"./sha256":1734488773786,"./sha224":1734488773787,"./sha512":1734488773788,"./sha384":1734488773789,"./sha3":1734488773790,"./ripemd160":1734488773791,"./hmac":1734488773792,"./pbkdf2":1734488773793,"./evpkdf":1734488773794,"./cipher-core":1734488773795,"./mode-cfb":1734488773796,"./mode-ctr":1734488773797,"./mode-ctr-gladman":1734488773798,"./mode-ofb":1734488773799,"./mode-ecb":1734488773800,"./pad-ansix923":1734488773801,"./pad-iso10126":1734488773802,"./pad-iso97971":1734488773803,"./pad-zeropadding":1734488773804,"./pad-nopadding":1734488773805,"./format-hex":1734488773806,"./aes":1734488773807,"./tripledes":1734488773808,"./rc4":1734488773809,"./rabbit":1734488773810,"./rabbit-legacy":1734488773811,"./blowfish":1734488773812}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773778, function(require, module, exports) {
}, function(modId) {var map = {"./core":1761790169780,"./x64-core":1761790169781,"./lib-typedarrays":1761790169782,"./enc-utf16":1761790169783,"./enc-base64":1761790169784,"./enc-base64url":1761790169785,"./md5":1761790169786,"./sha1":1761790169787,"./sha256":1761790169788,"./sha224":1761790169789,"./sha512":1761790169790,"./sha384":1761790169791,"./sha3":1761790169792,"./ripemd160":1761790169793,"./hmac":1761790169794,"./pbkdf2":1761790169795,"./evpkdf":1761790169796,"./cipher-core":1761790169797,"./mode-cfb":1761790169798,"./mode-ctr":1761790169799,"./mode-ctr-gladman":1761790169800,"./mode-ofb":1761790169801,"./mode-ecb":1761790169802,"./pad-ansix923":1761790169803,"./pad-iso10126":1761790169804,"./pad-iso97971":1761790169805,"./pad-zeropadding":1761790169806,"./pad-nopadding":1761790169807,"./format-hex":1761790169808,"./aes":1761790169809,"./tripledes":1761790169810,"./rc4":1761790169811,"./rabbit":1761790169812,"./rabbit-legacy":1761790169813,"./blowfish":1761790169814}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169780, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -833,7 +833,7 @@ __DEFINE__(1734488773778, function(require, module, exports) { @@ -833,7 +833,7 @@ __DEFINE__(1734488773778, function(require, module, exports) {
}));
}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773779, function(require, module, exports) {
__DEFINE__(1761790169781, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1138,8 +1138,8 @@ __DEFINE__(1734488773779, function(require, module, exports) { @@ -1138,8 +1138,8 @@ __DEFINE__(1734488773779, function(require, module, exports) {
return CryptoJS;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773780, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169782, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1216,8 +1216,8 @@ __DEFINE__(1734488773780, function(require, module, exports) { @@ -1216,8 +1216,8 @@ __DEFINE__(1734488773780, function(require, module, exports) {
return CryptoJS.lib.WordArray;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773781, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169783, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1367,8 +1367,8 @@ __DEFINE__(1734488773781, function(require, module, exports) { @@ -1367,8 +1367,8 @@ __DEFINE__(1734488773781, function(require, module, exports) {
return CryptoJS.enc.Utf16;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773782, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169784, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1505,8 +1505,8 @@ __DEFINE__(1734488773782, function(require, module, exports) { @@ -1505,8 +1505,8 @@ __DEFINE__(1734488773782, function(require, module, exports) {
return CryptoJS.enc.Base64;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773783, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169785, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1655,8 +1655,8 @@ __DEFINE__(1734488773783, function(require, module, exports) { @@ -1655,8 +1655,8 @@ __DEFINE__(1734488773783, function(require, module, exports) {
return CryptoJS.enc.Base64url;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773784, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169786, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -1925,8 +1925,8 @@ __DEFINE__(1734488773784, function(require, module, exports) { @@ -1925,8 +1925,8 @@ __DEFINE__(1734488773784, function(require, module, exports) {
return CryptoJS.MD5;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773785, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169787, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -2077,8 +2077,8 @@ __DEFINE__(1734488773785, function(require, module, exports) { @@ -2077,8 +2077,8 @@ __DEFINE__(1734488773785, function(require, module, exports) {
return CryptoJS.SHA1;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773786, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169788, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -2278,8 +2278,8 @@ __DEFINE__(1734488773786, function(require, module, exports) { @@ -2278,8 +2278,8 @@ __DEFINE__(1734488773786, function(require, module, exports) {
return CryptoJS.SHA256;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773787, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169789, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2360,8 +2360,8 @@ __DEFINE__(1734488773787, function(require, module, exports) { @@ -2360,8 +2360,8 @@ __DEFINE__(1734488773787, function(require, module, exports) {
return CryptoJS.SHA224;
}));
}, function(modId) { var map = {"./core":1734488773778,"./sha256":1734488773786}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773788, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./sha256":1761790169788}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169790, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2688,8 +2688,8 @@ __DEFINE__(1734488773788, function(require, module, exports) { @@ -2688,8 +2688,8 @@ __DEFINE__(1734488773788, function(require, module, exports) {
return CryptoJS.SHA512;
}));
}, function(modId) { var map = {"./core":1734488773778,"./x64-core":1734488773779}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773789, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./x64-core":1761790169781}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169791, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -2773,8 +2773,8 @@ __DEFINE__(1734488773789, function(require, module, exports) { @@ -2773,8 +2773,8 @@ __DEFINE__(1734488773789, function(require, module, exports) {
return CryptoJS.SHA384;
}));
}, function(modId) { var map = {"./core":1734488773778,"./x64-core":1734488773779,"./sha512":1734488773788}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773790, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./x64-core":1761790169781,"./sha512":1761790169790}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169792, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3101,8 +3101,8 @@ __DEFINE__(1734488773790, function(require, module, exports) { @@ -3101,8 +3101,8 @@ __DEFINE__(1734488773790, function(require, module, exports) {
return CryptoJS.SHA3;
}));
}, function(modId) { var map = {"./core":1734488773778,"./x64-core":1734488773779}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773791, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./x64-core":1761790169781}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169793, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -3370,8 +3370,8 @@ __DEFINE__(1734488773791, function(require, module, exports) { @@ -3370,8 +3370,8 @@ __DEFINE__(1734488773791, function(require, module, exports) {
return CryptoJS.RIPEMD160;
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773792, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169794, function(require, module, exports) {
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
@ -3515,8 +3515,8 @@ __DEFINE__(1734488773792, function(require, module, exports) { @@ -3515,8 +3515,8 @@ __DEFINE__(1734488773792, function(require, module, exports) {
}));
}, function(modId) { var map = {"./core":1734488773778}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773793, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169795, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3662,8 +3662,8 @@ __DEFINE__(1734488773793, function(require, module, exports) { @@ -3662,8 +3662,8 @@ __DEFINE__(1734488773793, function(require, module, exports) {
return CryptoJS.PBKDF2;
}));
}, function(modId) { var map = {"./core":1734488773778,"./sha256":1734488773786,"./hmac":1734488773792}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773794, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./sha256":1761790169788,"./hmac":1761790169794}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169796, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -3798,8 +3798,8 @@ __DEFINE__(1734488773794, function(require, module, exports) { @@ -3798,8 +3798,8 @@ __DEFINE__(1734488773794, function(require, module, exports) {
return CryptoJS.EvpKDF;
}));
}, function(modId) { var map = {"./core":1734488773778,"./sha1":1734488773785,"./hmac":1734488773792}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773795, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./sha1":1761790169787,"./hmac":1761790169794}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169797, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4695,8 +4695,8 @@ __DEFINE__(1734488773795, function(require, module, exports) { @@ -4695,8 +4695,8 @@ __DEFINE__(1734488773795, function(require, module, exports) {
}));
}, function(modId) { var map = {"./core":1734488773778,"./evpkdf":1734488773794}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773796, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./evpkdf":1761790169796}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169798, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4777,8 +4777,8 @@ __DEFINE__(1734488773796, function(require, module, exports) { @@ -4777,8 +4777,8 @@ __DEFINE__(1734488773796, function(require, module, exports) {
return CryptoJS.mode.CFB;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773797, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169799, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4837,8 +4837,8 @@ __DEFINE__(1734488773797, function(require, module, exports) { @@ -4837,8 +4837,8 @@ __DEFINE__(1734488773797, function(require, module, exports) {
return CryptoJS.mode.CTR;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773798, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169800, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -4955,8 +4955,8 @@ __DEFINE__(1734488773798, function(require, module, exports) { @@ -4955,8 +4955,8 @@ __DEFINE__(1734488773798, function(require, module, exports) {
return CryptoJS.mode.CTRGladman;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773799, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169801, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5011,8 +5011,8 @@ __DEFINE__(1734488773799, function(require, module, exports) { @@ -5011,8 +5011,8 @@ __DEFINE__(1734488773799, function(require, module, exports) {
return CryptoJS.mode.OFB;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773800, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169802, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5053,8 +5053,8 @@ __DEFINE__(1734488773800, function(require, module, exports) { @@ -5053,8 +5053,8 @@ __DEFINE__(1734488773800, function(require, module, exports) {
return CryptoJS.mode.ECB;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773801, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169803, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5104,8 +5104,8 @@ __DEFINE__(1734488773801, function(require, module, exports) { @@ -5104,8 +5104,8 @@ __DEFINE__(1734488773801, function(require, module, exports) {
return CryptoJS.pad.Ansix923;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773802, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169804, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5150,8 +5150,8 @@ __DEFINE__(1734488773802, function(require, module, exports) { @@ -5150,8 +5150,8 @@ __DEFINE__(1734488773802, function(require, module, exports) {
return CryptoJS.pad.Iso10126;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773803, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169805, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5192,8 +5192,8 @@ __DEFINE__(1734488773803, function(require, module, exports) { @@ -5192,8 +5192,8 @@ __DEFINE__(1734488773803, function(require, module, exports) {
return CryptoJS.pad.Iso97971;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773804, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169806, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5241,8 +5241,8 @@ __DEFINE__(1734488773804, function(require, module, exports) { @@ -5241,8 +5241,8 @@ __DEFINE__(1734488773804, function(require, module, exports) {
return CryptoJS.pad.ZeroPadding;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773805, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169807, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5273,8 +5273,8 @@ __DEFINE__(1734488773805, function(require, module, exports) { @@ -5273,8 +5273,8 @@ __DEFINE__(1734488773805, function(require, module, exports) {
return CryptoJS.pad.NoPadding;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773806, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169808, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5341,8 +5341,8 @@ __DEFINE__(1734488773806, function(require, module, exports) { @@ -5341,8 +5341,8 @@ __DEFINE__(1734488773806, function(require, module, exports) {
return CryptoJS.format.Hex;
}));
}, function(modId) { var map = {"./core":1734488773778,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773807, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169809, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -5577,8 +5577,8 @@ __DEFINE__(1734488773807, function(require, module, exports) { @@ -5577,8 +5577,8 @@ __DEFINE__(1734488773807, function(require, module, exports) {
return CryptoJS.AES;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773808, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169810, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6358,8 +6358,8 @@ __DEFINE__(1734488773808, function(require, module, exports) { @@ -6358,8 +6358,8 @@ __DEFINE__(1734488773808, function(require, module, exports) {
return CryptoJS.TripleDES;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773809, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169811, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6499,8 +6499,8 @@ __DEFINE__(1734488773809, function(require, module, exports) { @@ -6499,8 +6499,8 @@ __DEFINE__(1734488773809, function(require, module, exports) {
return CryptoJS.RC4;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773810, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169812, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6693,8 +6693,8 @@ __DEFINE__(1734488773810, function(require, module, exports) { @@ -6693,8 +6693,8 @@ __DEFINE__(1734488773810, function(require, module, exports) {
return CryptoJS.Rabbit;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773811, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169813, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -6885,8 +6885,8 @@ __DEFINE__(1734488773811, function(require, module, exports) { @@ -6885,8 +6885,8 @@ __DEFINE__(1734488773811, function(require, module, exports) {
return CryptoJS.RabbitLegacy;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1734488773812, function(require, module, exports) {
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
__DEFINE__(1761790169814, function(require, module, exports) {
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
@ -7358,8 +7358,8 @@ __DEFINE__(1734488773812, function(require, module, exports) { @@ -7358,8 +7358,8 @@ __DEFINE__(1734488773812, function(require, module, exports) {
return CryptoJS.Blowfish;
}));
}, function(modId) { var map = {"./core":1734488773778,"./enc-base64":1734488773782,"./md5":1734488773784,"./evpkdf":1734488773794,"./cipher-core":1734488773795}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1734488773777);
}, function(modId) { var map = {"./core":1761790169780,"./enc-base64":1761790169784,"./md5":1761790169786,"./evpkdf":1761790169796,"./cipher-core":1761790169797}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1761790169779);
})()
//miniprogram-npm-outsideDeps=["crypto"]
//# sourceMappingURL=index.js.map

1
src/miniprogram_npm/crypto-js/index.js.map

File diff suppressed because one or more lines are too long

4
src/miniprogram_npm/dayjs/index.js

File diff suppressed because one or more lines are too long

2
src/patient/pages/index/index.scss

@ -282,7 +282,7 @@ page { @@ -282,7 +282,7 @@ page {
}
.labels {
margin-top: 16rpx;
max-width: 56vw;
max-width: 64vw;
font-size: 28rpx;
color: rgba(173, 172, 178, 1);
white-space: nowrap;

2
src/patient/pages/index/index.ts

@ -472,7 +472,7 @@ Page({ @@ -472,7 +472,7 @@ Page({
data: { type: 1 },
}).then(() => {
wx.navigateTo({
url: '/patient/pages/personalInformation/index?bottom=1',
url: '/patient/pages/personalInformation/index?bottom=1&submit=1',
})
})
this.handleToastCancel(null, false)

117
src/patient/pages/liveDetail/index.ts

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/* eslint-disable eqeqeq */
import dayjs from 'dayjs'
import { parseScene } from '../../../utils/util'
const app = getApp<IAppOption>()
let live_time: null | number = null
@ -39,7 +39,8 @@ Page({ @@ -39,7 +39,8 @@ Page({
optionsScene: optionsScene || {},
id: options.id || optionsScene?.id,
})
} else if (options.proMethodId) {
}
else if (options.proMethodId) {
this.setData({
'optionsScene.proMethodId': options.proMethodId,
})
@ -112,8 +113,6 @@ Page({ @@ -112,8 +113,6 @@ Page({
data: {
Id: this.data.id,
},
}).then((res) => {
console.log('res: ', res)
})
},
getDetail() {
@ -131,7 +130,8 @@ Page({ @@ -131,7 +130,8 @@ Page({
wx.setNavigationBarTitle({
title: '会议详情',
})
} else {
}
else {
wx.setNavigationBarTitle({
title: '活动详情',
})
@ -220,25 +220,11 @@ Page({ @@ -220,25 +220,11 @@ Page({
})
},
handleSignUp() {
const { SubscribeTemplateList } = this.data.detail
app.mpBehavior({ PageName: 'BTN_PatientLiveSign' })
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
success: (res) => {
const subscribe = SubscribeTemplateList.map((item) => {
return res[item] === 'accept' ? 1 : 2
})
this.handleSignUpCallback(subscribe)
},
fail: () => {
this.handleSignUpCallback([2, 2])
},
})
},
handleSignUpCallback(res = [2, 2]) {
const { Type } = this.data.detail
const { UserType } = this.data.zdUserInfo
const optionsScene = this.data.optionsScene
const { SubscribeTemplateList } = this.data.detail
wx.ajax({
method: 'POST',
url: '?r=zd/activity/sign-up',
@ -246,7 +232,6 @@ Page({ @@ -246,7 +232,6 @@ Page({
Id: this.data.id,
PreUserIdentity: UserType,
promotionMethodId: optionsScene.proMethodId,
subscribe: [...res],
},
}).then((res) => {
app
@ -257,10 +242,44 @@ Page({ @@ -257,10 +242,44 @@ Page({
this.data.id,
)
.then(() => {
this.handleSignUpCallback()
wx.navigateTo({
url: `/patient/pages/liveResult/index?id=${this.data.id}&rewardScore=${res.rewardScore}`,
})
})
.catch(() => {
app.globalData.liveSubscribe = {
sub: true,
tmplIds: SubscribeTemplateList,
}
})
})
},
handleSignUpCallback() {
const { SubscribeTemplateList } = this.data.detail
wx.requestSubscribeMessage({
tmplIds: SubscribeTemplateList,
success: (res) => {
const subscribe = SubscribeTemplateList.map((item) => {
return res[item] === 'accept' ? 1 : 2
})
this.postSubscribe(subscribe)
},
fail: () => {
const subscribe = Array.from({ length: SubscribeTemplateList.length }).fill(2)
this.postSubscribe(subscribe)
},
})
},
postSubscribe(subscribe) {
wx.ajax({
method: 'POST',
url: '?r=zd/activity/subscribe',
data: {
ActivityId: this.data.id,
subscribe,
},
showMsg: false,
})
},
handleShare() {
@ -275,7 +294,7 @@ Page({ @@ -275,7 +294,7 @@ Page({
method: 'POST',
url: '?r=zd/activity/share',
data: { Id: this.data.id, PreUserIdentity: UserType },
}).then((res) => {
}).then(() => {
this.getDetail()
})
},
@ -285,9 +304,6 @@ Page({ @@ -285,9 +304,6 @@ Page({
latitude: LocationLAT * 1,
longitude: LocationLNG * 1,
name: Location,
fail(err) {
console.log(err)
},
})
},
handleShareClose() {
@ -304,35 +320,38 @@ Page({ @@ -304,35 +320,38 @@ Page({
const that = this
wx.getSetting({
success(res) {
console.log(res)
if (
res.authSetting['scope.writePhotosAlbum'] != undefined &&
res.authSetting['scope.writePhotosAlbum'] == true
res.authSetting['scope.writePhotosAlbum'] != undefined
&& res.authSetting['scope.writePhotosAlbum'] == true
) {
that.saveImage()
} else if (res.authSetting['scope.writePhotosAlbum'] == undefined) {
//获取当前位置
}
else if (res.authSetting['scope.writePhotosAlbum'] == undefined) {
// 获取当前位置
that.saveImage()
} else {
}
else {
wx.showModal({
title: '请求授权相册权限',
content: '需要保存海报到相册,请确认授权',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权
// 取消授权
wx.showToast({
title: '拒绝授权',
icon: 'none',
duration: 1000,
})
} else if (res.confirm) {
//确定授权,通过wx.openSetting发起授权请求
}
else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({
success(res) {
if (res.authSetting['scope.writePhotosAlbum'] == true) {
that.saveImage()
} else {
}
else {
wx.showToast({
title: '授权失败',
icon: 'none',
@ -393,12 +412,22 @@ Page({ @@ -393,12 +412,22 @@ Page({
})
},
handleOffice() {
this.setData({
popupShow: true,
popupType: 'popup6',
popupParams: {
close: true,
wx.ajax({
method: 'GET',
url: '?r=zd/common/get-channel-wx-code',
data: {
ChannelType: this.data.detail.Type == 1 ? '1' : '11',
Id: this.data.id,
},
}).then((res) => {
this.setData({
popupShow: true,
popupType: 'popup6',
popupParams: {
qrCode: res,
close: true,
},
})
})
},
handlePopupCancel() {
@ -419,10 +448,16 @@ Page({ @@ -419,10 +448,16 @@ Page({
},
handleTimeFinish() {
this.setData({
dateValue: dayjs().valueOf(),
'dateValue': dayjs().valueOf(),
'detail.LeftTime': 0,
})
},
handleLightDetail(e) {
const { index } = e.currentTarget.dataset
wx.navigateTo({
url: `/patient/pages/liveDetailVideo/index?id=${this.data.id}&index=${index}`,
})
},
onShareAppMessage() {
this.saveShare()
return {

18
src/patient/pages/liveDetail/index.wxml

@ -91,8 +91,9 @@ @@ -91,8 +91,9 @@
class="l-item"
wx:for="{{lightList}}"
wx:key="attachmentId"
bind:tap="handleLightVideo"
catch:tap="handleLightDetail"
data-url="{{item.videoUrl}}"
data-index="{{index}}"
>
<image class="photo" src="{{item.imgUrl}}" mode="aspectFill"></image>
<view class="wrap">
@ -106,7 +107,11 @@ @@ -106,7 +107,11 @@
<view class="c-title">详情介绍</view>
<image class="c-img" mode="widthFix" src="{{item.url}}" wx:for="{{detail.DetailJson}}" wx:key="name"></image>
</view>
<view class="public" wx:if="{{detail.Status==3}}" style="background: url('{{imageUrl}}bg24.png?t={{Timestamp}}') no-repeat center/100%">
<view
class="public"
wx:if="{{detail.Status==3}}"
style="background: url('{{imageUrl}}bg24.png?t={{Timestamp}}') no-repeat center/100%"
>
<image class="p-code" src="{{detail.subscribe_img}}" show-menu-by-longpress></image>
</view>
</view>
@ -174,12 +179,9 @@ @@ -174,12 +179,9 @@
</video>
</view>
<image
class="fixed-share"
wx:if="{{detail.PosterUrl}}"
src="{{imageUrl}}icon67.png?t={{Timestamp}}"
bind:tap="handleShare"
></image>
<button open-type="share" wx:if="{{detail.PosterUrl}}" class="fixed-share">
<image class="fixed-share" src="{{imageUrl}}icon67.png?t={{Timestamp}}"></image>
</button>
<van-popup show="{{shareShow}}" custom-class="custom-popup" bind:click-overlay="handleShareClose">
<view class="p-share">

9
src/patient/pages/liveDetailVideo/index.json

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"mp-video-swiper": "@miniprogram-component-plus/video-swiper",
"navbar": "/components/navbar/index",
"van-slider": "@vant/weapp/slider/index",
"star": "/components/star/index"
}
}

126
src/patient/pages/liveDetailVideo/index.scss

@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
.page {
background-color: #000;
.swiper {
width: 100vw;
height: 100vh;
.swiper-item {
position: relative;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
.video {
width: 100%;
}
.full-screen {
position: absolute;
right: 0;
color: #fff;
padding: 32rpx;
display: flex;
align-items: center;
gap: 12rpx;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.6);
.icon {
width: 40rpx;
height: 40rpx;
}
}
.play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90rpx;
height: 104rpx;
}
.swiper-item-footer {
padding: 80rpx 30rpx calc(34rpx + env(safe-area-inset-bottom));
width: 100%;
position: absolute;
bottom: 0;
left: 0;
box-sizing: border-box;
background: linear-gradient(to top, rgba(20, 20, 20, 0.88) 0%, rgba(20, 20, 20, 0) 100%);
.title {
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
}
.progress {
margin-top: 24rpx;
.slider-btn {
width: 200vw;
height: 80rpx;
}
}
.container {
margin-top: 24rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.user {
display: flex;
align-items: center;
.avatar {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
}
.name {
margin-left: 16rpx;
font-size: 28rpx;
color: rgba(255, 255, 255, 1);
}
}
.options {
padding-right: 26rpx;
display: flex;
align-items: center;
gap: 64rpx;
.o-item {
padding: 0;
margin: 0;
border: none;
outline: none;
background: transparent;
display: flex;
flex-direction: column;
align-items: center;
line-height: 1;
&::after {
border: none;
}
.icon {
width: 36rpx;
height: 36rpx;
}
.num {
margin-top: 6rpx;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
&.active {
color: rgba(246, 74, 58, 1);
}
}
}
}
}
}
}
}
}
.animate {
position: fixed;
z-index: 10000000;
right: 1000000px;
bottom: calc(env(safe-area-inset-bottom) + 110rpx);
width: 200rpx;
height: 400rpx;
&.active {
right: -20rpx;
}
}

192
src/patient/pages/liveDetailVideo/index.ts

@ -0,0 +1,192 @@ @@ -0,0 +1,192 @@
import dayjs from 'dayjs'
const licia = require('miniprogram-licia')
const app = getApp<IAppOption>()
// 组件说明文档 https://github.com/wechat-miniprogram/miniprogram-component-plus/blob/master/docs/video-swiper.md
Page({
data: {
id: '',
activeId: '',
LikeTimes: 0,
current: 0,
videoList: [] as any,
beforeLoading: false,
beforeEnd: false,
afterLoading: false,
afterEnd: false,
starShow: false,
index: 0,
offsetTop: 310,
},
onLoad(options) {
this.setData({
id: options.id,
activeId: options.id,
index: Number(options.index),
})
app.waitLogin({ type: [0, 1] }).then(() => {
this.getLightList()
})
},
getLightList() {
wx.ajax({
method: 'GET',
url: '?r=zd/activity/get-high-light-list',
data: { activityId: this.data.id },
}).then((res) => {
res.map((item: any) => {
item.duration = dayjs(item.duration * 1000).format('mm:ss')
return item
})
this.setData({
videoList: res,
current: this.data.index,
})
this.playCurrentVideo()
})
},
handleChange(e: any) {
const { beforeLoading, afterLoading, beforeEnd, afterEnd, videoList } = this.data
const { current } = e.detail
this.setData({
current,
starShow: false,
})
if (current === 0 && !beforeLoading && beforeEnd) {
this.setData({
beforeLoading: true,
})
// this.getList('before')
}
if (current === videoList.length - 1 && !afterLoading && afterEnd) {
this.setData({
afterLoading: true,
})
// this.getList('after')
}
this.playCurrentVideo()
},
playCurrentVideo() {
const { current, videoList } = this.data
videoList.forEach((item: any, index: number) => {
if (!item.ctx) {
item.ctx = wx.createVideoContext(`video-${item.attachmentId}`)
}
item.drag = false
if (index === current) {
item.ctx.play()
}
else {
item.ctx.pause()
}
})
},
handleFullScreenChange(e) {
const { index } = e.currentTarget.dataset
const fullScreenKey = `videoList[${index}].fullScreen`
this.setData({
[fullScreenKey]: e.detail.fullScreen,
})
},
handelFullScreen(e) {
const { id } = e.currentTarget.dataset
const context = wx.createVideoContext(id)
context.requestFullScreen({})
},
handleLoadedMetaData(e) {
const { index } = e.currentTarget.dataset
const offsetTopKey = `videoList[${index}].offsetTop`
const query = wx.createSelectorQuery()
query
.select(`#${e.target.id}`)
.boundingClientRect((rect) => {
this.setData({
[offsetTopKey]: rect.height + e.target.offsetTop + 10,
})
})
.exec()
},
handlePlay(e: any) {
const { index } = e.currentTarget.dataset
const key = `videoList[${index}].play`
this.setData({
[key]: true,
})
},
handlePause(e: any) {
const { index } = e.currentTarget.dataset
const key = `videoList[${index}].play`
this.setData({
[key]: false,
})
},
handleTimeUpdate(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
if (videoList[index].drag)
return
const { currentTime, duration } = e.detail
const progress = (currentTime / duration) * 100
const progressKey = `videoList[${index}].progress`
const durationKey = `videoList[${index}].duration`
this.setData({
[progressKey]: progress,
[durationKey]: duration,
})
},
handleTogglePlay(e) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
if (videoList[index].play) {
videoList[index].ctx.pause()
}
else {
videoList[index].ctx.play()
}
},
handleDragStart(e: any) {
const { index } = e.currentTarget.dataset
const key = `videoList[${index}].drag`
this.setData({
[key]: true,
})
},
handleDragEnd(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
const duration = videoList[index].duration
const drapProgress = e.detail
const currentTime = (drapProgress / 100) * duration
videoList[index].ctx.seek(currentTime)
const dragKey = `videoList[${index}].drag`
this.setData({
[dragKey]: false,
})
},
onShareAppMessage() {
const { id, current, videoList } = this.data
return {
title: videoList[current].Title,
path: `/patient/pages/liveDetailVideo/index?id=${id}&index=${current}`,
imageUrl: videoList[current].imgUrl,
}
},
handleBack() {
wx.navigateBack({
fail: () => {
wx.reLaunch({
url: `/patient/pages/liveDetail/index?id=${this.data.id}`,
})
},
})
},
})
export {}

86
src/patient/pages/liveDetailVideo/index.wxml

@ -0,0 +1,86 @@ @@ -0,0 +1,86 @@
<navbar fixed custom-style="background:{{background}};color:#fff">
<van-icon name="arrow-left" slot="left" size="18px" color="#fff" bind:tap="handleBack" />
<view slot="title" style="color: #fff">视频</view>
</navbar>
<view class="page">
<swiper class="swiper" vertical="{{true}}" current="{{current}}" bindchange="handleChange">
<swiper-item class="swiper-item" wx:for="{{videoList}}" wx:key="Id">
<video
id="video-{{item.attachmentId}}"
class="video"
src="{{item.videoUrl}}"
poster="{{item.imgUrl}}"
loop
title="{{item.title}}"
object-fit="contain"
enable-play-gesture
enable-progress-gesture
show-center-play-btn="{{false}}"
controls="{{item.fullScreen}}"
bindloadedmetadata="handleLoadedMetaData"
bindprogress="handleProgress"
bindplay="handlePlay"
bindpause="handlePause"
bindfullscreenchange="handleFullScreenChange"
bindtimeupdate="handleTimeUpdate"
data-index="{{index}}"
data-full="{{item.fullScreen}}"
></video>
<view
wx:if="{{item.offsetTop}}"
class="full-screen"
style="top:{{item.offsetTop}}px"
catch:tap="handelFullScreen"
data-id="video-{{item.attachmentId}}"
>
<image class="icon" src="{{imageUrl}}icon87.png?t={{Timestamp}}"></image>
全屏观看
</view>
<image
wx:if="{{!item.play}}"
class="play"
class="play"
src="{{imageUrl}}icon82.png?t={{Timestamp}}"
catch:tap="handleTogglePlay"
data-index="{{index}}"
></image>
<view class="swiper-item-footer">
<view class="title">{{item.title}}</view>
<view class="progress">
<van-slider
value="{{item.progress}}"
active-color="#fff"
bar-height="4"
inactive-color="rgba(255, 255, 255, 0.29)"
bind:drag-start="handleDragStart"
bind:change="handleDragEnd"
use-button-slot
data-index="{{index}}"
>
<view class="slider-btn" slot="button"></view>
</van-slider>
</view>
<view class="container">
<view class="user">
<image class="avatar" src="{{imageUrl}}logo1.png?t={{Timestamp}}"></image>
<view class="name">TED关爱小助手</view>
</view>
<view class="options">
<button class="o-item" open-type="share">
<image wx:if="{{item.IsShare}}" class="icon" src="{{imageUrl}}icon83.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon85.png?t={{Timestamp}}"></image>
<view class="num {{item.IsShare && 'active'}}">{{item.ShareTimes}}</view>
</button>
<!-- <view class="o-item" bind:tap="handleLike" data-index="{{index}}"> -->
<!-- <image wx:if="{{item.IsLike}}" class="icon" src="{{imageUrl}}icon84.png?t={{Timestamp}}"></image> -->
<!-- <image wx:else class="icon" src="{{imageUrl}}icon86.png?t={{Timestamp}}"></image> -->
<!-- <view class="num {{item.IsLike && 'active'}}">{{item.LikeTimes}}</view> -->
<!-- </view> -->
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<star id="animate" class="animate {{starShow&&'active'}}"></star>

18
src/patient/pages/liveResult/index.ts

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
const app = getApp<IAppOption>()
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
let live_time: null | number = null
Page({
@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
codeUrl: '',
dateValue: '' as string | number,
rewardScore: 0 as number | undefined,
qrCode: '',
},
onLoad(options) {
this.setData({
@ -47,6 +48,21 @@ Page({ @@ -47,6 +48,21 @@ Page({
this.setData({
detail: res,
})
this.getQrCode()
})
},
getQrCode() {
wx.ajax({
method: 'GET',
url: '?r=zd/common/get-channel-wx-code',
data: {
ChannelType: this.data.detail.Type == 1 ? '1' : '11',
Id: this.data.id,
},
}).then((res) => {
this.setData({
qrCode: res,
})
})
},
getLiveDetail() {

2
src/patient/pages/liveResult/index.wxml

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
<view class="tip">欢迎您参与此次活动</view>
<view class="office">
<view class="o-title">关注公众号,活动提醒不错过</view>
<image class="code" src="{{imageUrl}}code1.png?t={{Timestamp}}" show-menu-by-longpress></image>
<image class="code" src="{{qrCode}}" show-menu-by-longpress></image>
<view class="btn">长按识别二维码</view>
</view>
<view class="container">

8
src/patient/pages/personalInformation/index.scss

@ -39,7 +39,7 @@ page { @@ -39,7 +39,7 @@ page {
.row-sub {
margin-top: 8rpx;
font-size: 28rpx;
color: #ADACB2;
color: #adacb2;
}
.row-content {
padding-top: 24rpx;
@ -267,7 +267,7 @@ page { @@ -267,7 +267,7 @@ page {
}
.cancellation {
margin: 32rpx 0 24rpx;
margin: 32rpx 0 0;
height: 88rpx;
background: #ffffff;
border-radius: 156rpx 156rpx 156rpx 156rpx;
@ -275,10 +275,6 @@ page { @@ -275,10 +275,6 @@ page {
line-height: 96rpx;
font-size: 32rpx;
color: #c394ff;
&:last-of-type {
margin-top: 0;
border: none;
}
}
.picker {

36
src/patient/pages/personalInformation/index.ts

@ -1,10 +1,12 @@ @@ -1,10 +1,12 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
const licia = require('miniprogram-licia')
Page({
data: {
scrollBottom: '',
submit: '',
isEdit: false,
area: [] as string[][],
city: [] as string[][],
@ -65,6 +67,7 @@ Page({ @@ -65,6 +67,7 @@ Page({
if (options.bottom) {
this.setData({
scrollBottom: options.bottom,
submit: options.submit,
})
}
},
@ -105,7 +108,7 @@ Page({ @@ -105,7 +108,7 @@ Page({
formatUserInfo(res) {
this.formatBorn(res.Birth)
this.handleChaneDiagnosisTime({ detail: { value: res.DiagnosisTime } }, false)
const diagnoseTypeValue = this.data.DTList.findIndex((item) => item.id == res.DiagnoseType)
const diagnoseTypeValue = this.data.DTList.findIndex(item => item.id == res.DiagnoseType)
this.handleChangeDiagnoseType({ detail: { value: [diagnoseTypeValue] } })
this.handleDiagnoseTypeSave(false)
// this.handleTapRT();
@ -128,13 +131,15 @@ Page({ @@ -128,13 +131,15 @@ Page({
if (!Birth) {
bron = `${Birth}`
age = '岁'
} else if (Birth && Birth.split('-').length > 1) {
}
else if (Birth && Birth.split('-').length > 1) {
bron = `${Birth.split('-')[0]}${Birth.split('-')[1]}`
age =
month - Birth.split('-')[1] >= 0
age
= month - Birth.split('-')[1] >= 0
? `${year - Birth.split('-')[0]}${month - Birth.split('-')[1]}个月`
: `${year - Birth.split('-')[0] - 1}${12 - Birth.split('-')[1] + month}个月`
} else {
}
else {
bron = `${Birth}`
age = `${year - Birth}`
}
@ -155,7 +160,7 @@ Page({ @@ -155,7 +160,7 @@ Page({
handleChaneDiagnosisTime(e, update = true) {
const DiagnosisTime = e.detail.value
this.setData({
DiagnosisTime: dayjs(DiagnosisTime).format('YYYY年MM月'),
'DiagnosisTime': dayjs(DiagnosisTime).format('YYYY年MM月'),
'zdUserInfo.DiagnosisTime': DiagnosisTime,
})
this.updateUserInfo(update)
@ -171,7 +176,7 @@ Page({ @@ -171,7 +176,7 @@ Page({
const value = e.detail.value
const id = this.data.RTList.filter((_item, index) => index == value)[0]?.id
this.setData({
rtValue: value,
'rtValue': value,
'zdUserInfo.RelationType': id,
})
this.updateUserInfo(update)
@ -180,7 +185,7 @@ Page({ @@ -180,7 +185,7 @@ Page({
const value = e.detail.value
const id = this.data.GenderList.filter((_item, index) => index == value)[0]?.id
this.setData({
genderValue: value,
'genderValue': value,
'zdUserInfo.Gender': id,
})
this.updateUserInfo(update)
@ -189,7 +194,7 @@ Page({ @@ -189,7 +194,7 @@ Page({
const value = e.detail.value
const id = this.data.dict.AgeRange.filter((_item, index) => index == value)[0]?.id
this.setData({
ageRangeValue: value,
'ageRangeValue': value,
'zdUserInfo.AgeRange': id,
})
this.updateUserInfo(update)
@ -198,7 +203,7 @@ Page({ @@ -198,7 +203,7 @@ Page({
const rangeIndex = this.data.selectDiagnoseTypeIndex
const id = this.data.DTList.filter((_item, index) => index == rangeIndex)[0]?.id
this.setData({
diagnoseTypeValue: rangeIndex,
'diagnoseTypeValue': rangeIndex,
'zdUserInfo.DiagnoseType': id,
})
if (update) {
@ -233,9 +238,10 @@ Page({ @@ -233,9 +238,10 @@ Page({
this.updateUserInfo()
},
updateUserInfo(update = true) {
if (!update) return
const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...zdUserInfo } =
this.data.zdUserInfo
if (!update)
return
const { PatientName, RelationType, Gender, Birth, DiagnosisTime, DiagnoseType, ...zdUserInfo }
= this.data.zdUserInfo
wx.ajax({
method: 'POST',
url: '?r=zd/account/update-info',
@ -290,8 +296,8 @@ Page({ @@ -290,8 +296,8 @@ Page({
},
handlePopupOk() {
this.setData({
popupShow: false,
popupType: '',
'popupShow': false,
'popupType': '',
'zdUserInfo.prescriptionImg': '',
})
this.updateUserInfo()

14
src/patient/pages/personalInformation/index.wxml

@ -179,7 +179,12 @@ @@ -179,7 +179,12 @@
<view class="del" catchtap="handleDelData" wx:if="{{zdUserInfo.DrugsAuditStatus==2}}">
<image class="d-icon" src="{{imageUrl}}icon77.png?t={{Timestamp}}"></image>
</view>
<image class="img" src="{{zdUserInfo.PrescriptionImg}}" mode="aspectFill" catch:tap="handlePreview"></image>
<image
class="img"
src="{{zdUserInfo.PrescriptionImg}}"
mode="aspectFill"
catch:tap="handlePreview"
></image>
<view class="check" wx:if="{{zdUserInfo.DrugsAuditStatus==1}}">
<image class="check-icon" src="{{imageUrl}}icon81.png?t={{Timestamp}}"></image>
审核中...
@ -197,8 +202,11 @@ @@ -197,8 +202,11 @@
</block>
</view>
</view>
<view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view>
<view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销账号</view>
<view wx:if="{{submit}}" class="cancellation" bind:tap="routerTo" data-url="/patient/pages/my/index">提交</view>
<block wx:else>
<view class="cancellation" bind:tap="routerTo" data-url="/pages/login/index?back=1">切换医生端</view>
<view wx:if="{{zdUserInfo.IsRootUser==1}}" class="cancellation" bind:tap="handleLogout">注销账号</view>
</block>
</view>
<van-popup

2
typings/index.d.ts vendored

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
declare module 'miniprogram-licia';
type pageType = 0 | 1 | 2
interface IAppOption {
globalData: {

Loading…
Cancel
Save