This commit is contained in:
jia 2023-10-28 16:37:57 +08:00
parent f63f640a7b
commit 6b5654c74b
53 changed files with 14457 additions and 0 deletions

211
static/css/base.css Normal file
View File

@ -0,0 +1,211 @@
@charset "UTF-8";
* {scrollbar-color: #e5e5e5 #f7f7f9;scrollbar-width: thin;}
html {margin: 0 auto;max-width: 1200px;}
body {overflow-x: hidden;}
.font-color,.font-color-red {color:#fc4141!important}
.bg-color{background-color:#e93323!important}
.icon-color{color: #ff3c2b}
.cart-color {color: #ff3700 !important;border:1px solid #ff3700 !important}
.padding20{padding: 20rpx}
.pad20 {padding: 0 20rpx}
.padding30{padding: 30rpx}
.pad30{padding: 0 30rpx}
.pull-left{float: left;}
.pull-right{float: right;}
.clearfix:after{content:'';display:block;height:0;clear:both}
.clearfix{zoom:1}
.acea-row {display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-lines: multiple;
-moz-box-lines:multiple;-o-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
.acea-row.row-middle {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center
}
.acea-row.row-top {
-webkit-box-align: start;
-moz-box-align: start;
-o-box-align: start;
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start
}
.acea-row.row-bottom {
-webkit-box-align: end;
-moz-box-align: end;
-o-box-align: end;
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end
}
.acea-row.row-center {
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-right {
-webkit-box-pack: end;
-moz-box-pack: end;
-o-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.acea-row.row-left {
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start
}
.acea-row.row-between {
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-around {
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column-around {
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column
}
.acea-row.row-column-between {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-center-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-between-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.start {
width: 122rpx;
height: 30rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDMDg0NEE2QTVFNUQxMUU4QUI3RkNGOTgwNDYyRUZDOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODU5QzVENDMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODU5QzVEMzMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkN2ZhZTM5NC0wNmE4LTkzNGYtODA0OS0zNjBjNTcxOTU2YjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpmYWI1M2NhMC04MWE1LTE5NGItYmJlYi1jMzI2MjIwNmNhOTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4ctYL1AAAHsElEQVR42uycS4gcVRiFq5Mm4yuKihoVlKg7IVlkI4oGFV9R4wPSJChBMW5ECYooKuIbEReCBBGJEDS+BkVJYEIMJgvJIossFATxCW58boRJEDEZz83cDk3TXc/7T9Xt+g783O7p6tP/9Km6dbvp+jpzc3MJmnwt4i0gaETQiKBRM+UWY8OVpt9XXXySakcZ34Xwp/fR3mWO6LWqW/Wilxnte5b+re29TNB3+fEeozfL0r+1vXdGTRmdTmfc9HGGG1Rd1d+qZecc/PGfcVPI2Bc19Kf3uSBHdM+/mNNpqtsD77WW/q3uvTtmDzpPw9kDxm5XW6q6b2jTB7XtrEZXc35vc/rNV7LQ/vQ+2rs75v/Zproux45yhWrniL/vUq1JeZ6lP70XmLpvVr1SYoo5qnrBrQ4ztrP0p/eiizFND9dreHdgOknTr25lqEXCvrwLGgt/ei+xGNOTP9ewUrUn48XclLGi/2J5ZelP7wVX3TJxJ/f3Mjbbpu3+KrOctPSn9+Ifr9ZWfLxOf3rPE7TOF1Mabhg68e/yy/q+1mi7bpn/xNKf3osd0deqTva3f1ZdpenCLeFXq37wfz9ddWXJvdbSn94LBH2bH9/2J/79/hzypV8wvD60XVFZ+tN7xhcmgzrRnQv0AjtHLBgOa9is6eOzCm+WpT+9p32ORpMnfmFC0IigEUEjgkYEjQgaETQiaETQBI0IGhE0ImhE0IigEUGj8oIaEEfvTtPT0ytVF5bxh3gQl/9TqkcWauqGeFCDv47kM5P5y2PP1+0lpkH7K+9v9HfX6/4JIf8ZS/+Ye/dap/pI5U4Nt1gf0RAP6vO/WrVX9YnqjqJPhnjQoN5Tpu0LNPzS6/XcZTmHdH9WdZbu/1kp6ARqQC29Kzw39d+rOqL6V7XY33Y/5n9pYNOtqpdd4BqX+G3dNqck81dgzuQN2l15766gf7zgDHHUN/RcxnaW/jH3fkC1QbVbR+v7Y88Rvd5BDZsGdhA3qzykWqXaP+o5EA8a2LuCe0DDparHFOqhHKvxLaovtO3Wcf4QDxrYuwJ7Q8Nbqu0KckVKyO5Kyu2qF/shl151Qw2ox1/BfaXhbtVrKZs9r7pT234T6uMV1IB6/N3F8N+mPP6dX7BV/xwNNaA+f786n+kvuFT3qzYMPL5n4Euaykc01ID6/N3HuL0K91yNH/odaKnuu3P3Mt1264SbQgUNNaAGfwU55fNxX3e+qXrCLbhUbpH2tF9pO4Dcqdp2cYig+1feb1LNDi1GDqs26+Y1Fc5Dlv4x977azwSX+AXXTwMLNTd7rPOzhfti5vIsM4gHDdIgxllH6XJ3tPrVd9qRf5GGWW33R/9vI78bIeh2iJ8SETQiaETQiKARQSOCRgSNCBoRNEEjgkYEjQgaETQiaETQiKARQSMnYDXheneqApSx9AZWE16lgTKW3sBqAqoqUMbSG1hNWFUCylh6A6sJq0pAGUtvYDUBYDJ+aq0MlLH0BlZTsHdLoAywmmL+1r2bAWUSYDX5/ReqdwugjKl32gv6N8xdcP1OxnTopruNg6yOPG+Whf9C9u6+wNDwrOoZvclfjwnCXfr6pOrRQdZI1vse2htYTYXeQwNlLL2B1VTvPRhQxtIbWE01mEySBATKWHoDq6nWe5IEBMpYegOrqdB7aKCMpTewmmq9BwXKWHrDMCkoU6AMsBpUVfyUiKARQSOCRgSNCBoRNCJoRNCIoAkaETQiaETQiKARQSOCRgSNMtQmholTFQ4IDJOwsva3ZIxY+8MwySNLxoi1PwyTYrJkjFj7wzApIEvGiLU/DJOcU58ZY8TaH4bJ6DfFjANi7Q/DpJi/JWPE2h+GSVKQYWLBAbH2h2FSkmESmgNi7Q/DpKS/JWPE2h+GSXFZMkas/YN5Z7I7xnBAdvsvNvpzzTEOiI66/0p8SWLqnwxxQPwixl1P/IF/vM8B+bhkGJb+wbwnnWGSJLaMEWt/GCY5v2gwY4xY+8MwKSZLxoi1PwyT1H/IkANi7Q/DBFUWPyUiaETQiKARQSOCRgSNCBoRNCJogkYEjQgaETQiaETQiKARQaMMNY1h4tRUDggMk/BqJAck5t4bxzBpMgck5t4bxTDxaiwHJObem8YwcWosByTm3mthmKRMT43mgMTcey0Mk1g5IDH3XhfDJEoOSMy918owiY0DEnPvtTNMYuKAxNx77QyTmDggMffeFIZJFByQmHuvnWHSf34SAQck5t6bwDBJkkg4IDH3XjvDJCYOSMy9N4FhEg0HJObeR56jh5bnGxM/Z6TIfXbeVxKS8b2bDcaxOvR3Z7tFe+2M/6q1Kd5R9Q7DpCXip0QEjQgaETQiaETQiKARQSOCRgRN0IigEUEjgkYEjQgamQhqQDt6L3tEt5IaEHPvhYNuMzUg5t7LHNGtpQbE3HuZoFtLDYi590UFp4/jV977yzmPXXkfcHoy8297790xxlADWkI8gBowYb13oAZAPDj+IT2BGhB975mLMagBk9F73lU31IDIe+/mfEGoAZH3nveIhhoQee95FmNT/nPbDn/OeLh/UbYeW67hVdWnyTwXdL0eO1JwQRPUn95LLsYSqAET0XueczTUgAnoHeJBS8RPiQgaETQiaNRM/S/AAOykxVBJG5QXAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 122rpx auto;
}
.start.star5{background-position:0 3rpx;}
.start.star4{background-position:0 -30rpx;}
.start.star3{background-position:0 -70rpx;}
.start.star2{background-position:0 -105rpx;}
.start.star1{background-position:0 -140rpx;}
.start.star0{background-position:0 -175rpx;}
*{box-sizing:border-box}
page{font-size: 28rpx;background-color:#f5f5f5;color: #333}
body,html{height:unset}
button{padding:0;margin:0;line-height:normal;background-color:#fff}
button::after {border:0}
radio .wx-radio-input {border-radius:50%;width:38rpx;height:38rpx}
radio .wx-radio-input.wx-radio-input-checked{border:1px solid #e93323;background-color:#e93323;}
radio .uni-radio-input{border-radius:50%;width:38rpx;height:38rpx}
radio .uni-radio-input.uni-radio-input-checked{border: 1px solid #e93323;background-color: #e93323;}
checkbox .wx-checkbox-input{width:38rpx;height:38rpx}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{color: #fff!important;}
checkbox .uni-checkbox-input{width: 38rpx;height: 38rpx}
checkbox .uni-checkbox-input.uni-checkbox-input-checked,
checkbox .wx-checkbox-input.wx-checkbox-input-checked{border:1px solid #e93323!important;background-color:#e93323!important;color:#fff!important;}
checkbox .uni-checkbox-input.uni-checkbox-input-checked::before{font-size: 35rpx}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;}
.mask{position:fixed;top: 0;left:0;right:0;bottom:0;background-color:#000;opacity:.5;z-index:30}
@keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
@-webkit-keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
.loadingpic{animation:load 3s linear 1s infinite;--webkit-animation:load 3s linear 1s infinite}
.loading-list{animation:load linear 1s infinite;-webkit-animation:load linear 1s infinite;font-size:40rpx;margin-right:22rpx}
.loading{width:100%;height:100rpx;line-height:100rpx;align-items:center;justify-content:center;position:relative;text-align:center}
.loading .line {
position: absolute;
width: 450rpx;
left: 150rpx;
top: 50rpx;
height: 1px;
border-top: 1px solid #eee
}
.loading .text {
position: relative;
display: inline-block;
padding: 0 20rpx;
background: #fff;
z-index: 2;
color: #777
}
.loadingicon .loading {
animation: load linear 1s infinite;
font-size: 45rpx;
color: #000
}
.loadingicon {
width: 100%;
height: 80rpx;
overflow: hidden
}

956
static/css/style.scss Normal file

File diff suppressed because one or more lines are too long

2530
static/iconfont/iconfont.css Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/logo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
static/images/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/img/X.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

BIN
static/img/c1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/img/c2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/img/caidan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/img/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

BIN
static/img/colse1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/img/cover-bg.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
static/img/gn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/img/guanzhu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
static/img/guanzhuc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
static/img/index.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
static/img/indexc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
static/img/jb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/img/li.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/img/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/img/live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/img/livec.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/img/livelogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
static/img/liwu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/img/location.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/img/login.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
static/img/message.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
static/img/messagec.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
static/img/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
static/img/myc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
static/img/noshuju.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/img/qiehuan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

BIN
static/img/shanpin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/img/wethar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
static/img/xj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,63 @@
import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
/**
* 腾讯云 SDKAppId需要替换为您自己账号下的 SDKAppId
*
* 进入腾讯云实时音视频[控制台](https://console.cloud.tencent.com/rav ) 创建应用,即可看到 SDKAppId
* 它是腾讯云用于区分客户的唯一标识
*/
var SDKAPPID = 1600006428;
/**
* 签名过期时间建议不要设置的过短
* <p>
* 时间单位
* 默认时间7 x 24 x 60 x 60 = 604800 = 7
*/
var EXPIRETIME = 604800;
/**
* 计算签名用的加密密钥获取步骤如下
*
* step1. 进入腾讯云实时音视频[控制台](https://console.cloud.tencent.com/rav ),如果还没有应用就创建一个,
* step2. 单击应用配置进入基础配置页面并进一步找到帐号体系集成部分
* step3. 点击查看密钥按钮就可以看到计算 UserSig 使用的加密的密钥了请将其拷贝并复制到如下的变量中
*
* 注意该方案仅适用于调试Demo正式上线前请将 UserSig 计算代码和密钥迁移到您的后台服务器上以避免加密密钥泄露导致的流量盗用
* 文档https://cloud.tencent.com/document/product/647/17275#Server
*/
var SECRETKEY = "c60801b013c0f3d6f91dbb1974ff508b79d4fb76b30d2ccda0e39e0e0a7f6f2a";
/*
* Module: GenerateTestUserSig
*
* Function: 用于生成测试用的 UserSigUserSig 是腾讯云为其云服务设计的一种安全保护签名
* 其计算方法是对 SDKAppIDUserID EXPIRETIME 进行加密加密算法为 HMAC-SHA256
*
* Attention: 请不要将如下代码发布到您的线上正式版本的 App 原因如下
*
* 本文件中的代码虽然能够正确计算出 UserSig但仅适合快速调通 SDK 的基本功能不适合线上产品
* 这是因为客户端代码中的 SECRETKEY 很容易被反编译逆向破解尤其是 Web 端的代码被破解的难度几乎为零
* 一旦您的密钥泄露攻击者就可以计算出正确的 UserSig 来盗用您的腾讯云流量
*
* 正确的做法是将 UserSig 的计算代码和加密密钥放在您的业务服务器上然后由 App 按需向您的服务器获取实时算出的 UserSig
* 由于破解服务器的成本要高于破解客户端 App所以服务器计算的方案能够更好地保护您的加密密钥
*
* Referencehttps://cloud.tencent.com/document/product/647/17275#Server
*/
function genTestUserSig(userID) {
var generator = new LibGenerateTestUserSig(SDKAPPID, SECRETKEY, EXPIRETIME);
var userSig = generator.genTestUserSig(userID);
return {
sdkAppID: SDKAPPID,
userSig: userSig
};
}
module.exports = {
genTestUserSig
}

File diff suppressed because one or more lines are too long

252
static/js/func.js Normal file
View File

@ -0,0 +1,252 @@
var siteroot = require('./siteinfo.js');
var url = siteroot.siteroot+'?c=entry&a=wxapp&i='+siteroot.uniacid+'&m=sd_moyue&do=';
var func = {
util: require('../we7/resource/js/util.js'),
api:{
upload_img:url+'upload_img',
wxlogin:url+'wxlogin',
appland:url+'appland',//app登陆
write_userinfo:url+'write_userinfo',
get_users:url+'get_users',
app_wx_land:url+'app_wx_land',
get_userinfo:url+'get_userinfo',
change_user_address:url+'change_user_address',
get_system:url+'get_system',
white_lock_action_record:url+'white_lock_action_record',
praise:url+'praise',
send_comment:url+'send_comment',
report_action:url+'report_action',
del_action:url+'del_action',
follow_user:url+'follow_user',
bind_userid:url+'bind_userid',
bind_roomid:url+'bind_roomid',
send_user_message:url+'send_user_message',
send_room_message:url+'send_room_message',
user_send_liwu_pay:url+'user_send_liwu_pay',
user_send_room_liwu_pay:url+'user_send_room_liwu_pay',
user_join_room:url+'user_join_room',
user_greet:url+'user_greet',
websocket_get_message:url+'websocket_get_message',
change_room_status:url+'change_room_status',
/************************/
get_user_live:url+'get_user_live',
live_apply:url+'live_apply',
create_live_room:url+'create_live_room',
get_live_room:url+'get_live_room',
write_room_info:url+'write_room_info',
get_live_set:url+'get_live_set',
get_room_list:url+'get_room_list',
change_live_room:url+'change_live_room',
send_room_message:url+'send_room_message',
get_room_message:url+'get_room_message'
/*********************************/
},
system:function(){
uni.request({
url:url+'system',
data:{
},
method:"POST",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success:(res)=>{
console.log(res);
uni.setNavigationBarTitle({//标题
title: res.data.data.system.title
});
uni.setNavigationBarColor({//导航栏
frontColor: res.data.data.system.frontColor,
backgroundColor: res.data.data.system.nvgcolor,
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
uni.setTabBarStyle({//底部导航
backgroundColor: '#F0F0F0'
})
}
})
},
set_mid:function(u,m){
uni.request({//设置分享来源
url:url+'set_mid',
data:{
userid:u,
mid:m
},
method:"POST",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success:(res)=>{
}
})
},
jump:function(type,u){
if(type == 1){
uni.navigateTo({
url: '/pages/'+u
});
}else if(type == 2){
uni.redirectTo({
url: '/pages/'+u
});
}else if(type == 3){
uni.reLaunch({
url: '/pages/'+u
});
}else if(type == 4){
uni.navigateBack({
delta: 1
});
}
},
change_room_status:function(e,s,u){
const t = this;
uni.request({//返回系统数据
url:url+'change_room_status',
data:{
roomid:e,
status:s,
userid:u
},
method:"POST",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success:(res)=>{
console.log('改变房间状态')
console.log(res)
}
})
},
bindroomid:function(roomid){
if(!roomid){
console.log('绑定直播间失败')
return
}
/*var client_id = uni.getStorageSync('client_id');
uni.request({//使用长连接绑定房间id 用以监听房间消息若不使用长连接请自行设置监听函数或者使用腾讯IM消息监听
url:url+'bind_roomid',
data:{
roomid:roomid,
client_id:client_id
},
method:"POST",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success:(res)=>{
console.log('绑定直播间')
console.log(res)
}
})*/
},
base64_encode:function(str) { // 编码配合encodeURIComponent使用
var c1, c2, c3;
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var i = 0, len = str.length, strin = '';
while (i < len) {
c1 = str.charCodeAt(i++) & 0xff;
if (i == len) {
strin += base64EncodeChars.charAt(c1 >> 2);
strin += base64EncodeChars.charAt((c1 & 0x3) << 4);
strin += "==";
break;
}
c2 = str.charCodeAt(i++);
if (i == len) {
strin += base64EncodeChars.charAt(c1 >> 2);
strin += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
strin += base64EncodeChars.charAt((c2 & 0xF) << 2);
strin += "=";
break;
}
c3 = str.charCodeAt(i++);
strin += base64EncodeChars.charAt(c1 >> 2);
strin += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
strin += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
strin += base64EncodeChars.charAt(c3 & 0x3F)
}
return strin
},
base64_decode:function(input) { // 解码配合decodeURIComponent使用
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = base64EncodeChars.indexOf(input.charAt(i++));
enc2 = base64EncodeChars.indexOf(input.charAt(i++));
enc3 = base64EncodeChars.indexOf(input.charAt(i++));
enc4 = base64EncodeChars.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
return this.utf8_decode(output);
},
utf8_decode:function(utftext) { // utf-8解码
var string = '';
let i = 0;
let c = 0;
let c1 = 0;
let c2 = 0;
while (i < utftext.length) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
} else if ((c > 191) && (c < 224)) {
c1 = utftext.charCodeAt(i + 1);
string += String.fromCharCode(((c & 31) << 6) | (c1 & 63));
i += 2;
} else {
c1 = utftext.charCodeAt(i + 1);
c2 = utftext.charCodeAt(i + 2);
string += String.fromCharCode(((c & 15) << 12) | ((c1 & 63) << 6) | (c2 & 63));
i += 3;
}
}
return string;
},
isBase64:function(str) {
const notBase64 = /[^A-Z0-9+\/=]/i; // remove this line and make sure you pass in a string
const len = str.length;
if (!len || len % 4 !== 0 || notBase64.test(str)) {
return false;
}
const firstPaddingChar = str.indexOf('=');
return firstPaddingChar === -1 || firstPaddingChar === len - 1 || (firstPaddingChar === len - 2 && str[len - 1] === '=');
},
geturlParam:function(name){//获取url指定参数
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);//umEn
if(r!= null){
return unescape(r[2]);
}else{
return null//返回参数值
}
}
}
module.exports = func

158
static/js/json.js Normal file
View File

@ -0,0 +1,158 @@
var json = {
//礼物
liwu:[
{
id:1,
name:'小可爱',
ico:'../../static/lw/1.gif',
price:1
},
{
id:2,
name:'好声音',
ico:'../../static/lw/2.gif',
price:2
},
{
id:3,
name:'红色玫瑰',
ico:'../../static/lw/3.gif',
price:6
},
{
id:4,
name:'么么哒',
ico:'../../static/lw/4.gif',
price:6
},
{
id:5,
name:'爱你一辈子',
ico:'../../static/lw/5.gif',
price:12
},
{
id:6,
name:'99朵玫瑰',
ico:'../../static/lw/6.gif',
price:99
},
{
id:7,
name:'蓝色玫瑰',
ico:'../../static/lw/7.gif',
price:9
},
{
id:8,
name:'爱心玫瑰',
ico:'../../static/lw/8.gif',
price:520
}
],
liwu2:[
{
id:9,
name:'粉色玫瑰',
ico:'../../static/lw/9.gif',
price:10
},
{
id:10,
name:'爱你一万年',
ico:'../../static/lw/10.gif',
price:520
},
{
id:11,
name:'往后余生',
ico:'../../static/lw/11.gif',
price:999
},
{
id:12,
name:'比翼双飞',
ico:'../../static/lw/12.gif',
price:1314
},
{
id:13,
name:'飞吻',
ico:'../../static/lw/13.gif',
price:52
},
{
id:14,
name:'我爱你',
ico:'../../static/lw/14.gif',
price:88
},
{
id:15,
name:'生日蛋糕',
ico:'../../static/lw/15.gif',
price:299
},
{
id:16,
name:'薰衣草小熊',
ico:'../../static/lw/16.gif',
price:299
}
],
liwu3:[
{
id:17,
name:'海豚恋人',
ico:'../../static/lw/17.gif',
price:88
},
{
id:18,
name:'全场最美',
ico:'../../static/lw/18.gif',
price:520
},
{
id:19,
name:'法拉利',
ico:'../../static/lw/19.gif',
price:2888
},
{
id:20,
name:'保时捷',
ico:'../../static/lw/20.gif',
price:1199
},
{
id:21,
name:'超级跑车',
ico:'../../static/lw/21.gif',
price:2199
},
{
id:22,
name:'情定爱情海',
ico:'../../static/lw/22.gif',
price:999
},
{
id:23,
name:'爱心火箭',
ico:'../../static/lw/23.gif',
price:18888
},
{
id:24,
name:'比丘特',
ico:'../../static/lw/24.gif',
price:1314
}
]
}
module.exports = json

File diff suppressed because it is too large Load Diff

11
static/js/siteinfo.js Normal file
View File

@ -0,0 +1,11 @@
var siteinfo = {
"uniacid": "40",
"acid": "40",
"multiid": "0",
"version": "1.0.5",
"siteroot": "https://weixin.yunzxun.com/app/index.php",
"design_method": "4" ,
}
module.exports = siteinfo

1307
static/js/webim_handler.js Normal file

File diff suppressed because it is too large Load Diff

6044
static/js/webim_wx.js Normal file

File diff suppressed because it is too large Load Diff

BIN
static/missing-face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,44 @@
function base64_encode(r) {
for (var e, a, t, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = 0, h = r.length, d = ""; c < h; ) {
if (e = 255 & r.charCodeAt(c++), c == h) {
d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4), d += "==";
break;
}
if (a = r.charCodeAt(c++), c == h) {
d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4 | (240 & a) >> 4), d += o.charAt((15 & a) << 2),
d += "=";
break;
}
t = r.charCodeAt(c++), d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4 | (240 & a) >> 4),
d += o.charAt((15 & a) << 2 | (192 & t) >> 6), d += o.charAt(63 & t);
}
return d;
}
function base64_decode(r) {
for (var e, a, t, o, c = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1), h = 0, d = r.length, f = ""; h < d; ) {
for (;e = c[255 & r.charCodeAt(h++)], h < d && -1 == e; ) ;
if (-1 == e) break;
for (;a = c[255 & r.charCodeAt(h++)], h < d && -1 == a; ) ;
if (-1 == a) break;
f += String.fromCharCode(e << 2 | (48 & a) >> 4);
do {
if (61 == (t = 255 & r.charCodeAt(h++))) return f;
t = c[t];
} while (h < d && -1 == t);
if (-1 == t) break;
f += String.fromCharCode((15 & a) << 4 | (60 & t) >> 2);
do {
if (61 == (o = 255 & r.charCodeAt(h++))) return f;
o = c[o];
} while (h < d && -1 == o);
if (-1 == o) break;
f += String.fromCharCode((3 & t) << 6 | o);
}
return f;
}
module.exports = {
base64_encode: base64_encode,
base64_decode: base64_decode
};

View File

@ -0,0 +1,203 @@
var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/, attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), block = makeMap("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"), inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), special = makeMap("script,style"), HTMLParser = function(e, n) {
var t, a, r, s = [], i = e;
for (s.last = function() {
return this[this.length - 1];
}; e; ) {
if (a = !0, s.last() && special[s.last()]) e = e.replace(new RegExp("([\\s\\S]*?)</" + s.last() + "[^>]*>"), function(e, t) {
return t = t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2"), n.chars && n.chars(t),
"";
}), c("", s.last()); else if (0 == e.indexOf("\x3c!--") ? 0 <= (t = e.indexOf("--\x3e")) && (n.comment && n.comment(e.substring(4, t)),
e = e.substring(t + 3), a = !1) : 0 == e.indexOf("</") ? (r = e.match(endTag)) && (e = e.substring(r[0].length),
r[0].replace(endTag, c), a = !1) : 0 == e.indexOf("<") && (r = e.match(startTag)) && (e = e.substring(r[0].length),
r[0].replace(startTag, o), a = !1), a) {
var l = (t = e.indexOf("<")) < 0 ? e : e.substring(0, t);
e = t < 0 ? "" : e.substring(t), n.chars && n.chars(l);
}
if (e == i) throw "Parse Error: " + e;
i = e;
}
function o(e, t, a, r) {
if (t = t.toLowerCase(), block[t]) for (;s.last() && inline[s.last()]; ) c("", s.last());
if (closeSelf[t] && s.last() == t && c("", t), (r = empty[t] || !!r) || s.push(t),
n.start) {
var i = [];
a.replace(attr, function(e, t) {
var a = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[t] ? t : "";
i.push({
name: t,
value: a,
escaped: a.replace(/(^|[^\\])"/g, '$1\\"')
});
}), n.start && n.start(t, i, r);
}
}
function c(e, t) {
if (t) for (a = s.length - 1; 0 <= a && s[a] != t; a--) ; else var a = 0;
if (0 <= a) {
for (var r = s.length - 1; a <= r; r--) n.end && n.end(s[r]);
s.length = a;
}
}
c();
};
function makeMap(e) {
for (var t = {}, a = e.split(","), r = 0; r < a.length; r++) t[a[r]] = !0;
return t;
}
var global = {}, debug = function() {};
function q(e) {
return '"' + e + '"';
}
function removeDOCTYPE(e) {
return e.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*\>\n/, "").replace(/<!DOCTYPE.*\>\n/, "");
}
global.html2json = function(e) {
e = removeDOCTYPE(e);
var n = [], s = {
node: "root",
child: []
};
return HTMLParser(e, {
start: function(e, t, a) {
debug(e, t, a);
var r = {
node: "element",
tag: e
};
if (0 !== t.length && (r.attr = t.reduce(function(e, t) {
var a = t.name, r = t.value;
return r.match(/ /) && (r = r.split(" ")), e[a] ? Array.isArray(e[a]) ? e[a].push(r) : e[a] = [ e[a], r ] : e[a] = r,
e;
}, {})), a) {
var i = n[0] || s;
void 0 === i.child && (i.child = []), i.child.push(r);
} else n.unshift(r);
},
end: function(e) {
debug(e);
var t = n.shift();
if (t.tag !== e && console.error("invalid state: mismatch end tag"), 0 === n.length) s.child.push(t); else {
var a = n[0];
void 0 === a.child && (a.child = []), a.child.push(t);
}
},
chars: function(e) {
debug(e);
var t = {
node: "text",
text: e
};
if (0 === n.length) s.child.push(t); else {
var a = n[0];
void 0 === a.child && (a.child = []), a.child.push(t);
}
},
comment: function(e) {
debug(e);
var t = {
node: "comment",
text: e
}, a = n[0];
void 0 === a.child && (a.child = []), a.child.push(t);
}
}), s;
}, global.json2html = function t(a) {
var e = "";
a.child && (e = a.child.map(function(e) {
return t(e);
}).join(""));
var r = "";
if (a.attr && "" !== (r = Object.keys(a.attr).map(function(e) {
var t = a.attr[e];
return Array.isArray(t) && (t = t.join(" ")), e + "=" + q(t);
}).join(" ")) && (r = " " + r), "element" === a.node) {
var i = a.tag;
return -1 < [ "area", "base", "basefont", "br", "col", "frame", "hr", "img", "input", "isindex", "link", "meta", "param", "embed" ].indexOf(i) ? "<" + a.tag + r + "/>" : "<" + a.tag + r + ">" + e + ("</" + a.tag + ">");
}
return "text" === a.node ? a.text : "comment" === a.node ? "\x3c!--" + a.text + "--\x3e" : "root" === a.node ? e : void 0;
};
var html2wxwebview = function(e) {
var t = global.html2json(e);
return t = parseHtmlNode(t), t = arrangeNode(t);
}, arrangeNode = function(e) {
for (var t = [], a = [], r = 0, i = e.length; r < i; r++) if (0 == r) {
if ("view" == e[r].type) continue;
t.push(e[r]);
} else if ("view" == e[r].type) {
if (0 < t.length) {
var n = {
type: "view",
child: t
};
a.push(n);
}
t = [];
} else if ("img" == e[r].type) {
if (0 < t.length) {
n = {
type: "view",
child: t
};
a.push(n);
}
var s = e[r].attr;
e[r].attr.width && -1 === e[r].attr.width.indexOf("%") && -1 === e[r].attr.width.indexOf("px") && (e[r].attr.width = e[r].attr.width + "px"),
e[r].attr.height && -1 === e[r].attr.height.indexOf("%") && -1 === e[r].attr.height.indexOf("px") && (e[r].attr.height = e[r].attr.height + "px");
n = {
type: "img",
attr: s
};
a.push(n), t = [];
} else if (t.push(e[r]), r == i - 1) {
n = {
type: "view",
child: t
};
a.push(n);
}
return a;
}, parseHtmlNode = function(e) {
var n = [];
return function e(t) {
var a = {};
if ("root" == t.node) ; else if ("element" == t.node) switch (t.tag) {
case "a":
a = {
type: "a",
text: t.child[0].text
};
break;
case "img":
a = {
type: "img",
text: t.text
};
break;
case "p":
case "div":
a = {
type: "view",
text: t.text
};
} else "text" == t.node && (a = {
type: "text",
text: t.text
});
if (t.attr && (a.attr = t.attr), 0 != Object.keys(a).length && n.push(a), "a" != t.tag) {
var r = t.child;
if (r) for (var i in r) e(r[i]);
}
}(e), n;
};
module.exports = {
html2json: html2wxwebview
};

View File

@ -0,0 +1,65 @@
!function(n) {
function v(n, r) {
var t = (65535 & n) + (65535 & r);
return (n >> 16) + (r >> 16) + (t >> 16) << 16 | 65535 & t;
}
function f(n, r, t, e, o, u) {
return v((c = v(v(r, n), v(e, u))) << (f = o) | c >>> 32 - f, t);
var c, f;
}
function g(n, r, t, e, o, u, c) {
return f(r & t | ~r & e, n, r, o, u, c);
}
function l(n, r, t, e, o, u, c) {
return f(r & e | t & ~e, n, r, o, u, c);
}
function d(n, r, t, e, o, u, c) {
return f(r ^ t ^ e, n, r, o, u, c);
}
function C(n, r, t, e, o, u, c) {
return f(t ^ (r | ~e), n, r, o, u, c);
}
function i(n, r) {
var t, e, o, u, c;
n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r;
var f = 1732584193, i = -271733879, a = -1732584194, h = 271733878;
for (t = 0; t < n.length; t += 16) i = C(i = C(i = C(i = C(i = d(i = d(i = d(i = d(i = l(i = l(i = l(i = l(i = g(i = g(i = g(i = g(o = i, a = g(u = a, h = g(c = h, f = g(e = f, i, a, h, n[t], 7, -680876936), i, a, n[t + 1], 12, -389564586), f, i, n[t + 2], 17, 606105819), h, f, n[t + 3], 22, -1044525330), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 4], 7, -176418897), i, a, n[t + 5], 12, 1200080426), f, i, n[t + 6], 17, -1473231341), h, f, n[t + 7], 22, -45705983), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 8], 7, 1770035416), i, a, n[t + 9], 12, -1958414417), f, i, n[t + 10], 17, -42063), h, f, n[t + 11], 22, -1990404162), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 12], 7, 1804603682), i, a, n[t + 13], 12, -40341101), f, i, n[t + 14], 17, -1502002290), h, f, n[t + 15], 22, 1236535329), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 1], 5, -165796510), i, a, n[t + 6], 9, -1069501632), f, i, n[t + 11], 14, 643717713), h, f, n[t], 20, -373897302), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 5], 5, -701558691), i, a, n[t + 10], 9, 38016083), f, i, n[t + 15], 14, -660478335), h, f, n[t + 4], 20, -405537848), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 9], 5, 568446438), i, a, n[t + 14], 9, -1019803690), f, i, n[t + 3], 14, -187363961), h, f, n[t + 8], 20, 1163531501), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 13], 5, -1444681467), i, a, n[t + 2], 9, -51403784), f, i, n[t + 7], 14, 1735328473), h, f, n[t + 12], 20, -1926607734), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 5], 4, -378558), i, a, n[t + 8], 11, -2022574463), f, i, n[t + 11], 16, 1839030562), h, f, n[t + 14], 23, -35309556), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 1], 4, -1530992060), i, a, n[t + 4], 11, 1272893353), f, i, n[t + 7], 16, -155497632), h, f, n[t + 10], 23, -1094730640), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 13], 4, 681279174), i, a, n[t], 11, -358537222), f, i, n[t + 3], 16, -722521979), h, f, n[t + 6], 23, 76029189), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 9], 4, -640364487), i, a, n[t + 12], 11, -421815835), f, i, n[t + 15], 16, 530742520), h, f, n[t + 2], 23, -995338651), a = C(a, h = C(h, f = C(f, i, a, h, n[t], 6, -198630844), i, a, n[t + 7], 10, 1126891415), f, i, n[t + 14], 15, -1416354905), h, f, n[t + 5], 21, -57434055), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 12], 6, 1700485571), i, a, n[t + 3], 10, -1894986606), f, i, n[t + 10], 15, -1051523), h, f, n[t + 1], 21, -2054922799), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 8], 6, 1873313359), i, a, n[t + 15], 10, -30611744), f, i, n[t + 6], 15, -1560198380), h, f, n[t + 13], 21, 1309151649), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 4], 6, -145523070), i, a, n[t + 11], 10, -1120210379), f, i, n[t + 2], 15, 718787259), h, f, n[t + 9], 21, -343485551),
f = v(f, e), i = v(i, o), a = v(a, u), h = v(h, c);
return [ f, i, a, h ];
}
function a(n) {
var r, t = "", e = 32 * n.length;
for (r = 0; r < e; r += 8) t += String.fromCharCode(n[r >> 5] >>> r % 32 & 255);
return t;
}
function h(n) {
var r, t = [];
for (t[(n.length >> 2) - 1] = void 0, r = 0; r < t.length; r += 1) t[r] = 0;
var e = 8 * n.length;
for (r = 0; r < e; r += 8) t[r >> 5] |= (255 & n.charCodeAt(r / 8)) << r % 32;
return t;
}
function e(n) {
var r, t, e = "0123456789abcdef", o = "";
for (t = 0; t < n.length; t += 1) r = n.charCodeAt(t), o += e.charAt(r >>> 4 & 15) + e.charAt(15 & r);
return o;
}
function t(n) {
return unescape(encodeURIComponent(n));
}
function o(n) {
return a(i(h(r = t(n)), 8 * r.length));
var r;
}
function u(n, r) {
return function(n, r) {
var t, e, o = h(n), u = [], c = [];
for (u[15] = c[15] = void 0, 16 < o.length && (o = i(o, 8 * n.length)), t = 0; t < 16; t += 1) u[t] = 909522486 ^ o[t],
c[t] = 1549556828 ^ o[t];
return e = i(u.concat(h(r)), 512 + 8 * r.length), a(i(c.concat(e), 640));
}(t(n), t(r));
}
module.exports = function(n, r, t) {
return r ? t ? u(r, n) : e(u(r, n)) : t ? o(n) : e(o(n));
};
}();

