From 83c5b2eb9bba5b3a9aeb5901bddcfb83611e408a Mon Sep 17 00:00:00 2001 From: lqq Date: Fri, 11 Oct 2019 08:56:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=BA=93=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/focus/index.js | 8 + config.js | 2 +- models/home.js | 8 +- pages/article/index.js | 386 ++------------------------------------ pages/home/index.js | 17 +- utils/http.js | 3 +- 6 files changed, 44 insertions(+), 380 deletions(-) diff --git a/components/focus/index.js b/components/focus/index.js index 0c604ed..b9f1ef1 100644 --- a/components/focus/index.js +++ b/components/focus/index.js @@ -15,6 +15,14 @@ Component({ { id: '1', title: '啦啦啦阿拉啦啦啦爱啦啦啦' + }, + { + id: '2', + title: '啦啦啦阿拉啦啦啦爱啦啦啦啦啦啦阿拉啦啦啦爱啦啦啦' + }, + { + id: '3', + title: '啦啦啦阿拉啦啦啦爱啦啦啦' } ] }, diff --git a/config.js b/config.js index 8af9788..f4eb37b 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,4 @@ const config = { - api_url: '', // 服务器地址 + api_url: 'https://nei.netease.com/api/apimock/8290e3893033966572547b03f2ef3dbb/', // 服务器地址 } export { config } \ No newline at end of file diff --git a/models/home.js b/models/home.js index 3afa6e9..d4865a1 100644 --- a/models/home.js +++ b/models/home.js @@ -7,9 +7,11 @@ class HomeModel extends HTTP { // 首页列表 getHomeList (success) { let params = { - url: '', - sucess: sucess + url: 'oas-admin/screen/user/ageAndSex', + success: success } this.request(params) } -} \ No newline at end of file +} + +export {HomeModel} \ No newline at end of file diff --git a/pages/article/index.js b/pages/article/index.js index 013e142..f45d0d5 100644 --- a/pages/article/index.js +++ b/pages/article/index.js @@ -5,381 +5,35 @@ Page({ * 页面的初始数据 */ data: { - nodes: ` -
-
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
- -
-
-
-
-
-

- 建 党 节 -

-
-

- 1921.7 ~ 2019.7 -

-

- 筚路蓝缕,砥砺前行 -

-

- 初心不忘,迈向复兴 -

-

-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

- 98年,对于一个人,也许很漫长; -

-

- 对于一个国家,弹指一挥间; -

-

- 对于一个政党,恰是风华正茂! -

-

- 今年,党的98岁生日, -

-

- 热烈庆祝中国共产党98周年快乐! + nodes: `

+
+
+
+

+ 便民举措

+
-

-
-

-
-
-

-
-

-
-
-
-
- -
-
-
-
-

-
-

-
-

-
-

-
-
-
-

- 作为社会主义接班人,我们本应了解一些党的基本知识。 -

-

-
+

+
+
+
+
+
+

+ 当清晨的一缕阳光透过窗帘上的空隙映照在沉睡的脸庞时,微微张开的双眼朦胧地注视着周遭的一切,新的一天悄然而至。

+
+
+
+


-
-
-
-
-
-
-
-
-
-
-
- “中国共产党”名字由来 -
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-

-
-

- 最早提出“中国共产党”这一名称的是蔡和森。1920年8月13日和9月16日,正在留法勤工俭学的他,在给毛泽东写的两封信中,详细地研讨了共产党问题,提出:“先要组织党——共产党,因为它是革命运动的发动者、宣传者、先锋队、作战部。” -

-
-

-
-

-
-
-
-
- -
-
-
-
-

-
-

-
-

- 他在对西欧各国共产党特别是俄国共产党考察的基础上,提出了具体的建党步骤,其中包括“明目张胆正式成立一个中国共产党”。 -

-

-
-

-

- 在此前后,陈独秀在上海,李大钊、张申府在北京也通过信函讨论了党的名称问题,决定采用“共产党”作为中国无产阶级政党的名称。 -

-

-
-


-
-
-
-
-
-
-
-
-
-
-
-
- 建党节的由来 -
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-

-
-

- 九十七年前的盛夏七月,毛泽东、陈独秀和李大钊等中国第一代马克思主义革命家,在上海和嘉兴召开了中国共产党第一次代表大会——中国共产党正式成立,伟大的革命、发展征程就此开启。 -

-
-

-
-

-
-
-
-
- -
-
-
-
-
-

- 在战争时期,中共一大的召开日期难以考证。因此,毛泽东在著名文论《论持久战》中首次提出以七月一日作为党的生日。 -

-

-
-

-

- 建国之后,经过党史工作者的细致考证,确认中共一大的召开时间是 1921 年 7 月 23 日,但 7 月 1 日的建党节传统深入人心,一直延续了下来。 -

-
-

-
-

-

-
-

-
-
-
-
-
-
-
-
-
-
-
- 党建的四项基本要求 -
-
-
-
-
-
-
-
-
-
-
-

-
-

-
-
-
-

- 第一,坚持党的基本路线。 -

-

- 第二,坚持解放思想,实事求是,与时俱进。 -

-

- 第三,坚持全心全意为人民服务。 -

-

- 第四,坚持民主集中制。 -

-
-
-
-
-
-
-

-
-

-

-
-

-
-

- 九十八年,峥嵘岁月, -

-

- 九十八年,辉煌历程。 -

-

-
-

-

- 今天的我们挥舞着前辈们的伟大旗帜 ,追随着那从未熄灭的明灯,冲锋陷阵,高扬风帆,向着那彼岸,向着那未来更加执着而勇敢地前进, 前进 ,前进!  -

-
-

-
-

-
-
-
- -
-
- -END- -
-
-
-
-

-
-

-

- 排版丨135小编 -

-

- 文案丨来源网络(侵删) -

-

- 图片丨来源网络(侵删) -

-

-
-

-
-
-
-
-
-
-
-
-
-
-
-

- 扫码关注 -

-
-
-
-
-
-
-
-
-

- 有趣的灵魂在等你 -

-
-
-
-
- -
-
-
-
-
-
-

-
-

`, +
`, unStar: '/images/common/star.png', star: '/images/common/star_light.png', isStar: true, diff --git a/pages/home/index.js b/pages/home/index.js index a6c515d..46c86d9 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -1,7 +1,6 @@ //index.js -//获取应用实例 -const app = getApp() - +import { HomeModel} from '../../models/home.js' +let homeModel = new HomeModel() Page({ data: { list: [ @@ -26,7 +25,9 @@ Page({ ] }, onLoad: function () { - + homeModel.getHomeList((res) => { + console.log(res) + }) }, tapSwiperItem (e) { console.log(e.detail) @@ -38,10 +39,10 @@ Page({ }, clickListItem (e) { console.log(e.detail) - // this.gotoArticePage(e.detail.id) - wx.redirectTo({ - url: '/pages/register/index', - }) + this.gotoArticePage(e.detail.id) + // wx.redirectTo({ + // url: '/pages/register/index', + // }) }, gotoArticePage (id) { wx.navigateTo({ diff --git a/utils/http.js b/utils/http.js index d9a1a41..5617375 100644 --- a/utils/http.js +++ b/utils/http.js @@ -13,11 +13,10 @@ class HTTP { url: url, data: params.data, header: { - 'conent-type': 'application/json', + 'content-type': 'application/json', }, method: params.method, dataType: 'json', - responseType: 'json', success: function(res) { console.log(res) let code = res.statusCode.toString()