Skip to content

Commit cfe6057

Browse files
committed
更新部分功能,更新个人中心样式
1 parent 2d9982e commit cfe6057

157 files changed

Lines changed: 4471 additions & 529 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ App({
1818
var logs = wx.getStorageSync('logs') || []
1919
logs.unshift(Date.now())
2020
wx.setStorageSync('logs', logs)
21-
22-
23-
2421
},
22+
2523
getUserInfo:function(cb){
2624
var that = this
2725
if(this.globalData.userInfo){

app.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"pages/readlog/readlog",
1111
"pages/hot/hot",
1212
"pages/webpage/webpage",
13+
"pages/usercenter/usercenter",
1314
"pages/comments/comments",
1415
"pages/poster/poster"
1516
],
@@ -37,15 +38,9 @@
3738
"iconPath": "images/tar-topic.png",
3839
"selectedIconPath": "images/tar-topic-on-2.png",
3940
"text": "专题"
40-
},
41-
{
42-
"pagePath": "pages/about/about",
43-
"iconPath": "images/tar-about.png",
44-
"selectedIconPath": "images/tar-about-on-2.png",
45-
"text": "服务"
46-
},
41+
},
4742
{
48-
"pagePath": "pages/readlog/readlog",
43+
"pagePath": "pages/usercenter/usercenter",
4944
"iconPath": "images/tar-person.png",
5045
"selectedIconPath": "images/tar-person-on-2.png",
5146
"text": "我的"
@@ -58,12 +53,6 @@
5853
"uploadFile": 10000,
5954
"downloadFile": 10000
6055
},
61-
"plugins": {
62-
"tencentvideo": {
63-
"version": "1.2.2",
64-
"provider": "wxa75efa648b60994b"
65-
}
66-
},
6756
"navigateToMiniProgramAppIdList": [
6857
"wxb6bde4eeb2d43820"
6958
]

app.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
@import "vendor/ZanUI/index.wxss";
13+
@import "vendor/dist/index.wxss";
1314

1415
.container {
1516
padding: 0 28rpx;

pages/about/about.js

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -272,35 +272,30 @@ Page({
272272
});
273273

274274

275-
}).then(res =>{
276-
var getAllPraiseRequest = wxRequest.getRequest(Api.getAllPraiseUrl());
277-
getAllPraiseRequest.then(response =>{
278-
279-
if (response.data.status == '200') {
280-
281-
var _avatarurls = response.data.avatarurls;
282-
var avatarurls = [];
283-
for (var i = 0; i < _avatarurls.length; i++) {
284-
var avatarurl = "../../images/gravatar.png";
285-
if (_avatarurls[i].avatarurl.indexOf('wx.qlogo.cn') != -1) {
286-
avatarurl = _avatarurls[i].avatarurl;
287-
}
288-
avatarurls[i] = avatarurl;
289-
}
290-
291-
self.setData({
292-
praiseList: avatarurls
293-
});
294-
295-
}
296-
else {
297-
console.log(response);
298-
}
299-
300-
301-
})
275+
})
276+
//.then(res =>{
277+
//var getAllPraiseRequest = wxRequest.getRequest(Api.getAllPraiseUrl());
278+
//getAllPraiseRequest.then(response =>{
279+
// if (response.data.status == '200') {
280+
// var _avatarurls = response.data.avatarurls;
281+
// var avatarurls = [];
282+
// for (var i = 0; i < _avatarurls.length; i++) {
283+
// var avatarurl = "../../images/gravatar.png";
284+
// if (_avatarurls[i].avatarurl.indexOf('wx.qlogo.cn') != -1) {
285+
// avatarurl = _avatarurls[i].avatarurl;
286+
// }
287+
// avatarurls[i] = avatarurl;
288+
// }
289+
// self.setData({
290+
// praiseList: avatarurls
291+
// });
292+
// }
293+
// else {
294+
// console.log(response);
295+
// }
296+
//})
302297