View File

@ -0,0 +1,617 @@
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(n) {
return typeof n;
} : function(n) {
return n && "function" == typeof Symbol && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
};
(function() {
var e = Array.prototype, o = Object.prototype, n = Function.prototype, u = e.push, a = e.slice, p = o.toString, r = o.hasOwnProperty, t = Array.isArray, i = Object.keys, c = n.bind, f = Object.create, l = function() {}, h = function n(t) {
return t instanceof n ? t : this instanceof n ? void (this._wrapped = t) : new n(t);
};
(module.exports = h).VERSION = "1.8.2";
var s = function(u, i, n) {
if (void 0 === i) return u;
switch (null == n ? 3 : n) {
case 1:
return function(n) {
return u.call(i, n);
};
case 2:
return function(n, t) {
return u.call(i, n, t);
};
case 3:
return function(n, t, r) {
return u.call(i, n, t, r);
};
case 4:
return function(n, t, r, e) {
return u.call(i, n, t, r, e);
};
}
return function() {
return u.apply(i, arguments);
};
}, v = function(n, t, r) {
return null == n ? h.identity : h.isFunction(n) ? s(n, t, r) : h.isObject(n) ? h.matcher(n) : h.property(n);
};
h.iteratee = function(n, t) {
return v(n, t, 1 / 0);
};
var y = function(c, f) {
return function(n) {
var t = arguments.length;
if (t < 2 || null == n) return n;
for (var r = 1; r < t; r++) for (var e = arguments[r], u = c(e), i = u.length, o = 0; o < i; o++) {
var a = u[o];
f && void 0 !== n[a] || (n[a] = e[a]);
}
return n;
};
}, d = function(n) {
if (!h.isObject(n)) return {};
if (f) return f(n);
l.prototype = n;
var t = new l();
return l.prototype = null, t;
}, g = Math.pow(2, 53) - 1, m = function(n) {
var t = null != n && n.length;
return "number" == typeof t && 0 <= t && t <= g;
};
function b(a) {
return function(n, t, r, e) {
t = s(t, e, 4);
var u = !m(n) && h.keys(n), i = (u || n).length, o = 0 < a ? 0 : i - 1;
return arguments.length < 3 && (r = n[u ? u[o] : o], o += a), function(n, t, r, e, u, i) {
for (;0 <= u && u < i; u += a) {
var o = e ? e[u] : u;
r = t(r, n[o], o, n);
}
return r;
}(n, t, r, u, o, i);
};
}
h.each = h.forEach = function(n, t, r) {
var e, u;
if (t = s(t, r), m(n)) for (e = 0, u = n.length; e < u; e++) t(n[e], e, n); else {
var i = h.keys(n);
for (e = 0, u = i.length; e < u; e++) t(n[i[e]], i[e], n);
}
return n;
}, h.map = h.collect = function(n, t, r) {
t = v(t, r);
for (var e = !m(n) && h.keys(n), u = (e || n).length, i = Array(u), o = 0; o < u; o++) {
var a = e ? e[o] : o;
i[o] = t(n[a], a, n);
}
return i;
}, h.reduce = h.foldl = h.inject = b(1), h.reduceRight = h.foldr = b(-1), h.find = h.detect = function(n, t, r) {
var e;
if (void 0 !== (e = m(n) ? h.findIndex(n, t, r) : h.findKey(n, t, r)) && -1 !== e) return n[e];
}, h.filter = h.select = function(n, e, t) {
var u = [];
return e = v(e, t), h.each(n, function(n, t, r) {
e(n, t, r) && u.push(n);
}), u;
}, h.reject = function(n, t, r) {
return h.filter(n, h.negate(v(t)), r);
}, h.every = h.all = function(n, t, r) {
t = v(t, r);
for (var e = !m(n) && h.keys(n), u = (e || n).length, i = 0; i < u; i++) {
var o = e ? e[i] : i;
if (!t(n[o], o, n)) return !1;
}
return !0;
}, h.some = h.any = function(n, t, r) {
t = v(t, r);
for (var e = !m(n) && h.keys(n), u = (e || n).length, i = 0; i < u; i++) {
var o = e ? e[i] : i;
if (t(n[o], o, n)) return !0;
}
return !1;
}, h.contains = h.includes = h.include = function(n, t, r) {
return m(n) || (n = h.values(n)), 0 <= h.indexOf(n, t, "number" == typeof r && r);
}, h.invoke = function(n, r) {
var e = a.call(arguments, 2), u = h.isFunction(r);
return h.map(n, function(n) {
var t = u ? r : n[r];
return null == t ? t : t.apply(n, e);
});
}, h.pluck = function(n, t) {
return h.map(n, h.property(t));
}, h.where = function(n, t) {
return h.filter(n, h.matcher(t));
}, h.findWhere = function(n, t) {
return h.find(n, h.matcher(t));
}, h.max = function(n, e, t) {
var r, u, i = -1 / 0, o = -1 / 0;
if (null == e && null != n) for (var a = 0, c = (n = m(n) ? n : h.values(n)).length; a < c; a++) r = n[a],
i < r && (i = r); else e = v(e, t), h.each(n, function(n, t, r) {
u = e(n, t, r), (o < u || u === -1 / 0 && i === -1 / 0) && (i = n, o = u);
});
return i;
}, h.min = function(n, e, t) {
var r, u, i = 1 / 0, o = 1 / 0;
if (null == e && null != n) for (var a = 0, c = (n = m(n) ? n : h.values(n)).length; a < c; a++) (r = n[a]) < i && (i = r); else e = v(e, t),
h.each(n, function(n, t, r) {
((u = e(n, t, r)) < o || u === 1 / 0 && i === 1 / 0) && (i = n, o = u);
});
return i;
}, h.shuffle = function(n) {
for (var t, r = m(n) ? n : h.values(n), e = r.length, u = Array(e), i = 0; i < e; i++) (t = h.random(0, i)) !== i && (u[i] = u[t]),
u[t] = r[i];
return u;
}, h.sample = function(n, t, r) {
return null == t || r ? (m(n) || (n = h.values(n)), n[h.random(n.length - 1)]) : h.shuffle(n).slice(0, Math.max(0, t));
}, h.sortBy = function(n, e, t) {
return e = v(e, t), h.pluck(h.map(n, function(n, t, r) {
return {
value: n,
index: t,
criteria: e(n, t, r)
};
}).sort(function(n, t) {
var r = n.criteria, e = t.criteria;
if (r !== e) {
if (e < r || void 0 === r) return 1;
if (r < e || void 0 === e) return -1;
}
return n.index - t.index;
}), "value");
};
var _ = function(o) {
return function(e, u, n) {
var i = {};
return u = v(u, n), h.each(e, function(n, t) {
var r = u(n, t, e);
o(i, n, r);
}), i;
};
};
h.groupBy = _(function(n, t, r) {
h.has(n, r) ? n[r].push(t) : n[r] = [ t ];
}), h.indexBy = _(function(n, t, r) {
n[r] = t;
}), h.countBy = _(function(n, t, r) {
h.has(n, r) ? n[r]++ : n[r] = 1;
}), h.toArray = function(n) {
return n ? h.isArray(n) ? a.call(n) : m(n) ? h.map(n, h.identity) : h.values(n) : [];
}, h.size = function(n) {
return null == n ? 0 : m(n) ? n.length : h.keys(n).length;
}, h.partition = function(n, e, t) {
e = v(e, t);
var u = [], i = [];
return h.each(n, function(n, t, r) {
(e(n, t, r) ? u : i).push(n);
}), [ u, i ];
}, h.first = h.head = h.take = function(n, t, r) {
if (null != n) return null == t || r ? n[0] : h.initial(n, n.length - t);
}, h.initial = function(n, t, r) {
return a.call(n, 0, Math.max(0, n.length - (null == t || r ? 1 : t)));
}, h.last = function(n, t, r) {
if (null != n) return null == t || r ? n[n.length - 1] : h.rest(n, Math.max(0, n.length - t));
}, h.rest = h.tail = h.drop = function(n, t, r) {
return a.call(n, null == t || r ? 1 : t);
}, h.compact = function(n) {
return h.filter(n, h.identity);
};
var j = function n(t, r, e, u) {
for (var i = [], o = 0, a = u || 0, c = t && t.length; a < c; a++) {
var f = t[a];
if (m(f) && (h.isArray(f) || h.isArguments(f))) {
r || (f = n(f, r, e));
var l = 0, s = f.length;
for (i.length += s; l < s; ) i[o++] = f[l++];
} else e || (i[o++] = f);
}
return i;
};
function x(i) {
return function(n, t, r) {
t = v(t, r);
for (var e = null != n && n.length, u = 0 < i ? 0 : e - 1; 0 <= u && u < e; u += i) if (t(n[u], u, n)) return u;
return -1;
};
}
h.flatten = function(n, t) {
return j(n, t, !1);
}, h.without = function(n) {
return h.difference(n, a.call(arguments, 1));
}, h.uniq = h.unique = function(n, t, r, e) {
if (null == n) return [];
h.isBoolean(t) || (e = r, r = t, t = !1), null != r && (r = v(r, e));
for (var u = [], i = [], o = 0, a = n.length; o < a; o++) {
var c = n[o], f = r ? r(c, o, n) : c;
t ? (o && i === f || u.push(c), i = f) : r ? h.contains(i, f) || (i.push(f), u.push(c)) : h.contains(u, c) || u.push(c);
}
return u;
}, h.union = function() {
return h.uniq(j(arguments, !0, !0));
}, h.intersection = function(n) {
if (null == n) return [];
for (var t = [], r = arguments.length, e = 0, u = n.length; e < u; e++) {
var i = n[e];
if (!h.contains(t, i)) {
for (var o = 1; o < r && h.contains(arguments[o], i); o++) ;
o === r && t.push(i);
}
}
return t;
}, h.difference = function(n) {
var t = j(arguments, !0, !0, 1);
return h.filter(n, function(n) {
return !h.contains(t, n);
});
}, h.zip = function() {
return h.unzip(arguments);
}, h.unzip = function(n) {
for (var t = n && h.max(n, "length").length || 0, r = Array(t), e = 0; e < t; e++) r[e] = h.pluck(n, e);
return r;
}, h.object = function(n, t) {
for (var r = {}, e = 0, u = n && n.length; e < u; e++) t ? r[n[e]] = t[e] : r[n[e][0]] = n[e][1];
return r;
}, h.indexOf = function(n, t, r) {
var e = 0, u = n && n.length;
if ("number" == typeof r) e = r < 0 ? Math.max(0, u + r) : r; else if (r && u) return n[e = h.sortedIndex(n, t)] === t ? e : -1;
if (t != t) return h.findIndex(a.call(n, e), h.isNaN);
for (;e < u; e++) if (n[e] === t) return e;
return -1;
}, h.lastIndexOf = function(n, t, r) {
var e = n ? n.length : 0;
if ("number" == typeof r && (e = r < 0 ? e + r + 1 : Math.min(e, r + 1)), t != t) return h.findLastIndex(a.call(n, 0, e), h.isNaN);
for (;0 <= --e; ) if (n[e] === t) return e;
return -1;
}, h.findIndex = x(1), h.findLastIndex = x(-1), h.sortedIndex = function(n, t, r, e) {
for (var u = (r = v(r, e, 1))(t), i = 0, o = n.length; i < o; ) {
var a = Math.floor((i + o) / 2);
r(n[a]) < u ? i = a + 1 : o = a;
}
return i;
}, h.range = function(n, t, r) {
arguments.length <= 1 && (t = n || 0, n = 0), r = r || 1;
for (var e = Math.max(Math.ceil((t - n) / r), 0), u = Array(e), i = 0; i < e; i++,
n += r) u[i] = n;
return u;
};
var w = function(n, t, r, e, u) {
if (!(e instanceof t)) return n.apply(r, u);
var i = d(n.prototype), o = n.apply(i, u);
return h.isObject(o) ? o : i;
};
h.bind = function(t, r) {
if (c && t.bind === c) return c.apply(t, a.call(arguments, 1));
if (!h.isFunction(t)) throw new TypeError("Bind must be called on a function");
var e = a.call(arguments, 2);
return function n() {
return w(t, n, r, this, e.concat(a.call(arguments)));
};
}, h.partial = function(i) {
var o = a.call(arguments, 1);
return function n() {
for (var t = 0, r = o.length, e = Array(r), u = 0; u < r; u++) e[u] = o[u] === h ? arguments[t++] : o[u];
for (;t < arguments.length; ) e.push(arguments[t++]);
return w(i, n, this, this, e);
};
}, h.bindAll = function(n) {
var t, r, e = arguments.length;
if (e <= 1) throw new Error("bindAll must be passed function names");
for (t = 1; t < e; t++) n[r = arguments[t]] = h.bind(n[r], n);
return n;
}, h.memoize = function(u, i) {
var n = function n(t) {
var r = n.cache, e = "" + (i ? i.apply(this, arguments) : t);
return h.has(r, e) || (r[e] = u.apply(this, arguments)), r[e];
};
return n.cache = {}, n;
}, h.defer = h.partial(h.delay = function(n, t) {
var r = a.call(arguments, 2);
return setTimeout(function() {
return n.apply(null, r);
}, t);
}, h, 1), h.throttle = function(r, e, u) {
var i, o, a, c = null, f = 0;
u || (u = {});
var l = function() {
f = !1 === u.leading ? 0 : h.now(), c = null, a = r.apply(i, o), c || (i = o = null);
};
return function() {
var n = h.now();
f || !1 !== u.leading || (f = n);
var t = e - (n - f);
return i = this, o = arguments, t <= 0 || e < t ? (c && (clearTimeout(c), c = null),
f = n, a = r.apply(i, o), c || (i = o = null)) : c || !1 === u.trailing || (c = setTimeout(l, t)),
a;
};
}, h.debounce = function(r, e, u) {
var i, o, a, c, f, t = function n() {
var t = h.now() - c;
t < e && 0 <= t ? i = setTimeout(n, e - t) : (i = null, u || (f = r.apply(a, o),
i || (a = o = null)));
};
return function() {
a = this, o = arguments, c = h.now();
var n = u && !i;
return i || (i = setTimeout(t, e)), n && (f = r.apply(a, o), a = o = null), f;
};
}, h.wrap = function(n, t) {
return h.partial(t, n);
}, h.negate = function(n) {
return function() {
return !n.apply(this, arguments);
};
}, h.compose = function() {
var r = arguments, e = r.length - 1;
return function() {
for (var n = e, t = r[e].apply(this, arguments); n--; ) t = r[n].call(this, t);
return t;
};
}, h.after = function(n, t) {
return function() {
if (--n < 1) return t.apply(this, arguments);
};
}, h.once = h.partial(h.before = function(n, t) {
var r;
return function() {
return 0 < --n && (r = t.apply(this, arguments)), n <= 1 && (t = null), r;
};
}, 2);
var A = !{
toString: null
}.propertyIsEnumerable("toString"), O = [ "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString" ];
function k(n, t) {
var r = O.length, e = n.constructor, u = h.isFunction(e) && e.prototype || o, i = "constructor";
for (h.has(n, i) && !h.contains(t, i) && t.push(i); r--; ) (i = O[r]) in n && n[i] !== u[i] && !h.contains(t, i) && t.push(i);
}
h.keys = function(n) {
if (!h.isObject(n)) return [];
if (i) return i(n);
var t = [];
for (var r in n) h.has(n, r) && t.push(r);
return A && k(n, t), t;
}, h.allKeys = function(n) {
if (!h.isObject(n)) return [];
var t = [];
for (var r in n) t.push(r);
return A && k(n, t), t;
}, h.values = function(n) {
for (var t = h.keys(n), r = t.length, e = Array(r), u = 0; u < r; u++) e[u] = n[t[u]];
return e;
}, h.mapObject = function(n, t, r) {
t = v(t, r);
for (var e, u = h.keys(n), i = u.length, o = {}, a = 0; a < i; a++) o[e = u[a]] = t(n[e], e, n);
return o;
}, h.pairs = function(n) {
for (var t = h.keys(n), r = t.length, e = Array(r), u = 0; u < r; u++) e[u] = [ t[u], n[t[u]] ];
return e;
}, h.invert = function(n) {
for (var t = {}, r = h.keys(n), e = 0, u = r.length; e < u; e++) t[n[r[e]]] = r[e];
return t;
}, h.functions = h.methods = function(n) {
var t = [];
for (var r in n) h.isFunction(n[r]) && t.push(r);
return t.sort();
}, h.extend = y(h.allKeys), h.extendOwn = h.assign = y(h.keys), h.findKey = function(n, t, r) {
t = v(t, r);
for (var e, u = h.keys(n), i = 0, o = u.length; i < o; i++) if (t(n[e = u[i]], e, n)) return e;
}, h.pick = function(n, t, r) {
var e, u, i = {}, o = n;
if (null == o) return i;
h.isFunction(t) ? (u = h.allKeys(o), e = s(t, r)) : (u = j(arguments, !1, !1, 1),
e = function(n, t, r) {
return t in r;
}, o = Object(o));
for (var a = 0, c = u.length; a < c; a++) {
var f = u[a], l = o[f];
e(l, f, o) && (i[f] = l);
}
return i;
}, h.omit = function(n, t, r) {
if (h.isFunction(t)) t = h.negate(t); else {
var e = h.map(j(arguments, !1, !1, 1), String);
t = function(n, t) {
return !h.contains(e, t);
};
}
return h.pick(n, t, r);
}, h.defaults = y(h.allKeys, !0), h.create = function(n, t) {
var r = d(n);
return t && h.extendOwn(r, t), r;
}, h.clone = function(n) {
return h.isObject(n) ? h.isArray(n) ? n.slice() : h.extend({}, n) : n;
}, h.tap = function(n, t) {
return t(n), n;
}, h.isMatch = function(n, t) {
var r = h.keys(t), e = r.length;
if (null == n) return !e;
for (var u = Object(n), i = 0; i < e; i++) {
var o = r[i];
if (t[o] !== u[o] || !(o in u)) return !1;
}
return !0;
};
h.isEqual = function(n, t) {
return function n(t, r, e, u) {
if (t === r) return 0 !== t || 1 / t == 1 / r;
if (null == t || null == r) return t === r;
t instanceof h && (t = t._wrapped), r instanceof h && (r = r._wrapped);
var i = p.call(t);
if (i !== p.call(r)) return !1;
switch (i) {
case "[object RegExp]":
case "[object String]":
return "" + t == "" + r;
case "[object Number]":
return +t != +t ? +r != +r : 0 == +t ? 1 / +t == 1 / r : +t == +r;
case "[object Date]":
case "[object Boolean]":
return +t == +r;
}
var o = "[object Array]" === i;
if (!o) {
if ("object" != (void 0 === t ? "undefined" : _typeof(t)) || "object" != (void 0 === r ? "undefined" : _typeof(r))) return !1;
var a = t.constructor, c = r.constructor;
if (a !== c && !(h.isFunction(a) && a instanceof a && h.isFunction(c) && c instanceof c) && "constructor" in t && "constructor" in r) return !1;
}
u = u || [];
for (var f = (e = e || []).length; f--; ) if (e[f] === t) return u[f] === r;
if (e.push(t), u.push(r), o) {
if ((f = t.length) !== r.length) return !1;
for (;f--; ) if (!n(t[f], r[f], e, u)) return !1;
} else {
var l, s = h.keys(t);
if (f = s.length, h.keys(r).length !== f) return !1;
for (;f--; ) if (l = s[f], !h.has(r, l) || !n(t[l], r[l], e, u)) return !1;
}
return e.pop(), u.pop(), !0;
}(n, t);
}, h.isEmpty = function(n) {
return null == n || (m(n) && (h.isArray(n) || h.isString(n) || h.isArguments(n)) ? 0 === n.length : 0 === h.keys(n).length);
}, h.isElement = function(n) {
return !(!n || 1 !== n.nodeType);
}, h.isArray = t || function(n) {
return "[object Array]" === p.call(n);
}, h.isObject = function(n) {
var t = void 0 === n ? "undefined" : _typeof(n);
return "function" === t || "object" === t && !!n;
}, h.each([ "Arguments", "Function", "String", "Number", "Date", "RegExp", "Error" ], function(t) {
h["is" + t] = function(n) {
return p.call(n) === "[object " + t + "]";
};
}), h.isArguments(arguments) || (h.isArguments = function(n) {
return h.has(n, "callee");
}), "function" != typeof /./ && "object" != ("undefined" == typeof Int8Array ? "undefined" : _typeof(Int8Array)) && (h.isFunction = function(n) {
return "function" == typeof n || !1;
}), h.isFinite = function(n) {
return isFinite(n) && !isNaN(parseFloat(n));
}, h.isNaN = function(n) {
return h.isNumber(n) && n !== +n;
}, h.isBoolean = function(n) {
return !0 === n || !1 === n || "[object Boolean]" === p.call(n);
}, h.isNull = function(n) {
return null === n;
}, h.isUndefined = function(n) {
return void 0 === n;
}, h.has = function(n, t) {
return null != n && r.call(n, t);
}, h.noConflict = function() {
return root._ = previousUnderscore, this;
}, h.identity = function(n) {
return n;
}, h.constant = function(n) {
return function() {
return n;
};
}, h.noop = function() {}, h.property = function(t) {
return function(n) {
return null == n ? void 0 : n[t];
};
}, h.propertyOf = function(t) {
return null == t ? function() {} : function(n) {
return t[n];
};
}, h.matcher = h.matches = function(t) {
return t = h.extendOwn({}, t), function(n) {
return h.isMatch(n, t);
};
}, h.times = function(n, t, r) {
var e = Array(Math.max(0, n));
t = s(t, r, 1);
for (var u = 0; u < n; u++) e[u] = t(u);
return e;
}, h.random = function(n, t) {
return null == t && (t = n, n = 0), n + Math.floor(Math.random() * (t - n + 1));
}, h.now = Date.now || function() {
return new Date().getTime();
};
var S = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"`": "&#x60;"
}, F = h.invert(S), E = function(t) {
var r = function(n) {
return t[n];
}, n = "(?:" + h.keys(t).join("|") + ")", e = RegExp(n), u = RegExp(n, "g");
return function(n) {
return n = null == n ? "" : "" + n, e.test(n) ? n.replace(u, r) : n;
};
};
h.escape = E(S), h.unescape = E(F), h.result = function(n, t, r) {
var e = null == n ? void 0 : n[t];
return void 0 === e && (e = r), h.isFunction(e) ? e.call(n) : e;
};
var I = 0;
h.uniqueId = function(n) {
var t = ++I + "";
return n ? n + t : t;
}, h.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var M = /(.)^/, N = {
"'": "'",
"\\": "\\",
"\r": "r",
"\n": "n",
"\u2028": "u2028",
"\u2029": "u2029"
}, B = /\\|'|\r|\n|\u2028|\u2029/g, T = function(n) {
return "\\" + N[n];
};
h.template = function(i, n, t) {
!n && t && (n = t), n = h.defaults({}, n, h.templateSettings);
var r = RegExp([ (n.escape || M).source, (n.interpolate || M).source, (n.evaluate || M).source ].join("|") + "|$", "g"), o = 0, a = "__p+='";
i.replace(r, function(n, t, r, e, u) {
return a += i.slice(o, u).replace(B, T), o = u + n.length, t ? a += "'+\n((__t=(" + t + "))==null?'':_.escape(__t))+\n'" : r ? a += "'+\n((__t=(" + r + "))==null?'':__t)+\n'" : e && (a += "';\n" + e + "\n__p+='"),
n;
}), a += "';\n", n.variable || (a = "with(obj||{}){\n" + a + "}\n"), a = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + a + "return __p;\n";
try {
var e = new Function(n.variable || "obj", "_", a);
} catch (n) {
throw n.source = a, n;
}
var u = function(n) {
return e.call(this, n, h);
}, c = n.variable || "obj";
return u.source = "function(" + c + "){\n" + a + "}", u;
}, h.chain = function(n) {
var t = h(n);
return t._chain = !0, t;
};
var R = function(n, t) {
return n._chain ? h(t).chain() : t;
};
h.mixin = function(r) {
h.each(h.functions(r), function(n) {
var t = h[n] = r[n];
h.prototype[n] = function() {
var n = [ this._wrapped ];
return u.apply(n, arguments), R(this, t.apply(h, n));
};
});
}, h.mixin(h), h.each([ "pop", "push", "reverse", "shift", "sort", "splice", "unshift" ], function(t) {
var r = e[t];
h.prototype[t] = function() {
var n = this._wrapped;
return r.apply(n, arguments), "shift" !== t && "splice" !== t || 0 !== n.length || delete n[0],
R(this, n);
};
}), h.each([ "concat", "join", "slice" ], function(n) {
var t = e[n];
h.prototype[n] = function() {
return R(this, t.apply(this._wrapped, arguments));
};
}), h.prototype.valueOf = h.prototype.toJSON = h.prototype.value = function() {
return this._wrapped;
}, h.prototype.toString = function() {
return "" + this._wrapped;
};
}).call(void 0);

