Browse Source

亮点视频详情

lightspot
kola-web 1 month ago
parent
commit
514a114123
  1. 1
      package.json
  2. 8
      pnpm-lock.yaml
  3. 2
      project.config.json
  4. 1
      src/app.json
  5. 12
      src/app.ts
  6. BIN
      src/images/icon82.png
  7. BIN
      src/images/icon83.png
  8. BIN
      src/images/icon84.png
  9. BIN
      src/images/icon85.png
  10. BIN
      src/images/icon86.png
  11. 254
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.js
  12. 4
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.json
  13. 37
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxml
  14. 1
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxss
  15. 144
      src/miniprogram_npm/crypto-js/index.js
  16. 1
      src/miniprogram_npm/crypto-js/index.js.map
  17. 4
      src/miniprogram_npm/dayjs/index.js
  18. 13
      src/patient/pages/liveDetail/index.ts
  19. 4
      src/patient/pages/liveDetail/index.wxml
  20. 9
      src/patient/pages/liveDetailVideo/index.json
  21. 109
      src/patient/pages/liveDetailVideo/index.scss
  22. 194
      src/patient/pages/liveDetailVideo/index.ts
  23. 74
      src/patient/pages/liveDetailVideo/index.wxml

1
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",

8
pnpm-lock.yaml

@ -8,6 +8,9 @@ importers: @@ -8,6 +8,9 @@ importers:
.:
dependencies:
'@miniprogram-component-plus/video-swiper':
specifier: ^1.0.1
version: 1.0.1
'@vant/weapp':
specifier: ^1.11.6
version: 1.11.6
@ -214,6 +217,9 @@ packages: @@ -214,6 +217,9 @@ packages:
'@jridgewell/sourcemap-codec@1.5.0':
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
'@miniprogram-component-plus/video-swiper@1.0.1':
resolution: {integrity: sha512-1rlmsS3/TR0Zu0nZHwEwb9UCQWY/ofPv73zU56FLfZh72Xw+BcIzfohrDxrGs5QpoL4KCLl9G7UB5w+3ZRSZzQ==}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@ -1657,6 +1663,8 @@ snapshots: @@ -1657,6 +1663,8 @@ snapshots:
'@jridgewell/sourcemap-codec@1.5.0': {}
'@miniprogram-component-plus/video-swiper@1.0.1': {}
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5

2
project.config.json

@ -71,5 +71,5 @@ @@ -71,5 +71,5 @@
}
]
},
"appid": "wx71ac9c27c3c3e3f4"
"appid": "wxf9ce8010f1ad24aa"
}

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",

12
src/app.ts