303-
})
298+
//})
304299
.then(res =>{
305300
if (!app.globalData.isGetOpenid) {
306301
// auth.getUsreInfo();

pages/about/about.wxml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@
1515
<import src="../../templates/login-popup.wxml" />
1616

1717
<view class="container" style="display:{{display}}">
18-
<template is="tempHeader" />
18+
<template is="tempHeader" />
1919

20-
<view class="wrapper">
21-
<view class="excerpt">
22-
<!-- <rich-text nodes="{{pageData.content.rendered}}"></rich-text> -->
23-
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
20+
<view class="wrapper">
21+
<view class="excerpt">
22+
<!-- <rich-text nodes="{{pageData.content.rendered}}"></rich-text> -->
23+
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
2424

25-
</view>
26-
<template is="login-popup" data="{{show: isLoginPopup, userInfo: userInfo}}"></template>
27-
28-
<view style='text-align:center'>
29-
<button class="gotowebpage-button" formType="submit" size="mini" bindtap="gotowebpage">打开官网</button>
30-
<modal title="{{dialog.title}}" hidden="{{dialog.hidden}}" no-cancel bindconfirm="confirm">{{dialog.content}}</modal>
31-
</view>
3225
</view>
33-
34-
<view class="copyright">
35-
<template is="tempCopyright" />
26+
<template is="login-popup" data="{{show: isLoginPopup, userInfo: userInfo}}"></template>
27+
28+
<view style='text-align:center'>
29+
<button class="gotowebpage-button" formType="submit" size="mini" bindtap="gotowebpage">打开官网</button>
30+
<modal title="{{dialog.title}}" hidden="{{dialog.hidden}}" no-cancel bindconfirm="confirm">{{dialog.content}}</modal>
3631
</view>
32+
</view>
33+
34+
<view class="copyright">
35+
<template is="tempCopyright" />
36+
</view>
3737

3838
</view>

pages/detail/detail.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ var wxRequest = require('../../utils/wxRequest.js')
2222
var app = getApp();
2323
let isFocusing = false
2424
const pageCount = config.getPageCount;
25-
const TxvContext = requirePlugin("tencentvideo");
25+
26+
//const TxvContext = requirePlugin("tencentvideo");
27+
2628
import {
2729
ModalView
2830
} from '../../templates/modal-view/modal-view.js'
@@ -77,12 +79,12 @@ Page({
7779
this.getEnableComment();
7880
this.fetchDetailData(options.id);
7981
new ModalView;
80-
81-
this.txvContext = txvContext.getTxvContext('txv0');
82+
//this.txvContext = txvContext.getTxvContext('txv0');
8283
},
84+
8385
onShow: function(options) {
84-
8586
},
87+
8688
showLikeImg: function() {
8789
var self = this;
8890
var flag = false;

pages/detail/detail.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"usingComponents": {
3-
"txv-video": "plugin://tencentvideo/video"
4-
}
2+
53
}

pages/detail/detail.wxml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@
4848

4949
<view class="container" style='padding: 0 28rpx'>
5050
<view class="container" style='padding:0;'>
51-
52-
<!-- 输出文章内的视频,wx:if为条件判断,如果有视频vid则显示,无则不显示 -->
53-
<view class='video_st'>
54-
<block wx:if="{{detail.wexinvideovid}}">
55-
<txv-video vid="{{detail.wexinvideovid}}" playerid="{{detail.wexinvideovid}}" autoplay=""></txv-video>
56-
</block>
57-
</view>
58-
5951
<view class="content-article-detail" style="display:{{display}}">
6052
<view class="entry-summary">
6153
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
@@ -104,11 +96,16 @@
10496
<view catchtap="clickLike" id="likebottom" class="likebtt">
10597
<text>点赞支持</text>
10698
</view>
107-
108-
<!--<view class="relatedTitle">
109-
点赞支持 (点击❤支持一下)
110-
</view>
111-
<view class="entry-gap-zan"></view>-->
99+
<!--
100+
<view catchtap="downimageTolocal" class="likebtt">
101+
<text>分享海报</text>
102+
</view>
103+
104+
<view class="relatedTitle">
105+
点赞支持 (点击❤支持一下)
106+
</view>
107+
<view class="entry-gap-zan"></view>
108+
-->
112109

113110
<view class="likeText">
114111
<block wx:key="id" wx:for="{{likeList}}">

pages/index/index.js

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var {
2020
vPush
2121
} = getApp();
2222
var app = getApp();
23-
const TxvContext = requirePlugin("tencentvideo");
23+
//const TxvContext = requirePlugin("tencentvideo");
2424
//let txvContext = TxvContext.getTxvContext('txv1') // txv1即播放器组件的playerid值
2525

2626
Page({
@@ -112,26 +112,25 @@ Page({
112112
}
113113

114114
},
115-
// onLoad: function(options) {
116-
// var self = this;
117-
// this.fetchTopFivePosts();
118-
// self.setData({
119-
// topNav: config.getIndexNav
120-
// });
121-
// },
122-
123-
onLoad: function (options) {
115+
// onLoad: function(options) {
116+
// var self = this;
117+
// this.fetchTopFivePosts();
118+
// self.setData({
119+
// topNav: config.getIndexNav
120+
// });
121+
// },
122+
123+
onLoad: function(options) {
124124
var that = this;
125125
wx.request({
126126
//url: 'https://www.yeehee.cn/wp-json/watch-life-net/v1/post/static',
127-
success: function (res) {
127+
success: function(res) {
128128
var statics = res.data.static;
129129
that.setData({
130130
statics: statics,
131131
})
132132
},
133-
fail: function () {
134-
}
133+
fail: function() {}
135134
})
136135

137136
var that = this;
@@ -142,8 +141,6 @@ Page({
142141
that.setData({
143142
topNav: config.getIndexNav
144143
});
145-
//this.txvContext = txvContext.getTxvContext('txv1');
146-
147144
},
148145

149146
/* vPush推送绑定事件 */
@@ -508,5 +505,31 @@ Page({
508505
wx.switchTab({
509506
url: url
510507
});
508+
},
509+
510+
//设置首页咨询按钮点击事件:当用户点击咨询按钮时,自动推送一条消息给管理员
511+
notifyAdmin: function() {
512+
console.log('[*] 用户咨询,开始通知管理员。');
513+
wx.request({
514+
url: 'https://cloud.safedog.cc/vpush/functions/PUSH_API',
515+
method: 'POST',
516+
dataType: 'json',
517+
header: {
518+
'Content-Type': "application/json",
519+
"X-Parse-Application-Id": "guren_cloud_vpush"
520+
},
521+
data: {
522+
"id": "KgLSnOmGdS",
523+
"secret": "448c2-1001c-ba07c-13bed",
524+
"path": "pages/index/index",
525+
// 这里填写管理员的openId
526+
"openId": "oRM4C0fPs_4PiCL9WStRkHj1kGek",
527+
"data": [
528+
"叶赫先生",
529+
new Date().toLocaleDateString(),
530+
"有用户点击了反馈按钮,请前往客服系统mpkf.weixin.qq.com进行查看!"
531+
]
532+
}
533+
})
511534
}
512535
})

pages/index/index.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"enablePullDownRefresh": true,
33
"usingComponents": {
44
"vpush-view": "/utils/vpush/view",
5-
"vpush-nav": "/utils/vpush/navigation",
6-
"txv-video": "plugin://tencentvideo/video"
5+
"vpush-nav": "/utils/vpush/navigation"
76
}
87
}

0 commit comments

Comments
 (0)