From eccd6240794694148a17e31c215aff3006d99291 Mon Sep 17 00:00:00 2001 From: zhaoguoqiang <849348323@qq.com> Date: Mon, 16 Aug 2021 10:43:06 +0800 Subject: [PATCH 1/4] 1 --- src/views/login.vue | 28 ++++++++++++++-------------- src/views/teamList/index.vue | 11 +++++++---- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index 5562e44..7b02c46 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -6,22 +6,22 @@ let url = this.$route.query; let token; let url_string = JSON.stringify(url); - if (url_string == "{}") { - this.$toast('请先登录') - } else { - token = url.token_type + " " + url.access_token; - this.$store.commit("user/setToken", token); - this.$router.push({ - path: "/home", - }); - } - - // token = - // "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LnFpbmd3ZWlsYWk4ODgueHl6XC9hZG1pblwvbG9naW4iLCJpYXQiOjE2Mjc0NjU1ODksImV4cCI6MTk4NzQ2NTU4OSwibmJmIjoxNjI3NDY1NTg5LCJqdGkiOiJ6clVHYnJCOXlPWkpRanRUIiwic3ViIjoxNjEsInBydiI6IjBiMzZjMGUwMjMyZGVlZTlkOTZhZDA0NGY3YWE2MjQ2YTUwYTU3ZmEifQ.aFc5fCUffmDN7zBRn-D13kx1LuLNG1Ej7vQOu4O2_AA" - // this.$store.commit("user/setToken", token); - // this.$router.push({ + // if (url_string == "{}") { + // this.$toast('请先登录') + // } else { + // token = url.token_type + " " + url.access_token; + // this.$store.commit("user/setToken", token); + // this.$router.push({ // path: "/home", // }); + // } + + token = + "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LnFpbmd3ZWlsYWk4ODgueHl6XC9hZG1pblwvbG9naW4iLCJpYXQiOjE2Mjc0NjU1ODksImV4cCI6MTk4NzQ2NTU4OSwibmJmIjoxNjI3NDY1NTg5LCJqdGkiOiJ6clVHYnJCOXlPWkpRanRUIiwic3ViIjoxNjEsInBydiI6IjBiMzZjMGUwMjMyZGVlZTlkOTZhZDA0NGY3YWE2MjQ2YTUwYTU3ZmEifQ.aFc5fCUffmDN7zBRn-D13kx1LuLNG1Ej7vQOu4O2_AA" + this.$store.commit("user/setToken", token); + this.$router.push({ + path: "/home", + }); }, }; diff --git a/src/views/teamList/index.vue b/src/views/teamList/index.vue index b33b8aa..dbb9a4e 100644 --- a/src/views/teamList/index.vue +++ b/src/views/teamList/index.vue @@ -14,8 +14,8 @@
{{item.username}}
-
- + +
注册时间:{{item.created_at |time}}
团队人数:{{item.team_num}}
@@ -53,6 +53,9 @@ capitalize: function (val) { return (+val || 0).toFixed(0).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') }, + time: function (val) { + return val.substring(0,10); + }, capitalize2: function (index) { let key = Number(index-1) const statusList = [ @@ -191,8 +194,8 @@ } .teamMoney { - height: 26px; - line-height: 26px; + // height: 26px; + // line-height: 26px; font-size: 26px; font-weight: 400; color: #FFFFFF; From 41ab203b1d86e17c85314f6ff9c49252767cd351 Mon Sep 17 00:00:00 2001 From: zhaoguoqiang <849348323@qq.com> Date: Tue, 17 Aug 2021 10:14:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.online | 5 +++-- package.json | 2 +- src/views/login.vue | 33 ++++++++++++++++++--------------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.env.online b/.env.online index 9c40544..da31ae7 100644 --- a/.env.online +++ b/.env.online @@ -1,3 +1,4 @@ -NODE_ENV=production +NODE_ENV=online BUILD_ENV=online -VUE_APP_ENV=online \ No newline at end of file +VUE_APP_ENV=online +VUE_APP_BASE_URL="http://test.qingweilai888.xyz" \ No newline at end of file diff --git a/package.json b/package.json index c587253..1fe1e7e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve --mode development", + "serve": "vue-cli-service serve --mode online", "build:dev": "vue-cli-service build --mode development", "build:pro": "vue-cli-service build --mode production", "lint": "vue-cli-service lint" diff --git a/src/views/login.vue b/src/views/login.vue index 7b02c46..73a1411 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -6,22 +6,25 @@ let url = this.$route.query; let token; let url_string = JSON.stringify(url); - // if (url_string == "{}") { - // this.$toast('请先登录') - // } else { - // token = url.token_type + " " + url.access_token; - // this.$store.commit("user/setToken", token); - // this.$router.push({ - // path: "/home", - // }); - // } + if (process.env.NODE_ENV == "online") { + token = + "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LnFpbmd3ZWlsYWk4ODgueHl6XC9hZG1pblwvbG9naW4iLCJpYXQiOjE2Mjc0NjU1ODksImV4cCI6MTk4NzQ2NTU4OSwibmJmIjoxNjI3NDY1NTg5LCJqdGkiOiJ6clVHYnJCOXlPWkpRanRUIiwic3ViIjoxNjEsInBydiI6IjBiMzZjMGUwMjMyZGVlZTlkOTZhZDA0NGY3YWE2MjQ2YTUwYTU3ZmEifQ.aFc5fCUffmDN7zBRn-D13kx1LuLNG1Ej7vQOu4O2_AA" + this.$store.commit("user/setToken", token); + this.$router.push({ + path: "/home", + }); + } else { + if (url_string == "{}") { + this.$toast('请先登录') + } else { + token = url.token_type + " " + url.access_token; + this.$store.commit("user/setToken", token); + this.$router.push({ + path: "/home", + }); + } + } - token = - "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC90ZXN0LnFpbmd3ZWlsYWk4ODgueHl6XC9hZG1pblwvbG9naW4iLCJpYXQiOjE2Mjc0NjU1ODksImV4cCI6MTk4NzQ2NTU4OSwibmJmIjoxNjI3NDY1NTg5LCJqdGkiOiJ6clVHYnJCOXlPWkpRanRUIiwic3ViIjoxNjEsInBydiI6IjBiMzZjMGUwMjMyZGVlZTlkOTZhZDA0NGY3YWE2MjQ2YTUwYTU3ZmEifQ.aFc5fCUffmDN7zBRn-D13kx1LuLNG1Ej7vQOu4O2_AA" - this.$store.commit("user/setToken", token); - this.$router.push({ - path: "/home", - }); }, }; From 6693cf2a75c4a89d078eb1c2f79152b0ea7b211c Mon Sep 17 00:00:00 2001 From: zhaoguoqiang <849348323@qq.com> Date: Tue, 17 Aug 2021 18:27:19 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8E=A5=E4=BA=86=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=80=9F=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataOverview/index.vue | 18 +++++++++--------- src/views/teamList/index.vue | 7 ++++++- src/views/teamPerformance/index.vue | 18 +++++++++++------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/views/dataOverview/index.vue b/src/views/dataOverview/index.vue index f8646a6..0345e88 100644 --- a/src/views/dataOverview/index.vue +++ b/src/views/dataOverview/index.vue @@ -110,7 +110,7 @@
本月团队业绩排名TOP
-
+

{{index+1}}

@@ -160,14 +160,14 @@ } }) }, - toTeamPerformance(){ - // this.$router.push({ - // path: '/teamPerformance', - // query: { - // // type: type, - // // level_id: id, - // } - // }) + toTeamPerformance(id){ + // console.log(id,'---id'); + this.$router.push({ + path: '/teamPerformance', + query: { + lid:id, + } + }) }, } } diff --git a/src/views/teamList/index.vue b/src/views/teamList/index.vue index dbb9a4e..dd139ee 100644 --- a/src/views/teamList/index.vue +++ b/src/views/teamList/index.vue @@ -46,7 +46,7 @@ error: false, type:'', level_id:'', - today_month:this.$route.query.today_month, + id:'', } }, filters: { @@ -69,6 +69,10 @@ } }, created() { + if(this.$route.query.id){ + console.log(`2222222222222222`); + this.id = this.$route.query.id + } this.getList() }, methods: { @@ -76,6 +80,7 @@ const res = await data.poxyList({ type: this.$route.query.type, level_id: this.$route.query.level_id, + user_id:this.id, page:++this.list.curPage, }) const information = res.data.data diff --git a/src/views/teamPerformance/index.vue b/src/views/teamPerformance/index.vue index 283b115..7aed746 100644 --- a/src/views/teamPerformance/index.vue +++ b/src/views/teamPerformance/index.vue @@ -134,6 +134,7 @@ data() { return { list: {}, + id:'', } }, filters: { @@ -142,6 +143,8 @@ }, }, created() { + this.id = this.$route.query.lid + console.log(this.id,'-----------------'); this.getData() }, methods: { @@ -151,13 +154,14 @@ console.log(this.list, '---this.list'); }, toTeamList(type, id) { - // this.$router.push({ - // path: '/teamList', - // query: { - // type: type, - // level_id: id, - // } - // }) + this.$router.push({ + path: '/teamList', + query: { + type: type, + level_id: id, + id:this.id, + } + }) }, } } From df981b835d622212465cd408403cd4f5856b245f Mon Sep 17 00:00:00 2001 From: zhaoguoqiang <849348323@qq.com> Date: Wed, 18 Aug 2021 10:49:48 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8E=A5=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/data.js | 5 ++++ src/views/dataOverview/index.vue | 4 +-- src/views/teamList/index.vue | 41 ++++++++++++++++------------- src/views/teamPerformance/index.vue | 4 ++- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/api/data.js b/src/api/data.js index 8daefaa..e0d4f46 100644 --- a/src/api/data.js +++ b/src/api/data.js @@ -19,6 +19,11 @@ class data{ async poxyList(param){ return await get("/admin/DataReport/ShopDataReport/poxyList",param) } + + async overviewByUserId(param){ + return await get("/admin/DataReport/ShopDataReport/overviewByUserId",param) + } + } export default new data() \ No newline at end of file diff --git a/src/views/dataOverview/index.vue b/src/views/dataOverview/index.vue index 0345e88..90d2776 100644 --- a/src/views/dataOverview/index.vue +++ b/src/views/dataOverview/index.vue @@ -155,13 +155,11 @@ path: '/teamList', query: { type: type, - level_id: id, - today_month:this.list.today_month, + level_id: id } }) }, toTeamPerformance(id){ - // console.log(id,'---id'); this.$router.push({ path: '/teamPerformance', query: { diff --git a/src/views/teamList/index.vue b/src/views/teamList/index.vue index dd139ee..577bdc6 100644 --- a/src/views/teamList/index.vue +++ b/src/views/teamList/index.vue @@ -14,9 +14,9 @@
{{item.username}}
- +
注册时间:{{item.created_at |time}}
-
团队人数:{{item.team_num}}
+
团队人数:{{item.team_num}}
@@ -31,7 +31,7 @@ import { Tab, Tabs, - Empty + Empty } from 'vant'; export default { data() { @@ -44,9 +44,9 @@ totalPage: 1, }, error: false, - type:'', - level_id:'', - id:'', + type: '', + level_id: '', + id: '', } }, filters: { @@ -54,10 +54,10 @@ return (+val || 0).toFixed(0).replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') }, time: function (val) { - return val.substring(0,10); + return val.substring(0, 10); }, capitalize2: function (index) { - let key = Number(index-1) + let key = Number(index - 1) const statusList = [ "vip", "总代", @@ -69,7 +69,7 @@ } }, created() { - if(this.$route.query.id){ + if (this.$route.query.id) { console.log(`2222222222222222`); this.id = this.$route.query.id } @@ -80,10 +80,16 @@ const res = await data.poxyList({ type: this.$route.query.type, level_id: this.$route.query.level_id, - user_id:this.id, - page:++this.list.curPage, + user_id: this.id, + page: ++this.list.curPage, }) - const information = res.data.data + let information + if (this.$route.query.id) { + information = res.data + } else { + information = res.data.data + } + console.log(information, '222'); if (JSON.stringify(information.data) != '[]') { this.list.data.push(...information.data); this.list.totalPage = information.last_page; @@ -100,9 +106,6 @@ this.list.finished = true; }); } - }, - addList() { - }, onLoad() { var _this = this; @@ -122,18 +125,20 @@ min-height: 100vh; background: RGBA(63, 66, 88, 1); position: relative; - .empty{ + + .empty { position: absolute; top: 20%; - left:50%; + left: 50%; transform: translateX(-50%); } + .moneyRanking { min-height: 100vh; background: RGBA(63, 66, 88, 1); padding: 0 70px; padding-top: 50px; - + .title { font-size: 40px; diff --git a/src/views/teamPerformance/index.vue b/src/views/teamPerformance/index.vue index 7aed746..4dcd1d5 100644 --- a/src/views/teamPerformance/index.vue +++ b/src/views/teamPerformance/index.vue @@ -149,7 +149,9 @@ }, methods: { async getData() { - const res = await data.overview(); + const res = await data.overviewByUserId({ + user_id:this.id, + }); this.list = res.data console.log(this.list, '---this.list'); },