diff --git a/.gitignore b/.gitignore index a19f004..4d50cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,12 @@ -# ---> Vue -# gitignore template for Vue.js projects -# -# Recommended template: Node.gitignore - -# TODO: where does this rule come from? -docs/_book - -# TODO: where does this rule come from? -test/ - +fan: +node_modules/**/* + unpackage/ + unpackage/**/* + .idea + .idea/ + .expo/* + npm-debug.* + *.orig.* + web-build/ + # macOS + .DS_Store diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..c9abd4b --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,11 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "type": "uniCloud", + "default": { + "launchtype": "local" + } + } + ] +} diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..394ad50 --- /dev/null +++ b/App.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/components/balance/balance.vue b/components/balance/balance.vue new file mode 100644 index 0000000..2174fc0 --- /dev/null +++ b/components/balance/balance.vue @@ -0,0 +1,108 @@ + + + + + + diff --git a/components/cont/cont.vue b/components/cont/cont.vue new file mode 100644 index 0000000..cc362b8 --- /dev/null +++ b/components/cont/cont.vue @@ -0,0 +1,56 @@ + + + + + + diff --git a/components/gameView/gameView.vue b/components/gameView/gameView.vue new file mode 100644 index 0000000..f0e8e87 --- /dev/null +++ b/components/gameView/gameView.vue @@ -0,0 +1,293 @@ + + + + + + diff --git a/components/gamecont/gamecont.vue b/components/gamecont/gamecont.vue new file mode 100644 index 0000000..c9dd607 --- /dev/null +++ b/components/gamecont/gamecont.vue @@ -0,0 +1,460 @@ + + + + + + diff --git a/components/gamecont2/gamecont2.vue b/components/gamecont2/gamecont2.vue new file mode 100644 index 0000000..b6c674c --- /dev/null +++ b/components/gamecont2/gamecont2.vue @@ -0,0 +1,147 @@ + + + + + + diff --git a/components/gamecont3/gamecont3.vue b/components/gamecont3/gamecont3.vue new file mode 100644 index 0000000..a59c2e7 --- /dev/null +++ b/components/gamecont3/gamecont3.vue @@ -0,0 +1,314 @@ + + + + + + diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue new file mode 100644 index 0000000..f1df821 --- /dev/null +++ b/components/navigation/navigation.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..f2325a5 --- /dev/null +++ b/main.js @@ -0,0 +1,20 @@ +import Vue from 'vue' +import App from './App' +import axios from './utils/axios.js' +import store from './store' +import uView from "uview-ui"; +import VueClipboards from 'vue-clipboard2' + +Vue.config.productionTip = false + + +Vue.use(uView); +Vue.use(VueClipboards); +Vue.prototype.$axios = axios +Vue.prototype.$store = store +App.mpType = 'app' + +const app = new Vue({ + ...App +}) +app.$mount() diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..ed197c1 --- /dev/null +++ b/manifest.json @@ -0,0 +1,94 @@ +{ + "name" : "first", + "appid" : "", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics": { + "enable": false + }, + "h5" : { + "publicPath" : "/", + "devServer" : { + // "port" : 8083, + "disableHostCheck" : true, + "https" : true, + "proxy" : { + "/start" : { + "ws" : false, + "target" : "https://apitest.luck-work.com", + // "target":"https://webtest.luck-work.com/", + // "target" : "https://api.in-earn.co.ke", + "changeOrigin" : true, + "secure" : false, + "pathRewrite" : { + "^/start" : "" + } + } + } + }, + "title" : "In-Earn", + "domain" : "webtest.luck-work.com" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3680619 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,130 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "clipboard": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", + "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + }, + "follow-redirects": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", + "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "requires": { + "delegate": "^3.1.2" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" + }, + "js-md5": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz", + "integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==" + }, + "object-inspect": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" + }, + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, + "vue-clipboard2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.1.tgz", + "integrity": "sha512-H5S/agEDj0kXjUb5GP2c0hCzIXWRBygaWLN3NEFsaI9I3uWin778SFEMt8QRXiPG+7anyjqWiw2lqcxWUSfkYg==", + "requires": { + "clipboard": "^2.0.0" + } + } + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..69b314a --- /dev/null +++ b/pages.json @@ -0,0 +1,170 @@ +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" +}, + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/recharge/rechargeRule", + "style": { + } + }, + { + "path": "pages/login/index", + "style": { + } + }, + { + "path": "pages/color/color1/index", + "style": { + + } + }, + { + "path": "pages/withdrawl/transactions/index", + "style": { + } + }, + { + "path": "pages/withdrawl/withdrawlRecord/index", + "style": { + } + }, + + { + "path": "pages/recharge/index", + "style": { + } + }, + + + { + "path": "pages/recharge/record/index", + "style": { + } + }, + + + + { + "path": "pages/rule/arules/index", + "style": { + } + }, + { + "path": "pages/aplan/index", + "style": { + } + }, + { + "path": "pages/withdrawl/transactions/index", + "style": { + } + }, + + { + "path": "pages/withdrawl/index", + "style": { + } + }, + { + "path": "pages/promotion/promotionRecord/index", + "style": { + } + }, + + { + "path": "pages/recharge/index", + "style": { + } + }, + + { + "path": "pages/My/index", + "style": { + + } + }, + + + + + + { + "path": "pages/register/index", + "style": { + } + }, + + + { + "path": "pages/promotion/index", + "style": { + + } + }, + + + + + { + "path": "pages/index/index", + "style": { + + } + }, + + + + { + "path": "pages/login/resetPassword/index", + "style": { + } + }, + + { + "path": "pages/rule/index", + "style": { + + } + }, + + { + "path": "pages/rule/inviteRule/index", + "style": { + + } + } + + + + + ], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#34026B" + }, + "tabBar":{ + "selectedColor":"#34026B", + "list":[ + { + "text":"Game", + "pagePath":"pages/index/index", + "iconPath":"./static/tabbar/meun_icon_game_nor@2x.png", + "selectedIconPath":"./static/tabbar/meun_icon_game_sel@2x.png" + }, + { + "text":"Promotion", + "pagePath":"pages/promotion/index", + "iconPath":"./static/tabbar/meun_icon_promotion_nor@2x.png", + "selectedIconPath":"./static/tabbar/meun_icon_promotion_sel@2x.png" + }, + { + "text":"My", + "pagePath":"pages/My/index", + "iconPath":"./static/tabbar/meun_icon_my_nor@2x.png", + "selectedIconPath":"./static/tabbar/meun_icon_my_sel@2x.png" + } + ] + } + +} diff --git a/pages/My/index.css b/pages/My/index.css new file mode 100644 index 0000000..a94e251 --- /dev/null +++ b/pages/My/index.css @@ -0,0 +1,124 @@ + +.content{ + padding-bottom: 254rpx; + background-color: #F5F7FAFF !important; +} +.flex{ + display: flex; + flex-flow: row wrap; +} +.my-head{ + background-color: #34026B; + padding: 26rpx 26rpx; +} +.my-info{ + +} +.my-a{ + display: flex; +} +.my-img{ + width: 76rpx; + height: 76rpx; +} +.my-img image{ + width: 100%; + height: 100%; +} +.my-nameid{ +margin-left: 24rpx; +} +.my-name{ + color: #fff; + font-size: 36rpx; +} +.my-id{ + color: rgba(255,255,255,.5); + font-size: 28rpx; +} +.my-b{ + margin-top: 26rpx; +} +.my-tel{ + color: #fff; + font-size: 27rpx; + text-transform: capitalize; +} + +.my-bal{ + color: #fff; + font-size: 27rpx; + text-transform: capitalize; + align-items: center; + margin-top: 24rpx; +} +.my-ap{ + width: 118rpx; + line-height: 44rpx; + background-color: #491C7AFF; + border-radius: 16rpx; + text-align: center; + margin-left: 26rpx; +} +.my-c{ + margin-top: 26rpx; +} +.my-btn1{ + width: 188rpx; + line-height: 72rpx; + background-color: #954DE3; + border-radius: 16rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + text-transform: capitalize; +} +.my-btn2{ + font-size: 28rpx; + width: 312rpx; + line-height: 72rpx; + background-color: #954DE3; + border-radius: 16rpx; + text-align: center; + margin-left: 26rpx; + text-transform: capitalize; + color: #fff; +} +.my-body{ + padding: 0 36rpx; + background-color: #FFFFFF; +} +.my-body-item{ + width: 100%; + line-height: 108rpx; + border-bottom: 2rpx solid #F5F7FA; + color: #303133FF; + font-size: 30rpx; + text-transform: capitalize; + position: relative; +} +.my-body-item:last-child{ + border-bottom: none; +} +.my-body-item::before{ + content: ''; + width: 28rpx; + height: 28rpx; + background: url(../../static/home/top_icon_ins.png)no-repeat; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +.my-body-out{ + text-align: center; + color: #303133FF; + font-size: 32rpx; + background-color: #fff; + text-transform: capitalize; + line-height: 108rpx; + margin-top: 48rpx; +} +.my-bg{ + background-color: #F5F7FA; +} diff --git a/pages/My/index.vue b/pages/My/index.vue new file mode 100644 index 0000000..dc6d48a --- /dev/null +++ b/pages/My/index.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/pages/aplan/index.css b/pages/aplan/index.css new file mode 100644 index 0000000..ff0450e --- /dev/null +++ b/pages/aplan/index.css @@ -0,0 +1,111 @@ + + + +.pro-head{ + padding: 0 68rpx; + background-color: #34026BFF; + padding-bottom: 36rpx; +} +.pro-body-p1{ + font-size: 44rpx; + color: #fff; + text-align: center; + padding-top: 70rpx; + text-transform: capitalize; + display: flex; + align-items: center; + justify-content: center; +} +.pro-body-p1 .s1{ + padding-left: 8rpx; + vertical-align: bottom; +} +.category-sigh{ + font-size: 36rpx; + color: #fff; +} + +.bread{ + color: #fff; + font-size: 32rpx; + position: absolute; + right: 36rpx; +} +.ab{ + color: #FFFFFFFF; + font-size: 28rpx; + text-align: center; + margin-top: 36rpx; +} +.flex{ + display: flex; + justify-content: space-between; + align-items: center; +} +.money_con{ + margin-top: 50rpx; +} + +.mony_item{ + +} +.mon{ + color: #fff; + font-size: 36rpx; + text-align: center; +} +.time{ + color: rgba(255,255,255,.5); + font-size: 28rpx; + text-align: center; +} +.mon_btn{ + width: 240rpx; + line-height: 72rpx; + text-align: center; + border-radius: 16rpx; + border: 2rpx #954DE3FF solid; + color: #fff; + margin-top: 24rpx; + font-size: 28rpx; +} +.mon_btn:hover{ + background-color: #954DE3FF; +} +.ap_body{ + padding: 0 36rpx; +} +.fde{ + padding: 24rpx 0; + color: #909399FF; + font-size: 32rpx; +} +.record_item{ + height: 144rpx; +} +.numcon .img1{ + width: 40rpx; + height: 40rpx; +} +.num{ + margin-left: 20rpx; +} +.rec{ + color: #303133; + font-size: 32rpx; +} +.cpay{ + color: #909399; + font-size: 28rpx; +} +.time{ + +} +.time_mon{ + color: #00B977FF; + font-size: 32rpx; +} +.mon2{ + color: #909399FF; + font-size: 28rpx; +} \ No newline at end of file diff --git a/pages/aplan/index.vue b/pages/aplan/index.vue new file mode 100644 index 0000000..a05505b --- /dev/null +++ b/pages/aplan/index.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/color/color1/index.css b/pages/color/color1/index.css new file mode 100644 index 0000000..b0198d8 --- /dev/null +++ b/pages/color/color1/index.css @@ -0,0 +1,562 @@ + +.content{ + position: relative; +} +.rules-btn{ + font-size: 24rpx; + color: #FFFFFF; + text-transform: capitalize; + position: relative; + padding-right: 70rpx; +} + .rules-btn::before{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../../static/home/top_icon_ins.png)no-repeat; + position: absolute; + right: 36rpx; + top: 50%; + transform: translateY(-50%); + } + .bg_white{ + position: relative; + top: -36rpx; + background-color: #fff; + border-radius: 48rpx 48rpx 0 0; + } + .gameNav{ + padding: 0 36rpx; + display: flex; + height: 96rpx; + justify-content: space-around; + font-size: 28rpx; + color: #909399; + line-height: 96rpx; + align-items: center; + } + .flex{ + display: flex; + align-items: center; + } + .gameNav-item{ + position: relative; + text-align: center; + height: 100%; + } + .gameNav-item::after{ + content: ''; + width: 0rpx; + height: 4rpx; + background: #954DE3; + position: absolute; + left: 50%; + bottom: 0px; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + } + .active{ + color: #954DE3; + } + .active::after{ + width: 80rpx; + } + + + .donna2{ +background-color: #3F0380; +margin-bottom: 16rpx; + } + .don_con{ + + border-radius: 16rpx; + height: 160rpx; + padding: 24rpx 24rpx; + justify-content: space-between; + + } + .follow_xiazhu_con{ + background-color: #34026B; + border-radius: 48rpx 48rpx 0 0; + padding: 0 36rpx; + position: relative; + } + .tc{ + width: 600rpx; + background-color: #fff; + border-radius: 24rpx; + padding: 0 36rpx; + padding-top: 48rpx; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + } + .tc_body{ + padding: 48rpx 0; + } + .body_item_info{ + font-size: 28rpx; + color: #606266; + text-transform: capitalize; + margin-bottom: 20rpx; + } + .body_item_info image{ + width: 40rpx; + height: 40rpx; + } + .flex{ + display: flex; + justify-content: space-between; + align-items: center; + } + .cancel{ + width: 50%; + text-align: center; + text-transform: capitalize; + font-size: 32rpx; + line-height: 108rpx; + } + .title{ + text-transform: capitalize; + font-size: 36rpx; + color: #303133; + text-align: center; + } + .xia_head{ + height: 72rpx; + position: relative; + } + .tiao{ + width: 32rpx; + height: 6rpx; + border-radius: 4rpx; + background-color: rgba(255,255,255,.1); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 24rpx; + } + .xia_item{ + width: 678rpx; + padding: 36rpx 0; + } + + .info{ + justify-content: space-between; + } + .info .imgcon{ + width: 76rpx; + height: 76rpx; + } + .info .imgcon image{ + width: 100%; + height: 100%; + } + .doname{ + margin-left: 24rpx; + } + .doname .name{ + color: #fff; + font-size: 32rpx; + } + .doname .win{ + width: 124rpx; + padding: 4rpx 8rpx; + line-height: 32rpx; + color: #fff; + font-size: 20rpx; + background-color: #491C7A; + border-radius: 8rpx; + margin-top: 6rpx; + } + .recharge{ + position: relative; + padding-left: 50rpx; + } + .recharge image{ + width: 40rpx; + height: 40rpx; + position: absolute; + left: 0; + bottom: 0; + } + .recharge i{ + font-style: normal; + margin-right: 8rpx; + } + .recharge span{ + color: #fff; + font-size: 32rpx; + } + .follow{ + width: 142rpx; + line-height: 60rpx; + background-color: #954DE3; + color: #fff; + font-size: 24rpx; + border-radius: 16rpx; + position: relative; + text-align: center; + padding-right: 10rpx; + } + .follow::after{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../../static/color/top_icon_ins@3x.png)no-repeat; + background-size: contain; + position: absolute; + right: 10rpx; + top: 50%; + transform: translateY(-50%) rotate(90deg); + } + .list{ + border-top: 2rpx solid #34026B; + justify-content: space-between; + flex-wrap: wrap; + overflow: hidden; + max-height: 0; + transition: .5s all; + padding: 0 24rpx; + } + .list_con{ + width: 375rpx; + align-items: center; + padding: 26rpx 0; + } + .list_con .img1{ + width: 32rpx; + height: 32rpx; + margin-left: 16rpx; + } + .num{ + font-size: 24rpx; + color: #fff; + } + .instit{ + text-transform: capitalize; + font-size: 24rpx; + margin-left: 16rpx; + } + .red{ + color: #F25B5B !important; + } + .green{ + color: #00B977; + } + + .donna2.on .list,.follow:hover .list{ + max-height: 1000rpx; + } + + .donna2.on .follow::after{ + transform: translateY(-50%) rotate( + 270deg + ); + padding: 0 !important; + } + + + + .xiazhu{ + background-color: #fff; + position: fixed; + bottom: 0; + padding-top: 48rpx; + width: 100%; + border-radius: 48rpx 48rpx 0 0; + z-index: 9999; + } + .xiazhu .top{ + padding: 0 40rpx; + } + .xiazhu .title{ + font-size: 36rpx; + text-align: center; + color: #303133FF; + text-transform: capitalize; + } + .contract{ + margin-top: 80rpx; + } + .xname{ + color: #606266FF; + font-size: 28rpx; + } + .contract .numcon{ + display: flex; + } + .contract .numcon .num{ + padding: 16rpx 24rpx; + border: 2rpx solid #EDEFF2FF; + color: #303133FF; + font-size: 28rpx; + text-align: center; + } + .contract .numcon .num:hover{ + border-color: #954DE3FF; + } + .bujin,.TotalMoney,.agree,.btn_con{ + margin-top: 60rpx; + } + .agree{ + color: #606266FF; + font-size: 28rpx; + text-transform: capitalize; + display: flex; + align-items: center; + } + .agree .img{ + width: 34rpx; + height: 34rpx; + margin-right: 10rpx; + } + .agree .s2{ + color: #954DE3FF; + } + .agree .s1{ + margin-right:10rpx ; + } + .btn_con .btn{ + line-height: 108rpx; + text-align: center; + color: #303133FF; + font-size: 32rpx; + background-color: #F5F7FAFF; + text-transform: capitalize; + } + .btn_con .btn1{ + width: 240rpx; + } + .btn_con .btn2{ + width: 510rpx; + background-color: #954DE3FF; + opacity: .5; + color: #fff; + } + + + + + + + + + + + + + + + + + .timeCon{ + margin-top: 38rpx; + } + .time,.count{ + color: #303133; + font-size: 36rpx; + } + .perCoun,.timeCon{ + align-items: center; + justify-content: space-between; + } + .period,.coDown{ + text-transform: capitalize; + color: #909399; + font-size: 28rpx; + } + .perCon{ + padding-top: 24rpx; + padding-bottom: 48rpx; + } + .gameContent{ + padding: 0 36rpx; + } + .flex{ + display: flex; + align-items: center; + } + .gNum{ + line-height: 96rpx; + text-align: center; + } + .ga{ + font-size: 28rpx; + color: #909399; + width: 250rpx; + position: relative; + } + .ga::before{ + content: ''; + width: 0%; + height: 4rpx; + background: #954DE3; + position: absolute; + left: 50%; + bottom: 0px; + transform: translateX(-50%); + } + + .gaactive{ + color: #954DE3FF !important; + } + .gaactive::before{ + width: 80rpx; + } + + + .icon-con{ + justify-content: space-between; + } + .ico{ + width: 210rpx; + height: 80rpx; + border: 2rpx solid #EDEFF2; + border-radius: 16rpx; + position: relative; + } + .ico image{ + width: 40rpx; + height: 40rpx; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + } + .multiple-con{ + justify-content: space-between; + flex-wrap: wrap; + margin-top: 24rpx; + } + .mul-item{ + width: 112rpx; + line-height: 80rpx; + color: #fff; + font-size: 32rpx; + border-radius: 16rpx; + text-align: center; + } + .bg_green{ + background-color: #00B977; + } + .bg_red{ + background-color: #F25B5B; + } + .bg_jb1{ + background-image: linear-gradient(-30deg, #954DE3 50% , #F25B5B 50% ); + } + .bg_jb2{ + background-image: linear-gradient(-30deg,#954DE3 50% , #00B977 50% ); + } + + .donna{ + background-color: #34026B; + border-radius: 16rpx; + height: 160rpx; + padding: 24rpx 24rpx; + margin-top: 48rpx; + justify-content: space-between; + } + .info{ + justify-content: space-between; + } + .info .imgcon{ + width: 76rpx; + height: 76rpx; + } + .info .imgcon image{ + width: 100%; + height: 100%; + } + .doname{ + margin-left: 24rpx; + } + .doname .name{ + color: #fff; + font-size: 32rpx; + } + .doname .win{ + width: 124rpx; + padding: 4rpx 8rpx; + line-height: 32rpx; + color: #fff; + font-size: 20rpx; + background-color: #491C7A; + border-radius: 8rpx; + margin-top: 6rpx; + } + .recharge{ + position: relative; + padding-left: 50rpx; + } + .recharge image{ + width: 40rpx; + height: 40rpx; + position: absolute; + left: 0; + bottom: 0; + } + .recharge i{ + font-style: normal; + margin-right: 8rpx; + } + .recharge span{ + color: #fff; + font-size: 32rpx; + } + .follow{ + width: 142rpx; + line-height: 60rpx; + background-color: #954DE3; + color: #fff; + font-size: 24rpx; + border-radius: 16rpx; + position: relative; + text-align: center; + padding-right: 10rpx; + } + .follow::after{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../../static/color/top_icon_ins@3x.png)no-repeat; + background-size: contain; + position: absolute; + right: 12rpx; + top: 50%; + transform: translateY(-50%); + } + + + + + .gNum{ + line-height: 96rpx; + text-align: center; + } + .ga{ + font-size: 28rpx; + color: #909399; + width: 250rpx; + position: relative; + } + .ga::before{ + content: ''; + width: 0%; + height: 4rpx; + background: #954DE3; + position: absolute; + left: 50%; + bottom: 0px; + transform: translateX(-50%); + } + + .gaactive{ + color: #954DE3FF !important; + } + .gaactive::before{ + width: 80rpx; + } + \ No newline at end of file diff --git a/pages/color/color1/index.vue b/pages/color/color1/index.vue new file mode 100644 index 0000000..4812b7c --- /dev/null +++ b/pages/color/color1/index.vue @@ -0,0 +1,430 @@ + + + + + diff --git a/pages/index/index.css b/pages/index/index.css new file mode 100644 index 0000000..9427079 --- /dev/null +++ b/pages/index/index.css @@ -0,0 +1,24 @@ + +.index-body{ + background: #fff; + border-radius: 40rpx 40rpx 0 0; +} +.index-body{ + padding: 0 36rpx; + position: relative; + top: -40rpx; +} +.index-body-p1{ + padding-top: 48rpx; + color: #303133FF; + font-size: 32rpx; +} +.index-body-img{ + margin-top: 12rpx; + width: 100%; + height: 384rpx; +} +.index-body-img image{ + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..fb478ae --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/pages/login/index.css b/pages/login/index.css new file mode 100644 index 0000000..95a8518 --- /dev/null +++ b/pages/login/index.css @@ -0,0 +1,107 @@ + +.flex{ + display: flex; + align-items: center; +} +.login-body{ + padding: 0 36rpx; + padding-top: 48rpx; +} +.input-item{ + position: relative; + height: 96rpx; + padding-left: 24rpx; + border-bottom: 2rpx solid #F4F5F7; + margin-bottom: 24rpx; +} + +.input-item input{ + line-height: 96rpx; + width: 500rpx; + text-transform: capitalize; + font-size: 28rpx; + color: #303133FF; +} +.login-sigh{ + width: 172rpx; + position: relative; +} + +.login-sigh::before{ + content: ''; + width: 4rpx; + height: 26rpx; + background-color: #BFC2CCFF; + position: absolute; + right: 16rpx; + top: 50%; + transform: translateY(-50%); +} +.login-sigh2{ + width: 64rpx; +} +.login-sigh2::before{ + content: none; +} +.login-sigh .imgcon{ + width: 40rpx; + height: 40rpx; +} +.login-sigh .imgcon image{ + width: 100%; + height: 100%; +} +.login-sigh .quhao{ + font-size: 28rpx; + color: #303133FF; + margin-left: 20rpx; +} +.rePass{ + color: #606266FF; + font-size: 28rpx; + float: right; +} +.login-btn{ + text-align: center; + line-height: 96rpx; + background: #34026B; + opacity: 0.2; + border-radius: 24rpx; + color: #fff; + margin-top: 120rpx; +} +.on{ + opacity: 1; +} +.login-re{ + width: auto; + display: table; + margin: 0 auto; + font-size: 14px; + font-weight: 400; + line-height: 27px; + color: #606266; + margin-top: 18px; + position: relative; + padding-right: 36rpx; +} +.login-re::before{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../static/login/top_icon_ins@2x.png)no-repeat; + background-size: contain; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +.input-item input::-webkit-input-placeholder { + color: red; +} +.input-item input:-moz-placeholder { + color: red; +} +.input-item input:-ms-input-placeholder { + color: red; +} diff --git a/pages/login/index.vue b/pages/login/index.vue new file mode 100644 index 0000000..d3358ca --- /dev/null +++ b/pages/login/index.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/pages/login/resetPassword/index.css b/pages/login/resetPassword/index.css new file mode 100644 index 0000000..c345faa --- /dev/null +++ b/pages/login/resetPassword/index.css @@ -0,0 +1,130 @@ + +.content{ + position: relative; + +} +.flex{ + display: flex; + align-items: center; +} +.login-body{ + padding: 0 36rpx; + padding-top: 48rpx; +} +.input-item{ + position: relative; + height: 96rpx; + padding-left: 24rpx; + border-bottom: 2rpx solid #F4F5F7; + margin-bottom: 24rpx; +} +.login-sigh3 .img1{ + width: 180rpx; + height: 60rpx; + margin-right: 20rpx; +} +.login-sigh3 .img2{ + width: 24rpx; + height: 24rpx; + margin-right: 20rpx; +} +.input-item input{ + line-height: 96rpx; + width: 500rpx; + text-transform: capitalize; + font-size: 28rpx; + color: #303133FF; +} +.login-sigh{ + width: 172rpx; + position: relative; +} +.otp{ + width: 80rpx; + line-height: 40rpx; + border: 2rpx solid #954DE3FF; + border-radius: 8rpx; + text-align: center; + color:#954DE3FF ; +} +.input_pcod{ + padding-left: 20rpx; +} +.login-sigh::before{ + content: ''; + width: 4rpx; + height: 26rpx; + background-color: #BFC2CCFF; + position: absolute; + right: 16rpx; + top: 50%; + transform: translateY(-50%); +} +.login-sigh2{ + width: 64rpx; +} +.login-sigh2::before{ + content: none; +} +.login-sigh .imgcon{ + width: 40rpx; + height: 40rpx; +} +.login-sigh .imgcon image{ + width: 100%; + height: 100%; +} +.login-sigh .quhao{ + font-size: 28rpx; + color: #303133FF; + margin-left: 20rpx; +} +.rePass{ + color: #606266FF; + font-size: 28rpx; + float: right; +} +.login-btn{ + text-align: center; + line-height: 96rpx; + background: #34026B; + opacity: 0.2; + border-radius: 24rpx; + color: #fff; + margin-top: 120rpx; +} +.login-btn:hover{ + opacity: 1; +} +.login-re{ + width: auto; + display: table; + margin: 0 auto; + font-size: 14px; + font-weight: 400; + line-height: 27px; + color: #606266; + margin-top: 18px; + position: relative; + padding-right: 36rpx; +} +.login-re::before{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../../static/login/top_icon_ins@2x.png)no-repeat; + background-size: contain; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +.input-item input::-webkit-input-placeholder { + color: red; +} +.input-item input:-moz-placeholder { + color: red; +} +.input-item input:-ms-input-placeholder { + color: red; +} diff --git a/pages/login/resetPassword/index.vue b/pages/login/resetPassword/index.vue new file mode 100644 index 0000000..f6af1b7 --- /dev/null +++ b/pages/login/resetPassword/index.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/pages/promotion/index.css b/pages/promotion/index.css new file mode 100644 index 0000000..2219676 --- /dev/null +++ b/pages/promotion/index.css @@ -0,0 +1,210 @@ +@font-face { + font-family: 'din'; + font-weight: normal; + font-style: normal; + src: url("~@/static/fonts/DIN-Bold.otf") format("truetype"); + } + + +.pro-head{ + text-align: center; + color: #fff; + line-height: 108rpx; + font-size: 36rpx; + text-transform: capitalize; + background-color: #34026B; + position: relative; + padding: 0 36rpx; +} +.pro-hea-rig{ +position: absolute; +right: 36rpx; +top: 50%; +transform: translateY(-50%); +display: flex; +align-items: center; +} + +.pro-hea-rig .img1{ + width: 36rpx; + height: 36rpx; + margin-right: 48rpx; +} +.pro-hea-rig .img2{ + width: 28rpx; + height: 24rpx; +} +.pro-body{ + padding: 0 36rpx; +} +.pro-body-p1{ + font-size: 44rpx; + color: #303133FF; + text-align: center; + padding: 60rpx 0; + text-transform: capitalize; +} +.pro-body-p1 .s1{ +font-family: 'din'; + padding-left: 8rpx; + vertical-align: bottom; +} +.category-sigh{ + font-size: 36rpx; + padding-left: 16rpx; +} +.pro-body-btn1{ + text-align: center; + color: #fff; + text-transform: capitalize; + line-height: 96rpx; + background: #34026B; + border-radius: 16rpx; + +} +.pro-body-lea{ + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} +.lea-item{ + width: 40%; + text-align: center; + padding-bottom: 80rpx; +} +.lea-item .p1{ + color: #909399FF; + line-height: 96rpx; + font-size: 32rpx; +} +.lea-item .p2{ + color: #909399FF; + margin-top: 36rpx; + font-size: 28rpx; +} +.lea-item .p3{ + color: #303133FF; + margin-top: 20rpx; + font-size: 36rpx; +} +.lea-item .p1.on{ + color: #34026BFF; + border-bottom: 4rpx solid #34026B; +} +.pro-body-code{ + background: url(../../static/promo/bg_promotion@2x.png)no-repeat; + background-size: contain; + padding: 36rpx; +} +.code-item1 .p1{ + font-size: 28rpx; + color: rgba(255,255,255,.4); +} +.code-item1 .p2{ + font-size: 32rpx; + margin-top: 16rpx; + color: rgba(255,255,255,1); +} + +.code-item1:nth-child(2){ + margin-top: 36rpx; +} +.code-btn{ + text-align: center; + line-height: 96rpx; + color: #fff; + border-radius: 16rpx; + margin-top: 36rpx; + background-color: #954DE3FF; +} + +.invite-more{ + width: 750rpx; +height: 480rpx; +background: #FFFFFF; +border-radius: 48rpx 48rpx 0px 0px; +position: fixed; +bottom: 0; +z-index: 9999; +} +.more-a{ + text-transform: capitalize; + font-size: 32rpx; + color: #303133; + text-align: center; + line-height: 108rpx; +} +.invite-con{ + padding: 24rpx 0; +} +.invite-con2{ + background-color: #F5F7FA; + padding-bottom: 68rpx; +} +.msg-box-bg { + width: 100%; + height: 100%; + position: fixed; + left: 0; + top: 0; + z-index: 1001; + background-color: rgba(0,0,0,.5); +} + +.appl_Ba{ + width: 600rpx; + background-color: #fff; + position: fixed; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + border-radius: 24rpx; + z-index: 9999; +} +.appl_Ba .top{ + padding: 48rpx 48rpx 0 48rpx; +} +.appl_Ba .title{ + color: #303133FF; + font-size: 36rpx; + text-align: center; + + text-transform: capitalize; +} +.appl_Ba .input{ + margin-top: 48rpx; + line-height: 96rpx; + height: 96rpx; +} +.appl_Ba .input input{ + height: 100%; + border-bottom: 2rpx solid #EDEFF2FF; +} +.appl_Ba .all{ + line-height: 96rpx; + background-color: #34026BFF; + border-radius: 16rpx; + text-align: center; + color: #fff; + margin-top: 48rpx; +} +.appl_Ba .btn_con{ + margin-top: 48rpx; + border-top: 2rpx solid #F7F9FCFF; + display: flex; + justify-content: space-between; + text-transform: capitalize; +} +.appl_Ba .btn_con .btn1{ + width: 50%; + text-align: center; + color: #606266FF; + font-size: 32rpx; + line-height: 108rpx; +} +.appl_Ba .btn_con .btn1:nth-child(1){ + border-right: 2rpx solid #F7F9FCFF; +} +.puple{ + color: #954DE3FF !important; +} \ No newline at end of file diff --git a/pages/promotion/index.vue b/pages/promotion/index.vue new file mode 100644 index 0000000..14584f1 --- /dev/null +++ b/pages/promotion/index.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/pages/promotion/promotionRecord/index.css b/pages/promotion/promotionRecord/index.css new file mode 100644 index 0000000..9d66973 --- /dev/null +++ b/pages/promotion/promotionRecord/index.css @@ -0,0 +1,60 @@ + +.content{ + position: relative; + height: 1264rpx; +} +.prore_lev{ +display: flex; +justify-content: space-around; +align-items: center; +} +.level{ + color: #909399; + font-size: 32rpx; + line-height: 96rpx; + position: relative; +} +.level::after{ + content: ''; + width: 0%; + height: 4rpx; + border-radius: 4px; + background: #34026B; + position: absolute; + left: 50%; + bottom: 0px; + transform: translateX(-50%); + transition: all .5s; +} +.on{ + color: #34026B; +} +.on::after{ + width: 200rpx; + +} +.prore_body{ + position: relative; +} + +.noRes{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); +} +.noRes .imgcon{ + width: 72rpx; + height: 72rpx; + margin: 0 auto; +} +.noRes .imgcon image{ + width: 100%; + height: 100%; +} +.noRes .res{ + text-align: center; + color: #BFC2CC; + font-size: 28rpx; + margin-top: 24rpx; +} \ No newline at end of file diff --git a/pages/promotion/promotionRecord/index.vue b/pages/promotion/promotionRecord/index.vue new file mode 100644 index 0000000..d23ed34 --- /dev/null +++ b/pages/promotion/promotionRecord/index.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/pages/recharge/index.css b/pages/recharge/index.css new file mode 100644 index 0000000..c215f2f --- /dev/null +++ b/pages/recharge/index.css @@ -0,0 +1,155 @@ +.bread{ + +} +.bread image{ + width: 28rpx; + height: 24rpx; + position: absolute; + right: 36rpx; + top: 50%; + transform: translateY(-50%); +} +.rech-body{ + padding: 0 36rpx; +} +.pro-body-p1{ + font-size: 22px; + color: #303133FF; + text-align: center; + padding: 30px 0; + text-transform: capitalize; +} +.category-sigh{ + font-size: 18px; + padding-left: 8px; +} +.pro-body-p1 .s1{ + font-family: 'din'; + padding-left: 4px; + vertical-align: bottom; +} +.input-item{ + position: relative; + height: 48px; + padding-left: 12px; + border-bottom: 1px solid #F4F5F7; + margin-bottom: 12px; +} +.input-item input{ + line-height: 96rpx; + width: 500rpx; + text-transform: capitalize; + font-size: 28rpx; + color: #303133FF; +} +.login-sigh{ + width: 110rpx; + position: relative; +} + +.login-sigh::before{ + content: ''; + width: 4rpx; + height: 26rpx; + background-color: #BFC2CCFF; + position: absolute; + right: 16rpx; + top: 50%; + transform: translateY(-50%); +} +.login-sigh2{ + width: 64rpx; +} +.login-sigh2::before{ + content: none; +} +.login-sigh .imgcon{ + width: 40rpx; + height: 40rpx; +} +.login-sigh .imgcon image{ + width: 100%; + height: 100%; +} +.login-sigh .quhao{ + font-size: 28rpx; + color: #303133FF; +} +.flex{ + display: flex; + align-items: center; +} +.rech-input-con{ + margin-top: 60rpx; +} +.rech-mount { + justify-content: space-between; + padding: 0 36rpx; + margin-top: 48rpx; + flex-wrap: wrap; +} +.mount{ + width: 210rpx; + line-height: 88rpx; + background: #FFFFFF; + border: 2rpx solid #EDEFF2; + opacity: 1; + border-radius: 16rpx; + font-size: 28rpx; + font-weight: 500; + color: #303133; + text-align: center; + margin-bottom: 24rpx; +} +.mount:hover{ + border-color: #34026BFF; +} +.rech-capy{ + margin-top: 25rpx; + padding: 0 36rpx; +} +.payment{ + font-size: 28rpx; + color: #909399; + text-transform: capitalize; + margin-bottom: 24rpx; +} +.capy{ + font-size: 32rpx; + color: #954DE3; + display: flex; + align-items: center; +} +.capy image{ + width: 34rpx; + height: 34rpx; + padding-right: 12rpx; +} +.rech-btn{ + margin-top: 58rpx; + line-height: 96rpx; + background: #34026B; + border-radius: 24rpx; + font-size: 28rpx; + font-weight: 400; + color: #FFFFFF; + text-transform: capitalize; + text-align: center; +} +.rech-btn-con{ + padding: 0 36rpx; +} +.content{ + padding-bottom: 170rpx; +} + + +.paymentType{ + display: flex; + justify-content: space-around; + align-items: center; +} +.payTypenName{ + text-transform: capitalize; + font-size: 32rpx; +} \ No newline at end of file diff --git a/pages/recharge/index.vue b/pages/recharge/index.vue new file mode 100644 index 0000000..3fa4867 --- /dev/null +++ b/pages/recharge/index.vue @@ -0,0 +1,271 @@ + + + + + diff --git a/pages/recharge/rechargeRule.vue b/pages/recharge/rechargeRule.vue new file mode 100644 index 0000000..e442817 --- /dev/null +++ b/pages/recharge/rechargeRule.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/pages/recharge/record/index.css b/pages/recharge/record/index.css new file mode 100644 index 0000000..9699165 --- /dev/null +++ b/pages/recharge/record/index.css @@ -0,0 +1,30 @@ +.record_body{ + padding: 0 36rpx; +} +.flex{ + display: flex; + justify-content: space-between; + align-items: center; +} +.record_item{ + height: 144rpx; +} +.numcon .img1{ + width: 40rpx; + height: 40rpx; +} +.num{ + margin-left: 20rpx; +} +.rec{ + color: #303133; + font-size: 32rpx; +} +.cpay{ + color: #954DE3; + font-size: 28rpx; +} +.time{ + color: #909399; + font-size: 28rpx; +} \ No newline at end of file diff --git a/pages/recharge/record/index.vue b/pages/recharge/record/index.vue new file mode 100644 index 0000000..a496e5d --- /dev/null +++ b/pages/recharge/record/index.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/pages/register/index.css b/pages/register/index.css new file mode 100644 index 0000000..e017e4a --- /dev/null +++ b/pages/register/index.css @@ -0,0 +1,130 @@ + +.flex{ + display: flex; + align-items: center; +} +.login-body{ + padding: 0 36rpx; + padding-top: 48rpx; +} +.input-item{ + position: relative; + height: 96rpx; + padding-left: 24rpx; + border-bottom: 2rpx solid #F4F5F7; + margin-bottom: 24rpx; +} + +.input-item input{ + line-height: 96rpx; + width: 500rpx; + font-size: 28rpx; + color: #303133FF; +} +.login-sigh{ + width: 172rpx; + position: relative; +} + +.login-sigh::before{ + content: ''; + width: 4rpx; + height: 26rpx; + background-color: #BFC2CCFF; + position: absolute; + right: 16rpx; + top: 50%; + transform: translateY(-50%); +} +.login-sigh3{ + align-items: center; +} +.login-sigh3 .img1{ + width: 180rpx; + height: 60rpx; + margin-right: 20rpx; +} +.login-sigh3 .img2{ + width: 24rpx; + height: 24rpx; + margin-right: 20rpx; +} +.login-sigh2{ + width: 64rpx; +} +.login-sigh2::before{ + content: none; +} +.login-sigh .imgcon{ + width: 40rpx; + height: 40rpx; +} +.login-sigh .imgcon image{ + width: 100%; + height: 100%; +} +.login-sigh .quhao{ + font-size: 28rpx; + color: #303133FF; + margin-left: 20rpx; +} +.rePass{ + color: #606266FF; + font-size: 28rpx; + float: right; +} +.login-btn{ + text-align: center; + line-height: 96rpx; + background: #34026B; + opacity: 0.2; + border-radius: 24rpx; + color: #fff; + margin-top: 120rpx; +} +.login-btnon{ + opacity: 1; +} +.login-re{ + width: auto; + display: table; + margin: 0 auto; + font-size: 14px; + font-weight: 400; + line-height: 27px; + color: #606266; + margin-top: 18px; + position: relative; + padding-right: 36rpx; +} +.login-re::before{ + content: ''; + width: 24rpx; + height: 24rpx; + background: url(../../static/login/top_icon_ins@2x.png)no-repeat; + background-size: contain; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); +} +.input-item input::-webkit-input-placeholder { + color: red; +} +.input-item input:-moz-placeholder { + color: red; +} +.input-item input:-ms-input-placeholder { + color: red; +} +.otp{ + width: 80rpx; + line-height: 40rpx; + border: 2rpx solid #954DE3FF; + border-radius: 8rpx; + text-align: center; + color:#954DE3FF ; +} +.input_pcod{ + padding-left: 20rpx; +} \ No newline at end of file diff --git a/pages/register/index.vue b/pages/register/index.vue new file mode 100644 index 0000000..d66f32f --- /dev/null +++ b/pages/register/index.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages/rule/arules/index.vue b/pages/rule/arules/index.vue new file mode 100644 index 0000000..c1f7c13 --- /dev/null +++ b/pages/rule/arules/index.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/pages/rule/index.css b/pages/rule/index.css new file mode 100644 index 0000000..19b0e8d --- /dev/null +++ b/pages/rule/index.css @@ -0,0 +1,64 @@ + +.ru-head{ + height: 108rpx; + background-color: #34026B; + position: relative; + padding: 0 36rpx; +} +.ru-imgcon{ + width: 44rpx; + height: 44rpx; + position: absolute; + left: 36rpx; + top: 50%; + transform: translateY(-50%); +} +.ru-imgcon image{ + width: 100%; + height: 100%; +} +.ru-body{ + padding: 0 36rpx; + padding-top: 48rpx; +} +.ru-body-p1{ + color: #303133FF; + font-size: 32rpx; +} +.ru-table{ + border: 2rpx solid #EDEFF2; + border-bottom: none; + border-collapse: collapse; +} +.ru-body-p1{ + font-size: 32rpx; + color: #303133FF; + text-transform: capitalize; +} +.ru-table{ + margin-top: 36rpx; +} +.ru-table tr{ + width: 100%; + display: block; +border-bottom: 2rpx solid #EDEFF2; + text-align: center; + line-height: 72rpx; + +} +.ru-table tbody{ + color: #909399FF; +} +.ru-table tr .t1{ + width: 200rpx; + border-right: 2rpx solid #EDEFF2; +} +.ru-table tr .t2{ + width: 476rpx; +} +.ru-cont{ + color: #303133FF; + font-size: 28rpx; + line-height: 54rpx; + padding: 48rpx 0; +} \ No newline at end of file diff --git a/pages/rule/index.vue b/pages/rule/index.vue new file mode 100644 index 0000000..bf96ed5 --- /dev/null +++ b/pages/rule/index.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/pages/rule/inviteRule/index.css b/pages/rule/inviteRule/index.css new file mode 100644 index 0000000..19b0e8d --- /dev/null +++ b/pages/rule/inviteRule/index.css @@ -0,0 +1,64 @@ + +.ru-head{ + height: 108rpx; + background-color: #34026B; + position: relative; + padding: 0 36rpx; +} +.ru-imgcon{ + width: 44rpx; + height: 44rpx; + position: absolute; + left: 36rpx; + top: 50%; + transform: translateY(-50%); +} +.ru-imgcon image{ + width: 100%; + height: 100%; +} +.ru-body{ + padding: 0 36rpx; + padding-top: 48rpx; +} +.ru-body-p1{ + color: #303133FF; + font-size: 32rpx; +} +.ru-table{ + border: 2rpx solid #EDEFF2; + border-bottom: none; + border-collapse: collapse; +} +.ru-body-p1{ + font-size: 32rpx; + color: #303133FF; + text-transform: capitalize; +} +.ru-table{ + margin-top: 36rpx; +} +.ru-table tr{ + width: 100%; + display: block; +border-bottom: 2rpx solid #EDEFF2; + text-align: center; + line-height: 72rpx; + +} +.ru-table tbody{ + color: #909399FF; +} +.ru-table tr .t1{ + width: 200rpx; + border-right: 2rpx solid #EDEFF2; +} +.ru-table tr .t2{ + width: 476rpx; +} +.ru-cont{ + color: #303133FF; + font-size: 28rpx; + line-height: 54rpx; + padding: 48rpx 0; +} \ No newline at end of file diff --git a/pages/rule/inviteRule/index.vue b/pages/rule/inviteRule/index.vue new file mode 100644 index 0000000..767eb26 --- /dev/null +++ b/pages/rule/inviteRule/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/pages/withdrawl/index.css b/pages/withdrawl/index.css new file mode 100644 index 0000000..efa64fe --- /dev/null +++ b/pages/withdrawl/index.css @@ -0,0 +1,144 @@ +.bread{ + +} +.bread image{ + width: 28rpx; + height: 24rpx; + position: absolute; + right: 36rpx; + top: 50%; + transform: translateY(-50%); +} +.rech-body{ + padding: 0 36rpx; +} +.pro-body-p1{ + font-size: 22px; + color: #303133FF; + text-align: center; + padding: 30px 0; + text-transform: capitalize; +} +.category-sigh{ + font-size: 18px; + padding-left: 8px; +} +.pro-body-p1 .s1{ + font-family: 'din'; + padding-left: 4px; + vertical-align: bottom; +} +.input-item{ + position: relative; + height: 48px; + padding-left: 12px; + border-bottom: 1px solid #F4F5F7; + margin-bottom: 12px; +} +.input-item input{ + line-height: 96rpx; + width: 500rpx; + text-transform: capitalize; + font-size: 28rpx; + color: #303133FF; +} +.login-sigh{ + width: 110rpx; + position: relative; +} + +.login-sigh::before{ + content: ''; + width: 4rpx; + height: 26rpx; + background-color: #BFC2CCFF; + position: absolute; + right: 16rpx; + top: 50%; + transform: translateY(-50%); +} +.login-sigh2{ + width: 64rpx; +} +.login-sigh2::before{ + content: none; +} +.login-sigh .imgcon{ + width: 40rpx; + height: 40rpx; +} +.login-sigh .imgcon image{ + width: 100%; + height: 100%; +} +.login-sigh .quhao{ + font-size: 28rpx; + color: #303133FF; +} +.flex{ + display: flex; + align-items: center; +} +.rech-input-con{ + margin-top: 60rpx; +} +.rech-mount { + justify-content: space-between; + padding: 0 36rpx; + margin-top: 48rpx; + flex-wrap: wrap; +} +.mount{ + width: 210rpx; + line-height: 88rpx; + background: #FFFFFF; + border: 2rpx solid #EDEFF2; + opacity: 1; + border-radius: 16rpx; + font-size: 28rpx; + font-weight: 500; + color: #303133; + text-align: center; + margin-bottom: 24rpx; +} +.mount:hover{ + border-color: #34026BFF; +} +.rech-capy{ + margin-top: 25rpx; + padding: 0 36rpx; +} +.payment{ + font-size: 28rpx; + color: #909399; + text-transform: capitalize; + margin-bottom: 24rpx; +} +.capy{ + font-size: 32rpx; + color: #954DE3; + display: flex; + align-items: center; +} +.capy image{ + width: 34rpx; + height: 34rpx; + padding-right: 12rpx; +} +.rech-btn{ + margin-top: 58rpx; + line-height: 96rpx; + background: #34026B; + border-radius: 24rpx; + font-size: 28rpx; + font-weight: 400; + color: #FFFFFF; + text-transform: capitalize; + text-align: center; +} +.rech-btn-con{ + padding: 0 36rpx; +} +.content{ + padding-bottom: 170rpx; +} \ No newline at end of file diff --git a/pages/withdrawl/index.vue b/pages/withdrawl/index.vue new file mode 100644 index 0000000..bbfb4a3 --- /dev/null +++ b/pages/withdrawl/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/pages/withdrawl/transactions/index.vue b/pages/withdrawl/transactions/index.vue new file mode 100644 index 0000000..28f3cf9 --- /dev/null +++ b/pages/withdrawl/transactions/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/pages/withdrawl/withdrawlRecord/index.vue b/pages/withdrawl/withdrawlRecord/index.vue new file mode 100644 index 0000000..9a44ae1 --- /dev/null +++ b/pages/withdrawl/withdrawlRecord/index.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/static/color/bg_er@3x(4).png b/static/color/bg_er@3x(4).png new file mode 100644 index 0000000..d2e1708 Binary files /dev/null and b/static/color/bg_er@3x(4).png differ diff --git a/static/color/bg_er@3x.png b/static/color/bg_er@3x.png new file mode 100644 index 0000000..8ba7e34 Binary files /dev/null and b/static/color/bg_er@3x.png differ diff --git a/static/color/bg_er@3xGREEN.png b/static/color/bg_er@3xGREEN.png new file mode 100644 index 0000000..8ba7e34 Binary files /dev/null and b/static/color/bg_er@3xGREEN.png differ diff --git a/static/color/bg_er@3xRED.png b/static/color/bg_er@3xRED.png new file mode 100644 index 0000000..e6e28e4 Binary files /dev/null and b/static/color/bg_er@3xRED.png differ diff --git a/static/color/bg_er@3xVIOLET.png b/static/color/bg_er@3xVIOLET.png new file mode 100644 index 0000000..d2e1708 Binary files /dev/null and b/static/color/bg_er@3xVIOLET.png differ diff --git a/static/color/bg_er_2@3x.png b/static/color/bg_er_2@3x.png new file mode 100644 index 0000000..e6e28e4 Binary files /dev/null and b/static/color/bg_er_2@3x.png differ diff --git a/static/color/ico_apple_green@3x.png b/static/color/ico_apple_green@3x.png new file mode 100644 index 0000000..7363ee2 Binary files /dev/null and b/static/color/ico_apple_green@3x.png differ diff --git a/static/color/ico_apple_red@3x.png b/static/color/ico_apple_red@3x.png new file mode 100644 index 0000000..703e2e7 Binary files /dev/null and b/static/color/ico_apple_red@3x.png differ diff --git a/static/color/ico_apple_red_2@2x.png b/static/color/ico_apple_red_2@2x.png new file mode 100644 index 0000000..1d09adc Binary files /dev/null and b/static/color/ico_apple_red_2@2x.png differ diff --git a/static/color/ico_chili_purple@3x.png b/static/color/ico_chili_purple@3x.png new file mode 100644 index 0000000..9723a91 Binary files /dev/null and b/static/color/ico_chili_purple@3x.png differ diff --git a/static/color/ico_chili_purple_2@3x.png b/static/color/ico_chili_purple_2@3x.png new file mode 100644 index 0000000..9c6f5a7 Binary files /dev/null and b/static/color/ico_chili_purple_2@3x.png differ diff --git a/static/color/loading_icon_ins@3x(18).png b/static/color/loading_icon_ins@3x(18).png new file mode 100644 index 0000000..bddf155 Binary files /dev/null and b/static/color/loading_icon_ins@3x(18).png differ diff --git a/static/color/loading_icon_ins@3x(20).png b/static/color/loading_icon_ins@3x(20).png new file mode 100644 index 0000000..3460338 Binary files /dev/null and b/static/color/loading_icon_ins@3x(20).png differ diff --git a/static/color/top_icon_ins@3x.png b/static/color/top_icon_ins@3x.png new file mode 100644 index 0000000..cf3317b Binary files /dev/null and b/static/color/top_icon_ins@3x.png differ diff --git a/static/fonts/DIN-Bold.otf b/static/fonts/DIN-Bold.otf new file mode 100644 index 0000000..782e68e Binary files /dev/null and b/static/fonts/DIN-Bold.otf differ diff --git a/static/home/bg_color@2x.png b/static/home/bg_color@2x.png new file mode 100644 index 0000000..fb39d56 Binary files /dev/null and b/static/home/bg_color@2x.png differ diff --git a/static/home/nav_icon_close@2x.png b/static/home/nav_icon_close@2x.png new file mode 100644 index 0000000..5129c68 Binary files /dev/null and b/static/home/nav_icon_close@2x.png differ diff --git a/static/home/pop_icon_service@2x.png b/static/home/pop_icon_service@2x.png new file mode 100644 index 0000000..c615952 Binary files /dev/null and b/static/home/pop_icon_service@2x.png differ diff --git a/static/home/top_icon_ins.png b/static/home/top_icon_ins.png new file mode 100644 index 0000000..722e3cd Binary files /dev/null and b/static/home/top_icon_ins.png differ diff --git a/static/login/icon_hook@2x.png b/static/login/icon_hook@2x.png new file mode 100644 index 0000000..938aa61 Binary files /dev/null and b/static/login/icon_hook@2x.png differ diff --git a/static/login/icon_refresh@2x.png b/static/login/icon_refresh@2x.png new file mode 100644 index 0000000..4c53ac9 Binary files /dev/null and b/static/login/icon_refresh@2x.png differ diff --git a/static/login/list_icon_card@2x.png b/static/login/list_icon_card@2x.png new file mode 100644 index 0000000..405514d Binary files /dev/null and b/static/login/list_icon_card@2x.png differ diff --git a/static/login/list_icon_code@2x.png b/static/login/list_icon_code@2x.png new file mode 100644 index 0000000..164bf40 Binary files /dev/null and b/static/login/list_icon_code@2x.png differ diff --git a/static/login/list_icon_img@2x.png b/static/login/list_icon_img@2x.png new file mode 100644 index 0000000..b2c6c8a Binary files /dev/null and b/static/login/list_icon_img@2x.png differ diff --git a/static/login/list_icon_key@2x.png b/static/login/list_icon_key@2x.png new file mode 100644 index 0000000..71916ec Binary files /dev/null and b/static/login/list_icon_key@2x.png differ diff --git a/static/login/list_icon_phone@2x.png b/static/login/list_icon_phone@2x.png new file mode 100644 index 0000000..9bf8163 Binary files /dev/null and b/static/login/list_icon_phone@2x.png differ diff --git a/static/login/top_icon_ins@2x.png b/static/login/top_icon_ins@2x.png new file mode 100644 index 0000000..5dd165a Binary files /dev/null and b/static/login/top_icon_ins@2x.png differ diff --git a/static/my/default_photo@2x.png b/static/my/default_photo@2x.png new file mode 100644 index 0000000..b6cab3e Binary files /dev/null and b/static/my/default_photo@2x.png differ diff --git a/static/promo/bg_promotion@2x.png b/static/promo/bg_promotion@2x.png new file mode 100644 index 0000000..676a7fd Binary files /dev/null and b/static/promo/bg_promotion@2x.png differ diff --git a/static/promo/list_icon_meiyuan@3x.png b/static/promo/list_icon_meiyuan@3x.png new file mode 100644 index 0000000..e645781 Binary files /dev/null and b/static/promo/list_icon_meiyuan@3x.png differ diff --git a/static/promo/menban@3x.png b/static/promo/menban@3x.png new file mode 100644 index 0000000..4d63c1a Binary files /dev/null and b/static/promo/menban@3x.png differ diff --git a/static/promo/nav_icon_des@2x.png b/static/promo/nav_icon_des@2x.png new file mode 100644 index 0000000..e4cd6c8 Binary files /dev/null and b/static/promo/nav_icon_des@2x.png differ diff --git a/static/promo/nav_icon_more@2x.png b/static/promo/nav_icon_more@2x.png new file mode 100644 index 0000000..2c38b44 Binary files /dev/null and b/static/promo/nav_icon_more@2x.png differ diff --git a/static/tabbar/meun_icon_game_nor@2x.png b/static/tabbar/meun_icon_game_nor@2x.png new file mode 100644 index 0000000..7b6a385 Binary files /dev/null and b/static/tabbar/meun_icon_game_nor@2x.png differ diff --git a/static/tabbar/meun_icon_game_sel@2x.png b/static/tabbar/meun_icon_game_sel@2x.png new file mode 100644 index 0000000..e600da9 Binary files /dev/null and b/static/tabbar/meun_icon_game_sel@2x.png differ diff --git a/static/tabbar/meun_icon_my_nor@2x.png b/static/tabbar/meun_icon_my_nor@2x.png new file mode 100644 index 0000000..3967983 Binary files /dev/null and b/static/tabbar/meun_icon_my_nor@2x.png differ diff --git a/static/tabbar/meun_icon_my_sel@2x.png b/static/tabbar/meun_icon_my_sel@2x.png new file mode 100644 index 0000000..4e2fb91 Binary files /dev/null and b/static/tabbar/meun_icon_my_sel@2x.png differ diff --git a/static/tabbar/meun_icon_promotion_nor@2x.png b/static/tabbar/meun_icon_promotion_nor@2x.png new file mode 100644 index 0000000..c9f5d5d Binary files /dev/null and b/static/tabbar/meun_icon_promotion_nor@2x.png differ diff --git a/static/tabbar/meun_icon_promotion_sel@2x.png b/static/tabbar/meun_icon_promotion_sel@2x.png new file mode 100644 index 0000000..475376b Binary files /dev/null and b/static/tabbar/meun_icon_promotion_sel@2x.png differ diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..a6ef61e --- /dev/null +++ b/store/index.js @@ -0,0 +1,49 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +const store = new Vuex.Store({ + state: { + // 从本地缓存中同步获取指定 key 对应的内容。 + ticket: uni.getStorageSync('ticket') || '', + account: uni.getStorageSync('account') || '', + password: uni.getStorageSync('password') || '', + siteInfo: { + 'id': '', + 'userId': '', + 'siteName': '', + 'siteLogo': '', + 'siteDomain': '', + 'shortDomain': '', + 'adminDomain': '', + 'siteEmail': '', + 'siteTelephone': '', + 'siteMobile': '', + 'siteWhatsapp': '', + 'siteTelegram': '', + 'corpName': '', + 'corpAddress': '', + 'status': '', + 'serviceTime': '', + 'countryCode': '', + 'addTime': null, + 'currencyCode': '', + 'currencySymbol': '', + 'areaCode': '', + 'timeZone': null + } + }, + mutations: { + setTicket: (state, ticket) => { + const obj = state + obj.ticket = ticket + }, + setSiteInfo: (state, siteInfo) => { + const obj = state + obj.siteInfo = siteInfo + } + } +}) + +export default store diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..d9c7baa --- /dev/null +++ b/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ +@import 'uview-ui/theme.scss'; +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24rpx; +$uni-font-size-base:28rpx; +$uni-font-size-lg:32rpx; + +/* 图片尺寸 */ +$uni-img-size-sm:40rpx; +$uni-img-size-base:52rpx; +$uni-img-size-lg:80rpx; + +/* Border Radius */ +$uni-border-radius-sm: 4rpx; +$uni-border-radius-base: 6rpx; +$uni-border-radius-lg: 12rpx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20rpx; +$uni-spacing-row-lg: 30rpx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8rpx; +$uni-spacing-col-base: 16rpx; +$uni-spacing-col-lg: 24rpx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40rpx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36rpx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:30rpx; \ No newline at end of file diff --git a/utils/api.js b/utils/api.js new file mode 100644 index 0000000..7e00afb --- /dev/null +++ b/utils/api.js @@ -0,0 +1,50 @@ +import Vue from 'vue'; +import qs from 'qs' +const api = { + //---------------------------------account--------------------------------- + siteInfo: () => Vue.prototype.$axios.get('/api/home/siteInfo'), + register: (params) => Vue.prototype.$axios.post('/api/home/register',params), + login: (params) => Vue.prototype.$axios.post('/api/user/login',params), + loginOut: (params) => Vue.prototype.$axios.post('/api/user/loginOut',params), + forgotPassword: (params) => Vue.prototype.$axios.post('/api/user/forgotPassword',params), + updatePassword: (params) => Vue.prototype.$axios.post('/api/user/updatePassword',params), + userInfo: (params) => Vue.prototype.$axios.post('/api/user/userInfo',params), + updateNickname: (params) => Vue.prototype.$axios.post('/api/user/updateNickname',params), + updateGender: (params) => Vue.prototype.$axios.post('/api/user/updateGender',params), + + + //--------------------------------- free --------------------------------- + imgCode: () => Vue.prototype.$axios.get('/api/home/imgCode'), + sendSmsCode: (params) => Vue.prototype.$axios.post('/api/home/sendSmsCode',params), + + + //--------------------------------- bet --------------------------------- + lotteryClassList: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryClassList',params), + nextLotteryPeriod: (params) => Vue.prototype.$axios.post('/api/lottery/nextLotteryPeriod',params), + bettingConfig: (params) => Vue.prototype.$axios.post('/api/lottery/bettingConfig',params), + betting: (params) => Vue.prototype.$axios.post('/api/lottery/betting',params), + lotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryRecords',params), + myLotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/myLotteryRecords',params), + + + //--------------------------------- me --------------------------------- + getPayType: (params) => Vue.prototype.$axios.post('/api/recharge/getPayType',params), + rechargeConfig: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeConfig',params), + recharge: (params) => Vue.prototype.$axios.post('/api/recharge/recharge',params), + rechargeList: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeList',params), + toPay: (params) => Vue.prototype.$axios.post('/api/recharge/toPay',params), + withdrawConfig: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawConfig',params), + withdrawServiceCharge: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawServiceCharge',params), + withdraw: (params) => Vue.prototype.$axios.post('/api/withdraw/withdraw',params), + withdrawList: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawList',params), + billList: (params) => Vue.prototype.$axios.post('/api/summary/billList',params), + + //--------------------------------- invite --------------------------------- + inviteCode: (params) => Vue.prototype.$axios.post('/api/user/inviteCode',params), + bonusOut: (params) => Vue.prototype.$axios.post('/api/summary/bonusOut',params), + bonusOutRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusOutRecords',params), + + } + + +export default api diff --git a/utils/axios.js b/utils/axios.js new file mode 100644 index 0000000..e47264f --- /dev/null +++ b/utils/axios.js @@ -0,0 +1,174 @@ +import Vue from 'vue' +import axios from 'axios' +import qs from 'qs' +import md5 from 'js-md5'; +import constant from './constant.js'; + +// #ifdef H5 +let baseURL = constant.H5 +let key = constant.H5_KEY +// #endif +// #ifdef APP-PLUS +let baseURL = constant.APP +let key = constant.APP_KEY +// #endif +const service = axios.create({ + withCredentials: true, + crossDomain: true, + baseURL, + timeout: 160000 +}) + +// request拦截器,在请求之前做一些处理 +service.interceptors.request.use( + config => { + console.log('showDialog' + Vue.prototype.$showDialog) + if (Vue.prototype.$showDialog) { + uni.showLoading({ + title: 'loading', + mask: true + }) + } + // if (store.state.token) { + // // 给请求头添加user-token + // config.headers["user-token"] = store.state.token; + // } + // const ticket = Vue.prototype.$store.state.ticket + // let dataStr=[]; + // if (config.method=='get') { + // console.log(11111111111111) + + // if(config.url.split('?').length>1){ + // dataStr=config.url.split('?')[1].split('&'); + // } + + // } + // if(config.method=='post'){ + // dataStr=qs.stringify(config.data).split('&'); + // } + // console.log(dataStr); + // config.data={}; + // dataStr.forEach(function(e){ + // config.data[e.split('=')[0]]=e.split('=')[1]; + // }); + // console.log(ticket) + // if (ticket != '') { + // config.data['ticket'] = ticket + // } + // var keys = []; + // let sign=''; + //     for (var k in config.data) + //       keys.push(k); + // keys.sort(function(a,b){ + // return a { + return Promise.reject(error) +}) + + +axios.defaults.adapter = function(config) { //自己定义个适配器,用来适配uniapp的语法 + return new Promise((resolve, reject) => { + console.log(config) + var settle = require('axios/lib/core/settle'); + var buildURL = require('axios/lib/helpers/buildURL'); + uni.request({ + method: config.method.toUpperCase(), + url: config.baseURL + buildURL(config.url, config.params, config.paramsSerializer), + header: config.headers, + data: config.data, + dataType: config.dataType, + responseType: config.responseType, + sslVerify: config.sslVerify, + complete: function complete(response) { + console.log("执行完成:",config.baseURL + buildURL(config.url, config.params, config.paramsSerializer),response.data) + response = { + data: response.data, + status: response.statusCode, + errMsg: response.errMsg, + header: response.header, + config: config + }; + + settle(resolve, reject, response); + }, + fail:res =>{ + uni.showToast({ + title: res, + icon:'none', + duration: 1500 + }) + } + }) + }) +} +export default service \ No newline at end of file diff --git a/utils/constant.js b/utils/constant.js new file mode 100644 index 0000000..6670bff --- /dev/null +++ b/utils/constant.js @@ -0,0 +1,14 @@ +const H5 = '/start'; +const H5_KEY = 'key=wHoUuIiQ8rOSNrxzl1WZJSymZlmXMJ7w'; + +const APP = 'https://api.in-earn.co.ke'; //正式 +// const APP = 'https://apitest.luck-work.com'; //测试 +const APP_KEY = 'key=wHoUuIiQ8rOSNrxzl1WZJSymZlmXMJ7w'; +const showDialog = true +export default { + H5, + H5_KEY, + APP, + APP_KEY, + showDialog, +} \ No newline at end of file diff --git a/utils/index.js b/utils/index.js new file mode 100644 index 0000000..5103919 --- /dev/null +++ b/utils/index.js @@ -0,0 +1,99 @@ +var utils = { + checkEmail: function(email) { + return RegExp( + /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/) + .test(email); + }, + checkMobile: function(mobile) { + return RegExp(/^1[34578]\d{9}$/).test(mobile); + }, + caculateTime: function(timeZome, time) { + return time + (timeZome * 1000 * 60 * 60); + }, + formatyymmdd: function(time) { + var date = new Date(time) + console.log(date,5555655) + var localTime = date.getTime(); + var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数 + var utc = localTime + localOffset //utc即GMT时间 + var offset = 8; //东8区 + var beijing = utc + (3600000 * offset); + date = new Date(beijing); + var Y = date.getFullYear() + var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + console.log( M + '/' + D + '/' + Y,5454545454); + return M + '/' + D + '/' + Y; + + }, + formatyymmdd2: function(time) { + var date = new Date(time) + var localTime = date.getTime(); + var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数 + var utc = localTime + localOffset; //utc即GMT时间 + var offset = 8; //东8区 + var beijing = utc + (3600000 * offset); + date = new Date(beijing); + var Y = date.getFullYear() + var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return Y + M + D; + }, + formatyymmddhhmmss: function(time) { + var date = new Date(time) + var localTime = date.getTime() + var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数 + var utc = localTime + localOffset; //utc即GMT时间 + var offset = 8 //东8区 + var beijing = utc + (3600000 * offset); + date = new Date(beijing) + var Y = date.getFullYear() + var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s; + }, + formathhmm: function(time) { + var date = new Date(time) + var localTime = date.getTime(); + var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数 + var utc = localTime + localOffset; //utc即GMT时间 + var offset = 8; //东8区 + var beijing = utc + (3600000 * offset); + date = new Date(beijing); + var Y = date.getFullYear() + var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return h + ':' + m; + }, + //客户端时间转换为北京时间 + getBeijingtime: function() { + //获得当前运行环境时间 + let d = new Date(); + let currentDate = new Date(); + let tmpHours = currentDate.getHours(); + //算得时区 + let time_zone = -d.getTimezoneOffset() / 60; + if (time_zone < 0) { + time_zone = Math.abs(time_zone) + 8; + currentDate.setHours(tmpHours + time_zone); + } else { + time_zone -= 8; + currentDate.setHours(tmpHours - time_zone); + } + return currentDate; + }, +} + +export default utils diff --git a/utils/index.scss b/utils/index.scss new file mode 100644 index 0000000..bf736cd --- /dev/null +++ b/utils/index.scss @@ -0,0 +1,6 @@ +// --color 相当于全局定义的一个css变量 +// var(--color) 用于引用 +// 在页面样式的引用中,你将会看到 +:root { + --mainColor: #0DA274; +} \ No newline at end of file diff --git a/utils/tawk.js b/utils/tawk.js new file mode 100644 index 0000000..a15a6f5 --- /dev/null +++ b/utils/tawk.js @@ -0,0 +1,5 @@ +import Tawk from 'vue-tawk' +import Vue from 'vue' +Vue.use(Tawk, { + tawkSrc: 'https://embed.tawk.to/603b78c91c1c2a130d63421b/1evk4vl4k' +}) \ No newline at end of file diff --git a/uview-ui/LICENSE b/uview-ui/LICENSE new file mode 100644 index 0000000..8e39ead --- /dev/null +++ b/uview-ui/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 www.uviewui.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. \ No newline at end of file diff --git a/uview-ui/README.md b/uview-ui/README.md new file mode 100644 index 0000000..06d5676 --- /dev/null +++ b/uview-ui/README.md @@ -0,0 +1,106 @@ +