View File

@ -0,0 +1,398 @@
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, _base = require("./base64"), _md = require("./md5"), _md2 = _interopRequireDefault(_md);
function _interopRequireDefault(e) {
return e && e.__esModule ? e : {
default: e
};
}
function _defineProperty(e, t, n) {
return t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
var util = {};
function getQuery(e) {
var t = [];
if (-1 != e.indexOf("?")) for (var n = e.split("?")[1].split("&"), r = 0; r < n.length; r++) n[r].split("=")[0] && unescape(n[r].split("=")[1]) && (t[r] = {
name: n[r].split("=")[0],
value: unescape(n[r].split("=")[1])
});
return t;
}
function getUrlParam(e, t) {
var n = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), r = e.split("?")[1].match(n);
return null != r ? unescape(r[2]) : null;
}
function getSign(e, t, n) {
var r = require("./underscore.js"), a = require("./md5.js"), i = "", o = getUrlParam(e, "sign");
if (o || t && t.sign) return !1;
if (e && (i = getQuery(e)), t) {
var s = [];
for (var u in t) u && t[u] && (s = s.concat({
name: u,
value: t[u]
}));
i = i.concat(s);
}
i = r.sortBy(i, "name"), i = r.uniq(i, !0, "name");
for (var c = "", f = 0; f < i.length; f++) i[f] && i[f].name && i[f].value && (c += i[f].name + "=" + i[f].value,
f < i.length - 1 && (c += "&"));
return o = a(c + (n = n));
}
util.base64_encode = function(e) {
return (0, _base.base64_encode)(e);
}, util.base64_decode = function(e) {
return (0, _base.base64_decode)(e);
}, util.md5 = function(e) {
return (0, _md2.default)(e);
}, util.url = function(e, t) {
var n = require("../../../js/siteinfo.js"), r = n.siteroot + "?i=" + n.uniacid + "&t=" + n.multiid + "&v=" + n.version + "&from=wxapp&";
if (e && ((e = e.split("/"))[0] && (r += "c=" + e[0] + "&"), e[1] && (r += "a=" + e[1] + "&"),
e[2] && (r += "do=" + e[2] + "&")), t && "object" === (void 0 === t ? "undefined" : _typeof(t))) for (var a in t) a && t.hasOwnProperty(a) && t[a] && (r += a + "=" + t[a] + "&");
return r;
}, util.getSign = function(e, t, n) {
return getSign(e, t, n);
}, util.request = function(r) {
require("./underscore.js");
var e, t = require("./md5.js"), a = require("../../../js/siteinfo.js");
(r = r || {}).cachetime = r.cachetime ? r.cachetime : 0, r.showLoading = void 0 === r.showLoading || r.showLoading;
var n = wx.getStorageSync("userInfo").sessionid, i = r.url;
if (-1 == i.indexOf("http://") && -1 == i.indexOf("https://") && (i = util.url(i)),
getUrlParam(i, "state") || r.data && r.data.state || !n || (i = i + "&state=we7sid-" + n),
!r.data || !r.data.m) {
var o = getCurrentPages();
o.length && (o = o[getCurrentPages().length - 1]) && o.__route__ && (i = i + "&m=" + o.__route__.split("/")[0]);
}
var s = getSign(i, r.data);
if (s && (i = i + "&sign=" + s), !i) return !1;
if (r.showLoading, r.cachetime) {
var u = t(i), c = wx.getStorageSync(u), f = Date.parse(new Date());
if (c && c.data) {
if (c.expire > f) return r.complete && "function" == typeof r.complete && r.complete(c),
r.success && "function" == typeof r.success && r.success(c), console.log("cache:" + i),
!0;
wx.removeStorageSync(u);
}
}
wx.request((_defineProperty(e = {
url: i,
data: r.data ? r.data : {},
header: r.header ? r.header : {},
method: r.method ? r.method : "GET"
}, "header", {
"content-type": "application/x-www-form-urlencoded"
}), _defineProperty(e, "success", function(e) {
if (e.data.errno) {
if ("41009" == e.data.errno) return wx.setStorageSync("userInfo", ""), void util.getUserInfo(function() {
util.request(r);
});
if (r.fail && "function" == typeof r.fail) r.fail(e); else if (e.data.message) {
if (null != e.data.data && e.data.data.redirect) var t = e.data.data.redirect; else t = "";
a.util.message(e.data.message, t, "error");
}
} else if (r.success && "function" == typeof r.success && r.success(e), r.cachetime) {
var n = {
data: e.data,
expire: f + 1e3 * r.cachetime
};
wx.setStorageSync(u, n);
}
}), _defineProperty(e, "fail", function(e) {
wx.hideNavigationBarLoading(), wx.hideLoading();
var t = require("./md5.js")(i), n = wx.getStorageSync(t);
if (n && n.data) return r.success && "function" == typeof r.success && r.success(n),
console.log("failreadcache:" + i), !0;
r.fail && "function" == typeof r.fail && r.fail(e);
}), _defineProperty(e, "complete", function(e) {
r.complete && "function" == typeof r.complete && r.complete(e);
}), e));
}, util.getUserInfo = function(n) {
var e = function() {
console.log("start login");
var t = {
sessionid: "",
wxInfo: "",
memberInfo: ""
};
wx.login({
success: function(e) {
util.request({
url: "auth/session/openid",
data: {
code: e.code
},
cachetime: 0,
success: function(e) {
e.data.errno || (t.sessionid = e.data.data.sessionid, wx.setStorageSync("userInfo", t),
wx.getUserInfo({
success: function(e) {
t.wxInfo = e.userInfo, wx.setStorageSync("userInfo", t), util.request({
url: "auth/session/userinfo",
data: {
signature: e.signature,
rawData: e.rawData,
iv: e.iv,
encryptedData: e.encryptedData
},
method: "POST",
header: {
"content-type": "application/x-www-form-urlencoded"
},
cachetime: 0,
success: function(e) {
e.data.errno || (t.memberInfo = e.data.data, wx.setStorageSync("userInfo", t)),
"function" == typeof n && n(t);
}
});
},
fail: function() {
"function" == typeof n && n(t);
},
complete: function() {}
}));
}
});
},
fail: function() {
wx.showModal({
title: "获取信息失败",
content: "请允许授权以便为您提供给服务",
success: function(e) {
e.confirm && util.getUserInfo();
}
});
}
});
}, t = wx.getStorageSync("userInfo");
t.sessionid ? wx.checkSession({
success: function() {
"function" == typeof n && n(t);
},
fail: function() {
t.sessionid = "", console.log("relogin"), wx.removeStorageSync("userInfo"), e();
}
}) : e();
}, util.navigateBack = function(t) {
var e = t.delta ? t.delta : 1;
if (t.data) {
var n = getCurrentPages(), r = n[n.length - (e + 1)];
r.pageForResult ? r.pageForResult(t.data) : r.setData(t.data);
}
wx.navigateBack({
delta: e,
success: function(e) {
"function" == typeof t.success && t.success(e);
},
fail: function(e) {
"function" == typeof t.fail && t.fail(e);
},
complete: function() {
"function" == typeof t.complete && t.complete();
}
});
}, util.footer = function(e) {
var t = e, n = require("../../../js/siteinfo.js").tabBar;
for (var r in n.list) n.list[r].pageUrl = n.list[r].pagePath.replace(/(\?|#)[^"]*/g, "");
t.setData({
tabBar: n,
"tabBar.thisurl": t.__route__
});
}, util.message = function(e, t, n) {
if (!e) return !0;
if ("object" == (void 0 === e ? "undefined" : _typeof(e)) && (t = e.redirect, n = e.type,
e = e.title), t) {
var r = t.substring(0, 9), a = "", i = "";
"navigate:" == r ? (i = "navigateTo", a = t.substring(9)) : "redirect:" == r ? (i = "redirectTo",
a = t.substring(9)) : (a = t, i = "redirectTo");
}
console.log(a), n || (n = "success"), "success" == n ? wx.showToast({
title: e,
icon: "success",
duration: 2e3,
mask: !!a,
complete: function() {
a && setTimeout(function() {
wx[i]({
url: a
});
}, 1800);
}
}) : "error" == n && wx.showModal({
title: "系统信息",
content: e,
showCancel: !1,
complete: function() {
a && wx[i]({
url: a
});
}
});
}, util.user = util.getUserInfo, util.showLoading = function() {
wx.getStorageSync("isShowLoading") && (wx.hideLoading(), wx.setStorageSync("isShowLoading", !1)),
wx.showLoading({
title: "加载中",
complete: function() {
wx.setStorageSync("isShowLoading", !0);
},
fail: function() {
wx.setStorageSync("isShowLoading", !1);
}
});
}, util.showImage = function(e) {
var t = e ? e.currentTarget.dataset.preview : "";
if (!t) return !1;
wx.previewImage({
urls: [ t ]
});
}, util.parseContent = function(e) {
if (!e) return e;
var t = e.match(new RegExp([ "\ud83c[\udf00-\udfff]", "\ud83d[\udc00-\ude4f]", "\ud83d[\ude80-\udeff]" ].join("|"), "g"));
if (t) for (var n in t) e = e.replace(t[n], "[U+" + t[n].codePointAt(0).toString(16).toUpperCase() + "]");
return e;
}, util.date = function() {
this.isLeapYear = function(e) {
return 0 == e.getYear() % 4 && (e.getYear() % 100 != 0 || e.getYear() % 400 == 0);
}, this.dateToStr = function(e, t) {
e = e || "yyyy-MM-dd HH:mm:ss", t = t || new Date();
var n = e;
return n = (n = (n = (n = (n = (n = (n = (n = (n = (n = (n = (n = (n = n.replace(/yyyy|YYYY/, t.getFullYear())).replace(/yy|YY/, 9 < t.getYear() % 100 ? (t.getYear() % 100).toString() : "0" + t.getYear() % 100)).replace(/MM/, 9 < t.getMonth() ? t.getMonth() + 1 : "0" + (t.getMonth() + 1))).replace(/M/g, t.getMonth())).replace(/w|W/g, [ "日", "一", "二", "三", "四", "五", "六" ][t.getDay()])).replace(/dd|DD/, 9 < t.getDate() ? t.getDate().toString() : "0" + t.getDate())).replace(/d|D/g, t.getDate())).replace(/hh|HH/, 9 < t.getHours() ? t.getHours().toString() : "0" + t.getHours())).replace(/h|H/g, t.getHours())).replace(/mm/, 9 < t.getMinutes() ? t.getMinutes().toString() : "0" + t.getMinutes())).replace(/m/g, t.getMinutes())).replace(/ss|SS/, 9 < t.getSeconds() ? t.getSeconds().toString() : "0" + t.getSeconds())).replace(/s|S/g, t.getSeconds());
}, this.dateAdd = function(e, t, n) {
switch (n = n || new Date(), e) {
case "s":
return new Date(n.getTime() + 1e3 * t);
case "n":
return new Date(n.getTime() + 6e4 * t);
case "h":
return new Date(n.getTime() + 36e5 * t);
case "d":
return new Date(n.getTime() + 864e5 * t);
case "w":
return new Date(n.getTime() + 6048e5 * t);
case "m":
return new Date(n.getFullYear(), n.getMonth() + t, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
case "y":
return new Date(n.getFullYear() + t, n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds());
}
}, this.dateDiff = function(e, t, n) {
switch (e) {
case "s":
return parseInt((n - t) / 1e3);
case "n":
return parseInt((n - t) / 6e4);
case "h":
return parseInt((n - t) / 36e5);
case "d":
return parseInt((n - t) / 864e5);
case "w":
return parseInt((n - t) / 6048e5);
case "m":
return n.getMonth() + 1 + 12 * (n.getFullYear() - t.getFullYear()) - (t.getMonth() + 1);
case "y":
return n.getFullYear() - t.getFullYear();
}
}, this.strToDate = function(dateStr) {
var data = dateStr, reCat = /(\d{1,4})/gm, t = data.match(reCat);
return t[1] = t[1] - 1, eval("var d = new Date(" + t.join(",") + ");"), d;
}, this.strFormatToDate = function(e, t) {
var n = 0, r = -1, a = t.length;
-1 < (r = e.indexOf("yyyy")) && r < a && (n = t.substr(r, 4));
var i = 0;
-1 < (r = e.indexOf("MM")) && r < a && (i = parseInt(t.substr(r, 2)) - 1);
var o = 0;
-1 < (r = e.indexOf("dd")) && r < a && (o = parseInt(t.substr(r, 2)));
var s = 0;
(-1 < (r = e.indexOf("HH")) || 1 < (r = e.indexOf("hh"))) && r < a && (s = parseInt(t.substr(r, 2)));
var u = 0;
-1 < (r = e.indexOf("mm")) && r < a && (u = t.substr(r, 2));
var c = 0;
return -1 < (r = e.indexOf("ss")) && r < a && (c = t.substr(r, 2)), new Date(n, i, o, s, u, c);
}, this.dateToLong = function(e) {
return e.getTime();
}, this.longToDate = function(e) {
return new Date(e);
}, this.isDate = function(e, t) {
null == t && (t = "yyyyMMdd");
var n = t.indexOf("yyyy");
if (-1 == n) return !1;
var r = e.substring(n, n + 4), a = t.indexOf("MM");
if (-1 == a) return !1;
var i = e.substring(a, a + 2), o = t.indexOf("dd");
if (-1 == o) return !1;
var s = e.substring(o, o + 2);
return !(!isNumber(r) || "2100" < r || r < "1900") && (!(!isNumber(i) || "12" < i || i < "01") && !(s > getMaxDay(r, i) || s < "01"));
}, this.getMaxDay = function(e, t) {
return 4 == t || 6 == t || 9 == t || 11 == t ? "30" : 2 == t ? e % 4 == 0 && e % 100 != 0 || e % 400 == 0 ? "29" : "28" : "31";
}, this.isNumber = function(e) {
return /^\d+$/g.test(e);
}, this.toArray = function(e) {
e = e || new Date();
var t = Array();
return t[0] = e.getFullYear(), t[1] = e.getMonth(), t[2] = e.getDate(), t[3] = e.getHours(),
t[4] = e.getMinutes(), t[5] = e.getSeconds(), t;
}, this.datePart = function(e, t) {
t = t || new Date();
var n = "";
switch (e) {
case "y":
n = t.getFullYear();
break;
case "M":
n = t.getMonth() + 1;
break;
case "d":
n = t.getDate();
break;
case "w":
n = [ "日", "一", "二", "三", "四", "五", "六" ][t.getDay()];
break;
case "ww":
n = t.WeekNumOfYear();
break;
case "h":
n = t.getHours();
break;
case "m":
n = t.getMinutes();
break;
case "s":
n = t.getSeconds();
}
return n;
}, this.maxDayOfDate = function(e) {
(e = e || new Date()).setDate(1), e.setMonth(e.getMonth() + 1);
var t = e.getTime() - 864e5;
return new Date(t).getDate();
};
}, module.exports = util;