@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
{ |
||||
"component": true, |
||||
"usingComponents": { |
||||
"van-popup": "@vant/weapp/popup/index" |
||||
} |
||||
} |
@ -0,0 +1,60 @@
@@ -0,0 +1,60 @@
|
||||
.login1 { |
||||
.logo { |
||||
position: relative; |
||||
z-index: 1; |
||||
display: block; |
||||
margin: 0 auto -82rpx; |
||||
width: 164rpx; |
||||
height: 164rpx; |
||||
} |
||||
.container { |
||||
width: 100%; |
||||
box-sizing: border-box; |
||||
border-radius: 32rpx 0; |
||||
padding: 136rpx 60rpx calc(env(safe-area-inset-bottom) + 64rpx); |
||||
background: linear-gradient(6deg, #ffffff 0%, #ffe6e4 100%); |
||||
.title { |
||||
text-align: center; |
||||
color: rgba(1, 1, 5, 1); |
||||
font-size: 40rpx; |
||||
font-weight: bold; |
||||
} |
||||
.content { |
||||
margin-top: 16rpx; |
||||
font-size: 32rpx; |
||||
color: rgba(1, 1, 5, 1); |
||||
text-align: center; |
||||
} |
||||
.btn { |
||||
margin-top: 64rpx; |
||||
height: 88rpx; |
||||
background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); |
||||
border-radius: 84rpx; |
||||
border: none; |
||||
outline: none; |
||||
font-size: 32rpx; |
||||
color: rgba(247, 247, 247, 1); |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
&::after { |
||||
border: none; |
||||
} |
||||
} |
||||
.check { |
||||
margin-top: 40rpx; |
||||
display: flex; |
||||
align-items: center; |
||||
.checkbox { |
||||
transform: scale(0.8); |
||||
} |
||||
.check-content { |
||||
font-size: 32rpx; |
||||
color: rgba(1, 1, 5, 0.3); |
||||
.link { |
||||
color: rgba(242, 58, 47, 1); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
const _app = getApp<IAppOption>() |
||||
|
||||
Component({ |
||||
properties: { |
||||
show: { |
||||
type: Boolean, |
||||
value: false, |
||||
}, |
||||
}, |
||||
data: {}, |
||||
methods: { |
||||
handleOk() { |
||||
this.setData({ |
||||
show: false, |
||||
}) |
||||
this.triggerEvent('ok') |
||||
}, |
||||
handleCancel() { |
||||
this.setData({ |
||||
show: false, |
||||
}) |
||||
this.triggerEvent('cancel') |
||||
}, |
||||
}, |
||||
}) |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
<van-popup |
||||
bind:click-overlay="handleCancel" |
||||
round |
||||
z-index="{{100000}}" |
||||
show="{{ show }}" |
||||
position="bottom" |
||||
safe-area-inset-bottom="{{false}}" |
||||
custom-style="background:transparent;" |
||||
> |
||||
<view class="login1"> |
||||
<image class="logo" src="/images/logo1.png"></image> |
||||
<view class="container"> |
||||
<view class="title">立即授权</view> |
||||
<view class="content">解锁更多基因治疗知识</view> |
||||
<button class="btn">手机号快速授权</button> |
||||
<view class="check"> |
||||
<checkbox class="checkbox" color="#ee5a4a"></checkbox> |
||||
<view class="check-content"> |
||||
我已阅读并同意 |
||||
<text class="link">《个人信息及隐私政策》</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</van-popup> |
@ -1,15 +1,17 @@
@@ -1,15 +1,17 @@
|
||||
<van-nav-bar |
||||
title="{{title === 'slot' ? '' : title}}" |
||||
title="{{title}}" |
||||
fixed="{{fixed}}" |
||||
placeholder="{{placeholder}}" |
||||
leftText="{{leftText === 'slot' ? '' : leftText}}" |
||||
rightText="{{rightText === 'slot' ? '' : rightText}}" |
||||
leftText="{{leftText}}" |
||||
rightText="{{rightText}}" |
||||
customStyle="{{customStyle}}" |
||||
leftArrow="{{leftArrow}}" |
||||
border="{{border}}" |
||||
zIndex="{{zIndex}}" |
||||
bind:click-left="onClickLeft" |
||||
bind:click-right="onClickRight" |
||||
> |
||||
<slot wx:if="{{title==='slot'}}" slot="title"></slot> |
||||
<slot wx:if="{{leftText==='slot'}}" slot="left"></slot> |
||||
<slot wx:if="{{rightText==='slot'}}" slot="right"></slot> |
||||
<slot name="left" slot="left"></slot> |
||||
<slot name="title" slot="title"></slot> |
||||
<slot name="right" slot="right"></slot> |
||||
</van-nav-bar> |
||||
|
After Width: | Height: | Size: 502 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 263 KiB |
After Width: | Height: | Size: 536 KiB |
After Width: | Height: | Size: 636 KiB |
After Width: | Height: | Size: 744 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 936 B |
After Width: | Height: | Size: 633 B |
After Width: | Height: | Size: 955 B |
After Width: | Height: | Size: 516 B |
After Width: | Height: | Size: 44 KiB |
@ -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)); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
/***/ }) |
||||
/******/ ]); |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
{ |
||||
"component": true, |
||||
"usingComponents": {} |
||||
} |
@ -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> |
||||
|
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
.container{width:100%;height:100%}.video-swiper{width:100%;height:100%}.video_item{height:100%;width:100%} |
@ -1 +1 @@
@@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-image{display:inline-block;position:relative}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important} |
||||
@import '../common/index.wxss';.van-image{display:inline-block;position:relative;vertical-align:top}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important} |
@ -1 +1 @@
@@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1} |
||||
@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{bottom:0;position:absolute;right:0;top:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1} |
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
var Emitter = require('./Emitter'); |
||||
var each = require('./each'); |
||||
var remove = require('./remove'); |
||||
var some = require('./some'); |
||||
exports = Emitter.extend({ |
||||
initialize: function Channel() { |
||||
this._connections = []; |
||||
this.callSuper(Emitter, 'initialize'); |
||||
}, |
||||
send: function(msg) { |
||||
var _this = this; |
||||
each(this._connections, function(connection) { |
||||
connection.emit('message', msg, _this); |
||||
}); |
||||
}, |
||||
connect: function(connection) { |
||||
if (this.isConnected(connection)) { |
||||
return; |
||||
} |
||||
this._connections.push(connection); |
||||
connection.connect(this); |
||||
}, |
||||
disconnect: function(connection) { |
||||
if (!this.isConnected(connection)) { |
||||
return; |
||||
} |
||||
remove(this._connections, function(item) { |
||||
return item === connection; |
||||
}); |
||||
connection.disconnect(this); |
||||
}, |
||||
isConnected: function(connection) { |
||||
if (connection === this) { |
||||
throw new Error('Channel cannot be connected to itself.'); |
||||
} |
||||
return some(this._connections, function(item) { |
||||
return item === connection; |
||||
}); |
||||
}, |
||||
destroy: function() { |
||||
var _this2 = this; |
||||
each(this._connections, function(connection) { |
||||
_this2.disconnect(connection); |
||||
}); |
||||
} |
||||
}); |
||||
|
||||
module.exports = exports; |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
var isDataUrl = require('./isDataUrl'); |
||||
var trim = require('./trim'); |
||||
var endWith = require('./endWith'); |
||||
var startWith = require('./startWith'); |
||||
var contain = require('./contain'); |
||||
var decodeUriComponent = require('./decodeUriComponent'); |
||||
var defaults = require('./defaults'); |
||||
var isStr = require('./isStr'); |
||||
var convertBin = require('./convertBin'); |
||||
exports = { |
||||
parse: function(dataUrl) { |
||||
if (!isDataUrl(dataUrl)) { |
||||
return null; |
||||
} |
||||
dataUrl = dataUrl.slice('data:'.length); |
||||
var commaIdx = dataUrl.indexOf(','); |
||||
var mime = trim(dataUrl.slice(0, commaIdx)); |
||||
var data = trim(dataUrl.slice(commaIdx + 1)); |
||||
var base64 = false; |
||||
if (endWith(mime, ';base64')) { |
||||
base64 = true; |
||||
mime = mime.slice(0, -';base64'.length); |
||||
} |
||||
var charset = ''; |
||||
if (contain(mime, 'charset=')) { |
||||
charset = mime.split('charset=')[1]; |
||||
mime = mime.split(';')[0]; |
||||
} |
||||
if (!mime) { |
||||
mime = 'text/plain'; |
||||
} |
||||
if (!base64 && startWith(mime, 'text/') && contain(data, '%')) { |
||||
data = decodeUriComponent(data); |
||||
} |
||||
return { |
||||
data: data, |
||||
mime: mime, |
||||
charset: charset, |
||||
base64: base64 |
||||
}; |
||||
}, |
||||
stringify: function(data, mime) { |
||||
var options = |
||||
arguments.length > 2 && arguments[2] !== undefined |
||||
? arguments[2] |
||||
: {}; |
||||
defaults(options, { |
||||
base64: true, |
||||
charset: '' |
||||
}); |
||||
var result = 'data:' + mime; |
||||
if (options.charset && startWith(mime, 'text/')) { |
||||
result += ';charset=' + options.charset; |
||||
} |
||||
if (!isStr(data)) { |
||||
data = convertBin(data, 'base64'); |
||||
options.base64 = true; |
||||
} |
||||
if (options.base64) { |
||||
result += ';base64'; |
||||
} else if (startWith(mime, 'text/') || !mime) { |
||||
data = encodeURIComponent(data); |
||||
} |
||||
return result + ',' + data; |
||||
} |
||||
}; |
||||
|
||||
module.exports = exports; |
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
exports = { |
||||
getInt8: function(buf, offset) { |
||||
return (buf[offset] << 24) >> 24; |
||||
}, |
||||
getInt16: function(buf, offset, le) { |
||||
if (le) { |
||||
return ((buf[offset] | (buf[offset + 1] << 8)) << 16) >> 16; |
||||
} else { |
||||
return (((buf[offset] << 8) | buf[offset + 1]) << 16) >> 16; |
||||
} |
||||
}, |
||||
setInt16: function(buf, offset, val, le) { |
||||
if (le) { |
||||
buf[offset] = val; |
||||
buf[offset + 1] = val >> 8; |
||||
} else { |
||||
buf[offset] = val >> 8; |
||||
buf[offset + 1] = val; |
||||
} |
||||
}, |
||||
getUint16: function(buf, offset, le) { |
||||
if (le) { |
||||
return buf[offset] | (buf[offset + 1] << 8); |
||||
} else { |
||||
return buf[offset + 1] | (buf[offset] << 8); |
||||
} |
||||
}, |
||||
setUint16: function(buf, offset, val, le) { |
||||
if (le) { |
||||
buf[offset] = val; |
||||
buf[offset + 1] = val >> 8; |
||||
} else { |
||||
buf[offset] = val >> 8; |
||||
buf[offset + 1] = val; |
||||
} |
||||
}, |
||||
getInt32: function(buf, offset, le) { |
||||
if (le) { |
||||
return ( |
||||
buf[offset] | |
||||
(buf[offset + 1] << 8) | |
||||
(buf[offset + 2] << 16) | |
||||
(buf[offset + 3] << 24) |
||||
); |
||||
} else { |
||||
return ( |
||||
(buf[offset] << 24) | |
||||
(buf[offset + 1] << 16) | |
||||
(buf[offset + 2] << 8) | |
||||
buf[offset + 3] |
||||
); |
||||
} |
||||
}, |
||||
setInt32: function(buf, offset, val, le) { |
||||
if (le) { |
||||
buf[offset] = val; |
||||
buf[offset + 1] = val >> 8; |
||||
buf[offset + 2] = val >> 16; |
||||
buf[offset + 3] = val >> 24; |
||||
} else { |
||||
buf[offset] = val >> 24; |
||||
buf[offset + 1] = val >> 16; |
||||
buf[offset + 2] = val >> 8; |
||||
buf[offset + 3] = val; |
||||
} |
||||
}, |
||||
getUint32: function(buf, offset, le) { |
||||
return this.getInt32(buf, offset, le) >>> 0; |
||||
}, |
||||
setUint32: function(buf, offset, val, le) { |
||||
this.setInt32(buf, offset, val, le); |
||||
} |
||||
}; |
||||
|
||||
module.exports = exports; |
@ -1,9 +1,25 @@
@@ -1,9 +1,25 @@
|
||||
var isStr = require('./isStr'); |
||||
var toNum = require('./toNum'); |
||||
exports = function(bytes) { |
||||
if (bytes <= 0) return '0'; |
||||
var suffixIdx = Math.floor(Math.log(bytes) / Math.log(1024)); |
||||
var val = bytes / Math.pow(2, suffixIdx * 10); |
||||
return +val.toFixed(2) + suffixList[suffixIdx]; |
||||
if (isStr(bytes)) { |
||||
var match = bytes.match(regStrSize); |
||||
if (!match) return 0; |
||||
return Math.round(toNum(match[1]) * factor[match[2] || 'B']); |
||||
} else { |
||||
if (bytes <= 0) return '0'; |
||||
var suffixIdx = Math.floor(Math.log(bytes) / Math.log(1024)); |
||||
var val = bytes / Math.pow(2, suffixIdx * 10); |
||||
return +val.toFixed(2) + suffixList[suffixIdx]; |
||||
} |
||||
}; |
||||
var factor = { |
||||
B: 1, |
||||
K: 1024 |
||||
}; |
||||
factor.M = factor.K * 1024; |
||||
factor.G = factor.M * 1024; |
||||
factor.T = factor.G * 1024; |
||||
var suffixList = ['', 'K', 'M', 'G', 'T']; |
||||
var regStrSize = /^(\d+(?:\.\d+)?) *(K|M|G|T)?$/; |
||||
|
||||
module.exports = exports; |
||||
|
@ -1,6 +1,12 @@
@@ -1,6 +1,12 @@
|
||||
var objToStr = require('./objToStr'); |
||||
exports = function(val) { |
||||
return objToStr(val) === '[object Error]'; |
||||
switch (objToStr(val)) { |
||||
case '[object Error]': |
||||
case '[object DOMException]': |
||||
return true; |
||||
default: |
||||
return val instanceof Error; |
||||
} |
||||
}; |
||||
|
||||
module.exports = exports; |
||||
|
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
var detectOs = require('./detectOs'); |
||||
exports = detectOs() === 'os x'; |
||||
|
||||
module.exports = exports; |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
var detectOs = require('./detectOs'); |
||||
exports = detectOs() === 'windows'; |
||||
|
||||
module.exports = exports; |
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
var has = require('./has'); |
||||
exports = function(fn) { |
||||
var hashFn = |
||||
arguments.length > 1 && arguments[1] !== undefined |
||||
? arguments[1] |
||||
: JSON.stringify; |
||||
var singleton = function() { |
||||
var cache = singleton.cache; |
||||
var address = hashFn.apply(this, arguments); |
||||
if (has(cache, address)) { |
||||
return cache[address]; |
||||
} |
||||
var promise = fn.apply(this, arguments).finally(function() { |
||||
delete cache[address]; |
||||
}); |
||||
cache[address] = promise; |
||||
return promise; |
||||
}; |
||||
singleton.cache = {}; |
||||
return singleton; |
||||
}; |
||||
|
||||
module.exports = exports; |
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*! |
||||
* mp-html v2.4.2 |
||||
* mp-html v2.5.1 |
||||
* https://github.com/jin-yufeng/mp-html
|
||||
* |
||||
* Released under the MIT license |
||||
* Author: Jin Yufeng |
||||
*/ |
||||
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:Boolean,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}}); |
||||
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}}); |
@ -1 +1 @@
@@ -1 +1 @@
|
||||
"use strict";function t(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}Component({data:{ctrl:{},isiOS:wx.getSystemInfoSync().system.includes("iOS")},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),i=this.data.childs[e[0]],r=1;r<e.length;r++)i=i.children[e[r]];return i}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){if(this.root.triggerEvent("play"),this.root.data.pauseVideo){for(var e=!1,i=t.target.id,r=this.root._videos.length;r--;)this.root._videos[r].id===i?e=!0:this.root._videos[r].pause();if(!e){var o=wx.createVideoContext(i,this);o.id=i,this.root.playbackRate&&o.playbackRate(this.root.playbackRate),this.root._videos.push(o)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var i=this.root.imgList[e.i];wx.previewImage({showmenu:this.root.data.showImgMenu,current:i,urls:this.root.imgList})}},imgLoad:function(e){var i,r=e.target.dataset.i,o=this.getNode(r);o.w?(this.data.opts[1]&&!this.data.ctrl[r]||-1===this.data.ctrl[r])&&(i=1):i=e.detail.width,i&&this.setData(t({},"ctrl."+r,i)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},i=e.attrs||t,r=i.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},i)),r&&("#"===r[0]?this.root.navigateTo(r.substring(1)).catch(function(){}):r.split("?")[0].includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:r,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:r,fail:function(){wx.switchTab({url:r,fail:function(){}})}}))},mediaError:function(e){var i=e.target.dataset.i,r=this.getNode(i);if("video"===r.name||"audio"===r.name){var o=(this.data.ctrl[i]||0)+1;if(o>r.src.length&&(o=0),o<r.src.length)return this.setData(t({},"ctrl."+i,o))}else"img"===r.name&&(this.data.opts[2]&&this.setData(t({},"ctrl."+i,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:r.name,attrs:r.attrs,errMsg:e.detail.errMsg})}}}); |
||||
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{},isiOS:wx.getSystemInfoSync().system.includes("iOS")},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,s=t.target.id,a=this.root._videos.length;a--;)this.root._videos[a].id===s?o=!0:this.root._videos[a].pause();if(!o){var n=wx.createVideoContext(s,this);n.id=s,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];wx.previewImage({showmenu:this.root.data.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:i,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:i,fail:function(){wx.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}}); |
@ -1 +1 @@
@@ -1 +1 @@
|
||||
<wxs module="isInline">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n,i){return e[n]||-1!==(i||"").indexOf("inline")};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><rich-text wx:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block wx:else><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':'')}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text wx:elif="{{n.text}}" user-select="{{opts[4]=='force'&&isiOS}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" user-select="{{opts[4]}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block> |
||||
<wxs module="isInline">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n,i){return e[n]||-1!==(i||"").indexOf("inline")};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><rich-text wx:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block wx:else><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text wx:elif="{{n.text}}" user-select="{{opts[4]=='force'&&isiOS}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">{{'\n'}}</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" user-select="{{opts[4]}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block> |
@ -0,0 +1,319 @@
@@ -0,0 +1,319 @@
|
||||
module.exports = (function() { |
||||
var __MODS__ = {}; |
||||
var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; }; |
||||
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__(1748240909779, function(require, module, exports) { |
||||
/*! ***************************************************************************** |
||||
Copyright (c) Microsoft Corporation. |
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any |
||||
purpose with or without fee is hereby granted. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
||||
PERFORMANCE OF THIS SOFTWARE. |
||||
***************************************************************************** */ |
||||
/* global global, define, System, Reflect, Promise */ |
||||
var __extends; |
||||
var __assign; |
||||
var __rest; |
||||
var __decorate; |
||||
var __param; |
||||
var __metadata; |
||||
var __awaiter; |
||||
var __generator; |
||||
var __exportStar; |
||||
var __values; |
||||
var __read; |
||||
var __spread; |
||||
var __spreadArrays; |
||||
var __spreadArray; |
||||
var __await; |
||||
var __asyncGenerator; |
||||
var __asyncDelegator; |
||||
var __asyncValues; |
||||
var __makeTemplateObject; |
||||
var __importStar; |
||||
var __importDefault; |
||||
var __classPrivateFieldGet; |
||||
var __classPrivateFieldSet; |
||||
var __createBinding; |
||||
(function (factory) { |
||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; |
||||
if (typeof define === "function" && define.amd) { |
||||
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); |
||||
} |
||||
else if (typeof module === "object" && typeof module.exports === "object") { |
||||
factory(createExporter(root, createExporter(module.exports))); |
||||
} |
||||
else { |
||||
factory(createExporter(root)); |
||||
} |
||||
function createExporter(exports, previous) { |
||||
if (exports !== root) { |
||||
if (typeof Object.create === "function") { |
||||
Object.defineProperty(exports, "__esModule", { value: true }); |
||||
} |
||||
else { |
||||
exports.__esModule = true; |
||||
} |
||||
} |
||||
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; |
||||
} |
||||
}) |
||||
(function (exporter) { |
||||
var extendStatics = Object.setPrototypeOf || |
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; |
||||
|
||||
__extends = function (d, b) { |
||||
if (typeof b !== "function" && b !== null) |
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); |
||||
extendStatics(d, b); |
||||
function __() { this.constructor = d; } |
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
||||
}; |
||||
|
||||
__assign = Object.assign || function (t) { |
||||
for (var s, i = 1, n = arguments.length; i < n; i++) { |
||||
s = arguments[i]; |
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
||||
} |
||||
return t; |
||||
}; |
||||
|
||||
__rest = function (s, e) { |
||||
var t = {}; |
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) |
||||
t[p] = s[p]; |
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function") |
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { |
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) |
||||
t[p[i]] = s[p[i]]; |
||||
} |
||||
return t; |
||||
}; |
||||
|
||||
__decorate = function (decorators, target, key, desc) { |
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
||||
return c > 3 && r && Object.defineProperty(target, key, r), r; |
||||
}; |
||||
|
||||
__param = function (paramIndex, decorator) { |
||||
return function (target, key) { decorator(target, key, paramIndex); } |
||||
}; |
||||
|
||||
__metadata = function (metadataKey, metadataValue) { |
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); |
||||
}; |
||||
|
||||
__awaiter = function (thisArg, _arguments, P, generator) { |
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
||||
return new (P || (P = Promise))(function (resolve, reject) { |
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
||||
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
||||
}); |
||||
}; |
||||
|
||||
__generator = function (thisArg, body) { |
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; |
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; |
||||
function verb(n) { return function (v) { return step([n, v]); }; } |
||||
function step(op) { |
||||
if (f) throw new TypeError("Generator is already executing."); |
||||
while (_) try { |
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; |
||||
if (y = 0, t) op = [op[0] & 2, t.value]; |
||||
switch (op[0]) { |
||||
case 0: case 1: t = op; break; |
||||
case 4: _.label++; return { value: op[1], done: false }; |
||||
case 5: _.label++; y = op[1]; op = [0]; continue; |
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue; |
||||
default: |
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } |
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } |
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } |
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } |
||||
if (t[2]) _.ops.pop(); |
||||
_.trys.pop(); continue; |
||||
} |
||||
op = body.call(thisArg, _); |
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } |
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; |
||||
} |
||||
}; |
||||
|
||||
__exportStar = function(m, o) { |
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); |
||||
}; |
||||
|
||||
__createBinding = Object.create ? (function(o, m, k, k2) { |
||||
if (k2 === undefined) k2 = k; |
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); |
||||
}) : (function(o, m, k, k2) { |
||||
if (k2 === undefined) k2 = k; |
||||
o[k2] = m[k]; |
||||
}); |
||||
|
||||
__values = function (o) { |
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; |
||||
if (m) return m.call(o); |
||||
if (o && typeof o.length === "number") return { |
||||
next: function () { |
||||
if (o && i >= o.length) o = void 0; |
||||
return { value: o && o[i++], done: !o }; |
||||
} |
||||
}; |
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); |
||||
}; |
||||
|
||||
__read = function (o, n) { |
||||
var m = typeof Symbol === "function" && o[Symbol.iterator]; |
||||
if (!m) return o; |
||||
var i = m.call(o), r, ar = [], e; |
||||
try { |
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); |
||||
} |
||||
catch (error) { e = { error: error }; } |
||||
finally { |
||||
try { |
||||
if (r && !r.done && (m = i["return"])) m.call(i); |
||||
} |
||||
finally { if (e) throw e.error; } |
||||
} |
||||
return ar; |
||||
}; |
||||
|
||||
/** @deprecated */ |
||||
__spread = function () { |
||||
for (var ar = [], i = 0; i < arguments.length; i++) |
||||
ar = ar.concat(__read(arguments[i])); |
||||
return ar; |
||||
}; |
||||
|
||||
/** @deprecated */ |
||||
__spreadArrays = function () { |
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; |
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++) |
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) |
||||
r[k] = a[j]; |
||||
return r; |
||||
}; |
||||
|
||||
__spreadArray = function (to, from, pack) { |
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { |
||||
if (ar || !(i in from)) { |
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
||||
ar[i] = from[i]; |
||||
} |
||||
} |
||||
return to.concat(ar || from); |
||||
}; |
||||
|
||||
__await = function (v) { |
||||
return this instanceof __await ? (this.v = v, this) : new __await(v); |
||||
}; |
||||
|
||||
__asyncGenerator = function (thisArg, _arguments, generator) { |
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
||||
var g = generator.apply(thisArg, _arguments || []), i, q = []; |
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; |
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } |
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } |
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
||||
function fulfill(value) { resume("next", value); } |
||||
function reject(value) { resume("throw", value); } |
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } |
||||
}; |
||||
|
||||
__asyncDelegator = function (o) { |
||||
var i, p; |
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; |
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } |
||||
}; |
||||
|
||||
__asyncValues = function (o) { |
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); |
||||
var m = o[Symbol.asyncIterator], i; |
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); |
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } |
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } |
||||
}; |
||||
|
||||
__makeTemplateObject = function (cooked, raw) { |
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } |
||||
return cooked; |
||||
}; |
||||
|
||||
var __setModuleDefault = Object.create ? (function(o, v) { |
||||
Object.defineProperty(o, "default", { enumerable: true, value: v }); |
||||
}) : function(o, v) { |
||||
o["default"] = v; |
||||
}; |
||||
|
||||
__importStar = function (mod) { |
||||
if (mod && mod.__esModule) return mod; |
||||
var result = {}; |
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); |
||||
__setModuleDefault(result, mod); |
||||
return result; |
||||
}; |
||||
|
||||
__importDefault = function (mod) { |
||||
return (mod && mod.__esModule) ? mod : { "default": mod }; |
||||
}; |
||||
|
||||
__classPrivateFieldGet = function (receiver, state, kind, f) { |
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); |
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); |
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); |
||||
}; |
||||
|
||||
__classPrivateFieldSet = function (receiver, state, value, kind, f) { |
||||
if (kind === "m") throw new TypeError("Private method is not writable"); |
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); |
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); |
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; |
||||
}; |
||||
|
||||
exporter("__extends", __extends); |
||||
exporter("__assign", __assign); |
||||
exporter("__rest", __rest); |
||||
exporter("__decorate", __decorate); |
||||
exporter("__param", __param); |
||||
exporter("__metadata", __metadata); |
||||
exporter("__awaiter", __awaiter); |
||||
exporter("__generator", __generator); |
||||
exporter("__exportStar", __exportStar); |
||||
exporter("__createBinding", __createBinding); |
||||
exporter("__values", __values); |
||||
exporter("__read", __read); |
||||
exporter("__spread", __spread); |
||||
exporter("__spreadArrays", __spreadArrays); |
||||
exporter("__spreadArray", __spreadArray); |
||||
exporter("__await", __await); |
||||
exporter("__asyncGenerator", __asyncGenerator); |
||||
exporter("__asyncDelegator", __asyncDelegator); |
||||
exporter("__asyncValues", __asyncValues); |
||||
exporter("__makeTemplateObject", __makeTemplateObject); |
||||
exporter("__importStar", __importStar); |
||||
exporter("__importDefault", __importDefault); |
||||
exporter("__classPrivateFieldGet", __classPrivateFieldGet); |
||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet); |
||||
}); |
||||
|
||||
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); }) |
||||
return __REQUIRE__(1748240909779); |
||||
})() |
||||
//miniprogram-npm-outsideDeps=[]
|
||||
//# sourceMappingURL=index.js.map
|
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
{ |
||||
"navigationStyle": "custom", |
||||
"usingComponents": { |
||||
"navbar": "/components/navbar/index" |
||||
} |
||||
} |
@ -0,0 +1,134 @@
@@ -0,0 +1,134 @@
|
||||
page { |
||||
background-color: #f6f6f9; |
||||
} |
||||
.page { |
||||
height: 100vh; |
||||
.from { |
||||
margin: 224rpx 30rpx 0; |
||||
padding: 20rpx 30rpx; |
||||
background: #ffffff; |
||||
border-radius: 32rpx 32rpx 32rpx 32rpx; |
||||
.from-item { |
||||
padding: 20rpx 0; |
||||
display: flex; |
||||
border-bottom: 1px solid #ededf7; |
||||
&:last-of-type { |
||||
border: none; |
||||
} |
||||
.label { |
||||
flex-shrink: 0; |
||||
font-size: 32rpx; |
||||
color: #010105; |
||||
width: 7em; |
||||
&.required::before { |
||||
display: inline; |
||||
content: '*'; |
||||
color: #e1242a; |
||||
} |
||||
} |
||||
.content { |
||||
flex: 1; |
||||
.select { |
||||
display: flex; |
||||
gap: 24rpx; |
||||
.s-btn { |
||||
width: 128rpx; |
||||
height: 64rpx; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
background: #f6f6f9; |
||||
border-radius: 46rpx 46rpx 46rpx 46rpx; |
||||
&.active { |
||||
color: #f23a2f; |
||||
background: rgba(242, 58, 47, 0.13); |
||||
border: 1px solid #f23a2f; |
||||
} |
||||
} |
||||
} |
||||
.input { |
||||
width: 100%; |
||||
font-size: 32rpx; |
||||
} |
||||
.place-input { |
||||
color: rgba(0, 0, 0, 0.3); |
||||
} |
||||
.picker-content { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
.picker-text { |
||||
font-size: 32rpx; |
||||
color: #000; |
||||
&:empty::after { |
||||
content: attr(data-place); |
||||
color: rgba(0, 0, 0, 0.3); |
||||
} |
||||
} |
||||
} |
||||
.textarea { |
||||
width: 100%; |
||||
font-size: 32rpx; |
||||
height: 100rpx; |
||||
} |
||||
.place-textarea { |
||||
color: rgba(0, 0, 0, 0.3); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.argument { |
||||
margin-top: 48rpx; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
.radio { |
||||
transform: scale(0.8); |
||||
} |
||||
.content { |
||||
font-size: 28rpx; |
||||
color: rgba(1, 1, 5, 0.4); |
||||
.link { |
||||
color: #f23a2f; |
||||
} |
||||
} |
||||
} |
||||
.footer { |
||||
padding: 20rpx 40rpx calc(env(safe-area-inset-bottom) + 20rpx); |
||||
position: fixed; |
||||
bottom: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
box-sizing: border-box; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
gap: 42rpx; |
||||
.share { |
||||
flex-shrink: 0; |
||||
text-align: center; |
||||
.icon { |
||||
display: block; |
||||
width: 48rpx; |
||||
height: 48rpx; |
||||
} |
||||
.name { |
||||
margin-top: 4rpx; |
||||
font-size: 28rpx; |
||||
color: #010105; |
||||
line-height: 32rpx; |
||||
} |
||||
} |
||||
.submit { |
||||
flex: 1; |
||||
height: 88rpx; |
||||
font-size: 36rpx; |
||||
color: #ffffff; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%); |
||||
border-radius: 84rpx 84rpx 84rpx 84rpx; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
const _app = getApp<IAppOption>() |
||||
|
||||
Page({ |
||||
data: { |
||||
pageTop: 0, |
||||
background: 'transparent', |
||||
}, |
||||
onLoad() { |
||||
}, |
||||
handleSubmit() { |
||||
wx.navigateTo({ |
||||
url: '/pages/applyFromResult/index', |
||||
}) |
||||
}, |
||||
}) |
||||
|
||||
export {} |
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
<navbar title="基因疗法筛查申请" fixed custom-style="background:{{background}}"> |
||||
<van-icon name="arrow-left" slot="left" size="18px" color="#000" /> |
||||
</navbar> |
||||
|
||||
<view |
||||
class="page" |
||||
style="padding-top:{{pageTop}}px;background: url('/images/appleFrom-bg.png') no-repeat top center/100% 668rpx" |
||||
> |
||||
<view class="from"> |
||||
<view class="from-item"> |
||||
<view class="label required">您的身份</view> |
||||
<view class="content"> |
||||
<view class="select"> |
||||
<view class="s-btn active">本人</view> |
||||
<view class="s-btn">亲友</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="from-item"> |
||||
<view class="label required">您的姓名</view> |
||||
<view class="content"> |
||||
<input class="input" placeholder-class="place-input" type="text" placeholder="如何称呼您" /> |
||||
</view> |
||||
</view> |
||||
<view class="from-item"> |
||||
<view class="label required">您的出生年月</view> |
||||
<view class="content"> |
||||
<picker mode="date"> |
||||
<view class="picker"> |
||||
<view class="picker-content"> |
||||
<view class="picker-text" data-place="请选择您的出生月"></view> |
||||
<van-icon name="arrow-down" color="rgba(51,51,51,0.73)" /> |
||||
</view> |
||||
</view> |
||||
</picker> |
||||
</view> |
||||
</view> |
||||
<view class="from-item"> |
||||
<view class="label required">所在地区</view> |
||||
<view class="content"> |
||||
<picker mode="region" level="city"> |
||||
<view class="picker"> |
||||
<view class="picker-content"> |
||||
<view class="picker-text" data-place="请选择您的所在地区"></view> |
||||
<van-icon name="arrow-down" color="rgba(51,51,51,0.73)" /> |
||||
</view> |
||||
</view> |
||||
</picker> |
||||
</view> |
||||
</view> |
||||
<view class="from-item"> |
||||
<view class="label required">如何联系您</view> |
||||
<view class="content"> |
||||
<button class="tel" open-type="getPhoneNumber" bindgetphonenumber="handlePhoneNumber"></button> |
||||
</view> |
||||
</view> |
||||
<view class="from-item"> |
||||
<view class="label">其他说明</view> |
||||
<view class="content"> |
||||
<textarea class="textarea" placeholder-class="place-textarea" placeholder="输入说明"></textarea> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="argument"> |
||||
<radio class="radio" color="#e73e37"></radio> |
||||
<view class="content"> |
||||
我已阅读并同意 |
||||
<text class="link">《服务隐私政策》</text> |
||||
</view> |
||||
</view> |
||||
<view class="footer"> |
||||
<view class="share"> |
||||
<image class="icon" src="/images/icon4.png"></image> |
||||
<view class="name">分享</view> |
||||
</view> |
||||
<view class="submit" bind:tap="handleSubmit">提交报名信息</view> |
||||
</view> |
||||
</view> |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
{ |
||||
"navigationStyle": "custom", |
||||
"usingComponents": { |
||||
"navbar": "/components/navbar/index" |
||||
} |
||||
} |
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
page { |
||||
color: #fafafa; |
||||
} |
||||
.page { |
||||
background: linear-gradient(172deg, #ffa340 0%, #ffdcdd 56%, #fafafa 100%) no-repeat top center/100% 726rpx; |
||||
.container { |
||||
position: relative; |
||||
margin: 272rpx 40rpx 0; |
||||
padding: 124rpx 38rpx 36rpx; |
||||
background-color: #fff; |
||||
border-radius: 42rpx; |
||||
.result-icon { |
||||
position: absolute; |
||||
top: -108rpx; |
||||
left: calc(50% - 108rpx); |
||||
width: 216rpx; |
||||
height: 216rpx; |
||||
} |
||||
.title { |
||||
text-align: center; |
||||
font-size: 40rpx; |
||||
color: #010105; |
||||
line-height: 68rpx; |
||||
font-weight: bold; |
||||
} |
||||
.content { |
||||
text-align: center; |
||||
font-size: 36rpx; |
||||
color: #010105; |
||||
line-height: 64rpx; |
||||
.time { |
||||
color: #f23a2f; |
||||
font-size: 48rpx; |
||||
font-weight: bold; |
||||
} |
||||
} |
||||
.code { |
||||
margin: 76rpx auto 0; |
||||
display: block; |
||||
width: 320rpx; |
||||
height: 320rpx; |
||||
} |
||||
.tip { |
||||
margin-top: 36rpx; |
||||
font-size: 32rpx; |
||||
color: rgba(1, 1, 5, 0.4); |
||||
text-align: center; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
const _app = getApp<IAppOption>() |
||||
|
||||
Page({ |
||||
data: { |
||||
pageTop: 0, |
||||
background: 'transparent', |
||||
}, |
||||
onLoad() {}, |
||||
}) |
||||
|
||||
export {} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<navbar fixed custom-style="background:{{background}}"> |
||||
<van-icon name="arrow-left" slot="left" size="18px" color="#000" /> |
||||
</navbar> |
||||
<view class="page" style="padding-top:{{pageTop}}px"> |
||||
<view class="container"> |
||||
<image class="result-icon" src="/images/icon5.png"></image> |
||||
<view class="title">您已成功提交筛查申请</view> |
||||
<view class="content"> |
||||
服务人员会在 |
||||
<text class="time">48</text> |
||||
小时内与您联系 |
||||
</view> |
||||
<image class="code" show-menu-by-longpress src="/images/icon5.png"></image> |
||||
<view class="tip">关注公众号,接收您的服务提醒</view> |
||||
</view> |
||||
</view> |