@ -16,15 +16,15 @@ App<IAppOption>({ @@ -16,15 +16,15 @@ App<IAppOption>({
// 测试号 wx2b0bb13edf717c1d
// dev
// appid:wxf9ce8010f1ad24aa
// url: 'https://m.xd.hbraas.com',
// upFileUrl: 'https://m.xd.hbraas.com/',
// imageUrl: 'https://m.xd.hbraas.com/xd/',
url: 'https://m.xd.hbraas.com',
upFileUrl: 'https://m.xd.hbraas.com/',
imageUrl: 'https://m.xd.hbraas.com/xd/',
// pro
// appid:wx71ac9c27c3c3e3f4
url: 'https://m.xd.hbsaas.com',
upFileUrl: 'https://m.xd.hbsaas.com/',
imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
// url: 'https://m.xd.hbsaas.com',
// upFileUrl: 'https://m.xd.hbsaas.com/',
// imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
loginState: '',
isLogin: 0,

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

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

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

@ -112,8 +112,6 @@ Page({ @@ -112,8 +112,6 @@ Page({
data: {
Id: this.data.id,
},
}).then((res) => {
console.log('res: ', res)
})
},
getDetail() {
@ -275,7 +273,7 @@ Page({ @@ -275,7 +273,7 @@ Page({
method: 'POST',
url: '?r=zd/activity/share',
data: { Id: this.data.id, PreUserIdentity: UserType },
}).then((res) => {
}).then(() => {
this.getDetail()
})
},
@ -285,9 +283,6 @@ Page({ @@ -285,9 +283,6 @@ Page({
latitude: LocationLAT * 1,
longitude: LocationLNG * 1,
name: Location,
fail(err) {
console.log(err)
},
})
},
handleShareClose() {
@ -304,7 +299,6 @@ Page({ @@ -304,7 +299,6 @@ Page({
const that = this
wx.getSetting({
success(res) {
console.log(res)
if (
res.authSetting['scope.writePhotosAlbum'] != undefined &&
res.authSetting['scope.writePhotosAlbum'] == true
@ -423,6 +417,11 @@ Page({ @@ -423,6 +417,11 @@ Page({
'detail.LeftTime': 0,
})
},
handleLightDetail() {
wx.navigateTo({
url: `/patient/pages/liveDetailVideo/index?id=${this.data.id}`,
})
},
onShareAppMessage() {
this.saveShare()
return {

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

@ -84,14 +84,14 @@ @@ -84,14 +84,14 @@
</swiper-item>
</swiper>
</view>
<view class="lightspot" wx:if="{{lightList.length}}">
<view class="lightspot" wx:if="{{lightList.length}}" bind:tap="handleLightDetail">
<view class="l-title">直播亮点</view>
<view class="l-list">
<view
class="l-item"
wx:for="{{lightList}}"
wx:key="attachmentId"
bind:tap="handleLightVideo"
catch:tap="handleLightVideo"
data-url="{{item.videoUrl}}"
>
<image class="photo" src="{{item.imgUrl}}" mode="aspectFill"></image>

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"
}
}

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

@ -0,0 +1,109 @@ @@ -0,0 +1,109 @@
.page {
background-color: #000;
.swiper {
width: 100vw;
height: 100vh;
.swiper-item {
position: relative;
width: 100vw;
height: 100vh;
.video {
width: 100%;
height: 100%;
}
.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;
}
}

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

@ -0,0 +1,194 @@ @@ -0,0 +1,194 @@
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,
},
onLoad(options) {
this.setData({
id: options.id,
activeId: options.id,
})
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,
})
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()
}
})
},
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,
})
},
_timer: null as any,
handleLike(e: any) {
const { index } = e.currentTarget.dataset
const { videoList } = this.data
const currentVideo = videoList[index]
const LikeTimes = Number(currentVideo.LikeTimes) + 1
const key = `videoList[${index}].LikeTimes`
this.setData({
LikeTimes: this.data.LikeTimes + 1,
[key]: LikeTimes,
[`videoList[${index}].IsLike`]: true,
starShow: true,
})
const header = this.selectComponent('#animate')
header.start()
if (this._timer) {
clearInterval(this._timer)
}
this._timer = setTimeout(() => {
this.setData({
starShow: false,
})
}, 2000)
this.likePost()
},
likePost: licia.debounce(function (this: any) {
const { activeId, LikeTimes } = this.data
this.setData({
LikeTimes: 0,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/knowledge/like',
data: {
Id: activeId,
LikeTimes,
},
})
}, 1000),
onShareAppMessage() {
const { current, videoList } = this.data
const currentVideo = videoList[current]
this.setData({
[`videoList[${current}].ShareTimes`]: Number(currentVideo.ShareTimes) + 1,
[`videoList[${current}].IsShare`]: true,
})
wx.ajax({
method: 'POST',
url: '?r=wtx/knowledge/share',
data: { Id: this.data.activeId },
})
},
handleBack() {
wx.navigateBack()
},
})
export {}

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

@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
<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
object-fit="contain"
enable-play-gesture
enable-progress-gesture
show-center-play-btn="{{false}}"
play-btn-position="center"
controls="{{false}}"
bindprogress="handleProgress"
bindplay="handlePlay"
bindpause="handlePause"
bindtimeupdate="handleTimeUpdate"
data-index="{{index}}"
bind:tap="handleTogglePlay"
></video>
<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">基因知识库</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>
Loading…
Cancel
Save