+ logo +

+

uView

+

多平台快速开发的UI框架

+ + +## 说明 + +uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水 + +## 特性 + +- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序 +- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用 +- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨 +- 众多的常用页面和布局,让您专注逻辑,事半功倍 +- 详尽的文档支持,现代化的演示效果 +- 按需引入,精简打包体积 + + +## 安装 + +```bash +# npm方式安装 +npm i uview-ui +``` + +## 快速上手 + +1. `main.js`引入uView库 +```js +// main.js +import uView from 'uview-ui'; +Vue.use(uView); +``` + +2. `App.vue`引入基础样式(注意style标签需声明scss属性支持) +```css +/* App.vue */ + +``` + +3. `uni.scss`引入全局scss变量文件 +```css +/* uni.scss */ +@import "uview-ui/theme.scss"; +``` + +4. `pages.json`配置easycom规则(按需引入) + +```js +// pages.json +{ + "easycom": { + // npm安装的方式不需要前面的"@/",下载安装的方式需要"@/" + // npm安装方式 + "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" + // 下载安装方式 + // "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + // 此为本身已有的内容 + "pages": [ + // ...... + ] +} +``` + +请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 + +## 使用方法 +配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。 + +```html + +``` + +请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 + +## 链接 + +- [官方文档](https://uviewui.com/) +- [更新日志](https://uviewui.com/components/changelog.html) +- [升级指南](https://uviewui.com/components/changelog.html) +- [关于我们](https://uviewui.com/cooperation/about.html) + +## 预览 + +您可以通过**微信**扫码,查看最佳的演示效果。 +
+
+ + + +## 版权信息 +uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。 diff --git a/uview-ui/components/u-action-sheet/u-action-sheet.vue b/uview-ui/components/u-action-sheet/u-action-sheet.vue new file mode 100644 index 0000000..722b668 --- /dev/null +++ b/uview-ui/components/u-action-sheet/u-action-sheet.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/uview-ui/components/u-alert-tips/u-alert-tips.vue b/uview-ui/components/u-alert-tips/u-alert-tips.vue new file mode 100644 index 0000000..e81fc37 --- /dev/null +++ b/uview-ui/components/u-alert-tips/u-alert-tips.vue @@ -0,0 +1,256 @@ + + + + + diff --git a/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue b/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue new file mode 100644 index 0000000..a48dd54 --- /dev/null +++ b/uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue @@ -0,0 +1,290 @@ + + + + + diff --git a/uview-ui/components/u-avatar-cropper/weCropper.js b/uview-ui/components/u-avatar-cropper/weCropper.js new file mode 100644 index 0000000..df02483 --- /dev/null +++ b/uview-ui/components/u-avatar-cropper/weCropper.js @@ -0,0 +1,1265 @@ +/** + * we-cropper v1.3.9 + * (c) 2020 dlhandsome + * @license MIT + */ +(function(global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.WeCropper = factory()); +}(this, (function() { + 'use strict'; + + var device = void 0; + var TOUCH_STATE = ['touchstarted', 'touchmoved', 'touchended']; + + function firstLetterUpper(str) { + return str.charAt(0).toUpperCase() + str.slice(1) + } + + function setTouchState(instance) { + var arg = [], + len = arguments.length - 1; + while (len-- > 0) arg[len] = arguments[len + 1]; + + TOUCH_STATE.forEach(function(key, i) { + if (arg[i] !== undefined) { + instance[key] = arg[i]; + } + }); + } + + function validator(instance, o) { + Object.defineProperties(instance, o); + } + + function getDevice() { + if (!device) { + device = uni.getSystemInfoSync(); + } + return device + } + + var tmp = {}; + + var ref = getDevice(); + var pixelRatio = ref.pixelRatio; + + var DEFAULT = { + id: { + default: 'cropper', + get: function get() { + return tmp.id + }, + set: function set(value) { + if (typeof(value) !== 'string') { + console.error(("id:" + value + " is invalid")); + } + tmp.id = value; + } + }, + width: { + default: 750, + get: function get() { + return tmp.width + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("width:" + value + " is invalid")); + } + tmp.width = value; + } + }, + height: { + default: 750, + get: function get() { + return tmp.height + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("height:" + value + " is invalid")); + } + tmp.height = value; + } + }, + pixelRatio: { + default: pixelRatio, + get: function get() { + return tmp.pixelRatio + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("pixelRatio:" + value + " is invalid")); + } + tmp.pixelRatio = value; + } + }, + scale: { + default: 2.5, + get: function get() { + return tmp.scale + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("scale:" + value + " is invalid")); + } + tmp.scale = value; + } + }, + zoom: { + default: 5, + get: function get() { + return tmp.zoom + }, + set: function set(value) { + if (typeof(value) !== 'number') { + console.error(("zoom:" + value + " is invalid")); + } else if (value < 0 || value > 10) { + console.error("zoom should be ranged in 0 ~ 10"); + } + tmp.zoom = value; + } + }, + src: { + default: '', + get: function get() { + return tmp.src + }, + set: function set(value) { + if (typeof(value) !== 'string') { + console.error(("src:" + value + " is invalid")); + } + tmp.src = value; + } + }, + cut: { + default: {}, + get: function get() { + return tmp.cut + }, + set: function set(value) { + if (typeof(value) !== 'object') { + console.error(("cut:" + value + " is invalid")); + } + tmp.cut = value; + } + }, + boundStyle: { + default: {}, + get: function get() { + return tmp.boundStyle + }, + set: function set(value) { + if (typeof(value) !== 'object') { + console.error(("boundStyle:" + value + " is invalid")); + } + tmp.boundStyle = value; + } + }, + onReady: { + default: null, + get: function get() { + return tmp.ready + }, + set: function set(value) { + tmp.ready = value; + } + }, + onBeforeImageLoad: { + default: null, + get: function get() { + return tmp.beforeImageLoad + }, + set: function set(value) { + tmp.beforeImageLoad = value; + } + }, + onImageLoad: { + default: null, + get: function get() { + return tmp.imageLoad + }, + set: function set(value) { + tmp.imageLoad = value; + } + }, + onBeforeDraw: { + default: null, + get: function get() { + return tmp.beforeDraw + }, + set: function set(value) { + tmp.beforeDraw = value; + } + } + }; + + var ref$1 = getDevice(); + var windowWidth = ref$1.windowWidth; + + function prepare() { + var self = this; + + // v1.4.0 版本中将不再自动绑定we-cropper实例 + self.attachPage = function() { + var pages = getCurrentPages(); + // 获取到当前page上下文 + var pageContext = pages[pages.length - 1]; + // 把this依附在Page上下文的wecropper属性上,便于在page钩子函数中访问 + Object.defineProperty(pageContext, 'wecropper', { + get: function get() { + console.warn( + 'Instance will not be automatically bound to the page after v1.4.0\n\n' + + 'Please use a custom instance name instead\n\n' + + 'Example: \n' + + 'this.mycropper = new WeCropper(options)\n\n' + + '// ...\n' + + 'this.mycropper.getCropperImage()' + ); + return self + }, + configurable: true + }); + }; + + self.createCtx = function() { + var id = self.id; + var targetId = self.targetId; + + if (id) { + self.ctx = self.ctx || uni.createCanvasContext(id); + self.targetCtx = self.targetCtx || uni.createCanvasContext(targetId); + } else { + console.error("constructor: create canvas context failed, 'id' must be valuable"); + } + }; + + self.deviceRadio = windowWidth / 750; + } + + var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== + 'undefined' ? self : {}; + + + + + + function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + + var tools = createCommonjsModule(function(module, exports) { + /** + * String type check + */ + exports.isStr = function(v) { + return typeof v === 'string'; + }; + /** + * Number type check + */ + exports.isNum = function(v) { + return typeof v === 'number'; + }; + /** + * Array type check + */ + exports.isArr = Array.isArray; + /** + * undefined type check + */ + exports.isUndef = function(v) { + return v === undefined; + }; + + exports.isTrue = function(v) { + return v === true; + }; + + exports.isFalse = function(v) { + return v === false; + }; + /** + * Function type check + */ + exports.isFunc = function(v) { + return typeof v === 'function'; + }; + /** + * Quick object check - this is primarily used to tell + * Objects from primitive values when we know the value + * is a JSON-compliant type. + */ + exports.isObj = exports.isObject = function(obj) { + return obj !== null && typeof obj === 'object' + }; + + /** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ + var _toString = Object.prototype.toString; + exports.isPlainObject = function(obj) { + return _toString.call(obj) === '[object Object]' + }; + + /** + * Check whether the object has the property. + */ + var hasOwnProperty = Object.prototype.hasOwnProperty; + exports.hasOwn = function(obj, key) { + return hasOwnProperty.call(obj, key) + }; + + /** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) + */ + exports.noop = function(a, b, c) {}; + + /** + * Check if val is a valid array index. + */ + exports.isValidArrayIndex = function(val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val) + }; + }); + + var tools_7 = tools.isFunc; + var tools_10 = tools.isPlainObject; + + var EVENT_TYPE = ['ready', 'beforeImageLoad', 'beforeDraw', 'imageLoad']; + + function observer() { + var self = this; + + self.on = function(event, fn) { + if (EVENT_TYPE.indexOf(event) > -1) { + if (tools_7(fn)) { + event === 'ready' ? + fn(self) : + self[("on" + (firstLetterUpper(event)))] = fn; + } + } else { + console.error(("event: " + event + " is invalid")); + } + return self + }; + } + + function wxPromise(fn) { + return function(obj) { + var args = [], + len = arguments.length - 1; + while (len-- > 0) args[len] = arguments[len + 1]; + + if (obj === void 0) obj = {}; + return new Promise(function(resolve, reject) { + obj.success = function(res) { + resolve(res); + }; + obj.fail = function(err) { + reject(err); + }; + fn.apply(void 0, [obj].concat(args)); + }) + } + } + + function draw(ctx, reserve) { + if (reserve === void 0) reserve = false; + + return new Promise(function(resolve) { + ctx.draw(reserve, resolve); + }) + } + + var getImageInfo = wxPromise(uni.getImageInfo); + + var canvasToTempFilePath = wxPromise(uni.canvasToTempFilePath); + + var base64 = createCommonjsModule(function(module, exports) { + /*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */ + (function(root) { + + // Detect free variables `exports`. + var freeExports = 'object' == 'object' && exports; + + // Detect free variable `module`. + var freeModule = 'object' == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, and use + // it as `root`. + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var InvalidCharacterError = function(message) { + this.message = message; + }; + InvalidCharacterError.prototype = new Error; + InvalidCharacterError.prototype.name = 'InvalidCharacterError'; + + var error = function(message) { + // Note: the error messages used throughout this file match those used by + // the native `atob`/`btoa` implementation in Chromium. + throw new InvalidCharacterError(message); + }; + + var TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + // http://whatwg.org/html/common-microsyntaxes.html#space-character + var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g; + + // `decode` is designed to be fully compatible with `atob` as described in the + // HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob + // The optimized base64-decoding algorithm used is based on @atk’s excellent + // implementation. https://gist.github.com/atk/1020396 + var decode = function(input) { + input = String(input) + .replace(REGEX_SPACE_CHARACTERS, ''); + var length = input.length; + if (length % 4 == 0) { + input = input.replace(/==?$/, ''); + length = input.length; + } + if ( + length % 4 == 1 || + // http://whatwg.org/C#alphanumeric-ascii-characters + /[^+a-zA-Z0-9/]/.test(input) + ) { + error( + 'Invalid character: the string to be decoded is not correctly encoded.' + ); + } + var bitCounter = 0; + var bitStorage; + var buffer; + var output = ''; + var position = -1; + while (++position < length) { + buffer = TABLE.indexOf(input.charAt(position)); + bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer; + // Unless this is the first of a group of 4 characters… + if (bitCounter++ % 4) { + // …convert the first 8 bits to a single ASCII character. + output += String.fromCharCode( + 0xFF & bitStorage >> (-2 * bitCounter & 6) + ); + } + } + return output; + }; + + // `encode` is designed to be fully compatible with `btoa` as described in the + // HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa + var encode = function(input) { + input = String(input); + if (/[^\0-\xFF]/.test(input)) { + // Note: no need to special-case astral symbols here, as surrogates are + // matched, and the input is supposed to only contain ASCII anyway. + error( + 'The string to be encoded contains characters outside of the ' + + 'Latin1 range.' + ); + } + var padding = input.length % 3; + var output = ''; + var position = -1; + var a; + var b; + var c; + var buffer; + // Make sure any padding is handled outside of the loop. + var length = input.length - padding; + + while (++position < length) { + // Read three bytes, i.e. 24 bits. + a = input.charCodeAt(position) << 16; + b = input.charCodeAt(++position) << 8; + c = input.charCodeAt(++position); + buffer = a + b + c; + // Turn the 24 bits into four chunks of 6 bits each, and append the + // matching character for each of them to the output. + output += ( + TABLE.charAt(buffer >> 18 & 0x3F) + + TABLE.charAt(buffer >> 12 & 0x3F) + + TABLE.charAt(buffer >> 6 & 0x3F) + + TABLE.charAt(buffer & 0x3F) + ); + } + + if (padding == 2) { + a = input.charCodeAt(position) << 8; + b = input.charCodeAt(++position); + buffer = a + b; + output += ( + TABLE.charAt(buffer >> 10) + + TABLE.charAt((buffer >> 4) & 0x3F) + + TABLE.charAt((buffer << 2) & 0x3F) + + '=' + ); + } else if (padding == 1) { + buffer = input.charCodeAt(position); + output += ( + TABLE.charAt(buffer >> 2) + + TABLE.charAt((buffer << 4) & 0x3F) + + '==' + ); + } + + return output; + }; + + var base64 = { + 'encode': encode, + 'decode': decode, + 'version': '0.1.0' + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof undefined == 'function' && + typeof undefined.amd == 'object' && + undefined.amd + ) { + undefined(function() { + return base64; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = base64; + } else { // in Narwhal or RingoJS v0.7.0- + for (var key in base64) { + base64.hasOwnProperty(key) && (freeExports[key] = base64[key]); + } + } + } else { // in Rhino or a web browser + root.base64 = base64; + } + + }(commonjsGlobal)); + }); + + function makeURI(strData, type) { + return 'data:' + type + ';base64,' + strData + } + + function fixType(type) { + type = type.toLowerCase().replace(/jpg/i, 'jpeg'); + var r = type.match(/png|jpeg|bmp|gif/)[0]; + return 'image/' + r + } + + function encodeData(data) { + var str = ''; + if (typeof data === 'string') { + str = data; + } else { + for (var i = 0; i < data.length; i++) { + str += String.fromCharCode(data[i]); + } + } + return base64.encode(str) + } + + /** + * 获取图像区域隐含的像素数据 + * @param canvasId canvas标识 + * @param x 将要被提取的图像数据矩形区域的左上角 x 坐标 + * @param y 将要被提取的图像数据矩形区域的左上角 y 坐标 + * @param width 将要被提取的图像数据矩形区域的宽度 + * @param height 将要被提取的图像数据矩形区域的高度 + * @param done 完成回调 + */ + function getImageData(canvasId, x, y, width, height, done) { + uni.canvasGetImageData({ + canvasId: canvasId, + x: x, + y: y, + width: width, + height: height, + success: function success(res) { + done(res, null); + }, + fail: function fail(res) { + done(null, res); + } + }); + } + + /** + * 生成bmp格式图片 + * 按照规则生成图片响应头和响应体 + * @param oData 用来描述 canvas 区域隐含的像素数据 { data, width, height } = oData + * @returns {*} base64字符串 + */ + function genBitmapImage(oData) { + // + // BITMAPFILEHEADER: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183374(v=vs.85).aspx + // BITMAPINFOHEADER: http://msdn.microsoft.com/en-us/library/dd183376.aspx + // + var biWidth = oData.width; + var biHeight = oData.height; + var biSizeImage = biWidth * biHeight * 3; + var bfSize = biSizeImage + 54; // total header size = 54 bytes + + // + // typedef struct tagBITMAPFILEHEADER { + // WORD bfType; + // DWORD bfSize; + // WORD bfReserved1; + // WORD bfReserved2; + // DWORD bfOffBits; + // } BITMAPFILEHEADER; + // + var BITMAPFILEHEADER = [ + // WORD bfType -- The file type signature; must be "BM" + 0x42, 0x4D, + // DWORD bfSize -- The size, in bytes, of the bitmap file + bfSize & 0xff, bfSize >> 8 & 0xff, bfSize >> 16 & 0xff, bfSize >> 24 & 0xff, + // WORD bfReserved1 -- Reserved; must be zero + 0, 0, + // WORD bfReserved2 -- Reserved; must be zero + 0, 0, + // DWORD bfOffBits -- The offset, in bytes, from the beginning of the BITMAPFILEHEADER structure to the bitmap bits. + 54, 0, 0, 0 + ]; + + // + // typedef struct tagBITMAPINFOHEADER { + // DWORD biSize; + // LONG biWidth; + // LONG biHeight; + // WORD biPlanes; + // WORD biBitCount; + // DWORD biCompression; + // DWORD biSizeImage; + // LONG biXPelsPerMeter; + // LONG biYPelsPerMeter; + // DWORD biClrUsed; + // DWORD biClrImportant; + // } BITMAPINFOHEADER, *PBITMAPINFOHEADER; + // + var BITMAPINFOHEADER = [ + // DWORD biSize -- The number of bytes required by the structure + 40, 0, 0, 0, + // LONG biWidth -- The width of the bitmap, in pixels + biWidth & 0xff, biWidth >> 8 & 0xff, biWidth >> 16 & 0xff, biWidth >> 24 & 0xff, + // LONG biHeight -- The height of the bitmap, in pixels + biHeight & 0xff, biHeight >> 8 & 0xff, biHeight >> 16 & 0xff, biHeight >> 24 & 0xff, + // WORD biPlanes -- The number of planes for the target device. This value must be set to 1 + 1, 0, + // WORD biBitCount -- The number of bits-per-pixel, 24 bits-per-pixel -- the bitmap + // has a maximum of 2^24 colors (16777216, Truecolor) + 24, 0, + // DWORD biCompression -- The type of compression, BI_RGB (code 0) -- uncompressed + 0, 0, 0, 0, + // DWORD biSizeImage -- The size, in bytes, of the image. This may be set to zero for BI_RGB bitmaps + biSizeImage & 0xff, biSizeImage >> 8 & 0xff, biSizeImage >> 16 & 0xff, biSizeImage >> 24 & 0xff, + // LONG biXPelsPerMeter, unused + 0, 0, 0, 0, + // LONG biYPelsPerMeter, unused + 0, 0, 0, 0, + // DWORD biClrUsed, the number of color indexes of palette, unused + 0, 0, 0, 0, + // DWORD biClrImportant, unused + 0, 0, 0, 0 + ]; + + var iPadding = (4 - ((biWidth * 3) % 4)) % 4; + + var aImgData = oData.data; + + var strPixelData = ''; + var biWidth4 = biWidth << 2; + var y = biHeight; + var fromCharCode = String.fromCharCode; + + do { + var iOffsetY = biWidth4 * (y - 1); + var strPixelRow = ''; + for (var x = 0; x < biWidth; x++) { + var iOffsetX = x << 2; + strPixelRow += fromCharCode(aImgData[iOffsetY + iOffsetX + 2]) + + fromCharCode(aImgData[iOffsetY + iOffsetX + 1]) + + fromCharCode(aImgData[iOffsetY + iOffsetX]); + } + + for (var c = 0; c < iPadding; c++) { + strPixelRow += String.fromCharCode(0); + } + + strPixelData += strPixelRow; + } while (--y) + + var strEncoded = encodeData(BITMAPFILEHEADER.concat(BITMAPINFOHEADER)) + encodeData(strPixelData); + + return strEncoded + } + + /** + * 转换为图片base64 + * @param canvasId canvas标识 + * @param x 将要被提取的图像数据矩形区域的左上角 x 坐标 + * @param y 将要被提取的图像数据矩形区域的左上角 y 坐标 + * @param width 将要被提取的图像数据矩形区域的宽度 + * @param height 将要被提取的图像数据矩形区域的高度 + * @param type 转换图片类型 + * @param done 完成回调 + */ + function convertToImage(canvasId, x, y, width, height, type, done) { + if (done === void 0) done = function() {}; + + if (type === undefined) { + type = 'png'; + } + type = fixType(type); + if (/bmp/.test(type)) { + getImageData(canvasId, x, y, width, height, function(data, err) { + var strData = genBitmapImage(data); + tools_7(done) && done(makeURI(strData, 'image/' + type), err); + }); + } else { + console.error('暂不支持生成\'' + type + '\'类型的base64图片'); + } + } + + var CanvasToBase64 = { + convertToImage: convertToImage, + // convertToPNG: function (width, height, done) { + // return convertToImage(width, height, 'png', done) + // }, + // convertToJPEG: function (width, height, done) { + // return convertToImage(width, height, 'jpeg', done) + // }, + // convertToGIF: function (width, height, done) { + // return convertToImage(width, height, 'gif', done) + // }, + convertToBMP: function(ref, done) { + if (ref === void 0) ref = {}; + var canvasId = ref.canvasId; + var x = ref.x; + var y = ref.y; + var width = ref.width; + var height = ref.height; + if (done === void 0) done = function() {}; + + return convertToImage(canvasId, x, y, width, height, 'bmp', done) + } + }; + + function methods() { + var self = this; + + var boundWidth = self.width; // 裁剪框默认宽度,即整个画布宽度 + var boundHeight = self.height; // 裁剪框默认高度,即整个画布高度 + + var id = self.id; + var targetId = self.targetId; + var pixelRatio = self.pixelRatio; + + var ref = self.cut; + var x = ref.x; + if (x === void 0) x = 0; + var y = ref.y; + if (y === void 0) y = 0; + var width = ref.width; + if (width === void 0) width = boundWidth; + var height = ref.height; + if (height === void 0) height = boundHeight; + + self.updateCanvas = function(done) { + if (self.croperTarget) { + // 画布绘制图片 + self.ctx.drawImage( + self.croperTarget, + self.imgLeft, + self.imgTop, + self.scaleWidth, + self.scaleHeight + ); + } + tools_7(self.onBeforeDraw) && self.onBeforeDraw(self.ctx, self); + + self.setBoundStyle(self.boundStyle); // 设置边界样式 + + self.ctx.draw(false, done); + return self + }; + + self.pushOrigin = self.pushOrign = function(src) { + self.src = src; + + tools_7(self.onBeforeImageLoad) && self.onBeforeImageLoad(self.ctx, self); + + return getImageInfo({ + src: src + }) + .then(function(res) { + var innerAspectRadio = res.width / res.height; + var customAspectRadio = width / height; + + self.croperTarget = res.path; + + if (innerAspectRadio < customAspectRadio) { + self.rectX = x; + self.baseWidth = width; + self.baseHeight = width / innerAspectRadio; + self.rectY = y - Math.abs((height - self.baseHeight) / 2); + } else { + self.rectY = y; + self.baseWidth = height * innerAspectRadio; + self.baseHeight = height; + self.rectX = x - Math.abs((width - self.baseWidth) / 2); + } + + self.imgLeft = self.rectX; + self.imgTop = self.rectY; + self.scaleWidth = self.baseWidth; + self.scaleHeight = self.baseHeight; + + self.update(); + + return new Promise(function(resolve) { + self.updateCanvas(resolve); + }) + }) + .then(function() { + tools_7(self.onImageLoad) && self.onImageLoad(self.ctx, self); + }) + }; + + self.removeImage = function() { + self.src = ''; + self.croperTarget = ''; + return draw(self.ctx) + }; + + self.getCropperBase64 = function(done) { + if (done === void 0) done = function() {}; + + CanvasToBase64.convertToBMP({ + canvasId: id, + x: x, + y: y, + width: width, + height: height + }, done); + }; + + self.getCropperImage = function(opt, fn) { + var customOptions = opt; + + var canvasOptions = { + canvasId: id, + x: x, + y: y, + width: width, + height: height + }; + + var task = function() { + return Promise.resolve(); + }; + + if ( + tools_10(customOptions) && + customOptions.original + ) { + // original mode + task = function() { + self.targetCtx.drawImage( + self.croperTarget, + self.imgLeft * pixelRatio, + self.imgTop * pixelRatio, + self.scaleWidth * pixelRatio, + self.scaleHeight * pixelRatio + ); + + canvasOptions = { + canvasId: targetId, + x: x * pixelRatio, + y: y * pixelRatio, + width: width * pixelRatio, + height: height * pixelRatio + }; + + return draw(self.targetCtx) + }; + } + + return task() + .then(function() { + if (tools_10(customOptions)) { + canvasOptions = Object.assign({}, canvasOptions, customOptions); + } + + if (tools_7(customOptions)) { + fn = customOptions; + } + + var arg = canvasOptions.componentContext ? + [canvasOptions, canvasOptions.componentContext] : + [canvasOptions]; + + return canvasToTempFilePath.apply(null, arg) + }) + .then(function(res) { + var tempFilePath = res.tempFilePath; + + return tools_7(fn) ? + fn.call(self, tempFilePath, null) : + tempFilePath + }) + .catch(function(err) { + if (tools_7(fn)) { + fn.call(self, null, err); + } else { + throw err + } + }) + }; + } + + /** + * 获取最新缩放值 + * @param oldScale 上一次触摸结束后的缩放值 + * @param oldDistance 上一次触摸结束后的双指距离 + * @param zoom 缩放系数 + * @param touch0 第一指touch对象 + * @param touch1 第二指touch对象 + * @returns {*} + */ + var getNewScale = function(oldScale, oldDistance, zoom, touch0, touch1) { + var xMove, yMove, newDistance; + // 计算二指最新距离 + xMove = Math.round(touch1.x - touch0.x); + yMove = Math.round(touch1.y - touch0.y); + newDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove)); + + return oldScale + 0.001 * zoom * (newDistance - oldDistance) + }; + + function update() { + var self = this; + + if (!self.src) { + return + } + + self.__oneTouchStart = function(touch) { + self.touchX0 = Math.round(touch.x); + self.touchY0 = Math.round(touch.y); + }; + + self.__oneTouchMove = function(touch) { + var xMove, yMove; + // 计算单指移动的距离 + if (self.touchended) { + return self.updateCanvas() + } + xMove = Math.round(touch.x - self.touchX0); + yMove = Math.round(touch.y - self.touchY0); + + var imgLeft = Math.round(self.rectX + xMove); + var imgTop = Math.round(self.rectY + yMove); + + self.outsideBound(imgLeft, imgTop); + + self.updateCanvas(); + }; + + self.__twoTouchStart = function(touch0, touch1) { + var xMove, yMove, oldDistance; + + self.touchX1 = Math.round(self.rectX + self.scaleWidth / 2); + self.touchY1 = Math.round(self.rectY + self.scaleHeight / 2); + + // 计算两指距离 + xMove = Math.round(touch1.x - touch0.x); + yMove = Math.round(touch1.y - touch0.y); + oldDistance = Math.round(Math.sqrt(xMove * xMove + yMove * yMove)); + + self.oldDistance = oldDistance; + }; + + self.__twoTouchMove = function(touch0, touch1) { + var oldScale = self.oldScale; + var oldDistance = self.oldDistance; + var scale = self.scale; + var zoom = self.zoom; + + self.newScale = getNewScale(oldScale, oldDistance, zoom, touch0, touch1); + + // 设定缩放范围 + self.newScale <= 1 && (self.newScale = 1); + self.newScale >= scale && (self.newScale = scale); + + self.scaleWidth = Math.round(self.newScale * self.baseWidth); + self.scaleHeight = Math.round(self.newScale * self.baseHeight); + var imgLeft = Math.round(self.touchX1 - self.scaleWidth / 2); + var imgTop = Math.round(self.touchY1 - self.scaleHeight / 2); + + self.outsideBound(imgLeft, imgTop); + + self.updateCanvas(); + }; + + self.__xtouchEnd = function() { + self.oldScale = self.newScale; + self.rectX = self.imgLeft; + self.rectY = self.imgTop; + }; + } + + var handle = { + // 图片手势初始监测 + touchStart: function touchStart(e) { + var self = this; + var ref = e.touches; + var touch0 = ref[0]; + var touch1 = ref[1]; + + if (!self.src) { + return + } + + setTouchState(self, true, null, null); + + // 计算第一个触摸点的位置,并参照改点进行缩放 + self.__oneTouchStart(touch0); + + // 两指手势触发 + if (e.touches.length >= 2) { + self.__twoTouchStart(touch0, touch1); + } + }, + + // 图片手势动态缩放 + touchMove: function touchMove(e) { + var self = this; + var ref = e.touches; + var touch0 = ref[0]; + var touch1 = ref[1]; + + if (!self.src) { + return + } + + setTouchState(self, null, true); + + // 单指手势时触发 + if (e.touches.length === 1) { + self.__oneTouchMove(touch0); + } + // 两指手势触发 + if (e.touches.length >= 2) { + self.__twoTouchMove(touch0, touch1); + } + }, + + touchEnd: function touchEnd(e) { + var self = this; + + if (!self.src) { + return + } + + setTouchState(self, false, false, true); + self.__xtouchEnd(); + } + }; + + function cut() { + var self = this; + var boundWidth = self.width; // 裁剪框默认宽度,即整个画布宽度 + var boundHeight = self.height; + // 裁剪框默认高度,即整个画布高度 + var ref = self.cut; + var x = ref.x; + if (x === void 0) x = 0; + var y = ref.y; + if (y === void 0) y = 0; + var width = ref.width; + if (width === void 0) width = boundWidth; + var height = ref.height; + if (height === void 0) height = boundHeight; + + /** + * 设置边界 + * @param imgLeft 图片左上角横坐标值 + * @param imgTop 图片左上角纵坐标值 + */ + self.outsideBound = function(imgLeft, imgTop) { + self.imgLeft = imgLeft >= x ? + x : + self.scaleWidth + imgLeft - x <= width ? + x + width - self.scaleWidth : + imgLeft; + + self.imgTop = imgTop >= y ? + y : + self.scaleHeight + imgTop - y <= height ? + y + height - self.scaleHeight : + imgTop; + }; + + /** + * 设置边界样式 + * @param color 边界颜色 + */ + self.setBoundStyle = function(ref) { + if (ref === void 0) ref = {}; + var color = ref.color; + if (color === void 0) color = '#04b00f'; + var mask = ref.mask; + if (mask === void 0) mask = 'rgba(0, 0, 0, 0.3)'; + var lineWidth = ref.lineWidth; + if (lineWidth === void 0) lineWidth = 1; + + var half = lineWidth / 2; + var boundOption = [{ + start: { + x: x - half, + y: y + 10 - half + }, + step1: { + x: x - half, + y: y - half + }, + step2: { + x: x + 10 - half, + y: y - half + } + }, + { + start: { + x: x - half, + y: y + height - 10 + half + }, + step1: { + x: x - half, + y: y + height + half + }, + step2: { + x: x + 10 - half, + y: y + height + half + } + }, + { + start: { + x: x + width - 10 + half, + y: y - half + }, + step1: { + x: x + width + half, + y: y - half + }, + step2: { + x: x + width + half, + y: y + 10 - half + } + }, + { + start: { + x: x + width + half, + y: y + height - 10 + half + }, + step1: { + x: x + width + half, + y: y + height + half + }, + step2: { + x: x + width - 10 + half, + y: y + height + half + } + } + ]; + + // 绘制半透明层 + self.ctx.beginPath(); + self.ctx.setFillStyle(mask); + self.ctx.fillRect(0, 0, x, boundHeight); + self.ctx.fillRect(x, 0, width, y); + self.ctx.fillRect(x, y + height, width, boundHeight - y - height); + self.ctx.fillRect(x + width, 0, boundWidth - x - width, boundHeight); + self.ctx.fill(); + + boundOption.forEach(function(op) { + self.ctx.beginPath(); + self.ctx.setStrokeStyle(color); + self.ctx.setLineWidth(lineWidth); + self.ctx.moveTo(op.start.x, op.start.y); + self.ctx.lineTo(op.step1.x, op.step1.y); + self.ctx.lineTo(op.step2.x, op.step2.y); + self.ctx.stroke(); + }); + }; + } + + var version = "1.3.9"; + + var WeCropper = function WeCropper(params) { + var self = this; + var _default = {}; + + validator(self, DEFAULT); + + Object.keys(DEFAULT).forEach(function(key) { + _default[key] = DEFAULT[key].default; + }); + Object.assign(self, _default, params); + + self.prepare(); + self.attachPage(); + self.createCtx(); + self.observer(); + self.cutt(); + self.methods(); + self.init(); + self.update(); + + return self + }; + + WeCropper.prototype.init = function init() { + var self = this; + var src = self.src; + + self.version = version; + + typeof self.onReady === 'function' && self.onReady(self.ctx, self); + + if (src) { + self.pushOrign(src); + } else { + self.updateCanvas(); + } + setTouchState(self, false, false, false); + + self.oldScale = 1; + self.newScale = 1; + + return self + }; + + Object.assign(WeCropper.prototype, handle); + + WeCropper.prototype.prepare = prepare; + WeCropper.prototype.observer = observer; + WeCropper.prototype.methods = methods; + WeCropper.prototype.cutt = cut; + WeCropper.prototype.update = update; + + return WeCropper; + +}))); diff --git a/uview-ui/components/u-avatar/u-avatar.vue b/uview-ui/components/u-avatar/u-avatar.vue new file mode 100644 index 0000000..289b9b0 --- /dev/null +++ b/uview-ui/components/u-avatar/u-avatar.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/uview-ui/components/u-back-top/u-back-top.vue b/uview-ui/components/u-back-top/u-back-top.vue new file mode 100644 index 0000000..7970fc7 --- /dev/null +++ b/uview-ui/components/u-back-top/u-back-top.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/uview-ui/components/u-badge/u-badge.vue b/uview-ui/components/u-badge/u-badge.vue new file mode 100644 index 0000000..e85b133 --- /dev/null +++ b/uview-ui/components/u-badge/u-badge.vue @@ -0,0 +1,216 @@ + + + + + \ No newline at end of file diff --git a/uview-ui/components/u-button/u-button.vue b/uview-ui/components/u-button/u-button.vue new file mode 100644 index 0000000..82c3a6f --- /dev/null +++ b/uview-ui/components/u-button/u-button.vue @@ -0,0 +1,596 @@ + + + + + diff --git a/uview-ui/components/u-calendar/u-calendar.vue b/uview-ui/components/u-calendar/u-calendar.vue new file mode 100644 index 0000000..2b30184 --- /dev/null +++ b/uview-ui/components/u-calendar/u-calendar.vue @@ -0,0 +1,639 @@ + + + + \ No newline at end of file diff --git a/uview-ui/components/u-car-keyboard/u-car-keyboard.vue b/uview-ui/components/u-car-keyboard/u-car-keyboard.vue new file mode 100644 index 0000000..84b1467 --- /dev/null +++ b/uview-ui/components/u-car-keyboard/u-car-keyboard.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/uview-ui/components/u-card/u-card.vue b/uview-ui/components/u-card/u-card.vue new file mode 100644 index 0000000..a3cb2aa --- /dev/null +++ b/uview-ui/components/u-card/u-card.vue @@ -0,0 +1,299 @@ + + + + + diff --git a/uview-ui/components/u-cell-group/u-cell-group.vue b/uview-ui/components/u-cell-group/u-cell-group.vue new file mode 100644 index 0000000..3fbca72 --- /dev/null +++ b/uview-ui/components/u-cell-group/u-cell-group.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/uview-ui/components/u-cell-item/u-cell-item.vue b/uview-ui/components/u-cell-item/u-cell-item.vue new file mode 100644 index 0000000..055af3a --- /dev/null +++ b/uview-ui/components/u-cell-item/u-cell-item.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/uview-ui/components/u-checkbox-group/u-checkbox-group.vue b/uview-ui/components/u-checkbox-group/u-checkbox-group.vue new file mode 100644 index 0000000..6a149b3 --- /dev/null +++ b/uview-ui/components/u-checkbox-group/u-checkbox-group.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/uview-ui/components/u-checkbox/u-checkbox.vue b/uview-ui/components/u-checkbox/u-checkbox.vue new file mode 100644 index 0000000..9414461 --- /dev/null +++ b/uview-ui/components/u-checkbox/u-checkbox.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/uview-ui/components/u-circle-progress/u-circle-progress.vue b/uview-ui/components/u-circle-progress/u-circle-progress.vue new file mode 100644 index 0000000..46e7c18 --- /dev/null +++ b/uview-ui/components/u-circle-progress/u-circle-progress.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue b/uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue new file mode 100644 index 0000000..77e2da2 --- /dev/null +++ b/uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/uview-ui/components/u-col/u-col.vue b/uview-ui/components/u-col/u-col.vue new file mode 100644 index 0000000..3b6cc64 --- /dev/null +++ b/uview-ui/components/u-col/u-col.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/uview-ui/components/u-collapse-item/u-collapse-item.vue b/uview-ui/components/u-collapse-item/u-collapse-item.vue new file mode 100644 index 0000000..3b66bfa --- /dev/null +++ b/uview-ui/components/u-collapse-item/u-collapse-item.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/uview-ui/components/u-collapse/u-collapse.vue b/uview-ui/components/u-collapse/u-collapse.vue new file mode 100644 index 0000000..8572957 --- /dev/null +++ b/uview-ui/components/u-collapse/u-collapse.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/uview-ui/components/u-column-notice/u-column-notice.vue b/uview-ui/components/u-column-notice/u-column-notice.vue new file mode 100644 index 0000000..dd8bd31 --- /dev/null +++ b/uview-ui/components/u-column-notice/u-column-notice.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/uview-ui/components/u-count-down/u-count-down.vue b/uview-ui/components/u-count-down/u-count-down.vue new file mode 100644 index 0000000..7285d67 --- /dev/null +++ b/uview-ui/components/u-count-down/u-count-down.vue @@ -0,0 +1,318 @@ + + + + + diff --git a/uview-ui/components/u-count-to/u-count-to.vue b/uview-ui/components/u-count-to/u-count-to.vue new file mode 100644 index 0000000..053dc5f --- /dev/null +++ b/uview-ui/components/u-count-to/u-count-to.vue @@ -0,0 +1,241 @@ + + + + + diff --git a/uview-ui/components/u-divider/u-divider.vue b/uview-ui/components/u-divider/u-divider.vue new file mode 100644 index 0000000..6f8d7e6 --- /dev/null +++ b/uview-ui/components/u-divider/u-divider.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/uview-ui/components/u-dropdown-item/u-dropdown-item.vue b/uview-ui/components/u-dropdown-item/u-dropdown-item.vue new file mode 100644 index 0000000..ba60d8f --- /dev/null +++ b/uview-ui/components/u-dropdown-item/u-dropdown-item.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/uview-ui/components/u-dropdown/u-dropdown.vue b/uview-ui/components/u-dropdown/u-dropdown.vue new file mode 100644 index 0000000..a62e469 --- /dev/null +++ b/uview-ui/components/u-dropdown/u-dropdown.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/uview-ui/components/u-empty/u-empty.vue b/uview-ui/components/u-empty/u-empty.vue new file mode 100644 index 0000000..2c77b24 --- /dev/null +++ b/uview-ui/components/u-empty/u-empty.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/uview-ui/components/u-field/u-field.vue b/uview-ui/components/u-field/u-field.vue new file mode 100644 index 0000000..b562798 --- /dev/null +++ b/uview-ui/components/u-field/u-field.vue @@ -0,0 +1,384 @@ +