From 0d9c556153940ab779f95d742091c9355c7b136a Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 19 Mar 2019 10:58:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=90=9C=E7=B4=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 2 +- src/common/global.js | 2 +- src/pages/search.wpy | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/project.config.json b/project.config.json index f443360..1f72e8f 100644 --- a/project.config.json +++ b/project.config.json @@ -1,7 +1,7 @@ { "description": "A WePY project", "setting": { - "urlCheck": false, + "urlCheck": true, "es6": false, "postcss": false, "minified": false, diff --git a/src/common/global.js b/src/common/global.js index 186523b..5d175d7 100644 --- a/src/common/global.js +++ b/src/common/global.js @@ -1,4 +1,4 @@ -const env = 'test'; //product, test +const env = 'product'; //product, test export default { env: env, apiBase: env === 'test'? 'https://ghost-test.kingsome.cn' : 'https://ghost.kingsome.cn', diff --git a/src/pages/search.wpy b/src/pages/search.wpy index af2cabd..37ce3f9 100644 --- a/src/pages/search.wpy +++ b/src/pages/search.wpy @@ -57,7 +57,7 @@ import recordCell from '../components/game-cell'; import recentGame from '../components/recent-game'; import zanLoadmore from '../components/zan-loadmore'; - import g from '../common/global'; + import global from '../common/global'; import jcEvent from '../common/jc-event'; export default class SearchPage extends wepy.page { @@ -86,7 +86,7 @@ language: '所有语言', type: 0, languageArr: ['所有语言', '中文', '简体中文', '繁体中文', '英文', '日文', '多国语言', '德文', '法文', '欧洲', '其他'], - typeArr: g.gameTypes, + typeArr: global.gameTypes, typeName: '所有类型', showAll: false, category: '所有', @@ -202,8 +202,11 @@ self.current += 10; for (let obj of res.records) { (obj.open) && (obj.owned = true); - if (this.record.type <= g.gameTypes.length) { - this.typeStr = g.gameTypes[this.record.type - 1]; + if (obj.type <= self.typeArr.length) { + obj.typeStr = self.typeArr[this.record.type - 1]; + } + if (obj.images && obj.images.length > 0) { + obj.icon = obj.images[0]; } self.records.push(obj); }