fanp 6 years ago
parent
commit
f636482265
  1. 4
      components/cell/index.js
  2. 2
      components/cell/index.wxml
  3. 2
      components/cell/index.wxss
  4. 8
      components/focus/index.js
  5. 2
      config.js
  6. 45
      models/artice.js
  7. 46
      models/auth.js
  8. 9
      models/billboard.js
  9. 8
      models/home.js
  10. 10
      models/topic.js
  11. 9
      models/user.js
  12. 4
      package.json
  13. 382
      pages/article/index.js
  14. 7
      pages/billboards/index.js
  15. 27
      pages/home/index.js
  16. 13
      utils/dayjs/index.js
  17. 1
      utils/dayjs/relativeTime.js
  18. 17
      utils/http.js

4
components/cell/index.js

@ -6,6 +6,10 @@ Component({
properties: {
cId: String,
title: String,
readed: {
type:Boolean,
value: true,
},
time: String,
showTop: {
type: Boolean,

2
components/cell/index.wxml

@ -1,6 +1,6 @@
<!--components/cell/index.wxml-->
<view class="cell" id="e-cell" bindtap="onTap">
<view class="cell_title">{{title}}</view>
<view class="cell_title {{readed ? 'cell_title_readed':''}}">{{title}}</view>
<view class="cell_info">
<view class="cell_info_meta">{{time}}</view>
<image wx:if="{{showTop}}" class="cell_info_top" src="images/top.png"></image>

2
components/cell/index.wxss

@ -10,7 +10,7 @@
font-size: 17px;
color: #000;
}
.cell_title_selected {
.cell_title_readed {
color: #9C9C9C;
}
.cell_info {

8
components/focus/index.js

@ -15,6 +15,14 @@ Component({
{
id: '1',
title: '啦啦啦阿拉啦啦啦爱啦啦啦'
},
{
id: '2',
title: '啦啦啦阿拉啦啦啦爱啦啦啦啦啦啦阿拉啦啦啦爱啦啦啦'
},
{
id: '3',
title: '啦啦啦阿拉啦啦啦爱啦啦啦'
}
]
},

2
config.js

@ -1,4 +1,4 @@
const config = {
api_url: '', // 服务器地址
api_url: 'https://nei.netease.com/api/apimock/8290e3893033966572547b03f2ef3dbb/', // 服务器地址
}
export { config }

45
models/artice.js

@ -0,0 +1,45 @@
import { HTTP } from '../utils/http.js'
class ArticeModel extends HTTP {
constructor() {
super()
}
// 文章详情
getDetail(aId, success) {
let params = {
url: '',
sucess: success,
method: 'POST',
data: {
id: aId
}
}
this.request(params)
}
// 设置收藏还是取消
setCollect(aId, type, success) {
let params = {
url: '',
success: success,
method: 'POST',
data: {
}
}
this.request(params)
}
// 在线报名
onlineSign (aId, type, success) {
let params = {
url: '',
success: success,
method: 'POST',
data: {
}
}
this.request(params)
}
}
export { ArticeModel }

46
models/auth.js

@ -0,0 +1,46 @@
import { HTTP, Method } from '../utils/http.js'
const token_url = 'oas-admin/screen/user/ageAndSex'
class AuthModel extends HTTP {
constructor() {
super()
}
// 获取 Token
fetchAuthToken(success) {
// 获取token
this._fetchWXCode().then(res => {
if (!res) return
let params = {
url: token_url,
method: Method.GET,
data: {
code: res
},
success: success,
}
this.request(params)
})
}
// 获取微信code
_fetchWXCode() {
return new Promise(resolve => {
wx.login({
success(res) {
console.log('获取Code成功 ' + res.code)
if (res.code) {
resolve(res.code)
} else {
wx.showToast({
icon: "none",
title: '登录失败',
})
console.log('登录失败!' + res.errMsg)
}
}
})
})
}
}
export { AuthModel }

9
models/billboard.js

@ -0,0 +1,9 @@
import {HTTP} from '../utils/http.js'
class BillboardModel extends HTTP {
constructor () {
super()
}
}
export {BillboardModel}

8
models/home.js

@ -5,11 +5,13 @@ class HomeModel extends HTTP {
super()
}
// 首页列表
getHomeList (success) {
getHomeList = (success) => {
let params = {
url: '',
sucess: sucess
url: 'oas-admin/screen/user/ageAndSex',
success: success
}
this.request(params)
}
}
export {HomeModel}

10
models/topic.js

@ -0,0 +1,10 @@
import {HTTP} from '../utils/http.js'
class TopicModel extends HTTP {
constructor () {
super()
}
}
export {TopicModel}

9
models/user.js

@ -0,0 +1,9 @@
import {HTTP} from '../utils/http.js'
class UserModel extends HTTP {
constructor () {
super()
}
}
export { UserModel }

4
package.json

@ -11,5 +11,7 @@
"url": "http://liqianqian@121.42.41.42:7070/r/shibeirencai_wechat.git"
},
"author": "",
"license": "ISC"
"license": "ISC",
"dependencies": {
}
}

382
pages/article/index.js

@ -5,381 +5,35 @@ Page({
* 页面的初始数据
*/
data: {
nodes: `
<section data-tplid="95330" data-tools="135编辑器">
<section class="_135editor">
<section style="width: 100%;" data-width="100%">
<section style="display: flex;justify-content: space-between;align-items:flex-end;margin-bottom: -2.4em;" class="">
<section style="margin-left:0.5em;display: flex;justify-content: center;align-items: flex-end;" class="">
<section style=" width:4em;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphckk3YW9NaEhhd01naWNISGgwZXJlbVVRaGppYmlhaWFYM01pYkFFbjk3cjRpY3FEaDkyTVFJMjZLU3VnLzA=" data-width="100%" data-ratio="1"/>
</section>
<section style=" width:3.5em;margin-left: 0.5em;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphckk3YW9NaEhhd01naWNISGgwZXJlbVVRaGppYmlhaWFYM01pYkFFbjk3cjRpY3FEaDkyTVFJMjZLU3VnLzA=" data-width="100%" data-ratio="1"/>
</section>
</section>
<section style="margin-right:0.5em;display: flex;justify-content: center;align-items: flex-end;">
<section style=" width:3.5em;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphckk3YW9NaEhhd01naWNISGgwZXJlbVVRaGppYmlhaWFYM01pYkFFbjk3cjRpY3FEaDkyTVFJMjZLU3VnLzA=" data-width="100%" data-ratio="1"/>
</section>
<section style=" width:4.2em;margin-left: 0.5em;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphckk3YW9NaEhhd01naWNISGgwZXJlbVVRaGppYmlhaWFYM01pYkFFbjk3cjRpY3FEaDkyTVFJMjZLU3VnLzA=" data-width="100%" data-ratio="1"/>
</section>
</section>
</section>
<section style="width: 100%;text-align:center;height:60px; background: url(https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphMzkwYVFjbHdwWkRwZE50aWJDc29tOGNTQ25BazNMTEpMSkNIN3FSMXVYaWNucEhQOGRpYUZtaWE4Zy8w)repeat-x;background-size:68px 58px;background-position:center ;" data-width="100%" class="">
<section style="width:2.6em;display: inline-block;margin-top:10px;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzZ0SUd2YzNvekNIY0Jvbnl3STdmRFZMSnFiaWFoaGVIRmhDcldkNnhyYnpjRTNLbVVXZGlhZDFTMjRJSUJvR2R5aWFYckE3WEFRV0F3UkEvMD93eF9mbXQ9cG5n" data-width="100%" data-ratio="1"/>
</section>
</section>
<section style="padding: 0px 0.6em; box-sizing: border-box;" class="">
<section style="border-right: 1px solid rgb(212, 10, 17); border-bottom: 1px solid rgb(212, 10, 17); border-left: 1px solid rgb(212, 10, 17); border-image: initial; border-top: none; box-sizing: border-box;" class="">
<section data-autoskip="1" class="135brush" style="font-size: 14px; letter-spacing: 1.5px; color: rgb(51, 51, 51); line-height: 1.75em; padding: 0.4em 1em; text-align: justify; box-sizing: border-box;">
<p style="text-align:center; margin: 1em auto; font-size: 12px; line-height: 1.75em; letter-spacing: 1px;" align="center">
<span style="color: #3F3F3F; font-size: 18px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"><strong> </strong></span>
</p>
<section class="135brush" data-brushtype="text" style="text-align: center;letter-spacing:1px;margin: 1em auto;font-size:12px;">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"><strong><span style="font-size: 14px; color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">1921.7 ~ 2019.7</span></strong><strong><span style="font-size: 14px; color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"></span></strong></span>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"><strong><span style="font-size: 14px; color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">筚路蓝缕砥砺前行</span></strong><strong><span style="font-size: 14px; color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"></span></strong></span>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;"><strong><span style="font-size: 14px; color: #3F3F3F; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">初心不忘迈向复兴</span></strong></span>
nodes: `<section class="_editor" data-support="96编辑器" data-style-id="24818">
<section style="text-align: center;margin:10px 0px;">
<section style="width:4px;height:24px;background-color:#ffc100;display:inline-block;vertical-align: middle;transform: rotatez(0deg);"></section>
<section style="margin-right: -2px; margin-left: -2px; border-style: solid; border-width: 1px; border-color: #000000; padding: 2px 10px; display: inline-block; vertical-align: middle;">
<p style="letter-spacing: 2px;">
便民举措<br/>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<br/>
</p>
<section style="padding: 10px; box-sizing: border-box;" class="">
<section style="width: 100%" data-width="100%">
<section style="width: 100%; padding-bottom: 60%; height: 0px; text-align: center; vertical-align: top; overflow: hidden; background-image: url(&quot;https://image.135editor.com/files/users/455/4550562/201906/XZuYaQ9T_zDxp.png&quot;); background-size: cover; background-repeat: no-repeat; background-position: center center; box-sizing: border-box;" data-role="square" class="135bg" data-width="100%">
<section style="width: 100%; padding-bottom: 20%; background-image: url(&quot;https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvdU4xTElhdjdvSjhkcEhhM1ZYaWFTcFQwZnBaMzdPQ3V6S2gzeG9FYlBOME5BUkRxSXYxb2lhTGZrcnB2WDZIdElqZWc1ODJhd2RpYmJiNXFxVGZ1OTB0T1EvMD93eF9mbXQ9cG5n&quot;); background-size: contain; background-repeat: no-repeat; box-sizing: border-box;" data-width="100%" class=""></section><img src="https://image.135editor.com/files/users/455/4550562/201906/XZuYaQ9T_zDxp.png" style="width: 100%;visibility: visible;opacity: 0;" data-width="100%" data-ratio="0.5544303797468354" data-op="change" title="undefined" alt=""/>
</section>
</section>
</section>
</section>
</section>
<section style="width:4px;height:24px;background-color:#ffc100;display:inline-block;vertical-align: middle;"></section>
</section>
</section>
</section>
</section>
<section class="_135editor">
<section>
<p style="text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.75em; word-wrap: break-word !important; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;" align="center">
<span style="color: #3F3F3F; font-size: 14px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">98对于一个人也许很漫长</span>
</p>
<p style="text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.75em; word-wrap: break-word !important; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;" align="center">
<span style="color: #3F3F3F; font-size: 14px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">对于一个国家弹指一挥间</span>
</p>
<p style="text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.75em; word-wrap: break-word !important; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;" align="center">
<span style="color: #3F3F3F; font-size: 14px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">对于一个政党恰是风华正茂</span>
</p>
<p style="text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.75em; word-wrap: break-word !important; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;" align="center">
<span style="color: #3F3F3F; font-size: 14px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">今年党的98岁生日</span>
<section class="_editor" data-support="96编辑器" data-style-id="24804">
<section style="margin:10px 0px;">
<section style="width: 12px; height: 12px; background-color: #ffc81c; border-radius: 50%; box-sizing: border-box;"></section>
<section style="margin-top: -12px; margin-left: auto; width: 12px; height: 12px; background-color: #ffc81c; border-radius: 50%; box-sizing: border-box;"></section>
<section style="margin:-6px 6px;border-style:solid;border-width:1px;border-color:#ffcc9c;background-color:#fefefe;padding:15px;display:inline-block;transform: rotateZ(0deg);-webkit-transform: rotateZ(0deg);-moz-transform: rotateZ(0deg);-ms-transform: rotateZ(0deg);-o-transform: rotateZ(0deg);">
<p style="letter-spacing: 2px;">
<span style="font-size: 14px;">当清晨的一缕阳光透过窗帘上的空隙映照在沉睡的脸庞时微微张开的双眼朦胧地注视着周遭的一切新的一天悄然而至</span>
</p>
<p style="text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.75em; word-wrap: break-word !important; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;" align="center">
<span style="color: #3F3F3F; font-size: 14px; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">热烈庆祝中国共产党98周年快乐</span>
</p>
</section>
</section>
<p>
<br/>
</p>
<section class="">
<section class="">
<p>
<br/>
</p>
</section>
</section>
<section class="_135editor">
<section style="width:50%;margin: 0px auto;">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9naWYvN1FSVHZrSzJxQzVRRGRRSlBuR3hpYjRrMEplQlo0NHlrNFhySWhSbEN0TUFVY3dSTEVNWUdlWk03SUJpY1VoS1cxbHRnNGJYTUVqaWJZeHlsQWROQWdVUXcvMD93eF9mbXQ9Z2lm" data-ratio="1" data-width="100%"/>
</section>
<section style="width: 12px; height: 12px; background-color: #ffc81c; border-radius: 50%; box-sizing: border-box;"></section>
<section style="margin-top: -12px; margin-left: auto; width: 12px; height: 12px; background-color: #ffc81c; border-radius: 50%; box-sizing: border-box;"></section>
</section>
<section class="">
<section class="">
<p>
<br/>
</p>
</section>
<section class="_editor">
<p>
<br/>
</p>
</section>
<section class="_135editor">
<section>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-weight: normal; letter-spacing: 0.544px; text-align: justify; text-indent: 28px; color: #3F3F3F; font-size: 14px; display: inline !important; font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Apple Color Emoji&quot;, &quot;Emoji Symbols Font&quot;, &quot;Segoe UI Symbol&quot;, Arial, sans-serif;">作为社会主义接班人我们本应了解一些党的基本知识</span>
</p>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<br/>
</p>
</section>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<section style="text-align: center; width: auto; letter-spacing: 1px; line-height: 1.75em;">
<section style="width:100%;display: inline-block;" data-width="100%">
<section style="display: flex;justify-content: center;align-items: center;" class="">
<section style="width:2.8em;transform: scaleX(-1);-webkit-transform: scaleX(-1);-moz-transform: scaleX(-1);-o-transform: scaleX(-1);" class="">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%" class=""></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%" class=""></section>
</section>
<section style="display:inline-block;margin-left:5px;">
<section style="padding: 4px 1.5em 5px; background-image: url(&quot;https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphNUpYSkthelMxMTBDM0pBb2xBN2lhZ0I0WEZCRlpkQ0dhbW1EZDRFNWdTeHFZQURxdjlaalpYQS8w&quot;); background-repeat: no-repeat; text-align: center; background-size: 100% 100%; color: rgb(254, 255, 254); font-size: 16px; letter-spacing: 1.5px; box-sizing: border-box;" class="135brush" data-brushtype="text">
<span style="font-size: 14px;">中国共产党名字由来</span>
</section>
</section>
<section style="width:2.8em;margin-left:5px;">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%"></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%" class="">
<br/>
</section>
</section>
</section>
</section>
</section>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">最早提出中国共产党这一名称的是蔡和森1920年8月13日和9月16日正在留法勤工俭学的他在给毛泽东写的两封信中详细地研讨了共产党问题提出先要组织党共产党因为它是革命运动的发动者宣传者先锋队作战部</span>
</p>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<section style="width:98%;margin: 0px auto;" data-width="98%">
<section style="height: 0px;width: 0px;border-top:0px solid transparent;border-left:45px solid #c72936;border-bottom:45px solid transparent;margin-bottom: -45px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);"></section>
<section style="width: 100%;" data-width="100%" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzZWM2VXeldjSUwwdGlhSzFmekxlRnFvWENKOGVUdDg3Qlc3Y2w3WFVOeDVCQ2Y4ektZRkkzQzZIcm9waWFzakppY0FvMlhuYjdySjNuV3cvMD93eF9mbXQ9cG5n" data-width="100%" data-ratio="1"/>
</section>
<section style="height: 0px;width: 0px;border-top:0px solid transparent;border-right:45px solid #fefefe;border-top:45px solid transparent;float: right;margin-right: -5px; margin-top: -40px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);"></section>
</section>
</section>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<br/>
</p>
<section class="_135editor">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">他在对西欧各国共产党特别是俄国共产党考察的基础上提出了具体的建党步骤其中包括明目张胆正式成立一个中国共产党</span>
</p>
<p>
<br/>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">在此前后陈独秀在上海李大钊张申府在北京也通过信函讨论了党的名称问题决定采用共产党作为中国无产阶级政党的名称</span>
</p>
<p>
<br/>
</p><br/>
</section>
<section class="_135editor">
<section style="text-align: center; width: auto; letter-spacing: 1px; line-height: 1.75em;">
<section style="width:100%;display: inline-block;" data-width="100%">
<section style="display: flex;justify-content: center;align-items: center;" class="">
<section style="width:2.8em;transform: scaleX(-1);-webkit-transform: scaleX(-1);-moz-transform: scaleX(-1);-o-transform: scaleX(-1);" class="">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%"></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
</section>
<section style="display:inline-block;margin-left:5px;">
<section style="padding: 4px 1.5em 5px; background-image: url(&quot;https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphNUpYSkthelMxMTBDM0pBb2xBN2lhZ0I0WEZCRlpkQ0dhbW1EZDRFNWdTeHFZQURxdjlaalpYQS8w&quot;); background-repeat: no-repeat; text-align: center; background-size: 100% 100%; color: rgb(254, 255, 254); font-size: 16px; letter-spacing: 1.5px; box-sizing: border-box;" class="135brush" data-brushtype="text">
<span style="font-size: 14px;">建党节的由来</span>
</section>
</section>
<section style="width:2.8em;margin-left:5px;" class="">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%"></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%">
<br/>
</section>
</section>
</section>
</section>
</section>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">九十七年前的盛夏七月毛泽东陈独秀和李大钊等中国第一代马克思主义革命家在上海和嘉兴召开了中国共产党第一次代表大会中国共产党正式成立伟大的革命发展征程就此开启</span>
</p>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<section style="width:98%;margin: 0px auto;" data-width="98%">
<section style="height: 0px;width: 0px;border-top:0px solid transparent;border-left:45px solid #c72936;border-bottom:45px solid transparent;margin-bottom: -45px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);"></section>
<section style="width: 100%;" data-width="100%" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzZWM2VXeldjSUwwdGlhSzFmekxlRnFvWENKOGVUdDg3Qlc3Y2w3WFVOeDVCQ2Y4ektZRkkzQzZIcm9waWFzakppY0FvMlhuYjdySjNuV3cvMD93eF9mbXQ9cG5n" data-width="100%" data-ratio="0.5692307692307692"/>
</section>
<section style="height: 0px;width: 0px;border-top:0px solid transparent;border-right:45px solid #fefefe;border-top:45px solid transparent;float: right;margin-right: -5px; margin-top: -40px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);" class=""></section>
</section>
</section>
<section class="_135editor">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">在战争时期中共一大的召开日期难以考证因此毛泽东在著名文论论持久战中首次提出以七月一日作为党的生日</span>
</p>
<p>
<br/>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">建国之后经过党史工作者的细致考证确认中共一大的召开时间是 1921 7 23 7 1 日的建党节传统深入人心一直延续了下来</span>
</p>
</section>
<p>
<br/>
</p>
<p>
<br/>
</p>
<section class="_135editor">
<section style="text-align: center; width: auto; letter-spacing: 1px; line-height: 1.75em;">
<section style="width:100%;display: inline-block;" data-width="100%">
<section style="display: flex;justify-content: center;align-items: center;" class="">
<section style="width:2.8em;transform: scaleX(-1);-webkit-transform: scaleX(-1);-moz-transform: scaleX(-1);-o-transform: scaleX(-1);" class="">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%" class=""></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%" class=""></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%" class=""></section>
</section>
<section style="display:inline-block;margin-left:5px;">
<section style="padding: 4px 1.5em 5px; background-image: url(&quot;https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzY3aWM4TGd1QlNyTndaNlhwaGNBMlphNUpYSkthelMxMTBDM0pBb2xBN2lhZ0I0WEZCRlpkQ0dhbW1EZDRFNWdTeHFZQURxdjlaalpYQS8w&quot;); background-repeat: no-repeat; text-align: center; background-size: 100% 100%; color: rgb(254, 255, 254); font-size: 16px; letter-spacing: 1.5px; box-sizing: border-box;" class="135brush" data-brushtype="text">
<span style="font-size: 14px;">党建的四项基本要求</span>
</section>
</section>
<section style="width:2.8em;margin-left:5px;">
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%" class=""></section>
<section style="width: 80%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; margin: 5px 0px; box-sizing: border-box;" data-width="80%"></section>
<section style="width: 60%; height: 4px; background: rgb(212, 10, 17); border-radius: 6px; box-sizing: border-box;" data-width="60%"></section>
</section>
</section>
</section>
</section>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<section style="background:#eeeeee;">
<section data-autoskip="1" class="135brush" style="font-size: 14px; text-align: justify; letter-spacing: 1.5px; line-height: 1.75em; color: rgb(63, 62, 63); padding: 1em; box-sizing: border-box;">
<p style="letter-spacing: 1px; line-height: 1.75em;">
<strong><span style="font-size: 14px;">第一坚持党的基本路线</span></strong>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<strong><span style="font-size: 14px;">第二坚持解放思想实事求是与时俱进</span></strong>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<strong><span style="font-size: 14px;">第三坚持全心全意为人民服务</span></strong>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<strong><span style="font-size: 14px;">第四坚持民主集中制</span></strong>
</p>
</section>
</section>
<section style="text-align: right; margin-top: -18px; margin-right: 1em; letter-spacing: 1px; line-height: 1.75em;" class="">
<section style="width: 4em;height:4px;background: #c00000;display: inline-block;" class=""></section>
</section>
</section>
<p>
<br/>
</p>
<p>
<br/>
</p>
<section class="_135editor">
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-size: 15px;"><strong><span style="color: #c00000;">九十八年峥嵘岁月</span></strong></span>
</p>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-size: 15px;"><strong><span style="color: #c00000; font-size: 15px;">九十八年辉煌历程</span></strong></span>
</p>
<p>
<br/>
</p>
<p style="letter-spacing: 1px; line-height: 1.75em;">
<span style="font-size: 14px;">今天的我们挥舞着前辈们的伟大旗帜 ,追随着那从未熄灭的明灯,冲锋陷阵,高扬风帆,向着那彼岸,向着那未来更加执着而勇敢地前进, 前进 ,前进&nbsp;</span>
</p>
</section>
<p>
<br/>
</p>
<section class="_135editor">
<section style="text-align: center;" class="">
<section style="display: inline-block;width:3em;" class="">
<img style="width: 100%;display: block;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9naWYvN1FSVHZrSzJxQzdLUzZhNVBJdDVmQlB0V3M0QUFZVnRRRTE1RnQ1elIzRUhrYnRmWGJhSUF0VGliOUhtRDNIQU16clBPbk1QSVlhMkNmQ2hUcEtiaWJhZy8wP3d4X2ZtdD1naWY=" data-width="100%" data-ratio="1"/>
</section>
<section class="135brush" data-brushtype="text" style="text-align: center;letter-spacing: 1.5px;font-size: 14px;margin-top:-10px;color:#c00000;">
<span style="color: #c00000;"></span>-END-
</section>
</section>
</section>
<section class="_135editor">
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<br/>
</p>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-size: 13px;">排版丨135小编</span>
</p>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-size: 13px;">文案丨来源网络侵删</span>
</p>
<p style="text-align:center; letter-spacing: 1px; line-height: 1.75em;" align="center">
<span style="font-size: 13px;">图片丨来源网络侵删</span>
</p>
<p>
<br/>
</p>
</section>
<section class="_135editor">
<section style="padding-right: 2em; box-sizing: border-box;" class="">
<section style="width:2em;height:2em;background: #fefefe;overflow: hidden;margin-bottom: -2em;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);">
<section style="height:3em;border-left:2px solid #c00000;margin-left:12px;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);-o-transform: rotate(45deg);"></section>
</section>
<section style="box-sizing:border-box;border:2px solid #c00000;padding: 1em;" class="">
<section style="display: flex;justify-content:space-between;align-items: center;" class="">
<section style="width: 50%; text-align: left; font-size: 14px; letter-spacing: 1.5px; color: #c00000;" data-width="50%">
<section style="font-size: 14px;text-align: justify;letter-spacing: 1.5px;line-height: 1.75em;" class="">
<section data-autoskip="1" class="135brush" style="font-size: 14px;color: #c00000;letter-spacing: 2px;line-height: 1.75em;">
<p>
扫码关注
</p>
</section>
<section style="display: flex;justify-content:space-between;align-items: center;flex:1;margin:10px auto;" class="">
<section style="display: flex;justify-content:center;align-items: center;" class="">
<section data-bgless="spin" data-bgopacity="60%" style="width:4em;height:1.4em;background:rgba(222,69,69,0.40);" class=""></section>
<section data-bgless="spin" data-bgopacity="0%" style="width:3em;height:0.6em;background:#c00000;margin-left: -1em;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);" class=""></section>
</section>
</section>
<section data-autoskip="1" class="135brush" style="font-size: 14px;color: #c00000;letter-spacing: 2px;line-height: 1.75em;">
<p>
有趣的灵魂在等你
</p>
</section>
</section>
</section>
<section style="width: 45%;flex:1;margin-left:1em;margin-right: -3em;" data-width="45%" class="">
<img style="width: 100%; display: block; border: 5px solid rgb(192, 0, 0); height: 116px;" src="https://image2.135editor.com/cache/remote/aHR0cHM6Ly9tbWJpei5xbG9nby5jbi9tbWJpel9wbmcvN1FSVHZrSzJxQzZEZjRCeUQydWxJTmY3c3NxZTBLa3dPdGFBTjZkbGpFc0ZEbmZlRFRsUnBMaWFjbmN5eHg5WDFpYmljZkRQRW9zam1QZzcweFpTM2dLaWF3LzA=" data-ratio="1" data-width="100%" width="116" height="116"/>
</section>
</section>
</section>
</section>
</section>
</section>
<p>
<br/>
</p>`,
</section>`,
unStar: '/images/common/star.png',
star: '/images/common/star_light.png',
isStar: true,

7
pages/billboards/index.js

@ -1,4 +1,7 @@
// pages/billboards/index.js
import {AuthModel} from '../../models/auth.js'
let auth = new AuthModel()
Page({
/**
@ -12,7 +15,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
auth.fetchAuthToken(res => {
console.log(res)
})
},
onClickItem (e) {
const {index} = e.currentTarget.dataset

27
pages/home/index.js

@ -1,7 +1,9 @@
//index.js
//获取应用实例
const app = getApp()
import dayjs from '../../utils/dayjs/index.js'
import relativeTime from '../../utils/dayjs/relativeTime.js'
dayjs.extend(relativeTime);
import { HomeModel} from '../../models/home.js'
let homeModel = new HomeModel()
Page({
data: {
list: [
@ -26,7 +28,16 @@ Page({
]
},
onLoad: function () {
console.log(dayjs().toNow())
console.log(dayjs().from(dayjs('1990')))
this.fetchHomeList()
},
// 获取首页列表
fetchHomeList () {
homeModel.getHomeList(res => {
console.log('啦啦啦')
console.log(res)
})
},
tapSwiperItem (e) {
console.log(e.detail)
@ -38,10 +49,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({

13
utils/dayjs/index.js

File diff suppressed because one or more lines are too long

1
utils/dayjs/relativeTime.js

@ -0,0 +1 @@
!function (r, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : r.dayjs_plugin_relativeTime = t() }(this, function () { "use strict"; return function (r, t, e) { var n = t.prototype; e.en.relativeTime = { future: "%s", past: "%s", s: "刚刚", m: "一分钟前", mm: "%d分钟前", h: "1小时前", hh: "%d小时前", d: "1天前", dd: "%d天前", M: "1个月前", MM:"%d月前",y:"1年前",yy:"%d年前"};var o=function(r,t,n,o){for(var d,i,u=n.$locale().relativeTime,a=[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=a.length,s=0;s<f;s+=1){var l=a[s];l.d&&(d=o?e(r).diff(n,l.d,!0):n.diff(r,l.d,!0));var h=Math.round(Math.abs(d));if(h<=l.r||!l.r){1===h&&s>0&&(l=a[s-1]),i=u[l.l].replace("%d",h);break}}return t?i:(d>0?u.future:u.past).replace("%s",i)};n.to=function(r,t){return o(r,t,this,!0)},n.from=function(r,t){return o(r,t,this)};var d=function(r){return r.$u?e.utc():e()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}});

17
utils/http.js

@ -1,23 +1,28 @@
import { config } from '../config.js'
const Method = {
GET: 'GET',
POST: 'POST'
}
class HTTP {
constructor() {
this.baseUrl = config.api_url
}
request = (params) => {
let url = this.baseUrl + params.url
if (!params.method) {
params.method = 'GET'
params.method = Method.GET
}
console.log(params)
wx.request({
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()
@ -25,13 +30,15 @@ class HTTP {
if (startCode == '2') {
params.success && params.success(res.data)
} else {
console.log('请求错误')
params.error && params.error(res)
}
},
fail: function (res) {
console.log('服务器错误')
params.fail && params.fail(res)
},
})
}
}
export {HTTP}
export { HTTP, Method }

Loading…
Cancel
Save