Browse Source

页面开发

master
kola-web 1 week ago
parent
commit
b749f07263
  1. 1
      README.md
  2. 7
      package.json
  3. 2866
      pnpm-lock.yaml
  4. 84
      project.private.config.json
  5. 24
      src/app.json
  6. 57
      src/app.scss
  7. 2
      src/app.ts
  8. 6
      src/components/login/index.json
  9. 60
      src/components/login/index.scss
  10. 25
      src/components/login/index.ts
  11. 25
      src/components/login/index.wxml
  12. 20
      src/components/navbar/index.ts
  13. 14
      src/components/navbar/index.wxml
  14. 21
      src/components/popup/index.scss
  15. 10
      src/components/popup/index.wxml
  16. 4
      src/custom-tab-bar/index.ts
  17. BIN
      src/images/appleFrom-bg.png
  18. BIN
      src/images/avatar1.png
  19. BIN
      src/images/bg1.png
  20. BIN
      src/images/bg2.png
  21. BIN
      src/images/bg3.png
  22. BIN
      src/images/icon10.png
  23. BIN
      src/images/icon11.png
  24. BIN
      src/images/icon12.png
  25. BIN
      src/images/icon13.png
  26. BIN
      src/images/icon14.png
  27. BIN
      src/images/icon4.png
  28. BIN
      src/images/icon5.png
  29. BIN
      src/images/icon6.png
  30. BIN
      src/images/icon7.png
  31. BIN
      src/images/icon8.png
  32. BIN
      src/images/icon9.png
  33. BIN
      src/images/stayTuned.png
  34. 37435
      src/miniprogram_npm/@galacean/effects/index.js
  35. 1
      src/miniprogram_npm/@galacean/effects/index.js.map
  36. 254
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.js
  37. 4
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.json
  38. 37
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxml
  39. 1
      src/miniprogram_npm/@miniprogram-component-plus/video-swiper/index.wxss
  40. 4
      src/miniprogram_npm/@vant/weapp/action-sheet/index.js
  41. 1
      src/miniprogram_npm/@vant/weapp/action-sheet/index.wxml
  42. 4
      src/miniprogram_npm/@vant/weapp/calendar/index.js
  43. 1
      src/miniprogram_npm/@vant/weapp/calendar/index.wxml
  44. 6
      src/miniprogram_npm/@vant/weapp/cascader/index.js
  45. 4
      src/miniprogram_npm/@vant/weapp/cascader/index.wxml
  46. 5
      src/miniprogram_npm/@vant/weapp/collapse-item/index.js
  47. 2
      src/miniprogram_npm/@vant/weapp/collapse-item/index.wxml
  48. 1
      src/miniprogram_npm/@vant/weapp/definitions/index.d.ts
  49. 21
      src/miniprogram_npm/@vant/weapp/dialog/index.js
  50. 2
      src/miniprogram_npm/@vant/weapp/dialog/index.wxml
  51. 17
      src/miniprogram_npm/@vant/weapp/field/index.js
  52. 1
      src/miniprogram_npm/@vant/weapp/field/input.wxml
  53. 10
      src/miniprogram_npm/@vant/weapp/field/props.js
  54. 4
      src/miniprogram_npm/@vant/weapp/goods-action-button/index.js
  55. 1
      src/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml
  56. 2
      src/miniprogram_npm/@vant/weapp/image/index.wxss
  57. 16
      src/miniprogram_npm/@vant/weapp/mixins/basic.js
  58. 30
      src/miniprogram_npm/@vant/weapp/mixins/transition.js
  59. 31
      src/miniprogram_npm/@vant/weapp/notice-bar/index.js
  60. 4
      src/miniprogram_npm/@vant/weapp/share-sheet/index.js
  61. 1
      src/miniprogram_npm/@vant/weapp/share-sheet/index.wxml
  62. 50
      src/miniprogram_npm/@vant/weapp/stepper/index.js
  63. 2
      src/miniprogram_npm/@vant/weapp/steps/index.wxss
  64. 6
      src/miniprogram_npm/@vant/weapp/uploader/index.js
  65. 1
      src/miniprogram_npm/@vant/weapp/uploader/index.wxml
  66. 8
      src/miniprogram_npm/@vant/weapp/uploader/shared.d.ts
  67. 10
      src/miniprogram_npm/@vant/weapp/uploader/shared.js
  68. 2
      src/miniprogram_npm/@vant/weapp/uploader/utils.js
  69. 4
      src/miniprogram_npm/dayjs/index.js
  70. 678
      src/miniprogram_npm/echarts/index.js
  71. 2
      src/miniprogram_npm/echarts/index.js.map
  72. 48
      src/miniprogram_npm/miniprogram-licia/Channel.js
  73. 68
      src/miniprogram_npm/miniprogram-licia/dataUrl.js
  74. 75
      src/miniprogram_npm/miniprogram-licia/dataView.js
  75. 38
      src/miniprogram_npm/miniprogram-licia/detectOs.js
  76. 24
      src/miniprogram_npm/miniprogram-licia/fileSize.js
  77. 42
      src/miniprogram_npm/miniprogram-licia/fileType.js
  78. 6
      src/miniprogram_npm/miniprogram-licia/index.js
  79. 8
      src/miniprogram_npm/miniprogram-licia/isErr.js
  80. 4
      src/miniprogram_npm/miniprogram-licia/isMac.js
  81. 4
      src/miniprogram_npm/miniprogram-licia/isWindows.js
  82. 1
      src/miniprogram_npm/miniprogram-licia/naturalSort.js
  83. 2
      src/miniprogram_npm/miniprogram-licia/randomId.js
  84. 23
      src/miniprogram_npm/miniprogram-licia/singleton.js
  85. 120
      src/miniprogram_npm/miniprogram-licia/table.js
  86. 4
      src/miniprogram_npm/mp-html/index.js
  87. 2
      src/miniprogram_npm/mp-html/node/node.js
  88. 2
      src/miniprogram_npm/mp-html/node/node.wxml
  89. 2
      src/miniprogram_npm/mp-html/parser.js
  90. 4
      src/miniprogram_npm/number-precision/index.js
  91. 319
      src/miniprogram_npm/tslib/index.js
  92. 1
      src/miniprogram_npm/tslib/index.js.map
  93. 6
      src/pages/applyFrom/index.json
  94. 134
      src/pages/applyFrom/index.scss
  95. 17
      src/pages/applyFrom/index.ts
  96. 78
      src/pages/applyFrom/index.wxml
  97. 6
      src/pages/applyFromResult/index.json
  98. 50
      src/pages/applyFromResult/index.scss
  99. 11
      src/pages/applyFromResult/index.ts
  100. 16
      src/pages/applyFromResult/index.wxml
  101. Some files were not shown because too many files have changed in this diff Show More

