临时提交,暂停开发

This commit is contained in:
lipenggao 2023-11-22 11:35:23 +08:00
commit 46e7704960
313 changed files with 8214 additions and 0 deletions

3
.kaitian/settings.json Normal file
View File

@ -0,0 +1,3 @@
{
"editor.tabSize": 2
}

View File

@ -0,0 +1,7 @@
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};

View File

@ -0,0 +1,4 @@
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}

View File

@ -0,0 +1,27 @@
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338');
require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/flex-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myPay/myPay?hash=95d4e6a1d744881766987015bf4637f54936e766');
require('../../node_modules/mini-antui/es/search-bar/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/index?hash=66c19b063693971ffd8bb661372c9cf3c21a2d1c');
require('../../pages/discover/discover?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/binge/binge?hash=9c0e6999933e5108fcfa627bb178a74557ebd612');
require('../../pages/my/my?hash=6b9bee5d51f8a2ab4725afd9772f57296d40424a');
require('../../pages/search/search?hash=145a1c9adbd3105ceec389ed0e6ff898eeb269fd');
require('../../pages/history/history?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/transaction/transaction?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/give/give?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/wxkf/wxkf?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/purchaseNotes/purchaseNotes?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/addqywx/addqywx?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/video/video?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');

View File

@ -0,0 +1,64 @@
if(!self.__appxInited) {
self.__appxInited = 1;
require('./config$');
function getUserAgentInPlatformWeb() {
return typeof navigator !== 'undefined' ? navigator.swuserAgent || navigator.userAgent || '' : '';
}
if(getUserAgentInPlatformWeb() && (getUserAgentInPlatformWeb().indexOf('LyraVM') > 0 || getUserAgentInPlatformWeb().indexOf('AlipayIDE') > 0) ) {
var AFAppX = self.AFAppX.getAppContext ? self.AFAppX.getAppContext().AFAppX : self.AFAppX;
} else {
importScripts('https://appx/af-appx.worker.min.js');
var AFAppX = self.AFAppX;
}
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
self.App = AFAppX.App;
self.my = AFAppX.bridge || AFAppX.abridge;
self.abridge = self.my;
self.Component = AFAppX.WorkerComponent || function(){};
self.$global = AFAppX.$global;
self.requirePlugin = AFAppX.requirePlugin;
if(AFAppX.registerApp) {
AFAppX.registerApp({
appJSON: appXAppJson,
});
}
function success() {
require('../../app');
require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338');
require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/flex-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myPay/myPay?hash=95d4e6a1d744881766987015bf4637f54936e766');
require('../../node_modules/mini-antui/es/search-bar/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/index?hash=66c19b063693971ffd8bb661372c9cf3c21a2d1c');
require('../../pages/discover/discover?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/binge/binge?hash=9c0e6999933e5108fcfa627bb178a74557ebd612');
require('../../pages/my/my?hash=6b9bee5d51f8a2ab4725afd9772f57296d40424a');
require('../../pages/search/search?hash=145a1c9adbd3105ceec389ed0e6ff898eeb269fd');
require('../../pages/history/history?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/transaction/transaction?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/give/give?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/wxkf/wxkf?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/purchaseNotes/purchaseNotes?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/addqywx/addqywx?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/video/video?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}

View File

@ -0,0 +1,7 @@
const g = typeof global !== 'undefined' ? global : self;
g.appXAppJson = {
"app": {
"$homepage": "pages/index/index"
}
};

View File

@ -0,0 +1,4 @@
if(!self.Map || !self.Set || !self.Symbol) {
importScripts('https://gw.alipayobjects.com/as/g/appx_release/deps/1.0.3/es6-set-map-symbol.js');
}
importScripts(`https://appx/af-appx.worker.min.js`);

View File

@ -0,0 +1,26 @@
require('@alipay/appx-compiler/lib/sjsEnvInit');
require('./config$');
require('../../node_modules/mini-antui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myFooter/myFooter?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/components/recommend/recommend?hash=efa451848b581ae39f6dfc3f481e34d889c0c338');
require('../../components/myEmpty/myEmpty?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/pursueItem/pursueItem?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/list/list-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../node_modules/mini-antui/es/flex/flex-item/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../components/myPay/myPay?hash=95d4e6a1d744881766987015bf4637f54936e766');
require('../../node_modules/mini-antui/es/search-bar/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43');
require('../../pages/index/index?hash=66c19b063693971ffd8bb661372c9cf3c21a2d1c');
require('../../pages/discover/discover?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/binge/binge?hash=9c0e6999933e5108fcfa627bb178a74557ebd612');
require('../../pages/my/my?hash=6b9bee5d51f8a2ab4725afd9772f57296d40424a');
require('../../pages/search/search?hash=145a1c9adbd3105ceec389ed0e6ff898eeb269fd');
require('../../pages/history/history?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/transaction/transaction?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/give/give?hash=9a3d729fefe59caf793121dfbe58ede84e5bf831');
require('../../pages/wxkf/wxkf?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/purchaseNotes/purchaseNotes?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/addqywx/addqywx?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');

File diff suppressed because one or more lines are too long

6
app.acss Normal file
View File

@ -0,0 +1,6 @@
@import "./global.acss";
page {
background: #f7f7f7;
}

35
app.js Normal file
View File

@ -0,0 +1,35 @@
import { httpRequest, cloud } from './utils/httpRequest';
import { storageUid } from './utils/utils'
import { getUserInfo, getSystemInfoSync } from './utils/obtainInfo'
App({
cloud,
httpRequest,
globalData: {
userInfo: {},
systemInfo: {}
},
onLaunch(options) {
// 第一次打开
// options.query == {number:1}
console.info('App onLaunch');
},
onShow(options) {
// 从后台被 scheme 重新打开
// options.query == {number:1}
this.testLogin();
},
async testLogin() {
const paramenter = {
path: '/reg',
method: 'POST',
}
const res = await httpRequest(paramenter)
if (res.status == 1) {
storageUid(res.data.uid);
getUserInfo();
getSystemInfoSync();
}
},
});

51
app.json Normal file
View File

@ -0,0 +1,51 @@
{
"pages": [
"pages/index/index",
"pages/discover/discover",
"pages/binge/binge",
"pages/my/my",
"pages/search/search",
"pages/history/history",
"pages/transaction/transaction",
"pages/give/give",
"pages/wxkf/wxkf",
"pages/purchaseNotes/purchaseNotes",
"pages/addqywx/addqywx",
"pages/video/video"
],
"window": {
"defaultTitle": "古言剧场"
},
"tabBar": {
"textColor": "#dddddd",
"selectedColor": "#49a9ee",
"backgroundColor": "#ffffff",
"disableOnInit": false,
"items": [
{
"name": "追剧",
"pagePath": "pages/binge/binge",
"icon": "/static/tabbar/binge_off.png",
"activeIcon": "/static/tabbar/binge_on.png"
},
{
"name": "短剧",
"pagePath": "pages/index/index",
"icon": "/static/tabbar/playlet_off.png",
"activeIcon": "/static/tabbar/playlet_on.png"
},
{
"name": "壁纸",
"pagePath": "pages/discover/discover",
"icon": "/static/tabbar/discover_off.png",
"activeIcon": "/static/tabbar/discover_on.png"
},
{
"name": "我的",
"pagePath": "pages/my/my",
"icon": "/static/tabbar/my_off.png",
"activeIcon": "/static/tabbar/my_on.png"
}
]
}
}

View File

@ -0,0 +1,18 @@
._myEmpty_html {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
._myEmpty_image {
width: 576rpx;
height: 360rpx;
}
._myEmpty_tips >text{
color:#CDCDCD;
font-size:32rpx;
}

View File

@ -0,0 +1,8 @@
<view class="_myEmpty_html">
<view class="_myEmpty_image">
<image mode="scaleToFill" src="{{emptyImageSrc}}" class="_is_image"/>
</view>
<view class="_myEmpty_tips">
<text>{{tipsName}}</text>
</view>
</view>

View File

@ -0,0 +1,15 @@
import { imageBasUrl } from '../../utils/config'
Component({
mixins: [],
data: {},
props: {
emptyImageSrc: `${imageBasUrl}/iamge/no-data.png`,
tipsName: '暂无数据'
},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {},
});

View File

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

View File

@ -0,0 +1,11 @@
._myFooter_html {
display: flex;
justify-content: center;
align-items: center;
}
._myFooter_body >text{
line-height: 1;
font-size: 1;
color: #CE3636;
}

View File

@ -0,0 +1,5 @@
<view class="_myFooter_html">
<view class="_myFooter_body">
<text>{{footerName}}</text>
</view>
</view>

View File

@ -0,0 +1,11 @@
Component({
mixins: [],
data: {},
props: {
footerName: '没有更多了~'
},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {},
});

View File

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

236
components/myPay/myPay.acss Normal file
View File

@ -0,0 +1,236 @@
._my_pay_popup .am-popup-content {
padding: 40rpx 28rpx;
background-color: #242430;
border-radius: 24rpx 24rpx 0 0;
}
._my_pay_po_header {
display: flex;
justify-content: space-between;
align-items: center;
}
._pay_po_he_title {
line-height: 1;
color: #F4F4F4;
font-size: 36rpx;
font-weight: 700;
}
._my_pay_po_content {
position: relative;
width: 100%;
height: 800rpx;
margin-top: 40rpx;
}
._po_con_scroll {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
._con_scr_warp {
width: 100%;
height: 100%;
}
._scr_wa_species {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
._wa_spe_left {
display: flex;
align-items: center;
}
._spe_le_img {
width: 64rpx;
height: 64rpx;
}
._spe_le_name {
line-height: 1;
color: #fff;
font-size: 36rpx;
font-weight: 700;
margin-left: 10rpx;
}
._wa_spe_right {
line-height: 1;
font-size: 28rpx;
color: #F6F6F6;
}
._scr_wa_pay_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 40rpx;
}
._wa_pay_hea_left {
display: flex;
align-items: center;
padding-left: 16rpx;
border-left: 4rpx solid #CE3636;
}
._wa_pay_hea_left >text {
line-height: 1;
font-size: 36rpx;
color: #EBEBEB;
font-weight: 700;
}
._wa_pay_hea_right {
display: flex;
align-items: center;
}
._wa_pay_hea_right >text {
line-height: 1;
font-size: 28rpx;
color: #fff;
text-decoration: underline;
}
.icon-double-arrow-right-full {
width: 20rpx;
height: 20rpx;
margin-left: 6rpx;
}
._scr_wa_pay_list {
display: flex;
flex-wrap: wrap;
width: 100%;
}
._wa_pay_li_item{
width: 50%;
flex-shrink: 0;
margin-top: 40rpx;
height: 200rpx;
}
._wa_pay_li_item.active_right{
padding-right: 15rpx;
}
._wa_pay_li_item.active_left{
padding-left: 15rpx;
}
._pay_li_it_con {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: #38364B;
border-radius: 24rpx;
}
._pay_li_it_con.active {
border: 1px solid #fff;
}
._pay_li_it_price{
line-height: 1;
font-size: 40rpx;
color: #DFA788;
font-weight: 700;
}
._pay_li_it_coin {
line-height: 1;
font-size: 28rpx;
color: #fff;
margin: 16rpx 0;
}
._pay_li_it_deliver {
line-height: 1;
font-size: 28rpx;
color: #F0C194;
}
._my_pay_back_Info {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,.6);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
}
._pay_back_In_warp {
display: flex;
flex-direction: column;
align-items: center;
width: 706rpx;
height: 616rpx;
padding-top: 160rpx;
background: url('/static/images/paybj.png') no-repeat;
background-size: 100% 100%;
}
._pay_back_In_close {
margin-top: 60rpx;
}
._back_In_warp_t {
display: flex;
align-items: center;
line-height: 1;
}
._back_In_warp_t .name{
line-height: 1;
color: #1a1a1a;
font-size: 52rpx;
}
._back_In_warp_t .num {
line-height: 1;
color: #ff6d35;
font-size: 80rpx;
margin: 0 10rpx;
}
._back_In_warp_d {
display: flex;
align-items: center;
line-height: 1;
margin-top: 10rpx;
}
._back_In_warp_d .name{
line-height: 1;
color: #1a1a1a;
font-size: 36rpx;
}
._back_In_warp_d .num {
line-height: 1;
color: #f1540d;
font-size: 52rpx;
margin: 0 10rpx;
}

View File

@ -0,0 +1,84 @@
<view class="_myPay_html">
<popup position="bottom" className="_my_pay_popup" show="{{popupShow}}" zIndex="{{999}}">
<view class="_my_pay_po_header">
<view class="_pay_po_he_title">
<text>创作不易,支持作者</text>
</view>
<view class="_pay_po_he_icon" onTap="closePopup">
<am-icon type="arrow-down" color="#F4F4F4" size="18"></am-icon>
</view>
</view>
<view class="_my_pay_po_content">
<scroll-view scroll-y="{{true}}" class="_po_con_scroll">
<view class="_con_scr_warp">
<view class="_scr_wa_species">
<view class="_wa_spe_left">
<view class="_spe_le_img">
<image mode="scaleToFill" src="{{`${imageBasUrl}/iamge/weixin_icon.png`}}" class="_is_image" />
</view>
<view class="_spe_le_name">
<text>支付宝\微信支付</text>
</view>
</view>
<view class="_wa_spe_right">
<text>我的K币{{0}}K币</text>
</view>
</view>
<view class="_scr_wa_pay_header">
<view class="_wa_pay_hea_left">
<text>请选择充值金额</text>
</view>
<view class="_wa_pay_hea_right" onTap="toPurchaseNotes">
<text>购买须知</text>
<view class="icon-double-arrow-right-full">
<image mode="scaleToFill" src="{{`${imageBasUrl}/iamge/icon-double-arrow-right-full.png`}}" class="_is_image" />
</view>
</view>
</view>
<view class="_scr_wa_pay_list">
<block a:for="{{3}}">
<view class="_wa_pay_li_item {{(index + 1) % 2 === 0 ? 'active_left':'active_right'}}" data-item="{{item}}" onTap="payItem">
<view class="_pay_li_it_con {{index === 0 ? 'active' :''}}">
<view class="_pay_li_it_price">
<text>199.9元</text>
</view>
<view class="_pay_li_it_coin">
<text>37621K币</text>
</view>
<view class="_pay_li_it_deliver">
<text>多送20元K币</text>
</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</view>
</popup>
<block a:if="{{backShow}}">
<view class="_my_pay_back_Info">
<view class="_pay_back_In_warp">
<view class="_back_In_warp_t">
<text class="name">充</text>
<text class="num">{{backInfo.price || 0}}</text>
<text class="name">送</text>
<text class="num">{{ backInfo.zbegold || 0 }}</text>
<text class="name">元</text>
</view>
<view class="_back_In_warp_d">
<text class="name">得</text>
<text class="num">{{ backInfo.egold || 0 }}</text>
<text class="name">K币</text>
</view>
</view>
<view class="_pay_back_In_close" onTap="closeBackShow">
<am-icon type="close-o" size="{{36}}" color="#fff" />
</view>
</view>
</block>
</view>

63
components/myPay/myPay.js Normal file
View File

@ -0,0 +1,63 @@
import { imageBasUrl } from '../../utils/config';
import { storagePaymentBack } from '../../utils/utils'
Component({
mixins: [],
data: {
imageBasUrl,
backShow: false,
backInfo: {}
},
props: {
popupShow: true,
onClosePopup: {
type: Function,
value: () => { }
}
},
didMount() {
console.log(5465465465)
},
didUpdate() { },
didUnmount() { },
methods: {
closePopup() {
const storageData = my.getStorageSync({ key: 'paymentBack' }).data;
if (storageData && storageData.paymentBack) {
storagePaymentBack(false);
this.props.onClosePopup();
} else {
storagePaymentBack(true);
// this.http.get('/payback').then(res => {
// res.isBack = 1;
// this.backInfo = res;
// this.payList.unshift(res);
// });
this.setData({
backShow: true
})
}
},
payItem() {
// const bsPayItem = await this.http.get('/iosPayment');
// const platform = uni.getSystemInfoSync().platform;
// if (platform === 'ios' && bsPayItem.status === 1) {
// this.fui.toast('暂不支持IOS支付');
// return;
// }
},
closeBackShow() {
this.setData({
backShow: false
})
},
toPurchaseNotes() {
my.navigateTo({
url: '/pages/purchaseNotes/purchaseNotes'
})
}
},
});

View File

@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"popup": "mini-antui/es/popup/index",
"am-icon": "mini-antui/es/am-icon/index",
"flex": "mini-antui/es/flex/index",
"flex-item": "mini-antui/es/flex/flex-item/index"
}
}

View File

@ -0,0 +1,51 @@
._pursueItem_html {
width: 100%;
}
._p_dataItem_header{
position: relative;
width: 100%;
/* height: 280rpx; */
border-radius: 10rpx;
overflow: hidden;
}
._it_he_cover {
width: 100%;
height: 280rpx;
}
._it_he_is_edit_image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 280rpx;
}
._it_he_name,
._it_he_history_series {
margin-top: 10rpx;
}
._it_he_name >text{
width: 100%;
line-height: 1;
font-size: 28rpx;
font-weight: 500;
color: #999999;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
._it_he_history_series > text{
width: 100%;
line-height: 1;
font-size: 24rpx;
color: #999999;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

View File

@ -0,0 +1,20 @@
<view class="_pursueItem_html">
<view class="_p_dataItem_header">
<view class="_it_he_cover">
<image mode="scaleToFill" src="{{rowData.cover}}" class="_is_image" />
</view>
<block a:if="{{isEdit}}">
<view class="_it_he_is_edit_image" onTap="delItem" data-item="{{rowData}}">
<image mode="scaleToFill" src="{{editImage}}" class="_is_image" />
</view>
</block>
<view class="_it_he_name">
<text>{{rowData.name}}</text>
</view>
<block a:if="{{rowData.history}}">
<view class="_it_he_history_series">
<text> 观看至 {{ rowData.history }} 集</text>
</view>
</block>
</view>
</view>

View File

@ -0,0 +1,31 @@
import { imageBasUrl } from '../../utils/config';
Component({
mixins: [],
data: {
imageBasUrl,
editImage: `${imageBasUrl}/iamge/edit-show.png`
},
props: {
rowData: {
name: '',
cover: ''
},
isEdit: false,
onDelItem: {
type: Function,
value: () => {
}
}
},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {
delItem(event) {
const item = event.target.dataset.item;
this.props.onDelItem(item);
}
},
});

View File

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

131
global.acss Normal file
View File

@ -0,0 +1,131 @@
html,
body,
page {
font-size: 32rpx !important;
height: 100% !important;
display: flex !important;
flex-direction: column !important;
}
page {
box-sizing: border-box !important;
}
view,
image,
swiper,
swiper-item,
text {
box-sizing: border-box !important;
word-break: break-all;
word-wrap: break-word;
}
.flex-center-row {
align-items: center !important;
}
.flex-center-column {
justify-content: center !important;
}
.d-flex {
display: flex !important;
}
.flex-center {
display: flex !important;
justify-content: center !important;
align-items: center !important;
}
.flex-start {
display: flex !important;
justify-content: flex-start !important;
align-items: center !important;
}
.flex-between {
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
}
.flex-around {
display: flex !important;
justify-content: space-around !important;
align-items: center !important;
}
.flex-direction-column {
flex-direction: column !important;
}
.flex-align-center {
align-items: center !important;
}
.flex-1 {
display: flex;
flex-direction: column;
flex: 1 !important;
overflow: hidden !important;
}
.flex-column {
flex-direction: column !important;
}
.flex-row {
flex-direction: row !important;
}
.flex-row-center {
flex-direction: row !important;
align-items: center !important;
}
.flex-end {
display: flex !important;
justify-content: flex-end !important;
align-items: center !important;
}
.flex-align-start {
align-items: flex-start !important;
}
.text-center {
text-align: center !important;
}
.text-right {
text-align: right !important;
}
._is_image {
display: block;
width: 100%;
height: 100%;
}
.ml-14 {
margin-left: 14rpx;
}
.mt-16 {
margin-top: 16rpx;
}
.mt-50{
margin-top: 50rpx;
}
.mb-30 {
margin-bottom: 30rpx;
}
::-webkit-scrollbar {
display: none;
}

3
mini.project.json Normal file
View File

@ -0,0 +1,3 @@
{
"compileType": "jsonschema"
}

18
node_modules/.yarn-integrity generated vendored Normal file
View File

@ -0,0 +1,18 @@
{
"systemParams": "win32-x64-108",
"modulesFolders": [
"node_modules"
],
"flags": [],
"linkedModules": [],
"topLevelPatterns": [
"@tbmp/mp-cloud-sdk@*",
"mini-antui@^0.5.2"
],
"lockfileEntries": {
"@tbmp/mp-cloud-sdk@*": "https://registry.yarnpkg.com/@tbmp/mp-cloud-sdk/-/mp-cloud-sdk-1.5.5.tgz#12f1c031d9f2c391381ffbb0b6ef0753c9caf43f",
"mini-antui@^0.5.2": "https://registry.npmjs.org/mini-antui/-/mini-antui-0.5.2.tgz"
},
"files": [],
"artifacts": {}
}

1
node_modules/@tbmp/mp-cloud-sdk/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

19
node_modules/@tbmp/mp-cloud-sdk/package.json generated vendored Normal file
View File

@ -0,0 +1,19 @@
{
"name": "@tbmp/mp-cloud-sdk",
"version": "1.5.5",
"description": "",
"main": "index.js",
"types": "./types/platforms/mp/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"gitHead": "cc8f93a3f17901f50500ddee65b957773d2aca82",
"devDependencies": {
"@rollup/plugin-json": "^6.0.0"
}
}

View File

@ -0,0 +1,80 @@
import { Db } from "./db";
export interface IFindOptions {
/**
*
*/
limit?: number;
/**
*
*/
skip?: number;
/**
*
*/
sort?: object;
/**
*
*/
projection?: object;
}
export declare class CollectionReference {
/**
*
*
* @internal
*
* @param db -
* @param coll -
*/
private _db;
private _coll;
constructor(db: Db, coll: string);
/**
*
*/
readonly name: string;
/**
*
* @param pipeline
*/
aggregate(pipeline: object | object[]): Promise<any>;
/**
*
* @param filter
*/
count(filter: object): Promise<any>;
/**
*
* @param filter
*/
deleteMany(filter: object): Promise<any>;
/**
*
* @param filter
* @param options
*/
find(filter: any, options?: IFindOptions): Promise<any>;
/**
*
* @param filter
* @param data
*/
replaceOne(filter: object, data: object): Promise<any>;
/**
*
* @param data
*/
insertOne(data: object): Promise<any>;
/**
*
* @param data
*/
insertMany(data: object[]): Promise<any>;
/**
*
* @param filter
* @param data
*
*/
updateMany(filter: object, data: object): Promise<any>;
}

18
node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
import { CollectionReference } from "./collection";
import { IAsyncInvokeOptions } from "../../shared/types";
import { ICloudService } from "../interface/cloudService";
export declare class Db extends ICloudService {
/**
*
*
* @param collName -
*/
collection(collName: string): CollectionReference;
/**
*
*/
createCollection(name: string, options: {
collName: string;
} & IAsyncInvokeOptions): Promise<any>;
dbRequest(action?: string, params?: any): Promise<any>;
}

View File

@ -0,0 +1,2 @@
import { Db } from "./db";
export default Db;

View File

View File

@ -0,0 +1,13 @@
import { IAsyncInvokeOptions } from '../../shared/types';
import { ICloudService } from '../interface/cloudService';
export interface ICallFunctionOptions extends IAsyncInvokeOptions {
name: string;
data: any;
}
export interface IInvokeMethod {
(IAsyncInvokeOptions: any): void;
}
export default class CloudFunction extends ICloudService {
invoke(name: string, data?: object, handler?: string): Promise<any>;
private fcRequest;
}

View File

@ -0,0 +1,10 @@
import { Request } from "../../shared/request";
export interface ICloudServiceOptions {
env?: 'test' | 'online' | 'pre';
}
export declare abstract class ICloudService {
options: ICloudServiceOptions;
request: Request;
constructor(options: ICloudServiceOptions, request: Request);
init?(): void;
}

View File

@ -0,0 +1,14 @@
import Powermsg from '@ali/lib-powermsg-sdk';
import { Env } from '../../shared/types';
export default class Client {
env: Env;
pmg: Powermsg;
deviceId: string;
initing: boolean;
queue: (() => void)[];
config: any;
constructor(env: Env);
init: () => Promise<any>;
onMessage: (callback: any) => Promise<() => void>;
private createPwgInstance;
}

View File

@ -0,0 +1,8 @@
import { ICloudService, ICloudServiceOptions } from "../interface/cloudService";
import Client from './client';
import Server from './server';
export default class Message extends ICloudService {
server: Server;
client: Client;
constructor(options: ICloudServiceOptions);
}

View File

@ -0,0 +1,15 @@
import { Request } from '../../shared/request';
import { Env } from "../../../packages/mp-cloud-node-sdk/types/shared/types";
interface IPushOptions {
subType: number;
deviceId?: string;
data: object;
pushType: string;
}
export default class Server {
env: Env;
request: Request;
constructor(env: Env, request: Request);
push(options: IPushOptions): Promise<any>;
}
export {};

View File

@ -0,0 +1,7 @@
import {ICloudService} from "../../interface/cloudService";
export default class Application extends ICloudService {
httpRequest(options: {path: string, params?: any, body?: any, headers?: any, method?: string, exts?: any}): Promise<any>;
}

View File

@ -0,0 +1,7 @@
import {ICloudService} from "../../interface/cloudService";
export default class Process extends ICloudService {
invoke(options: { api: string, data?: any, headers?: any }): Promise<any>;
private topRequest;
}

View File

@ -0,0 +1,7 @@
import {ICloudService} from "../../interface/cloudService";
export default class Qimen extends ICloudService {
invoke(options: { api: string, data?: any, targetAppKey?: any, headers?: any }): Promise<any>;
private topRequest;
}

View File

@ -0,0 +1,7 @@
import {ICloudService} from "../../interface/cloudService";
export default class Top extends ICloudService {
invoke(options: { api: string, data?: any, headers?: any, authScope?: string }): Promise<any>;
private topRequest;
}

View File

@ -0,0 +1,5 @@
import {ICloudService} from "../../interface/cloudService";
export default class Qimen extends ICloudService {
invoke(apiName: string, data?: any, httpHeaders?: any): Promise<any>;
}

View File

@ -0,0 +1,4 @@
import {ICloudService} from "../../interface/cloudService";
export default class Top extends ICloudService{
invoke(apiName: string, data?: any, httpHeaders?: any): Promise<any>;
}

View File

@ -0,0 +1,70 @@
import { IAsyncInvokeOptions } from "../../shared/types";
import { ICloudService } from "../interface/cloudService";
export interface IUploadFileOptions extends IAsyncInvokeOptions {
/**
*
*/
filePath: string;
/**
* , image/audio/video
*/
fileType: FileTypes;
/**
* , a/xxx.jpg
*/
fileName?: string;
/**
* web环境上传 file对象
*/
file?: any;
}
export interface IDownloadFileOptions extends IAsyncInvokeOptions {
fileType?: FileTypes;
fileId: string;
}
export interface ITempFileURLOptions extends IAsyncInvokeOptions {
fileList: string[];
}
export declare type IDeleteFileOptions = IDownloadFileOptions;
export declare type FileTypes = "image" | "video" | "audio";
export default class CloudStorage extends ICloudService {
private parseUploadResult;
private parsePostUploadResult;
private parseAusUploadResult;
/**
*
* 1.
* 2.my.api上传
* 3.
* @param options
*/
uploadFile(options: IUploadFileOptions): Promise<any>;
/**
*
* @param options
*/
deleteFile(options: IDeleteFileOptions): Promise<boolean>;
/**
* id(cloud://)获取授权的url
* @param options
*/
getTempFileURL(options: IAsyncInvokeOptions & {
fileType: string;
fileId: string | string[];
}): Promise<any>;
/**
*
* @param options
*/
readRemoteFile(options: IAsyncInvokeOptions & {
url: string;
}): Promise<ArrayBuffer>;
/**
* , sdk环境和存储环境
* @param action
* @param data
* @param requestType
*/
private storageRequest;
}

View File

@ -0,0 +1,3 @@
import { Cloud } from '../mp';
declare const cloudInstance: Cloud;
export default cloudInstance;

View File

@ -0,0 +1,12 @@
import { Cloud as MpCloud } from '../mp';
import { ICloudOptions } from '../../shared/types';
import Client from '../../core/message/client';
import { IProxy } from '../../shared/request';
export declare class Cloud extends MpCloud {
message: {
client: Client;
};
init(options: ICloudOptions, proxy: IProxy): Promise<boolean>;
}
declare const _default: Cloud;
export default _default;

View File

@ -0,0 +1,24 @@
import {IProxy} from '../../shared/request';
import {ICloudOptions} from '../../shared/types';
import CloudFunction from '../../core/functions';
import CloudStorage from '../../core/storage';
import Db from '../../core/db';
import Top from '../../core/openApi/client/top';
import Qimen from '../../core/openApi/client/qimen';
import Process from '../../core/openApi/client/process';
import Application from '../../core/openApi/client/application';
export declare class Cloud {
function: CloudFunction;
file: CloudStorage;
db: Db;
topApi: Top;
qimenApi: Qimen;
processApi: Process;
application: Application;
init(options: ICloudOptions, proxy?: IProxy): Promise<boolean>;
}
declare const _default: Cloud;
export default _default;

View File

@ -0,0 +1,13 @@
import { ICloudOptions } from '../../shared/types';
import CloudFunction from '../../core/functions';
import Database from '../../core/db';
import Top from '../../core/openApi/server/top';
import Qimen from '../../core/openApi/server/qimen';
export declare class Cloud {
db: Database;
function: CloudFunction;
topApi: Top;
qimenApi : Qimen;
}
export declare function cloud(context: any, options: ICloudOptions): Cloud;

View File

@ -0,0 +1,15 @@
export declare const BASE_APIS: {
GET_SESSION: string;
GET_SECRET: string;
};
export declare const STORAGE_KEYS: {
SECRET: string;
};
export declare const ENV_CONFIG: {
pre: {
gw: string;
};
online: {
gw: string;
};
};

View File

@ -0,0 +1,4 @@
import { IAsyncInvokeOptions } from "./types";
export declare function invokeCallback(options: IAsyncInvokeOptions, asyncTask: Promise<any>): Promise<void>;
export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise<any>;
export declare function getUserId(): Promise<string>;

View File

@ -0,0 +1,3 @@
export declare function noop(): void;
export declare function invokeTaskCallback(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare function safeAccess(props: any, keys: string[] | string, def?: any): any;

View File

@ -0,0 +1,2 @@
export declare function getValue(key: string): Promise<any>;
export declare function setValue(key: string, data: any): Promise<any>;

View File

@ -0,0 +1,89 @@
export interface IRequestOptions {
appKey?: string,
sourceAppKey?: string,
requestAppKey?:string,
miniappId?: string,
sourceMiniAppId?: string,
appOwnerOpenId?: string,
signSecret?: string;
sessionKey?: string;
requestId?: string;
cloudId?: string;
openId?: string;
unionId?: string;
userNick?: string,
mixNick?: string,
session?: string;
accessToken?: string;
env?: string;
}
export declare enum RequestTypes {
MTOP = 1,
MY = 2,
GATEWAY = 3
}
export interface IGatewayResponse {
error_response: {
code: string;
};
}
export interface IRequestDetail {
url: string;
data?: any;
rawData?: any;
method?: string;
headers?: any;
dataType?: string;
v?: string;
__is_retry_task__?: boolean;
env?: string;
mtopOptions?: any;
}
export interface IProxyOptions {
gatewayUrl?: string;
dataProxyGatewayUrl?: string;
}
export declare abstract class IProxy {
options: IProxyOptions;
abstract apply(task: IRequestDetail, requestType?: RequestTypes): Promise<any>;
constructor(options?: IProxyOptions);
}
export declare class Request {
networkType?: string;
options: IRequestOptions;
tasks: {
detail: IRequestDetail;
success?: (res: any) => void;
fail?: (res: any) => void;
}[];
proxy: IProxy;
inited: boolean;
pauseExecTask: boolean;
init(options: IRequestOptions, proxy: IProxy): Promise<void>;
listenNetworkChange(): Promise<void>;
static getRequestType(url: string): RequestTypes;
/**
* ,
* @param res
*/
private verifyResponse;
private tryThrowError;
private sendGatewayRequest;
flushGatewayRequestQueue(reject?: boolean): void;
exec(detail: IRequestDetail, requestType?: RequestTypes): Promise<any>;
/**
*
* @param url
* @param method
* @param queryString
* @param headers mc_开头的http header
* @param content json body
*/
private getHttpRequestSign;
/**
*
* @param detail
*/
private createGatewayRequest;
}
export declare const request: Request;

View File

@ -0,0 +1,42 @@
export interface ICallback {
(res: any): void;
}
export interface IHttpRequestOptions extends IAsyncInvokeOptions {
url: string;
method?: string;
headers?: any;
data?: any;
dataType?: string;
}
export declare type Env = 'test' | 'pre' | 'online';
export declare type Envs = {
database: Env;
file: Env;
function: Env;
message: Env;
};
export interface ICloudOptions {
env?: Env | Envs;
appKey?: string;
}
declare global {
interface Window {
}
var my: {
httpRequest: (options: IHttpRequestOptions) => void;
sendMtop: (options: any) => void;
alert: (options: {
title?: string;
content?: string;
}) => void;
};
var NODE_PLATFORM: boolean;
var SDK_VERSION: string;
}
export interface IAsyncInvokeOptions {
success?: ICallback;
fail?: ICallback;
complete?: ICallback;
}
export declare type AsyncInvokeResult = Promise<any> | void;
export declare type Constructor<T = {}> = new (...args: any[]) => T;

View File

@ -0,0 +1,8 @@
import { IAsyncInvokeOptions, Env, Envs } from "./types";
export declare function noop(): void;
export declare function invokeTaskCallback(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
export declare function safeAccess(props: any, keys: string[] | string, def?: any): any;
export declare function invokeCallback(options: IAsyncInvokeOptions, asyncTask: Promise<any>): Promise<void>;
export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise<any>;
export declare function getUserId(): Promise<string>;
export declare function getEnvs(env: Env | Envs): Envs;

461
node_modules/mini-antui/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,461 @@
## 0.5.0
`2020-09-01`
- **Bug Fix**
- **tabs** 组件兼容问题处理;
## 0.4.35
`2020-01-13`
- **Bug Fix**
- **popup** 组件在 iOS13 中点击可能出现穿透的情况处理;
## 0.4.34
`2019-09-24`
- **Bug Fix**
- **search-bar** 点击清除 icon 后搜索框自动获取焦点 [#289](https://github.com/ant-mini-program/mini-antui/issues/289)
- **Feature**
- **filter** 组件可点击遮罩层关闭;调整最大高度值 [#287](https://github.com/ant-mini-program/mini-antui/issues/287)
## 0.4.33
`2019-09-10`
- **Bug Fix**
- 启用 component2 编译时,**List** 组件循环报错问题修复;
## 0.4.32
`2019-09-09`
- **Bug Fix**
- **Grid** 组件 `hasLine` 无效修复;
- **Notice** 组件切换 `show` 时无跑马灯修复;
- **Calendar** 组件去除 `disable` 时的 tag
- **Enhancement**
- **SwipeAction** 组件 item 可修改文字和背景色;
- **Calendar** 组件可控制年份;
- 相关组件文档内容优化
- **Feature**
- **Tabs** 组件新增 `tab-content` 高度自适应;([#71](https://github.com/ant-mini-program/mini-antui/issues/71)
- **List** 组件新增 `loadMore` 属性;([#73](https://github.com/ant-mini-program/mini-antui/issues/73))
## 0.4.31
`2019-08-28`
- **Bug Fix**
- package.json 调整
## 0.4.30
`2019-08-27`
- **Bug Fix**
- 修复 `collapse``didUnmout` 时清除缓存的问题 [#291](https://github.com/ant-mini-program/mini-antui/pull/291)
- 修复 `swipe-action` 在模拟器中点击会触发滑动的问题 [#294](https://github.com/ant-mini-program/mini-antui/pull/294)
- **Enhancement**
- package.json 增加 node 版本限定 `"node": "^10.0.0"`
- 更新 yarn.lock
## 0.4.29
`2019-07-19`
- **Bug Fix**
- 修复`list-item`下slot标签未闭合的问题。
## 0.4.28
`2019-07-05`
- **Bug Fix**
- 修复`vtabs`在页面`allowsBounceVertical`时不能滚动的问题
- 修复`search-bar``placeholder`很长的情况下点击无法清除内容的问题
## 0.4.27
`2019-05-24`
- **Bug Fix**
- 修复`collapse`无法在钉钉小程序上展开的问题([#272](https://github.com/ant-mini-program/mini-antui/issues/272))
- 修复`stepper` readOnly状态下按钮点击无效的问题
## 0.4.26
`2019-05-10`
- **Bug Fix**
- 修复`vtabs`的语法错误([#264](https://github.com/ant-mini-program/mini-antui/issues/264))
- 修复`am-icon`默认class为undefined的问题([#261](https://github.com/ant-mini-program/mini-antui/issues/261))
- 修复`list-item`数字和英文不换行的问题
## 0.4.25
`2019-04-24`
- **Bug Fix**
- 修复`badge`类型为text的情况下文字换行的问题
## 0.4.23
`2019-04-11`
- **Enhancement**
- `notice`样式写明box-sizing类型避免开发者全局css属性影响组件样式
- `modal`新增`disableScroll`属性
## 0.4.22
`2019-03-29`
- **Bug Fix**
- 修复`flex`没有justify-content:center的问题([#247](https://github.com/ant-mini-program/mini-antui/issues/247))
## 0.4.21
`2019-03-25`
- **Bug Fix**
- 修复`list-item`在更新渲染时dataset不同步更新的问题
## 0.4.20
`2019-03-22`
- **Feature**
- 新增`collapse`组件
- `grid`支持slot
- **Enhancement**
- 优化`picker-item`文字超出换行问题
- `vtabs`组件activeTab属性变化重新计算高度
## 0.4.19
`2019-03-01`
- **Enhancement**
- `amount-input``message``modal`1px问题优化
## 0.4.18
`2019-02-25`
- **Bug Fix**
- 修复`notice`在text较短情况下设置loop为true时导致闪烁的问题
## 0.4.17
`2019-02-23`
- **Feature**
- 新增`am-icon`组件
## 0.4.16
`2019-02-15`
- **Bug Fix**
- 修复`notice`marqueeProps属性无默认参数导致动画无效的问题
## 0.4.15
`2019-02-01`
- **Enhancement**
- 优化`notice`动画性能([#140](https://github.com/ant-mini-program/mini-antui/issues/140))
- 修复`pagination`闪烁问题
## 0.4.14
`2019-01-25`
- **Enhancement**
- `popup`组件兼容同层渲染模式
## 0.4.13
`2019-01-18`
- **Feature**
- 新增`pagination`组件
## 0.4.12
`2019-01-04`
- **Bug Fix**
- 修复`stepper`step属性设置小数时精度问题([#196](https://github.com/ant-mini-program/mini-antui/issues/196))
## 0.4.11
`2018-12-30`
- **Bug Fix**
- 修复`notice`组件在IOS 9下高度塌陷的问题
## 0.4.10
`2018-12-21`
- **Bug Fix**
- 修复`badge`组件宽度不自适应的问题
## 0.4.9
`2018-12-21`
- **Bug Fix**
- 修复`badge`组件在安卓下文字垂直居中问题
## 0.4.8
`2018-12-19`
- **Feature**
- 新增`flex``flex-item`布局组件
- **Enhancement**
- `steps`支持自定义icon
- `amount-input`支持`controlled`属性
## 0.4.7
`2018-12-07`
- **Enhancement**
- `swipe-action`版本判断优化([#176](https://github.com/ant-mini-program/mini-antui/issues/176))
- `stepper`value属性类型兼容字符串
## 0.4.6
`2018-11-28`
- **Enhancement**
- `list-item`替换图片资源为base64
## 0.4.5
`2018-11-21`
- **Enhancement**
- `popup`新增参数`zIndex`,用来指定组件层级
## 0.4.4
`2018-11-15`
- **Enhancement**
- `notice`的mode参数为`link`onClick回调的触发区域为完整组件。
## 0.4.3
`2018-11-07`
- **Enhancement**
- `tabs`新增`tabBarCls`tabBar自定义样式class
- `tabs`新增`duration`控制滑动动画时长
- `calendar`date参数兼容IOS格式要求
## 0.4.2
`2018-10-31`
- **Enhancement**
- `amount-input`组件type属性新增`digit`类型
- `vtabs`新增`activeTab``onTabClick``onChange`属性([#125](https://github.com/ant-mini-program/mini-antui/issues/125))
## 0.4.1
`2018-10-29`
- **Enhancement**
- `notice`新增`enableMarquee``marqueeProps`属性([#140](https://github.com/ant-mini-program/mini-antui/issues/140))
- **Bug Fix**
- 修复`message`type为`fail`时的白屏问题([#152](https://github.com/ant-mini-program/mini-antui/issues/152))
## 0.4.0
`2018-10-23`
- **Feature**
- 新增`am-checkbox`组件
- 新增`badge`组件
- **Enhancement**
- `calendar`组件`tabs`属性新增`disable`字段,新增`onSelectHasDisableDat`属性([#108](https://github.com/ant-mini-program/mini-antui/issues/108))
- **Bug Fix**
- 修复`vtabs`在安卓下出现滚动误差的问题
- 修复`tabs``tabs`属性变化时没有重新计算宽度导致的滚动不正常问题
## 0.3.13
`2018-10-18`
- **Bug Fix**
- 修复`swipe-action`在didUpdate时陷入死循环的问题
- 修复`vtabs`tabs数据变化没有响应的问题
## 0.3.12
`2018-10-12`
- **Enhancement**
- `vtabs`新增`badgeType``badgeText`属性([#92](https://github.com/ant-mini-program/mini-antui/issues/92))
## 0.3.11
`2018-10-10`
- **Bug Fix**
- 修复`search-bar`在IPhone X下面出现滚动的问题([#113](https://github.com/ant-mini-program/mini-antui/issues/113))
- 修复`stepper`在重置初始值时操作按钮状态不改变的bug([#111](https://github.com/ant-mini-program/mini-antui/issues/111))
- **Enhancement**
- `page-result`图标升级到最新版本
- `input-item`增大清除icon点击响应范围
## 0.3.10
`2018-10-08`
- **Enhancement**
- 解决`list``input-item`在安卓下线条较粗的问题
## 0.3.9
`2018-09-27`
- **Bug Fix**
- 修复`input-item`在失去焦点时清除按钮仍旧显示的问题
## 0.3.8
`2018-09-26`
- **Bug Fix**
- 修复`filter`组件单选时需要反选取消选择的问题
- **Feature**
- 新增`picker-item`组件
- **Enhancement**
- `tabs`新增`activeCls`属性用来表示激活tabbar的自定义class([#87](https://github.com/ant-mini-program/mini-antui/issues/87))
- `input-item`新增`clear``onClear`属性,组件内支持清除输入功能([#84](https://github.com/ant-mini-program/mini-antui/issues/84))
- `list-item` onClick回调新增target参数用来支持自定义dataset([#85](https://github.com/ant-mini-program/mini-antui/issues/85))
## 0.3.7
`2018-09-25`
- **Bug Fix**
- 修复了`input-item`组件在失去焦点等事件中无dataset的问题([#66](https://github.com/ant-mini-program/mini-antui/issues/66))
- 修复`popup`组件mask定位为absolut导致的页面滚动时mask跟着滚动的bug
- **Enhancement**
- `popup`新增disableScroll属性以适应不同业务场景
- 完善`swipe-action`的示例代码
- 文档更新,添加体验二维码
## 0.3.6
`2018-09-13`
- **Enhancement**
- 新增tips组件的类型
## 0.3.5
`2018-08-29`
- **Bug Fix**
- 修复`search-bar`点击icon无效的bug
- 修复`search-bar`苹果输入法中间态无法清除placeholder的bug
- **Enhancement**
- 优化`list`组件样式
## 0.3.4
`2018-08-16`
- **Enhancement**
- 优化`tabs`组件闪烁问题
- `face-detection`组件增加最小旋转角度属性
## 0.3.3
`2018-08-10`
- **Feature**
- `tabs`组件新增`activeTab`属性用来指定当前激活tab
## 0.3.2
`2018-08-07`
- **Feature**
- 新增`popup`弹出菜单组件
- `face-detection`组件新增活体检测功能
## 0.3.1
`2018-07-27`
- **Feature**
- `face-detection`组件新增`appName``serviceName`字段
## 0.3.0
`2018-07-26`
- **Feature**
- 新增`face-detection`组件
- 新增`footer`组件
- `page-result`组件增加slot方便开发者个性化定制区域内容
- **Enhancement**
- 优化`calendar`组件在初次渲染时的闪烁问题
- 优化`swipe-action`右侧按钮宽度自适应文本内容
## 0.2.0
`2018-07-11`
- **Feature**
- 新增`vtab组件`
- **Enhancement**
- 优化`swipe-action`组件性能
- 解决`tabs`组件在初次渲染时的页面闪烁问题
## 0.1.0
`2018-06-21`
- **Feature**
- 新增`steps``popover``amount-input``calendar`组件;
- `tabs`组件`tabs`属性新增`badgeType`属性、新增`showPlus``onPlusClick`属性
- `modal`组件新增`closeType`属性,以适应不同的背景颜色
- **Bug Fix**
- 修复`grid``modal``input-item`组件样式问题
## 0.0.13
`2018-05-09`
首次发布小程序版antui组件库

22
node_modules/mini-antui/LICENSE generated vendored Normal file
View File

@ -0,0 +1,22 @@
MIT LICENSE
Copyright (c) 2018-present Alipay.com, https://www.alipay.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

81
node_modules/mini-antui/README.md generated vendored Normal file
View File

@ -0,0 +1,81 @@
<h1 align="center">重要说明</h1>
鉴于支付宝整体设计规范升级,以及为了能够将提供更多的组件能力,支持主题切换等功能,我们对组件进行了一次深度改造,同时支付宝小程序能力在多端底层打通,我们的组件库也将支持多端接入,我们将品牌升级为 <a href="https://github.com/Alibaba-mp/mini-ali-ui">mini-ali-ui</a>
<p>mini-antui 将不再继续维护,源码保留,如有 bug 会在 <a href="https://github.com/Alibaba-mp/mini-ali-ui">mini-ali-ui</a> 进行 fix 操作。因此后续所有的版本更新升级将转移到 <a href="https://github.com/Alibaba-mp/mini-ali-ui">mini-ali-ui</a>。品牌虽然改变,但我们的服务不会变,我们将继续为广大阿里小程序开发者服务,感谢各位的支持和鼓励。</p>
<p align="center">
<img width="300" src="https://gw.alipayobjects.com/mdn/rms_ce4c6f/afts/img/A*gWo-TLFGp38AAAAAAAAAAABkARQnAQ" >
</p>
## mini-ali-ui 特性
* 基于 **Alipay Design** 设计规范;
* 支持多端小程序(支付宝,淘宝,钉钉等);
* 支持主题配置切换;
* 支持 `px``rpx`
<p align="center">
<img width="200" src="https://gw.alipayobjects.com/mdn/miniProgram_mendian/afts/img/A*wiFYTo5I0m8AAAAAAAAAAABjAQAAAQ/original">
</p>
# Mini AntUI
[![npm package](https://img.shields.io/npm/v/mini-antui.svg?style=flat-square)](https://www.npmjs.com/package/mini-antui)
[![GitHub stars](https://img.shields.io/github/stars/ant-mini-program/mini-antui.svg)](https://github.com/ant-mini-program/mini-antui/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/ant-mini-program/mini-antui.svg)](https://github.com/ant-mini-program/mini-antui/network/members)
[![NPM downloads](https://img.shields.io/npm/dm/mini-antui.svg?style=flat-square)](https://www.npmjs.com/package/mini-antui)
[![GitHub issues](https://img.shields.io/github/issues/ant-mini-program/mini-antui.svg)](https://github.com/ant-mini-program/mini-antui/issues)
[![GitHub license](https://img.shields.io/github/license/ant-mini-program/mini-antui.svg)](https://github.com/ant-mini-program/mini-antui/blob/master/LICENSE)
## 示例
<p align="left">
<img width="250" src="https://gw.alipayobjects.com/mdn/miniProgram_mendian/afts/img/A*xXX3TqsZimMwfA5KoKInYQBjAQAAAQ/original">
</p>
## 链接
- [mini-antui官网文档](https://docs.alipay.com/mini/component-ext/overview-ext-common)
- [支付宝小程序](https://mini.open.alipay.com/channel/miniIndex.htm)
- [开发工具](https://docs.alipay.com/mini/ide/overview)
- [开发规范](https://github.com/ant-mini-program/mini-antui/wiki/%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83)
## 特性
- 基于`Advance Design`设计规范
- 使用[支付宝小程序](https://mini.open.alipay.com/channel/miniIndex.htm)开发
## 安装
```bash
$ npm install mini-antui --save
```
## 使用
在页面json中文件中进行注册如card组件的注册如下所示
```json
{
"usingComponents": {
"card": "mini-antui/es/card/index",
}
}
```
在axml文件中进行调用
```html
<card
thumb="{{thumb}}"
title="卡片标题2"
subTitle="副标题非必填2"
onClick="onCardClick"
info="点击了第二个card"
/>
```
详细使用说明请参照官方文档[使用自定义组件](https://docs.alipay.com/mini/framework/use-custom-component)
## 贡献
如果你有好的意见或建议,欢迎给我们提[issue](https://github.com/ant-mini-program/mini-antui/issues)。

19
node_modules/mini-antui/es/_util/fmtEvent.js generated vendored Normal file
View File

@ -0,0 +1,19 @@
export default function fmtEvent(props, e) {
var dataset = {};
for (var key in props) {
if (/data-/gi.test(key)) {
dataset[key.replace(/data-/gi, '')] = props[key];
}
}
return Object.assign({}, e, {
currentTarget: {
dataset: dataset
},
target: {
dataset: dataset,
targetDataset: dataset
}
});
}

1
node_modules/mini-antui/es/am-checkbox/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
.am-checkbox{position:relative;height:22px;width:22px;display:inline-block}.am-checkbox-value{position:absolute;z-index:1;border-radius:50%;opacity:0}.am-checkbox-synthetic{position:absolute;z-index:2;pointer-events:none;top:0;left:0;border-radius:50%;height:100%;width:100%}.am-checkbox-synthetic::before{position:absolute;left:0;top:0;height:200%;width:200%;display:block;box-sizing:border-box;border-radius:50%;content:'';transform-origin:0 0;transform:scale(.5);border:1px solid #c9c9c9}.am-checkbox-value.a-checkbox-checked+.am-checkbox-synthetic::before{background-color:#108ee9;border-color:#108ee9;border-width:0}.am-checkbox-value.a-checkbox-checked+.am-checkbox-synthetic::after{position:absolute;display:block;z-index:999;content:'';top:4px;right:8px;width:5px;height:10px;border:2px solid #fff;border-width:0 1px 1px 0;transform:rotate(45deg)}.am-checkbox-value.a-checkbox-disabled+.am-checkbox-synthetic::before{border:1px solid #ccc;background-color:#e1e1e1}.am-checkbox-value.a-checkbox-disabled+.am-checkbox-synthetic::after{border-color:#adadad}

11
node_modules/mini-antui/es/am-checkbox/index.axml generated vendored Normal file
View File

@ -0,0 +1,11 @@
<view class="am-checkbox">
<checkbox
class="am-checkbox-value"
value="{{value}}"
checked="{{checked}}"
disabled="{{disabled}}"
onChange="onChange"
id="{{id}}"
/>
<view class="am-checkbox-synthetic"></view>
</view>

16
node_modules/mini-antui/es/am-checkbox/index.js generated vendored Normal file
View File

@ -0,0 +1,16 @@
import fmtEvent from '../_util/fmtEvent';
Component({
props: {
value: '',
checked: false,
disabled: false,
onChange: function onChange() {},
id: ''
},
methods: {
onChange: function onChange(e) {
var event = fmtEvent(this.props, e);
this.props.onChange(event);
}
}
});

3
node_modules/mini-antui/es/am-checkbox/index.json generated vendored Normal file
View File

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

1
node_modules/mini-antui/es/am-icon/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
@font-face{font-family:antui-icon;src:url(https://gw.alipayobjects.com/os/basement_prod/9ca2fed3-8762-4faa-b075-3d6c9e852f6e.ttf?t=1550648587412) format('truetype')}.am-icon{font-family:antui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.am-icon-arrow-down:before{content:"\e62b"}.am-icon-arrow-right:before{content:"\e62c"}.am-icon-charge:before{content:"\e62d"}.am-icon-card:before{content:"\e62e"}.am-icon-arrow-left:before{content:"\e62f"}.am-icon-circle:before{content:"\e630"}.am-icon-close-o:before{content:"\e631"}.am-icon-cross:before{content:"\e632"}.am-icon-delete:before{content:"\e633"}.am-icon-close:before{content:"\e634"}.am-icon-dislike-o:before{content:"\e635"}.am-icon-dislike:before{content:"\e636"}.am-icon-heart-o:before{content:"\e637"}.am-icon-download:before{content:"\e638"}.am-icon-heart:before{content:"\e639"}.am-icon-help-o:before{content:"\e63a"}.am-icon-friends:before{content:"\e63b"}.am-icon-info:before{content:"\e63c"}.am-icon-like-o:before{content:"\e63d"}.am-icon-help:before{content:"\e63e"}.am-icon-location-o:before{content:"\e63f"}.am-icon-location:before{content:"\e640"}.am-icon-info-o:before{content:"\e641"}.am-icon-notice:before{content:"\e642"}.am-icon-plus:before{content:"\e643"}.am-icon-like:before{content:"\e644"}.am-icon-qrcode:before{content:"\e645"}.am-icon-reload:before{content:"\e646"}.am-icon-scan:before{content:"\e647"}.am-icon-money:before{content:"\e648"}.am-icon-search:before{content:"\e649"}.am-icon-setting:before{content:"\e64a"}.am-icon-share:before{content:"\e64b"}.am-icon-star-o:before{content:"\e64c"}.am-icon-star:before{content:"\e64d"}.am-icon-success-o:before{content:"\e64e"}.am-icon-wait-o:before{content:"\e64f"}.am-icon-success:before{content:"\e650"}.am-icon-wait:before{content:"\e651"}.am-icon-warning:before{content:"\e652"}.am-icon-warning-o:before{content:"\e653"}.am-icon-zoom-in:before{content:"\e654"}.am-icon-zoom-out:before{content:"\e655"}.am-icon-arrow-up:before{content:"\e656"}

5
node_modules/mini-antui/es/am-icon/index.axml generated vendored Normal file
View File

@ -0,0 +1,5 @@
<text
class="am-icon {{className}} am-icon-{{type}}"
style="font-size: {{size}}px; color:{{color}};"
aria-hidden="{{ariaHidden}}">
</text>

9
node_modules/mini-antui/es/am-icon/index.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
Component({
props: {
type: '',
size: 23,
color: '#333',
className: '',
ariaHidden: undefined
}
});

3
node_modules/mini-antui/es/am-icon/index.json generated vendored Normal file
View File

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

1
node_modules/mini-antui/es/amount-input/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
.am-amount{box-sizing:border-box;height:173px;width:100%;padding:16px;background:#fff}.am-amount-title{height:24px;line-height:24px;color:#333;font-size:17px}.am-amount-synthetic{position:absolute;top:0;left:0;display:flex}.am-amount-input{box-sizing:content-box;margin-top:16px;padding-bottom:16px;display:flex;align-items:center;width:100%;height:48px;position:relative;line-height:48px}.am-amount-input::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-amount-symbol{width:18px;font-family:PingFang SC;font-size:30px;color:#333}.am-amount-placeholder{margin-left:6px;color:#ccc;font-size:24px}.am-amount-value{padding:0 0 0 24px;box-sizing:border-box;z-index:2;height:48px;line-height:48px;vertical-align:middle;background-color:transparent;font-size:48px;font-weight:500}.am-amount-clear{visibility:hidden;width:28px;height:28px}.am-amount-clear-icon{display:flex;height:100%;justify-content:center;align-items:center}.am-amount-clear-show{visibility:visible}.am-amount-footer{padding:16px 0;display:flex}.am-amount-extra{flex:1;height:20px;line-height:20px;color:#999;font-size:14px}.am-amount-btn{width:120px;text-align:right;color:#108ee9;font-size:14px}

27
node_modules/mini-antui/es/amount-input/index.axml generated vendored Normal file
View File

@ -0,0 +1,27 @@
<view class="am-amount {{className}}">
<view class="am-amount-title">{{title}}</view>
<view class="am-amount-input">
<view class="am-amount-synthetic">
<text class="am-amount-symbol">¥</text>
<text class="am-amount-placeholder" style="{{ visibility: value.length == 0 ? 'visible': 'hidden'}}">{{placeholder}}</text>
</view>
<input
controlled="{{controlled}}"
type="{{type === 'digit' ? 'digit' : 'number'}}"
maxlength="{{maxLength}}"
class="am-amount-value"
value="{{value}}"
focus="{{focus}}"
onInput="onInput"
onConfirm="onConfirm"
onFocus="onFocus"
onBlur="onBlur" />
<view class="am-amount-clear {{ value.length > 0 && _focus ? 'am-amount-clear-show' : '' }}" onTap="onClearTap">
<icon class="am-amount-clear-icon" type="clear" size="22" />
</view>
</view>
<view class="am-amount-footer">
<text class="am-amount-extra">{{extra}}</text>
<view class="am-amount-btn" onTap="onButtonClick">{{btnText}}</view>
</view>
</view>

60
node_modules/mini-antui/es/amount-input/index.js generated vendored Normal file
View File

@ -0,0 +1,60 @@
import fmtEvent from '../_util/fmtEvent';
Component({
props: {
type: 'number',
className: '',
focus: false,
placeholder: '',
value: '',
controlled: false
},
data: {
_focus: false
},
methods: {
onInput: function onInput(e) {
var event = fmtEvent(this.props, e);
if (this.props.onInput) {
this.props.onInput(event);
}
},
onConfirm: function onConfirm(e) {
var event = fmtEvent(this.props, e);
if (this.props.onConfirm) {
this.props.onConfirm(event);
}
},
onButtonClick: function onButtonClick() {
if (this.onButtonClick) {
this.props.onButtonClick();
}
},
onFocus: function onFocus(e) {
this.setData({
_focus: true
});
var event = fmtEvent(this.props, e);
if (this.props.onFocus) {
this.props.onFocus(event);
}
},
onBlur: function onBlur(e) {
this.setData({
_focus: false
});
var event = fmtEvent(this.props, e);
if (this.props.onBlur) {
this.props.onBlur(event);
}
},
onClearTap: function onClearTap() {
if (this.props.onClear) {
this.props.onClear('');
}
}
}
});

3
node_modules/mini-antui/es/amount-input/index.json generated vendored Normal file
View File

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

1
node_modules/mini-antui/es/badge/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
.am-badge{display:inline-block;position:relative;vertical-align:middle;line-height:1}.am-badge-text{display:inline-block;position:absolute;right:0;transform:translate(50%,-50%);top:0;min-width:16px;padding:0;height:16px;text-align:center;background-color:#ff3b30;border-radius:16px;color:#fff}.am-badge-text-padding{font-size:10px;opacity:0}.am-badge-text-inner{position:absolute;top:50%;left:50%;font-size:20px;transform:translate(-50%,-50%) scale(.5);white-space:nowrap}.am-badge-text.am-badge-double{padding:0 4px}.am-badge-not-a-wrapper .am-badge-text{position:relative;top:auto;right:auto;transform:translateX(0)}.am-badge-text.is-dot{padding:0;width:10px;min-width:10px;height:10px}

11
node_modules/mini-antui/es/badge/index.axml generated vendored Normal file
View File

@ -0,0 +1,11 @@
<view class="am-badge {{className}} {{!$slots.inner ? 'am-badge-not-a-wrapper' : ''}}">
<view
class="am-badge-text
{{ text.toString().length > 1 ? 'am-badge-double' : ''}}"
a:if="{{!dot}}">
<text class="am-badge-text-padding">{{typeof text === 'number' && text > overflowCount ? overflowCount + '+' : text }}</text>
<text class="am-badge-text-inner">{{typeof text === 'number' && text > overflowCount ? overflowCount + '+' : text }}</text>
</view>
<view class="am-badge-text is-dot" a:if="{{dot}}"></view>
<slot name="inner" />
</view>

8
node_modules/mini-antui/es/badge/index.js generated vendored Normal file
View File

@ -0,0 +1,8 @@
Component({
props: {
className: '',
overflowCount: 99,
text: '',
dot: false
}
});

3
node_modules/mini-antui/es/badge/index.json generated vendored Normal file
View File

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

1
node_modules/mini-antui/es/calendar/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
.am-calendar{background-color:#fff;padding-top:10px}.am-calendar-months{display:flex;box-sizing:border-box;padding:0 26px;align-items:center;height:28px}.am-calendar-next-month,.am-calendar-prev-month{display:flex;width:40px;font-size:20px}.am-calendar-prev-month{justify-content:flex-start}.am-calendar-next-month{justify-content:flex-end}.am-calendar-arrow{height:28px;width:12px;background-image:url(https://gw.alipayobjects.com/zos/rmsportal/vYcMhkfyHRIOeVXWdcPe.png);background-size:8px 14px;background-position:left center;background-repeat:no-repeat}.am-calendar-arrow_year{width:13px;background-repeat:repeat-x}.am-calendar-arrow.next{transform:rotate(180deg)}.am-calendar-selected-month{flex:1;text-align:center;font-size:20px;font-weight:600;color:#333}.am-calendar-days{display:flex;padding:14px 10px 9px;border-bottom:1rpx solid #eee;height:20px;line-height:20px;box-sizing:content-box}.am-calendar-day{flex:1;text-align:center;color:#333;font-size:14px}.am-calendar-dates{display:flex;flex-direction:column}.am-calendar-week{margin-bottom:17px;display:flex;flex-direction:row;padding:0 10px}.am-calendar-week:first-child{margin-top:12px}.am-calendar-date-wrap{position:relative;text-align:center;display:flex;flex-direction:column;align-items:center;height:42px;flex:1}.am-calendar-date{text-align:center;height:23px;line-height:23px;font-size:19px;font-family:Helvetica;color:#333}.am-calendar-tag{position:absolute;top:21px;width:42px;overflow:hidden;text-overflow:hidden;white-space:nowrap;color:#f5a623;font-size:10px;font-weight:500}.am-calendar-today{color:#108ee9}.am-calendar-gray{color:#ccc}.am-calendar-selected .am-calendar-block{position:absolute;left:calc(50% - 21px);top:calc(50% - 10px);transform:translateY(-50%);width:42px;height:42px;background:#309ef2;border-radius:2px}.am-calendar-middle.is-range .am-calendar-block{position:absolute;left:0;top:calc(50% - 10px);transform:translateY(-50%);height:42px;background:#309ef2;width:100%;border-radius:0}.am-calendar-start.is-range .am-calendar-block{position:absolute;left:calc(50% - 21px);top:calc(50% - 10px);transform:translateY(-50%);width:100%;height:42px;background:#309ef2;border-radius:2px 0 0 2px}.am-calendar-end.is-range .am-calendar-block{position:absolute;left:0;top:calc(50% - 10px);transform:translateY(-50%);width:calc(50% + 21px);height:42px;background:#309ef2;border-radius:0 2px 2px 0}.am-calendar-end .am-calendar-block.has-tag,.am-calendar-middle .am-calendar-block.has-tag,.am-calendar-selected .am-calendar-block.has-tag,.am-calendar-start .am-calendar-block.has-tag{top:calc(50% - 7px)}.am-calendar-end .am-calendar-date,.am-calendar-middle .am-calendar-date,.am-calendar-selected .am-calendar-date,.am-calendar-start .am-calendar-date{position:relative;color:#fff}.am-calendar-end .am-calendar-tag,.am-calendar-middle .am-calendar-tag,.am-calendar-selected .am-calendar-tag,.am-calendar-start .am-calendar-tag{color:#fff}.am-calendar-disable .am-calendar-date{color:#999}

53
node_modules/mini-antui/es/calendar/index.axml generated vendored Normal file
View File

@ -0,0 +1,53 @@
<view class="am-calendar {{className}}" a:if="{{dates.length > 0}}">
<view class="am-calendar-months">
<view class="am-calendar-prev-month" onTap="onPrevYearTap" a:if="{{haveYear}}">
<view class="am-calendar-arrow am-calendar-arrow_year"></view>
</view>
<view class="am-calendar-prev-month" onTap="onPrevMonthTap">
<view class="am-calendar-arrow"></view>
</view>
<view class="am-calendar-selected-month">{{selectedYear}}年{{selectedMonth + 1}}月</view>
<view class="am-calendar-next-month" onTap="onNextMonthTap">
<view class="am-calendar-arrow next"></view>
</view>
<view class="am-calendar-next-month" onTap="onNextYearTap" a:if="{{haveYear}}">
<view class="am-calendar-arrow am-calendar-arrow_year next"></view>
</view>
</view>
<view class="am-calendar-days">
<block a:for="{{['日', '一', '二', '三', '四', '五', '六']}}">
<view class="am-calendar-day">{{item}}</view>
</block>
</view>
<view class="am-calendar-dates">
<block a:for="{{dates}}">
<view class="am-calendar-week">
<block a:for="{{item}}">
<view
class="am-calendar-date-wrap
{{ item.isSelected ? 'am-calendar-selected': '' }}
{{ item.isStart ? 'am-calendar-start': '' }}
{{ item.isMiddle ? 'am-calendar-middle': '' }}
{{ item.isEnd ? 'am-calendar-end': '' }}
{{ item.disable ? 'am-calendar-disable': '' }}
{{ type === 'range' ? 'is-range' : '' }}"
data-year="{{item.year}}"
data-month="{{item.month}}"
data-date="{{item.date}}"
onTap="onDateTap"
>
<view
class="am-calendar-block {{ blockType === 2 ? 'has-tag': '' }}"
></view>
<view
class="am-calendar-date {{ item.isGray ? 'am-calendar-gray': '' }} {{ item.isToday ? 'am-calendar-today': ''}}"
>{{item.date}}</view>
<view class="am-calendar-tag" style="{{
color: item.isSelected || item.isMiddle || item.isStart || item.isEnd ? '#fff' : (item.disable ? '#999' : item.color)
}}">{{item.disable ? '' : item.tag}}</view>
</view>
</block>
</view>
</block>
</view>
</view>

481
node_modules/mini-antui/es/calendar/index.js generated vendored Normal file
View File

@ -0,0 +1,481 @@
/* eslint-disable complexity, no-param-reassign */
/* eslint max-depth: [2, 7] */
var leapYear = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var commonYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var FIRST_MONTH = 0;
var LAST_MONTH = 11;
var DAYS_PER_ROW = 7;
var COLOR_MAP = {
1: '#f5a911',
2: '#e8541e',
3: '#07a89b',
4: '#108ee9',
5: 'rgba(51, 51, 51, 0.4)'
}; // 获取某月第某天是星期几
function getDay(month, year, index) {
return new Date(year, month, index).getDay();
} // 获取某月有几天
function getMonthLength(month, year) {
if (year % 400 === 0 || year % 100 !== 0 && year % 4 === 0) {
return leapYear[month];
} else {
return commonYear[month];
}
} // 数字补位 1 -> 01
function prefixNum(num) {
if (num < 10) {
return "0" + num;
} else {
return "" + num;
}
}
Component({
data: {
selectedYear: 0,
selectedMonth: 0,
currentDate: null,
dates: [],
blockType: 1 // 1.没有待办纯数字 2.有待办 用于区分不同类型日期块的样式。
},
props: {
className: '',
tagData: [],
type: 'single',
haveYear: false
},
didMount: function didMount() {
this.tapTimes = 1;
var date = new Date();
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
var year = date.getFullYear();
var month = date.getMonth();
this.setData({
selectedYear: year,
selectedMonth: month,
currentDate: date
});
this.refreshdates(month, year);
},
didUpdate: function didUpdate() {
var dates = this.data.dates;
var blockType = 1;
for (var i = 0; i < dates.length; i++) {
for (var j = 0; j < dates[i].length; j++) {
if (this.hasTag(dates[i][j])) {
blockType = 2;
}
}
}
this.setData({
dates: dates,
blockType: blockType
});
},
methods: {
onPrevYearTap: function onPrevYearTap() {
var _this$data = this.data,
selectedMonth = _this$data.selectedMonth,
selectedYear = _this$data.selectedYear;
var year = selectedYear;
var month = selectedMonth;
year = selectedYear - 1;
if (this.props.onYearChange) {
this.props.onYearChange(year, selectedYear);
}
this.setData({
selectedYear: year
});
this.refreshdates(month, year);
},
onNextYearTap: function onNextYearTap() {
var _this$data2 = this.data,
selectedMonth = _this$data2.selectedMonth,
selectedYear = _this$data2.selectedYear;
var year = selectedYear;
var month = selectedMonth;
year = selectedYear + 1;
if (this.props.onYearChange) {
this.props.onYearChange(year, selectedYear);
}
this.setData({
selectedYear: year
});
this.refreshdates(month, year);
},
onPrevMonthTap: function onPrevMonthTap() {
var _this$data3 = this.data,
selectedMonth = _this$data3.selectedMonth,
selectedYear = _this$data3.selectedYear;
var year = selectedYear;
var month = selectedMonth; // 如果当前选中是一月份前一月是去年的12月
if (selectedMonth === FIRST_MONTH) {
year = selectedYear - 1;
month = LAST_MONTH;
} else {
month = selectedMonth - 1;
}
if (this.props.onMonthChange) {
this.props.onMonthChange(month, selectedMonth);
}
this.setData({
selectedYear: year,
selectedMonth: month
});
this.refreshdates(month, year);
},
onNextMonthTap: function onNextMonthTap() {
var _this$data4 = this.data,
selectedMonth = _this$data4.selectedMonth,
selectedYear = _this$data4.selectedYear;
var year = selectedYear;
var month = selectedMonth; // 如果当前选中是十二月份下一月是去年的12月
if (selectedMonth === LAST_MONTH) {
year = selectedYear + 1;
month = FIRST_MONTH;
} else {
month = selectedMonth + 1;
}
if (this.props.onMonthChange) {
this.props.onMonthChange(month, selectedMonth);
}
this.setData({
selectedYear: year,
selectedMonth: month
});
this.refreshdates(month, year);
},
refreshdates: function refreshdates(month, year) {
this.tapTimes = 1;
var _this$data5 = this.data,
selectedYear = _this$data5.selectedYear,
selectedMonth = _this$data5.selectedMonth,
currentDate = _this$data5.currentDate;
var firstDay = getDay(month, year, 1);
var days = getMonthLength(month, year);
var datesArray = [];
var currentDateTimeStamp = +currentDate;
var num = 0;
for (var i = 0; i < firstDay; i++) {
num += 1; // 如果当前选中的是一月份前一个月是去年的12月
var _year = selectedYear;
var _month = selectedMonth;
if (selectedMonth === 0) {
_year = selectedYear - 1;
_month = LAST_MONTH;
} else {
_year = selectedYear;
_month = selectedMonth - 1;
}
var date = getMonthLength(_month, _year) - i;
datesArray.unshift({
year: _year,
month: _month,
date: date,
isToday: false,
isGray: true,
isSelected: false,
tag: ''
});
}
for (var _i = 0; _i < days; _i++) {
num += 1;
var _date = _i + 1;
var dateTimeStamp = +new Date(selectedYear, selectedMonth, _date);
datesArray.push({
year: selectedYear,
month: selectedMonth,
date: _date,
isToday: dateTimeStamp === currentDateTimeStamp,
isGray: false,
isSelected: dateTimeStamp === currentDateTimeStamp,
tag: ''
});
}
var nextDate = 0;
var daysPerPage = 35;
if (num > 35) {
daysPerPage = 42;
}
for (var _i2 = 0; _i2 < daysPerPage - days - firstDay; _i2++) {
// 如果是12月下月是第二年的1月份
nextDate += 1;
var _year2 = selectedYear;
var _month2 = selectedMonth;
if (selectedMonth === LAST_MONTH) {
_year2 = selectedYear + 1;
_month2 = FIRST_MONTH;
} else {
_year2 = selectedYear;
_month2 = selectedMonth + 1;
}
datesArray.push({
year: _year2,
month: _month2,
date: nextDate,
isToday: false,
isGray: true,
isSelected: false,
tag: ''
});
}
var blockType = 1;
for (var _i3 = 0; _i3 < datesArray.length; _i3++) {
if (this.hasTag(datesArray[_i3])) {
blockType = 2;
}
}
var dates = [];
var weekDates = [];
for (var _i4 = 0; _i4 < datesArray.length; _i4++) {
weekDates.push(datesArray[_i4]);
if ((_i4 + 1) % DAYS_PER_ROW === 0) {
dates.push([].concat(weekDates));
weekDates = [];
}
}
this.setData({
dates: dates,
blockType: blockType
});
},
hasTag: function hasTag(dateObj) {
var tagData = this.props.tagData; // 去重由调用者处理
if (tagData.length === 0) {
dateObj.tag = '';
return false;
}
return tagData.some(function (item) {
var dateArr = item.date.split('-');
var dateStr = []; // 兼容ios下new Date('2018-1-1')格式返回invalid Date的问题
for (var i = 0; i < dateArr.length; i++) {
dateStr.push(dateArr[i].length > 1 ? dateArr[i] : "0" + dateArr[i]);
}
var date = new Date(dateStr.join('-'));
if (dateObj.year === date.getFullYear() && dateObj.month === date.getMonth() && dateObj.date === date.getDate()) {
dateObj.tag = item.tag;
dateObj.color = COLOR_MAP[item.tagColor];
dateObj.disable = item.disable;
return true;
} else {
dateObj.tag = '';
return false;
}
});
},
getDateGap: function getDateGap(day1, day2) {
var date1 = +new Date(day1.year, prefixNum(day1.month), prefixNum(day1.date));
var date2 = +new Date(day2.year, prefixNum(day2.month), prefixNum(day2.date));
return (date1 - date2) / (24 * 3600 * 1000);
},
makeDate: function makeDate(dateObj) {
return new Date(dateObj.year + "-" + prefixNum(dateObj.month + 1) + "-" + prefixNum(dateObj.date));
},
onDateTap: function onDateTap(event) {
var dates = this.data.dates;
var _event$currentTarget$ = event.currentTarget.dataset,
year = _event$currentTarget$.year,
month = _event$currentTarget$.month,
date = _event$currentTarget$.date;
var type = this.props.type;
if (type === 'range') {
if (this.tapTimes % 2 === 0) {
this.tapTimes += 1;
this.endDate = {
year: year,
month: month,
date: date
};
var dateGap = this.getDateGap(this.startDate, this.endDate);
if (dateGap > 0) {
var _ref = [this.endDate, this.startDate];
this.startDate = _ref[0];
this.endDate = _ref[1];
}
var hasDisable = false;
for (var i = 0; i < dates.length; i++) {
for (var j = 0; j < dates[i].length; j++) {
var dateObj = dates[i][j];
dateObj.isStart = false;
dateObj.isMiddle = false;
dateObj.isEnd = false;
var startDateGap = this.getDateGap(dateObj, this.startDate);
var endDateGap = this.getDateGap(dateObj, this.endDate);
if (dateObj.year === year && dateObj.month === month && dateObj.date === date && dateObj.disable) {
hasDisable = true;
}
if (startDateGap > 0 && endDateGap < 0) {
if (dateObj.disable) {
hasDisable = true;
}
if (dateGap !== 0) {
if (j === 0) {
dateObj.isStart = true;
} else if (j === 6) {
dateObj.isEnd = true;
} else {
dateObj.isMiddle = true;
}
} else {
dateObj.isSelected = true;
}
}
if (this.startDate.year === dateObj.year && this.startDate.month === dateObj.month && this.startDate.date === dateObj.date && dateGap !== 0) {
if (j === 6) {
dateObj.isSelected = true;
} else {
dateObj.isStart = true;
}
}
if (this.endDate.year === dateObj.year && this.endDate.month === dateObj.month && this.endDate.date === dateObj.date && dateGap !== 0) {
if (j === 0) {
dateObj.isSelected = true;
} else {
dateObj.isEnd = true;
}
}
}
}
if (hasDisable) {
this.props.onSelectHasDisableDate([this.makeDate(this.startDate), this.makeDate(this.endDate)]);
return;
}
if (this.props.onSelect) {
this.props.onSelect([this.makeDate(this.startDate), this.makeDate(this.endDate)]);
}
} else {
var isDisable = false;
for (var _i5 = 0; _i5 < dates.length; _i5++) {
for (var _j = 0; _j < dates[_i5].length; _j++) {
var _dateObj = dates[_i5][_j];
if (_dateObj.year === year && _dateObj.month === month && _dateObj.date === date) {
if (_dateObj.disable) {
// console.log(1111);
isDisable = true;
_dateObj.isSelected = false;
} else {
_dateObj.isSelected = true;
}
_dateObj.isStart = false;
_dateObj.isMiddle = false;
_dateObj.isEnd = false;
} else {
_dateObj.isSelected = false;
_dateObj.isStart = false;
_dateObj.isMiddle = false;
_dateObj.isEnd = false;
}
}
}
if (!isDisable) {
this.tapTimes += 1;
}
this.startDate = {
year: year,
month: month,
date: date
};
}
this.setData({
dates: dates
});
} else {
var _isDisable = false;
for (var _i6 = 0; _i6 < dates.length; _i6++) {
for (var _j2 = 0; _j2 < dates[_i6].length; _j2++) {
var _dateObj2 = dates[_i6][_j2];
if (_dateObj2.year === year && _dateObj2.month === month && _dateObj2.date === date) {
_dateObj2.isSelected = true;
if (_dateObj2.disable) {
_isDisable = true;
}
} else {
_dateObj2.isSelected = false;
}
}
}
if (_isDisable) {
return;
}
this.setData({
dates: dates
});
if (this.props.onSelect) {
this.props.onSelect([this.makeDate({
year: year,
month: month,
date: date
}), undefined]);
}
}
}
}
});

3
node_modules/mini-antui/es/calendar/index.json generated vendored Normal file
View File

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

1
node_modules/mini-antui/es/card/index.acss generated vendored Normal file
View File

@ -0,0 +1 @@
.am-card{display:flex;background-color:#fff;border-radius:4px;margin:6px 10px;align-items:center;min-height:81px;flex-direction:column;padding:0 16px}.am-card.am-card-active{background:#d9d9d9}.am-card-body{display:flex;align-items:center;width:100%;padding:16px 0}.am-card-content{flex:1;min-width:100px}.am-card-title{font-size:18px;line-height:25px;color:#333;margin-bottom:4px}.am-card-subtitle{font-size:14px;line-height:20px;color:#999;margin-bottom:2px}.am-card-thumb{margin-right:10px;width:48px;height:48px;border-radius:2px}.am-card-arrow{width:13px;height:13px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAaCAYAAAC+aNwHAAAAkElEQVR4AWJwL/BhAJRWByYAgkAUhmdpkDZxlJZqD9UpXCPyBUTEga9+4IkI94F1XaWUTdH+a67inPOhjP2OgD+IFoTcm1GY3khrbfGAGFG6kBmAkPCw1rq6iBYb0VkEzJD+hHQWAz6iJBtQdP8YiQEbUQNiAF0BP0T+Gnkj8VbmHxMq5gOFjzQ+VPlYxz+WEyrVzhdMcxADAAAAAElFTkSuQmCC) center center no-repeat;background-size:8px 13px}.am-card-footer{display:flex;width:100%;align-items:center;border-top:1rpx solid #eee;padding:10px 0;margin:-4px 0 0;font-size:14px;line-height:20px;color:#999}.am-card-footer image{width:14px;height:14px;margin-right:4px}

19
node_modules/mini-antui/es/card/index.axml generated vendored Normal file
View File

@ -0,0 +1,19 @@
<view
class="am-card"
hover-class="am-card-active"
onTap="onCardClick"
>
<view class="am-card-body">
<image a:if="{{thumb}}" src="{{thumb}}" class="am-card-thumb" />
<view class="am-card-content">
<view a:if="{{!thumb || (thumb && footer)}}" class="am-card-title">{{title}}</view>
<view class="am-card-subtitle">{{subTitle}}</view>
<view a:if="{{!footer && thumb}}" class="am-card-title">{{title}}</view>
</view>
<view class="am-card-arrow" aria-hidden="true" />
</view>
<view a:if="{{footer}}" class="am-card-footer">
<image a:if="{{footerImg}}" src="{{footerImg}}" />
{{footer}}
</view>
</view>

17
node_modules/mini-antui/es/card/index.js generated vendored Normal file
View File

@ -0,0 +1,17 @@
Component({
props: {
title: '',
onClick: function onClick() {},
info: ''
},
methods: {
onCardClick: function onCardClick() {
var _this$props = this.props,
info = _this$props.info,
onClick = _this$props.onClick;
onClick({
info: info
});
}
}
});

3
node_modules/mini-antui/es/card/index.json generated vendored Normal file
View File

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

View File

@ -0,0 +1 @@
.am-collapse-item{border-radius:4px;background-color:#fff}.am-collapse-item-title-container{width:100%;display:flex;color:#333;font-size:17px;line-height:24px;position:relative;text-align:justify;align-items:center;padding:0 16px 14px 0;justify-content:space-between;transition:all .3s ease-in-out}.am-collapse-item-title-container::after{content:'';position:absolute;background-color:#fff;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-collapse-item--disabled .am-collapse-title{opacity:.5}.am-collapse-item-title{background-color:#fff;padding:14px 16px 0 16px;border-top:1px solid #eee}.am-collapse-item-title.title--active .am-collapse-item-title-container::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-collapse-item-title-text-wrapper{padding-right:16px}.am-collapse-item-content-wrapper{overflow-y:hidden;box-sizing:border-box;will-change:max-height;transition:max-height .3s ease-in-out}.am-collapse-item-title-arrow{transform:rotate(0);transition:all .2s ease-out}.am-collapse-item .arrow--down{transform:rotate(180deg)}

View File

@ -0,0 +1,35 @@
<view
class="am-collapse-item {{className}} {{isActive ? activeClass : ''}} {{disabled ? 'am-collapse-item--disabled' : ''}}"
key="{{id}}"
>
<view
class="am-collapse-item-title {{titleClass}} {{isActive ? 'title--active' : ''}}"
onTap="onCollapseTap"
data-key="{{id}}"
data-title="{{title}}"
data-isActive="{{isActive}}"
>
<view class="am-collapse-item-title-container">
<view class="am-collapse-item-title-text-wrapper">
<slot name="am-collapse-item-title">
<text>{{header}}</text>
</slot>
</view>
<am-icon
a:if="{{showArrow}}"
size="{{16}}"
color="#ccc"
class="am-collapse-item-title-arrow arrow--{{isActive ? 'down' : 'right'}}"
type="arrow-up"
/>
</view>
</view>
<view
class="am-collapse-item-content-wrapper"
style="max-height: {{contentHeight}}px"
>
<view class="am-collapse-item-content am-collapse-item-content-{{contentId}} {{contentClass}}">
<slot></slot>
</view>
</view>
</view>

View File

@ -0,0 +1,130 @@
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var noop = function noop() {};
function collectArr(arr, ele) {
var resArr = arr;
if (arr instanceof Array) {
resArr.push(ele);
} else {
resArr = [ele];
}
return resArr;
}
var prefixKey = function prefixKey(prefix) {
return function (key) {
return prefix + "-" + key;
};
};
var collapsePrefix = prefixKey('am-collapse');
Component({
data: {
isActive: false,
contentHeight: 0,
contentId: '',
id: '',
activeKey: []
},
props: {
itemKey: '',
// 默认随机数
header: '',
isOpen: false,
showArrow: true,
activeClass: '',
className: '',
titleClass: '',
contentClass: '',
defaultContentHeight: 0,
disabled: false,
collapseKey: ''
},
didMount: function didMount() {
this.initItems();
},
methods: {
initItems: function initItems() {
var _this$props = this.props,
itemKey = _this$props.itemKey,
isOpen = _this$props.isOpen,
defaultContentHeight = _this$props.defaultContentHeight,
collapseKey = _this$props.collapseKey;
this.setData({
isActive: isOpen,
contentHeight: defaultContentHeight,
contentId: this.$id,
id: itemKey || this.$id
});
this.updateStyle({
isActive: isOpen
});
var bindedMethod = this.handleItemDataUpdate.bind(this);
this.$page[collapsePrefix("updates-" + collapseKey)] = collectArr(this.$page[collapsePrefix("updates-" + collapseKey)], bindedMethod);
this.$page[collapsePrefix("ids-" + collapseKey)] = collectArr(this.$page[collapsePrefix("ids-" + collapseKey)], this.data.id);
},
handleItemDataUpdate: function handleItemDataUpdate(data) {
this.setData(_extends({}, data));
var _this$data = this.data,
activeKey = _this$data.activeKey,
id = _this$data.id;
var isActive = activeKey.indexOf(id) !== -1;
this.setData({
isActive: isActive
});
this.updateStyle({
isActive: isActive
});
},
onCollapseTap: function onCollapseTap(evt) {
var collapseKey = this.props.collapseKey;
if (!this.props.disabled) {
var dataset = evt.currentTarget.dataset;
this.$page[collapsePrefix("handleItemTap-" + collapseKey)](dataset.key);
}
},
updateStyle: function updateStyle(_ref) {
var _this = this;
var isActive = _ref.isActive,
_ref$callback = _ref.callback,
callback = _ref$callback === void 0 ? noop : _ref$callback;
if (!isActive) {
this.setData({
isActive: isActive,
contentHeight: 0
});
callback();
} else {
this.calcContentHeight(".am-collapse-item-content." + ("am-collapse-item-content-" + this.$id)).then(function (height) {
_this.setData({
isActive: isActive,
contentHeight: height
});
callback();
});
}
},
calcContentHeight: function calcContentHeight(selector) {
if (selector === void 0) {
selector = '';
}
return new Promise(function (resolve, reject) {
my.createSelectorQuery().select(selector).boundingClientRect().exec(function (res) {
if (res && res[0]) {
resolve(res[0].height);
} else {
reject(res);
}
});
});
}
}
});

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"am-icon": "../../am-icon/index"
}
}

3
node_modules/mini-antui/es/collapse/index.axml generated vendored Normal file
View File

@ -0,0 +1,3 @@
<view class="am-collapse {{className}} am-collapse-container-{{id}}">
<slot></slot>
</view>

92
node_modules/mini-antui/es/collapse/index.js generated vendored Normal file
View File

@ -0,0 +1,92 @@
var noop = function noop() {};
var prefixKey = function prefixKey(prefix) {
return function (key) {
return prefix + "-" + key;
};
};
var collapsePrefix = prefixKey('am-collapse');
Component({
data: {
id: '',
activeArr: []
},
props: {
activeKey: [],
accordion: false,
onChange: noop,
openAnimation: {},
collapseKey: '',
className: ''
},
didMount: function didMount() {
this.initData();
},
didUnmount: function didUnmount() {
// clear cache in page when didUnmount
delete this.$page[collapsePrefix("ids-" + this.props.collapseKey)];
delete this.$page[collapsePrefix("updates-" + this.props.collapseKey)];
},
methods: {
initData: function initData() {
var _this$props = this.props,
accordion = _this$props.accordion,
activeKey = _this$props.activeKey,
collapseKey = _this$props.collapseKey;
var activeArr = [];
this.$page[collapsePrefix("handleItemTap-" + collapseKey)] = this.handleItemTap.bind(this);
if (accordion) {
if (typeof activeKey === 'string') {
activeArr = [activeKey];
} else {
activeArr = [this.$page[collapsePrefix("ids-" + collapseKey)] && this.$page[collapsePrefix("ids-" + collapseKey)][0]];
}
} else if (typeof activeKey === 'string') {
activeArr = [activeKey];
} else if (activeKey instanceof Array) {
activeArr = activeKey;
}
this.updateItems(activeArr);
},
handleItemTap: function handleItemTap(key) {
var activeArr = this.data.activeArr;
if (this.props.accordion) {
if (activeArr.indexOf(key) === -1) {
this.updateItems([key]);
} else {
this.updateItems([]);
}
} else {
var index = activeArr.indexOf(key);
if (index !== -1) {
activeArr.splice(index, 1);
} else {
activeArr.push(key);
}
this.updateItems(activeArr);
}
},
updateItems: function updateItems(activeArr) {
var _this = this;
var collapseKey = this.props.collapseKey;
this.setData({
activeArr: activeArr
});
this.props.onChange(activeArr);
this.$page[collapsePrefix("updates-" + collapseKey)].forEach(function (update) {
if (typeof update === 'function') {
update({
activeKey: _this.data.activeArr
});
}
});
}
}
});

3
node_modules/mini-antui/es/collapse/index.json generated vendored Normal file
View File

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

8
node_modules/mini-antui/es/face-detection/index.axml generated vendored Normal file
View File

@ -0,0 +1,8 @@
<web-view
a:if="{{appName && serviceName}}"
src="https://render.alipay.com/p/s/tiny-webar-online/www/faceDetect.html?facing={{facing}}&appName={{appName}}&serviceName={{serviceName}}&useLiveFaceCheck={{useLiveFaceCheck}}&resignSuccessBtnText={{btnText}}"
id="am-face-detection"
onMessage="onMessage"
enableWK="{{false}}"
/>
<view a:else style="color: red; text-align: center; font-size: 14px; padding: 10px">appName and serviceName is required</view>

130
node_modules/mini-antui/es/face-detection/index.js generated vendored Normal file
View File

@ -0,0 +1,130 @@
Component({
props: {
facing: 'front',
appName: '',
serviceName: '',
useLiveFaceCheck: false,
minRotate: -1
},
didMount: function didMount() {
this.webViewContext = my.createWebViewContext('am-face-detection');
this.doFaceLeftResolve = null;
this.isDidFaceLeftResolve = false;
this.doFaceRightResolve = null;
this.isDidFaceRightResolve = false;
},
didUnMount: function didUnMount() {
this.webViewContext.postMessage({
action: 'releaseCamera'
});
},
methods: {
doLeftFaceCheck: function doLeftFaceCheck() {
var _this = this;
return new Promise(function (resolve, reject) {
_this.isDidFaceLeftResolve = false;
_this.webViewContext.postMessage({
action: 'doFaceLeft',
data: {
minRotate: _this.props.minRotate
}
});
_this.doFaceLeftResolve = resolve;
setTimeout(function () {
if (!_this.isDidFaceLeftResolve) {
reject();
}
}, 30000);
});
},
doRightFaceCheck: function doRightFaceCheck() {
var _this2 = this;
return new Promise(function (resolve, reject) {
_this2.isDidFaceRightResolve = false;
_this2.webViewContext.postMessage({
action: 'doFaceRight',
data: {
minRotate: _this2.props.minRotate
}
});
_this2.doFaceRightResolve = resolve;
setTimeout(function () {
if (!_this2.isDidFaceRightResolve) {
reject();
}
}, 30000);
});
},
onMessage: function onMessage(e) {
var _this3 = this;
var _this$props = this.props,
onFaceStatusChange = _this$props.onFaceStatusChange,
onFail = _this$props.onFail,
onSuccessBtnTap = _this$props.onSuccessBtnTap;
var _e$detail = e.detail,
action = _e$detail.action,
data = _e$detail.data;
if (action === 'resignSuccessBtnClick') {
if (onSuccessBtnTap) {
onSuccessBtnTap();
}
}
if (action === 'faceRotated' && data.forward === 'left') {
this.isDidFaceLeftResolve = true;
this.doFaceLeftResolve(data.imageBase64);
return;
}
if (action === 'faceRotated' && data.forward === 'right') {
this.isDidFaceRightResolve = true;
this.doFaceRightResolve(data.imageBase64);
return;
}
if (action === 'captureImage') {
if (onFaceStatusChange) {
var promise = onFaceStatusChange({
imageBase64: data.imageBase64,
faceRect: data.faceRect
}, {
doLeftFaceCheck: this.doLeftFaceCheck.bind(this),
doRightFaceCheck: this.doRightFaceCheck.bind(this)
});
if (promise instanceof Promise) {
promise.then(function () {
_this3.webViewContext.postMessage({
action: 'requestSuccess'
});
})["catch"](function () {
_this3.webViewContext.postMessage({
action: 'requestFailure'
});
});
} else {
this.webViewContext.postMessage({
action: 'requestSuccess'
});
}
}
} else {
/* eslint-disable */
if (onFail) {
onFail({
code: data.code,
message: data.message
});
}
}
}
}
});

3
node_modules/mini-antui/es/face-detection/index.json generated vendored Normal file
View File

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

View File

@ -0,0 +1 @@
.am-filter-item-wrap{padding:7px 6px;min-width:33.3%;max-width:180px;overflow:hidden;float:left;display:list-item;box-sizing:border-box}.am-filter-item{font-size:14px;height:36px;line-height:36px;background:#f5f5f5;border-radius:2px;text-align:center;padding:0 20px;box-sizing:border-box}.am-filter-click{color:#108ee9;background:#e1f2fe url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAfCAYAAACLSL/LAAAEgElEQVRYhc2Xa0wcVRTH/2cXdi2F0pe29RWMNbHBpLWf2qQmWqma4Ftj1ZBqfcQYjUmlobESP2hDfTT9ILGaaEEECQ0qjy5uNgUDRGiatsG0JNpStaAujy6wsO+d2Xv8MDN3ZhekSHndZLObe+fO/Oac//nfs8TMWEyj3SvS3jnuLU5baBDrqL+kZO1p8JZf9sWeWjRgpWeit773o7fJH1HvAoBFAbbHM7rlSOeoK64kVhlzCwp2sl9QSYtvl+vXQBnANuvagoGd6FMdha7Bg+e90bdBABgAEUAABIMWoioru2PLi9xDNQPjyoMAAIOBWf6e94h90BFa/1Grzx2KifU6TfIFRADmGezFRv99VV3jjQnBmRKCoaXPGHrU5gWsY1DQfrfv9fbLkc/kpKErKxCg64zmHqz+kurc6/GV/u6Lv6pFyALALFOn0+mwcyz+I13R1cXNI3WjEXWb8dwkoUseAYD0b8xtKvf+FNxQemrsRFwVN0kRUWoQjAhKv5ArcwL2eK0/v/Fi+HtmdspUTZZCZg3IWgT6dbbJbjzT0dInbHcf9e1ruBh2MeBM0g+R/uSJn5wVaViXaTevI5o9sOrflIxdx4erfhlSPpQZMTJHeqpInySzJDetc+Dky2uxeqk96X6zksqDp6JrSzrGm4IxsTkZRE8RA6bOIFN5/21O1O28HllOm/kC+to1g73iCW/6+lzQk0iIG7SHUnLFGSPFKp7PXYLyx1bBYScMBBIYDCd0drr2qry3xv9MW2+sGiC7WVl6ytgSIcOf9AgWbsnEJ3nZICL0janI+2YIQyHTw2asMdefqv2Oo/4DbX8px0BklzoGmYZpzFm6BgLj8APZOLRjOYgIPcMK7ikfRM+IKkU/47Pyi24ls7gt+O1wWH1UEsgUWUAAXS/aT4edUPHICjybmwEA6B6KY0flFQyEdFOVkdbf7/84f9HP0Vs+PRPyxFTeICf1/SXbMlCQex0AoOJ8BO93BKEktLVl6UDd0yuxPccJADjtjeOh6isYiZhtjqlLbW7aYE82BLfW98TcDM5OhtJe08ZARX4mCnKXAADODigoaPRjLCrg3rkSG9ekAwDa+2J4uGYYgbgw9yfBaVqbFtjmqrHdXQPKV5jMkOVNARsYFfnLZOQiCmM0KnBjluZRnj+ieKJ2GBHVstey31rNU4Idu6CmF7YGDv0TSLx1VXrjKGFGRX6WjJwxfrgQwXN1o4iLVAhLNcr5Kezi47Ox7AOdoe8CMZF3VSgJBwgivNAUAAAJV9kdwW6XHwlhORKsp4O1N5uqKl9rjtxedi7crArOmTaU4fYMCEDCBeKMNzzjYCbT07QNgEhpX4nl8oRU5tWOb2/pUxrBvHTaUMZIqTCbDmn2WfiPFBpFIK2jX4rZ3SvozrKxN1t6480zggKSTZIIwnpoG3/NpBnD7DisZysRQLZWYmZ82a049rcHPveFxUszAkodk3apk3gWW6Jlin8ETtqY9m5nfM3h04G6qMJbZwUKmNgMSj6yCD2130c/QK1woAj7bv77X8e4TyVCc9zHAAAAAElFTkSuQmCC) right bottom no-repeat;background-size:17px 13px}

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