commit 46e7704960d4c64958052e85a7cce1213563c1ca Author: lipenggao Date: Wed Nov 22 11:35:23 2023 +0800 临时提交,暂停开发 diff --git a/.kaitian/settings.json b/.kaitian/settings.json new file mode 100644 index 0000000..0a77011 --- /dev/null +++ b/.kaitian/settings.json @@ -0,0 +1,3 @@ +{ + "editor.tabSize": 2 +} \ No newline at end of file diff --git a/.tea/entryFiles-development/config$.js b/.tea/entryFiles-development/config$.js new file mode 100644 index 0000000..ee892d4 --- /dev/null +++ b/.tea/entryFiles-development/config$.js @@ -0,0 +1,7 @@ + +const g = typeof global !== 'undefined' ? global : self; +g.appXAppJson = { + "app": { + "$homepage": "pages/index/index" + } +}; diff --git a/.tea/entryFiles-development/importScripts$.js b/.tea/entryFiles-development/importScripts$.js new file mode 100644 index 0000000..5e02d03 --- /dev/null +++ b/.tea/entryFiles-development/importScripts$.js @@ -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'); + } + \ No newline at end of file diff --git a/.tea/entryFiles-development/index$.web.js b/.tea/entryFiles-development/index$.web.js new file mode 100644 index 0000000..4de132d --- /dev/null +++ b/.tea/entryFiles-development/index$.web.js @@ -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'); diff --git a/.tea/entryFiles-development/index$.worker.js b/.tea/entryFiles-development/index$.worker.js new file mode 100644 index 0000000..5eedbb6 --- /dev/null +++ b/.tea/entryFiles-development/index$.worker.js @@ -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(); +} \ No newline at end of file diff --git a/.tea/entryFiles-production/config$.js b/.tea/entryFiles-production/config$.js new file mode 100644 index 0000000..ee892d4 --- /dev/null +++ b/.tea/entryFiles-production/config$.js @@ -0,0 +1,7 @@ + +const g = typeof global !== 'undefined' ? global : self; +g.appXAppJson = { + "app": { + "$homepage": "pages/index/index" + } +}; diff --git a/.tea/entryFiles-production/importScripts$.js b/.tea/entryFiles-production/importScripts$.js new file mode 100644 index 0000000..8b9b3af --- /dev/null +++ b/.tea/entryFiles-production/importScripts$.js @@ -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`); diff --git a/.tea/entryFiles-production/index$.web.js b/.tea/entryFiles-production/index$.web.js new file mode 100644 index 0000000..0596c63 --- /dev/null +++ b/.tea/entryFiles-production/index$.web.js @@ -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'); diff --git a/.tea/entryFiles-production/index$.worker.js b/.tea/entryFiles-production/index$.worker.js new file mode 100644 index 0000000..67d01c3 --- /dev/null +++ b/.tea/entryFiles-production/index$.worker.js @@ -0,0 +1,57 @@ +/**! __BUGME_START__ */ !function(){"use strict";var e,n,t,o,r,a,i,c,s,u;!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(e||(e={})),function(e){e.GetPagesData="Tiny.Data.getPageData",e.SetPageData="Tiny.Data.setPageData"}(n||(n={})),function(e){e.DataChanged="Tiny.Data.dataChanged"}(t||(t={})),function(e){e.GetStorageInfo="Tiny.Storage.getStorageInfo",e.ClearStorage="Tiny.Storage.clearStorage",e.RemoveStorage="Tiny.Storage.removeStorage",e.SetStorage="Tiny.Storage.setStorage"}(o||(o={})),function(e){e.StorageChanged="Tiny.Storage.storageChanged"}(r||(r={})),function(e){e.Enable="MiniAppLog.enable"}(a||(a={})),function(e){e.ApiSyncCall="MiniAppLog.onApiSyncCall",e.ApiSyncCallback="MiniAppLog.onApiSyncCallback",e.ApiCall="MiniAppLog.onApiCall",e.ApiCallback="MiniAppLog.onApiCallback",e.SetData="MiniAppLog.onSetData",e.SetDataCallback="MiniAppLog.onSetDataCallback",e.ShareAppMessage="MiniAppLog.onShareAppMessage"}(i||(i={})),function(e){e.consoleAPICalled="Runtime.consoleAPICalled",e.executionContextDestroyed="Runtime.executionContextDestroyed",e.executionContextsCleared="Runtime.executionContextsCleared",e.executionContextCreated="Runtime.executionContextCreated"}(c||(c={})),function(e){e.RequestWillBeSent="Network.requestWillBeSent",e.ResponseReceived="Network.responseReceived",e.LoadingFinished="Network.loadingFinished",e.LoadingFailed="Networkw.loadingFailed",e.GetResponseBody="Network.getResponseBody"}(s||(s={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(u||(u={}));var l=self,g="\\x"+("0"+"~".charCodeAt(0).toString(16)).slice(-2),p="\\"+g,f=new RegExp(g,"g"),d=new RegExp(p,"g"),y=new RegExp("(?:^|([^\\\\]))"+p),h=[].indexOf||function(e){for(var n=this.length;n--&&this[n]!==e;);return n},C=String;function m(e,n,t){return n instanceof Array?function(e,n,t){for(var o=0,r=n.length;otext{ + color:#CDCDCD; + font-size:32rpx; +} diff --git a/components/myEmpty/myEmpty.axml b/components/myEmpty/myEmpty.axml new file mode 100644 index 0000000..8d46f71 --- /dev/null +++ b/components/myEmpty/myEmpty.axml @@ -0,0 +1,8 @@ + + + + + + {{tipsName}} + + \ No newline at end of file diff --git a/components/myEmpty/myEmpty.js b/components/myEmpty/myEmpty.js new file mode 100644 index 0000000..745e70b --- /dev/null +++ b/components/myEmpty/myEmpty.js @@ -0,0 +1,15 @@ + +import { imageBasUrl } from '../../utils/config' + +Component({ + mixins: [], + data: {}, + props: { + emptyImageSrc: `${imageBasUrl}/iamge/no-data.png`, + tipsName: '暂无数据' + }, + didMount() { }, + didUpdate() { }, + didUnmount() { }, + methods: {}, +}); \ No newline at end of file diff --git a/components/myEmpty/myEmpty.json b/components/myEmpty/myEmpty.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/myEmpty/myEmpty.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/myFooter/myFooter.acss b/components/myFooter/myFooter.acss new file mode 100644 index 0000000..9de5d89 --- /dev/null +++ b/components/myFooter/myFooter.acss @@ -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; +} \ No newline at end of file diff --git a/components/myFooter/myFooter.axml b/components/myFooter/myFooter.axml new file mode 100644 index 0000000..35d336a --- /dev/null +++ b/components/myFooter/myFooter.axml @@ -0,0 +1,5 @@ + + + {{footerName}} + + \ No newline at end of file diff --git a/components/myFooter/myFooter.js b/components/myFooter/myFooter.js new file mode 100644 index 0000000..702c457 --- /dev/null +++ b/components/myFooter/myFooter.js @@ -0,0 +1,11 @@ +Component({ + mixins: [], + data: {}, + props: { + footerName: '没有更多了~' + }, + didMount() { }, + didUpdate() { }, + didUnmount() { }, + methods: {}, +}); \ No newline at end of file diff --git a/components/myFooter/myFooter.json b/components/myFooter/myFooter.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/myFooter/myFooter.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/myPay/myPay.acss b/components/myPay/myPay.acss new file mode 100644 index 0000000..62915f0 --- /dev/null +++ b/components/myPay/myPay.acss @@ -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; +} \ No newline at end of file diff --git a/components/myPay/myPay.axml b/components/myPay/myPay.axml new file mode 100644 index 0000000..74b0535 --- /dev/null +++ b/components/myPay/myPay.axml @@ -0,0 +1,84 @@ + + + + + 创作不易,支持作者 + + + + + + + + + + + + + + + 支付宝\微信支付 + + + + 我的K币:{{0}}K币 + + + + + + 请选择充值金额 + + + 购买须知 + + + + + + + + + + + + 199.9元 + + + 37621K币 + + + 多送20元K币 + + + + + + + + + + + + + + + + {{backInfo.price || 0}} + + {{ backInfo.zbegold || 0 }} + + + + + {{ backInfo.egold || 0 }} + K币 + + + + + + + + + \ No newline at end of file diff --git a/components/myPay/myPay.js b/components/myPay/myPay.js new file mode 100644 index 0000000..181e397 --- /dev/null +++ b/components/myPay/myPay.js @@ -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' + }) + } + }, +}); \ No newline at end of file diff --git a/components/myPay/myPay.json b/components/myPay/myPay.json new file mode 100644 index 0000000..2e98440 --- /dev/null +++ b/components/myPay/myPay.json @@ -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" + } +} \ No newline at end of file diff --git a/components/pursueItem/pursueItem.acss b/components/pursueItem/pursueItem.acss new file mode 100644 index 0000000..a8fbf27 --- /dev/null +++ b/components/pursueItem/pursueItem.acss @@ -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; +} \ No newline at end of file diff --git a/components/pursueItem/pursueItem.axml b/components/pursueItem/pursueItem.axml new file mode 100644 index 0000000..0343608 --- /dev/null +++ b/components/pursueItem/pursueItem.axml @@ -0,0 +1,20 @@ + + + + + + + + + + + + {{rowData.name}} + + + + 观看至 {{ rowData.history }} 集 + + + + \ No newline at end of file diff --git a/components/pursueItem/pursueItem.js b/components/pursueItem/pursueItem.js new file mode 100644 index 0000000..d317f27 --- /dev/null +++ b/components/pursueItem/pursueItem.js @@ -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); + } + }, +}); \ No newline at end of file diff --git a/components/pursueItem/pursueItem.json b/components/pursueItem/pursueItem.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/pursueItem/pursueItem.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/global.acss b/global.acss new file mode 100644 index 0000000..04b3e34 --- /dev/null +++ b/global.acss @@ -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; +} \ No newline at end of file diff --git a/mini.project.json b/mini.project.json new file mode 100644 index 0000000..826543e --- /dev/null +++ b/mini.project.json @@ -0,0 +1,3 @@ +{ + "compileType": "jsonschema" +} \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..962590d --- /dev/null +++ b/node_modules/.yarn-integrity @@ -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": {} +} \ No newline at end of file diff --git a/node_modules/@tbmp/mp-cloud-sdk/index.js b/node_modules/@tbmp/mp-cloud-sdk/index.js new file mode 100644 index 0000000..df2ace3 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/index.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.cloud={})}(this,function(e){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};function t(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;rs[0]&&t[1]>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(i=0;i>>2]=r[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return(e/4294967296+.5)*(.5>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},s=i.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},c=i.Utf8={stringify:function(e){try{return decodeURIComponent(escape(s.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return s.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,r=t.words,n=t.sigBytes,o=this.blockSize,i=n/(4*o),a=(i=e?u.ceil(i):u.max((0|i)-this._minBufferSize,0))*o,e=u.min(4*a,n);if(a){for(var s=0;s>>7)^(p<<14|p>>>18)^p>>>3;var f=x[d-2];var v=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;x[d]=h+x[d-7]+v+x[d-16]}var y=s&c^~s&u;var m=n&o^n&i^o&i;var g=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22);var b=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25);var w=l+b+y+A[d]+x[d];var _=g+m;l=u;u=c;c=s;s=a+w|0;a=i;i=o;o=n;n=w+_|0}r[0]=r[0]+n|0;r[1]=r[1]+o|0;r[2]=r[2]+i|0;r[3]=r[3]+a|0;r[4]=r[4]+s|0;r[5]=r[5]+c|0;r[6]=r[6]+u|0;r[7]=r[7]+l|0},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;t[(n+64>>>9<<4)+14]=o.floor(r/4294967296);t[(n+64>>>9<<4)+15]=r;e.sigBytes=t.length*4;this._process();return this._hash},clone:function(){var e=i.clone.call(this);e._hash=this._hash.clone();return e}});return t.SHA256=i._createHelper(p),t.HmacSHA256=i._createHmacHelper(p),e.SHA256}(l)}),i(function(e,t){var r,s;e.exports=(r=(e=l).lib.Base,s=e.enc.Utf8,void(e.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));for(var r=e.blockSize,n=4*r,e=((t=t.sigBytes>n?e.finalize(t):t).clamp(),this._oKey=t.clone()),t=this._iKey=t.clone(),o=e.words,i=t.words,a=0;a>>6-s%4*2,i[a>>>2]|=(n|o)<<24-a%4*8,a++);return c.create(i,a)}var c;e.exports=(c=(e=l).lib.WordArray,e.enc.Base64={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=this._map,o=(e.clamp(),[]),i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map;if(!(n=this._reverseMap))for(var n=this._reverseMap=[],o=0;o>>24)&16711935|(o<<24|o>>>8)&4278255360}var i=this._hash.words;var a=e[t+0];var s=e[t+1];var c=e[t+2];var u=e[t+3];var l=e[t+4];var d=e[t+5];var p=e[t+6];var h=e[t+7];var f=e[t+8];var v=e[t+9];var y=e[t+10];var m=e[t+11];var g=e[t+12];var b=e[t+13];var w=e[t+14];var _=e[t+15];var A=i[0];var x=i[1];var q=i[2];var S=i[3];A=M(A,x,q,S,a,7,R[0]);S=M(S,A,x,q,s,12,R[1]);q=M(q,S,A,x,c,17,R[2]);x=M(x,q,S,A,u,22,R[3]);A=M(A,x,q,S,l,7,R[4]);S=M(S,A,x,q,d,12,R[5]);q=M(q,S,A,x,p,17,R[6]);x=M(x,q,S,A,h,22,R[7]);A=M(A,x,q,S,f,7,R[8]);S=M(S,A,x,q,v,12,R[9]);q=M(q,S,A,x,y,17,R[10]);x=M(x,q,S,A,m,22,R[11]);A=M(A,x,q,S,g,7,R[12]);S=M(S,A,x,q,b,12,R[13]);q=M(q,S,A,x,w,17,R[14]);x=M(x,q,S,A,_,22,R[15]);A=O(A,x,q,S,s,5,R[16]);S=O(S,A,x,q,p,9,R[17]);q=O(q,S,A,x,m,14,R[18]);x=O(x,q,S,A,a,20,R[19]);A=O(A,x,q,S,d,5,R[20]);S=O(S,A,x,q,y,9,R[21]);q=O(q,S,A,x,_,14,R[22]);x=O(x,q,S,A,l,20,R[23]);A=O(A,x,q,S,v,5,R[24]);S=O(S,A,x,q,w,9,R[25]);q=O(q,S,A,x,u,14,R[26]);x=O(x,q,S,A,f,20,R[27]);A=O(A,x,q,S,b,5,R[28]);S=O(S,A,x,q,c,9,R[29]);q=O(q,S,A,x,h,14,R[30]);x=O(x,q,S,A,g,20,R[31]);A=I(A,x,q,S,d,4,R[32]);S=I(S,A,x,q,f,11,R[33]);q=I(q,S,A,x,m,16,R[34]);x=I(x,q,S,A,w,23,R[35]);A=I(A,x,q,S,s,4,R[36]);S=I(S,A,x,q,l,11,R[37]);q=I(q,S,A,x,h,16,R[38]);x=I(x,q,S,A,y,23,R[39]);A=I(A,x,q,S,b,4,R[40]);S=I(S,A,x,q,a,11,R[41]);q=I(q,S,A,x,u,16,R[42]);x=I(x,q,S,A,p,23,R[43]);A=I(A,x,q,S,v,4,R[44]);S=I(S,A,x,q,g,11,R[45]);q=I(q,S,A,x,_,16,R[46]);x=I(x,q,S,A,c,23,R[47]);A=E(A,x,q,S,a,6,R[48]);S=E(S,A,x,q,h,10,R[49]);q=E(q,S,A,x,w,15,R[50]);x=E(x,q,S,A,d,21,R[51]);A=E(A,x,q,S,g,6,R[52]);S=E(S,A,x,q,u,10,R[53]);q=E(q,S,A,x,y,15,R[54]);x=E(x,q,S,A,s,21,R[55]);A=E(A,x,q,S,f,6,R[56]);S=E(S,A,x,q,_,10,R[57]);q=E(q,S,A,x,p,15,R[58]);x=E(x,q,S,A,b,21,R[59]);A=E(A,x,q,S,l,6,R[60]);S=E(S,A,x,q,m,10,R[61]);q=E(q,S,A,x,c,15,R[62]);x=E(x,q,S,A,v,21,R[63]);i[0]=i[0]+A|0;i[1]=i[1]+x|0;i[2]=i[2]+q|0;i[3]=i[3]+S|0},_doFinalize:function(){var e=this._data;var t=e.words;var r=this._nDataBytes*8;var n=e.sigBytes*8;t[n>>>5]|=128<<24-n%32;var o=l.floor(r/4294967296);var i=r;t[(n+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;t[(n+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360;e.sigBytes=(t.length+1)*4;this._process();var a=this._hash;var s=a.words;for(var c=0;c<4;c++){var u=s[c];s[c]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return a},clone:function(){var e=o.clone.call(this);e._hash=this._hash.clone();return e}});function M(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+o+a;return(s<>>32-i)+t}function O(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+o+a;return(s<>>32-i)+t}function I(e,t,r,n,o,i,a){var s=e+(t^r^n)+o+a;return(s<>>32-i)+t}function E(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+o+a;return(s<>>32-i)+t}return t.MD5=o._createHelper(s),t.HmacMD5=o._createHmacHelper(s),e.MD5}(l)}),C=((D=u=u||{})[D.MTOP=1]="MTOP",D[D.MY=2]="MY",D[D.GATEWAY=3]="GATEWAY",t(p,a=Error),p);function p(){return null!==a&&a.apply(this,arguments)||this}function G(e){this.options=e||{},this.options.dataProxyGatewayUrl=this.options.dataProxyGatewayUrl||this.options.gatewayUrl}f.prototype.init=function(t,r){return c(this,void 0,void 0,function(){return m(this,function(e){return this.options=d({},t),this.proxy=r,this.tasks=[],this.inited=!0,[2]})})},f.getRequestType=function(e){return 0===e.indexOf("mtop.")?u.MTOP:0===e.indexOf("my.")?u.MY:u.GATEWAY},f.prototype.verifyResponse=function(t,r,n){return c(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:if(g(n,"mc-code")||g(t,"errCode")||g(t,"error_response.code"),r.__is_retry_task__)return this.tryThrowError(t,n),[2,t];e.label=1;case 1:return e.trys.push([1,3,,4]),this.tryThrowError(t,n),[2,t];case 2:return[2,e.sent()];case 3:throw e.sent();case 4:return[2]}})})},f.prototype.tryThrowError=function(e,t){var r=g(t,"mc-msg")||g(e,"errMsg")||g(e,"error_response.msg"),t=g(t,"mc-code")||g(e,"errCode")||g(e,"error_response.code");if(t&&"200"!=t)throw(e=new C(t+":::"+r)).code=t,e.msg=r,e},f.prototype.sendGatewayRequest=function(r){return c(this,void 0,void 0,function(){var t;return m(this,function(e){switch(e.label){case 0:return r=this.createGatewayRequest(r),[4,this.proxy.apply(d({},r),u.GATEWAY)];case 1:return t=e.sent(),[4,this.verifyResponse(g(t,"data"),r,g(t,"headers"))];case 2:return[2,e.sent()]}})})},f.prototype.exec=function(t,r){return c(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:if(r=r||f.getRequestType(t.url),this.inited)return t.data=t.data||{},r!==u.GATEWAY?[3,2]:[4,this.sendGatewayRequest(t)];throw new Error("请先调用cloud.init()");case 1:return[2,e.sent()];case 2:return[4,this.proxy.apply(t,r)];case 3:return[2,e.sent()]}})})},f.prototype.getHttpRequestSign=function(e,t,r,n,o){if(this.options.signSecret)return o=o,delete n["mc-sign"],t=t+"\n"+s.stringify(H(o))+"\napplication/json\n"+Object.keys(n).filter(function(e){return/^mc-/.test(e)}).sort().map(function(e){return e.toLowerCase()+":"+n[e]}).join("\n")+"\n"+e+(r?"?"+r:""),s.stringify(j(t,this.options.signSecret))},f.prototype.createGatewayRequest=function(e){var t=this.options,r=t.sessionKey,n=t.appKey,o=t.requestId,i=t.miniappId,a=t.openId,s=t.unionId,c=t.cloudId,t=t.sdkVersion,r=(e.method="POST",d(d({},e.headers),{"Content-Type":"application/json","mc-timestamp":""+Date.now(),"mc-session":r})),a=(a&&(r["mc-open-id"]=a),c&&(r["mc-cloud-id"]=c),s&&(r["mc-union-id"]=s),n&&(r["mc-appKey"]=n),i&&(r["mc-miniapp-id"]=i),o&&(r["mc-request-id"]=o),t&&(r["mc-sdk-version"]=t),e.env&&(r["mc-env"]=e.env),r["mc-session"]||delete r["mc-session"],e.rawData=e.rawData||e.data,"object"==typeof e.data&&(e.data=JSON.stringify(e.data)),this.getHttpRequestSign(e.url,e.method,"",r,e.data));return d(d({},e),{url:""+e.url,headers:d(d({},r),{sign:a,"eagleeye-traceid":o})})};var h=f;function f(){this.inited=!1}function v(e,t){this.request=t,this.options=e}new h;t(b,y=v),b.prototype.invoke=function(t,r,n,o){return void 0===n&&(n="main"),c(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.fcRequest({fcName:t,handler:n,data:r,options:Object.assign(o||{},this.options)})];case 1:return[2,e.sent()]}})})},b.prototype.fcRequest=function(t){return c(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.request.exec({env:this.options.env||"online",url:"fc",data:t},u.GATEWAY)];case 1:return[2,e.sent()]}})})},r([o()],b.prototype,"invoke",null);var y,U=b;function b(){return null!==y&&y.apply(this,arguments)||this}var w,z="1.5.5",N="mtop.taobao.miniapp.cloud.store.config.get",F="mtop.taobao.miniapp.cloud.store.config.v2.seller.get",W="mtop.taobao.miniapp.cloud.store.file.save",Y="mtop.taobao.miniapp.cloud.store.file.v2.seller.save",K="mtop.taobao.miniapp.cloud.store.file.delete",J="mtop.taobao.miniapp.cloud.store.file.v2.seller.delete",L="mtop.taobao.miniapp.cloud.store.file.list",V="mtop.taobao.miniapp.cloud.store.file.v2.seller.list",X="other",$=(t(_,w=v),_.prototype.parseUploadResult=function(e,t,r){return this.parsePostUploadResult(e,t,r)},_.prototype.parsePostUploadResult=function(e,t,r){var n;if(t.data)if(r)try{var o=(s=JSON.parse(t.data)).fileId,i=s.url,a=s.message}catch(e){console.log(e)}else try{var s=JSON.parse(t.data);switch(e){case"image":case"font":o=s.jsonData.fileId,i=s.jsonData.url,a=s.errorMessage;break;case"video":o=s.fileId,n=s.videoId,i=s.url,a=s.message;break;case"audio":o=s.fileId,n=s.videoId,i=s.url,a=s.message}}catch(e){}return{imageUrl:i,specialId:o,message:a,videoId:n}},_.prototype.uploadFile=function(y){return c(this,void 0,void 0,function(){var n,o,i,a,s,c,u,l,d,p,h,f,v;return m(this,function(e){switch(e.label){case 0:n=y.filePath,o=y.fileType,o=void 0===o?X:o,i=y.fileName,i=void 0===i?"miniappfile":i,a=y.seller,a=void 0!==a&&a,s=y.dirId,e.label=1;case 1:return e.trys.push([1,3,,4]),u=a?F:N,[4,this.storageRequest(u,{newContainer:!0,cloudPath:i,fileType:o,sellerSpace:a,dirId:s})];case 2:return c=e.sent(),[3,4];case 3:throw u=e.sent(),new Error("获取配置错误"+(u.message||u.toString()));case 4:return l=g(c,["data","model",o],{}),p=l.url,p=void 0===p?"":p,d=l.formData,d=void 0===d?null:d,l=l.headers,(p={url:p,fileType:o,header:void 0===l?null:l,formData:d,filePath:n,fileName:"file"}).formData=p.formData||{},p.header&&p.header.Authorization&&(p.formData.Authorization=p.header.Authorization),i&&(p.formData.localFileName=Date.now()+"-"+((t=i)?0<=(r=t.lastIndexOf("/"))?t.substr(r+1):t:"file")),p.header?"image"!==o&&(p.header.origin=p.header.origin||"https://miniapp-cloud.taobao.com",p.header.referer=p.header.referer||"https://miniapp-cloud.taobao.com"):delete p.header,[4,this.storageRequest("my.uploadFile",p)];case 5:if(l=e.sent(),console.log(l),d=this.parseUploadResult(o,l,a),p=d.imageUrl,f=d.specialId,h=d.message,v=d.videoId,(f={fileType:o,specialId:f||g(c,["data","model",o,"formData","key"],""),videoId:v,url:p,cloudPath:i,sellerSpace:a}).specialId)return[4,this.storageRequest(a?Y:W,f)];throw new Error(h||"上传文件失败");case 6:if(g(v=e.sent(),"data.model.fileId"))return[2,g(v,"data.model")];throw new Error(g(v,["result","msgInfo"],"上传文件失败"))}var t,r})})},_.prototype.deleteFile=function(o){return c(this,void 0,void 0,function(){var t,r,n;return m(this,function(e){switch(e.label){case 0:if(r=o.fileId,n=o.fileType,n=void 0===n?X:n,t=o.seller,t=void 0!==t&&t,r=Array.isArray(r)?r:[r],t)throw new Error("商家空间资源不允许使用接口删除");return r=JSON.stringify(r),[4,this.storageRequest(t?J:K,{fileType:n,fileIds:r,sellerSpace:t})];case 1:if(g(n=e.sent(),["data","model"]))return[2,!0];throw new Error(g(n,["data","msgInfo"]))}})})},_.prototype.getTempFileURL=function(n){return c(this,void 0,void 0,function(){var t,r;return m(this,function(e){switch(e.label){case 0:if(t=n.fileId,r=n.seller,r=void 0!==r&&r,t)return t=Array.isArray(t)?t:[t],t=JSON.stringify(t),[4,this.storageRequest(r?V:L,{fileIds:t,sellerSpace:r})];throw new Error("缺少fileId,请检查参数");case 1:if(t=e.sent(),r=g(t,["data","model"]))return[2,r];throw new Error(g(t,["data","msgInfo"]))}})})},_.prototype.downloadByFileId=function(s){return c(this,void 0,void 0,function(){var t,r,n,o,i,a;return m(this,function(e){switch(e.label){case 0:if(r=s.fileId,t=s.cache,r)return r=Array.isArray(r)?r:[r],[4,this.storageRequest(L,{fileIds:JSON.stringify(r)})];throw new Error("缺少fileId,请检查参数");case 1:r=e.sent(),n=g(r,["data","model"])||[],o=[],i=0,e.label=2;case 2:return i; + /** + * 获取集合中复合条件的记录数量 + * @param filter 过滤条件 + */ + count(filter: object): Promise; + /** + * 删除集合中的一批记录 + * @param filter 过滤条件 + */ + deleteMany(filter: object): Promise; + /** + * 查找集合中符合条件的所有记录 + * @param filter 过滤条件 + * @param options 查询配置项 + */ + find(filter: any, options?: IFindOptions): Promise; + /** + * 替换一条数据 + * @param filter 过滤条件 + * @param data 新数据 + */ + replaceOne(filter: object, data: object): Promise; + /** + * 在集合中添加一条记录 + * @param data 带插入的数据 + */ + insertOne(data: object): Promise; + /** + * 在集合中添加一批记录 + * @param data 待插入的数据,只能为数组 + */ + insertMany(data: object[]): Promise; + /** + * + * @param filter 过滤条件 + * @param data 更新规则 + * + */ + updateMany(filter: object, data: object): Promise; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts new file mode 100644 index 0000000..de2be28 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/db/db.d.ts @@ -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; + dbRequest(action?: string, params?: any): Promise; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/db/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/db/index.d.ts new file mode 100644 index 0000000..0aa55ff --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/db/index.d.ts @@ -0,0 +1,2 @@ +import { Db } from "./db"; +export default Db; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/db/util.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/db/util.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/functions/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/functions/index.d.ts new file mode 100644 index 0000000..cb0d92e --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/functions/index.d.ts @@ -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; + private fcRequest; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/interface/cloudService.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/interface/cloudService.d.ts new file mode 100644 index 0000000..0b93956 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/interface/cloudService.d.ts @@ -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; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/message/client.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/client.d.ts new file mode 100644 index 0000000..ba7bd4c --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/client.d.ts @@ -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; + onMessage: (callback: any) => Promise<() => void>; + private createPwgInstance; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/message/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/index.d.ts new file mode 100644 index 0000000..d113772 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/index.d.ts @@ -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); +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/message/server.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/server.d.ts new file mode 100644 index 0000000..b292739 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/message/server.d.ts @@ -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; +} +export {}; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/application.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/application.d.ts new file mode 100644 index 0000000..3daff9d --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/application.d.ts @@ -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; + +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/process.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/process.d.ts new file mode 100644 index 0000000..55dd23b --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/process.d.ts @@ -0,0 +1,7 @@ +import {ICloudService} from "../../interface/cloudService"; + +export default class Process extends ICloudService { + invoke(options: { api: string, data?: any, headers?: any }): Promise; + + private topRequest; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/qimen.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/qimen.d.ts new file mode 100644 index 0000000..7cc9966 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/qimen.d.ts @@ -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; + + private topRequest; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/top.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/top.d.ts new file mode 100644 index 0000000..ac95cd8 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/client/top.d.ts @@ -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; + + private topRequest; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/process.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/process.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/qimen.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/qimen.d.ts new file mode 100644 index 0000000..285dd68 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/qimen.d.ts @@ -0,0 +1,5 @@ +import {ICloudService} from "../../interface/cloudService"; + +export default class Qimen extends ICloudService { + invoke(apiName: string, data?: any, httpHeaders?: any): Promise; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/top.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/top.d.ts new file mode 100644 index 0000000..6a7fb7e --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/openApi/server/top.d.ts @@ -0,0 +1,4 @@ +import {ICloudService} from "../../interface/cloudService"; +export default class Top extends ICloudService{ + invoke(apiName: string, data?: any, httpHeaders?: any): Promise; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/core/storage/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/core/storage/index.d.ts new file mode 100644 index 0000000..c5adbc9 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/core/storage/index.d.ts @@ -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; + /** + * 删除文件 + * @param options + */ + deleteFile(options: IDeleteFileOptions): Promise; + /** + * 根据文件id(cloud://)获取授权的url + * @param options + */ + getTempFileURL(options: IAsyncInvokeOptions & { + fileType: string; + fileId: string | string[]; + }): Promise; + + /** + * 从服务端获取文件并在本地读取 + * @param options + */ + readRemoteFile(options: IAsyncInvokeOptions & { + url: string; + }): Promise; + /** + * 存储的请求代理, 统一sdk环境和存储环境 + * @param action + * @param data + * @param requestType + */ + private storageRequest; +} diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-accs/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-accs/index.d.ts new file mode 100644 index 0000000..256a06a --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-accs/index.d.ts @@ -0,0 +1,3 @@ +import { Cloud } from '../mp'; +declare const cloudInstance: Cloud; +export default cloudInstance; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-socket/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-socket/index.d.ts new file mode 100644 index 0000000..1cce0d7 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp-socket/index.d.ts @@ -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; +} +declare const _default: Cloud; +export default _default; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp/index.d.ts new file mode 100644 index 0000000..63260ad --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/mp/index.d.ts @@ -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; +} + +declare const _default: Cloud; +export default _default; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/platforms/node/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/node/index.d.ts new file mode 100644 index 0000000..404ea50 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/platforms/node/index.d.ts @@ -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; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/constants.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/constants.d.ts new file mode 100644 index 0000000..dca0d85 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/constants.d.ts @@ -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; + }; +}; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/helper.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/helper.d.ts new file mode 100644 index 0000000..6611855 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/helper.d.ts @@ -0,0 +1,4 @@ +import { IAsyncInvokeOptions } from "./types"; +export declare function invokeCallback(options: IAsyncInvokeOptions, asyncTask: Promise): Promise; +export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise; +export declare function getUserId(): Promise; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/index.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/index.d.ts new file mode 100644 index 0000000..75666ad --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/index.d.ts @@ -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; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/localstorage.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/localstorage.d.ts new file mode 100644 index 0000000..20f8585 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/localstorage.d.ts @@ -0,0 +1,2 @@ +export declare function getValue(key: string): Promise; +export declare function setValue(key: string, data: any): Promise; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/request.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/request.d.ts new file mode 100644 index 0000000..8da594e --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/request.d.ts @@ -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; + 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; + listenNetworkChange(): Promise; + static getRequestType(url: string): RequestTypes; + /** + * 验证响应结果, 特定情况下重试请求 + * @param res + */ + private verifyResponse; + private tryThrowError; + private sendGatewayRequest; + flushGatewayRequestQueue(reject?: boolean): void; + exec(detail: IRequestDetail, requestType?: RequestTypes): Promise; + /** + * + * @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; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/types.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/types.d.ts new file mode 100644 index 0000000..49636f5 --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/types.d.ts @@ -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 | void; +export declare type Constructor = new (...args: any[]) => T; diff --git a/node_modules/@tbmp/mp-cloud-sdk/types/shared/util.d.ts b/node_modules/@tbmp/mp-cloud-sdk/types/shared/util.d.ts new file mode 100644 index 0000000..bcc3bad --- /dev/null +++ b/node_modules/@tbmp/mp-cloud-sdk/types/shared/util.d.ts @@ -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): Promise; +export declare function myApiPromisify(method: (options: any) => void, options?: any): Promise; +export declare function getUserId(): Promise; +export declare function getEnvs(env: Env | Envs): Envs; diff --git a/node_modules/mini-antui/CHANGELOG.md b/node_modules/mini-antui/CHANGELOG.md new file mode 100644 index 0000000..4d18364 --- /dev/null +++ b/node_modules/mini-antui/CHANGELOG.md @@ -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组件库 diff --git a/node_modules/mini-antui/LICENSE b/node_modules/mini-antui/LICENSE new file mode 100644 index 0000000..55687a9 --- /dev/null +++ b/node_modules/mini-antui/LICENSE @@ -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. diff --git a/node_modules/mini-antui/README.md b/node_modules/mini-antui/README.md new file mode 100644 index 0000000..3f65a58 --- /dev/null +++ b/node_modules/mini-antui/README.md @@ -0,0 +1,81 @@ +

重要说明

+ +鉴于支付宝整体设计规范升级,以及为了能够将提供更多的组件能力,支持主题切换等功能,我们对组件进行了一次深度改造,同时支付宝小程序能力在多端底层打通,我们的组件库也将支持多端接入,我们将品牌升级为 mini-ali-ui。 + +

mini-antui 将不再继续维护,源码保留,如有 bug 会在 mini-ali-ui 进行 fix 操作。因此后续所有的版本更新升级将转移到 mini-ali-ui。品牌虽然改变,但我们的服务不会变,我们将继续为广大阿里小程序开发者服务,感谢各位的支持和鼓励。

+ +

+ +

+ +## mini-ali-ui 特性 +* 基于 **Alipay Design** 设计规范; +* 支持多端小程序(支付宝,淘宝,钉钉等); +* 支持主题配置切换; +* 支持 `px` 与 `rpx`; + +

+ +

+ + +# 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) + +## 示例 + +

+ +

+ +## 链接 +- [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 + +``` + +详细使用说明请参照官方文档[使用自定义组件](https://docs.alipay.com/mini/framework/use-custom-component) + +## 贡献 + +如果你有好的意见或建议,欢迎给我们提[issue](https://github.com/ant-mini-program/mini-antui/issues)。 diff --git a/node_modules/mini-antui/es/_util/fmtEvent.js b/node_modules/mini-antui/es/_util/fmtEvent.js new file mode 100644 index 0000000..b74b56a --- /dev/null +++ b/node_modules/mini-antui/es/_util/fmtEvent.js @@ -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 + } + }); +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-checkbox/index.acss b/node_modules/mini-antui/es/am-checkbox/index.acss new file mode 100644 index 0000000..8d5d482 --- /dev/null +++ b/node_modules/mini-antui/es/am-checkbox/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-checkbox/index.axml b/node_modules/mini-antui/es/am-checkbox/index.axml new file mode 100644 index 0000000..49f6931 --- /dev/null +++ b/node_modules/mini-antui/es/am-checkbox/index.axml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-checkbox/index.js b/node_modules/mini-antui/es/am-checkbox/index.js new file mode 100644 index 0000000..8be1974 --- /dev/null +++ b/node_modules/mini-antui/es/am-checkbox/index.js @@ -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); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-checkbox/index.json b/node_modules/mini-antui/es/am-checkbox/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/am-checkbox/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-icon/index.acss b/node_modules/mini-antui/es/am-icon/index.acss new file mode 100644 index 0000000..86c8c69 --- /dev/null +++ b/node_modules/mini-antui/es/am-icon/index.acss @@ -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"} \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-icon/index.axml b/node_modules/mini-antui/es/am-icon/index.axml new file mode 100644 index 0000000..63819f0 --- /dev/null +++ b/node_modules/mini-antui/es/am-icon/index.axml @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-icon/index.js b/node_modules/mini-antui/es/am-icon/index.js new file mode 100644 index 0000000..567e286 --- /dev/null +++ b/node_modules/mini-antui/es/am-icon/index.js @@ -0,0 +1,9 @@ +Component({ + props: { + type: '', + size: 23, + color: '#333', + className: '', + ariaHidden: undefined + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/am-icon/index.json b/node_modules/mini-antui/es/am-icon/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/am-icon/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/amount-input/index.acss b/node_modules/mini-antui/es/amount-input/index.acss new file mode 100644 index 0000000..6fe0d98 --- /dev/null +++ b/node_modules/mini-antui/es/amount-input/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/amount-input/index.axml b/node_modules/mini-antui/es/amount-input/index.axml new file mode 100644 index 0000000..1287644 --- /dev/null +++ b/node_modules/mini-antui/es/amount-input/index.axml @@ -0,0 +1,27 @@ + + {{title}} + + + ¥ + {{placeholder}} + + + + + + + + {{extra}} + {{btnText}} + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/amount-input/index.js b/node_modules/mini-antui/es/amount-input/index.js new file mode 100644 index 0000000..8e2276b --- /dev/null +++ b/node_modules/mini-antui/es/amount-input/index.js @@ -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(''); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/amount-input/index.json b/node_modules/mini-antui/es/amount-input/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/amount-input/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/badge/index.acss b/node_modules/mini-antui/es/badge/index.acss new file mode 100644 index 0000000..5d2b1ea --- /dev/null +++ b/node_modules/mini-antui/es/badge/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/badge/index.axml b/node_modules/mini-antui/es/badge/index.axml new file mode 100644 index 0000000..62a6499 --- /dev/null +++ b/node_modules/mini-antui/es/badge/index.axml @@ -0,0 +1,11 @@ + + + {{typeof text === 'number' && text > overflowCount ? overflowCount + '+' : text }} + {{typeof text === 'number' && text > overflowCount ? overflowCount + '+' : text }} + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/badge/index.js b/node_modules/mini-antui/es/badge/index.js new file mode 100644 index 0000000..626efaf --- /dev/null +++ b/node_modules/mini-antui/es/badge/index.js @@ -0,0 +1,8 @@ +Component({ + props: { + className: '', + overflowCount: 99, + text: '', + dot: false + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/badge/index.json b/node_modules/mini-antui/es/badge/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/badge/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/calendar/index.acss b/node_modules/mini-antui/es/calendar/index.acss new file mode 100644 index 0000000..75ed51d --- /dev/null +++ b/node_modules/mini-antui/es/calendar/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/calendar/index.axml b/node_modules/mini-antui/es/calendar/index.axml new file mode 100644 index 0000000..efe8abd --- /dev/null +++ b/node_modules/mini-antui/es/calendar/index.axml @@ -0,0 +1,53 @@ + + + + + + + + + {{selectedYear}}年{{selectedMonth + 1}}月 + + + + + + + + + + {{item}} + + + + + + + + + {{item.date}} + {{item.disable ? '' : item.tag}} + + + + + + diff --git a/node_modules/mini-antui/es/calendar/index.js b/node_modules/mini-antui/es/calendar/index.js new file mode 100644 index 0000000..1cdcf4c --- /dev/null +++ b/node_modules/mini-antui/es/calendar/index.js @@ -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]); + } + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/calendar/index.json b/node_modules/mini-antui/es/calendar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/calendar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/card/index.acss b/node_modules/mini-antui/es/card/index.acss new file mode 100644 index 0000000..d9725eb --- /dev/null +++ b/node_modules/mini-antui/es/card/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/card/index.axml b/node_modules/mini-antui/es/card/index.axml new file mode 100644 index 0000000..67c388b --- /dev/null +++ b/node_modules/mini-antui/es/card/index.axml @@ -0,0 +1,19 @@ + + + + + {{title}} + {{subTitle}} + {{title}} + + + + + {{footer}} + + diff --git a/node_modules/mini-antui/es/card/index.js b/node_modules/mini-antui/es/card/index.js new file mode 100644 index 0000000..4a71135 --- /dev/null +++ b/node_modules/mini-antui/es/card/index.js @@ -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 + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/card/index.json b/node_modules/mini-antui/es/card/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/card/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/collapse/collapse-item/index.acss b/node_modules/mini-antui/es/collapse/collapse-item/index.acss new file mode 100644 index 0000000..c960d03 --- /dev/null +++ b/node_modules/mini-antui/es/collapse/collapse-item/index.acss @@ -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)} \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/collapse-item/index.axml b/node_modules/mini-antui/es/collapse/collapse-item/index.axml new file mode 100644 index 0000000..dbe4dcb --- /dev/null +++ b/node_modules/mini-antui/es/collapse/collapse-item/index.axml @@ -0,0 +1,35 @@ + + + + + + {{header}} + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/collapse-item/index.js b/node_modules/mini-antui/es/collapse/collapse-item/index.js new file mode 100644 index 0000000..21a4ab1 --- /dev/null +++ b/node_modules/mini-antui/es/collapse/collapse-item/index.js @@ -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); + } + }); + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/collapse-item/index.json b/node_modules/mini-antui/es/collapse/collapse-item/index.json new file mode 100644 index 0000000..fe1780c --- /dev/null +++ b/node_modules/mini-antui/es/collapse/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "am-icon": "../../am-icon/index" + } +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/index.axml b/node_modules/mini-antui/es/collapse/index.axml new file mode 100644 index 0000000..2ace855 --- /dev/null +++ b/node_modules/mini-antui/es/collapse/index.axml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/index.js b/node_modules/mini-antui/es/collapse/index.js new file mode 100644 index 0000000..27aa9df --- /dev/null +++ b/node_modules/mini-antui/es/collapse/index.js @@ -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 + }); + } + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/collapse/index.json b/node_modules/mini-antui/es/collapse/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/face-detection/index.axml b/node_modules/mini-antui/es/face-detection/index.axml new file mode 100644 index 0000000..9c51ad9 --- /dev/null +++ b/node_modules/mini-antui/es/face-detection/index.axml @@ -0,0 +1,8 @@ + +appName and serviceName is required \ No newline at end of file diff --git a/node_modules/mini-antui/es/face-detection/index.js b/node_modules/mini-antui/es/face-detection/index.js new file mode 100644 index 0000000..c991451 --- /dev/null +++ b/node_modules/mini-antui/es/face-detection/index.js @@ -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 + }); + } + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/face-detection/index.json b/node_modules/mini-antui/es/face-detection/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/face-detection/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/filter-item/index.acss b/node_modules/mini-antui/es/filter/filter-item/index.acss new file mode 100644 index 0000000..d537188 --- /dev/null +++ b/node_modules/mini-antui/es/filter/filter-item/index.acss @@ -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} \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/filter-item/index.axml b/node_modules/mini-antui/es/filter/filter-item/index.axml new file mode 100644 index 0000000..0d80d98 --- /dev/null +++ b/node_modules/mini-antui/es/filter/filter-item/index.axml @@ -0,0 +1,3 @@ + + {{value}} + diff --git a/node_modules/mini-antui/es/filter/filter-item/index.js b/node_modules/mini-antui/es/filter/filter-item/index.js new file mode 100644 index 0000000..e4df363 --- /dev/null +++ b/node_modules/mini-antui/es/filter/filter-item/index.js @@ -0,0 +1,109 @@ +import lifecycle from '../mixins/lifecycle'; +Component({ + mixins: [lifecycle], + data: { + confirmStyle: '' + }, + props: { + className: '', + item: '', + id: '', + value: '', + selected: false, + onChange: function onChange() {} + }, + didMount: function didMount() { + var _this$data = this.data, + results = _this$data.results, + items = _this$data.items; + var _this$props = this.props, + selected = _this$props.selected, + id = _this$props.id, + value = _this$props.value; + + if (selected) { + results.push({ + id: id, + value: value + }); + items.push({ + id: id, + value: value, + setData: this.setData + }); + this.setData({ + confirmStyle: true + }); + } + }, + methods: { + handleClick: function handleClick() { + var _this$props2 = this.props, + id = _this$props2.id, + value = _this$props2.value, + onChange = _this$props2.onChange; + var confirmStyle = this.data.confirmStyle; + var _this$data2 = this.data, + results = _this$data2.results, + items = _this$data2.items, + commonProps = _this$data2.commonProps; + + if (commonProps.max === 1) { + if (confirmStyle === '') { + items.forEach(function (element) { + element.setData({ + confirmStyle: '' + }); + }); + results.splice(0, results.length); + confirmStyle = true; + results.push({ + id: id, + value: value + }); + items.push({ + id: id, + value: value, + setData: this.setData + }); + onChange(results); + } + + this.setData({ + confirmStyle: confirmStyle + }); + return; + } + + if (confirmStyle === '' && results.length < commonProps.max) { + confirmStyle = true; + results.push({ + id: id, + value: value + }); + items.push({ + id: id, + value: value, + setData: this.setData + }); + } else { + confirmStyle = ''; + results.some(function (key, index) { + if (JSON.stringify(key) === JSON.stringify({ + id: id, + value: value + })) { + results.splice(index, 1); + return true; + } else { + return false; + } + }); + } + + this.setData({ + confirmStyle: confirmStyle + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/filter-item/index.json b/node_modules/mini-antui/es/filter/filter-item/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/filter/filter-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/index.acss b/node_modules/mini-antui/es/filter/index.acss new file mode 100644 index 0000000..847fee9 --- /dev/null +++ b/node_modules/mini-antui/es/filter/index.acss @@ -0,0 +1 @@ +.am-filter-show{height:100vh;display:block;position:relative}.am-filter-hide{display:none}.am-filter-document,.am-filter-mask{position:absolute;top:0;left:0;right:0}.am-filter-mask{bottom:0;background:rgba(0,0,0,.65)}.am-filter-content{background:#fff;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:scroll}.am-filter-list{flex:1;padding:10px 5px 23px;overflow-x:hidden;min-height:200px;overflow-y:scroll;max-height:415px;box-sizing:border-box}.am-filter-btn{width:100%;display:flex}.am-filter-default,.am-filter-primary{flex:1;height:48px;font-size:18px;box-sizing:border-box;width:50%;border:0;border-radius:0}.am-filter-default{border-top:1px solid #eee;border-right:none} \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/index.axml b/node_modules/mini-antui/es/filter/index.axml new file mode 100644 index 0000000..190b0b9 --- /dev/null +++ b/node_modules/mini-antui/es/filter/index.axml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/node_modules/mini-antui/es/filter/index.js b/node_modules/mini-antui/es/filter/index.js new file mode 100644 index 0000000..9067d0f --- /dev/null +++ b/node_modules/mini-antui/es/filter/index.js @@ -0,0 +1,40 @@ +import lifecycle from './mixins/lifecycle'; +Component({ + mixins: [lifecycle], + data: { + maxHeight: 0 + }, + props: { + className: '', + onChange: function onChange() {}, + max: 10000 + }, + didMount: function didMount() { + var commonProps = this.data.commonProps; + var max = this.props.max; + commonProps.max = max; + }, + methods: { + resetFn: function resetFn() { + var _this$data = this.data, + items = _this$data.items, + results = _this$data.results; + items.forEach(function (element) { + element.setData({ + confirmStyle: '' + }); + }); + results.splice(0, results.length); + }, + confirmFn: function confirmFn() { + var onChange = this.props.onChange; + var results = this.data.results; + onChange(results); + }, + maskTap: function maskTap() { + if (this.props.onMaskTap) { + this.props.onMaskTap(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/filter/index.json b/node_modules/mini-antui/es/filter/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/filter/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/filter/mixins/lifecycle.js b/node_modules/mini-antui/es/filter/mixins/lifecycle.js new file mode 100644 index 0000000..cc8f5ac --- /dev/null +++ b/node_modules/mini-antui/es/filter/mixins/lifecycle.js @@ -0,0 +1,16 @@ +export default { + data: { + results: [], + items: [], + commonProps: { + max: 10000 + } + }, + didUnmount: function didUnmount() { + var _this$data = this.data, + items = _this$data.items, + results = _this$data.results; + results.splice(0, results.length); + items.splice(0, items.length); + } +}; \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/flex-item/index.acss b/node_modules/mini-antui/es/flex/flex-item/index.acss new file mode 100644 index 0000000..86b6578 --- /dev/null +++ b/node_modules/mini-antui/es/flex/flex-item/index.acss @@ -0,0 +1 @@ +.am-flexbox-item{box-sizing:border-box;flex:1;min-width:10px;margin-left:8px}.am-flexbox-item:first-child{margin-left:0} \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/flex-item/index.axml b/node_modules/mini-antui/es/flex/flex-item/index.axml new file mode 100644 index 0000000..d294fb5 --- /dev/null +++ b/node_modules/mini-antui/es/flex/flex-item/index.axml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/flex-item/index.js b/node_modules/mini-antui/es/flex/flex-item/index.js new file mode 100644 index 0000000..df2bc90 --- /dev/null +++ b/node_modules/mini-antui/es/flex/flex-item/index.js @@ -0,0 +1 @@ +Component({}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/flex-item/index.json b/node_modules/mini-antui/es/flex/flex-item/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/flex/flex-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/index.acss b/node_modules/mini-antui/es/flex/index.acss new file mode 100644 index 0000000..b23de5a --- /dev/null +++ b/node_modules/mini-antui/es/flex/index.acss @@ -0,0 +1 @@ +.am-flexbox{display:flex}.am-flexbox-dir-row{flex-direction:row}.am-flexbox-dir-row-reverse{flex-direction:row-reverse}.am-flexbox-dir-column{flex-direction:column}.am-flexbox-dir-column-reverse{flex-direction:column-reverse}.am-flexbox-nowrap{flex-wrap:nowrap}.am-flexbox-wrap{flex-wrap:wrap}.am-flexbox-wrap-reverse{flex-wrap:wrap-reverse}.am-flexbox-justify-start{justify-content:flex-start}.am-flexbox-justify-center{justify-content:center}.am-flexbox-justify-end{justify-content:flex-end}.am-flexbox-justify-between{justify-content:space-between}.am-flexbox-justify-around{justify-content:space-around}.am-flexbox-align-start{align-items:flex-start}.am-flexbox-align-end{align-items:flex-end}.am-flexbox-align-center{align-items:center}.am-flexbox-align-stretch{align-items:stretch}.am-flexbox-align-baseline{align-items:baseline}.am-flexbox-align-content-start{align-content:flex-start}.am-flexbox-align-content-end{align-content:flex-end}.am-flexbox-align-content-center{align-content:center}.am-flexbox-align-content-between{align-content:space-between}.am-flexbox-align-content-around{align-content:space-around}.am-flexbox-align-content-stretch{align-content:stretch} \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/index.axml b/node_modules/mini-antui/es/flex/index.axml new file mode 100644 index 0000000..94d1d06 --- /dev/null +++ b/node_modules/mini-antui/es/flex/index.axml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/index.js b/node_modules/mini-antui/es/flex/index.js new file mode 100644 index 0000000..f66f96c --- /dev/null +++ b/node_modules/mini-antui/es/flex/index.js @@ -0,0 +1,10 @@ +Component({ + props: { + className: '', + direction: 'row', + wrap: 'nowrap', + justify: 'start', + align: 'center', + alignContent: 'stretch' + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/index.json b/node_modules/mini-antui/es/flex/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/flex/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/flex/index.sjs b/node_modules/mini-antui/es/flex/index.sjs new file mode 100644 index 0000000..d062b11 --- /dev/null +++ b/node_modules/mini-antui/es/flex/index.sjs @@ -0,0 +1,64 @@ +export default function classnames(dir, wrap, justify, align, alignContent) { + const prefixCls = 'am-flexbox'; + const classes = []; + + const dirMaps = { + row: `${prefixCls}-dir-row`, + 'row-reverse': `${prefixCls}-dir-row-reverse`, + column: `${prefixCls}-dir-column`, + 'column-reverse': `${prefixCls}-dir-column-reverse`, + }; + + const wrapMaps = { + nowrap: `${prefixCls}-nowrap`, + wrap: `${prefixCls}-wrap`, + 'wrap-reverse': `${prefixCls}-wrap-reverse`, + }; + + const justifyMaps = { + start: `${prefixCls}-justify-start`, + end: `${prefixCls}-justify-end`, + center: `${prefixCls}-justify-center`, + between: `${prefixCls}-justify-between`, + around: `${prefixCls}-justify-around`, + }; + + const alignMaps = { + start: `${prefixCls}-align-start`, + center: `${prefixCls}-align-center`, + end: `${prefixCls}-align-end`, + baseline: `${prefixCls}-align-baseline`, + stretch: `${prefixCls}-align-stretch`, + }; + + const alignContentMaps = { + start: `${prefixCls}-align-content-start`, + end: `${prefixCls}-align-content-end`, + center: `${prefixCls}-align-content-center`, + between: `${prefixCls}-align-content-between`, + around: `${prefixCls}-align-content-around`, + stretch: `${prefixCls}-align-content-stretch`, + }; + + if (dirMaps[dir]) { + classes.push(dirMaps[dir]); + } + + if (wrapMaps[wrap]) { + classes.push(wrapMaps[wrap]); + } + + if (justifyMaps[justify]) { + classes.push(justifyMaps[justify]); + } + + if (alignMaps[align]) { + classes.push(alignMaps[align]); + } + + if (alignContentMaps[alignContent]) { + classes.push(alignContentMaps[alignContent]); + } + + return classes.join(' '); +} diff --git a/node_modules/mini-antui/es/footer/index.acss b/node_modules/mini-antui/es/footer/index.acss new file mode 100644 index 0000000..eba371d --- /dev/null +++ b/node_modules/mini-antui/es/footer/index.acss @@ -0,0 +1 @@ +.am-footer-links{display:flex;justify-content:center}.am-footer-link{height:17px;line-height:17px;color:#108ee9;font-size:12px}.am-footer-link::after{content:'|';padding:0 5px;height:17px;color:#ccc}.am-footer-link:last-child::after{display:none}.am-footer-copyright{margin-top:3px;height:17px;line-height:17px;color:#ccc;font-size:14px;text-align:center} \ No newline at end of file diff --git a/node_modules/mini-antui/es/footer/index.axml b/node_modules/mini-antui/es/footer/index.axml new file mode 100644 index 0000000..e0d5cce --- /dev/null +++ b/node_modules/mini-antui/es/footer/index.axml @@ -0,0 +1,8 @@ + + + + {{item.text}} + + + {{copyright}} + \ No newline at end of file diff --git a/node_modules/mini-antui/es/footer/index.js b/node_modules/mini-antui/es/footer/index.js new file mode 100644 index 0000000..cb7485f --- /dev/null +++ b/node_modules/mini-antui/es/footer/index.js @@ -0,0 +1,5 @@ +Component({ + props: { + className: '' + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/footer/index.json b/node_modules/mini-antui/es/footer/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/footer/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/grid/index.acss b/node_modules/mini-antui/es/grid/index.acss new file mode 100644 index 0000000..42f0ed3 --- /dev/null +++ b/node_modules/mini-antui/es/grid/index.acss @@ -0,0 +1 @@ +.am-grid{display:flex;flex-direction:row;flex-wrap:wrap;background-color:#fff}.am-grid-item-wrapper{position:absolute;left:0;bottom:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.am-grid-item{text-align:center;position:relative}.am-grid-icon-container{display:flex;justify-content:center;align-items:center}.am-grid-icon{flex:1;width:36px;height:36px}.am-grid-text-wrapper{display:flex;flex-direction:column;align-items:flex-start}.am-grid-text{color:#333;font-size:14px;line-height:1;margin-top:14px}.am-grid-desc{color:#999;font-size:12px}.am-grid-2 .am-grid-item-wrapper{flex-direction:row;justify-content:flex-start}.am-grid-2 .am-grid-item.has-desc{padding-top:70px}.am-grid-2 .am-grid-item{padding-top:64px}.am-grid-2 .am-grid-icon-container{margin-left:16px}.am-grid-2 .am-grid-icon{width:28px;height:28px}.am-grid-2 .am-grid-text{margin-top:0;margin-left:12px;height:24px;line-height:24px;font-size:17px}.am-grid-2 .am-grid-desc{margin-left:12px;height:16px;line-height:16px}.am-grid-3{padding:0 16px}.am-grid-3.am-grid-no-line{padding:8px 16px 0 16px}.am-grid-3 .am-grid-border{position:absolute;left:0;bottom:0;width:100%;height:100%;border-bottom:1rpx solid #eee;border-right:1rpx solid #eee;box-sizing:border-box}.am-grid-3 .am-grid-right{border-right:none}.am-grid-3 .am-grid-bottom{border-bottom:none}.am-grid-3 .am-grid-top{height:calc(100% - 15px)}.am-grid-3 .am-grid-text-wrapper{align-items:center}.am-grid-3 .am-grid-text{height:20px;line-height:20px;margin-top:12px}.am-grid-3 .am-grid-desc{height:17px;line-height:17px}.am-grid-3 .am-grid-item{padding-top:125px}.am-grid-no-line .am-grid-item{padding-top:110px}.am-grid-no-line .am-grid-item .am-grid-border{border-right:0 none;border-bottom:0 none}.am-grid-5{padding-top:6px;padding-bottom:7px}.am-grid-5 .am-grid-item{padding-top:75px}.am-grid-5 .am-grid-icon{border-radius:50%;width:43px;height:43px}.am-grid-5 .am-grid-text{font-size:12px;margin-top:7px}.am-grid-4{padding-top:7px;padding-bottom:7px}.am-grid-4 .am-grid-item{padding-top:68px}.am-grid-4 .am-grid-icon-container{margin-top:7px}.am-grid-4 .am-grid-icon{height:28px;width:28px}.am-grid-4 .am-grid-text{font-size:13px;height:13px;line-height:13px;margin-top:7px}.am-grid-4.circular{padding-top:3px}.am-grid-4.circular .am-grid-item{padding-top:82px}.am-grid-4.circular .am-grid-icon-container{margin-top:13px;padding:8px;border-radius:50%;background-color:#d8d8d8}.am-grid-4.circular .am-grid-icon{width:26px;height:26px;flex:1}.am-grid-4.circular .am-grid-text{height:16px;line-height:16px} \ No newline at end of file diff --git a/node_modules/mini-antui/es/grid/index.axml b/node_modules/mini-antui/es/grid/index.axml new file mode 100644 index 0000000..d55d0dd --- /dev/null +++ b/node_modules/mini-antui/es/grid/index.axml @@ -0,0 +1,25 @@ + + + + + + + + + + + + {{item.text}} + {{item.desc}} + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/grid/index.js b/node_modules/mini-antui/es/grid/index.js new file mode 100644 index 0000000..50fe904 --- /dev/null +++ b/node_modules/mini-antui/es/grid/index.js @@ -0,0 +1,30 @@ +Component({ + data: { + bottomIndex: 0 + }, + props: { + columnNum: 3, + circular: false, + list: [], + onGridItemClick: function onGridItemClick() {}, + hasLine: true + }, + didMount: function didMount() { + var _this$props = this.props, + list = _this$props.list, + columnNum = _this$props.columnNum; + var rows = list.length / columnNum; + this.setData({ + bottomIndex: Math.floor(rows) === rows ? (rows - 1) * columnNum : Math.floor(rows) * columnNum + }); + }, + methods: { + onGridItemClick: function onGridItemClick(e) { + this.props.onGridItemClick({ + detail: { + index: e.target.dataset.index + } + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/grid/index.json b/node_modules/mini-antui/es/grid/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/grid/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/input-item/index.acss b/node_modules/mini-antui/es/input-item/index.acss new file mode 100644 index 0000000..cf22671 --- /dev/null +++ b/node_modules/mini-antui/es/input-item/index.acss @@ -0,0 +1 @@ +.am-input-item{display:flex;align-items:center;background:#fff;padding-left:15px}.am-input-item .a-input-content{padding-left:2px}.am-input-line{position:relative;flex:1;display:flex;align-items:center;padding-right:15px;min-height:47px;overflow:hidden}.am-input-label{min-width:80px;margin-right:2px;color:#333}.am-input-content{flex:1;display:flex;height:33px;color:#000;text-align:left}.am-input-content .a-input-wrap{flex:1}.am-input-clear{display:flex;height:33px;width:33px;justify-content:center;align-items:center}.am-input-clear.show{visibility:visible}.am-input-clear.hidden{visibility:hidden;pointer-events:none}.am-input-line-bottom::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-input-item.last .am-input-line-bottom::after{display:none} \ No newline at end of file diff --git a/node_modules/mini-antui/es/input-item/index.axml b/node_modules/mini-antui/es/input-item/index.axml new file mode 100644 index 0000000..6a6bc47 --- /dev/null +++ b/node_modules/mini-antui/es/input-item/index.axml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/node_modules/mini-antui/es/input-item/index.js b/node_modules/mini-antui/es/input-item/index.js new file mode 100644 index 0000000..85d279c --- /dev/null +++ b/node_modules/mini-antui/es/input-item/index.js @@ -0,0 +1,65 @@ +import fmtEvent from '../_util/fmtEvent'; +Component({ + props: { + className: '', + labelCls: '', + inputCls: '', + last: false, + value: '', + name: '', + type: 'text', + password: false, + placeholder: '', + placeholderClass: '', + placeholderStyle: '', + disabled: false, + maxlength: 140, + focus: false, + clear: false, + // 是否带清除功能 + syncInput: false, + enableNative: false, + // 兼容安卓input的输入bug + onInput: function onInput() {}, + onConfirm: function onConfirm() {}, + onFocus: function onFocus() {}, + onBlur: function onBlur() {}, + onClear: function onClear() {} + }, + data: { + _focus: false + }, + didMount: function didMount() { + this.setData({ + _focus: this.props.focus + }); + }, + methods: { + onBlur: function onBlur(e) { + this.setData({ + _focus: false + }); + var event = fmtEvent(this.props, e); + this.props.onBlur(event); + }, + onConfirm: function onConfirm(e) { + var event = fmtEvent(this.props, e); + this.props.onConfirm(event); + }, + onFocus: function onFocus(e) { + this.setData({ + _focus: true + }); + var event = fmtEvent(this.props, e); + this.props.onFocus(event); + }, + onInput: function onInput(e) { + var event = fmtEvent(this.props, e); + this.props.onInput(event); + }, + onClear: function onClear(e) { + var event = fmtEvent(this.props, e); + this.props.onClear(event); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/input-item/index.json b/node_modules/mini-antui/es/input-item/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/input-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/list/index.acss b/node_modules/mini-antui/es/list/index.acss new file mode 100644 index 0000000..761e585 --- /dev/null +++ b/node_modules/mini-antui/es/list/index.acss @@ -0,0 +1 @@ +.am-list-footer,.am-list-header{font-size:14px;color:#888}.am-list-header{padding:16px 16px 8px}.am-list-body{position:relative}.am-list-body::before{content:'';position:absolute;background-color:#eee;display:block;top:0;right:0;bottom:auto;left:0;height:1px;transform:scaleY(.5)}.am-list-body::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-list-footer{padding:8px 16px 16px 16px}.am-list-load-more{text-align:center;background:#fff;padding:10px 16px;font-size:15px;line-height:1.4;color:#333}.am-list-load-more-txt{padding:0 10px}.am-list-load-over{display:block;padding:10px 16px;font-size:10px;text-align:center;color:#ccc;text-shadow:1px 1px #f0f0f0} \ No newline at end of file diff --git a/node_modules/mini-antui/es/list/index.axml b/node_modules/mini-antui/es/list/index.axml new file mode 100644 index 0000000..3075a5a --- /dev/null +++ b/node_modules/mini-antui/es/list/index.axml @@ -0,0 +1,13 @@ + + + + + + + + {{loadContent[0]?loadContent[0]:''}} + {{loadContent[1]?loadContent[1]:''}} + + + + diff --git a/node_modules/mini-antui/es/list/index.js b/node_modules/mini-antui/es/list/index.js new file mode 100644 index 0000000..b600609 --- /dev/null +++ b/node_modules/mini-antui/es/list/index.js @@ -0,0 +1,27 @@ +Component({ + props: { + className: '', + loadMore: false, + loadContent: ['', ''] + }, + data: { + loadContent: ['加载更多...', '-- 数据加载完了 --'] + }, + didMount: function didMount() { + var loadTxt = this.props.loadContent[0] ? this.props.loadContent[0] : this.data.loadContent[0]; + var overTxt = this.props.loadContent[1] ? this.props.loadContent[1] : this.data.loadContent[1]; + this.setData({ + loadContent: [loadTxt, overTxt] + }); + }, + didUpdate: function didUpdate() { + var loadTxt = this.props.loadContent[0] ? this.props.loadContent[0] : this.data.loadContent[0]; + var overTxt = this.props.loadContent[1] ? this.props.loadContent[1] : this.data.loadContent[1]; + + if (loadTxt !== this.data.loadContent[0] || overTxt !== this.data.loadContent[1]) { + this.setData({ + loadContent: [loadTxt, overTxt] + }); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/list/index.json b/node_modules/mini-antui/es/list/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/list/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/list/list-item/index.acss b/node_modules/mini-antui/es/list/list-item/index.acss new file mode 100644 index 0000000..44c34ef --- /dev/null +++ b/node_modules/mini-antui/es/list/list-item/index.acss @@ -0,0 +1 @@ +.am-list-item{display:flex;align-items:center;background:#fff;padding-left:16px;font-size:15px;line-height:1.4;color:#333}.am-list-item-hover{background-color:#f8f8f8}.am-list-prefix{margin-right:16px}.am-list-thumb{width:30px;height:30px;margin-right:16px}.am-list-line{position:relative;flex:1;display:flex;align-items:center;align-self:stretch;padding-right:15px;min-height:52px;overflow:hidden}.am-list-content,.am-list-extra{line-height:1.5;width:auto;padding-top:7px;padding-bottom:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.am-list-content{flex:1;color:#000;font-size:17px;text-align:left}.am-list-extra{flex-basis:36%;color:#888;font-size:16px;text-align:right}.am-list-brief{color:#888;font-size:14px}.am-list-wrap .am-list-content,.am-list-wrap .am-list-extra{white-space:normal;word-break:break-all}.am-list-arrow{display:block;width:15px;height:15px;margin-left:8px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAaCAYAAAC+aNwHAAAAAXNSR0IArs4c6QAAAdxJREFUOBGlVT1Lw1AUbSSBdMnQf9ChU6GFtr9AEMFBiouDuOikoGixiGgRSi2i1KJTR0fHbuLi5mRbcO7QnyAIQjCSek7ghtc0DQm+5d537z0n97yvpFIYg8GgMxqNavSTjqXhcNgCqOa6bgf+eWICABwBTafTFkiuZB7HaiyChAZMUwCapnXL5XIsSR4BgWyfHQgJbA8k+yCbKrE51ydgBp2cwbSlCuDHUqm0C+tKLGhnCJjEbpxiQa+lEOAnkGzD/kpMtXMETEJOHXJulMJ+Op3ezOfzP0rMc5eCAc6h/RamruSqtm33J5OJqcQ8N7QDKeLh4vmQOWS86rq+XiwWvyUW2oEkof0OoGOZQ9ay4zgv4/HYklhkB1KE3TmEfy9zkL4bhrFaKBQ+YxEQCDkHkPOgkHyAaCVSghRH2VgdREnQo9iZw5k4wuJ1lbo3y7LWcrncF2OREriNKpjbyMUTMAkWSkDbJ8jzQHkD4OdMJrORzWZtidGGdsCjjJwPht83TbMaBJNgroOkl2mmA17nwE3kdd5C+6E3kR34BHxQMPffAvg9gHcAXvgW+AT4cgOr7b9GAHUrlcoebORr5BHgy5dwmpxwANSO+x6ynhIMOhwAXwCc+Gn/14/lDyH1t+arhvp8AAAAAElFTkSuQmCC);background-size:contain;background-repeat:no-repeat;background-position:50% 50%}.am-list-arrow-empty{visibility:hidden}.am-list-line-bottom::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-list-top .am-list-line{align-items:flex-start}.am-list-middle .am-list-line{align-items:center}.am-list-bottom .am-list-line{align-items:flex-end}.am-list-multiple .am-list-line{padding:6px 15px 6px 0}.am-list-multiple .am-list-thumb{width:36px;height:36px}.am-list-item.last .am-list-line-bottom::after{display:none} \ No newline at end of file diff --git a/node_modules/mini-antui/es/list/list-item/index.axml b/node_modules/mini-antui/es/list/list-item/index.axml new file mode 100644 index 0000000..7e77104 --- /dev/null +++ b/node_modules/mini-antui/es/list/list-item/index.axml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/node_modules/mini-antui/es/list/list-item/index.js b/node_modules/mini-antui/es/list/list-item/index.js new file mode 100644 index 0000000..308d365 --- /dev/null +++ b/node_modules/mini-antui/es/list/list-item/index.js @@ -0,0 +1,40 @@ +Component({ + props: { + className: '', + align: false, + disabled: false, + multipleLine: false, + wrap: false, + }, + didMount: function didMount() { + this._updateDataSet(); + }, + didUpdate: function didUpdate() { + this._updateDataSet(); + }, + methods: { + _updateDataSet: function _updateDataSet() { + this.dataset = {}; + + for (var key in this.props) { + if (/data-/gi.test(key)) { + this.dataset[key.replace(/data-/gi, '')] = this.props[key]; + } + } + }, + onItemTap: function onItemTap(ev) { + var _this$props = this.props, + onClick = _this$props.onClick, + disabled = _this$props.disabled; + + if (onClick && !disabled) { + onClick({ + index: ev.target.dataset.index, + target: { + dataset: this.dataset + } + }); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/list/list-item/index.json b/node_modules/mini-antui/es/list/list-item/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/list/list-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/message/index.acss b/node_modules/mini-antui/es/message/index.acss new file mode 100644 index 0000000..2a381fa --- /dev/null +++ b/node_modules/mini-antui/es/message/index.acss @@ -0,0 +1 @@ +.am-message{background-color:#fff;margin-bottom:30px;padding:30px 15px;text-align:center;height:199px;box-sizing:border-box;position:relative}.am-message::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-message .am-icon{display:block}.am-message-main{font-size:20px;margin:16px 0 9px;line-height:28px}.am-message-sub{padding:0 30px;font-size:14px;line-height:19px;margin-top:6px;color:#999}.am-message-button-wrap{padding:0 15px}.am-message-button-wrap .a-button{margin-bottom:15px}.am-message-button-wrap .a-button:last-child{margin-bottom:0} \ No newline at end of file diff --git a/node_modules/mini-antui/es/message/index.axml b/node_modules/mini-antui/es/message/index.axml new file mode 100644 index 0000000..5bb0e87 --- /dev/null +++ b/node_modules/mini-antui/es/message/index.axml @@ -0,0 +1,27 @@ + + + + {{title}} + + + {{subTitle}} + + + + + + diff --git a/node_modules/mini-antui/es/message/index.js b/node_modules/mini-antui/es/message/index.js new file mode 100644 index 0000000..48ca290 --- /dev/null +++ b/node_modules/mini-antui/es/message/index.js @@ -0,0 +1,17 @@ +Component({ + props: { + className: "", + type: "success", + title: "", + onTapMain: function onTapMain() {}, + onTapSub: function onTapSub() {} + }, + methods: { + tapMain: function tapMain() { + this.props.onTapMain(); + }, + tapSub: function tapSub() { + this.props.onTapSub(); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/message/index.json b/node_modules/mini-antui/es/message/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/message/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/modal/index.acss b/node_modules/mini-antui/es/modal/index.acss new file mode 100644 index 0000000..3f2e9a6 --- /dev/null +++ b/node_modules/mini-antui/es/modal/index.acss @@ -0,0 +1 @@ +.am-modal-show{position:fixed;top:0;left:0;right:0;bottom:0}.am-modal-hide{display:none}.am-modal-document,.am-modal-mask{position:absolute;top:0;left:0;right:0;bottom:0}.am-modal-mask{background-color:rgba(0,0,0,.75)}.am-modal-document{display:flex;align-items:center;justify-content:center}.am-modal{background-color:#fff;border-radius:2px;width:270px;position:relative}.am-modal-image{display:flex;justify-content:center}.am-modal-image-md,.am-modal-image-sm{margin-top:24px}.am-modal-image-lg image{width:270px;height:156px}.am-modal-image-md image{width:134px;height:134px}.am-modal-image-sm image{width:65px;height:65px}.am-modal-header{font-size:18px;line-height:21px;text-align:center;color:#333;font-weight:600;padding-top:22px}.am-modal-body{margin-top:8px;overflow:hidden;max-width:270px;padding:0 16px;line-height:20px;text-align:center;color:#333;font-size:14px}.am-modal-footer{margin-top:12px;height:50px;line-height:50px;position:relative;font-size:18px;color:#108ee9;text-align:center}.am-modal-footer::before{content:'';position:absolute;background-color:#ddd;display:block;top:0;right:0;bottom:auto;left:0;height:1px;transform:scaleY(.5)}.am-modal-close{position:absolute;display:block;right:0;top:0;height:48px;width:48px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAANlBMVEVMaXGIiIiJiYmJiYn///+IiIiIiIiRkZGJiYmJiYmIiIiZmZmIiIiIiIiLi4uJiYmIiIiIiIif033nAAAAEXRSTlMA3vWjAZv1FdRBcAq0vhZmK7msGmgAAABnSURBVHhe7dEpFoAwEATRTliysIS5/2VReS16xiEp+2XhuQqC2nngshp4262j1Omq2wq6q3Rf6arionRVdaq4qjpVneo71fOUqerJbAkVLRv/eBcW/nEvfPD3/4szPHhXGzj6VPWBF66vCbNK4YfYAAAAAElFTkSuQmCC) center no-repeat;background-size:16px 16px}.am-modal-close-white{background:url(https://gw.alipayobjects.com/zos/rmsportal/fdmdsySxNBrpcVBVGEUM.png) center no-repeat;background-size:16px 16px}.am-modal-close-active,.am-modal-footer-active{background-color:rgba(37,39,40,.05)}.am-modal-document-advice .am-modal{padding-top:0;width:auto}.am-modal-document-advice .am-modal-body{padding:0;max-width:319px}.am-modal-document-advice .am-modal-close{top:-50px;height:27px;width:27px;background-size:27px 27px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAEMElEQVR4AWKgJvj//z8roFl7cJJdiaM4/mbtvbZt27Zt27ZtrvLfvu8iVWe77tSmJ/lNMlWfQtLICXo6wARswRk8wUf8RAt+4TOe4wJ2YAaqkujfIsx8XEMTggK04j5WojbtQBXYhF8I8viCh7iJy7iBB3iPtjx1mnEQdcUOVIKl+IzA8QEHMBFVEY70SGzHcwSO39iCimKEGoeXCMRP7MDwmG33wzp8gHvU51uGWoYW55TZi5qE+ynrCvjDCbgXJUmfegedTs6gj/HZUY3dzs68huqkGr8pDbdgaZGv6YnO0XuFfnGPlIb6hnEpjcD98Uq25W3BfwvO6fcKfVP+e6lydvQtlPgPFHqkNFS64Sqdv4ZDvkN6i1xT4zI20+mDbxJuWdTr6oVU0oEiS+HGys7/hbqeKizRIV3XZTDcRtnWAz1NcT7Ln2+fjAcrx0e5ZPrlK7gJQZd9KW1sNeajX8Tyi2Sbz+ZL/1PmfrUeM/zT+IaxCRyBw/iLu1HCUSbnjJID3QLzZOUOj43Zh78I8BoT4oaSie+6iHXnyrbvcldek5XDPTaoN24h0HAxQ33DeuSi/rfJDe5Hdzb9110RP5x9KGnnqvQ/JFw4QRYelPLxwxmHkraWSt9rwoWbZeFEKZ9sOINQ0l699Hs+XHhaFnbd6xiEMwilP7nzfh4ueBSORFIubrjbbjiLUPqTmf9f5DTpIy1ocOQmGoTSPo93O/Pk7vS2FjQI9xF/DEKF/e2Xvnq3L2hGgCta0CKcQSjta0e3GYhMpW4aTVT3oFk6fYnRBn3tlT76/Ccz5IcGofSa+ukOKAn3d1Tar2lf8Mxj1hFnmrTJf4bi1ecVuYUpaV9wXjqrMAq1Hjn0tgrX3lbYZrhgu3Q02ipUjOlX1IlwCwJcDhdOk052WoayCkfd2dLWpnBhlaR9aR3KIpwzLRylK+7Jiv5moTymXx79l8iI+wMlunK5NL7eIpTVkaPsRKl72F1ZjWaZ+pRHbHQWHvmGihDuIaYVcJM56l8FDkiBDZ5Pjr9hFXIJ3BX8wCaURKgzXrb5dr5Ctfjl86TKYFrUiIEeZ8wjCTZCVhk+W7TfCXPdZ4pRnwa3YnJGQ/XGV30K7LsnfmJAxkJVyPy23Q6fyrud4bc6I6FyuOi8ky7x/dPTYfQ2qjIQap/zlrWq0FejL6WhF+iX4umnR+oH+sdpsC9eS4PfMT6FN5jPnVBjk3q1c8P5JGITyos0pH/z/xTC75o7gEB8wmKUGH3b8djp76rFda6vcn86Hb7AfFTFbLsUk3AdgWjBDpRYnx612BdOmkUzrmEZGjwGqLk4oztMnEW/ND5LOON+dyg+4hZO4AB2YR+O4SreojVP3dsYkfaf5gDswAcEMXzHYYzK4hxuEFbhLJ7KI21XM17hEjZilM01ZP8NVCP6ozeqkbPu93+pG3nJRlqdHgAAAABJRU5ErkJggg==)} \ No newline at end of file diff --git a/node_modules/mini-antui/es/modal/index.axml b/node_modules/mini-antui/es/modal/index.axml new file mode 100644 index 0000000..eb1657f --- /dev/null +++ b/node_modules/mini-antui/es/modal/index.axml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/node_modules/mini-antui/es/modal/index.js b/node_modules/mini-antui/es/modal/index.js new file mode 100644 index 0000000..22be5de --- /dev/null +++ b/node_modules/mini-antui/es/modal/index.js @@ -0,0 +1,25 @@ +Component({ + props: { + className: '', + topImageSize: 'md', + showClose: true, + closeType: '0', + disableScroll: true + }, + methods: { + onModalClick: function onModalClick() { + var onModalClick = this.props.onModalClick; + + if (onModalClick) { + onModalClick(); + } + }, + onModalClose: function onModalClose() { + var onModalClose = this.props.onModalClose; + + if (onModalClose) { + onModalClose(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/modal/index.json b/node_modules/mini-antui/es/modal/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/modal/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/notice/index.acss b/node_modules/mini-antui/es/notice/index.acss new file mode 100644 index 0000000..bf5354b --- /dev/null +++ b/node_modules/mini-antui/es/notice/index.acss @@ -0,0 +1 @@ +.am-notice{width:100%;height:36px;box-sizing:border-box;line-height:36px;display:flex;background-color:#fefceb;overflow:hidden;color:#f76a24}.am-notice-thumb{box-sizing:content-box;padding-left:16px;width:19px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEVMaXH4biD/dSn3biD2cib/dDj3biD3biD4biD4byP/lUD3biD4biH4biH3biD5byH4biD4cCH3biH3bST2byT4biH3biD3cSP3biD0bSH6cCL4biH3biL3biH4biL4biGKhhI5AAAAIHRSTlMA4A3wGAj3+rRQBJOsn+o/zUtcKBzH1TKILzZvU796aUQsa54AAAEeSURBVHgBfdNVlt0wFETRElhlZvaD+c+yta7SSYznewstY99aqwkPNYbMcd/XUTHGbTOZvTzQlcZFaUF+kHhQ0OUVjumYroWAZCQZ99hla5YVAgC6zLGcEEqtb1JUC/4CTwaqLpyspFT3+B8gyjla+EpKucYeIBrClZC7MwmYXimAznEVEJ3AyLcGULC4AUkpsy800TVAZ9gAUFxvAGaZPWZ7ByrWsontDjQcnkHG7HGJJFxByeUafCgTVCzTazAwSwHkwq6A7cJJXC/rOOdYZqePZRVn+FpHqbZ7YEfWYW7d972tjg+mUVS7R9fXNM0v0O2bHOz50X4D+DrSbOnp2WfkLGBm/bG4aCPzVpZ4+DWNBw9NiizwVF/kPXb9AFr1D7ArYO8yAAAAAElFTkSuQmCC) center no-repeat;background-size:18px auto;background-position:center right}.am-notice-content{flex:1;width:100%;margin-left:9px;margin-right:10px;overflow:hidden}.am-notice-marquee{position:relative;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;font-size:14px}.am-notice-operation{height:100%;padding-right:16px}.am-notice-link{display:block;height:100%;color:#f85800}.am-notice-link::after{content:"";display:inline-block;width:6px;height:6px;border:1px solid #f76a24;border-top:0 none;border-left:0 none;margin-left:6px;margin-right:2px;margin-bottom:1px;transform:rotate(315deg)}.am-notice-closable{width:10px;height:100%;background-image:url(https://gw.alipayobjects.com/zos/rmsportal/mLiemrUlPGVwIGXQdWDx.png);background-size:contain;background-position:center;background-repeat:no-repeat}.am-notice-operation-text{display:block;height:100%;color:#e14f00} \ No newline at end of file diff --git a/node_modules/mini-antui/es/notice/index.axml b/node_modules/mini-antui/es/notice/index.axml new file mode 100644 index 0000000..44cf58c --- /dev/null +++ b/node_modules/mini-antui/es/notice/index.axml @@ -0,0 +1,24 @@ + + + + + + + + + + + + {{action}} + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/notice/index.js b/node_modules/mini-antui/es/notice/index.js new file mode 100644 index 0000000..b440f6c --- /dev/null +++ b/node_modules/mini-antui/es/notice/index.js @@ -0,0 +1,199 @@ +var noop = function noop() {}; + +var canIUseTransitionEnd = my.canIUse('view.onTransitionEnd'); +Component({ + props: { + className: '', + mode: '', + // closable,link + action: '', + // 文本按钮 + show: true, + // 是否显示 + enableMarquee: false, + // 是否开启marquee + onClick: function onClick() {}, + marqueeProps: { + loop: false, + leading: 500, + trailing: 800, + fps: 40 + } + }, + data: { + animatedWidth: 0, + overflowWidth: 0, + duration: 0, + marqueeStyle: '', + canIUseTransitionEnd: canIUseTransitionEnd + }, + didMount: function didMount() { + if (this.props.enableMarquee) { + if (!canIUseTransitionEnd) { + this._measureText(); + + this._startAnimation(); + } else { + this._measureText(this.startMarquee.bind(this)); + } + } + }, + didUpdate: function didUpdate() { + // 这里更新处理的原因是防止notice内容在动画过程中发生改变。 + if (!canIUseTransitionEnd) { + this._measureText(); + } + + if (this.props.enableMarquee && !this._marqueeTimer && !canIUseTransitionEnd) { + this._measureText(); + + this._startAnimation(); + } else { + // 当通过脚本切换 show 的值时(true or false),导致跑马灯动画效果失效的 bug 处理 + if (!this.props.show) { + this.setData({ + marqueeStyle: '' + }); + } + + this._measureText(this.startMarquee.bind(this)); + } + }, + didUnmount: function didUnmount() { + if (this._marqueeTimer) { + clearTimeout(this._marqueeTimer); + this._marqueeTimer = null; + } + }, + methods: { + resetMarquee: function resetMarquee() { + var marqueeStyle = 'transform: translateX(0px); transition: 0s all linear;'; + this.setData({ + marqueeStyle: marqueeStyle + }); + }, + startMarquee: function startMarquee() { + var _this$props$marqueePr = this.props.marqueeProps.leading, + leading = _this$props$marqueePr === void 0 ? 500 : _this$props$marqueePr; + var _this$data = this.data, + duration = _this$data.duration, + overflowWidth = _this$data.overflowWidth; + var marqueeStyle = "transform: translateX(" + -overflowWidth + "px); transition: " + duration + "s all linear " + (typeof leading === 'number' ? leading / 1000 + "s" : '0s') + ";"; + this.setData({ + marqueeStyle: marqueeStyle + }); + }, + onTransitionEnd: function onTransitionEnd() { + var _this = this; + + var _this$props$marqueePr2 = this.props.marqueeProps, + _this$props$marqueePr3 = _this$props$marqueePr2.loop, + loop = _this$props$marqueePr3 === void 0 ? false : _this$props$marqueePr3, + _this$props$marqueePr4 = _this$props$marqueePr2.trailing, + trailing = _this$props$marqueePr4 === void 0 ? 800 : _this$props$marqueePr4; + + if (loop) { + setTimeout(function () { + _this.resetMarquee(); + + _this._measureText(_this.startMarquee.bind(_this)); + }, typeof trailing === 'number' ? trailing : 0); + } + }, + _measureText: function _measureText(callback) { + var _this2 = this; + + if (callback === void 0) { + callback = noop; + } + + var _this$props$marqueePr5 = this.props.marqueeProps.fps, + fps = _this$props$marqueePr5 === void 0 ? 40 : _this$props$marqueePr5; // 计算文本所占据的宽度,计算需要滚动的宽度 + + my.createSelectorQuery().select(".am-notice-marquee-" + this.$id).boundingClientRect().select(".am-notice-content-" + this.$id).boundingClientRect().exec(function (ret) { + var overflowWidth = ret && ret[0] && ret[1] && ret[0].width - ret[1].width || 0; + + if (overflowWidth > 0) { + _this2.setData({ + overflowWidth: overflowWidth, + duration: overflowWidth / fps + }); + + callback(); + } + }); + }, + _startAnimation: function _startAnimation() { + var _this3 = this; + + if (this._marqueeTimer) { + clearTimeout(this._marqueeTimer); + } + + var _this$props$marqueePr6 = this.props.marqueeProps, + _this$props$marqueePr7 = _this$props$marqueePr6.loop, + loop = _this$props$marqueePr7 === void 0 ? false : _this$props$marqueePr7, + _this$props$marqueePr8 = _this$props$marqueePr6.leading, + leading = _this$props$marqueePr8 === void 0 ? 500 : _this$props$marqueePr8, + _this$props$marqueePr9 = _this$props$marqueePr6.trailing, + trailing = _this$props$marqueePr9 === void 0 ? 800 : _this$props$marqueePr9, + _this$props$marqueePr10 = _this$props$marqueePr6.fps, + fps = _this$props$marqueePr10 === void 0 ? 40 : _this$props$marqueePr10; + var TIMEOUT = 1 / fps * 1000; + var isLeading = this.data.animatedWidth === 0; + var timeout = isLeading ? leading : TIMEOUT; + + var animate = function animate() { + var overflowWidth = _this3.data.overflowWidth; + var animatedWidth = _this3.data.animatedWidth + 1; + var isRoundOver = animatedWidth > overflowWidth; + + if (isRoundOver) { + if (loop) { + animatedWidth = 0; + } else { + return; + } + } + + if (isRoundOver && trailing) { + _this3._marqueeTimer = setTimeout(function () { + _this3.setData({ + animatedWidth: animatedWidth + }); + + _this3._marqueeTimer = setTimeout(animate, TIMEOUT); + }, trailing); + } else { + _this3.setData({ + animatedWidth: animatedWidth + }); + + _this3._marqueeTimer = setTimeout(animate, TIMEOUT); + } + }; + + if (this.data.overflowWidth !== 0) { + this._marqueeTimer = setTimeout(animate, timeout); + } + }, + onNoticeTap: function onNoticeTap() { + var _this$props = this.props, + mode = _this$props.mode, + onClick = _this$props.onClick; + + if (mode === 'link' && typeof onClick === 'function') { + onClick(); + } + }, + onOperationTap: function onOperationTap() { + var _this$props2 = this.props, + mode = _this$props2.mode, + onClick = _this$props2.onClick; + + if (mode === 'closable' && typeof onClick === 'function') { + onClick(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/notice/index.json b/node_modules/mini-antui/es/notice/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/notice/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/page-result/index.acss b/node_modules/mini-antui/es/page-result/index.acss new file mode 100644 index 0000000..cc9a88d --- /dev/null +++ b/node_modules/mini-antui/es/page-result/index.acss @@ -0,0 +1 @@ +.am-page-result{background:#fff;height:100vh;overflow:hidden}.am-page-result-pic{width:220px;height:220px;margin:22px auto 0;background-position:center bottom;background-repeat:no-repeat;background-size:contain}.am-page-result-title{margin:25px auto 0;text-align:center;font-size:20px;color:#333}.am-page-result-brief{margin:16px auto;font-size:14px;color:#888;max-width:266px;text-align:center}.am-page-result .page-network{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-network.png)}.am-page-result .page-error{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-busy.png)}.am-page-result .page-busy{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-excption.png)}.am-page-result .page-empty{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-not-found.png)}.am-page-result .page-logoff{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-logout.png)}.am-local-page{height:100%}.am-local-page .am-page-result-pic{width:90px;height:90px;margin:24px auto 0;background-size:contain}.am-local-page .am-page-result-brief{margin-bottom:30px;font-size:14px;color:#999;max-width:266px;text-align:center}.am-local-page .page-empty{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-not-found-sm.png)}.am-local-page .page-error{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-busy-sm.png)}.am-local-page .page-network{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-network-sm.png)}.am-local-page .page-busy{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-excption-sm.png)}.am-local-page .page-logoff{background-image:url(https://gw.alipayobjects.com/as/g/antui/antui-static/1.0.3/i/error-logout-sm.png)} \ No newline at end of file diff --git a/node_modules/mini-antui/es/page-result/index.axml b/node_modules/mini-antui/es/page-result/index.axml new file mode 100644 index 0000000..4c7f5d6 --- /dev/null +++ b/node_modules/mini-antui/es/page-result/index.axml @@ -0,0 +1,6 @@ + + + {{title}} + {{brief}} + + diff --git a/node_modules/mini-antui/es/page-result/index.js b/node_modules/mini-antui/es/page-result/index.js new file mode 100644 index 0000000..3bd42c3 --- /dev/null +++ b/node_modules/mini-antui/es/page-result/index.js @@ -0,0 +1,7 @@ +Component({ + props: { + className: '', + type: 'network', + local: false + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/page-result/index.json b/node_modules/mini-antui/es/page-result/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/page-result/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/pagination/index.acss b/node_modules/mini-antui/es/pagination/index.acss new file mode 100644 index 0000000..ebc849f --- /dev/null +++ b/node_modules/mini-antui/es/pagination/index.acss @@ -0,0 +1 @@ +.am-pagination-container{width:100%;height:50px;display:flex;font-size:14px;line-height:50px;padding:0 20px;align-items:center;box-sizing:border-box;background-color:#fff;justify-content:space-between}.am-pagination-page{width:30%;padding:0 7px;text-align:center;box-sizing:border-box}.am-pagination-content{width:35%;display:flex;box-sizing:border-box;align-items:center}.am-pagination-arrow{width:7px;height:7px;flex-basis:10px;position:relative;display:inline-block;border:1px solid #444;border-color:transparent #444 #444 transparent}.am-pagination-arrow.arrow-left{left:5px;transform:rotate(135deg)}.am-pagination-arrow.arrow-right{right:5px;transform:rotate(-45deg)}.am-pagination-button-left,.am-pagination-button-right{color:#108ee9;width:100%}.am-pagination-button-left .button-text-disabled,.am-pagination-button-right .button-text-disabled{color:rgba(0,0,0,.25)}.am-pagination-button-left{text-align:left}.am-pagination-button-right{text-align:right}.am-pagination-prev{justify-content:flex-start}.am-pagination-next{justify-content:flex-end}.am-pagination-text-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.am-pagination-border-top{position:relative;border:none}.am-pagination-border-top::before{content:'';position:absolute;background-color:#eee;display:block;top:0;right:0;bottom:auto;left:0;height:1px;transform:scaleY(.5)} \ No newline at end of file diff --git a/node_modules/mini-antui/es/pagination/index.axml b/node_modules/mini-antui/es/pagination/index.axml new file mode 100644 index 0000000..77935fb --- /dev/null +++ b/node_modules/mini-antui/es/pagination/index.axml @@ -0,0 +1,28 @@ + + + + + {{prevText}} + + + + + {{index.calcCurrent(current, currentPage)}}/{{total}} + + + + {{nextText}} + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/pagination/index.js b/node_modules/mini-antui/es/pagination/index.js new file mode 100644 index 0000000..41104ba --- /dev/null +++ b/node_modules/mini-antui/es/pagination/index.js @@ -0,0 +1,48 @@ +var noop = function noop() {}; + +Component({ + props: { + mode: 'text', + simple: false, + disabled: false, + current: 0, + total: 0, + prevText: '上一页', + nextText: '下一页', + onChange: noop, + className: '', + btnClass: '' + }, + didMount: function didMount() { + var current = this.props.current; + this.setData({ + currentPage: current + }); + }, + methods: { + onTapPrev: function onTapPrev() { + var currentPage = this.data.currentPage; + var disabled = this.props.disabled; + + if (currentPage - 1 > 0 && !disabled) { + this.setData({ + currentPage: currentPage - 1 + }); + this.props.onChange(this.data.currentPage); + } + }, + onTapNext: function onTapNext() { + var _this$props = this.props, + disabled = _this$props.disabled, + total = _this$props.total; + var currentPage = this.data.currentPage; + + if (currentPage + 1 <= total && !disabled) { + this.setData({ + currentPage: currentPage + 1 + }); + this.props.onChange(this.data.currentPage); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/pagination/index.json b/node_modules/mini-antui/es/pagination/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/pagination/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/pagination/index.sjs b/node_modules/mini-antui/es/pagination/index.sjs new file mode 100644 index 0000000..c15f38b --- /dev/null +++ b/node_modules/mini-antui/es/pagination/index.sjs @@ -0,0 +1,5 @@ +const calcCurrent = (propsCurrent, current) => (typeof current === 'number' ? current : propsCurrent); + +export default { + calcCurrent, +}; diff --git a/node_modules/mini-antui/es/picker-item/index.acss b/node_modules/mini-antui/es/picker-item/index.acss new file mode 100644 index 0000000..c82afd0 --- /dev/null +++ b/node_modules/mini-antui/es/picker-item/index.acss @@ -0,0 +1 @@ +.am-picker-item{display:flex;align-items:center;background:#fff;padding-left:15px}.am-picker-line{position:relative;flex:1;display:flex;align-items:center;padding-right:15px;min-height:47px;overflow:hidden}.am-picker-label{min-width:80px;margin-right:2px;color:#333}.am-picker-wrapper{display:flex;flex:1;height:33px;align-items:center;overflow:hidden}.am-picker-content{flex:1;display:flex;align-items:center;height:33px;color:#000;text-align:left;overflow:hidden;white-space:nowrap}.am-picker-clear{display:flex}.am-picker-line-bottom::after{content:'';position:absolute;background-color:#eee;display:block;top:auto;right:0;bottom:0;left:0;height:1px;transform:scaleY(.5)}.am-picker-item.last .am-picker-line-bottom::after{display:none}.am-picker-text{padding-left:8px}.am-picker-content-placeholder{color:#ccc}.am-picker-content-value{color:#333}.am-picker-arrow{display:block;width:13px;height:13px;margin-left:8px;background-image:url(https://gw.alipayobjects.com/zos/rmsportal/nGMpTwTjtKMbOeeQIucS.png);background-size:contain;background-repeat:no-repeat;background-position:50% 50%} \ No newline at end of file diff --git a/node_modules/mini-antui/es/picker-item/index.axml b/node_modules/mini-antui/es/picker-item/index.axml new file mode 100644 index 0000000..00902d5 --- /dev/null +++ b/node_modules/mini-antui/es/picker-item/index.axml @@ -0,0 +1,18 @@ + + + + + + + + + {{value.length > 0 ? value : placeholder}} + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/picker-item/index.js b/node_modules/mini-antui/es/picker-item/index.js new file mode 100644 index 0000000..0fde014 --- /dev/null +++ b/node_modules/mini-antui/es/picker-item/index.js @@ -0,0 +1,17 @@ +import fmtEvent from '../_util/fmtEvent'; +Component({ + props: { + className: '', + value: '', + placeholder: '', + onSelect: function onSelect() {}, + labelCls: '', + pickerCls: '' + }, + methods: { + onPickerTap: function onPickerTap(e) { + var event = fmtEvent(this.props, e); + this.props.onPickerTap(event); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/picker-item/index.json b/node_modules/mini-antui/es/picker-item/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/picker-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/index.acss b/node_modules/mini-antui/es/popover/index.acss new file mode 100644 index 0000000..4b3ce82 --- /dev/null +++ b/node_modules/mini-antui/es/popover/index.acss @@ -0,0 +1 @@ +.am-popover{position:relative}.am-popover-mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,.3);height:100%;z-index:99}.am-popover-content{position:absolute;z-index:100;border-radius:4px;font-size:14px;color:#333}.border-true{border:1px solid #ddd}.am-popover-inner{position:relative;color:#000;background-color:#fff;border-radius:3px}.am-popover-placement-top{top:-7px;left:50%;transform:translate(-50%,-100%)}.am-popover-placement-topLeft{top:-7px;left:0;transform:translate(0,-100%)}.am-popover-placement-topRight{top:-7px;right:0;transform:translate(0,-100%)}.am-popover-placement-right{top:50%;right:-7px;transform:translate(100%,-50%)}.am-popover-placement-rightTop{top:0;right:-7px;transform:translateX(100%)}.am-popover-placement-rightBottom{bottom:0;right:-7px;transform:translateX(100%)}.am-popover-placement-bottom{bottom:-7px;left:50%;transform:translate(-50%,100%)}.am-popover-placement-bottomRight{bottom:-7px;right:0;transform:translateY(100%)}.am-popover-placement-bottomLeft{bottom:-7px;left:0;transform:translateY(100%)}.am-popover-placement-left{top:50%;left:-7px;transform:translate(-100%,-50%)}.am-popover-placement-leftTop{top:0;left:-7px;transform:translateX(-100%)}.am-popover-placement-leftBottom{bottom:0;left:-7px;transform:translateX(-100%)}.am-popover-arrow{position:absolute;width:7px;height:7px;background-color:#fff;z-index:0}.am-popover-placement-top .am-popover-arrow,.am-popover-placement-topLeft .am-popover-arrow,.am-popover-placement-topRight .am-popover-arrow{transform:translateY(50%) rotate(45deg);bottom:0}.am-popover-placement-top .am-popover-arrow{transform:translate(-50%,50%) rotate(45deg);left:50%}.am-popover-placement-topRight .am-popover-arrow{right:16px}.am-popover-placement-topLeft .am-popover-arrow{left:16px}.am-popover-placement-right .am-popover-arrow,.am-popover-placement-rightBottom .am-popover-arrow,.am-popover-placement-rightTop .am-popover-arrow{transform:translateX(-50%) rotate(45deg);left:0}.am-popover-placement-right .am-popover-arrow{transform:translate(-50%,-50%) rotate(45deg);top:50%}.am-popover-placement-rightBottom .am-popover-arrow{bottom:16px}.am-popover-placement-rightTop .am-popover-arrow{top:16px}.am-popover-placement-bottom .am-popover-arrow,.am-popover-placement-bottomLeft .am-popover-arrow,.am-popover-placement-bottomRight .am-popover-arrow{transform:translateY(-50%) rotate(45deg);top:0}.am-popover-placement-bottom .am-popover-arrow{transform:translate(-50%,-50%) rotate(45deg);left:50%}.am-popover-placement-bottomLeft .am-popover-arrow{left:16px}.am-popover-placement-bottomRight .am-popover-arrow{right:16px}.am-popover-placement-left .am-popover-arrow,.am-popover-placement-leftBottom .am-popover-arrow,.am-popover-placement-leftTop .am-popover-arrow{transform:translateX(50%) rotate(45deg);right:0}.am-popover-placement-left .am-popover-arrow{transform:translate(50%,-50%) rotate(45deg);top:50%}.am-popover-placement-leftTop .am-popover-arrow{top:16px}.am-popover-placement-leftBottom .am-popover-arrow{bottom:16px} \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/index.axml b/node_modules/mini-antui/es/popover/index.axml new file mode 100644 index 0000000..d0b95c3 --- /dev/null +++ b/node_modules/mini-antui/es/popover/index.axml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/index.js b/node_modules/mini-antui/es/popover/index.js new file mode 100644 index 0000000..b008b30 --- /dev/null +++ b/node_modules/mini-antui/es/popover/index.js @@ -0,0 +1,15 @@ +Component({ + props: { + show: false, + className: '', + showMask: true, + position: 'bottomRight' + }, + methods: { + onMaskClick: function onMaskClick() { + if (this.props.onMaskClick && typeof this.props.onMaskClick === 'function') { + this.props.onMaskClick(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/index.json b/node_modules/mini-antui/es/popover/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/popover/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/popover/popover-item/index.acss b/node_modules/mini-antui/es/popover/popover-item/index.acss new file mode 100644 index 0000000..f724a90 --- /dev/null +++ b/node_modules/mini-antui/es/popover/popover-item/index.acss @@ -0,0 +1 @@ +.am-popover-item{min-width:80px;max-width:170px;height:39px;margin:0 10px;line-height:39px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#333;text-align:center}.am-popover-item:not(:last-child){border-bottom:1px solid #eee} \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/popover-item/index.axml b/node_modules/mini-antui/es/popover/popover-item/index.axml new file mode 100644 index 0000000..810ea4c --- /dev/null +++ b/node_modules/mini-antui/es/popover/popover-item/index.axml @@ -0,0 +1,3 @@ + + + diff --git a/node_modules/mini-antui/es/popover/popover-item/index.js b/node_modules/mini-antui/es/popover/popover-item/index.js new file mode 100644 index 0000000..6b2e5cb --- /dev/null +++ b/node_modules/mini-antui/es/popover/popover-item/index.js @@ -0,0 +1,12 @@ +Component({ + props: { + className: '' + }, + methods: { + onItemClick: function onItemClick() { + if (this.props.onItemClick && typeof this.props.onItemClick === 'function') { + this.props.onItemClick(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/popover/popover-item/index.json b/node_modules/mini-antui/es/popover/popover-item/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/popover/popover-item/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/popup/index.acss b/node_modules/mini-antui/es/popup/index.acss new file mode 100644 index 0000000..68556bf --- /dev/null +++ b/node_modules/mini-antui/es/popup/index.acss @@ -0,0 +1 @@ +.am-popup-content{position:fixed}.am-popup-mask{visibility:hidden;position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.75);opacity:0}.am-popup-left{transform:translateX(-100%);left:0;top:0;bottom:0}.am-popup-right{transform:translateX(100%);right:0;top:0;bottom:0}.am-popup-top{top:0;width:100vw;transform:translateY(-100%)}.am-popup-bottom{bottom:0;width:100vw;transform:translateY(100%)}.am-popup-show .am-popup-content{transform:none}.am-popup-show .am-popup-mask{visibility:visible;opacity:1}.am-popup.animation .am-popup-content{transition:all .2s linear}.am-popup.animation .am-popup-mask{transition:all .2s linear} \ No newline at end of file diff --git a/node_modules/mini-antui/es/popup/index.axml b/node_modules/mini-antui/es/popup/index.axml new file mode 100644 index 0000000..9eb219c --- /dev/null +++ b/node_modules/mini-antui/es/popup/index.axml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/popup/index.js b/node_modules/mini-antui/es/popup/index.js new file mode 100644 index 0000000..47438fb --- /dev/null +++ b/node_modules/mini-antui/es/popup/index.js @@ -0,0 +1,27 @@ +Component({ + props: { + className: '', + show: false, + position: 'bottom', + mask: true, + animation: true, + disableScroll: true + }, + methods: { + onMaskTap: function onMaskTap() { + var _this$props = this.props, + onClose = _this$props.onClose, + animation = _this$props.animation; + + if (onClose) { + if (animation) { + onClose(); + } else { + setTimeout(function () { + onClose(); + }, 200); + } + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/popup/index.json b/node_modules/mini-antui/es/popup/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/popup/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/search-bar/index.acss b/node_modules/mini-antui/es/search-bar/index.acss new file mode 100644 index 0000000..5e6202c --- /dev/null +++ b/node_modules/mini-antui/es/search-bar/index.acss @@ -0,0 +1 @@ +.am-search{height:44px;display:flex;align-items:center;padding:0 0 0 12px;background:#fff;overflow:hidden}.am-search-input{display:flex;position:relative;height:28px;line-height:28px;flex:1;background:rgba(0,0,0,.05);border-radius:2px}.am-search-synthetic{display:flex;position:absolute;left:0;top:0;height:28px;line-height:28px;padding-left:14px}.am-search-synthetic-placeholder{font-size:14px;color:#999}.am-search-synthetic-icon{height:14px;width:14px;display:inline-block;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjhweCIgaGVpZ2h0PSIyOHB4IiB2aWV3Qm94PSIwIDAgMjggMjgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjMgKDUxMTY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5TaGFwZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSLnu4Tku7blupPlj4rmoIfms6giIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLlhbbku5YiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zMDUzLjAwMDAwMCwgLTgwMi4wMDAwMDApIiBmaWxsPSIjQjJCMkIyIj4KICAgICAgICAgICAgPGcgaWQ9IuaQnOe0ouWFpeWPoyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjk5My4wMDAwMDAsIDczMi4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJpb3M25bqU55So5Lit5b+D5a+86IiqIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNODYuMDc4NDMwOCw5OCBMNzkuNDkwMTk1Niw5MC45MjE0MzUyIEM3Ny41MTU1MTcyLDkyLjQ2MTY5OTYgNzQuNDEyMzk5OCw5My45NzQ0NzcxIDcxLjczNzAyMTQsOTMuOTc0NDc3MSBDNjUuMjU0ODk0LDkzLjk3NDQ3NzEgNjAsODguNjA3NTY1OCA2MCw4MS45ODczNTg2IEM2MCw3NS4zNjcxNTE0IDY1LjI1NDg5NCw3MCA3MS43MzcwMjE0LDcwIEM3OC4yMTg2NzQzLDcwIDgzLjQ3MzU2ODIsNzUuMzY2NjcxMiA4My40NzM1NjgyLDgxLjk4NzExODUgQzgzLjQ3MzU2ODIsODQuNTk3NjkxMyA4Mi42NDc1ODIyLDg3LjAwNjU0NTcgODEuMjU5OTQ0Nyw4OC45NzQ1MDEzIEw4OCw5NS44MzcwMTA3IEw4Ni4wNzg0MzA4LDk4IFogTTcxLjczNzA1MjgsNzIuNTA2MTAzNyBDNjYuNjA5NDg0NCw3Mi41MDYxMDM3IDYyLjQ1MjgyNjgsNzYuNzUwNjY3MSA2Mi40NTI4MjY4LDgxLjk4NzEwNzkgQzYyLjQ1MjgyNjgsODcuMjIzNTQ4NyA2Ni42MDkyMzY3LDkxLjQ2ODYxMzYgNzEuNzM3MDUyOCw5MS40Njg2MTM2IEM3Ni44NjMzODI0LDkxLjQ2ODYxMzYgODEuMDE5NzkyMyw4Ny4yMjM1NDg3IDgxLjAxOTc5MjMsODEuOTg3MTA3OSBDODEuMDE5NzkyMyw3Ni43NTA2NjcxIDc2Ljg2MzM4MjQsNzIuNTA2MTAzNyA3MS43MzcwNTI4LDcyLjUwNjEwMzcgTDcxLjczNzA1MjgsNzIuNTA2MTAzNyBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+);background-size:contain;margin-right:6px;vertical-align:-2px}.am-search-value{flex:1;height:28px;font-size:14px;padding:0 0 0 34px;background:0 0;box-sizing:border-box}.am-search-clear{position:relative;visibility:hidden;width:28px;height:28px}.am-search-clear icon{display:flex;height:100%;justify-content:center;align-items:center}.am-search-clear-show{visibility:visible}.am-search-cancel{margin-right:-48px;opacity:0;color:#108ee9;font-size:16px;width:64px;height:28px;line-height:28px;text-align:center}.am-search-anim{transition:margin-right .3s,opacity .3s}.am-search-repos{margin-right:0;opacity:1} \ No newline at end of file diff --git a/node_modules/mini-antui/es/search-bar/index.axml b/node_modules/mini-antui/es/search-bar/index.axml new file mode 100644 index 0000000..c18b3bf --- /dev/null +++ b/node_modules/mini-antui/es/search-bar/index.axml @@ -0,0 +1,29 @@ + + + + + + {{placeholder}} + + + + + + + + 取消 + diff --git a/node_modules/mini-antui/es/search-bar/index.js b/node_modules/mini-antui/es/search-bar/index.js new file mode 100644 index 0000000..195596e --- /dev/null +++ b/node_modules/mini-antui/es/search-bar/index.js @@ -0,0 +1,104 @@ +Component({ + props: { + className: '', + placeholder: '', + focus: false + }, + data: { + _value: '', + focus: false + }, + didMount: function didMount() { + this.setData({ + _value: 'value' in this.props ? this.props.value : '', + focus: this.props.focus + }); + }, + didUpdate: function didUpdate() { + if ('value' in this.props && this.props.value !== this.data._value) { + this.setData({ + _value: this.props.value + }); + } + }, + methods: { + handleInput: function handleInput(e) { + var value = e.detail.value; + + if (!('value' in this.props)) { + this.setData({ + _value: value + }); + } + + if (this.props.onInput) { + this.props.onInput(value); + } + }, + handleClear: function handleClear() { + var _this = this; + + // this.setData({ + // focus: true, + // }); + setTimeout(function () { + _this.handleFocus(); + }, 100); + + if (!('value' in this.props)) { + this.setData({ + _value: '' + }); + } + + this.doClear(); + }, + doClear: function doClear() { + if (this.props.onClear) { + this.props.onClear(''); + } + + if (this.props.onChange) { + this.props.onChange(''); + } + }, + handleFocus: function handleFocus() { + this.setData({ + focus: true + }); + + if (this.props.onFocus) { + this.props.onFocus(); + } + }, + handleBlur: function handleBlur() { + this.setData({ + focus: false + }); + + if (this.props.onBlur) { + this.props.onBlur(); + } + }, + handleCancel: function handleCancel() { + if (!('value' in this.props)) { + this.setData({ + _value: '' + }); + } + + if (this.props.onCancel) { + this.props.onCancel(); + } else { + this.doClear(); + } + }, + handleConfirm: function handleConfirm(e) { + var value = e.detail.value; + + if (this.props.onSubmit) { + this.props.onSubmit(value); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/search-bar/index.json b/node_modules/mini-antui/es/search-bar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/search-bar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/stepper/index.acss b/node_modules/mini-antui/es/stepper/index.acss new file mode 100644 index 0000000..6e5f1d8 --- /dev/null +++ b/node_modules/mini-antui/es/stepper/index.acss @@ -0,0 +1 @@ +.am-stepper-content{padding:10rpx 0;overflow:hidden;text-align:center;line-height:70rpx;font-size:40rpx;display:inline-block;width:245rpx;color:#000}.am-stepper-reduce{border:#eee solid 1px;border-radius:10rpx;width:70rpx;height:70rpx;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MDRDMUYwNDI1OTExMUU4OUY0N0VFQzhCQkYwQTYyOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1ODU0RTgzODI2ODYxMUU4OUY0N0VFQzhCQkYwQTYyOCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNEMxRjAyMjU5MTExRTg5RjQ3RUVDOEJCRjBBNjI4IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjQwNEMxRjAzMjU5MTExRTg5RjQ3RUVDOEJCRjBBNjI4Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+jjGoUQAAAF5JREFUeNrs2LEJACAMRUF1/xkc0gUiAe3tRLkHFna59teIKD/UyieBgICAgICAgICAgICAgICAgByVu9batkZ+H3t9318NdCAgICAgICAgICAgICAgICAgIPeaAgwAyuE/sx15o0MAAAAASUVORK5CYII=) center center no-repeat;background-size:40rpx 40rpx;float:left;display:inline-block}.am-stepper-add{border:#eee solid 1px;border-radius:4rpx;width:70rpx;height:70rpx;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1ODU0RTgzRjI2ODYxMUU4OUY0N0VFQzhCQkYwQTYyOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1ODU0RTg0MDI2ODYxMUU4OUY0N0VFQzhCQkYwQTYyOCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU4NTRFODNEMjY4NjExRTg5RjQ3RUVDOEJCRjBBNjI4IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU4NTRFODNFMjY4NjExRTg5RjQ3RUVDOEJCRjBBNjI4Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+jv5jrAAAAHdJREFUeNrs2sENgCAMBVDq/jMwpA5QIdERIIivCQdO5SXt5YfIzLJDHWWTmgKJiDq8x4zRapDWJsNogYCAgICAgICAgICAgID8D1J6+PAEEGe/fuzU9/1SFDsCAgICAgICAgICAgICAgKyEuQa3SD811qsbgEGAMVVTz/OpY/oAAAAAElFTkSuQmCC);background-size:40rpx 40rpx;background-repeat:no-repeat;background-position:center;float:right;display:inline-block}.am-stepper-input{display:inline-block;width:70rpx;color:#000} \ No newline at end of file diff --git a/node_modules/mini-antui/es/stepper/index.axml b/node_modules/mini-antui/es/stepper/index.axml new file mode 100644 index 0000000..7250f39 --- /dev/null +++ b/node_modules/mini-antui/es/stepper/index.axml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/stepper/index.js b/node_modules/mini-antui/es/stepper/index.js new file mode 100644 index 0000000..ec94f2e --- /dev/null +++ b/node_modules/mini-antui/es/stepper/index.js @@ -0,0 +1,114 @@ +Component({ + data: { + opaReduce: 1, + opaAdd: 1 + }, + props: { + className: '', + min: 0, + max: 100000, + disabled: false, + value: 10, + readOnly: false, + showNumber: false, + step: 1, + onChange: function onChange() {} + }, + didMount: function didMount() { + var _this$props = this.props, + value = _this$props.value, + min = _this$props.min, + max = _this$props.max; + this.setData({ + value: Math.min(Math.max(min, value), max) + }); + }, + didUpdate: function didUpdate(preProps) { + var _this$props2 = this.props, + value = _this$props2.value, + min = _this$props2.min, + max = _this$props2.max; + + if (preProps.value !== value) { + var newValue = Math.min(Math.max(min, value), max); + this.setData({ + value: newValue + }); + this.resetFn(newValue); + } + }, + methods: { + changeFn: function changeFn(ev) { + var _this$props3 = this.props, + min = _this$props3.min, + max = _this$props3.max, + onChange = _this$props3.onChange, + disabled = _this$props3.disabled, + step = _this$props3.step; + var evType = ev.target.dataset.type; + var _this$data = this.data, + opaReduce = _this$data.opaReduce, + opaAdd = _this$data.opaAdd, + value = _this$data.value; + + if (!disabled) { + if (evType === 'reduce') { + if (value > min) { + opaAdd = 1; + value = Math.max(min, this.getCalculateValue('reduce', +value, +step)); + opaReduce = value === min ? 0.4 : 1; + } + } else { + /* eslint-disable no-lonely-if */ + if (value < max) { + opaReduce = 1; + value = Math.min(this.getCalculateValue('add', +value, +step), max); + opaAdd = value === max ? 0.4 : 1; + } + } + + this.setData({ + value: value, + opaAdd: opaAdd, + opaReduce: opaReduce + }); + onChange(value); + } + }, + onBlur: function onBlur(event) { + var value = event.detail.value; + this.resetFn(value); + }, + resetFn: function resetFn(value) { + var _this$props4 = this.props, + max = _this$props4.max, + min = _this$props4.min, + onChange = _this$props4.onChange; + var calculatedVal = value; + var opaAdd = 1; + var opaReduce = 1; + + if (value >= max) { + calculatedVal = max; + opaAdd = 0.4; + } else if (value <= min) { + calculatedVal = min; + opaReduce = 0.4; + } + + this.setData({ + value: calculatedVal, + opaAdd: opaAdd, + opaReduce: opaReduce + }); + onChange(calculatedVal); + }, + getCalculateValue: function getCalculateValue(type, arg1, arg2) { + var numFloat = arg1.toString().split('.')[1] || ''; + var num2Float = arg2.toString().split('.')[1] || ''; + var length = Math.max(numFloat.length, num2Float.length); + var times = Math.pow(10, length); + return type === 'reduce' ? ((+arg1 * times - +arg2 * times) / times).toFixed(length) : ((+arg1 * times + +arg2 * times) / times).toFixed(length); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/stepper/index.json b/node_modules/mini-antui/es/stepper/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/stepper/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/steps/index.acss b/node_modules/mini-antui/es/steps/index.acss new file mode 100644 index 0000000..f11aebb --- /dev/null +++ b/node_modules/mini-antui/es/steps/index.acss @@ -0,0 +1 @@ +.am-hor-steps{padding:20px 50px 10px 50px;background-color:#fff;overflow:hidden;white-space:nowrap}.am-hor-step{display:inline-block;white-space:normal;text-align:center;vertical-align:top}.am-hor-step-line{position:relative;margin:6px 0;height:2px;background-color:#ccc}.am-hor-step-line.is-active{background-color:#108ee9}.am-hor-step-line.is-last{background-color:transparent}.am-hor-step-icon{position:absolute;top:50%;left:0;width:10px;height:10px;transform:translate(-50%,-50%);border-radius:999px;background-color:#ccc}.am-hor-step-icon.is-active{background-color:#108ee9}.am-hor-step-text{margin-top:20px;padding:0 5px;max-width:90px;transform:translateX(-50%)}.am-hor-step-title{font-size:12px;color:#333}.am-hor-step-description{margin-top:6px;font-size:12px;color:#999}.am-vertical-steps{padding:20px 30px 0 30px;background-color:#fff}.am-vertical-step{display:flex}.am-vertical-step-left{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:24px;margin-right:20px}.am-vertical-step-line{position:relative;top:10px;width:2px;background-color:#ccc}.am-vertical-step-line-top{flex:1}.am-vertical-step-line-bottom{height:30px;width:2px;background-color:#ccc}.am-vertical-step-line.is-active{background-color:#108ee9}.am-vertical-step-icon{position:absolute;top:0;left:50%;transform:translateX(-50%);border-radius:999px}.am-vertical-step-active-image,.am-vertical-step-image{width:24px;border-radius:99rpx}.am-vertical-step-active-image{background-color:#108ee9}.am-vertical-step-image{background-color:#ccc}.am-vertical-step-icon.is-normal{top:5px;background-color:#ccc;width:10px;height:10px}.am-vertical-step-icon.is-active,.am-vertical-step-icon.is-fail{display:flex;background-color:#fff}.am-vertical-step-right{flex:1;margin-bottom:20px}.am-vertical-step-title{margin-bottom:4px;font-size:17px;color:#333}.am-vertical-step-title.is-active{color:#108ee9}.am-vertical-step-title.is-fail{color:#f4333c}.am-vertical-step-description{font-size:14px;color:#888}.am-vertical-placeholder{height:20px}.am-vertical-placeholder-line{position:absolute;left:50%;transform:translateX(-50%);height:100%;width:2px;background-color:#ccc} \ No newline at end of file diff --git a/node_modules/mini-antui/es/steps/index.axml b/node_modules/mini-antui/es/steps/index.axml new file mode 100644 index 0000000..c4e8502 --- /dev/null +++ b/node_modules/mini-antui/es/steps/index.axml @@ -0,0 +1,51 @@ + + + + + + + + + {{item.title}} + + + {{item.description}} + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.title}} + + + {{item.description}} + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/steps/index.js b/node_modules/mini-antui/es/steps/index.js new file mode 100644 index 0000000..c1b6708 --- /dev/null +++ b/node_modules/mini-antui/es/steps/index.js @@ -0,0 +1,10 @@ +Component({ + props: { + className: '', + activeIndex: 1, + failIndex: 0, + size: 0, + direction: 'horizontal', + items: [] + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/steps/index.json b/node_modules/mini-antui/es/steps/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/steps/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/style/mixins/hairline.acss b/node_modules/mini-antui/es/style/mixins/hairline.acss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/mini-antui/es/style/themes/default.acss b/node_modules/mini-antui/es/style/themes/default.acss new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/mini-antui/es/swipe-action/index.acss b/node_modules/mini-antui/es/swipe-action/index.acss new file mode 100644 index 0000000..7f51de0 --- /dev/null +++ b/node_modules/mini-antui/es/swipe-action/index.acss @@ -0,0 +1 @@ +.am-swipe{position:relative;overflow:hidden}.am-swipe-content{position:relative;transition:all 250ms}.am-swipe-right{position:absolute;top:0;bottom:0;display:flex;right:0}.am-swipe-btn{padding:0 14px;justify-content:center;align-items:center;display:flex;color:#fff}.am-swipe-btn-delete{background-color:#f4333c}.am-swipe-btn-edit{background-color:#108ee9}.am-swipe-movable-area{position:absolute}.am-swipe-movable-area .am-swipe-content{transition:none}.am-swiping .am-swipe-content{transition:none} \ No newline at end of file diff --git a/node_modules/mini-antui/es/swipe-action/index.axml b/node_modules/mini-antui/es/swipe-action/index.axml new file mode 100644 index 0000000..f592be0 --- /dev/null +++ b/node_modules/mini-antui/es/swipe-action/index.axml @@ -0,0 +1,69 @@ + + + + + + + {{item.text}} + + + + + + + + + + + + + + + {{item.text}} + + + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/swipe-action/index.js b/node_modules/mini-antui/es/swipe-action/index.js new file mode 100644 index 0000000..5dfdfb5 --- /dev/null +++ b/node_modules/mini-antui/es/swipe-action/index.js @@ -0,0 +1,235 @@ +var _my$getSystemInfoSync = my.getSystemInfoSync(), + windowWidth = _my$getSystemInfoSync.windowWidth; + +var isV2 = my.canIUse('movable-view.onTouchStart'); +Component({ + data: { + leftPos: 0, + swiping: false, + holdSwipe: true, + viewWidth: windowWidth, + x: 0, + actionWidth: 0, + transitionVal: 'none' + }, + props: { + className: '', + right: [], + restore: false, + index: null, + height: 52, + enableNew: false + }, + didMount: function didMount() { + var _this = this; + + var enableNew = this.props.enableNew; + var useV2 = isV2 && enableNew; + this.btnWidth = 0; + this.setData({ + useV2: useV2 + }); + this.setBtnWidth(); + + if (useV2) { + setTimeout(function () { + _this.setData({ + transitionVal: 'transform 100ms' + }); + }, 500); + } + }, + didUpdate: function didUpdate(_prevProps, prevData) { + var restore = this.props.restore; + var _this$data = this.data, + holdSwipe = _this$data.holdSwipe, + useV2 = _this$data.useV2; + + if (restore === true && _prevProps.restore !== restore || prevData.holdSwipe === true && holdSwipe === false) { + this.setData({ + leftPos: 0, + swiping: false, + x: this.btnWidth // V2 + + }); + } + + if (!useV2) { + this.setBtnWidth(); + } + }, + methods: { + setBtnWidth: function setBtnWidth() { + var _this2 = this; + + my.createSelectorQuery().select(".am-swipe-right-" + this.$id).boundingClientRect().exec(function (ret) { + _this2.btnWidth = ret && ret[0] && ret[0].width || 0; + + if (isV2 && _this2.props.enableNew) { + _this2.setData({ + actionWidth: _this2.btnWidth, + x: _this2.btnWidth + }); + } + }); + }, + onSwipeTap: function onSwipeTap() { + if (!this.data.swiping && this.data.x < 0) { + this.setData({ + leftPos: 0, + swiping: false, + x: 0 + }); + } + }, + onSwipeStart: function onSwipeStart(e) { + this.touchObject = { + startX: e.touches[0].pageX, + startY: e.touches[0].pageY + }; + var _this$props = this.props, + index = _this$props.index, + onSwipeStart = _this$props.onSwipeStart; + + if (onSwipeStart) { + onSwipeStart({ + index: index + }); + } + }, + onSwipeMove: function onSwipeMove(e) { + var touchObject = this.touchObject; + var touchePoint = e.touches[0]; + var leftPos = this.data.leftPos; + touchObject.endX = touchePoint.pageX; // 首次触发时,计算滑动角度 + + if (touchObject.direction === undefined) { + var direction = 0; + var xDist = touchObject.startX - touchePoint.pageX || 0; + var yDist = touchObject.startY - touchePoint.pageY || 0; + var r = Math.atan2(yDist, xDist); + var swipeAngle = Math.round(r * 180 / Math.PI); + + if (swipeAngle < 0) { + swipeAngle = 360 - Math.abs(swipeAngle); + } + + if (swipeAngle <= 45 && swipeAngle >= 0) { + direction = 1; + } + + if (swipeAngle <= 360 && swipeAngle >= 315) { + direction = 1; + } + + if (swipeAngle >= 135 && swipeAngle <= 225) { + direction = -1; + } + + touchObject.direction = direction; + } // 通过角度判断是左右方向 + + + if (touchObject.direction !== 0) { + var newLeftPos = leftPos; // 滑动距离 + + var distance = touchObject.endX - touchObject.startX; // 左划 + + if (distance < 0) { + newLeftPos = Math.max(distance, -this.btnWidth); // 右划 + } else { + newLeftPos = 0; + } + + if (Math.abs(distance) > 10) { + this.setData({ + leftPos: newLeftPos, + swiping: distance < 0 + }); + } + } + }, + onSwipeEnd: function onSwipeEnd(e) { + var touchObject = this.touchObject; + + if (touchObject.direction !== 0) { + var touchePoint = e.changedTouches[0]; + touchObject.endX = touchePoint.pageX; + var leftPos = this.data.leftPos; + var distance = touchObject.endX - touchObject.startX; + var newLeftPos = leftPos; + + if (distance < 0) { + if (Math.abs(distance + leftPos) > this.btnWidth * 0.7) { + newLeftPos = -this.btnWidth; + } else { + newLeftPos = 0; + } + } + + this.setData({ + leftPos: newLeftPos, + swiping: false + }); + } + }, + onChange: function onChange() { + if (!this.data.swiping) { + this.setData({ + swiping: true + }); + } + }, + onChangeEnd: function onChangeEnd(e) { + var _this3 = this; + + var actionWidth = this.data.actionWidth; + var x = e.detail.x; + this.setData({ + x: x < actionWidth / 2 ? -1 : actionWidth - 1, + swiping: false + }, function () { + _this3.setData({ + x: _this3.data.x === -1 ? 0 : actionWidth + }); + }); + }, + done: function done() { + var _this4 = this; + + this.setData({ + holdSwipe: true + }, function () { + _this4.setData({ + holdSwipe: false + }); + }); + }, + onItemClick: function onItemClick(e) { + var _this5 = this; + + var onRightItemClick = this.props.onRightItemClick; + var holdSwipe = this.data.holdSwipe; + + if (onRightItemClick) { + var index = e.target.dataset.index; + onRightItemClick({ + index: index, + extra: this.props.extra, + detail: this.props.right[index], + done: this.done.bind(this) + }); + } + + if (!this.data.swiping && holdSwipe === false) { + setTimeout(function () { + _this5.setData({ + leftPos: 0, + swiping: false, + x: 0 + }); + }, 300); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/swipe-action/index.json b/node_modules/mini-antui/es/swipe-action/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/swipe-action/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/tabs/index.acss b/node_modules/mini-antui/es/tabs/index.acss new file mode 100644 index 0000000..5486c5d --- /dev/null +++ b/node_modules/mini-antui/es/tabs/index.acss @@ -0,0 +1 @@ +.am-tabs-tab-bar-wrap{width:100%}.am-tabs-bar{background:#fff;width:100%;overflow:hidden;height:42px;display:flex}.am-tabs-scroll-left{width:36px;height:39px;position:absolute;top:1px;left:0;z-index:99;background:linear-gradient(to right,#fff,rgba(255,255,255,0)) left no-repeat;background-size:100%}.am-tabs-scroll-right{width:36px;height:39px;position:absolute;top:1px;right:0;z-index:99;background:linear-gradient(to left,#fff,rgba(255,255,255,0)) left no-repeat;background-size:100%}.am-tabs-plus-wrap{display:none;position:relative;width:24px;height:43px}.am-tabs-plus-wrap.show{display:block}.am-tabs-plus{position:absolute;z-index:100;top:4px;left:0;transform:translateX(-50%);width:32px;height:32px;background-image:url(https://gw.alipayobjects.com/zos/rmsportal/DObPgppwxyNHeejHANtu.png);background-size:16px 16px;background-position:center;background-repeat:no-repeat}.am-tabs-bar-content-wrap{position:relative;flex:1}.am-tabs-bar-content{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:row}.am-tabs-bar-tab{height:42px;display:flex;align-items:center;justify-content:center;width:25%;flex-shrink:0;font-size:16px}.am-tabs-bar-title{height:42px;line-height:42px;box-sizing:border-box;position:relative;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent}.am-tabs-bar-badge.dot{position:absolute;top:3px;right:0;transform:translateX(8px)}.am-tabs-bar-badge.text{position:absolute;top:0;right:2px;transform:translateX(100%);height:16px}.am-tabs-content-wrap{margin-top:1px;display:flex;background:#fff;flex-direction:row;overflow:hidden;height:auto}.am-tabs-content-wrap.fix{height:auto!important}.am-tabs-slides{display:flex;transition-duration:.5s} \ No newline at end of file diff --git a/node_modules/mini-antui/es/tabs/index.axml b/node_modules/mini-antui/es/tabs/index.axml new file mode 100644 index 0000000..1e9bed8 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/index.axml @@ -0,0 +1,60 @@ + + + + + + + + + + + + {{item.title}} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/node_modules/mini-antui/es/tabs/index.js b/node_modules/mini-antui/es/tabs/index.js new file mode 100644 index 0000000..2c82c86 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/index.js @@ -0,0 +1,76 @@ +var _my$getSystemInfoSync = my.getSystemInfoSync(), + windowWidth = _my$getSystemInfoSync.windowWidth; + +Component({ + props: { + className: '', + activeCls: '', + tabBarUnderlineColor: '#108ee9', + // 选中选项卡下划线颜色 + tabBarActiveTextColor: '#108ee9', + // 选中选项卡字体颜色 + tabBarInactiveTextColor: '#333333', + // 未选中选项卡字体颜色 + tabBarBackgroundColor: '#ffffff', + // 选项卡背景颜色 + showPlus: false, + swipeable: true, + activeTab: 0, + // 当前激活tab + animation: true, + tabBarCls: '', + // tabbar的自定义样式class + duration: 500 + }, + data: { + windowWidth: windowWidth, + tabWidth: 0.25, + autoplay: false, + animation: false, + version: my.SDKVersion + }, + didMount: function didMount() { + var _this$props = this.props, + tabs = _this$props.tabs, + animation = _this$props.animation; + this.setData({ + tabWidth: tabs.length > 3 ? 0.25 : 1 / tabs.length, + animation: animation, + autoplay: true + }); + }, + didUpdate: function didUpdate(prevProps) { + var tabs = this.props.tabs; + + if (prevProps.tabs.length !== tabs.length) { + this.setData({ + tabWidth: tabs.length > 3 ? 0.25 : 1 / tabs.length + }); + } + }, + methods: { + handleSwiperChange: function handleSwiperChange(e) { + var current = e.detail.current; + + if (this.props.onChange) { + this.props.onChange({ + index: current + }); + } + }, + handleTabClick: function handleTabClick(e) { + var index = e.target.dataset.index; + + if (this.props.onTabClick) { + this.props.onTabClick({ + index: index + }); + } + }, + handlePlusClick: function handlePlusClick() { + if (this.props.onPlusClick) { + this.props.onPlusClick(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/tabs/index.json b/node_modules/mini-antui/es/tabs/index.json new file mode 100644 index 0000000..94f2958 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "badge": "../badge/index" + } +} diff --git a/node_modules/mini-antui/es/tabs/tab-content/index.acss b/node_modules/mini-antui/es/tabs/tab-content/index.acss new file mode 100644 index 0000000..df70d52 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/tab-content/index.acss @@ -0,0 +1 @@ +.am-tabs-pane-wrap{width:100vw;height:auto;flex-shrink:0}.fix .am-tabs-pane-wrap{position:static}.am-tabs-pane-wrap-swiper-item{position:absolute;top:0;left:0} \ No newline at end of file diff --git a/node_modules/mini-antui/es/tabs/tab-content/index.axml b/node_modules/mini-antui/es/tabs/tab-content/index.axml new file mode 100644 index 0000000..9351c27 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/tab-content/index.axml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/tabs/tab-content/index.js b/node_modules/mini-antui/es/tabs/tab-content/index.js new file mode 100644 index 0000000..e4a49f9 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/tab-content/index.js @@ -0,0 +1,6 @@ +Component({ + props: { + tabId: '', + activeTab: '' + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/tabs/tab-content/index.json b/node_modules/mini-antui/es/tabs/tab-content/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/tab-content/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/node_modules/mini-antui/es/tabs/util.sjs b/node_modules/mini-antui/es/tabs/util.sjs new file mode 100644 index 0000000..22999b0 --- /dev/null +++ b/node_modules/mini-antui/es/tabs/util.sjs @@ -0,0 +1,50 @@ +function toIntArray(v) { + const ret = []; + const version = v.split('.'); + + for (let i = 0; i < version.length; i++) { + ret.push(parseInt(version[i], 10)); + } + + return ret; +} + +const calcScrollLeft = (windowWidth, tabWidth, current) => { + let scrollInit = current * windowWidth * tabWidth; + + if (current <= 2) { + scrollInit = 0; + } else { + scrollInit = (current - 2) * windowWidth * tabWidth; + } + + return scrollInit; +}; + +const compareVersion = (v) => { + const targetVersion = toIntArray('1.10.0'); + const version = toIntArray(v); + let ret = 0; + + for (let i = 0, n1, n2; i < version.length; i++) { + n1 = targetVersion[i]; + n2 = version[i]; + + if (n1 > n2) { + ret = -1; + break + } + + if (n1 < n2) { + ret = 1; + break; + } + } + + return ret; +} + +export default { + calcScrollLeft, + compareVersion, +}; diff --git a/node_modules/mini-antui/es/tips/tips-dialog/index.acss b/node_modules/mini-antui/es/tips/tips-dialog/index.acss new file mode 100644 index 0000000..00c320c --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-dialog/index.acss @@ -0,0 +1 @@ +.am-tips-dialog{position:relative;height:55px;width:100%;padding:0 6px;box-sizing:border-box}.am-tips-dialog-wrap{display:flex;align-items:center;background:#2093e7;box-shadow:0 3px 3px rgba(0,127,255,.24);border-radius:2px;padding:0 24px 0 12px;height:100%}.am-tips-dialog-wrap::before{content:'';position:absolute;bottom:-5px;left:40px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #2093e7}.am-tips-dialog-wrap .am-tips-dialog-rectangle{padding:0 16px 0 6px}.am-tips-dialog-wrap::before .am-tips-dialog-rectangle{display:none}.am-tips-dialog-close{margin-left:5px;margin-right:11px;height:20px;width:20px;background-image:url(https://gw.alipayobjects.com/zos/rmsportal/YtkqfRVfNxhpKWnrJRUJ.png);background-size:50%;background-position:center;background-repeat:no-repeat}.am-tips-dialog-icon{height:35px;width:35px;background-color:#fff;border-radius:2px;margin-right:9px}.am-tips-dialog-icon image{width:35px;height:35px}.am-tips-dialog-content{flex:1} \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-dialog/index.axml b/node_modules/mini-antui/es/tips/tips-dialog/index.axml new file mode 100644 index 0000000..e039a47 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-dialog/index.axml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-dialog/index.js b/node_modules/mini-antui/es/tips/tips-dialog/index.js new file mode 100644 index 0000000..a7bd132 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-dialog/index.js @@ -0,0 +1,16 @@ +Component({ + props: { + show: true, + className: '', + type: 'dialog' + }, + methods: { + onCloseTap: function onCloseTap() { + var onCloseTap = this.props.onCloseTap; + + if (onCloseTap) { + onCloseTap(); + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-dialog/index.json b/node_modules/mini-antui/es/tips/tips-dialog/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-dialog/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-plain/index.acss b/node_modules/mini-antui/es/tips/tips-plain/index.acss new file mode 100644 index 0000000..8652129 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-plain/index.acss @@ -0,0 +1 @@ +.am-tips-plain-favorite{position:fixed;bottom:10px;padding:7px 10px;box-sizing:border-box;font-size:12px}.am-tips-plain-favorite-wrap{position:relative;background:#2093e7;box-shadow:0 3px 3px rgba(0,127,255,.24);border-radius:2px;color:#fff;padding:10px;min-height:10px}.am-tips-plain-favorite-content{line-height:12px;overflow:hidden;height:12px}.am-tips-plain-favorite-action:active{background:#0b71ba}.am-tips-plain-favorite-wrap::before{content:'';position:absolute;bottom:-5px;left:50%;margin-left:-10px;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #2093e7} \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-plain/index.axml b/node_modules/mini-antui/es/tips/tips-plain/index.axml new file mode 100644 index 0000000..ca4e30e --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-plain/index.axml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-plain/index.js b/node_modules/mini-antui/es/tips/tips-plain/index.js new file mode 100644 index 0000000..14d2552 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-plain/index.js @@ -0,0 +1,29 @@ +Component({ + data: { + show: true + }, + props: { + className: '', + time: 5000, + onClose: function onClose() {} + }, + didMount: function didMount() { + var _this = this; + + var show = this.data.show; + var time = this.props.time; + setTimeout(function () { + _this.setData({ + show: false + }); + }, time); + }, + methods: { + onClose: function onClose() { + this.setData({ + show: false + }); + this.props.onClose(); + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/tips/tips-plain/index.json b/node_modules/mini-antui/es/tips/tips-plain/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/tips/tips-plain/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/index.acss b/node_modules/mini-antui/es/vtabs/index.acss new file mode 100644 index 0000000..52defa3 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/index.acss @@ -0,0 +1 @@ +.am-vtabs{width:100vw;height:100vh;display:flex;flex-direction:row}.am-vtabs-bar{width:110px;overflow:hidden}.am-vtabs-bar-content{height:100%;width:120px}.am-vtabs-bar-tab{box-sizing:border-box;height:55px;width:110px;text-align:center;line-height:55px;font-size:14px;border-left-width:4px;border-left-style:solid;border-left-color:transparent;border-right-width:4px;border-right-style:solid;border-right-color:transparent;white-space:nowrap;overflow:hidden}.am-vtabs-bar-title{position:relative;display:inline-block}.am-vtabs-bar-badge.dot{position:absolute;top:11px;right:0;transform:translateX(8px)}.am-vtabs-bar-badge.text{position:absolute;top:8px;right:2px;transform:translateX(100%)}.am-vtabs-content-wrap{overflow:hidden;flex:1;height:100%;background-color:#fff}.am-vtabs-slides{height:100%}.am-vtabs-slides.animate{transition-duration:.5s} \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/index.axml b/node_modules/mini-antui/es/vtabs/index.axml new file mode 100644 index 0000000..fbe0360 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/index.axml @@ -0,0 +1,53 @@ + + + + + + + {{item.title}} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/index.js b/node_modules/mini-antui/es/vtabs/index.js new file mode 100644 index 0000000..8480403 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/index.js @@ -0,0 +1,156 @@ +Component({ + data: { + tabTop: 0, + wrapScrollTop: 0 + }, + props: { + activeTab: 0, + className: '', + tabs: [], + animated: false, + swipeable: true, + tabBarActiveTextColor: '#108ee9', + tabBarInactiveTextColor: '#333333', + tabBarActiveBgColor: '#ffffff', + tabBarInactiveBgColor: '#f8f8f8', + tabBarlineColor: '#108ee9', + onTabClick: function onTabClick() {}, + onScrollBar: function onScrollBar() {} + }, + didMount: function didMount() { + this.isScrolling = false; + this.timerId = null; + this.calcHeight(); + }, + didUpdate: function didUpdate(prevProps) { + var activeTab = this.props.activeTab; + + if (this.props.tabs.length !== prevProps.tabs.length || activeTab !== prevProps.activeTab) { + this.calcHeight(); + } + }, + didUnmount: function didUnmount() { + if (this.timerId) { + clearTimeout(this.timerId); + this.timerId = null; + } + }, + methods: { + calcHeight: function calcHeight() { + var _this = this; + + var _this$props = this.props, + tabs = _this$props.tabs, + activeTab = _this$props.activeTab; + this.anchorMap = {}; + this.indexMap = {}; + this.wrapHeight = 0; + this.scrollWrapHeight = 0; + my.createSelectorQuery().select(".am-vtabs-slides-" + this.$id).boundingClientRect().exec(function (ret) { + _this.wrapHeight = ret[0].height; + }); + var cacheHeight = 0; + + var _loop = function _loop(i) { + var anchor = tabs[i].anchor; + /* eslint-disable no-loop-func */ + + my.createSelectorQuery().select("#am-vtab-slide-" + anchor).boundingClientRect().exec(function (ret) { + _this.anchorMap[anchor] = cacheHeight; + _this.indexMap[i] = cacheHeight; + + if (activeTab === i) { + _this.setData({ + wrapScrollTop: _this.indexMap[i] + }); + } + + cacheHeight += ret[0].height; + _this.scrollWrapHeight = cacheHeight; + }); + }; + + for (var i = 0; i < tabs.length; i++) { + _loop(i); + } + }, + handleTabClick: function handleTabClick(e) { + var _e$target$dataset = e.target.dataset, + anchor = _e$target$dataset.anchor, + index = _e$target$dataset.index; + + if (!this.isScrolling || !this.props.swipeable) { + if (this.props.activeTab !== index) { + this.props.onTabClick(index); + } + + this.setData({ + wrapScrollTop: this.anchorMap[anchor] + }); + this.moveScrollBar(index); + } + }, + moveScrollBar: function moveScrollBar(current) { + var tabTop; + + if (current < 6) { + tabTop = 0; + } else { + tabTop = (current - 5) * 55; + } + + if (this.props.activeTab !== current) { + if (this.props.onChange) { + this.props.onChange(current); + } else { + this.props.onScrollBar(current); + } + } + + this.setData({ + tabTop: tabTop, + current: current + }); + }, + onScroll: function onScroll(e) { + var _this2 = this; + + var scrollTop = e.detail.scrollTop; + var keys = Object.keys(this.anchorMap); + + if (this.timerId) { + clearTimeout(this.timerId); + this.timerId = null; + } + + this.timerId = setTimeout(function () { + _this2.isScrolling = false; + }, 300); + var anchorLength = keys.length; + + for (var i = 0; i < anchorLength; i++) { + if (i === anchorLength - 1) { + // 如果是最后一个只需满足scrollTop高于当前vtab-content的高度 + if (scrollTop >= this.anchorMap[keys[i]]) { + this.moveScrollBar(i); + break; + } + } + + if (scrollTop >= Math.floor(this.anchorMap[keys[i]]) && scrollTop < Math.floor(this.anchorMap[keys[i + 1]])) { + // 如果没个vtab-content高度小于scroll-view高度,到达底部后就不需要根据scrollTop再去判断左侧的选择项 + if (scrollTop + this.wrapHeight < this.scrollWrapHeight) { + this.moveScrollBar(i); + } + + break; + } + } + }, + onWrapTouchMove: function onWrapTouchMove() { + if (this.props.swipeable) { + this.isScrolling = true; + } + } + } +}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/index.json b/node_modules/mini-antui/es/vtabs/index.json new file mode 100644 index 0000000..a303059 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "badge": "../badge/index" + } +} \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/vtab-content/index.axml b/node_modules/mini-antui/es/vtabs/vtab-content/index.axml new file mode 100644 index 0000000..02f912c --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/vtab-content/index.axml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/vtab-content/index.js b/node_modules/mini-antui/es/vtabs/vtab-content/index.js new file mode 100644 index 0000000..df2bc90 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/vtab-content/index.js @@ -0,0 +1 @@ +Component({}); \ No newline at end of file diff --git a/node_modules/mini-antui/es/vtabs/vtab-content/index.json b/node_modules/mini-antui/es/vtabs/vtab-content/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/node_modules/mini-antui/es/vtabs/vtab-content/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/node_modules/mini-antui/package.json b/node_modules/mini-antui/package.json new file mode 100644 index 0000000..1a2384d --- /dev/null +++ b/node_modules/mini-antui/package.json @@ -0,0 +1,62 @@ +{ + "name": "mini-antui", + "version": "0.5.2", + "description": "小程序版AntUI", + "repository": { + "type": "git", + "url": "git@github.com:ant-mini-program/mini-antui.git" + }, + "files": [ + "es" + ], + "keywords": [ + "antui", + "mini-program" + ], + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.1.6", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/preset-env": "^7.1.6", + "@babel/preset-typescript": "^7.1.0", + "eslint": "^5.16.0", + "eslint-config-ali": "^3.1.0", + "eslint-plugin-import": "^2.11.0", + "eslint-plugin-typescript": "^0.14.0", + "gulp": "^3.9.1", + "gulp-babel": "^8.0.0", + "gulp-clean-css": "^4.0.0", + "gulp-if": "^2.0.2", + "gulp-less": "^4.0.1", + "gulp-rename": "^1.2.3", + "lint-staged": "^8.2.0", + "mini-types": "^0.0.1", + "pre-commit": "^1.2.2", + "stylelint": "^10.1.0", + "stylelint-config-standard": "^18.2.0", + "typescript": "^3.2.4", + "typescript-eslint-parser": "^22.0.0" + }, + "scripts": { + "lint-staged": "lint-staged", + "build": "yarn && NODE_ENV=production node scripts/compiler.js", + "pub": "npm run build && node scripts/pub.js", + "dev": "yarn && node scripts/compiler.js" + }, + "pre-commit": [ + "lint-staged" + ], + "lint-staged": { + "*.ts": [ + "eslint --ext .ts", + "git add" + ], + "*.js": [ + "eslint", + "git add" + ], + "*.less": [ + "stylelint --syntax less" + ] + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..999d1d7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,419 @@ +{ + "name": "taobao-first-playlet", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "taobao-first-playlet", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "antd-mobile": "^5.33.0", + "mini-antui": "^0.5.2" + } + }, + "node_modules/@babel/runtime": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", + "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.1.3" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", + "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.4.2", + "@floating-ui/utils": "^0.1.3" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", + "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==", + "license": "MIT" + }, + "node_modules/@rc-component/mini-decimal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rc-component/mini-decimal/-/mini-decimal-1.1.0.tgz", + "integrity": "sha512-jS4E7T9Li2GuYwI6PyiVXmxTiM6b07rlD9Ge8uGZSCz3WlzcG5ZK7g5bbuKNeZ9pgUuPK/5guV781ujdVpm4HQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0" + }, + "engines": { + "node": ">=8.x" + } + }, + "node_modules/@react-spring/animated": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.6.1.tgz", + "integrity": "sha512-ls/rJBrAqiAYozjLo5EPPLLOb1LM0lNVQcXODTC1SMtS6DbuBCPaKco5svFUQFMP2dso3O+qcC4k9FsKc0KxMQ==", + "license": "MIT", + "dependencies": { + "@react-spring/shared": "~9.6.1", + "@react-spring/types": "~9.6.1" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/core": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/core/-/core-9.6.1.tgz", + "integrity": "sha512-3HAAinAyCPessyQNNXe5W0OHzRfa8Yo5P748paPcmMowZ/4sMfaZ2ZB6e5x5khQI8NusOHj8nquoutd6FRY5WQ==", + "license": "MIT", + "dependencies": { + "@react-spring/animated": "~9.6.1", + "@react-spring/rafz": "~9.6.1", + "@react-spring/shared": "~9.6.1", + "@react-spring/types": "~9.6.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-spring/donate" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/rafz": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/rafz/-/rafz-9.6.1.tgz", + "integrity": "sha512-v6qbgNRpztJFFfSE3e2W1Uz+g8KnIBs6SmzCzcVVF61GdGfGOuBrbjIcp+nUz301awVmREKi4eMQb2Ab2gGgyQ==", + "license": "MIT" + }, + "node_modules/@react-spring/shared": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/shared/-/shared-9.6.1.tgz", + "integrity": "sha512-PBFBXabxFEuF8enNLkVqMC9h5uLRBo6GQhRMQT/nRTnemVENimgRd+0ZT4yFnAQ0AxWNiJfX3qux+bW2LbG6Bw==", + "license": "MIT", + "dependencies": { + "@react-spring/rafz": "~9.6.1", + "@react-spring/types": "~9.6.1" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@react-spring/types": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.6.1.tgz", + "integrity": "sha512-POu8Mk0hIU3lRXB3bGIGe4VHIwwDsQyoD1F394OK7STTiX9w4dG3cTLljjYswkQN+hDSHRrj4O36kuVa7KPU8Q==", + "license": "MIT" + }, + "node_modules/@react-spring/web": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@react-spring/web/-/web-9.6.1.tgz", + "integrity": "sha512-X2zR6q2Z+FjsWfGAmAXlQaoUHbPmfuCaXpuM6TcwXPpLE1ZD4A1eys/wpXboFQmDkjnrlTmKvpVna1MjWpZ5Hw==", + "license": "MIT", + "dependencies": { + "@react-spring/animated": "~9.6.1", + "@react-spring/core": "~9.6.1", + "@react-spring/shared": "~9.6.1", + "@react-spring/types": "~9.6.1" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@types/js-cookie": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz", + "integrity": "sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==", + "license": "MIT" + }, + "node_modules/@use-gesture/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.0.tgz", + "integrity": "sha512-rh+6MND31zfHcy9VU3dOZCqGY511lvGcfyJenN4cWZe0u1BH6brBpBddLVXhF2r4BMqWbvxfsbL7D287thJU2A==", + "license": "MIT" + }, + "node_modules/@use-gesture/react": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.0.tgz", + "integrity": "sha512-3zc+Ve99z4usVP6l9knYVbVnZgfqhKah7sIG+PS2w+vpig2v2OLct05vs+ZXMzwxdNCMka8B+8WlOo0z6Pn6DA==", + "license": "MIT", + "dependencies": { + "@use-gesture/core": "10.3.0" + }, + "peerDependencies": { + "react": ">= 16.8.0" + } + }, + "node_modules/ahooks": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/ahooks/-/ahooks-3.7.8.tgz", + "integrity": "sha512-e/NMlQWoCjaUtncNFIZk3FG1ImSkV/JhScQSkTqnftakRwdfZWSw6zzoWSG9OMYqPNs2MguDYBUFFC6THelWXA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@types/js-cookie": "^2.x.x", + "ahooks-v3-count": "^1.0.0", + "dayjs": "^1.9.1", + "intersection-observer": "^0.12.0", + "js-cookie": "^2.x.x", + "lodash": "^4.17.21", + "resize-observer-polyfill": "^1.5.1", + "screenfull": "^5.0.0", + "tslib": "^2.4.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/ahooks-v3-count": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ahooks-v3-count/-/ahooks-v3-count-1.0.0.tgz", + "integrity": "sha512-V7uUvAwnimu6eh/PED4mCDjE7tokeZQLKlxg9lCTMPhN+NjsSbtdacByVlR1oluXQzD3MOw55wylDmQo4+S9ZQ==", + "license": "MIT" + }, + "node_modules/antd-mobile": { + "version": "5.33.0", + "resolved": "https://registry.npmjs.org/antd-mobile/-/antd-mobile-5.33.0.tgz", + "integrity": "sha512-Q1t8It+8D8Sc2Y11KR+a75leTqsEJe3C2wzF154fJmzJHxYN5efSIrCOjrDVok4hvWWilpN9wb7+lxvDwmXF7g==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.4.2", + "@rc-component/mini-decimal": "^1.1.0", + "@react-spring/web": "~9.6.1", + "@use-gesture/react": "10.3.0", + "ahooks": "^3.7.6", + "antd-mobile-icons": "^0.3.0", + "antd-mobile-v5-count": "^1.0.1", + "classnames": "^2.3.2", + "dayjs": "^1.11.7", + "lodash": "^4.17.21", + "rc-field-form": "~1.27.4", + "rc-util": "^5.30.0", + "react-is": "^18.2.0", + "runes2": "^1.1.2", + "staged-components": "^1.1.3", + "tslib": "^2.5.0", + "use-sync-external-store": "^1.2.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/antd-mobile-icons": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/antd-mobile-icons/-/antd-mobile-icons-0.3.0.tgz", + "integrity": "sha512-rqINQpJWZWrva9moCd1Ye695MZYWmqLPE+bY8d2xLRy7iSQwPsinCdZYjpUPp2zL/LnKYSyXxP2ut2A+DC+whQ==", + "license": "MIT" + }, + "node_modules/antd-mobile-v5-count": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/antd-mobile-v5-count/-/antd-mobile-v5-count-1.0.1.tgz", + "integrity": "sha512-YGsiEDCPUDz3SzfXi6gLZn/HpeSMW+jgPc4qiYUr1fSopg3hkUie2TnooJdExgfiETHefH3Ggs58He0OVfegLA==", + "license": "MIT" + }, + "node_modules/async-validator": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz", + "integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==", + "license": "MIT" + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==", + "license": "MIT" + }, + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", + "license": "MIT" + }, + "node_modules/intersection-observer": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.12.2.tgz", + "integrity": "sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==", + "license": "Apache-2.0" + }, + "node_modules/js-cookie": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", + "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/mini-antui": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/mini-antui/-/mini-antui-0.5.2.tgz", + "integrity": "sha512-Y3KSDuvrU2ygfAQMjcalNwaCu/jat/BaV43K4juKtsY9q5TUGbhKqDKEMFl6WWa7M49or52iYWsHwKBjfH9N+w==", + "deprecated": "mini-antui不再维护。推荐使用antd-mini https://mini.ant.design/" + }, + "node_modules/rc-field-form": { + "version": "1.27.4", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-1.27.4.tgz", + "integrity": "sha512-PQColQnZimGKArnOh8V2907+VzDCXcqtFvHgevDLtqWc/P7YASb/FqntSmdS8q3VND5SHX3Y1vgMIzY22/f/0Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.0", + "async-validator": "^4.1.0", + "rc-util": "^5.8.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util": { + "version": "5.38.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.38.1.tgz", + "integrity": "sha512-e4ZMs7q9XqwTuhIK7zBIVFltUtMSjphuPPQXHoHlzRzNdOwUxDejo0Zls5HYaJfRKNURcsS/ceKVULlhjBrxng==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "react-is": "^18.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "license": "MIT" + }, + "node_modules/regenerator-runtime": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", + "license": "MIT" + }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "license": "MIT" + }, + "node_modules/runes2": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/runes2/-/runes2-1.1.2.tgz", + "integrity": "sha512-v6XIdRpUKdFLNhgF2AC9XvntZsDzxyTpVlpQ8HD592XD6vHiW8jEcHFnTV5ztUjWJC5cGOcdi9YKIwxWVh0f9w==", + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/screenfull": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.2.0.tgz", + "integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/staged-components": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/staged-components/-/staged-components-1.1.3.tgz", + "integrity": "sha512-9EIswzDqjwlEu+ymkV09TTlJfzSbKgEnNteUnZSTxkpMgr5Wx2CzzA9WcMFWBNCldqVPsHVnRGGrApduq2Se5A==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "license": "0BSD" + }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..206f29d --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "taobao-first-playlet", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "mini-antui": "^0.5.2", + "@tbmp/mp-cloud-sdk": "*" + } +} diff --git a/pages/addqywx/addqywx.acss b/pages/addqywx/addqywx.acss new file mode 100644 index 0000000..6da352c --- /dev/null +++ b/pages/addqywx/addqywx.acss @@ -0,0 +1,36 @@ +page, +._addqywx_page_html { + width: 100%; + height: 100%; +} + +._addqywx_page_body { + position: relative; + width: 100%; + height: 100%; +} + +._addqywx_pa_bo_image { + width: 100%; + height: 100%; +} + +._addqywx_pa_bo_code { + position: absolute; + left: 40rpx; + bottom: 40rpx; + display: flex; + flex-direction: column; + align-items: center; + z-index: 2; +} + +._shouzhi_image { + width: 154rpx; + height: 48rpx; +} + +._code_image { + width: 220rpx; + height: 220rpx; +} \ No newline at end of file diff --git a/pages/addqywx/addqywx.axml b/pages/addqywx/addqywx.axml new file mode 100644 index 0000000..d9821c5 --- /dev/null +++ b/pages/addqywx/addqywx.axml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/addqywx/addqywx.js b/pages/addqywx/addqywx.js new file mode 100644 index 0000000..389fb16 --- /dev/null +++ b/pages/addqywx/addqywx.js @@ -0,0 +1,14 @@ +import { imageBasUrl } from '../../utils/config'; + +Page({ + data: { + imageBasUrl, + codeImage: '' + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { + // .get('/getGuidecode') + } +}) \ No newline at end of file diff --git a/pages/addqywx/addqywx.json b/pages/addqywx/addqywx.json new file mode 100644 index 0000000..f433381 --- /dev/null +++ b/pages/addqywx/addqywx.json @@ -0,0 +1,3 @@ +{ + "defaultTitle": "联系客服" +} \ No newline at end of file diff --git a/pages/binge/binge.acss b/pages/binge/binge.acss new file mode 100644 index 0000000..de1792f --- /dev/null +++ b/pages/binge/binge.acss @@ -0,0 +1,67 @@ +page, +._binge_page_html { + background-color: #F1F4FA; +} + +._binge_page_body { + padding: 30rpx 0; +} + +._bin_bo_step_sign_in { + width: 100%; + height: 190rpx; + padding: 0 20rpx; +} + +._bin_bo_step_my_vido { + padding: 0 30rpx 30rpx; +} + +._step_my_vido_warp { + width: 100%; + padding: 40rpx 0 0 30rpx; + background-color: #fff; + border-radius: 16rpx; +} + +._vido_warp_header { + display: flex; + justify-content: space-between; + margin-bottom: 30rpx; + padding-right: 30rpx; +} + +._vi_wa_he_title { + padding-left: 16rpx; + border-left: 4rpx solid #CE3636; +} + +._vi_wa_he_title >text { + line-height: 1; + font-size: 32rpx; + font-weight: 600; + color: #333; +} + +._vi_wa_he_edit_t >text { + line-height: 1; + font-size: 30rpx; + font-weight: 500; + color: #1a1a1a; + margin-left: 6rpx; +} + +._vido_warp_content { + display: flex; + flex-wrap: wrap; +} + +._pursue_item { + width: 33.33%; + padding-right: 30rpx; + margin-bottom: 30rpx; +} + +.my_footer { + padding: 40rpx 0; +} \ No newline at end of file diff --git a/pages/binge/binge.axml b/pages/binge/binge.axml new file mode 100644 index 0000000..10fe33c --- /dev/null +++ b/pages/binge/binge.axml @@ -0,0 +1,72 @@ + + + + + + + + + 我的追剧 + + + + + 编辑 + + + 完成 + + + + + + + + + + + + + + + + + + + + + + + + + + + 猜你喜欢 + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/binge/binge.js b/pages/binge/binge.js new file mode 100644 index 0000000..c3c100a --- /dev/null +++ b/pages/binge/binge.js @@ -0,0 +1,91 @@ +import { imageBasUrl } from '../../utils/config'; +const { httpRequest } = getApp(); + +Page({ + data: { + imageBasUrl, + likelist: [], + bookcase: [], + signin: 0, + isEdit: false + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { + this.isGetList(); + }, + isGetList() { + const paramenter = { + path: '/chasingdrama', + method: 'GET', + // body: { + // uid: 24 + // } + } + httpRequest(paramenter).then(res => { + console.log(res, "chasingdrama") + if (res.status == 1) { + const { data } = res; + this.setData({ + likelist: data.likelist, + bookcase: data.bookcase, + signin: data.signin + }) + } + }) + }, + + setSignIn() { + const paramenter = { + path: '/signin', + method: 'GET', + // body: { + // uid: 24 + // } + } + httpRequest(paramenter).then(res => { + console.log(res, "signin") + if (res.status == 1) { + const { data } = res; + my.showToast({ + content: `${data.msg},获得${data.money}看币`, + duration: 3000, + }); + } + }) + }, + + editPursue() { + // this.isEdit = !this.isEdit; + const isEdit = this.data.isEdit; + this.setData({ + isEdit: !isEdit + }) + }, + + onDelItem(data) { + const bookcase = this.data.bookcase; + const paramenter = { + path: '/chasingdramadel', + method: 'POST', + body: { + sid: data.articleid + } + } + httpRequest(paramenter).then(res => { + console.log(res, "chasingdramadel") + const temp = bookcase.filter(r => r.id !== data.id); + if (res.status == 1) { + this.setData({ + bookcase: temp, + }) + my.showToast({ + content: '删除成功!', + duration: 3000, + }); + } + }) + } + +}) \ No newline at end of file diff --git a/pages/binge/binge.json b/pages/binge/binge.json new file mode 100644 index 0000000..f641ed4 --- /dev/null +++ b/pages/binge/binge.json @@ -0,0 +1,8 @@ +{ + "defaultTitle": "追剧", + "usingComponents": { + "my-empty": "/components/myEmpty/myEmpty", + "pursue-item": "/components/pursueItem/pursueItem", + "my-footer": "/components/myFooter/myFooter" + } +} \ No newline at end of file diff --git a/pages/discover/discover.acss b/pages/discover/discover.acss new file mode 100644 index 0000000..492ff24 --- /dev/null +++ b/pages/discover/discover.acss @@ -0,0 +1,16 @@ +._discover_list { + width: 100%; + padding: 30rpx; +} + +._discover_li_item { + width: 100%; + height: 800rpx; + margin-bottom: 30rpx; +} + +._discover_li_item ._it_img{ + display: block; + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/pages/discover/discover.axml b/pages/discover/discover.axml new file mode 100644 index 0000000..58962eb --- /dev/null +++ b/pages/discover/discover.axml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/pages/discover/discover.js b/pages/discover/discover.js new file mode 100644 index 0000000..1a8014b --- /dev/null +++ b/pages/discover/discover.js @@ -0,0 +1,45 @@ +const { httpRequest } = getApp(); + +Page({ + data: { + disvoverList: [], + page: 1 + }, + onShow() { + const page = this.data.page; + this.isWallpaper(page); + }, + isWallpaper(page) { + const disvoverList = this.data.disvoverList; + const paramenter = { + path: '/wallpaper', + method: 'GET', + params: { + page: page + } + } + httpRequest(paramenter).then(res => { + console.log(res, "wallpaper") + if (res.status == 1) { + if (page == 1) { + this.setData({ + disvoverList: res.list, + }) + } else { + this.setData({ + disvoverList: [...disvoverList, ...res.list], + }) + } + } + }) + }, + onReachBottom() { + // 页面被拉到底部 + console.log("========") + const page = this.data.page; + this.isWallpaper(page); + this.setData({ + page: page + 1 + }) + }, +}) \ No newline at end of file diff --git a/pages/discover/discover.json b/pages/discover/discover.json new file mode 100644 index 0000000..1137138 --- /dev/null +++ b/pages/discover/discover.json @@ -0,0 +1,3 @@ +{ + "defaultTitle": "壁纸" +} \ No newline at end of file diff --git a/pages/give/give.acss b/pages/give/give.acss new file mode 100644 index 0000000..94d548e --- /dev/null +++ b/pages/give/give.acss @@ -0,0 +1,53 @@ +page { + background-color: #F1F4FA; +} + +._give_page_body { + padding: 30rpx; +} + +._g_bo_li_warp { + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; + height: 130rpx; + background-color: #fff; + border-radius: 18rpx; + padding: 0 24rpx; +} + +._g_li_wa_item { + display: flex; + justify-content: space-between; + align-items: center; +} + +._g_wa_le_over >text { + line-height: 1; + font-size: 30rpx; + color: #1a1a1a; +} + + +._g_wa_le_add_time{ + line-height: 1; + font-size: 22rpx; + color: #666666; +} + +._g_wa_ri_egold >text{ + line-height: 1; + font-size: 30rpx; + color: #1A1A1A; +} + +._g_wa_ri_egold .active { + color: #CE3636; +} + +._g_wa_ri_other { + line-height: 1; + font-size: 24rpx; + color: #1A1A1A; +} \ No newline at end of file diff --git a/pages/give/give.axml b/pages/give/give.axml new file mode 100644 index 0000000..c28a57a --- /dev/null +++ b/pages/give/give.axml @@ -0,0 +1,36 @@ + + + + + + + + + + 余额: {{ item.over || 0 }} + + + +{{ item.egold || 0 }} + + + + + {{ item.addtime || "6666" }} + + + {{ item.text || "66" }} + + + + + + + + + + + + + + +" \ No newline at end of file diff --git a/pages/give/give.js b/pages/give/give.js new file mode 100644 index 0000000..74b2fb6 --- /dev/null +++ b/pages/give/give.js @@ -0,0 +1,10 @@ +Page({ + data: { + giveList: [], + giveFlag: true + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { } +}) \ No newline at end of file diff --git a/pages/give/give.json b/pages/give/give.json new file mode 100644 index 0000000..cc07402 --- /dev/null +++ b/pages/give/give.json @@ -0,0 +1,6 @@ +{ + "defaultTitle": "赠币明细", + "usingComponents": { + "my-empty": "/components/myEmpty/myEmpty" + } +} \ No newline at end of file diff --git a/pages/history/history.acss b/pages/history/history.acss new file mode 100644 index 0000000..a2ea949 --- /dev/null +++ b/pages/history/history.acss @@ -0,0 +1,55 @@ +page { + background-color: #F1F4FA; +} + +._history_page_body { + padding: 30rpx; +} + +._pa_bx_li_warp { + display: flex; + background-color: #fff; + border-radius: 18rpx; +} + +._bx_li_wa_left { + flex-shrink: 0; +} + +._li_wa_le_image { + width: 236rpx; + height: 236rpx; +} + +._bx_li_wa_right { + flex: 1; + flex-shrink: 0; + display: flex; + flex-direction: column; + justify-content: center; +} + +._li_wa_ri_name > text{ + line-height: 1; + font-size: 36rpx; + font-weight: bold; + color: #1a1a1a; +} + +._li_wa_ri_spectate > text { + line-height: 1; + font-size: 30rpx; + font-weight: 400; + color: #666666; +} + +._li_wa_ri_spectate .order { + color: #333333; +} + +._li_wa_ri_update > text { + line-height: 1; + font-size: 30rpx; + font-weight: 400; + color: #333333; +} diff --git a/pages/history/history.axml b/pages/history/history.axml new file mode 100644 index 0000000..fe24370 --- /dev/null +++ b/pages/history/history.axml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + {{item.name || '-'}} + + + + 观看到 + 第{{ item.order || 0 }}集 + + + + 更新至{{ item.latestid }}集 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/history/history.js b/pages/history/history.js new file mode 100644 index 0000000..d8237a1 --- /dev/null +++ b/pages/history/history.js @@ -0,0 +1,16 @@ +Page({ + data: { + historyList: [], + listFlag: true + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { }, + toGetVideo(event) { + const data = event.target.dataset.item; + my.navigateTo({ + url: `/pages/video/index?sid=${data.id}&id=${data.chapterid || ""}`, + }); + } +}) \ No newline at end of file diff --git a/pages/history/history.json b/pages/history/history.json new file mode 100644 index 0000000..3f8a497 --- /dev/null +++ b/pages/history/history.json @@ -0,0 +1,6 @@ +{ + "defaultTitle": "历史记录", + "usingComponents": { + "my-empty": "/components/myEmpty/myEmpty" + } +} \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.acss b/pages/index/components/recommend/recommend.acss new file mode 100644 index 0000000..9d2ea45 --- /dev/null +++ b/pages/index/components/recommend/recommend.acss @@ -0,0 +1,191 @@ + + +._banner_warp { + position: relative; + width: 100%; + height: 724rpx; +} + +._banner_swiper { + position: absolute; + top: 0; + width: 100%; + height: 724rpx; +} + +._ba_swiper_item { + width: 100%; + height: 100%; +} + +._banner_search_warp { + display: flex; + align-items: center; + position: absolute; + top: 24rpx; + left: 24rpx; + width: 500rpx; + height: 80rpx; + padding-left:16rpx; + background: rgba(255, 255, 255, 0.2); + border-radius: 5px; + z-index: 2; +} + +._search_placeholder > text { + line-height: 1; + color:#B2B2B2 ; + font-size: 28rpx; + margin-left: 16rpx; +} + +._vido_list_content { + padding: 30rpx 0; +} + +._v_li_con_item { + padding: 0 30rpx; +} + +._li_con_item_header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 40rpx 0; +} + +._it_head_title { + padding-left: 16rpx; + border-left: 4rpx solid #CE3636; +} + +._it_head_title> text { + line-height: 1; + font-size: 32rpx; + color: #1a1a1a; + font-weight: 600; +} + +._it_head_exit > text{ + line-height: 1; + font-size: 26rpx; + color: #999; +} + +._it_boutique_warp { + width: 100%; + margin-bottom: 30rpx; +} + +.scroll_view_H { + display: flex; + width: 100%; +} + +._bou_wa_scr_H { + width: 200rpx; + margin-right: 20rpx; +} + +._bou_scr_ul_image { + width: 200rpx; + height: 298rpx; + border-radius: 16rpx; +} + +._bou_scr_ul_name { + width: 100%; + margin-top: 20rpx; +} + +._bou_scr_ul_name >text{ + display: block; + width: 100%; + line-height: 1; + color: #1a1a1a; + font-size: 34rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +._it_think_warp { + display: flex; + flex-wrap: wrap; + width: 100%; +} + +._think__wa_ul { + min-width: 50%; + margin-bottom: 30rpx; +} + +._think__wa_ul.active_left { + padding-left: 15rpx; +} + +._think__wa_ul.active_right { + padding-right: 15rpx; +} + +._think__ul_li { + width: 100%; + background-color: #fff; + border-radius: 16rpx; +} + +._think__li_image { + height: 460rpx; +} + +._think__li_name { + display: block; + width: 100%; + padding: 30rpx 20rpx; + line-height: 1; + color: #1a1a1a; + font-size: 34rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +._v_li_heat_item { + padding-left: 30rpx; +} + +._it_heat_warp { + display: flex; + flex-wrap: wrap; +} + +._heat_wa_ul { + width: 33.33%; + margin-bottom: 30rpx; +} + +._heat__ul_li { + padding-right: 30rpx; +} + +._heat__li_image { + width: 100%; + height: 300rpx; + background-color: pink; +} + +._heat__li_name >text { + display: block; + width: 100%; + margin-top: 20rpx; + line-height: 1; + color: #1a1a1a; + font-size: 34rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +._rem_my_footer { + margin-top: 50rpx; +} \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.axml b/pages/index/components/recommend/recommend.axml new file mode 100644 index 0000000..f619742 --- /dev/null +++ b/pages/index/components/recommend/recommend.axml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + 寻找你喜欢的短剧 + + + + + + + + + 精品短剧 + + + 超级无敌好看剧集 + + + + + + + + + + + {{item.name}} + + + + + + + + + + + 猜你想追 + + + + + + + + + + + + + + 全网热播 + + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.js b/pages/index/components/recommend/recommend.js new file mode 100644 index 0000000..71f3729 --- /dev/null +++ b/pages/index/components/recommend/recommend.js @@ -0,0 +1,34 @@ +Component({ + mixins: [], + data: {}, + props: { + pageDataInfo: { + bannerList: [], + module1: [], + module2: [], + module3: [], + } + }, + didMount() { }, + didUpdate() { }, + didUnmount() { }, + methods: { + bannerChange(event) { + + }, + getVideo(event) { + + }, + toPathVideo(event) { + const data = event.target.dataset.item; + my.navigateTo({ + url: `/pages/video/video?sid=${data.bookid || data.id}` + }); + }, + getSearch() { + my.navigateTo({ + url: '/pages/search/search' + }) + } + }, +}); \ No newline at end of file diff --git a/pages/index/components/recommend/recommend.json b/pages/index/components/recommend/recommend.json new file mode 100644 index 0000000..1b9f7f7 --- /dev/null +++ b/pages/index/components/recommend/recommend.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "am-icon": "mini-antui/es/am-icon/index", + "my-footer": "/components/myFooter/myFooter" + } +} \ No newline at end of file diff --git a/pages/index/index.acss b/pages/index/index.acss new file mode 100644 index 0000000..2a48f24 --- /dev/null +++ b/pages/index/index.acss @@ -0,0 +1,96 @@ +page, +._index_container { + background-color: #F1F4FA; +} + +._bao_xian { + position: fixed; + bottom: 200rpx; + right: 20rpx; + width: 200rpx; + height: 200rpx; + z-index: 100; +} + +._bao_xian_image { + width: 100%; + height: 100%; +} + +._bao_xian_icon_close { + position: absolute; + top: 0; + width: 30rpx; + height: 30rpx; + right: 0rpx; +} + +._din_yue { + position: fixed; + top: 300rpx; + left: 20rpx; + width: 140rpx; + height: 140rpx; + z-index: 99; +} + +._din_yue_icon_close { + position: absolute; + top: -30rpx; + left: 20rpx; + width: 30rpx; + height: 30rpx; + right: 0rpx; +} + +._history_content { + position: fixed; + bottom: 30rpx; + z-index: 99; +} + +.history_con_warp { + width: 100%; + /* height: 100rpx; */ + justify-content: space-between; +} + +._his_cover_image { + width: 88rpx; + height: 100rpx; + border-radius: 14rpx; +} + +._his_info_name { + width: 160rpx; + line-height: 1; + font-size: 34rpx; + margin-top: 12rpx; + margin-bottom: 14rpx; + color: #fff; + text-overflow: ellipsis !important; + /* #ifndef APP-NVUE */ + overflow: hidden !important; + white-space: nowrap !important; +} + +._his_info_series { + line-height: 1; + font-size: 26rpx; + color: rgba(255, 255, 255, 0.8) +} + +._his_con_w_right { + align-items: center; +} + +._his_jixu { + width: 184rpx; + height: 68rpx; + background: #ffffff; + border-radius: 34rpx; + font-size: 30rpx; + color: #db601a; + line-height: 68rpx; + text-align: center; +} \ No newline at end of file diff --git a/pages/index/index.axml b/pages/index/index.axml new file mode 100644 index 0000000..dfabcde --- /dev/null +++ b/pages/index/index.axml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ history.name }} + 上次观看到第{{ history.order || 0 }}集 + + + + + 继续观看 + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..8cbe45d --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,93 @@ +Page({ + data: { + baoxianFlag: true, + tabIndex: 0, + history: {}, + historyShow: true, + dinyueFlag: false, + pageDataInfo: { + bannerList: [], + module1: [], + module2: [], + module3: [], + } + }, + onShow() { + // 页面显示 + // my.authorize({ + // scopes: 'scope.userInfo', + // success: (res) => { + // console.log(res, "resres") + // my.getAuthUserInfo({ + // success: (userInfo) => { + // console.log(userInfo, "resres") + // //昵称 userInfo.nickName + // //头像 userInfo.avatar + // } + // }); + // }, + // }); + this.isGetList(); + }, + + isGetList() { + const { httpRequest } = getApp(); + const paramenter = { + path: '/index', + method: 'GET', + // body: { + // uid: 24 + // } + } + httpRequest(paramenter).then(res => { + if (res.status == 1) { + const { data } = res; + this.setData({ + pageDataInfo: { + bannerList: data.ads, + module1: data.module1, + module2: data.module2, + module3: data.module3, + } + }) + } + }) + }, + + closeBaoXian() { + this.setData({ + baoxianFlag: false + }) + }, + + closeDinYue() { + this.setData({ + dinyueFlag: false + }) + }, + + navgetHistory() { + my.navigateTo({ + url: `/pages/video/index?sid=${this.history.sid}&id=${this.history.id || "" + }`, + }); + }, + + closeHisMadel() { + this.setData({ + historyShow: false + }) + }, + + getDinyue() { }, + + onHide() { + // 页面隐藏 + }, + onPullDownRefresh() { + // 页面被下拉 + }, + onReachBottom() { + // 页面被拉到底部 + }, +}); diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..423c16c --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,7 @@ +{ + "defaultTitle":"追剧", + "usingComponents": { + "am-icon": "mini-antui/es/am-icon/index", + "recommend":"./components/recommend/recommend" + } +} \ No newline at end of file diff --git a/pages/my/my.acss b/pages/my/my.acss new file mode 100644 index 0000000..bb2a850 --- /dev/null +++ b/pages/my/my.acss @@ -0,0 +1,178 @@ +page { + background-color: #F1F4FA; +} + +._my_html { + position: relative; +} + +._my_ht_ba_image { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 610rpx; +} + +._my_body { + position: relative; + z-index: 2; +} + +._m_b_user_info { + display: flex; + justify-content: space-between; + padding: 30rpx; +} + + +._b_us_in_left { + display: flex; +} + +._us_in_le_avater { + width: 128rpx; + height: 128rpx; + border-radius: 50%; + overflow: hidden; +} + +._us_in_le_other { + display: flex; + flex-direction: column; + justify-content: center; + margin-left: 20rpx; +} + +._us_in_ot_person { + display: flex; +} + +._us_in_ot_pe_name { + line-height: 1; + font-size: 44rpx; + margin-right: 10rpx; + color: #fff; + font-weight: 500; +} + +._us_in_ot_vip { + width: 48rpx; + height: 48rpx; +} + +._us_in_ot_id { + line-height: 1; + font-size: 28rpx; + color: #eee; + margin-top: 16rpx; +} + +._b_us_in_right { + display: flex; + justify-content: center; + align-items: center; +} + +._us_in_ri_refresh_icon { + width: 60rpx; + height: 60rpx; +} + +._m_b_money_info { + width: 100%; + padding:0 30rpx; +} + +._b_mo_in_warp { + display: flex; + width: 100%; + height: 188rpx; + background: #fff; + border-radius: 18rpx; + padding: 0 24rpx; +} + +._mo_in_wa_left{ + flex: 1; + flex-shrink: 0; + display: flex; + justify-content: space-around; + align-items: center; +} + +._in_wa_left_item { + display: flex; + flex-direction: column; + align-items: center; +} + +._wa_le_it_num { + line-height: 1; + font-size: 40rpx; + font-weight: 500; + color: #1A1A1A; +} + +._wa_le_it_name { + line-height: 1; + margin-top: 20rpx; + font-size: 30rpx; + color: #666; +} + +._mo_in_wa_right { + display: flex; + align-items: center; + margin-left: 24rpx; +} + +._in_wa_ri_btn { + display: flex; + justify-content: center; + align-items: center; + width: 212rpx; + height: 76rpx; + border-radius: 18rpx; + background: linear-gradient(89.9deg, #ffd540 0.08%, #fe650f 99.91%); +} + +._in_wa_ri_btn >text { + line-height: 1; + font-size: 32rpx; + color: #fff; +} + +._m_b_othen_to_list { + padding: 30rpx; +} + +._ot_to_li_his_comm .am-list-item { + border-radius: 16rpx; +} + +._ot_to_li_other_comm .am-list-body { + border-radius: 16rpx; + overflow: hidden; +} + +._ot_to_li_his_comm .am-list-item.am-list-item-hover, +._ot_to_li_other_comm .am-list-item.am-list-item-hover{ + background-color: #fff; +} + +._ot_to_li_his_comm .am-list-body::before, +._ot_to_li_his_comm .am-list-line-bottom::after, +._ot_to_li_other_comm .am-list-body::before, +._ot_to_li_other_comm .am-list-line-bottom::after { + display: none; +} + +.am-list-line { + height: 112rpx; +} + +._his_comm_li_it_title { + font-size: 36rpx; + color: #1A1A1A; +} \ No newline at end of file diff --git a/pages/my/my.axml b/pages/my/my.axml new file mode 100644 index 0000000..debcd56 --- /dev/null +++ b/pages/my/my.axml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + {{ userInfo.egold || 0 }} + + + 我的K币 + + + + + {{ userInfo.vip_enddate || 0 }} + + + 会员天数 + + + + + + + 立即充值 + + + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/my/my.js b/pages/my/my.js new file mode 100644 index 0000000..0bd13d5 --- /dev/null +++ b/pages/my/my.js @@ -0,0 +1,53 @@ +import { imageBasUrl } from '../../utils/config'; +import { myToPathList, myToHistroy } from "../../utils/constData"; + +Page({ + data: { + imageBasUrl, + userInfo: {}, + myToPathList: myToPathList, + myToHistroy: myToHistroy, + popupShow: false + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { + this.setData({ + userInfo: getApp().globalData.userInfo, + systemInfo: getApp().globalData.systemInfo, + }) + }, + + getUserInfo() { + + }, + toPathOtherPage(event) { + console.log(event, "==========") + const url = event.target.dataset.item.toPath; + my.navigateTo({ + url: url + }); + }, + goIndex() { + my.switchTab({ + url: '/pages/index/index', + }) + }, + getPayG() { + my.hideTabBar({ + animation: true + }) + this.setData({ + popupShow: true + }) + }, + onClosePopup() { + this.setData({ + popupShow: false + }) + my.showTabBar({ + animation: true + }) + } +}) \ No newline at end of file diff --git a/pages/my/my.json b/pages/my/my.json new file mode 100644 index 0000000..0f58bf9 --- /dev/null +++ b/pages/my/my.json @@ -0,0 +1,8 @@ +{ + "defaultTitle": "我的", + "usingComponents": { + "list": "mini-antui/es/list/index", + "list-item": "mini-antui/es/list/list-item/index", + "my-pay": "/components/myPay/myPay" + } +} \ No newline at end of file diff --git a/pages/purchaseNotes/purchaseNotes.acss b/pages/purchaseNotes/purchaseNotes.acss new file mode 100644 index 0000000..3d40d46 --- /dev/null +++ b/pages/purchaseNotes/purchaseNotes.acss @@ -0,0 +1,30 @@ +page{ + background-color: #F1F4FA; +} + +._li_wa_title{ + display: flex; + align-items: center; + width: 100%; + height: 100rpx; + background-color: #fff; + padding: 0 30rpx; +} + +._li_wa_title >text { + line-height: 1; + font-size: 32rpx; + color: #1a1a1a; +} + +._li_wa_content { + width: 100%; + padding: 30rpx; + background-color: #FFF8E5; +} + +._li_wa_content > text { + font-size: 28rpx; + line-height: 2; + color: #7F7F7F; +} \ No newline at end of file diff --git a/pages/purchaseNotes/purchaseNotes.axml b/pages/purchaseNotes/purchaseNotes.axml new file mode 100644 index 0000000..8d89e48 --- /dev/null +++ b/pages/purchaseNotes/purchaseNotes.axml @@ -0,0 +1,16 @@ + + + + + + + {{item.name}} + + + {{item.content}} + + + + + + \ No newline at end of file diff --git a/pages/purchaseNotes/purchaseNotes.js b/pages/purchaseNotes/purchaseNotes.js new file mode 100644 index 0000000..8c25e04 --- /dev/null +++ b/pages/purchaseNotes/purchaseNotes.js @@ -0,0 +1,20 @@ +Page({ + data: { + purchaseList: [] + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { + const purchaseList = [ + { id: '1', name: '购买须知1', content: '1、k币和会员属于虚拟产品,一经购买不可退换' }, + { id: '2', name: '购买须知2', content: '2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作。' }, + // { id: '3', name: '购买须知3', content: userInfo.giftTime }, + { id: '3', name: '购买须知3', content: '购买须知3' }, + { id: '4', name: '购买须知4', content: '4、充值K币一般在10分钟内到账,如未到账请在“我的”页面联系客服' }, + ] + this.setData({ + purchaseList: purchaseList + }) + } +}) \ No newline at end of file diff --git a/pages/purchaseNotes/purchaseNotes.json b/pages/purchaseNotes/purchaseNotes.json new file mode 100644 index 0000000..bf1ca58 --- /dev/null +++ b/pages/purchaseNotes/purchaseNotes.json @@ -0,0 +1,3 @@ +{ + "defaultTitle": "购买须知" +} \ No newline at end of file diff --git a/pages/search/search.acss b/pages/search/search.acss new file mode 100644 index 0000000..b81b203 --- /dev/null +++ b/pages/search/search.acss @@ -0,0 +1,75 @@ +page { + background-color: #F1F4FA; +} + +._serach_html { + padding: 24rpx; +} + +._s_b_search_i_warp { + width: 100%; + height: 72rpx; + margin-bottom: 40rpx; +} + +._s_b_search_i_warp .am-search { + height: 72rpx; + background-color: transparent; + /* padding: 0; */ +} + +._s_b_search_i_warp .am-search-input{ + height: 72rpx; + line-height: 72rpx; + background: #fff; + border-radius: 8rpx; +} + +._s_b_search_i_warp .am-search-synthetic, +._s_b_search_i_warp .am-search-value { + height: 72rpx; + line-height: 72rpx; +} + +._search_result_title { + line-height: 1; + font-size: 32rpx; + font-weight: bold; + color: #1a1a1a; + margin-bottom: 20rpx; +} + + +._search_history { + width: 100%; +} + +._se_his_header { + justify-content: space-between; +} + +._his_hea_name { + line-height: 1; + font-size: 32rpx; + font-weight: bold; + color: #1a1a1a; +} + +._se_his_list { + flex-wrap: wrap; +} + +._his_list_item { + padding: 8rpx 20rpx; + background: #f3f3f3; + border-radius: 58rpx; + margin-right: 20rpx; + margin-bottom: 20rpx; +} + +._hi_li_it_text { + font-size: 28rpx; + font-weight: 400; + color: #1a1a1a; +} + \ No newline at end of file diff --git a/pages/search/search.axml b/pages/search/search.axml new file mode 100644 index 0000000..9655d9b --- /dev/null +++ b/pages/search/search.axml @@ -0,0 +1,48 @@ + + + + + + + + + + 搜索结果 + + + + + + + + + + + + + + + + + + + 历史搜索 + + + + + + + + + + {{item}} + + + + + + + + \ No newline at end of file diff --git a/pages/search/search.js b/pages/search/search.js new file mode 100644 index 0000000..571480c --- /dev/null +++ b/pages/search/search.js @@ -0,0 +1,66 @@ +import { imageBasUrl } from '../../utils/config' +Page({ + data: { + searchKeyword: '', + searchFlag: false, + searchList: [], + historySearch: [] + }, + + onLoad(query) { + console.log('page onLoad', query) + }, + + onShow() { }, + + handleSearchClear() { + this.setData({ + searchKeyword: '' + }) + }, + + handleSearchSubmit(event) { + this.setData({ + searchKeyword: event + }) + }, + + handleSearchInput(event) { + this.setData({ + searchKeyword: event + }) + }, + + setHistorySearch(historySearch = []) { + this.setData({ + historySearch, + }) + my.setStorageSync('historySearch', historySearch); + }, + + clearHistoryList() { + my.confirm({ + title: '温馨提示', + content: '你确定要删除历史记录吗', + confirmButtonText: '是', + cancelButtonText: '否', + success: (result) => { + console.log(result, "resultresult") + if (result.confirm) { + this.setHistorySearch(); + } + }, + }); + }, + + historuNavigator(event) { + this.setData({ + searchKeyword: '' + }) + }, + + onDelItem() { + console.log("[[[[[[[[[[") + } + +}) \ No newline at end of file diff --git a/pages/search/search.json b/pages/search/search.json new file mode 100644 index 0000000..d84d654 --- /dev/null +++ b/pages/search/search.json @@ -0,0 +1,9 @@ +{ + "defaultTitle": "搜索", + "usingComponents": { + "search-bar": "mini-antui/es/search-bar/index", + "am-icon": "mini-antui/es/am-icon/index", + "my-empty": "/components/myEmpty/myEmpty", + "pursue-item": "/components/pursueItem/pursueItem" + } +} \ No newline at end of file diff --git a/pages/transaction/transaction.acss b/pages/transaction/transaction.acss new file mode 100644 index 0000000..8ced41b --- /dev/null +++ b/pages/transaction/transaction.acss @@ -0,0 +1,71 @@ +page { + background-color: #F1F4FA; +} + +._transaction_page_body { + padding: 30rpx; +} + +._bo_da_li_warp { + background-color: #fff; + border-radius: 18rpx; +} + +._da_li_wa_header { + position: relative; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 104rpx; + border-bottom: 2rpx dashed #EEEEEE; +} + +._da_li_wa_header ._is_round{ + position: absolute; + bottom: 0; + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background-color: #F1F4FA; +} + +._da_li_wa_header ._is_round._round_after { + right: 0; + transform: translate(50%,50%); +} + +._da_li_wa_header ._is_round._round_before { + left: 0; + transform: translate(-50%,50%); +} + +._wa_he_title >text { + line-height: 1; + font-size: 36rpx; + font-weight: 700; + color: #000000; +} + +._da_li_wa_container { + padding: 50rpx 24rpx; +} + +._wa_con_info { + display: flex; + align-items: center; +} + +._goods_name { + line-height: 1; + font-size: 30rpx; + font-weight: 400; + color: #333333; +} + +._goods_code { + line-height: 1; + font-size: 22rpx; + font-weight: 400; + color: #999; +} diff --git a/pages/transaction/transaction.axml b/pages/transaction/transaction.axml new file mode 100644 index 0000000..f3db6e5 --- /dev/null +++ b/pages/transaction/transaction.axml @@ -0,0 +1,33 @@ + + + + + + + + + + + + 充值39.90元未支付 + + + + + 订单号码: + GGYSJ_20231030111806653f206eef218197 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/transaction/transaction.js b/pages/transaction/transaction.js new file mode 100644 index 0000000..b4a8e5a --- /dev/null +++ b/pages/transaction/transaction.js @@ -0,0 +1,10 @@ +Page({ + data: { + rechargeList: [], + rechargeFlag: true + }, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() { } +}) \ No newline at end of file diff --git a/pages/transaction/transaction.json b/pages/transaction/transaction.json new file mode 100644 index 0000000..3411ae6 --- /dev/null +++ b/pages/transaction/transaction.json @@ -0,0 +1,6 @@ +{ + "defaultTitle": "充值明细", + "usingComponents": { + "my-empty": "/components/myEmpty/myEmpty" + } +} \ No newline at end of file diff --git a/pages/video/video.acss b/pages/video/video.acss new file mode 100644 index 0000000..e69de29 diff --git a/pages/video/video.axml b/pages/video/video.axml new file mode 100644 index 0000000..04a4ce6 --- /dev/null +++ b/pages/video/video.axml @@ -0,0 +1,3 @@ + + new page + \ No newline at end of file diff --git a/pages/video/video.js b/pages/video/video.js new file mode 100644 index 0000000..97645e8 --- /dev/null +++ b/pages/video/video.js @@ -0,0 +1,7 @@ +Page({ + data: {}, + onLoad(query) { + console.log('page onLoad', query) + }, + onShow() {} +}) \ No newline at end of file diff --git a/pages/video/video.json b/pages/video/video.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/video/video.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pages/wxkf/wxkf.acss b/pages/wxkf/wxkf.acss new file mode 100644 index 0000000..f85b1c4 --- /dev/null +++ b/pages/wxkf/wxkf.acss @@ -0,0 +1,30 @@ +page { + width: 100%; + height: 100%; +} + +._wxkf_html { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; +} + +._wxkf_page_body { + display: flex; + flex-direction: column; + align-items: center; +} + +._wxkf_image_bx { + width: 520rpx; + height: 520rpx; +} + +._wxkf_tips_t > text { + line-height: 1; + font-size: 50rpx; + color: #333; + font-weight: 500; +} \ No newline at end of file diff --git a/pages/wxkf/wxkf.axml b/pages/wxkf/wxkf.axml new file mode 100644 index 0000000..d5679d0 --- /dev/null +++ b/pages/wxkf/wxkf.axml @@ -0,0 +1,13 @@ + + + + + + + 长按识别二维码 + + + 添加客服 + + + \ No newline at end of file diff --git a/pages/wxkf/wxkf.js b/pages/wxkf/wxkf.js new file mode 100644 index 0000000..094fdf6 --- /dev/null +++ b/pages/wxkf/wxkf.js @@ -0,0 +1,25 @@ +const { httpRequest } = getApp(); + +Page({ + data: { + kfImg: '' + }, + onShow() { + this.getkefu(); + }, + getkefu() { + const paramenter = { + path: '/getkefu', + method: 'GET', + } + httpRequest(paramenter).then(res => { + console.log(res, "getkefu") + if (res.status == 1) { + const { data } = res; + this.setData({ + kfImg: data.wxkf, + }) + } + }) + } +}) \ No newline at end of file diff --git a/pages/wxkf/wxkf.json b/pages/wxkf/wxkf.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/wxkf/wxkf.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/static/icon/fui-custom-icon.css b/static/icon/fui-custom-icon.css new file mode 100644 index 0000000..01407d2 --- /dev/null +++ b/static/icon/fui-custom-icon.css @@ -0,0 +1,27 @@ +@font-face { + font-family: iconfont; + src: url('/static/icon/fui-custom-icon.ttf') format('truetype'); +} + +.fui-custom-icon { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; +} + +.icon-fabulous:before { + content: "\e704"; +} + +.icon-collection:before { + content: "\e705"; +} + +.icon-comment:before { + content: "\e706"; +} + +.icon-forward:before { + content: "\e707"; +} diff --git a/static/icon/fui-custom-icon.ttf b/static/icon/fui-custom-icon.ttf new file mode 100644 index 0000000..2603210 Binary files /dev/null and b/static/icon/fui-custom-icon.ttf differ diff --git a/static/images/chonzhi.png b/static/images/chonzhi.png new file mode 100644 index 0000000..350e08f Binary files /dev/null and b/static/images/chonzhi.png differ diff --git a/static/images/close.png b/static/images/close.png new file mode 100644 index 0000000..934c76b Binary files /dev/null and b/static/images/close.png differ diff --git a/static/images/edit-show.png b/static/images/edit-show.png new file mode 100644 index 0000000..54fbb24 Binary files /dev/null and b/static/images/edit-show.png differ diff --git a/static/images/keep-off.png b/static/images/keep-off.png new file mode 100644 index 0000000..6699f43 Binary files /dev/null and b/static/images/keep-off.png differ diff --git a/static/images/keep-on.png b/static/images/keep-on.png new file mode 100644 index 0000000..ed80a7f Binary files /dev/null and b/static/images/keep-on.png differ diff --git a/static/images/kefu.png b/static/images/kefu.png new file mode 100644 index 0000000..af002f8 Binary files /dev/null and b/static/images/kefu.png differ diff --git a/static/images/lishi.png b/static/images/lishi.png new file mode 100644 index 0000000..126375a Binary files /dev/null and b/static/images/lishi.png differ diff --git a/static/images/myBackImg.png b/static/images/myBackImg.png new file mode 100644 index 0000000..0acb7e4 Binary files /dev/null and b/static/images/myBackImg.png differ diff --git a/static/images/no-avatar.png b/static/images/no-avatar.png new file mode 100644 index 0000000..cdb1b86 Binary files /dev/null and b/static/images/no-avatar.png differ diff --git a/static/images/no-data.png b/static/images/no-data.png new file mode 100644 index 0000000..5009f9a Binary files /dev/null and b/static/images/no-data.png differ diff --git a/static/images/no-vip.png b/static/images/no-vip.png new file mode 100644 index 0000000..06b060b Binary files /dev/null and b/static/images/no-vip.png differ diff --git a/static/images/off-vip.png b/static/images/off-vip.png new file mode 100644 index 0000000..9811308 Binary files /dev/null and b/static/images/off-vip.png differ diff --git a/static/images/payBackgrunp.png b/static/images/payBackgrunp.png new file mode 100644 index 0000000..a8aa02c Binary files /dev/null and b/static/images/payBackgrunp.png differ diff --git a/static/images/paybj.png b/static/images/paybj.png new file mode 100644 index 0000000..bc230bb Binary files /dev/null and b/static/images/paybj.png differ diff --git a/static/images/payment.png b/static/images/payment.png new file mode 100644 index 0000000..9031d3c Binary files /dev/null and b/static/images/payment.png differ diff --git a/static/images/paymentBack.png b/static/images/paymentBack.png new file mode 100644 index 0000000..e2fb19f Binary files /dev/null and b/static/images/paymentBack.png differ diff --git a/static/images/playIcon.gif b/static/images/playIcon.gif new file mode 100644 index 0000000..5ed71be Binary files /dev/null and b/static/images/playIcon.gif differ diff --git a/static/images/qiwei.gif b/static/images/qiwei.gif new file mode 100644 index 0000000..f2e03fb Binary files /dev/null and b/static/images/qiwei.gif differ diff --git a/static/images/qiwei.jpg b/static/images/qiwei.jpg new file mode 100644 index 0000000..16d9451 Binary files /dev/null and b/static/images/qiwei.jpg differ diff --git a/static/images/share.png b/static/images/share.png new file mode 100644 index 0000000..0734190 Binary files /dev/null and b/static/images/share.png differ diff --git a/static/images/shouzhi.png b/static/images/shouzhi.png new file mode 100644 index 0000000..39700de Binary files /dev/null and b/static/images/shouzhi.png differ diff --git a/static/images/shuaxing.png b/static/images/shuaxing.png new file mode 100644 index 0000000..348c1a5 Binary files /dev/null and b/static/images/shuaxing.png differ diff --git a/static/images/signIn.png b/static/images/signIn.png new file mode 100644 index 0000000..44ebc2b Binary files /dev/null and b/static/images/signIn.png differ diff --git a/static/images/video-bottom.png b/static/images/video-bottom.png new file mode 100644 index 0000000..404d570 Binary files /dev/null and b/static/images/video-bottom.png differ diff --git a/static/images/videoLock.png b/static/images/videoLock.png new file mode 100644 index 0000000..717bb22 Binary files /dev/null and b/static/images/videoLock.png differ diff --git a/static/images/zenbi.png b/static/images/zenbi.png new file mode 100644 index 0000000..01b6fa7 Binary files /dev/null and b/static/images/zenbi.png differ diff --git a/static/tabbar/binge_off.png b/static/tabbar/binge_off.png new file mode 100644 index 0000000..77f9f94 Binary files /dev/null and b/static/tabbar/binge_off.png differ diff --git a/static/tabbar/binge_on.png b/static/tabbar/binge_on.png new file mode 100644 index 0000000..798808e Binary files /dev/null and b/static/tabbar/binge_on.png differ diff --git a/static/tabbar/discover_off.png b/static/tabbar/discover_off.png new file mode 100644 index 0000000..e7aa89e Binary files /dev/null and b/static/tabbar/discover_off.png differ diff --git a/static/tabbar/discover_on.png b/static/tabbar/discover_on.png new file mode 100644 index 0000000..986fc0e Binary files /dev/null and b/static/tabbar/discover_on.png differ diff --git a/static/tabbar/my_off.png b/static/tabbar/my_off.png new file mode 100644 index 0000000..8b54b19 Binary files /dev/null and b/static/tabbar/my_off.png differ diff --git a/static/tabbar/my_on.png b/static/tabbar/my_on.png new file mode 100644 index 0000000..541cb90 Binary files /dev/null and b/static/tabbar/my_on.png differ diff --git a/static/tabbar/playlet_off.png b/static/tabbar/playlet_off.png new file mode 100644 index 0000000..d658632 Binary files /dev/null and b/static/tabbar/playlet_off.png differ diff --git a/static/tabbar/playlet_on.png b/static/tabbar/playlet_on.png new file mode 100644 index 0000000..20468a2 Binary files /dev/null and b/static/tabbar/playlet_on.png differ diff --git a/utils/config.js b/utils/config.js new file mode 100644 index 0000000..8c3513c --- /dev/null +++ b/utils/config.js @@ -0,0 +1,6 @@ +const basUrl = 'https://tbapi.jiulingliu.cn'; +const imageBasUrl = 'https://tbapi.jiulingliu.cn'; +export { + basUrl, + imageBasUrl +}; \ No newline at end of file diff --git a/utils/constData.js b/utils/constData.js new file mode 100644 index 0000000..0728b1d --- /dev/null +++ b/utils/constData.js @@ -0,0 +1,31 @@ +import { imageBasUrl } from "./config"; + +export const myToPathList = [ + { + id: '2', + name: '充值明细', + toPath: '/pages/transaction/transaction', + thumb: `${imageBasUrl}/iamge/chonzhi.png` + }, + { + id: '3', + name: '赠币明细', + toPath: '/pages/give/give', + thumb: `${imageBasUrl}/iamge/zenbi.png` + }, + { + id: '4', + name: '联系客服', + toPath: '/pages/wxkf/wxkf', + thumb: `${imageBasUrl}/iamge/kefu.png` + }, +]; + +export const myToHistroy = [ + { + id: '1', + name: '历史观看', + toPath: '/pages/history/history', + thumb: `${imageBasUrl}/iamge/lishi.png` + }, +] \ No newline at end of file diff --git a/utils/httpRequest.js b/utils/httpRequest.js new file mode 100644 index 0000000..9e95b9a --- /dev/null +++ b/utils/httpRequest.js @@ -0,0 +1,79 @@ +import { basUrl } from './config' + +import cloud from '@tbmp/mp-cloud-sdk'; +cloud.init({ + //test、online + env: 'test' +}); + +const httpRequest = async ({ path, method = 'GET', params = {}, body = {}, exts = {} }) => { + + const dataUid = my.getStorageSync({ key: 'uid' }).data; + let isBody = {}; + let isParems = {}; + if (method == 'POST') { + isBody = { + ...body, + } + if (dataUid && dataUid.uid) { + isBody.uid = dataUid.uid; + } + + } + + if (method == 'GET') { + isParems = { + ...params + } + if (dataUid && dataUid.uid) { + isParems.uid = dataUid.uid; + } + } + + try { + const result = await cloud.application.httpRequest({ + //不需要完整域名,只需要接口访问路径即可 + path: path, + method: method, + //POST请求需要指定下请求格式,只支持application/json。 如:"content-type":"application/json;charset=UTF-8" + headers: { "Content-Type": "application/json;charset=UTF-8" }, + params: { + ...isParems, + }, + body: { + // uid: uid, + ...isBody, + }, + //对于一个小程序关联多个云应用的场景,调用非默认云应用,需要指定对应的云应用Id,超时时间单位ms + exts: { + // cloudAppId: "49944", + domain: basUrl, + ...exts, + } + }); + // console.log(result, "result") + if (result != '{}' && result) { + const isResult = JSON.parse(result); + if (isResult.status == 1) { + return isResult; + } + if (isResult.status == 2) { + my.showToast({ + content: isResult.msg, + duration: 3000, + }); + return Promise.reject(isResult); + } + + } + return result; + // console.log(JSON.stringify(result)); + } catch (err) { + console.log(err, 'httpRequest_err') + } +}; + +export { + httpRequest, + cloud +} diff --git a/utils/obtainInfo.js b/utils/obtainInfo.js new file mode 100644 index 0000000..c0d4367 --- /dev/null +++ b/utils/obtainInfo.js @@ -0,0 +1,25 @@ + +import { httpRequest } from './httpRequest' + +export const getUserInfo = async () => { + const paramenter = { + path: '/user', + method: 'GET', + } + const res = await httpRequest(paramenter); + console.log(res, "useruser") + if (res.status == 1) { + getApp().globalData.userInfo = res.data.info; + my.setStorageSync({ + key: 'userInfo', + data: { + userInfo: res.data.info + } + }) + } +} + +export const getSystemInfoSync = () => { + console.log(my.getSystemInfoSync(), "my.getSystemInfoSync()") + getApp().globalData.systemInfo = my.getSystemInfoSync(); +} \ No newline at end of file diff --git a/utils/utils.js b/utils/utils.js new file mode 100644 index 0000000..ee7093f --- /dev/null +++ b/utils/utils.js @@ -0,0 +1,17 @@ +export const storagePaymentBack = (paymentBack) => { + my.setStorageSync({ + key: 'paymentBack', + data: { + paymentBack: paymentBack + } + }); +} + +export const storageUid = (uid) => { + my.setStorageSync({ + key: 'uid', + data: { + uid: uid + }, + }); +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..5c2f2ea --- /dev/null +++ b/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@tbmp/mp-cloud-sdk@*": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@tbmp/mp-cloud-sdk/-/mp-cloud-sdk-1.5.5.tgz#12f1c031d9f2c391381ffbb0b6ef0753c9caf43f" + integrity sha512-/wFdMfkATA8KvykUK7aav2vyoP8bM8SQNC73Lmsn3wxlRzTcyKp0EKWUnpnAM0wpJd1DUEI5ag2IyOWJmIfSCg== + +mini-antui@^0.5.2: + version "0.5.2" + resolved "https://registry.npmjs.org/mini-antui/-/mini-antui-0.5.2.tgz" + integrity sha512-Y3KSDuvrU2ygfAQMjcalNwaCu/jat/BaV43K4juKtsY9q5TUGbhKqDKEMFl6WWa7M49or52iYWsHwKBjfH9N+w==