1
README.md

@ -79,3 +79,4 @@ const handleDownload = () => { @@ -79,3 +79,4 @@ const handleDownload = () => {
})
}
```
https://pic1.zhimg.com/50/v2-8cfef5f9ea7d15963af2277c6814f152_720w.jpg?source=2c26e567

7
package.json

@ -10,13 +10,13 @@ @@ -10,13 +10,13 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@miniprogram-component-plus/video-swiper": "^1.0.1",
"@vant/weapp": "^1.11.2",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
"miniprogram-licia": "^1.39.2",
"mp-html": "^2.4.2",
"number-precision": "^1.6.0",
"typescript": "^5.3.3"
"number-precision": "^1.6.0"
},
"devDependencies": {
"@antfu/eslint-config": "^3.2.0",
@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"miniprogram-api-typings": "^3.12.2",
"prettier": "^3.3.3"
"prettier": "^3.3.3",
"typescript": "^5.8.3"
}
}

2866
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

84
project.private.config.json

@ -19,6 +19,88 @@ @@ -19,6 +19,88 @@
"bigPackageSizeSupport": false
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {},
"condition": {
"miniprogram": {
"list": [
{
"name": "患者-录入个人信息",
"pathName": "patient/pages/entryInfo/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "患者-登录",
"pathName": "patient/pages/login/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "患者-协议",
"pathName": "patient/pages/protocol/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "test",
"pathName": "pages/test/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "我的",
"pathName": "pages/my/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "大家都在问",
"pathName": "pages/ask/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "知识库详情-视频",
"pathName": "pages/knowledgeDetailVideo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "知识夸详情-文章",
"pathName": "pages/knowledgeDetail/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "知识库",
"pathName": "pages/knowledge/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "基因疗法申请-结果页",
"pathName": "pages/applyFromResult/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "基因疗法申请",
"pathName": "pages/applyFrom/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "3.5.8"
}

24
src/app.json

@ -1,6 +1,21 @@ @@ -1,6 +1,21 @@
{
"$schema": "https://dldir1.qq.com/WechatWebDev/editor-extension/wx-json/app.schema.json",
"pages": ["pages/index/index", "pages/my/index"],
"pages": [
"pages/index/index",
"pages/my/index",
"pages/applyFrom/index",
"pages/applyFromResult/index",
"pages/knowledge/index",
"pages/knowledgeDetail/index",
"pages/knowledgeDetailVideo/index",
"pages/ask/index"
],
"subPackages": [
{
"root": "patient",
"pages": ["pages/protocol/index", "pages/login/index", "pages/entryInfo/index"]
}
],
"tabBar": {
"custom": true,
"list": [
@ -9,6 +24,10 @@ @@ -9,6 +24,10 @@
"text": "首页"
},
{
"pagePath": "pages/knowledge/index",
"text": "知识库"
},
{
"pagePath": "pages/my/index",
"text": "我的"
}
@ -25,7 +44,8 @@ @@ -25,7 +44,8 @@
"@/*": "/*"
},
"usingComponents": {
"pagination": "/components/pagination/index"
"pagination": "/components/pagination/index",
"van-icon": "@vant/weapp/icon/index"
},
"requiredPrivateInfos": ["getFuzzyLocation"],
"permission": {

57
src/app.scss

@ -1,17 +1,5 @@ @@ -1,17 +1,5 @@
.page-meat {
background-repeat: no-repeat;
}
.van-tabbar {
background: rgba(255, 255, 255, 0.8);
box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.12);
}
.van-tabbar-item__icon {
margin-bottom: 0 !important;
}
.clearfix:after {
content: "020";
content: '020';
display: block;
height: 0;
clear: both;
@ -29,23 +17,11 @@ @@ -29,23 +17,11 @@
color: transparent;
}
.theme1 {
--name: #fff;
}
.theme2 {
--name: #000;
}
.van-hairline--bottom:after {
border-bottom-width: 0px !important;
}
.extend-via-pseudo-elem {
position: relative;
overflow: visible;
&::before {
content: "";
content: '';
position: absolute;
top: -20rpx;
right: -20rpx;
@ -57,32 +33,3 @@ @@ -57,32 +33,3 @@
view {
word-break: break-all;
}
.mp-html {
video {
// width: 100% !important;
// object-fit: contain !important;
// max-height: 350rpx;
}
}
.van-tabbar {
display: flex;
justify-content: space-around;
.van-tabbar-item {
}
[is="miniprogram_npm/@vant/weapp/tabbar-item/index"] {
flex: none !important;
}
}
// .tab-item:first-of-type,
// .tab-item:last-of-type {
// .van-tabbar-item {
// width: 2em;
// }
// }
.pre-line{
white-space: pre-line;
}

2
src/app.ts

@ -19,7 +19,7 @@ App<IAppOption>({ @@ -19,7 +19,7 @@ App<IAppOption>({
// appid:wxa4ece062e60e93a5
url: 'https://m.zd.hbraas.com',
upFileUrl: 'https://m.zd.hbraas.com/',
imageUrl: 'https://m.zd.hbraas.com/zd/',
imageUrl: "https://m.wtx.hbraas.com/GeneB/",
// pro
// appid:wx96f45ca4f1fa36ec

6
src/components/login/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-popup": "@vant/weapp/popup/index"
}
}

60
src/components/login/index.scss

@ -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);
}
}
}
}
}

25
src/components/login/index.ts

@ -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')
},
},
})

25
src/components/login/index.wxml

@ -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>

20
src/components/navbar/index.ts

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
const _app = getApp<IAppOption>()
Component({
options: {
multipleSlots: true, // 在组件定义时的选项中启用多slot支持
},
properties: {
title: String,
fixed: Boolean,
@ -17,6 +20,11 @@ Component({ @@ -17,6 +20,11 @@ Component({
type: Number,
value: 1,
},
back: {
type: Boolean,
value: true,
},
},
/**
@ -27,5 +35,15 @@ Component({ @@ -27,5 +35,15 @@ Component({
/**
*
*/
methods: {},
methods: {
onClickLeft() {
if (this.data.back) {
wx.navigateBack()
}
this.triggerEvent('clickLeft', {}, {})
},
onClickRight() {
this.triggerEvent('clickRight', {}, {})
},
},
})

14
src/components/navbar/index.wxml

@ -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>

21
src/components/popup/index.scss

@ -32,20 +32,33 @@ @@ -32,20 +32,33 @@
}
.btn1 {
margin-top: 40rpx;
height: 84rpx;
height: 88rpx;
border-radius: 84rpx;
font-size: 32rpx;
color: #ffffff;
text-align: center;
line-height: 84rpx;
line-height: 88rpx;
background: linear-gradient(356deg, #f23a2f 0%, #fc684f 100%);
}
.btn2 {
margin-top: 20rpx;
height: 84rpx;
height: 88rpx;
text-align: center;
line-height: 84rpx;
line-height: 88rpx;
font-size: 32rpx;
color: rgba(1, 1, 5, 0.4);
}
}
.popup2 {
padding: 36rpx 34rpx 58rpx;
.photo {
width: 492rpx;
height: 492rpx;
}
.content {
font-size: 40rpx;
color: rgba(0, 0, 0, 1);
text-align: center;
}
}

10
src/components/popup/index.wxml

@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
round
z-index="{{100000}}"
show="{{ show }}"
catch:touchstart
position="{{params.position || 'center'}}"
safe-area-inset-bottom="{{false}}"
>
<view class="popup1" wx:if="{{type==='argument'}}">
<image class="logo" src="/images/logo1.png"></image>
@ -22,4 +22,12 @@ @@ -22,4 +22,12 @@
<view class="btn1">同意并继续</view>
<view class="btn2">不同意</view>
</view>
<view class="popup2" wx:if="{{type==='stayTuned'}}">
<image class="photo" src="/images/stayTuned.png"></image>
<view class="content">
<view>努力建设中</view>
<view>敬请期待</view>
</view>
</view>
</van-popup>

4
src/custom-tab-bar/index.ts

@ -15,8 +15,8 @@ Component({ @@ -15,8 +15,8 @@ Component({
iconActive: 'tabbar1-1-active',
},
{
pagePath: '/pages/repository/index',
text: 'MG全知道',
pagePath: '/pages/knowledge/index',
text: '知识库',
icon: 'tabbar1-2',
iconActive: 'tabbar1-2-active',
},

BIN
src/images/appleFrom-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

BIN
src/images/avatar1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/images/bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

BIN
src/images/bg2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

BIN
src/images/bg3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

BIN
src/images/icon10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

BIN
src/images/icon11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/images/icon13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
src/images/icon14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
src/images/icon4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/images/icon5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
src/images/icon6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

BIN
src/images/icon7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

BIN
src/images/icon8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

BIN
src/images/icon9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
src/images/stayTuned.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

37435
src/miniprogram_npm/@galacean/effects/index.js

File diff suppressed because one or more lines are too long

1
src/miniprogram_npm/@galacean/effects/index.js.map

File diff suppressed because one or more lines are too long

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

4
src/miniprogram_npm/@vant/weapp/action-sheet/index.js

@ -38,6 +38,10 @@ var button_1 = require("../mixins/button"); @@ -38,6 +38,10 @@ var button_1 = require("../mixins/button");
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onSelect: function (event) {

1
src/miniprogram_npm/@vant/weapp/action-sheet/index.wxml

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
custom-class="van-action-sheet custom-class"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
>
<view wx:if="{{ title }}" class="van-action-sheet__header">

4
src/miniprogram_npm/@vant/weapp/calendar/index.js

@ -129,6 +129,10 @@ var getTime = function (date) { @@ -129,6 +129,10 @@ var getTime = function (date) {
value: 0,
},
readonly: Boolean,
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
subtitle: '',

1
src/miniprogram_npm/@vant/weapp/calendar/index.wxml

@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
closeable="{{ showTitle || showSubtitle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
root-portal="{{ rootPortal }}"
bind:enter="onOpen"
bind:close="onClose"
bind:after-enter="onOpened"

6
src/miniprogram_npm/@vant/weapp/cascader/index.js

@ -47,6 +47,10 @@ var defaultFieldNames = { @@ -47,6 +47,10 @@ var defaultFieldNames = {
type: Boolean,
value: true,
},
ellipsis: {
type: Boolean,
value: true,
},
showHeader: {
type: Boolean,
value: true,
@ -60,6 +64,7 @@ var defaultFieldNames = { @@ -60,6 +64,7 @@ var defaultFieldNames = {
value: defaultFieldNames,
observer: 'updateFieldNames',
},
useTitleSlot: Boolean,
},
data: {
tabs: [],
@ -160,6 +165,7 @@ var defaultFieldNames = { @@ -160,6 +165,7 @@ var defaultFieldNames = {
selected: null,
},
],
activeTab: 0,
});
},
onClose: function () {

4
src/miniprogram_npm/@vant/weapp/cascader/index.wxml

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<wxs src="./index.wxs" module="utils" />
<view wx:if="{{ showHeader }}" class="van-cascader__header">
<text class="van-cascader__title"><slot name="title"></slot>{{ title }}</text>
<slot name="title" wx:if="{{ useTitleSlot }}"></slot>
<text class="van-cascader__title" wx:else>{{ title }}</text>
<van-icon
wx:if="{{ closeable }}"
name="{{ closeIcon }}"
@ -18,6 +19,7 @@ @@ -18,6 +19,7 @@
color="{{ activeColor }}"
border="{{ false }}"
swipeable="{{ swipeable }}"
ellipsis="{{ ellipsis }}"
bind:click="onClickTab"
>
<van-tab

5
src/miniprogram_npm/@vant/weapp/collapse-item/index.js

@ -26,6 +26,7 @@ var animate_1 = require("./animate"); @@ -26,6 +26,7 @@ var animate_1 = require("./animate");
},
data: {
expanded: false,
parentBorder: true,
},
mounted: function () {
this.updateExpanded();
@ -36,7 +37,7 @@ var animate_1 = require("./animate"); @@ -36,7 +37,7 @@ var animate_1 = require("./animate");
if (!this.parent) {
return;
}
var _a = this.parent.data, value = _a.value, accordion = _a.accordion;
var _a = this.parent.data, value = _a.value, accordion = _a.accordion, border = _a.border;
var _b = this.parent.children, children = _b === void 0 ? [] : _b;
var name = this.data.name;
var index = children.indexOf(this);
@ -47,7 +48,7 @@ var animate_1 = require("./animate"); @@ -47,7 +48,7 @@ var animate_1 = require("./animate");
if (expanded !== this.data.expanded) {
(0, animate_1.setContentAnimate)(this, expanded, this.mounted);
}
this.setData({ index: index, expanded: expanded });
this.setData({ index: index, expanded: expanded, parentBorder: border });
},
onClick: function () {
if (this.data.disabled) {

2
src/miniprogram_npm/@vant/weapp/collapse-item/index.wxml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<view class="van-collapse-item custom-class {{ index !== 0 ? 'van-hairline--top' : '' }}">
<view class="van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}">
<van-cell
size="{{ size }}"
title="{{ title }}"

1
src/miniprogram_npm/@vant/weapp/definitions/index.d.ts vendored

@ -4,6 +4,7 @@ interface VantComponentInstance { @@ -4,6 +4,7 @@ interface VantComponentInstance {
children: WechatMiniprogram.Component.TrivialInstance[];
index: number;
$emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
setView: (value: Record<string, any>, callback?: () => void) => void;
}
export type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
data?: Data;

21
src/miniprogram_npm/@vant/weapp/dialog/index.js

@ -67,6 +67,10 @@ var utils_1 = require("../common/utils"); @@ -67,6 +67,10 @@ var utils_1 = require("../common/utils");
type: String,
value: 'scale',
},
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
loading: {
@ -86,15 +90,16 @@ var utils_1 = require("../common/utils"); @@ -86,15 +90,16 @@ var utils_1 = require("../common/utils");
this.close('overlay');
},
close: function (action) {
var _this = this;
this.setData({ show: false });
wx.nextTick(function () {
_this.$emit('close', action);
var callback = _this.data.callback;
if (callback) {
callback(action, _this);
}
});
this.closeAction = action;
},
onAfterLeave: function () {
var action = this.closeAction;
this.$emit('close', action);
var callback = this.data.callback;
if (callback) {
callback(action, this);
}
},
stopLoading: function () {
this.setData({

2
src/miniprogram_npm/@vant/weapp/dialog/index.wxml

@ -9,7 +9,9 @@ @@ -9,7 +9,9 @@
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
bind:after-leave="onAfterLeave"
>
<view
wx:if="{{ title || useTitleSlot }}"

17
src/miniprogram_npm/@vant/weapp/field/index.js

@ -44,6 +44,18 @@ var props_1 = require("./props"); @@ -44,6 +44,18 @@ var props_1 = require("./props");
innerValue: '',
showClear: false,
},
watch: {
value: function (value) {
if (value !== this.value) {
this.setData({ innerValue: value });
this.value = value;
this.setShowClear();
}
},
clearTrigger: function () {
this.setShowClear();
},
},
created: function () {
this.value = this.data.value;
this.setData({ innerValue: this.value });
@ -109,6 +121,9 @@ var props_1 = require("./props"); @@ -109,6 +121,9 @@ var props_1 = require("./props");
onKeyboardHeightChange: function (event) {
this.$emit('keyboardheightchange', event.detail);
},
onBindNicknameReview: function (event) {
this.$emit('nicknamereview', event.detail);
},
emitChange: function (detail) {
var extraEventParams = this.data.extraEventParams;
this.setData({ value: detail.value });
@ -130,7 +145,7 @@ var props_1 = require("./props"); @@ -130,7 +145,7 @@ var props_1 = require("./props");
var trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused);
showClear = hasValue && trigger;
}
this.setData({ showClear: showClear });
this.setView({ showClear: showClear });
},
noop: function () { },
},

1
src/miniprogram_npm/@vant/weapp/field/input.wxml

@ -27,4 +27,5 @@ @@ -27,4 +27,5 @@
bindfocus="onFocus"
bindconfirm="onConfirm"
bindkeyboardheightchange="onKeyboardHeightChange"
bindnicknamereview="onBindNicknameReview"
/>

10
src/miniprogram_npm/@vant/weapp/field/props.js

@ -2,15 +2,7 @@ @@ -2,15 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
exports.commonProps = {
value: {
type: String,
observer: function (value) {
if (value !== this.value) {
this.setData({ innerValue: value });
this.value = value;
}
},
},
value: String,
placeholder: String,
placeholderStyle: String,
placeholderClass: String,

4
src/miniprogram_npm/@vant/weapp/goods-action-button/index.js

@ -21,6 +21,10 @@ var link_1 = require("../mixins/link"); @@ -21,6 +21,10 @@ var link_1 = require("../mixins/link");
type: String,
value: 'danger',
},
customStyle: {
type: String,
value: '',
},
},
methods: {
onClick: function (event) {

1
src/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml

@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
custom-class="van-goods-action-button__inner custom-class"
custom-style="{{customStyle}}"
business-id="{{ businessId }}"
session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}"

2
src/miniprogram_npm/@vant/weapp/image/index.wxss

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

16
src/miniprogram_npm/@vant/weapp/mixins/basic.js

@ -10,5 +10,21 @@ exports.basic = Behavior({ @@ -10,5 +10,21 @@ exports.basic = Behavior({
this.setData(data);
return new Promise(function (resolve) { return wx.nextTick(resolve); });
},
// high performance setData
setView: function (data, callback) {
var _this = this;
var target = {};
var hasChange = false;
Object.keys(data).forEach(function (key) {
if (data[key] !== _this.data[key]) {
target[key] = data[key];
hasChange = true;
}
});
if (hasChange) {
return this.setData(target, callback);
}
return callback && callback();
},
},
});

30
src/miniprogram_npm/@vant/weapp/mixins/transition.js

@ -24,7 +24,6 @@ function transition(showDefaultValue) { @@ -24,7 +24,6 @@ function transition(showDefaultValue) {
duration: {
type: null,
value: 300,
observer: 'observeDuration',
},
name: {
type: String,
@ -46,9 +45,26 @@ function transition(showDefaultValue) { @@ -46,9 +45,26 @@ function transition(showDefaultValue) {
if (value === old) {
return;
}
value ? this.enter() : this.leave();
value ? this.enureEnter() : this.enureLeave();
},
enter: function () {
enureEnter: function () {
var _this = this;
if (this.enterPromise)
return;
this.enterPromise = new Promise(function (resolve) { return _this.enter(resolve); });
},
enureLeave: function () {
var _this = this;
var enterPromise = this.enterPromise;
if (!enterPromise)
return;
enterPromise
.then(function () { return new Promise(function (resolve) { return _this.leave(resolve); }); })
.then(function () {
_this.enterPromise = null;
});
},
enter: function (resolve) {
var _this = this;
var _a = this.data, duration = _a.duration, name = _a.name;
var classNames = getClassNames(name);
@ -75,10 +91,11 @@ function transition(showDefaultValue) { @@ -75,10 +91,11 @@ function transition(showDefaultValue) {
}
_this.transitionEnded = false;
_this.setData({ classes: classNames['enter-to'] });
resolve();
});
});
},
leave: function () {
leave: function (resolve) {
var _this = this;
if (!this.data.display) {
return;
@ -102,7 +119,10 @@ function transition(showDefaultValue) { @@ -102,7 +119,10 @@ function transition(showDefaultValue) {
return;
}
_this.transitionEnded = false;
setTimeout(function () { return _this.onTransitionEnd(); }, currentDuration);
setTimeout(function () {
_this.onTransitionEnd();
resolve();
}, currentDuration);
_this.setData({ classes: classNames['leave-to'] });
});
});

31
src/miniprogram_npm/@vant/weapp/notice-bar/index.js

@ -64,7 +64,7 @@ var utils_1 = require("../common/utils"); @@ -64,7 +64,7 @@ var utils_1 = require("../common/utils");
(0, utils_1.getRect)(_this, '.van-notice-bar__wrap'),
]).then(function (rects) {
var contentRect = rects[0], wrapRect = rects[1];
var _a = _this.data, speed = _a.speed, scrollable = _a.scrollable, delay = _a.delay;
var scrollable = _this.data.scrollable;
if (contentRect == null ||
wrapRect == null ||
!contentRect.width ||
@ -73,20 +73,26 @@ var utils_1 = require("../common/utils"); @@ -73,20 +73,26 @@ var utils_1 = require("../common/utils");
return;
}
if (scrollable || wrapRect.width < contentRect.width) {
var duration = ((wrapRect.width + contentRect.width) / speed) * 1000;
_this.wrapWidth = wrapRect.width;
_this.contentWidth = contentRect.width;
_this.duration = duration;
_this.animation = wx.createAnimation({
duration: duration,
timingFunction: 'linear',
delay: delay,
});
_this.initAnimation(wrapRect.width, contentRect.width);
_this.scroll(true);
}
});
});
},
initAnimation: function (warpWidth, contentWidth) {
var _a = this.data, speed = _a.speed, delay = _a.delay;
this.wrapWidth = warpWidth;
this.contentWidth = contentWidth;
// begin 0
this.contentDuration = (contentWidth / speed) * 1000;
// begin -wrapWidth
this.duration = ((warpWidth + contentWidth) / speed) * 1000;
this.animation = wx.createAnimation({
duration: this.contentDuration,
timingFunction: 'linear',
delay: delay,
});
},
scroll: function (isInit) {
var _this = this;
if (isInit === void 0) { isInit = false; }
@ -98,17 +104,18 @@ var utils_1 = require("../common/utils"); @@ -98,17 +104,18 @@ var utils_1 = require("../common/utils");
.step()
.export(),
});
var duration = isInit ? this.contentDuration : this.duration;
(0, utils_1.requestAnimationFrame)(function () {
_this.setData({
animationData: _this.animation
.translateX(-_this.contentWidth)
.step()
.step({ duration: duration })
.export(),
});
});
this.timer = setTimeout(function () {
_this.scroll();
}, this.duration + this.data.delay);
}, duration + this.data.delay);
},
onClickIcon: function (event) {
if (this.data.mode === 'closeable') {

4
src/miniprogram_npm/@vant/weapp/share-sheet/index.js

@ -38,6 +38,10 @@ var component_1 = require("../common/component"); @@ -38,6 +38,10 @@ var component_1 = require("../common/component");
type: null,
value: 300,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onClickOverlay: function () {

1
src/miniprogram_npm/@vant/weapp/share-sheet/index.wxml

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
root-portal="{{ rootPortal }}"
bind:close="onClose"
bind:click-overlay="onClickOverlay"
>

50
src/miniprogram_npm/@vant/weapp/stepper/index.js

@ -85,18 +85,18 @@ function equal(value1, value2) { @@ -85,18 +85,18 @@ function equal(value1, value2) {
},
created: function () {
this.setData({
currentValue: this.format(this.data.value),
currentValue: this.format(this.data.value).newValue,
});
},
methods: {
observeValue: function () {
var value = this.data.value;
this.setData({ currentValue: this.format(value) });
this.setData({ currentValue: this.format(value).newValue });
},
check: function () {
var val = this.format(this.data.currentValue);
if (!equal(val, this.data.currentValue)) {
this.setData({ currentValue: val });
var newValue = this.format(this.data.currentValue).newValue;
if (!equal(newValue, this.data.currentValue)) {
this.setData({ currentValue: newValue });
}
},
isDisabled: function (type) {
@ -110,10 +110,10 @@ function equal(value1, value2) { @@ -110,10 +110,10 @@ function equal(value1, value2) {
this.$emit('focus', event.detail);
},
onBlur: function (event) {
var value = this.format(event.detail.value);
this.setData({ currentValue: value });
this.emitChange(value);
this.$emit('blur', __assign(__assign({}, event.detail), { value: value }));
var data = this.format(event.detail.value);
this.setData({ currentValue: data.newValue });
this.emitChange(data);
this.$emit('blur', __assign(__assign({}, event.detail), { value: +data.newValue }));
},
// filter illegal characters
filter: function (value) {
@ -123,17 +123,16 @@ function equal(value1, value2) { @@ -123,17 +123,16 @@ function equal(value1, value2) {
}
return value;
},
// limit value range
format: function (value) {
value = this.filter(value);
// filter illegal characters and format integer
var safeValue = this.filter(value);
// format range
value = value === '' ? 0 : +value;
value = Math.max(Math.min(this.data.max, value), this.data.min);
var rangeValue = Math.max(Math.min(this.data.max, +safeValue), this.data.min);
// format decimal
if ((0, validator_1.isDef)(this.data.decimalLength)) {
value = value.toFixed(this.data.decimalLength);
}
return value;
var newValue = (0, validator_1.isDef)(this.data.decimalLength)
? rangeValue.toFixed(this.data.decimalLength)
: String(rangeValue);
return { value: value, newValue: newValue };
},
onInput: function (event) {
var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;
@ -141,19 +140,16 @@ function equal(value1, value2) { @@ -141,19 +140,16 @@ function equal(value1, value2) {
if (value === '') {
return;
}
var formatted = this.filter(value);
// limit max decimal length
if ((0, validator_1.isDef)(this.data.decimalLength) && formatted.indexOf('.') !== -1) {
var pair = formatted.split('.');
formatted = "".concat(pair[0], ".").concat(pair[1].slice(0, this.data.decimalLength));
}
var formatted = this.format(value);
this.emitChange(formatted);
},
emitChange: function (value) {
emitChange: function (data) {
var value = data.value, newValue = data.newValue;
if (!this.data.asyncChange) {
this.setData({ currentValue: value });
// fix when input 11. parsed to 11, unable to enter decimal
this.setData({ currentValue: +value === +newValue ? value : newValue });
}
this.$emit('change', value);
this.$emit('change', +newValue);
},
onChange: function () {
var type = this.type;
@ -162,7 +158,7 @@ function equal(value1, value2) { @@ -162,7 +158,7 @@ function equal(value1, value2) {
return;
}
var diff = type === 'minus' ? -this.data.step : +this.data.step;
var value = this.format(add(+this.data.currentValue, diff));
var value = this.format(String(add(+this.data.currentValue, diff)));
this.emitChange(value);
this.$emit(type);
},

2
src/miniprogram_npm/@vant/weapp/steps/index.wxss

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

6
src/miniprogram_npm/@vant/weapp/uploader/index.js

@ -12,9 +12,9 @@ var __assign = (this && this.__assign) || function () { @@ -12,9 +12,9 @@ var __assign = (this && this.__assign) || function () {
};
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
var utils_1 = require("./utils");
var shared_1 = require("./shared");
var validator_1 = require("../common/validator");
var shared_1 = require("./shared");
var utils_1 = require("./utils");
(0, component_1.VantComponent)({
props: __assign(__assign(__assign(__assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {
type: null,
@ -168,6 +168,8 @@ var validator_1 = require("../common/validator"); @@ -168,6 +168,8 @@ var validator_1 = require("../common/validator");
});
},
onPreviewFile: function (event) {
if (!this.data.previewFile)
return;
var index = event.currentTarget.dataset.index;
wx.openDocument({
filePath: this.data.lists[index].url,

1
src/miniprogram_npm/@vant/weapp/uploader/index.wxml

@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
poster="{{ item.thumb }}"
autoplay="{{ item.autoplay }}"
object-fit="{{videoFit}}"
referrer-policy="{{ referrerPolicy }}"
class="van-uploader__preview-image"
style="{{ computed.sizeStyle({ previewSize }) }}"
data-index="{{ index }}"

8
src/miniprogram_npm/@vant/weapp/uploader/shared.d.ts vendored

@ -29,6 +29,10 @@ export declare const videoProps: { @@ -29,6 +29,10 @@ export declare const videoProps: {
type: StringConstructor;
value: string;
};
referrerPolicy: {
type: StringConstructor;
value: string;
};
};
export declare const mediaProps: {
capture: {
@ -50,4 +54,8 @@ export declare const mediaProps: { @@ -50,4 +54,8 @@ export declare const mediaProps: {
};
export declare const messageFileProps: {
extension: null;
previewFile: {
type: BooleanConstructor;
value: boolean;
};
};

10
src/miniprogram_npm/@vant/weapp/uploader/shared.js

@ -34,6 +34,10 @@ exports.videoProps = { @@ -34,6 +34,10 @@ exports.videoProps = {
type: String,
value: 'back',
},
referrerPolicy: {
type: String,
value: 'no-referrer',
},
};
// props for media
exports.mediaProps = {
@ -43,7 +47,7 @@ exports.mediaProps = { @@ -43,7 +47,7 @@ exports.mediaProps = {
},
mediaType: {
type: Array,
value: ['image', 'video'],
value: ['image', 'video', 'mix'],
},
maxDuration: {
type: Number,
@ -57,4 +61,8 @@ exports.mediaProps = { @@ -57,4 +61,8 @@ exports.mediaProps = {
// props for file
exports.messageFileProps = {
extension: null,
previewFile: {
type: Boolean,
value: true,
},
};

2
src/miniprogram_npm/@vant/weapp/uploader/utils.js

@ -49,7 +49,7 @@ function formatVideo(res) { @@ -49,7 +49,7 @@ function formatVideo(res) {
];
}
function formatMedia(res) {
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: res.type, url: item.tempFilePath, thumb: res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath })); });
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: item.fileType, url: item.tempFilePath, thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath })); });
}
function formatFile(res) {
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { url: item.path })); });

4
src/miniprogram_npm/dayjs/index.js

File diff suppressed because one or more lines are too long

678
src/miniprogram_npm/echarts/index.js

File diff suppressed because it is too large Load Diff

2
src/miniprogram_npm/echarts/index.js.map

File diff suppressed because one or more lines are too long

48
src/miniprogram_npm/miniprogram-licia/Channel.js

@ -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;

68
src/miniprogram_npm/miniprogram-licia/dataUrl.js

@ -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;

75
src/miniprogram_npm/miniprogram-licia/dataView.js

@ -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;

38
src/miniprogram_npm/miniprogram-licia/detectOs.js

@ -1,16 +1,38 @@ @@ -1,16 +1,38 @@
var isBrowser = require('./isBrowser');
var isNode = require('./isNode');
exports = function(ua) {
ua = ua || (isBrowser ? navigator.userAgent : '');
ua = ua.toLowerCase();
if (detect('windows phone')) return 'windows phone';
if (detect('win')) return 'windows';
if (detect('android')) return 'android';
if (detect('ipad') || detect('iphone') || detect('ipod')) return 'ios';
if (detect('mac')) return 'os x';
if (detect('linux')) return 'linux';
if (!ua && isBrowser) {
ua = navigator.userAgent;
}
function detect(keyword) {
return ua.indexOf(keyword) > -1;
}
if (ua) {
ua = ua.toLowerCase();
if (detect('windows phone')) return 'windows phone';
if (detect('win')) return 'windows';
if (detect('android')) return 'android';
if (detect('ipad') || detect('iphone') || detect('ipod')) return 'ios';
if (detect('mac')) return 'os x';
if (detect('linux')) return 'linux';
} else if (isNode) {
var _process = process,
platform = _process.platform,
env = _process.env;
if (
platform === 'win32' ||
env.OSTYPE === 'cygwin' ||
env.OSTYPE === 'msys'
) {
return 'windows';
}
if (platform === 'darwin') {
return 'os x';
}
if (platform === 'linux') {
return 'linux';
}
}
return 'unknown';
};

24
src/miniprogram_npm/miniprogram-licia/fileSize.js

@ -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;

42
src/miniprogram_npm/miniprogram-licia/fileType.js

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
function _slicedToArray(arr, i) {
function _slicedToArray(r, e) {
return (
_arrayWithHoles(arr) ||
_iterableToArrayLimit(arr, i) ||
_unsupportedIterableToArray(arr, i) ||
_arrayWithHoles(r) ||
_iterableToArrayLimit(r, e) ||
_unsupportedIterableToArray(r, e) ||
_nonIterableRest()
);
}
@ -11,19 +11,25 @@ function _nonIterableRest() { @@ -11,19 +11,25 @@ function _nonIterableRest() {
'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === 'string') return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === 'Object' && o.constructor) n = o.constructor.name;
if (n === 'Map' || n === 'Set') return Array.from(o);
if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return _arrayLikeToArray(o, minLen);
function _unsupportedIterableToArray(r, a) {
if (r) {
if ('string' == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return (
'Object' === t && r.constructor && (t = r.constructor.name),
'Map' === t || 'Set' === t
? Array.from(r)
: 'Arguments' === t ||
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)
? _arrayLikeToArray(r, a)
: void 0
);
}
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _iterableToArrayLimit(r, l) {
var t =
@ -67,8 +73,8 @@ function _iterableToArrayLimit(r, l) { @@ -67,8 +73,8 @@ function _iterableToArrayLimit(r, l) {
return a;
}
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
var type = require('./type');

6
src/miniprogram_npm/miniprogram-licia/index.js

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
exports.Benchmark = require('./Benchmark');
exports.BloomFilter = require('./BloomFilter');
exports.Caseless = require('./Caseless');
exports.Channel = require('./Channel');
exports.Class = require('./Class');
exports.Color = require('./Color');
exports.Delegator = require('./Delegator');
@ -76,6 +77,8 @@ exports.createAssigner = require('./createAssigner'); @@ -76,6 +77,8 @@ exports.createAssigner = require('./createAssigner');
exports.css = require('./css');
exports.cssPriority = require('./cssPriority');
exports.curry = require('./curry');
exports.dataUrl = require('./dataUrl');
exports.dataView = require('./dataView');
exports.dateFormat = require('./dateFormat');
exports.debounce = require('./debounce');
exports.deburr = require('./deburr');
@ -170,6 +173,7 @@ exports.isInt = require('./isInt'); @@ -170,6 +173,7 @@ exports.isInt = require('./isInt');
exports.isIp = require('./isIp');
exports.isJson = require('./isJson');
exports.isLeapYear = require('./isLeapYear');
exports.isMac = require('./isMac');
exports.isMap = require('./isMap');
exports.isMatch = require('./isMatch');
exports.isMiniProgram = require('./isMiniProgram');
@ -199,6 +203,7 @@ exports.isUndef = require('./isUndef'); @@ -199,6 +203,7 @@ exports.isUndef = require('./isUndef');
exports.isUrl = require('./isUrl');
exports.isWeakMap = require('./isWeakMap');
exports.isWeakSet = require('./isWeakSet');
exports.isWindows = require('./isWindows');
exports.jsonClone = require('./jsonClone');
exports.kebabCase = require('./kebabCase');
exports.keyCode = require('./keyCode');
@ -285,6 +290,7 @@ exports.selector = require('./selector'); @@ -285,6 +290,7 @@ exports.selector = require('./selector');
exports.shebang = require('./shebang');
exports.shellSort = require('./shellSort');
exports.shuffle = require('./shuffle');
exports.singleton = require('./singleton');
exports.size = require('./size');
exports.sizeof = require('./sizeof');
exports.sleep = require('./sleep');

8
src/miniprogram_npm/miniprogram-licia/isErr.js

@ -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;

4
src/miniprogram_npm/miniprogram-licia/isMac.js

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
var detectOs = require('./detectOs');
exports = detectOs() === 'os x';
module.exports = exports;

4
src/miniprogram_npm/miniprogram-licia/isWindows.js

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
var detectOs = require('./detectOs');
exports = detectOs() === 'windows';
module.exports = exports;

1
src/miniprogram_npm/miniprogram-licia/naturalSort.js

@ -4,6 +4,7 @@ var toStr = require('./toStr'); @@ -4,6 +4,7 @@ var toStr = require('./toStr');
exports = function(arr) {
return arr.sort(naturalOrderComparator);
};
exports.comparator = naturalOrderComparator;
function naturalOrderComparator(a, b) {
a = toStr(a);

2
src/miniprogram_npm/miniprogram-licia/randomId.js

@ -10,7 +10,7 @@ exports = function() { @@ -10,7 +10,7 @@ exports = function() {
: defSymbols;
var id = '';
var len = symbols.length;
var bytes = randomBytes(21);
var bytes = randomBytes(size);
while (0 < size--) {
id += symbols[bytes[size] % len];
}

23
src/miniprogram_npm/miniprogram-licia/singleton.js

@ -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;

120
src/miniprogram_npm/miniprogram-licia/table.js

@ -3,11 +3,16 @@ var strWidth = require('./strWidth'); @@ -3,11 +3,16 @@ var strWidth = require('./strWidth');
var map = require('./map');
var repeat = require('./repeat');
var cloneDeep = require('./cloneDeep');
var defaults = require('./defaults');
var trim = require('./trim');
var rtrim = require('./rtrim');
var filter = require('./filter');
exports = function(rows) {
var options =
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
rows = cloneDeep(rows);
var options = {
border: defBorder
};
options.border = options.border || {};
defaults(options.border, defBorder);
options.columns = getColumns(rows);
padData(rows, options);
return render(rows, options);
@ -97,6 +102,115 @@ function renderBorder(type, options) { @@ -97,6 +102,115 @@ function renderBorder(type, options) {
}
return ret;
}
exports.parse = function(table) {
var options =
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
options.border = options.border || {};
defaults(options.border, defBorder);
var lines = splitLines(table, options.border);
return parseLines(lines, options);
};
function splitLines(table, border) {
var lines = table.split(/\n/);
var trimLines = [];
var chars = ' ';
each(border, function(val) {
return (chars += val);
});
each(lines, function(line, idx) {
line = trim(line);
line = trim(line, chars);
trimLines[idx] = line;
});
return filter(lines, function(line, idx) {
return trimLines[idx] !== '';
});
}
function parseLines(lines, options) {
var border = options.border;
var maxLen = 0;
each(lines, function(line) {
var len = strWidth(line);
if (len > maxLen) {
maxLen = len;
}
});
lines = map(lines, function(line) {
return line + repeat(' ', maxLen - strWidth(line));
});
var start = -1;
var end = -1;
var firstLine = lines[0];
if (border.bodyLeft) {
start = firstLine.indexOf(border.bodyLeft);
}
if (border.bodyRight) {
end = firstLine.lastIndexOf(border.bodyRight);
}
lines = map(lines, function(line) {
if (start > -1) {
if (end > -1) {
line = line.slice(start + 1, end);
} else {
line = line.slice(start + 1);
}
}
return line;
});
maxLen = lines[0].length;
var rows = [];
var rowCount = lines.length;
var column = [];
var _loop = function() {
var isSeparator = true;
var isFakeColumn = false;
for (var r = 0; r < rowCount; r++) {
column[r] = column[r] || '';
var c = lines[r][i] || '';
if (c !== border.bodyJoin) {
isSeparator = false;
}
column[r] += lines[r][i];
}
if (isSeparator || i === maxLen - 1) {
var emptyLineCount = 0;
each(column, function(data) {
data = rtrim(data, ' ' + border.bodyJoin);
if (data === '') {
emptyLineCount++;
}
});
if (emptyLineCount >= rowCount - 1) {
isFakeColumn = true;
}
if (isSeparator) {
column = map(column, function(data) {
return data.slice(0, data.length - 1);
});
}
column = map(column, function(data) {
return trim(data);
});
for (var _r = 0; _r < rowCount; _r++) {
var row = rows[_r] || [];
var data = column[_r];
if (isFakeColumn) {
if (row.length !== 0 && data) {
row[row.length - 1] += border.bodyJoin + data;
}
} else {
row.push(data);
}
rows[_r] = row;
}
column = [];
}
};
for (var i = 0; i < maxLen; i++) {
_loop();
}
return rows;
}
var defBorder = {
topBody: '─',
topJoin: '┬',

4
src/miniprogram_npm/mp-html/index.js

@ -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(/&amp;/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(/&amp;/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}}});

2
src/miniprogram_npm/mp-html/node/node.js

@ -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})}}});

2
src/miniprogram_npm/mp-html/node/node.wxml

@ -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>

2
src/miniprogram_npm/mp-html/parser.js

File diff suppressed because one or more lines are too long

4
src/miniprogram_npm/number-precision/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__(1747986519498, function(require, module, exports) {
__DEFINE__(1748338798567, function(require, module, exports) {
Object.defineProperty(exports, '__esModule', { value: true });
@ -171,7 +171,7 @@ exports.enableBoundaryChecking = enableBoundaryChecking; @@ -171,7 +171,7 @@ exports.enableBoundaryChecking = enableBoundaryChecking;
exports['default'] = index;
}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
return __REQUIRE__(1747986519498);
return __REQUIRE__(1748338798567);
})()
//miniprogram-npm-outsideDeps=[]
//# sourceMappingURL=index.js.map

319
src/miniprogram_npm/tslib/index.js

@ -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

1
src/miniprogram_npm/tslib/index.js.map

File diff suppressed because one or more lines are too long

6
src/pages/applyFrom/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"navigationStyle": "custom",
"usingComponents": {
"navbar": "/components/navbar/index"
}
}

134
src/pages/applyFrom/index.scss

@ -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;
}
}
}

17
src/pages/applyFrom/index.ts

@ -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 {}

78
src/pages/applyFrom/index.wxml

@ -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>

6
src/pages/applyFromResult/index.json

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
{
"navigationStyle": "custom",
"usingComponents": {
"navbar": "/components/navbar/index"
}
}

50
src/pages/applyFromResult/index.scss

@ -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;
}
}
}

11
src/pages/applyFromResult/index.ts

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
const _app = getApp<IAppOption>()
Page({
data: {
pageTop: 0,
background: 'transparent',
},
onLoad() {},
})
export {}

16
src/pages/applyFromResult/index.wxml

@ -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>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save