commit 04a10428e02aa5978c83ebde3230c8d077a08bae Author: [liang] <[595996918@qq.com]> Date: Tue Aug 9 17:24:16 2022 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c13f13b --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ + +node_modules/**/* + unpackage/ + unpackage/**/* + .idea + .idea/ + .expo/* + npm-debug.* + *.orig.* + web-build/ + apk/ diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..6a5b11e --- /dev/null +++ b/App.vue @@ -0,0 +1,69 @@ + + + diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue new file mode 100644 index 0000000..53ec5aa --- /dev/null +++ b/components/navigation/navigation.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue new file mode 100644 index 0000000..255034a --- /dev/null +++ b/components/tabBar/tabBar.vue @@ -0,0 +1,195 @@ + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..c3ff205 --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..212a358 --- /dev/null +++ b/main.js @@ -0,0 +1,55 @@ +import Vue from 'vue' +import App from './App' +import uView from 'uview-ui' +import VueI18n from 'vue-i18n' +import axios from './utils/axios.js' + +import store from './store' + +// 多国语言 +import EN from './utils/language/en.js' +import ZH from './utils/language/zh.js' + + +// 自定义底部导航栏 +// import tabBar from 'components/tabBar/tabBar.vue' +// Vue.component('tab-bar', tabBar) + +Vue.use(uView) +Vue.use(VueI18n); + +const i18n = new VueI18n({ + // locale: store.state.language, // 默认选择的语言 + locale: 'en', // 默认选择的语言 + messages: { + 'en': EN, + 'zh': ZH, + } +}) + +Vue.prototype.$store = store +Vue.prototype.$axios = axios +Vue.prototype.$_i18n = i18n + +// #ifndef VUE3 +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + i18n, + store, + ...App +}) + +app.$mount() +// #endif + + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..c26e100 --- /dev/null +++ b/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "massfitnes", + "appid" : "__UNI__2B017B1", + "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 + }, + "vueVersion" : "2" +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..2b8f0d7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,131 @@ +{ + "name": "massfitnes", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@intlify/core-base": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.2.2.tgz", + "integrity": "sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==", + "requires": { + "@intlify/devtools-if": "9.2.2", + "@intlify/message-compiler": "9.2.2", + "@intlify/shared": "9.2.2", + "@intlify/vue-devtools": "9.2.2" + } + }, + "@intlify/devtools-if": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/@intlify/devtools-if/-/devtools-if-9.2.2.tgz", + "integrity": "sha512-4ttr/FNO29w+kBbU7HZ/U0Lzuh2cRDhP8UlWOtV9ERcjHzuyXVZmjyleESK6eVP60tGC9QtQW9yZE+JeRhDHkg==", + "requires": { + "@intlify/shared": "9.2.2" + } + }, + "@intlify/message-compiler": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.2.2.tgz", + "integrity": "sha512-IUrQW7byAKN2fMBe8z6sK6riG1pue95e5jfokn8hA5Q3Bqy4MBJ5lJAofUsawQJYHeoPJ7svMDyBaVJ4d0GTtA==", + "requires": { + "@intlify/shared": "9.2.2", + "source-map": "0.6.1" + } + }, + "@intlify/shared": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.2.2.tgz", + "integrity": "sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==" + }, + "@intlify/vue-devtools": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/@intlify/vue-devtools/-/vue-devtools-9.2.2.tgz", + "integrity": "sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==", + "requires": { + "@intlify/core-base": "9.2.2", + "@intlify/shared": "9.2.2" + } + }, + "@vue/devtools-api": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.1.tgz", + "integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmmirror.com/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "follow-redirects": { + "version": "1.15.1", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "uview-ui": { + "version": "2.0.31", + "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.31.tgz", + "integrity": "sha512-I/0fGuvtiKHH/mBb864SGYk+SJ7WaF32tsBgYgeBOsxlUp+Th+Ac2tgz2cTvsQJl6eZYWsKZ3ixiSXCAcxZ8Sw==" + }, + "vue-i18n": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz", + "integrity": "sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==", + "requires": { + "@intlify/core-base": "9.2.2", + "@intlify/shared": "9.2.2", + "@intlify/vue-devtools": "9.2.2", + "@vue/devtools-api": "^6.2.1" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c07432f --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "massfitnes", + "version": "1.0.0", + "description": "", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "axios": "^0.27.2", + "uview-ui": "^2.0.31", + "vue-i18n": "^9.2.2" + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..9748621 --- /dev/null +++ b/pages.json @@ -0,0 +1,31 @@ +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + "pages": [ //pages数组中第一项表示应用启动页 + { + "path": "pages/login/index", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/index", + "style": { + "navigationStyle": "custom" + } + } + + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "style": { + "app-plus": { + "titleNView": false + } + } + }, + "uniIdRouter": {} +} diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..af0d143 --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/pages/login/index.vue b/pages/login/index.vue new file mode 100644 index 0000000..748050d --- /dev/null +++ b/pages/login/index.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/pages/register/index.vue b/pages/register/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/static/tabbar/dorder.png b/static/tabbar/dorder.png new file mode 100644 index 0000000..6dc617d Binary files /dev/null and b/static/tabbar/dorder.png differ diff --git a/static/tabbar/dorderS.png b/static/tabbar/dorderS.png new file mode 100644 index 0000000..7ab097c Binary files /dev/null and b/static/tabbar/dorderS.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_home_nor@3x.png b/static/tabbar/meun_icon_home_nor@3x.png new file mode 100644 index 0000000..ab36731 Binary files /dev/null and b/static/tabbar/meun_icon_home_nor@3x.png differ diff --git a/static/tabbar/meun_icon_home_sel@3x.png b/static/tabbar/meun_icon_home_sel@3x.png new file mode 100644 index 0000000..6a6c6a6 Binary files /dev/null and b/static/tabbar/meun_icon_home_sel@3x.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/static/tabbar/meun_icon_search_nor@3x.png b/static/tabbar/meun_icon_search_nor@3x.png new file mode 100644 index 0000000..0c340ce Binary files /dev/null and b/static/tabbar/meun_icon_search_nor@3x.png differ diff --git a/static/tabbar/meun_icon_search_sel@3x.png b/static/tabbar/meun_icon_search_sel@3x.png new file mode 100644 index 0000000..274ebc0 Binary files /dev/null and b/static/tabbar/meun_icon_search_sel@3x.png differ diff --git a/static/tongyonh/America_icon.png b/static/tongyonh/America_icon.png new file mode 100644 index 0000000..f44bf96 Binary files /dev/null and b/static/tongyonh/America_icon.png differ diff --git a/static/tongyonh/Belarus_icon.png b/static/tongyonh/Belarus_icon.png new file mode 100644 index 0000000..b4d45de Binary files /dev/null and b/static/tongyonh/Belarus_icon.png differ diff --git a/static/tongyonh/Bodyback.png b/static/tongyonh/Bodyback.png new file mode 100644 index 0000000..699abdb Binary files /dev/null and b/static/tongyonh/Bodyback.png differ diff --git a/static/tongyonh/China_icon.png b/static/tongyonh/China_icon.png new file mode 100644 index 0000000..76f4b12 Binary files /dev/null and b/static/tongyonh/China_icon.png differ diff --git a/static/tongyonh/Discover_icon.png b/static/tongyonh/Discover_icon.png new file mode 100644 index 0000000..de6e72b Binary files /dev/null and b/static/tongyonh/Discover_icon.png differ diff --git a/static/tongyonh/Discover_icona.png b/static/tongyonh/Discover_icona.png new file mode 100644 index 0000000..a9b255a Binary files /dev/null and b/static/tongyonh/Discover_icona.png differ diff --git a/static/tongyonh/ETH_icon.png b/static/tongyonh/ETH_icon.png new file mode 100644 index 0000000..1ed08f2 Binary files /dev/null and b/static/tongyonh/ETH_icon.png differ diff --git a/static/tongyonh/Ellipse45.png b/static/tongyonh/Ellipse45.png new file mode 100644 index 0000000..809b231 Binary files /dev/null and b/static/tongyonh/Ellipse45.png differ diff --git a/static/tongyonh/Ellipse46.png b/static/tongyonh/Ellipse46.png new file mode 100644 index 0000000..a349f70 Binary files /dev/null and b/static/tongyonh/Ellipse46.png differ diff --git a/static/tongyonh/Ellipse47.png b/static/tongyonh/Ellipse47.png new file mode 100644 index 0000000..b635b9d Binary files /dev/null and b/static/tongyonh/Ellipse47.png differ diff --git a/static/tongyonh/Frame.png b/static/tongyonh/Frame.png new file mode 100644 index 0000000..11bf2ce Binary files /dev/null and b/static/tongyonh/Frame.png differ diff --git a/static/tongyonh/Frame28.png b/static/tongyonh/Frame28.png new file mode 100644 index 0000000..1d01c6f Binary files /dev/null and b/static/tongyonh/Frame28.png differ diff --git a/static/tongyonh/Frame300.png b/static/tongyonh/Frame300.png new file mode 100644 index 0000000..03223de Binary files /dev/null and b/static/tongyonh/Frame300.png differ diff --git a/static/tongyonh/Frame3299.png b/static/tongyonh/Frame3299.png new file mode 100644 index 0000000..9f6283b Binary files /dev/null and b/static/tongyonh/Frame3299.png differ diff --git a/static/tongyonh/Frame330.png b/static/tongyonh/Frame330.png new file mode 100644 index 0000000..790c780 Binary files /dev/null and b/static/tongyonh/Frame330.png differ diff --git a/static/tongyonh/Frame58.png b/static/tongyonh/Frame58.png new file mode 100644 index 0000000..a88d907 Binary files /dev/null and b/static/tongyonh/Frame58.png differ diff --git a/static/tongyonh/Frame60.png b/static/tongyonh/Frame60.png new file mode 100644 index 0000000..06354fe Binary files /dev/null and b/static/tongyonh/Frame60.png differ diff --git a/static/tongyonh/Frame669.png b/static/tongyonh/Frame669.png new file mode 100644 index 0000000..801068f Binary files /dev/null and b/static/tongyonh/Frame669.png differ diff --git a/static/tongyonh/Frame68p.png b/static/tongyonh/Frame68p.png new file mode 100644 index 0000000..18921d9 Binary files /dev/null and b/static/tongyonh/Frame68p.png differ diff --git a/static/tongyonh/Frame69.png b/static/tongyonh/Frame69.png new file mode 100644 index 0000000..a074802 Binary files /dev/null and b/static/tongyonh/Frame69.png differ diff --git a/static/tongyonh/Frame70.png b/static/tongyonh/Frame70.png new file mode 100644 index 0000000..45a3664 Binary files /dev/null and b/static/tongyonh/Frame70.png differ diff --git a/static/tongyonh/Frame71.png b/static/tongyonh/Frame71.png new file mode 100644 index 0000000..30785f3 Binary files /dev/null and b/static/tongyonh/Frame71.png differ diff --git a/static/tongyonh/Frame72.png b/static/tongyonh/Frame72.png new file mode 100644 index 0000000..d3d64fa Binary files /dev/null and b/static/tongyonh/Frame72.png differ diff --git a/static/tongyonh/Group285.png b/static/tongyonh/Group285.png new file mode 100644 index 0000000..13d4d24 Binary files /dev/null and b/static/tongyonh/Group285.png differ diff --git a/static/tongyonh/Group304.png b/static/tongyonh/Group304.png new file mode 100644 index 0000000..68676d9 Binary files /dev/null and b/static/tongyonh/Group304.png differ diff --git a/static/tongyonh/Group8-1.png b/static/tongyonh/Group8-1.png new file mode 100644 index 0000000..a813849 Binary files /dev/null and b/static/tongyonh/Group8-1.png differ diff --git a/static/tongyonh/Group8.png b/static/tongyonh/Group8.png new file mode 100644 index 0000000..8f3ea0d Binary files /dev/null and b/static/tongyonh/Group8.png differ diff --git a/static/tongyonh/Group80.png b/static/tongyonh/Group80.png new file mode 100644 index 0000000..215a919 Binary files /dev/null and b/static/tongyonh/Group80.png differ diff --git a/static/tongyonh/Hongkong_icon.png b/static/tongyonh/Hongkong_icon.png new file mode 100644 index 0000000..65aebed Binary files /dev/null and b/static/tongyonh/Hongkong_icon.png differ diff --git a/static/tongyonh/Icon.png b/static/tongyonh/Icon.png new file mode 100644 index 0000000..1f160a1 Binary files /dev/null and b/static/tongyonh/Icon.png differ diff --git a/static/tongyonh/IconGroup.png b/static/tongyonh/IconGroup.png new file mode 100644 index 0000000..f978be8 Binary files /dev/null and b/static/tongyonh/IconGroup.png differ diff --git a/static/tongyonh/Illustration.png b/static/tongyonh/Illustration.png new file mode 100644 index 0000000..360b901 Binary files /dev/null and b/static/tongyonh/Illustration.png differ diff --git a/static/tongyonh/Load_v3.png b/static/tongyonh/Load_v3.png new file mode 100644 index 0000000..96f669e Binary files /dev/null and b/static/tongyonh/Load_v3.png differ diff --git a/static/tongyonh/MaskGroup.png b/static/tongyonh/MaskGroup.png new file mode 100644 index 0000000..26e0034 Binary files /dev/null and b/static/tongyonh/MaskGroup.png differ diff --git a/static/tongyonh/Nftimg.png b/static/tongyonh/Nftimg.png new file mode 100644 index 0000000..8e89cd6 Binary files /dev/null and b/static/tongyonh/Nftimg.png differ diff --git a/static/tongyonh/Polygon2.png b/static/tongyonh/Polygon2.png new file mode 100644 index 0000000..2c49f59 Binary files /dev/null and b/static/tongyonh/Polygon2.png differ diff --git a/static/tongyonh/Polygon3.png b/static/tongyonh/Polygon3.png new file mode 100644 index 0000000..1652169 Binary files /dev/null and b/static/tongyonh/Polygon3.png differ diff --git a/static/tongyonh/Profile_icon.png b/static/tongyonh/Profile_icon.png new file mode 100644 index 0000000..82448a7 Binary files /dev/null and b/static/tongyonh/Profile_icon.png differ diff --git a/static/tongyonh/Profile_icona.png b/static/tongyonh/Profile_icona.png new file mode 100644 index 0000000..87d538c Binary files /dev/null and b/static/tongyonh/Profile_icona.png differ diff --git a/static/tongyonh/Rectangle550.png b/static/tongyonh/Rectangle550.png new file mode 100644 index 0000000..4657951 Binary files /dev/null and b/static/tongyonh/Rectangle550.png differ diff --git a/static/tongyonh/Shape.png b/static/tongyonh/Shape.png new file mode 100644 index 0000000..8eaab80 Binary files /dev/null and b/static/tongyonh/Shape.png differ diff --git a/static/tongyonh/Shield-protected.png b/static/tongyonh/Shield-protected.png new file mode 100644 index 0000000..7c6be20 Binary files /dev/null and b/static/tongyonh/Shield-protected.png differ diff --git a/static/tongyonh/Subtract.png b/static/tongyonh/Subtract.png new file mode 100644 index 0000000..ab17867 Binary files /dev/null and b/static/tongyonh/Subtract.png differ diff --git a/static/tongyonh/Union.png b/static/tongyonh/Union.png new file mode 100644 index 0000000..a35e0f2 Binary files /dev/null and b/static/tongyonh/Union.png differ diff --git a/static/tongyonh/Uniona.png b/static/tongyonh/Uniona.png new file mode 100644 index 0000000..77ca658 Binary files /dev/null and b/static/tongyonh/Uniona.png differ diff --git a/static/tongyonh/Vector.png b/static/tongyonh/Vector.png new file mode 100644 index 0000000..444fc61 Binary files /dev/null and b/static/tongyonh/Vector.png differ diff --git a/static/tongyonh/account_circle_24px.png b/static/tongyonh/account_circle_24px.png new file mode 100644 index 0000000..b9d8bc0 Binary files /dev/null and b/static/tongyonh/account_circle_24px.png differ diff --git a/static/tongyonh/alert-circle.png b/static/tongyonh/alert-circle.png new file mode 100644 index 0000000..7292105 Binary files /dev/null and b/static/tongyonh/alert-circle.png differ diff --git a/static/tongyonh/arrow-down-left.png b/static/tongyonh/arrow-down-left.png new file mode 100644 index 0000000..f8f3ddd Binary files /dev/null and b/static/tongyonh/arrow-down-left.png differ diff --git a/static/tongyonh/arrow-down-left1.png b/static/tongyonh/arrow-down-left1.png new file mode 100644 index 0000000..b07fbc2 Binary files /dev/null and b/static/tongyonh/arrow-down-left1.png differ diff --git a/static/tongyonh/arrow-up-left.png b/static/tongyonh/arrow-up-left.png new file mode 100644 index 0000000..52c09c3 Binary files /dev/null and b/static/tongyonh/arrow-up-left.png differ diff --git a/static/tongyonh/arrow-up-left_1.png b/static/tongyonh/arrow-up-left_1.png new file mode 100644 index 0000000..dc6faca Binary files /dev/null and b/static/tongyonh/arrow-up-left_1.png differ diff --git a/static/tongyonh/arrow-up-leftp.png b/static/tongyonh/arrow-up-leftp.png new file mode 100644 index 0000000..88c899b Binary files /dev/null and b/static/tongyonh/arrow-up-leftp.png differ diff --git a/static/tongyonh/arrow-up-leftw.png b/static/tongyonh/arrow-up-leftw.png new file mode 100644 index 0000000..f463c51 Binary files /dev/null and b/static/tongyonh/arrow-up-leftw.png differ diff --git a/static/tongyonh/b_logo.png b/static/tongyonh/b_logo.png new file mode 100644 index 0000000..a5ac136 Binary files /dev/null and b/static/tongyonh/b_logo.png differ diff --git a/static/tongyonh/backj.png b/static/tongyonh/backj.png new file mode 100644 index 0000000..f0eb637 Binary files /dev/null and b/static/tongyonh/backj.png differ diff --git a/static/tongyonh/bit.png b/static/tongyonh/bit.png new file mode 100644 index 0000000..3a43d57 Binary files /dev/null and b/static/tongyonh/bit.png differ diff --git a/static/tongyonh/btc_icon.png b/static/tongyonh/btc_icon.png new file mode 100644 index 0000000..8079819 Binary files /dev/null and b/static/tongyonh/btc_icon.png differ diff --git a/static/tongyonh/bye.png b/static/tongyonh/bye.png new file mode 100644 index 0000000..07eed8e Binary files /dev/null and b/static/tongyonh/bye.png differ diff --git a/static/tongyonh/check-circle.png b/static/tongyonh/check-circle.png new file mode 100644 index 0000000..51d3b8c Binary files /dev/null and b/static/tongyonh/check-circle.png differ diff --git a/static/tongyonh/chevron_right_24px.png b/static/tongyonh/chevron_right_24px.png new file mode 100644 index 0000000..f1d51a0 Binary files /dev/null and b/static/tongyonh/chevron_right_24px.png differ diff --git a/static/tongyonh/circle.png b/static/tongyonh/circle.png new file mode 100644 index 0000000..b24b1ae Binary files /dev/null and b/static/tongyonh/circle.png differ diff --git a/static/tongyonh/codeci.png b/static/tongyonh/codeci.png new file mode 100644 index 0000000..790c780 Binary files /dev/null and b/static/tongyonh/codeci.png differ diff --git a/static/tongyonh/coin.png b/static/tongyonh/coin.png new file mode 100644 index 0000000..3869577 Binary files /dev/null and b/static/tongyonh/coin.png differ diff --git a/static/tongyonh/copy_24px.png b/static/tongyonh/copy_24px.png new file mode 100644 index 0000000..8b5b68d Binary files /dev/null and b/static/tongyonh/copy_24px.png differ diff --git a/static/tongyonh/copy_24px_2.png b/static/tongyonh/copy_24px_2.png new file mode 100644 index 0000000..fffdf0a Binary files /dev/null and b/static/tongyonh/copy_24px_2.png differ diff --git a/static/tongyonh/copy_24px_outlined.svg b/static/tongyonh/copy_24px_outlined.svg new file mode 100644 index 0000000..785b4cd --- /dev/null +++ b/static/tongyonh/copy_24px_outlined.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/tongyonh/create_24px.png b/static/tongyonh/create_24px.png new file mode 100644 index 0000000..fa2ff5c Binary files /dev/null and b/static/tongyonh/create_24px.png differ diff --git a/static/tongyonh/create_wallet.png b/static/tongyonh/create_wallet.png new file mode 100644 index 0000000..0fe43c3 Binary files /dev/null and b/static/tongyonh/create_wallet.png differ diff --git a/static/tongyonh/cry.png b/static/tongyonh/cry.png new file mode 100644 index 0000000..459a8e5 Binary files /dev/null and b/static/tongyonh/cry.png differ diff --git a/static/tongyonh/ellipsis.png b/static/tongyonh/ellipsis.png new file mode 100644 index 0000000..e170c27 Binary files /dev/null and b/static/tongyonh/ellipsis.png differ diff --git a/static/tongyonh/erwei.png b/static/tongyonh/erwei.png new file mode 100644 index 0000000..03223de Binary files /dev/null and b/static/tongyonh/erwei.png differ diff --git a/static/tongyonh/ethereum.png b/static/tongyonh/ethereum.png new file mode 100644 index 0000000..585484c Binary files /dev/null and b/static/tongyonh/ethereum.png differ diff --git a/static/tongyonh/eyeno.png b/static/tongyonh/eyeno.png new file mode 100644 index 0000000..ab65639 Binary files /dev/null and b/static/tongyonh/eyeno.png differ diff --git a/static/tongyonh/filter-left.png b/static/tongyonh/filter-left.png new file mode 100644 index 0000000..e87ae04 Binary files /dev/null and b/static/tongyonh/filter-left.png differ diff --git a/static/tongyonh/image46.png b/static/tongyonh/image46.png new file mode 100644 index 0000000..ecee0f2 Binary files /dev/null and b/static/tongyonh/image46.png differ diff --git a/static/tongyonh/img500.png b/static/tongyonh/img500.png new file mode 100644 index 0000000..dfd6b55 Binary files /dev/null and b/static/tongyonh/img500.png differ diff --git a/static/tongyonh/insert_drive_file_24px.png b/static/tongyonh/insert_drive_file_24px.png new file mode 100644 index 0000000..49138fb Binary files /dev/null and b/static/tongyonh/insert_drive_file_24px.png differ diff --git a/static/tongyonh/insert_drive_file_24px_outlined.png b/static/tongyonh/insert_drive_file_24px_outlined.png new file mode 100644 index 0000000..e31aa2f Binary files /dev/null and b/static/tongyonh/insert_drive_file_24px_outlined.png differ diff --git a/static/tongyonh/laug.png b/static/tongyonh/laug.png new file mode 100644 index 0000000..fd79bce Binary files /dev/null and b/static/tongyonh/laug.png differ diff --git a/static/tongyonh/login_wallet.png b/static/tongyonh/login_wallet.png new file mode 100644 index 0000000..f18438e Binary files /dev/null and b/static/tongyonh/login_wallet.png differ diff --git a/static/tongyonh/lu.png b/static/tongyonh/lu.png new file mode 100644 index 0000000..2a1f1ea Binary files /dev/null and b/static/tongyonh/lu.png differ diff --git a/static/tongyonh/market_icon.png b/static/tongyonh/market_icon.png new file mode 100644 index 0000000..bf3c225 Binary files /dev/null and b/static/tongyonh/market_icon.png differ diff --git a/static/tongyonh/market_icona.png b/static/tongyonh/market_icona.png new file mode 100644 index 0000000..80f747a Binary files /dev/null and b/static/tongyonh/market_icona.png differ diff --git a/static/tongyonh/more_vert_24px@2x.png b/static/tongyonh/more_vert_24px@2x.png new file mode 100644 index 0000000..6155e77 Binary files /dev/null and b/static/tongyonh/more_vert_24px@2x.png differ diff --git a/static/tongyonh/more_vert_24px_outlined.svg b/static/tongyonh/more_vert_24px_outlined.svg new file mode 100644 index 0000000..f3d6108 --- /dev/null +++ b/static/tongyonh/more_vert_24px_outlined.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/tongyonh/nft_icon.png b/static/tongyonh/nft_icon.png new file mode 100644 index 0000000..4f51bf0 Binary files /dev/null and b/static/tongyonh/nft_icon.png differ diff --git a/static/tongyonh/nft_icon2.png b/static/tongyonh/nft_icon2.png new file mode 100644 index 0000000..cba8c23 Binary files /dev/null and b/static/tongyonh/nft_icon2.png differ diff --git a/static/tongyonh/notifications_image.png b/static/tongyonh/notifications_image.png new file mode 100644 index 0000000..7982f6f Binary files /dev/null and b/static/tongyonh/notifications_image.png differ diff --git a/static/tongyonh/phone_image.png b/static/tongyonh/phone_image.png new file mode 100644 index 0000000..9adc80c Binary files /dev/null and b/static/tongyonh/phone_image.png differ diff --git a/static/tongyonh/plus.png b/static/tongyonh/plus.png new file mode 100644 index 0000000..1147978 Binary files /dev/null and b/static/tongyonh/plus.png differ diff --git a/static/tongyonh/profile1.png b/static/tongyonh/profile1.png new file mode 100644 index 0000000..a553422 Binary files /dev/null and b/static/tongyonh/profile1.png differ diff --git a/static/tongyonh/san.png b/static/tongyonh/san.png new file mode 100644 index 0000000..e43e47e Binary files /dev/null and b/static/tongyonh/san.png differ diff --git a/static/tongyonh/search.png b/static/tongyonh/search.png new file mode 100644 index 0000000..eb3a0db Binary files /dev/null and b/static/tongyonh/search.png differ diff --git a/static/tongyonh/tether_usd.png b/static/tongyonh/tether_usd.png new file mode 100644 index 0000000..dfd6b55 Binary files /dev/null and b/static/tongyonh/tether_usd.png differ diff --git a/static/tongyonh/textt.png b/static/tongyonh/textt.png new file mode 100644 index 0000000..54a67c0 Binary files /dev/null and b/static/tongyonh/textt.png differ diff --git a/static/tongyonh/trash.png b/static/tongyonh/trash.png new file mode 100644 index 0000000..b7b0b1d Binary files /dev/null and b/static/tongyonh/trash.png differ diff --git a/static/tongyonh/tron.png b/static/tongyonh/tron.png new file mode 100644 index 0000000..db07df6 Binary files /dev/null and b/static/tongyonh/tron.png differ diff --git a/static/tongyonh/tron1.png b/static/tongyonh/tron1.png new file mode 100644 index 0000000..d4590fa Binary files /dev/null and b/static/tongyonh/tron1.png differ diff --git a/static/tongyonh/tron_icon.png b/static/tongyonh/tron_icon.png new file mode 100644 index 0000000..9bb9e9b Binary files /dev/null and b/static/tongyonh/tron_icon.png differ diff --git a/static/tongyonh/tronicon.png b/static/tongyonh/tronicon.png new file mode 100644 index 0000000..aa15810 Binary files /dev/null and b/static/tongyonh/tronicon.png differ diff --git a/static/tongyonh/usdt_icon.png b/static/tongyonh/usdt_icon.png new file mode 100644 index 0000000..7653edd Binary files /dev/null and b/static/tongyonh/usdt_icon.png differ diff --git a/static/tongyonh/usdticon.png b/static/tongyonh/usdticon.png new file mode 100644 index 0000000..5a9cd00 Binary files /dev/null and b/static/tongyonh/usdticon.png differ diff --git a/static/tongyonh/visibility_24px.png b/static/tongyonh/visibility_24px.png new file mode 100644 index 0000000..920dc53 Binary files /dev/null and b/static/tongyonh/visibility_24px.png differ diff --git a/static/tongyonh/x-circle.png b/static/tongyonh/x-circle.png new file mode 100644 index 0000000..9f7ad5d Binary files /dev/null and b/static/tongyonh/x-circle.png differ diff --git a/static/tongyonh/x.png b/static/tongyonh/x.png new file mode 100644 index 0000000..c2591ff Binary files /dev/null and b/static/tongyonh/x.png differ diff --git a/static/tongyonh/xg.png b/static/tongyonh/xg.png new file mode 100644 index 0000000..d93b9e1 Binary files /dev/null and b/static/tongyonh/xg.png differ diff --git a/static/tongyonh/xmark.png b/static/tongyonh/xmark.png new file mode 100644 index 0000000..8f8257f Binary files /dev/null and b/static/tongyonh/xmark.png differ diff --git a/static/tongyonh/zhiwen.png b/static/tongyonh/zhiwen.png new file mode 100644 index 0000000..774ec03 Binary files /dev/null and b/static/tongyonh/zhiwen.png differ diff --git a/static/tongyonh/zww.png b/static/tongyonh/zww.png new file mode 100644 index 0000000..ded3a45 Binary files /dev/null and b/static/tongyonh/zww.png differ diff --git a/store/index.js b/store/index.js new file mode 100644 index 0000000..0d401d2 --- /dev/null +++ b/store/index.js @@ -0,0 +1,130 @@ +import Vue from 'vue' +import Vuex from 'vuex' +Vue.use(Vuex) + +const store = new Vuex.Store({ + state: { + // + btci:1, + ethi:1, + troni:1, + // 临时存放的 + noBackupWalletInfo: uni.getStorageSync("noBackupWalletInfo") || { + walletPassword: '', + wallet:{}, + }, + // 正式的值 + walletInfo: uni.getStorageSync("walletInfo") || { + walletPassword: '', + walletList:[] + }, + + // 查询是否激活 + isActivation: uni.getStorageSync("isActivation") || false, + + // 下载地址 + installAddress: uni.getStorageSync('installAddress') || 'baidu.com', + + // 更新提示内容 + updateTipContent: uni.getStorageSync('updateTipContent') || '版本更新', + + // 中英化 + language: uni.getStorageSync("language") || 'en', + + // 是否需要更新 + isUpdate: false + // 所有的余额 + // balance: uni.getStorageSync("balance") || { + // bmsBalance: 0, + // bmdtBalance: 0, + // ercBalance: 0, + // ethBalance: 0, + // ethUsdt: 0, //汇率 + // trcBalance: 0, + // trxBalance: 0, + // trxUsdt: 0, //汇率 + // }, + // // BMS交易记录 + // bmsTransactionList: [ + // ], + // // BMDT交易记录 + // bmdtTransactionList: [ + // ], + // // 公募记录 + // publicOfferingRecords: [], + }, + mutations: { + addBtci(state,num){ + var a=uni.getStorageSync('btci') + console.log(a,2224) + if(a==''){ + uni.setStorageSync('btci',state.btci) + console.log(state.btci,2224) + }else{ + state.btci=uni.getStorageSync('btci') + state.btci =state.btci+num + uni.setStorageSync('btci',state.btci) + console.log(state.btci,4444) + } + + }, + addEthi(state,num){ + var a=uni.getStorageSync('ethi') + if(a==''){ + uni.setStorageSync('ethi',state.ethi) + console.log(state.ethi,2224) + }else{ + state.ethi=uni.getStorageSync('ethi') + state.ethi =state.ethi+num + uni.setStorageSync('ethi',state.ethi) + console.log(state.ethi,4444) + } + + }, + + addTroni(state,num){ + var a=uni.getStorageSync('troni') + if(a==''){ + uni.setStorageSync('troni',state.troni) + }else{ + state.troni=uni.getStorageSync('troni') + state.troni =state.troni+num + uni.setStorageSync('troni',state.troni) + } + + }, + + // 设置选中的钱包 + setSelectWallet: (state, selected) => { + const obj = state + obj.selected = selected + }, + // 设置是否已激活 + setIsActivation: (state, isActivation) => { + const obj = state + obj.isActivation = isActivation + }, + // 设置下载地址 + setInstallAddress: (state, installAddress) => { + const obj = state + obj.installAddress = installAddress + }, + // 设置版本更新内容 + setUpdateTipContent: (state, updateTipContent) => { + const obj = state + obj.updateTipContent = updateTipContent + }, + // 设置中英文 + setLanguage: (state, language) => { + const obj = state + obj.language = language + }, + // 设置是否需要更新 + setIsUpdate: (state, isUpdate) => { + const obj = state + obj.isUpdate = isUpdate + } + }, +}) + +export default store \ No newline at end of file diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..f71da06 --- /dev/null +++ b/uni.scss @@ -0,0 +1,83 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +// 引入uview样式 +@import './uview-ui/theme.scss'; + +/* 颜色变量 */ + +$u-type-warning: #F2FE8D; +$u-type-success: #00E8A2; +$u-type-error: #F4506A; +$u-type-info: #A1A0A8; +/* 行为相关颜色 */ +$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:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git a/utils/api.js b/utils/api.js new file mode 100644 index 0000000..8416f71 --- /dev/null +++ b/utils/api.js @@ -0,0 +1,28 @@ +import Vue from 'vue'; +import qs from 'qs' +const api = { + //获取NFT项目列表 + getNftProjectList: (params) => Vue.prototype.$axios.get('/api/nft/getNftProjectList?' + qs.stringify(params)), + //添加NFT收藏品 + addNftCollection: (params) => Vue.prototype.$axios.post('/api/nft/addNftCollection', qs.stringify(params)), + getNftCollectionList: (params) => Vue.prototype.$axios.get('/api/nft/getNftCollectionList?' + qs.stringify( + params)), + getContractInfoList: (params) => Vue.prototype.$axios.get('/api/contract/getContractInfoList?' + qs.stringify(params)), + //获取汇率 + getCoinRate: (params) => Vue.prototype.$axios.get('/api/coinRate/getCoinRate?' + qs.stringify(params)), + getChainDataList: (params) => Vue.prototype.$axios.get('/api/chainData/getChainDataList?' + qs.stringify(params)), + getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'), + getBalance: (params) => Vue.prototype.$axios.get('/api/balance/getBalance?' + qs.stringify(params)), + versionUpgrade: (params) => Vue.prototype.$axios.get('/api/home/versionUpgrade?' + qs.stringify(params)), + checkIp: () => Vue.prototype.$axios.get('/x/resource/ip'), + getConfig: (params) => Vue.prototype.$axios.get('/api/home/getConfig?'+ qs.stringify(params)), + //--------------------------------- free --------------------------------- + getSearchContract: (params) => Vue.prototype.$axios.get('/api/contract/getSearchContract?' + qs.stringify(params)), + + getAuAdList: (params) => Vue.prototype.$axios.get('/api/home/getAuAdList?'+ qs.stringify(params)), + // 令牌token接口 + addTokenInfo: (params) => Vue.prototype.$axios.post('/api/token/addTokenInfo', qs.stringify(params)), +} + + +export default api diff --git a/utils/axios.js b/utils/axios.js new file mode 100644 index 0000000..ef36ecd --- /dev/null +++ b/utils/axios.js @@ -0,0 +1,127 @@ +import Vue from 'vue' +import axios from 'axios' + +let baseURL = ''; +const service = axios.create({ + withCredentials: false, //表示跨域请求时是否需要使用凭证 + crossDomain: true, + // baseURL, + timeout: 160000 +}) + +// request请求拦截器,在请求之前做一些处理 +service.interceptors.request.use( + config => { + + console.log(config,777777777777) + let isWallet= uni.getStorageSync('isWallet'); + if(!isWallet){ + uni.showLoading({ + title: 'loading', + mask: true + }) + } + + console.log('============================') + // if (config.urlType=='eth') { + // config.url = config.url + + // } else { + + // config.url = baseURL.serverUrl + config.url + // } + + if (config.url.indexOf('/x/resource/ip')>-1 ){ + + config.baseURL = baseURL.checkIp + }else{ + config.baseURL = baseURL.serverUrl + + } + config.sslVerify=false + + config.url = config.url + + // if (token) { + // // config.headers['Authori-zation'] = token + // config.headers['Authorization'] = token + // } + // console.log(config) + // if (store.state.token) { + // // 给请求头添加user-token + // config.headers["user-token"] = store.state.token; + // } + + return config; + }, + error => { + console.log(error); // for debug + return Promise.reject(error); + } +); + +// 配置成功后的响应拦截器 +service.interceptors.response.use(res => { + uni.hideLoading() + console.log(res) + if (res.status == 200) { + return res.data + } else { + return Promise.reject(res.msg); + } +}, error => { + // if (error.response.status) { + // switch (error.response.status) { + // case 401: + // break; + // default: + // break; + // } + // } + return Promise.reject(error) +}) + +// 在main.js中放入这段自定义适配器的代码,就可以实现uniapp的app和小程序开发中能使用axios进行跨域网络请求,并支持携带cookie + +axios.defaults.adapter = function(config) { //自己定义个适配器,用来适配uniapp的语法 + return new Promise((resolve, reject) => { + + console.log(config, '我请求的',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.hideLoading() + uni.showToast({ + title: res, + icon: 'none', + duration: 1500 + }) + } + }) + }) +} + +export default service diff --git a/utils/language/en.js b/utils/language/en.js new file mode 100644 index 0000000..947f3b6 --- /dev/null +++ b/utils/language/en.js @@ -0,0 +1,16 @@ +// en.js +export default { + login: { + welcomeText:'Hi, Welcome Back!', + signInText:'Sign in to your account.', + emailInputText:'Enter email address', + passwordInputText:'Password', + forgotText:'Forgot Password?', + loginText:'Login', + notAccountText:'Don’t have account?', + signUpText:'Sign Up', + agreeToBackup: 'Please check the prompt to agree to backup', + checkTheTermsOfService: 'Please review and agree to the terms of service', + + } +} diff --git a/utils/language/zh.js b/utils/language/zh.js new file mode 100644 index 0000000..180453d --- /dev/null +++ b/utils/language/zh.js @@ -0,0 +1,16 @@ +// zh.js +export default { + login: { + welcomeText:'Hi, Welcome Back!', + signInText:'Sign in to your account.', + emailInputText:'Enter email address', + passwordInputText:'Password', + forgotText:'Forgot Password?', + loginText:'Login', + notAccountText:'Don’t have account?', + signUpText:'Sign Up', + agreeToBackup: '请勾选同意备份的提示', + checkTheTermsOfService: '请查看并同意服务条款', + + } +} \ No newline at end of file