From 5e5b5f4dc20026193d44a3ff55588417ac125187 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 3 Jun 2022 11:41:32 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0Dev=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/interact-fixed/interact-fixed.vue | 34 +++++++++++--------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/components/interact-fixed/interact-fixed.vue b/components/interact-fixed/interact-fixed.vue index b03a64f..1b9ad02 100644 --- a/components/interact-fixed/interact-fixed.vue +++ b/components/interact-fixed/interact-fixed.vue @@ -289,21 +289,25 @@ export default { }) }, checkHas(){ - if(this.type>0){ - apiPraises.has(this.type,this.data.id).then(rs=>{ - if(rs.status==200 && rs.result){ - this.isPraise=true; - }else{ - this.isPraise=false; - } - }); - apiFavorites.has(this.type,this.data.id).then(rs=>{ - if(rs.status==200 && rs.result){ - this.isFavorite=true; - }else{ - this.isFavorite=false; - } - }) + if(this.type>0 && this.data.id){ + if(this.praises){ + apiPraises.has(this.type,this.data.id).then(rs=>{ + if(rs.status==200 && rs.result){ + this.isPraise=true; + }else{ + this.isPraise=false; + } + }); + } + if(this.favorites){ + apiFavorites.has(this.type,this.data.id).then(rs=>{ + if(rs.status==200 && rs.result){ + this.isFavorite=true; + }else{ + this.isFavorite=false; + } + }) + } } }, submit(){ From 22f86baa3b70ae5663405ff5d3dc93572eb88966 Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 13 Jun 2022 22:54:32 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 16 ++++++++++++++-- package.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 package.json diff --git a/config/index.js b/config/index.js index 1c2ee4f..16b021c 100644 --- a/config/index.js +++ b/config/index.js @@ -13,12 +13,24 @@ if(process.env.NODE_ENV === 'development'){ oldApiBaseUrl = '/uboeApi'; fileUrl = 'http://localhost:9090/cdn/upload'; loginPath='/pages/login/login'; -}else{ +}else if(process.env.NODE_ENV === 'preview'){ // 生产环境 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; fileUrl = 'https://u-pre.boe.com/file/upload'; - loginPath='https://u-pre.boe.com/m'; + loginPath='https://u-pre.boe.com/m/preview'; +}else if(process.env.NODE_ENV === 'testing'){ + // 生产环境 + apiBaseUrl = '/systemapi'; + oldApiBaseUrl = '/uboeApi'; + fileUrl = 'https://u-pre.boe.com/file/upload'; + loginPath='https://u-pre.boe.com/m/testing'; +}else{ + // 生产环境 + apiBaseUrl = '/systemapi'; + oldApiBaseUrl = '/uboeApi'; + fileUrl = 'https://u.boe.com/file/upload'; + loginPath='https://u.boe.com/m/production'; } export default { diff --git a/package.json b/package.json new file mode 100644 index 0000000..80e4f21 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "mobile", + "version": "1.0.0", + "description": "移动端代码", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/mobile.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "uni-app": { + "scripts": { + "h5:testing": { + "BROWSER": "Chrome", + "title": "build:testing", + "env": { + "UNI_PLATFORM": "h5", + "ENV_TYPE": "testing" + }, + "define": { + + } + }, + "h5:preview": { + "BROWSER": "Chrome", + "title": "build:preview", + "env": { + "UNI_PLATFORM": "h5", + "ENV_TYPE": "preview" + }, + "define": { + + } + } + } + } +} From 5ff6ec8fa16734ccbcb882feb0e18787fbaab844 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 15 Jun 2022 14:59:19 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/index.js b/config/index.js index 16b021c..364e637 100644 --- a/config/index.js +++ b/config/index.js @@ -9,28 +9,29 @@ let fileUrl=''; let version=1; if(process.env.NODE_ENV === 'development'){ + //本地开发环境 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; fileUrl = 'http://localhost:9090/cdn/upload'; loginPath='/pages/login/login'; }else if(process.env.NODE_ENV === 'preview'){ - // 生产环境 + // 预发布环境,当前配置未使用上 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; - fileUrl = 'https://u-pre.boe.com/file/upload'; + fileUrl = 'https://u-pre.boe.com/upload'; loginPath='https://u-pre.boe.com/m/preview'; }else if(process.env.NODE_ENV === 'testing'){ - // 生产环境 + // 测试环境 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; - fileUrl = 'https://u-pre.boe.com/file/upload'; + fileUrl = 'https://u-pre.boe.com/upload'; loginPath='https://u-pre.boe.com/m/testing'; }else{ // 生产环境 apiBaseUrl = '/systemapi'; oldApiBaseUrl = '/uboeApi'; - fileUrl = 'https://u.boe.com/file/upload'; - loginPath='https://u.boe.com/m/production'; + fileUrl = 'https://u.boe.com/upload'; + loginPath='https://u.boe.com/m/loginuser'; } export default { From b2c6e3ba9e8bee72e745a6fcc6028b61f5b2d5bd Mon Sep 17 00:00:00 2001 From: daihh Date: Mon, 20 Jun 2022 19:32:38 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 71 +++++++++++++++++++++++++++++++++++++++-- pages/login/loading.vue | 1 + pages/login/login.vue | 3 ++ pages/study/index.vue | 38 +++++++++++----------- 4 files changed, 92 insertions(+), 21 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 79d38b0..b568459 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -196,6 +196,12 @@ + + + + + +