├── .gitignore
├── miniprogram
├── pages
│ ├── code
│ │ ├── web
│ │ │ ├── index.wxss
│ │ │ ├── index.wxml
│ │ │ ├── index.json
│ │ │ └── index.js
│ │ └── article
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── index.js
│ └── pyq
│ │ ├── edit
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
│ │ └── circle
│ │ ├── detail.json
│ │ ├── index.json
│ │ ├── detail.wxml
│ │ ├── index.wxss
│ │ ├── detail.wxss
│ │ ├── index.wxml
│ │ ├── detail.js
│ │ └── index.js
├── image
│ ├── md
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ └── qrcode.jpg
│ └── pyq
│ │ ├── 1.jpg
│ │ ├── ng.jpg
│ │ ├── dd-icon.png
│ │ └── love-icon.png
├── lib
│ └── iconfont
│ │ ├── iconfont.woff
│ │ └── iconfont.wxss
├── sitemap.json
├── app.json
├── project.config.json
├── app.js
└── app.wxss
├── cloudfunctions
├── msgCheck
│ ├── config.json
│ ├── package.json
│ └── index.js
├── chat
│ ├── package.json
│ ├── index.js
│ └── package-lock.json
├── wxparse
│ ├── package.json
│ ├── index.js
│ └── package-lock.json
└── login
│ └── index.js
├── README.md
└── project.config.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
--------------------------------------------------------------------------------
/miniprogram/pages/code/web/index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/code/web/index.wxss */
--------------------------------------------------------------------------------
/miniprogram/pages/code/web/index.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/code/article/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/image/md/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/md/1.png
--------------------------------------------------------------------------------
/miniprogram/image/md/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/md/2.png
--------------------------------------------------------------------------------
/miniprogram/image/md/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/md/3.png
--------------------------------------------------------------------------------
/miniprogram/image/pyq/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/pyq/1.jpg
--------------------------------------------------------------------------------
/miniprogram/pages/code/web/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationStyle": "custom"
4 | }
--------------------------------------------------------------------------------
/miniprogram/image/pyq/ng.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/pyq/ng.jpg
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/edit/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "发布"
4 | }
--------------------------------------------------------------------------------
/miniprogram/image/md/qrcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/md/qrcode.jpg
--------------------------------------------------------------------------------
/miniprogram/image/pyq/dd-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/pyq/dd-icon.png
--------------------------------------------------------------------------------
/miniprogram/image/pyq/love-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/image/pyq/love-icon.png
--------------------------------------------------------------------------------
/miniprogram/lib/iconfont/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chenaey/circleDemo/HEAD/miniprogram/lib/iconfont/iconfont.woff
--------------------------------------------------------------------------------
/cloudfunctions/msgCheck/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | "security.msgSecCheck",
5 | "security.imgSecCheck"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/miniprogram/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "全文",
4 | "navigationStyle": "custom",
5 | "navigationBarTextStyle": "white",
6 | "enablePullDownRefresh": true
7 | }
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "navigationBarTextStyle": "white",
6 | "navigationBarTitleText": "仲恺校友圈",
7 | "navigationStyle": "custom"
8 | }
--------------------------------------------------------------------------------
/cloudfunctions/chat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chat",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "latest"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/cloudfunctions/msgCheck/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "msgCheck",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "latest"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/wxparse/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wxparse",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "we-extract": "^1.2.10",
13 | "wx-server-sdk": "latest"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/miniprogram/pages/code/web/index.js:
--------------------------------------------------------------------------------
1 | // pages/code/web/index.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | src: undefined
9 |
10 | },
11 |
12 |
13 | onLoad: function(options) {
14 | console.log(options)
15 | this.setData({
16 | src: options.src
17 | })
18 | },
19 |
20 |
21 | onShareAppMessage: function() {
22 |
23 | }
24 | })
--------------------------------------------------------------------------------
/cloudfunctions/wxparse/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 |
6 | // 云函数入口函数
7 | exports.main = async(event, context) => {
8 | const wxContext = cloud.getWXContext()
9 | const extract = require('we-extract').extract
10 |
11 | const {
12 | url
13 | } = event;
14 |
15 | const data = await extract(url)
16 | return {
17 | data,
18 | }
19 | }
--------------------------------------------------------------------------------
/miniprogram/pages/code/article/index.wxml:
--------------------------------------------------------------------------------
1 | {{html.msg_title}}
2 |
3 | 原创:
4 | {{html.msg_author}}
5 | {{html.account_name}}
6 | {{html.msg_publish_time_str}}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloudfunctions/login/index.js:
--------------------------------------------------------------------------------
1 | // 云函数模板
2 | // 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署”
3 |
4 | /**
5 | * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端
6 | *
7 | * event 参数包含
8 | * - 小程序端调用传入的 data
9 | * - 经过微信鉴权直接可信的用户唯一标识 openid
10 | *
11 | */
12 | exports.main = (event, context) => {
13 | console.log(event)
14 | console.log(context)
15 |
16 | // 可执行其他自定义逻辑
17 | // console.log 的内容可以在云开发云函数调用日志查看
18 |
19 | return {
20 | openid: event.userInfo.openId,
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/pyq/circle/index",
4 | "pages/pyq/circle/detail",
5 | "pages/pyq/edit/index",
6 | "pages/code/web/index",
7 | "pages/code/article/index"
8 | ],
9 | "window": {
10 | "backgroundTextStyle": "dark",
11 | "navigationBarBackgroundColor": "#fff",
12 | "navigationBarTitleText": "仲恺微校园",
13 | "navigationBarTextStyle": "black"
14 | },
15 | "networkTimeout": {
16 | "request": 30000,
17 | "uploadFile": 30000,
18 | "downloadFile": 80000
19 | },
20 | "cloud": true,
21 | "sitemapLocation": "sitemap.json"
22 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 仿微信朋友圈
2 |
3 | ## 后端基于微信云开发
4 |
5 | ## 实现功能
6 | - [X] 发布"朋友圈"
7 | - [X] 信息标签管理
8 | - [X] 管理员端置顶、删除
9 | - [X] 文字内容安全检测 //云开发api
10 | - [X] 解析公众号文章链接 //wxparse
11 |
12 | ## 在线示例
13 | 
14 | ## 本地运行
15 |
16 | 1. `git clone https://github.com/chenaey/circleDemo.git`
17 | 2. 在微信开发者工具中打开项目文件
18 | 3. 开通云开发
19 | 4. 将appid填写为你的appid
20 | 5. 手动建立如下数据库集合
21 | `circle`
22 | `circleback` //数据备份
23 | 6. 在云开发存储创建存储用户上传图片文件夹 `circle`
24 | 7. 上传并部署云函数,选择云端安装依赖或者本地安装`npm install`
25 | 8. 大功告成
26 |
27 |
28 | ## 页面截图
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/cloudfunctions/msgCheck/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 |
6 | // 云函数入口函数
7 | exports.main = async(event, context) => {
8 |
9 | const {
10 | type,
11 | } = event;
12 |
13 | // 订单文档的status 0 未支付 1 已支付 2 已关闭
14 | switch (type) {
15 |
16 | case "text":
17 | try {
18 | var result = await cloud.openapi.security.msgSecCheck({
19 | content: event.content
20 | })
21 | return result
22 | } catch (err) {
23 | return err
24 | }
25 |
26 | case "img":
27 | try {
28 | var result = await cloud.openapi.security.imgSecCheck({
29 | media: {
30 | contentType: event.contentType,
31 | value: event.media
32 | }
33 | })
34 | return result
35 | } catch (err) {
36 | return err
37 | }
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/miniprogram/pages/code/article/index.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background-color: #fff;
3 | }
4 |
5 | .title {
6 | display: flex;
7 | flex-direction: row;
8 | font-weight: 600;
9 | font-size: 34rpx;
10 | padding: 32rpx 20rpx;
11 | }
12 |
13 | .copyright {
14 | color: #999;
15 | font-size: 28rpx;
16 | padding-right: 10rpx;
17 | }
18 |
19 | .time_str {
20 | color: #999;
21 | font-size: 28rpx;
22 | }
23 |
24 | .row {
25 | display: flex;
26 | flex-direction: row;
27 | margin-left: 16rpx;
28 | font-size: 34rpx;
29 | padding-bottom: 32rpx;
30 | }
31 |
32 | .author {
33 | color: #576b95;
34 | font-size: 28rpx;
35 | padding-right: 16rpx;
36 | }
37 |
38 | .account_name {
39 | color: #576b95;
40 | font-size: 28rpx;
41 | padding-right: 16rpx;
42 | }
43 |
44 | .rich_pages {
45 | max-width: 100%;
46 | height: auto;
47 | }
48 |
49 | .bottom {
50 | padding-bottom: 32rpx;
51 | }
52 |
--------------------------------------------------------------------------------
/miniprogram/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true,
12 | "autoAudits": false,
13 | "coverView": true
14 | },
15 | "compileType": "miniprogram",
16 | "libVersion": "2.7.7",
17 | "appid": "wxa596944194794d5b",
18 | "projectname": "zhku_app",
19 | "debugOptions": {
20 | "hidedInDevtools": []
21 | },
22 | "isGameTourist": false,
23 | "simulatorType": "wechat",
24 | "simulatorPluginLibVersion": {},
25 | "condition": {
26 | "search": {
27 | "current": -1,
28 | "list": []
29 | },
30 | "conversation": {
31 | "current": -1,
32 | "list": []
33 | },
34 | "game": {
35 | "currentL": -1,
36 | "list": []
37 | },
38 | "miniprogram": {
39 | "current": -1,
40 | "list": []
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/miniprogram/pages/code/article/index.js:
--------------------------------------------------------------------------------
1 | // pages/code/article/index.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function(options) {
15 | //https://mp.weixin.qq.com/s/jmUr8514yhZn4mSCg79pEw
16 | var that = this
17 | wx.showLoading({
18 | title: '加载中',
19 | })
20 | wx.cloud.callFunction({
21 | name: "wxparse",
22 | data: {
23 | url: options.url
24 | }
25 | }).then(res => {
26 | console.log(res)
27 | wx.setNavigationBarTitle({
28 | title: res.result.data.data.msg_title,
29 | })
30 | // res.result.data.data.msg_content = res.result.data.data.msg_content.replace(/data-src=/gi, 'src=')
31 | res.result.data.data.msg_content = res.result.data.data.msg_content.replace(/data-src=/gi, 'src=').replace(/
{
18 | if (res.authSetting['scope.userInfo']) {
19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
20 | wx.getUserInfo({
21 | success: res => {
22 | // 可以将 res 发送给后台解码出 unionId
23 | this.globalData.userInfo = res.userInfo
24 |
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | if (this.userInfoReadyCallback) {
28 | this.userInfoReadyCallback(res)
29 | }
30 | }
31 | })
32 | }
33 | },
34 |
35 | getUserInfo: function(e) {
36 | app.globalData.userInfo = e.detail.userInfo
37 | this.setData({
38 | userInfo: e.detail.userInfo,
39 | hasUserInfo: true
40 | })
41 | },
42 |
43 |
44 | })
45 |
46 |
47 |
48 | },
49 | globalData: {
50 | userInfo: null,
51 |
52 | },
53 |
54 | })
--------------------------------------------------------------------------------
/cloudfunctions/chat/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 | cloud.init()
4 |
5 | // 云函数入口函数
6 | exports.main = async(event, context) => {
7 | const wxContext = cloud.getWXContext()
8 | const db = cloud.database()
9 | const _ = db.command
10 | const {
11 | type,
12 | userInfo,
13 | collectionname,
14 | data //{_id,username}
15 | } = event;
16 |
17 | const loveCollection = db.collection(collectionname);
18 | switch (type) {
19 | case "zan":
20 | return await loveCollection.doc(data._id).update({
21 | data: {
22 | zans: _.push({
23 | openid: wxContext.OPENID,
24 | name: data.username,
25 | createTime: db.serverDate()
26 | })
27 | }
28 | })
29 |
30 | case "comment":
31 | return await loveCollection.doc(data._id).update({
32 | data: {
33 | comments: _.push({
34 | openid: wxContext.OPENID,
35 | comment: data.comment,
36 | createTime: db.serverDate(),
37 | username: data.username,
38 | userInfo: data.userInfo,
39 | toName: data.toName
40 | })
41 | }
42 | })
43 |
44 | case "delete":
45 | const result = cloud.deleteFile({
46 | fileList: data.fileIDs,
47 | })
48 | return await loveCollection.doc(data._id).remove()
49 |
50 | case "top":
51 | return await loveCollection.doc(data._id).update({
52 | data: {
53 | isTop: data.isTop
54 | },
55 | })
56 |
57 |
58 | }
59 |
60 | // return {
61 | // event,
62 | // openid: wxContext.OPENID,
63 | // appid: wxContext.APPID,
64 | // unionid: wxContext.UNIONID,
65 | // }
66 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "miniprogram/",
3 | "cloudfunctionRoot": "cloudfunctions/",
4 | "setting": {
5 | "urlCheck": true,
6 | "es6": true,
7 | "postcss": true,
8 | "minified": true,
9 | "newFeature": true,
10 | "coverView": true,
11 | "nodeModules": false,
12 | "autoAudits": true,
13 | "uglifyFileName": true,
14 | "checkInvalidKey": true,
15 | "checkSiteMap": true,
16 | "uploadWithSourceMap": true,
17 | "babelSetting": {
18 | "ignore": [],
19 | "disablePlugins": [],
20 | "outputPath": ""
21 | }
22 | },
23 | "appid": "wx1175ead082aa773e",
24 | "projectname": "ksb_open",
25 | "libVersion": "2.8.0",
26 | "compileType": "miniprogram",
27 | "simulatorType": "wechat",
28 | "simulatorPluginLibVersion": {},
29 | "condition": {
30 | "search": {
31 | "current": -1,
32 | "list": []
33 | },
34 | "conversation": {
35 | "current": -1,
36 | "list": []
37 | },
38 | "plugin": {
39 | "current": -1,
40 | "list": []
41 | },
42 | "game": {
43 | "list": []
44 | },
45 | "miniprogram": {
46 | "current": 6,
47 | "list": [
48 | {
49 | "id": -1,
50 | "name": "pages/doc/list",
51 | "pathName": "pages/doc/list",
52 | "query": "",
53 | "scene": null
54 | },
55 | {
56 | "id": -1,
57 | "name": "pages/doc/index",
58 | "pathName": "pages/doc/index",
59 | "query": "",
60 | "scene": null
61 | },
62 | {
63 | "id": -1,
64 | "name": "pages/doc/show",
65 | "pathName": "pages/doc/show",
66 | "query": "",
67 | "scene": null
68 | },
69 | {
70 | "id": -1,
71 | "name": "pages/home/index/index",
72 | "pathName": "pages/home/index/index",
73 | "query": "",
74 | "scene": null
75 | },
76 | {
77 | "id": -1,
78 | "name": "pages/pyq/edit/index",
79 | "pathName": "pages/pyq/edit/index",
80 | "query": "",
81 | "scene": null
82 | },
83 | {
84 | "id": -1,
85 | "name": "pages/code/article/index",
86 | "pathName": "pages/code/article/index",
87 | "query": "",
88 | "scene": null
89 | },
90 | {
91 | "id": -1,
92 | "name": "pages/pyq/edit/index",
93 | "pathName": "pages/pyq/edit/index",
94 | "scene": null
95 | }
96 | ]
97 | }
98 | }
99 | }
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/edit/index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/edit/edit.wxss */
2 |
3 | page {
4 | line-height: 1.6;
5 | font-family: -apple-system-font, Helvetica Neue, sans-serif;
6 | }
7 |
8 | .tab {
9 | display: flex;
10 | flex-direction: row;
11 | flex-wrap: wrap;
12 | font-family: Arial, sans-serif;
13 | color: #4c5154;
14 | justify-content: space-around;
15 | background-color: #fff;
16 | padding: 8rpx 8rpx 38rpx 22rpx;
17 | font-size: 28rpx;
18 | border-bottom: 2rpx solid #f7f7f7;
19 | }
20 |
21 | .tab-tip {
22 | padding-left: 32rpx;
23 | padding-bottom: 18rpx;
24 | padding-top: 20rpx;
25 | font-size: 32rpx;
26 | }
27 |
28 | .tab-se {
29 | color: #fff;
30 | background-color: #06ad56;
31 | padding: 2rpx 10rpx;
32 | }
33 |
34 | .tab-no {
35 | background-color: #fff;
36 | color: #4c5154;
37 | padding: 2rpx 10rpx;
38 | }
39 |
40 | .edit-header {
41 | display: flex;
42 | align-items: center;
43 | padding: 0 30rpx;
44 | height: 30pt;
45 | font-size: 11pt;
46 | }
47 |
48 | .header-delive {
49 | position: absolute;
50 | right: 32rpx;
51 | border-radius: 0;
52 | font-size: 28rpx;
53 | font-weight: 600;
54 | background-color: #06ad56;
55 | color: #fff;
56 | }
57 |
58 | .header-cancel {
59 | position: absolute;
60 | left: 32rpx;
61 | border-radius: 0;
62 | font-size: 28rpx;
63 | background-color: #fff;
64 | }
65 |
66 | .edit-main, .edit-footer {
67 | padding: 32rpx;
68 | }
69 |
70 | .edit-text {
71 | min-height: 180rpx;
72 | overflow-y: scroll;
73 | font-size: 28rpx;
74 | line-height: 20pt;
75 | color: #353535;
76 | width: 100%;
77 | }
78 |
79 | .article-main {
80 | display: flex;
81 | flex-direction: column;
82 | padding-left: 32rpx;
83 | padding-right: 32rpx;
84 | }
85 |
86 | .article-text {
87 | font-size: 28rpx;
88 | line-height: 20pt;
89 | color: #353535;
90 | width: 100%;
91 | padding: 12rpx 12rpx 12rpx 0;
92 | border-bottom: 2rpx solid #ececec;
93 | }
94 |
95 | .article {
96 | display: flex;
97 | flex-direction: row;
98 | font-size: 28rpx;
99 | align-content: center;
100 | padding-left: 32rpx;
101 | padding-right: 32rpx;
102 | }
103 |
104 | .msg_cover {
105 | width: 92rpx;
106 | height: 92rpx;
107 | padding-right: 10rpx;
108 | }
109 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/edit/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 图片上传
17 | {{files.length}}/9
18 |
19 |
20 | 长按删除
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 选择标签
42 |
43 |
44 | {{item.name}}
45 |
46 |
47 |
48 |
49 | 选择身份
50 |
51 |
52 | {{item.name}}
53 |
54 |
55 |
56 |
57 | 插入公众号文章
58 |
59 |
60 |
61 |
62 |
63 |
64 | {{article.title}}
65 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/detail.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{item.name}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {{itemName.userInfo.nickName}}
26 |
27 |
28 | {{itemName.content}}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | {{itemName.time}}
40 | {{itemName.tab}}
41 |
42 | 删除
43 | 置顶
44 | 删除
45 |
46 |
47 |
48 |
49 |
50 | 赞
51 | 留言
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {{itemName.zanText}}
64 |
65 |
66 |
67 |
68 |
69 |
70 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
104 |
--------------------------------------------------------------------------------
/miniprogram/lib/iconfont/iconfont.wxss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "iconfont";
3 | src: url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAzAAAsAAAAAEdAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ykivY21hcAAAAYAAAADLAAACmpXX0rtnbHlmAAACTAAAB+EAAAm0xOZBC2hlYWQAAAowAAAAMQAAADYUSnnIaGhlYQAACmQAAAAeAAAAJAkRBMRobXR4AAAKhAAAABcAAABERTT//mxvY2EAAAqcAAAAJAAAACQUcBaybWF4cAAACsAAAAAfAAAAIAEhAINuYW1lAAAK4AAAAUUAAAJtPlT+fXBvc3QAAAwoAAAAlgAAANLhsMjNeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkEWKcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTxbxdzwv4EhhrmR4QpQmBEkBwDymAz0eJzlkr0NAjEMRl+44x+O1BQcokNiB1agpGIiBqCnuzmoqJjiWwPsmArBBDh6kWwnluXPQB+ojJ1RQ7qTcLtZNJV4xaTEay7mL8keUaVGWa222uugo04666ru+QRRcqtvuR+WrO66nM3H8Q5HTJkxtg4SDT0WDKynOUPrJNvnwc+6/2Ozcj/eXnYVAldYKbBJol5gM0VV4L/VBDZnlAPfCK0C3wa1Af52G+D19oEpgw6BaYSOgW+QToHphs6BKYiugW+huoD8Aj8iS9gAeJxNVn1sFMcVnzezO3t732ff7do+3513z7cH/riL7273sI0XDNhgAwWbD5OQhAAVTgOIFCP6R0gIISgoCRKEP0gUotKk4qPQj/yRSEUUk0gNitq0SlMahwKJVAxVpaqoSYva4r2+PZsW3dybNzPvzb15H793hBNSaRMIayOc1JAk6SAF0k1IhiuqDVnGiaQQ1SJlgzCDZJHBJSdQsMoPdUIpmwMzB2mdR5VM2oaCEuW6AZL46Nsn14n/uup8KYqgXb0Kmsid65+PVwiuyfg44FwhzlvxJggJ3FPriTc1wea5oBd0HGf9P/LjoPtE58urD9xxr/cB5XG8DH6jxdWwwJjANVObW6/rRU0jhFD8EvYkvU0UohMChi7xqJqEspICxaZ5MLKWwbieNUplq6AqUfqd1ROrV65cdnkVFT7xN9WB7woTbP+u3tO9PT0uocdWrkSRAb8tsCs+qGvyfyLQVZedu9PHSMj071aeZ79iMfRkK/pQs8GMlIy0pvNYJKqoRZVphSRFPkjTmmim9Rw1IzbQXkgoTSl1apGaSqk/gLfpBSWbCodTWcX52rmw1V1AzyFIqXDTlXAa1RScZvmqQKMyKxmemHB5uJnrce0Qqnbgh/hIAzEwogSSoHIqGTRrQzkIblCVQhnDmQMJj3AnBzNHuEQmB5QcfI/5b31rxaSfvXfwnS8EBbo1HuYadCvCF+9YAwAD1jQd3kbptuEqZfPZuwdOOT8fXAqLTx54d6Fw5cSk872oKMbg4OSJK/f+p2MN9N7XQVr13e/ZB6yF5EjejVk2wzBuTAxCChhXyhnRNTgP1jxQeDtYRtZoVsUkFLNlK9vBLjLZ+XS3UCPsdj6VRX6rj4Y8IIAgeASJWjWhsPhr52uQvd+9I0DPT51/0MPPeG5xCpMyNECdx+P8uQEi/LIzIfvE429RxuW/yD6f0By6BDWyqCfHIdB0mXsIq1TQwUDfJ40kg7aSCBpk9UDJKmoFBUPLMdyGWTLRvqwh2lAy3OqQ7jPhwF5JkNlCWRDke7+QBRAHBwT61SzTHDLNSnWyYGco8Jzke9mVmfqZSzvneDjKLQNzpYkDZuaZWO8VixjrFOZcmSxE36V1Iw9Ylph3IQhCK+hciqCnNMUqR3IAOWrTatCZHoQktd0azhQLVsnIpoMQVYQbnweigia3xp2n4i2yJkb93+gdQPO68IpeAOiYen39a/36vnNnNgI7+dzisTnxLS8dWE73T3XdCEWjIZfQ3wb9G+pTqfon/IG8PjWcboe8Tn+i56f6YePpc/vS/a+tf/YU9S8/8NKWeHlsyab916PJKACSmVw4x1oxf1V8Dzp02r1RDhEXYbIRF2vY0XtXvcGglxlInWeCsQBAIBaE0WAsiAPOPnBcvfPH7BQbJEVSwjstRS0omOsSN7KY9LhUuBQE1wFZwyrj0N0Dl89BeXoH/r3xQ79geD1r60VD8832sZwnADxw9ul2+soOEzxiQqPtYdpaXx8fpKEICIrw8GU233voRJctvLm5wT8/PuiHcHM0CclinzQ33TBHCqV83Q+J3RC40E/zUaqFI1PxGSypsL0MyFyyG7EEyxMTDQuziF9MfhODhbVruEYnMMgIb2ox6U74ctyTYlxBl1ll0zIkDR+JatOaeFM6V32YWbJwr6qUwMnVSleV1emLFE7/2rWYA+fRlhCP6l5vuDaRaHsim940K9FYF+Ryqo5HOhlm6MMtxREmhEL0fBCfPRCauuQzKLXbM+sDekQQFgR5rSoLtd5YndG/cECvi4VqZbE+xP3lsBjLepd2mHNYw/mY6Pf6fLUFTdS0RMErdT2uaQ0AcUN/vIt7c3qiWUzNo7Jf9HiDtbZu1MUiISPWuwMEb11bKBgQI10eYY0mq7V1SS/vGE5kFKjX6td2cFlLhBSIL68ReoOCJxDLh2s8BKqg/SF9koiYEWUZsmXYMxsSzp9m36E9rc5N52bL32di8T77iPVjzbejZClH9SCNRbGdSBxbyjzXW8WCTUUE9JJNEeMR4dlH1uj+I/tHrURC/KckDcqeu562b5sDuOMc6xjpy2T6Rjat62tu7lsH1wf2bymXt+wfMDe3yXc98qAk3eWJhDX6wpn/S20a6W8mtFKpPI/9eh+iuo228BgGU8IGE1WKhXIRiWWWmtM6iUUJbpg87aJRTRGxCaFJN0u1olUsVHncpwc59S5p23V065oX8wxe3n7MuT1x25mAhskfbn/6jV9OfnN+fGJkwZKEcza/dMe6ZXPm0kOLqJ6D869ue/bIkYvHPv6P87ub15y/5YZLty9+APQPZ8YO7wnA0KsDL+x5fU3/U66PK99nMhtxfSxKMqjAPIscHW4scrY3LIZrcG2xs3Xax1+xcRYnWTIfJXU3TxFBzWreFgvqdFtC2xWXjUpu4kucYQFM/0FBLwRZCLCrdyDETXl4/vDg8tYi7dSbH8l1ditpvz8d6+7MP9KsddFi27Klh3PSpQUHxABERkchHBBfXNjU1dJAQW70io+mmLpzeM3QhhVDm+sbU2l/o8/X6E+nGus3D63YMLRmeKfK6BQ8tuOo88fOTsgc3fEYQENTnILPJy+9/1/gY5Zh5RkMc3tujWrVoJ1sutW6r+C0Zuw4i9yJRO7UCG/usocpHbbtVXQ1K7PjY585LwYCsOezsePOelhl22spXT3fXvVfN4b1kQAAAHicY2BkYGAA4jnP/uvE89t8ZeBmYQCB639m88Po////67AaMzcCuRwMTCBRAHYFDUcAAAB4nGNgZGBgbvjfwBDDavwfCFiNGYAiKEAQAKmvBt4AAHicY2FgYGDBiv//ZzXGLYfMBwB/UwR1AAAAAAAAagCmAOoBRAGYAeACSgJ0AswDfgOSA9gEMAREBKwE2nicY2BkYGAQZChnYGMAASYg5gJCBob/YD4DABY+AaUAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbY3LDoIwEEV7ASnyUPA/TMSF/1M3WKwztNCIfr2NsHDhWUwy507mikgs5OI/DSLESLBBCokMW+QoUKLCDnvUaHAQda/ppShMoxWfT5d0ZD96loOmzniq3p6vISF2D2Vya+9MXa8VZetBK+ewBZUMxo+RtdnE/qsK5Rw/j053t0kuX9tITeWPbuNZk1wrhPgA/1Y0AQAA') format('woff');
4 | }
5 |
6 | .iconfont {
7 | font-family: "iconfont" !important;
8 | font-size: 16px;
9 | font-style: normal;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
14 | .icon-jinyanjinliao206:before {
15 | content: "\e61e";
16 | }
17 |
18 | .icon-sousuo:before {
19 | content: "\e629";
20 | }
21 |
22 | .icon-pinglun:before {
23 | content: "\e6a3";
24 | }
25 |
26 | .icon-zuobiaonormal:before {
27 | content: "\e610";
28 | }
29 |
30 | .icon-qqkongjian:before {
31 | content: "\e600";
32 | }
33 |
34 | .icon-pinglun1:before {
35 | content: "\e650";
36 | }
37 |
38 | .icon-xiangji:before {
39 | content: "\e68c";
40 | }
41 |
42 | .icon-plus:before {
43 | content: "\e601";
44 | }
45 |
46 | .icon-qq:before {
47 | content: "\e60e";
48 | }
49 |
50 | .icon-touxiang:before {
51 | content: "\e658";
52 | }
53 |
54 | .icon-arrow-right:before {
55 | content: "\e602";
56 | }
57 |
58 | .icon-sousuo1:before {
59 | content: "\e603";
60 | }
61 |
62 | .icon-at:before {
63 | content: "\e65e";
64 | }
65 |
66 | .icon-arrow-right1:before {
67 | content: "\e61f";
68 | }
69 |
70 | .icon-xin:before {
71 | content: "\e63f";
72 | }
73 |
74 | .icon-zuobiao:before {
75 | content: "\e6aa";
76 | }
77 |
--------------------------------------------------------------------------------
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 |
2 | page {
3 | line-height: 1.6;
4 | font-family: -apple-system-font, Helvetica Neue, sans-serif;
5 | }
6 |
7 | .weui-cells {
8 | position: relative;
9 | margin-top: 8px;
10 | background-color: #fff;
11 | line-height: 1.41176471;
12 | font-size: 17px;
13 | }
14 |
15 | .weui-cells:before {
16 | top: 0;
17 | border-top: 1rpx solid rgba(0, 0, 0, 0.1);
18 | }
19 |
20 | .weui-cells:after, .weui-cells:before {
21 | content: " ";
22 | position: absolute;
23 | left: 0;
24 | right: 0;
25 | height: 1px;
26 | color: rgba(0, 0, 0, 0.1);
27 | }
28 |
29 | .weui-cells:after {
30 | bottom: 0;
31 | border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
32 | }
33 |
34 | .weui-cell {
35 | padding: 16px;
36 | position: relative;
37 | display: -webkit-box;
38 | display: -webkit-flex;
39 | display: flex;
40 | -webkit-box-align: center;
41 | -webkit-align-items: center;
42 | align-items: center;
43 | }
44 |
45 | .weui-cell:before {
46 | content: " ";
47 | position: absolute;
48 | left: 0;
49 | top: 0;
50 | right: 0;
51 | height: 1px;
52 | border-top: 1rpx solid rgba(0, 0, 0, 0.1);
53 | color: rgba(0, 0, 0, 0.1);
54 | left: 16px;
55 | }
56 |
57 | .weui-cell:first-child:before {
58 | display: none;
59 | }
60 |
61 | .weui-cell__bd {
62 | -webkit-box-flex: 1;
63 | -webkit-flex: 1;
64 | flex: 1;
65 | }
66 |
67 | .weui-uploader__hd {
68 | padding-bottom: 16px;
69 | }
70 |
71 | .weui-uploader__overview {
72 | display: -webkit-box;
73 | display: -webkit-flex;
74 | display: flex;
75 | -webkit-box-align: center;
76 | -webkit-align-items: center;
77 | align-items: center;
78 | }
79 |
80 | .weui-uploader__title {
81 | -webkit-box-flex: 1;
82 | -webkit-flex: 1;
83 | flex: 1;
84 | }
85 |
86 | .weui-uploader__tips {
87 | color: rgba(0, 0, 0, 0.3);
88 | font-size: 14px;
89 | line-height: 1.4;
90 | padding-top: 4px;
91 | }
92 |
93 | .weui-uploader__info {
94 | color: rgba(0, 0, 0, 0.3);
95 | }
96 |
97 | .weui-uploader__bd {
98 | margin-bottom: -8px;
99 | margin-right: -8px;
100 | overflow: hidden;
101 | }
102 |
103 | .weui-uploader__file {
104 | float: left;
105 | margin-right: 8px;
106 | margin-bottom: 8px;
107 | }
108 |
109 | .weui-uploader__img {
110 | display: block;
111 | width: 96px;
112 | height: 96px;
113 | }
114 |
115 | .weui-uploader__file_status {
116 | position: relative;
117 | }
118 |
119 | .weui-uploader__file_status:before {
120 | content: " ";
121 | position: absolute;
122 | top: 0;
123 | right: 0;
124 | bottom: 0;
125 | left: 0;
126 | background-color: rgba(0, 0, 0, 0.5);
127 | }
128 |
129 | .weui-uploader__file-content {
130 | position: absolute;
131 | top: 50%;
132 | left: 50%;
133 | -webkit-transform: translate(-50%, -50%);
134 | transform: translate(-50%, -50%);
135 | color: #fff;
136 | }
137 |
138 | .weui-uploader__input-box {
139 | float: left;
140 | position: relative;
141 | margin-right: 8px;
142 | margin-bottom: 8px;
143 | width: 96px;
144 | height: 96px;
145 | box-sizing: border-box;
146 | background-color: #ededed;
147 | }
148 |
149 | .weui-uploader__input-box:after, .weui-uploader__input-box:before {
150 | content: " ";
151 | position: absolute;
152 | top: 50%;
153 | left: 50%;
154 | -webkit-transform: translate(-50%, -50%);
155 | transform: translate(-50%, -50%);
156 | background-color: #a3a3a3;
157 | }
158 |
159 | .weui-uploader__input-box:before {
160 | width: 2px;
161 | height: 32px;
162 | }
163 |
164 | .weui-uploader__input-box:after {
165 | width: 32px;
166 | height: 2px;
167 | }
168 |
169 | .weui-uploader__input-box:active {
170 | border-color: #8b8b8b;
171 | }
172 |
173 | .weui-uploader__input-box:active:after, .weui-uploader__input-box:active:before {
174 | background-color: #8b8b8b;
175 | }
176 |
177 | .weui-uploader__input {
178 | position: absolute;
179 | z-index: 1;
180 | top: 0;
181 | left: 0;
182 | width: 100%;
183 | height: 100%;
184 | opacity: 0;
185 | }
186 |
187 | /**<--顶部图片样式-->**/
188 |
189 | .top-img {
190 | display: flex;
191 | flex-direction: row;
192 | align-content: center;
193 | justify-content: center;
194 | align-items: center;
195 | }
196 |
197 | .top-img-alone {
198 | align-content: center;
199 | justify-content: center;
200 | align-items: center;
201 | width: 860rpx;
202 | height: 375rpx;
203 | padding-left: 8rpx;
204 | padding-right: 8rpx;
205 | }
206 |
207 | .container {
208 | height: 100%;
209 | display: flex;
210 | flex-direction: column;
211 | align-items: center;
212 | justify-content: space-between;
213 | padding: 200rpx 0;
214 | box-sizing: border-box;
215 | }
216 |
217 | /**获取头像弹窗样式**/
218 |
219 | .mask {
220 | width: 100%;
221 | height: 100%;
222 | position: fixed;
223 | top: 0;
224 | left: 0;
225 | background: #000;
226 | z-index: 9000;
227 | opacity: 0.7;
228 | }
229 |
230 | .modal {
231 | width: 580rpx;
232 | height: 100px;
233 | position: fixed;
234 | top: 70%;
235 | left: 0;
236 | z-index: 9999;
237 | margin: -370rpx 85rpx;
238 | background-color: #fff;
239 | border-radius: 14rpx;
240 | display: flex;
241 | flex-direction: column;
242 | align-items: center;
243 | }
244 |
245 | .canaaa {
246 | margin-top: 14rpx;
247 | margin-bottom: 14rpx;
248 | }
249 |
250 | .test {
251 | font-size: 24rpx;
252 | padding-left: 24rpx;
253 | padding-top: 24rpx;
254 | padding-bottom: 10rpx;
255 | }
256 |
257 | .showimage {
258 | height: 68rpx;
259 | width: 68rpx;
260 | }
261 |
262 | .geye {
263 | padding-top: 44rpx;
264 | padding-bottom: 44rpx;
265 | }
266 |
267 | /**
268 | 可乐
269 | **/
270 |
271 | /**app.wxss**/
272 |
273 | ::-webkit-scrollbar {
274 | width: 0;
275 | height: 0;
276 | color: transparent;
277 | }
278 |
279 | button {
280 | margin: 0;
281 | padding: 0;
282 | border: none;
283 | background-color: transparent;
284 | }
285 |
286 | button::before {
287 | border: none;
288 | background-color: transparent;
289 | }
290 |
291 | button::after {
292 | border: none;
293 | background-color: transparent;
294 | }
295 |
296 | button[type=default][plain] {
297 | border: none;
298 | }
299 |
300 | button[plain] {
301 | border: none;
302 | }
303 |
304 | @keyframes rising {
305 | from {
306 | opacity: 0;
307 | transform: translateY(100%);
308 | }
309 |
310 | to {
311 | opacity: 1;
312 | transform: translateY(0);
313 | }
314 | }
315 |
316 | @keyframes landing {
317 | from {
318 | opacity: 0;
319 | transform: translateY(-100%);
320 | }
321 |
322 | to {
323 | opacity: 1;
324 | transform: translateY(0);
325 | }
326 | }
327 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../lib/iconfont/iconfont.wxss';
2 |
3 | /*顶部导航*/
4 |
5 | .tab {
6 | display: flex;
7 | font-family: Arial, sans-serif;
8 | flex-direction: row;
9 | color: #4c5154;
10 | justify-content: space-around;
11 | background-color: #fff;
12 | padding: 0 8rpx 8rpx 8rpx;
13 | font-size: 28rpx;
14 | border-bottom: 2rpx solid #f7f7f7;
15 | margin-top: -8rpx;
16 | }
17 |
18 | .tab-se {
19 | border-bottom: 5rpx solid #7680f9;
20 | color: #7680f9;
21 | padding: 8rpx 5rpx;
22 | font-weight: 600;
23 | }
24 |
25 | .tab-no {
26 | padding: 8rpx 5rpx;
27 | }
28 |
29 | .share-btn {
30 | position: absolute;
31 | bottom: 106rpx;
32 | right: 0;
33 | display: block;
34 | background-color: #4c5154;
35 | border-radius: rpx;
36 | font-size: 28rpx;
37 | color: #fff;
38 | }
39 |
40 | .toTop {
41 | font-size: 20rpx;
42 | background-color: #00c161;
43 | padding: 3rpx 6rpx;
44 | border-radius: 8rpx;
45 | color: #fff;
46 | width: 48rpx;
47 | align-content: center;
48 | }
49 |
50 | .top-circle {
51 | margin-top: 22rpx;
52 | }
53 |
54 | .admin-delete {
55 | color: red;
56 | padding-left: 20rpx;
57 | }
58 |
59 | .timeArea-delete {
60 | color: #576b95;
61 | padding-left: 20rpx;
62 | }
63 |
64 | .li-imgs {
65 | display: flex;
66 | flex-direction: row;
67 | flex-wrap: wrap;
68 | margin-top: 8rpx;
69 | }
70 |
71 | .li-img-one {
72 | padding: 4rpx;
73 | width: 200rpx;
74 | height: 200rpx;
75 | }
76 |
77 | .renzheng {
78 | background-color: red;
79 | padding: 6rpx;
80 | border-radius: 100%;
81 | width: 6rpx;
82 | height: 6rpx;
83 | position: absolute;
84 | left: 76rpx;
85 | margin-top: -5rpx;
86 | }
87 |
88 | /* .r-left {
89 | top: 216rpx;
90 | right: 92rpx;
91 | position: fixed;
92 | z-index: 99;
93 | } */
94 |
95 | .r-left {
96 | top: 58rpx;
97 | left: 6rpx;
98 | position: fixed;
99 | z-index: 99;
100 | }
101 |
102 | .r-right {
103 | top: 52rpx;
104 | left: 56rpx;
105 | position: fixed;
106 | z-index: 99;
107 | }
108 |
109 | /* .r-right {
110 | top: 284rpx;
111 | right: 74rpx;
112 | position: fixed;
113 | z-index: 99;
114 | } */
115 |
116 | .header > text:nth-child(2) {
117 | font-size: 14pt;
118 | }
119 |
120 | .no-user {
121 | margin-top: 40rpx;
122 | font-size: 32rpx;
123 | padding: 10rpx 0;
124 | border: 2rpx solid #f7f7f7;
125 | }
126 |
127 | .open-btn {
128 | background-color: #00c161;
129 | color: #fff;
130 | }
131 |
132 | .top-relate {
133 | position: relative;
134 | /* background-color: #7680f9; */
135 | }
136 |
137 | .img-top {
138 | width: 100%;
139 | height: 100%;
140 | }
141 |
142 | .nickName {
143 | position: absolute;
144 | top: 226rpx;
145 | border-radius: 100%;
146 | left: 232rpx;
147 | font-weight: 700;
148 | padding: 2rpx;
149 | color: #fff;
150 | font-family: Arial, sans-serif;
151 | }
152 |
153 | .useravatar {
154 | position: absolute;
155 | width: 92rpx;
156 | height: 92rpx;
157 | top: 98rpx;
158 | border-radius: 100%;
159 | left: 362rpx;
160 | background-color: #fff;
161 | }
162 |
163 | .circle {
164 | margin-top: 16rpx;
165 | margin-bottom: 16rpx;
166 | border-bottom: 2rpx solid #ececec;
167 | font-family: Arial, sans-serif;
168 | margin-right: 20rpx;
169 | }
170 |
171 | .userhead {
172 | width: 72rpx;
173 | height: 72rpx;
174 | border-radius: 8rpx;
175 | margin-left: 16rpx;
176 | }
177 |
178 | .username {
179 | color: #576b95;
180 | font-size: 32rpx;
181 | font-family: Arial, sans-serif;
182 | overflow: hidden;
183 | margin-top: -10rpx;
184 | /* margin-right: 20rpx; */
185 | }
186 |
187 | .row {
188 | display: flex;
189 | flex-direction: row;
190 | margin-bottom: 20rpx;
191 | }
192 |
193 | .col {
194 | display: flex;
195 | flex-direction: column;
196 | margin-left: 16rpx;
197 | width: 100%;
198 | }
199 |
200 | .content {
201 | font-size: 32rpx;
202 | font-family: Arial, sans-serif;
203 | overflow: hidden;
204 | color: #252525;
205 | margin-bottom: 10rpx;
206 | }
207 |
208 | .reply-btn-container {
209 | width: 100px;
210 | height: 100px;
211 | margin: 0 auto;
212 | text-align: right;
213 | }
214 |
215 | .reply-btn {
216 | width: 48px;
217 | height: 36px;
218 | background-color: currentColor;
219 | color: #8c99c1;
220 | display: inline-block;
221 | position: relative;
222 | vertical-align: middle;
223 | }
224 |
225 | .reply-btn::before {
226 | content: "";
227 | width: 0;
228 | height: 0;
229 | border: 3px solid currentColor;
230 | border-color: transparent currentColor transparent currentColor;
231 | border-width: 4px 6px 4px 0;
232 | position: absolute;
233 | top: 14px;
234 | left: -6px;
235 | }
236 |
237 | .reply-btn::after {
238 | content: "";
239 | width: 6px;
240 | height: 6px;
241 | background: #fff;
242 | position: absolute;
243 | top: 13px;
244 | left: 10px;
245 | border-radius: 25%;
246 | box-shadow: 22px 0 0 #fff;
247 | transform: translate(0, 50%);
248 | }
249 |
250 | /*按钮*/
251 |
252 | .round-click {
253 | height: 90rpx;
254 | width: 90rpx;
255 | background-color: #576b95;
256 | border-radius: 100%;
257 | position: fixed;
258 | bottom: 220rpx;
259 | right: 28rpx;
260 | display: flex;
261 | align-items: center;
262 | justify-content: center;
263 | z-index: 9;
264 | color: #fff;
265 | font-size: 32rpx;
266 | }
267 |
268 | .round-click navigator {
269 | font-size: 28rpx;
270 | max-width: 80rpx;
271 | color: #fff;
272 | text-align: center;
273 | }
274 |
275 | /*评论*/
276 |
277 | .timeArea {
278 | font-size: 8pt;
279 | line-height: 20pt;
280 | color: #888;
281 | margin-top: 6rpx;
282 | position: relative;
283 | }
284 |
285 | .text-right {
286 | float: right;
287 | }
288 |
289 | .timeArea-right {
290 | float: right;
291 | }
292 |
293 | .timeArea .icon-pinglun1 {
294 | font-size: 16pt;
295 | color: #576b95;
296 | }
297 |
298 | .header {
299 | color: #fff;
300 | }
301 |
302 | .zan-pinglun {
303 | position: absolute;
304 | bottom: 0;
305 | right: 60rpx;
306 | display: block;
307 | background-color: #4c5154;
308 | height: 20pt;
309 | border-radius: 10rpx;
310 | font-size: 24rpx;
311 | color: white;
312 | line-height: 20pt;
313 | text-align: center;
314 | padding: 20rpx 0;
315 | /* animation: heartBeat 1.2s; */
316 | }
317 |
318 | .zan-pinglun > .iconfont {
319 | display: inline-block;
320 | width: 60pt;
321 | }
322 |
323 | .zan-pinglun > .icon-xin {
324 | border-right: 1rpx solid #353535;
325 | }
326 |
327 | .commentArea {
328 | font-size: 11pt;
329 | line-height: 20pt;
330 | background-color: rgba(87, 107, 149, 0.1);
331 | position: relative;
332 | }
333 |
334 | /*动画*/
335 |
336 | .dd-icon {
337 | height: 40rpx;
338 | width: 70rpx;
339 | }
340 |
341 | .liuyan {
342 | display: flex;
343 | flex-direction: row;
344 | background: #eee;
345 | width: 100%;
346 | bottom: 0;
347 | position: fixed;
348 | z-index: 4;
349 | height: 120rpx;
350 | justify-content: center;
351 | align-items: center;
352 | align-content: center;
353 | }
354 |
355 | .input {
356 | display: flex;
357 | background-color: #fff;
358 | width: 80%;
359 | padding: 20rpx 12rpx;
360 | margin-left: 16rpx;
361 | border-radius: 4rpx;
362 | }
363 |
364 | .input-placeholder {
365 | padding-left: 14rpx;
366 | font-size: 32rpx;
367 | color: #999;
368 | }
369 |
370 | .icon {
371 | display: flex;
372 | font-size: 20rpx;
373 | flex-direction: row;
374 | border-radius: 8rpx;
375 | justify-content: center;
376 | align-content: center;
377 | align-items: center;
378 | background: #00c161;
379 | color: #fff;
380 | margin-left: 14rpx;
381 | padding-left: 17rpx;
382 | padding-right: 20rpx;
383 | padding-top: 12rpx;
384 | padding-bottom: 12rpx;
385 | }
386 |
387 | /*点赞留言*/
388 |
389 | .comm-zan {
390 | width: 100%;
391 | }
392 |
393 | .comments {
394 | overflow: hidden;
395 | background-color: #f7f7f7;
396 | align-items: center;
397 | /* border-bottom: */
398 | padding: 6rpx 6rpx 16rpx 16rpx;
399 | }
400 |
401 | .zan {
402 | overflow: hidden;
403 | background-color: #f7f7f7;
404 | align-items: center;
405 | border-bottom: 1rpx solid #ececec;
406 | padding: 12rpx 6rpx 8rpx 6rpx;
407 | }
408 |
409 | .zan-border {
410 | overflow: hidden;
411 | background-color: #f7f7f7;
412 | align-items: center;
413 | /* border-bottom: */
414 | padding: 12rpx 6rpx 8rpx 6rpx;
415 | }
416 |
417 | .like {
418 | font-size: 32rpx;
419 | line-height: 44rpx;
420 | color: #576b95;
421 | }
422 |
423 | .r {
424 | border-bottom: 16rpx solid #f7f7f7;
425 | border-left: 16rpx solid transparent;
426 | border-right: 16rpx solid transparent;
427 | width: 2rpx;
428 | margin-top: 5rpx;
429 | margin-left: 20rpx;
430 | }
431 |
432 | .love-icon {
433 | float: left;
434 | padding-left: 8rpx;
435 | padding-right: 2rpx;
436 | width: 32rpx;
437 | height: 32rpx;
438 | padding-top: 4rpx;
439 | }
440 |
441 | .noblueColor {
442 | font-size: 32rpx;
443 | color: #252525;
444 | overflow: hidden;
445 | line-height: 44rpx;
446 | width: 100%;
447 | }
448 |
449 | .blueColor {
450 | font-size: 32rpx;
451 | color: #576b95;
452 | }
453 |
454 | .r-bottom {
455 | font-size: 24rpx;
456 | text-align: center;
457 | padding-bottom: 16rpx;
458 | }
459 |
460 | .article {
461 | display: flex;
462 | flex-direction: row;
463 | padding: 6rpx;
464 | align-content: center;
465 | padding-bottom: 6rpx;
466 | background-color: #f7f7f7;
467 | align-items: center;
468 | }
469 |
470 | .article-title {
471 | font-size: 24rpx;
472 | }
473 |
474 | .msg_cover {
475 | width: 90rpx;
476 | height: 90rpx;
477 | padding-right: 10rpx;
478 | }
479 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/detail.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../lib/iconfont/iconfont.wxss';
2 |
3 | /*顶部导航*/
4 |
5 | .tab {
6 | display: flex;
7 | font-family: Arial, sans-serif;
8 | flex-direction: row;
9 | color: #4c5154;
10 | justify-content: space-around;
11 | background-color: #fff;
12 | padding: 0 8rpx 8rpx 8rpx;
13 | font-size: 28rpx;
14 | border-bottom: 2rpx solid #f7f7f7;
15 | margin-top: -8rpx;
16 | }
17 |
18 | .tab-se {
19 | border-bottom: 5rpx solid #7680f9;
20 | color: #7680f9;
21 | padding: 8rpx 5rpx;
22 | font-weight: 600;
23 | }
24 |
25 | .tab-no {
26 | padding: 8rpx 5rpx;
27 | }
28 |
29 | .share-btn {
30 | position: absolute;
31 | bottom: 106rpx;
32 | right: 0;
33 | display: block;
34 | background-color: #4c5154;
35 | border-radius: rpx;
36 | font-size: 28rpx;
37 | color: #fff;
38 | }
39 |
40 | .top-circle {
41 | margin-top: 52rpx;
42 | }
43 |
44 | .admin-delete {
45 | color: red;
46 | padding-left: 20rpx;
47 | }
48 |
49 | .timeArea-delete {
50 | color: #576b95;
51 | padding-left: 20rpx;
52 | }
53 |
54 | .li-imgs {
55 | display: flex;
56 | flex-direction: row;
57 | flex-wrap: wrap;
58 | margin-top: 8rpx;
59 | }
60 |
61 | .li-img-one {
62 | padding: 4rpx;
63 | width: 200rpx;
64 | height: 200rpx;
65 | }
66 |
67 | .renzheng {
68 | background-color: red;
69 | padding: 6rpx;
70 | border-radius: 100%;
71 | width: 6rpx;
72 | height: 6rpx;
73 | position: absolute;
74 | left: 76rpx;
75 | margin-top: -5rpx;
76 | }
77 |
78 | .r-left {
79 | top: 58rpx;
80 | left: 6rpx;
81 | position: fixed;
82 | z-index: 99;
83 | }
84 |
85 | .r-right {
86 | top: 52rpx;
87 | left: 56rpx;
88 | position: fixed;
89 | z-index: 99;
90 | }
91 |
92 | .header > text:nth-child(2) {
93 | font-size: 14pt;
94 | }
95 |
96 | .no-user {
97 | margin-top: 40rpx;
98 | font-size: 32rpx;
99 | padding: 10rpx;
100 | border: 2rpx solid #f7f7f7;
101 | }
102 |
103 | .open-btn {
104 | background-color: #fff;
105 | color: red;
106 | }
107 |
108 | .top-relate {
109 | position: relative;
110 | /* background-color: #7680f9; */
111 | }
112 |
113 | .img-top {
114 | width: 100%;
115 | height: 100%;
116 | }
117 |
118 | .nickName {
119 | position: absolute;
120 | top: 226rpx;
121 | border-radius: 100%;
122 | left: 232rpx;
123 | font-weight: 700;
124 | padding: 2rpx;
125 | color: #fff;
126 | font-family: Arial, sans-serif;
127 | }
128 |
129 | .useravatar {
130 | position: absolute;
131 | width: 92rpx;
132 | height: 92rpx;
133 | top: 98rpx;
134 | border-radius: 100%;
135 | left: 362rpx;
136 | background-color: #fff;
137 | }
138 |
139 | .circle {
140 | margin-top: 16rpx;
141 | margin-bottom: 16rpx;
142 | border-bottom: 2rpx solid #ececec;
143 | font-family: Arial, sans-serif;
144 | margin-right: 20rpx;
145 | }
146 |
147 | .userhead {
148 | width: 72rpx;
149 | height: 72rpx;
150 | border-radius: 8rpx;
151 | margin-left: 16rpx;
152 | }
153 |
154 | .username {
155 | color: #576b95;
156 | font-size: 32rpx;
157 | font-family: Arial, sans-serif;
158 | overflow: hidden;
159 | margin-top: -10rpx;
160 | /* margin-right: 20rpx; */
161 | }
162 |
163 | .row {
164 | display: flex;
165 | flex-direction: row;
166 | margin-bottom: 20rpx;
167 | }
168 |
169 | .col {
170 | display: flex;
171 | flex-direction: column;
172 | margin-left: 16rpx;
173 | width: 100%;
174 | }
175 |
176 | .content {
177 | font-size: 32rpx;
178 | font-family: Arial, sans-serif;
179 | overflow: hidden;
180 | color: #252525;
181 | margin-bottom: 10rpx;
182 | }
183 |
184 | .reply-btn-container {
185 | width: 100px;
186 | height: 100px;
187 | margin: 0 auto;
188 | text-align: right;
189 | }
190 |
191 | .reply-btn {
192 | width: 48px;
193 | height: 36px;
194 | background-color: currentColor;
195 | color: #8c99c1;
196 | display: inline-block;
197 | position: relative;
198 | vertical-align: middle;
199 | }
200 |
201 | .reply-btn::before {
202 | content: "";
203 | width: 0;
204 | height: 0;
205 | border: 3px solid currentColor;
206 | border-color: transparent currentColor transparent currentColor;
207 | border-width: 4px 6px 4px 0;
208 | position: absolute;
209 | top: 14px;
210 | left: -6px;
211 | }
212 |
213 | .reply-btn::after {
214 | content: "";
215 | width: 6px;
216 | height: 6px;
217 | background: #fff;
218 | position: absolute;
219 | top: 13px;
220 | left: 10px;
221 | border-radius: 25%;
222 | box-shadow: 22px 0 0 #fff;
223 | transform: translate(0, 50%);
224 | }
225 |
226 | /*按钮*/
227 |
228 | .round-click {
229 | height: 90rpx;
230 | width: 90rpx;
231 | background-color: #576b95;
232 | border-radius: 100%;
233 | position: fixed;
234 | bottom: 220rpx;
235 | right: 28rpx;
236 | display: flex;
237 | align-items: center;
238 | justify-content: center;
239 | z-index: 9;
240 | color: #fff;
241 | font-size: 32rpx;
242 | }
243 |
244 | .round-click navigator {
245 | font-size: 28rpx;
246 | max-width: 80rpx;
247 | color: #fff;
248 | text-align: center;
249 | }
250 |
251 | /*评论*/
252 |
253 | .timeArea {
254 | font-size: 8pt;
255 | line-height: 20pt;
256 | color: #888;
257 | margin-top: 6rpx;
258 | position: relative;
259 | }
260 |
261 | .text-right {
262 | float: right;
263 | }
264 |
265 | .timeArea-right {
266 | float: right;
267 | }
268 |
269 | .timeArea .icon-pinglun1 {
270 | font-size: 16pt;
271 | color: #576b95;
272 | }
273 |
274 | .header {
275 | color: #fff;
276 | animation: heartBeat 1s;
277 | }
278 |
279 | .zan-pinglun {
280 | position: absolute;
281 | bottom: 0;
282 | right: 60rpx;
283 | display: block;
284 | background-color: #4c5154;
285 | height: 20pt;
286 | border-radius: 10rpx;
287 | font-size: 24rpx;
288 | color: white;
289 | line-height: 20pt;
290 | text-align: center;
291 | padding: 20rpx 0;
292 | /* animation: heartBeat 1.2s; */
293 | }
294 |
295 | .zan-pinglun > .iconfont {
296 | display: inline-block;
297 | width: 60pt;
298 | }
299 |
300 | .zan-pinglun > .icon-xin {
301 | border-right: 1rpx solid #353535;
302 | }
303 |
304 | .commentArea {
305 | font-size: 11pt;
306 | line-height: 20pt;
307 | background-color: rgba(87, 107, 149, 0.1);
308 | position: relative;
309 | }
310 |
311 | /*动画*/
312 |
313 | @keyframes heartBeat {
314 | 0% {
315 | transform: scale(1);
316 | }
317 |
318 | 14% {
319 | transform: scale(1.3);
320 | }
321 |
322 | 28% {
323 | transform: scale(1);
324 | }
325 |
326 | 42% {
327 | transform: scale(1.3);
328 | }
329 |
330 | 70% {
331 | transform: scale(1);
332 | }
333 | }
334 |
335 | .heartBeat {
336 | animation-name: heartBeat;
337 | animation-duration: 1.3s;
338 | animation-timing-function: ease-in-out;
339 | }
340 |
341 | @keyframes fadeInDownBig {
342 | from {
343 | opacity: 0;
344 | transform: translate3d(0, -2000px, 0);
345 | }
346 |
347 | to {
348 | opacity: 1;
349 | transform: translate3d(0, 0, 0);
350 | }
351 | }
352 |
353 | .fadeInDownBig {
354 | animation-name: fadeInDownBig;
355 | }
356 |
357 | @keyframes bounceInRight {
358 | from, 60%, 75%, 90%, 100% {
359 | /* animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); */
360 | }
361 |
362 | from {
363 | opacity: 0;
364 | transform: translate3d(2000rpx, 0, 0);
365 | }
366 |
367 | 60% {
368 | opacity: 1;
369 | transform: translate3d(0rpx, 0, 0);
370 | }
371 |
372 | 75% {
373 | transform: translate3d(0rpx, 0, 0);
374 | }
375 |
376 | 90% {
377 | transform: translate3d(0rpx, 0, 0);
378 | }
379 |
380 | 100% {
381 | transform: translate3d(0, 0, 0);
382 | }
383 | }
384 |
385 | .dd-icon {
386 | height: 40rpx;
387 | width: 70rpx;
388 | }
389 |
390 | .liuyan {
391 | display: flex;
392 | flex-direction: row;
393 | background: #eee;
394 | width: 100%;
395 | bottom: 0;
396 | position: fixed;
397 | z-index: 4;
398 | height: 120rpx;
399 | justify-content: center;
400 | align-items: center;
401 | align-content: center;
402 | }
403 |
404 | .input {
405 | display: flex;
406 | background-color: #fff;
407 | width: 80%;
408 | padding: 20rpx 12rpx;
409 | margin-left: 16rpx;
410 | border-radius: 4rpx;
411 | }
412 |
413 | .input-placeholder {
414 | padding-left: 14rpx;
415 | font-size: 32rpx;
416 | color: #999;
417 | }
418 |
419 | .icon {
420 | display: flex;
421 | font-size: 20rpx;
422 | flex-direction: row;
423 | border-radius: 8rpx;
424 | justify-content: center;
425 | align-content: center;
426 | align-items: center;
427 | background: #00c161;
428 | color: #fff;
429 | margin-left: 14rpx;
430 | padding-left: 17rpx;
431 | padding-right: 20rpx;
432 | padding-top: 12rpx;
433 | padding-bottom: 12rpx;
434 | }
435 |
436 | /*点赞留言*/
437 |
438 | .comm-zan {
439 | width: 100%;
440 | }
441 |
442 | .comments {
443 | overflow: hidden;
444 | background-color: #f7f7f7;
445 | align-items: center;
446 | /* border-bottom: */
447 | padding: 6rpx 6rpx 16rpx 16rpx;
448 | }
449 |
450 | .zan {
451 | overflow: hidden;
452 | background-color: #f7f7f7;
453 | align-items: center;
454 | border-bottom: 1rpx solid #ececec;
455 | padding: 12rpx 6rpx 8rpx 6rpx;
456 | }
457 |
458 | .zan-border {
459 | overflow: hidden;
460 | background-color: #f7f7f7;
461 | align-items: center;
462 | /* border-bottom: */
463 | padding: 12rpx 6rpx 8rpx 6rpx;
464 | }
465 |
466 | .like {
467 | font-size: 32rpx;
468 | line-height: 44rpx;
469 | color: #576b95;
470 | }
471 |
472 | .r {
473 | border-bottom: 16rpx solid #f7f7f7;
474 | border-left: 16rpx solid transparent;
475 | border-right: 16rpx solid transparent;
476 | width: 2rpx;
477 | margin-top: 5rpx;
478 | margin-left: 20rpx;
479 | }
480 |
481 | .love-icon {
482 | float: left;
483 | padding-left: 8rpx;
484 | padding-right: 2rpx;
485 | width: 32rpx;
486 | height: 32rpx;
487 | padding-top: 4rpx;
488 | }
489 |
490 | .noblueColor {
491 | font-size: 32rpx;
492 | color: #252525;
493 | overflow: hidden;
494 | line-height: 44rpx;
495 | width: 100%;
496 | }
497 |
498 | .blueColor {
499 | font-size: 32rpx;
500 | color: #576b95;
501 | }
502 |
503 | .r-bottom {
504 | font-size: 24rpx;
505 | text-align: center;
506 | padding-bottom: 16rpx;
507 | }
508 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 | {{item.name}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 仲恺微校园
28 |
29 |
30 | 发布、点赞、评论功能需授权小程序使用您的头像和昵称。\n\n发布违规信息将被永久封禁。\n\n
31 |
32 |
33 |
34 |
35 | 2019/08/09
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | {{itemName.userInfo.nickName}}
56 | 置顶
57 |
58 |
59 |
60 | {{itemName.content}}
61 | \n查看全文
62 |
63 |
64 |
65 |
66 | {{itemName.article.title}}
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {{itemName.time}}
79 |
80 | 删除
81 | 取消置顶
82 |
83 |
84 |
85 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | {{itemName.zanText}}
102 |
103 |
104 |
105 |
106 |
107 |
108 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | {{itemName.userInfo.nickName}}
142 |
143 |
144 | {{itemName.content}}
145 | \n查看全文
146 |
147 |
148 |
149 |
150 |
151 | {{itemName.article.title}}
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 | {{itemName.time}}
164 | {{itemName.tab}}
165 |
166 |
167 | 置顶
168 | 删除
169 |
170 |
171 |
172 |
173 |
174 | 赞
175 | 留言
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 | {{itemName.zanText}}
188 |
189 |
190 |
191 |
192 |
193 |
194 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 | {{btoText}}
220 |
221 |
222 |
223 |
229 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/edit/index.js:
--------------------------------------------------------------------------------
1 | const app = getApp();
2 | Page({
3 | data: {
4 | openid: undefined,
5 | adminOpenid: "oOmqu4pDpN-1db4Ms_U0fjmCfBAw", //管理员openid
6 | textareaTxt: undefined,
7 | article: undefined,
8 | files: [],
9 | adminInfo: {
10 | avatarUrl: "cloud://zhku-01.7a68-zhku-01-1258022644/home/logo1.jpg", //官方账号头像
11 | nickName: "仲恺微校园" //官方账号名称
12 | },
13 | userInfo: undefined,
14 | sendList: [{
15 | name: "默认",
16 | isSelect: true
17 | }, {
18 | name: "官方",
19 | isSelect: false
20 | }],
21 | //导航栏
22 | tabList: [{
23 | name: "杂谈随想",
24 | isSelect: false
25 | }, {
26 | name: "迎新",
27 | isSelect: false
28 | },
29 | {
30 | name: "社团",
31 | isSelect: false
32 | },
33 | {
34 | name: "表白",
35 | isSelect: false
36 | },
37 |
38 | {
39 | name: "问与答",
40 | isSelect: false
41 | },
42 | {
43 | name: "闲置",
44 | isSelect: false
45 | },
46 | {
47 | name: "失物",
48 | isSelect: false
49 | },
50 | {
51 | name: "其它",
52 | isSelect: false
53 | }
54 | ],
55 |
56 | },
57 |
58 |
59 | bindChangeUser(e) {
60 | console.log(e.currentTarget.dataset.index)
61 | var tab = this.data.sendList
62 | var that = this
63 | for (var i = 0; i < tab.length; i++) {
64 | tab[i].isSelect = false
65 | }
66 | tab[e.currentTarget.dataset.index].isSelect = true
67 |
68 |
69 | if (e.currentTarget.dataset.index === 1) {
70 | this.setData({
71 | userInfo: {
72 | avatarUrl: "cloud://zhku-01.7a68-zhku-01-1258022644/home/logo1.jpg",
73 | nickName: "仲恺微校园"
74 | }
75 | })
76 | }
77 | if (e.currentTarget.dataset.index === 0) {
78 | wx.getUserInfo({
79 | success(res) {
80 | that.setData({
81 | userInfo: res.userInfo
82 | })
83 | }
84 | })
85 | }
86 | this.setData({
87 | sendList: tab
88 | })
89 | },
90 |
91 | bindChangeTab(e) {
92 | console.log(e.currentTarget.dataset.index)
93 | var tab = this.data.tabList
94 | for (var i = 0; i < tab.length; i++) {
95 | tab[i].isSelect = false
96 | }
97 | tab[e.currentTarget.dataset.index].isSelect = true
98 | this.setData({
99 | tabList: tab
100 | })
101 | },
102 | onLoad() {
103 | // 查看是否授权
104 | var that = this
105 | if (app.globalData.userInfo) {
106 | this.setData({
107 | userInfo: app.globalData.userInfo
108 | })
109 | } else {
110 | wx.getSetting({
111 | success(res) {
112 | if (res.authSetting['scope.userInfo']) {
113 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称
114 | wx.getUserInfo({
115 | success(res) {
116 | that.setData({
117 | userInfo: res.userInfo
118 | })
119 | }
120 | })
121 | }
122 | }
123 | })
124 | }
125 | wx.cloud.callFunction({
126 | name: 'login'
127 | }).then(res => {
128 | console.log(res.result.openid)
129 | if (res.result.openid === that.data.adminOpenid) {
130 | that.data.tabList.push({
131 | name: "通知公告",
132 | isSelect: false
133 | })
134 | that.setData({
135 | tabList: that.data.tabList
136 | })
137 | }
138 | that.setData({
139 | openid: res.result.openid
140 | })
141 | })
142 | },
143 | getInputGzh(e) {
144 | wx.showToast({
145 | title: '仅支持认证用户',
146 | icon: 'none'
147 | })
148 | var that = this
149 | if (e.detail.value.includes("https://mp.weixin.qq.com/s/")) {
150 | wx.showToast({
151 | title: '正在解析链接',
152 | icon: 'none'
153 | })
154 | console.log("从")
155 | wx.cloud.callFunction({
156 | name: 'wxparse',
157 | data: {
158 | url: e.detail.value
159 | }
160 | }).then(res => {
161 | if (res.result.data.code !== 0) {
162 | wx.showToast({
163 | title: '文章解析失败,请确认链接无误',
164 | icon: 'none'
165 | })
166 | }
167 | var title = res.result.data.data.msg_title
168 | var msg_cover = res.result.data.data.msg_cover
169 | that.setData({
170 | article: {
171 | title: title,
172 | url: e.detail.value,
173 | msg_cover: msg_cover
174 | }
175 | })
176 | console.log(res)
177 | })
178 | }
179 | },
180 |
181 | saveEditOrNot(e) {
182 | wx.switchTab({
183 | url: '../circle/index',
184 | })
185 | // wx.showModal({
186 | // title: '将此次编辑保留',
187 | // content: '',
188 | // cancelText: '不保留',
189 | // confirmText: '保留',
190 | // success(res) {
191 | // if (res.confirm) {
192 | // console.log('用户点击确定')
193 | // } else if (res.cancel) {
194 | // wx.navigateBack({
195 | // delta: 1
196 | // })
197 | // }
198 | // }
199 | // })
200 | },
201 |
202 | deleteImg(e) {
203 | var that = this
204 | wx.vibrateShort({
205 |
206 | })
207 | wx.showModal({
208 | title: '确认删除',
209 | content: '',
210 | cancelText: '取消',
211 | confirmText: '确认',
212 | success(res) {
213 | if (res.confirm) {
214 | console.log('用户点击确定')
215 | var data = that.data.files
216 | data.splice(e.currentTarget.dataset.index, 1)
217 | that.setData({
218 | files: data
219 | })
220 | } else if (res.cancel) {
221 |
222 | }
223 | }
224 | })
225 |
226 |
227 |
228 | },
229 |
230 | getInputValue(e) {
231 | this.setData({
232 | textareaTxt: e.detail.value
233 | })
234 | },
235 |
236 |
237 |
238 | formSubmit: function(e) {
239 | var that = this
240 | var num = 0
241 | var tabList = that.data.tabList
242 | var tab = undefined
243 | for (let i = 0; i < tabList.length; i++) {
244 | if (tabList[i].isSelect) {
245 | tab = tabList[i].name
246 | }
247 | }
248 | if (!tab) {
249 | wx.showToast({
250 | title: '请选择一个标签',
251 | icon: 'none',
252 | })
253 | return
254 | }
255 | console.log(tab)
256 | if (!this.data.userInfo) {
257 | wx.showToast({
258 | title: '未授权,2秒后跳转授权页面',
259 | icon: 'none',
260 | })
261 | setTimeout(() => {
262 | wx.reLaunch({
263 | url: '../circle/index',
264 | })
265 | }, 2000)
266 | return
267 | }
268 | if (!that.data.textareaTxt && that.data.files.length <= 0) {
269 | wx.showToast({
270 | title: '内容为空',
271 | icon: 'none',
272 | })
273 | } else {
274 | wx.showNavigationBarLoading()
275 | wx.showLoading({
276 | title: '正在提交数据',
277 | })
278 | var tempIds = [];
279 | const db = wx.cloud.database()
280 | if (that.data.files.length === 0) {
281 | //内容安全检测
282 | wx.cloud.callFunction({
283 | name: 'msgCheck',
284 | //87014 违规 0成功
285 | data: {
286 | type: 'text',
287 | content: that.data.textareaTxt,
288 | },
289 | }).then(res => {
290 | console.log(that.data.textareaTxt)
291 | console.log(res)
292 | //检测到内容违规 标记
293 | if (res.result.errCode !== 0) {
294 | wx.showToast({
295 | title: '内容违规!发布违法违规内容将被永久封禁',
296 | icon: 'none',
297 | duration: 5000
298 | })
299 | } else {
300 | //继续
301 | db.collection('circle').add({
302 | data: {
303 | userInfo: this.data.userInfo,
304 | createTime: db.serverDate(),
305 | content: this.data.textareaTxt,
306 | time: new Date().getTime(),
307 | zans: [],
308 | images: [],
309 | comments: [],
310 | tab: tab,
311 | isTop: false,
312 | article: this.data.article,
313 | },
314 | success: res => {
315 | wx.hideLoading()
316 | wx.showToast({
317 | title: '提交成功',
318 | icon: 'success'
319 | })
320 | wx.reLaunch({
321 | url: '../circle/index',
322 | })
323 | }
324 | })
325 | }
326 | })
327 | }
328 |
329 | if (that.data.files.length > 0) {
330 | var tempIds = [];
331 | for (var i = 0; i < that.data.files.length; i++) {
332 | const filePath = that.data.files[i]
333 | var rn = Math.floor(Math.random() * 10000 + 1) //随机数
334 | var name = Date.parse(new Date()) / 1000; //时间戳
335 | const cloudPath = 'circle/' + that.data.userInfo.nickName + "/" + rn + name + filePath.match(/\.[^.]+?$/)[0]
336 | wx.cloud.uploadFile({
337 | cloudPath: cloudPath,
338 | filePath: filePath,
339 | success: res => {
340 | console.log(res)
341 | tempIds.push(res.fileID)
342 | num = num + 1
343 | if (num === that.data.files.length) {
344 | console.log(that.data.textareaTxt)
345 | var con = that.data.textareaTxt
346 | if (!con) {
347 | con = 123
348 | }
349 | //内容安全检测
350 | wx.cloud.callFunction({
351 | name: 'msgCheck',
352 | //87014 违规 0成功
353 | data: {
354 | type: 'text',
355 | content: con,
356 |
357 | },
358 | }).then(res => {
359 | console.log(res.result)
360 | //检测到内容违规 标记
361 | if (res.result.errCode !== 0) {
362 | wx.showToast({
363 | title: '内容违规!发布违法违规内容将被永久封禁',
364 | icon: 'none',
365 | duration: 5000
366 | })
367 | } else {
368 | db.collection('circle').add({
369 | data: {
370 | userInfo: this.data.userInfo,
371 | content: this.data.textareaTxt,
372 | createTime: db.serverDate(),
373 | time: new Date().getTime(),
374 | zans: [],
375 | images: tempIds,
376 | comments: [],
377 | tab: tab,
378 | isTop: false,
379 | article: this.data.article,
380 |
381 |
382 | },
383 | success: res => {
384 | wx.hideLoading()
385 | wx.showToast({
386 | title: '提交成功',
387 | icon: 'success'
388 | })
389 | wx.reLaunch({
390 | url: '../circle/index',
391 | })
392 | },
393 | })
394 | }
395 | })
396 | }
397 | },
398 | })
399 | }
400 | }
401 | }
402 | },
403 |
404 | chooseImage: function(e) {
405 | var that = this;
406 | wx.chooseImage({
407 | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
408 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
409 | success: function(res) {
410 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
411 | that.setData({
412 | files: that.data.files.concat(res.tempFilePaths)
413 | });
414 | }
415 | })
416 | console.log(that.data.files)
417 | },
418 |
419 | previewImage: function(e) {
420 | wx.previewImage({
421 | current: e.currentTarget.id, // 当前显示图片的http链接
422 | urls: this.data.files // 需要预览的图片http链接列表
423 | })
424 | }
425 | })
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/detail.js:
--------------------------------------------------------------------------------
1 | const app = getApp()
2 | Page({
3 |
4 | data: {
5 | wallData: [],
6 | showZan: -1, //显示点赞按钮
7 | showPinLun: false,
8 | nmAvator: '/image/pyq/ng.jpg',
9 | commentValue: '',
10 | placeholderPL: '评论',
11 | userInfo: undefined,
12 | batchTimes: undefined, //分页
13 | btoText: "正在加载...",
14 | adminOpenid: "oOmqu4pDpN-1db4Ms_U0fjmCfBAw",
15 | shareObg: {
16 | title: '仲恺校友圈',
17 | desc: '',
18 | path: '/pages/pyq/circle/index',
19 | imageUrl: "/image/pyq/pyq03.jpg",
20 | } //转发样式
21 | },
22 |
23 |
24 | getcomment(e) {
25 | // console.log(e)
26 | this.setData({
27 | commentValue: e.detail.value
28 | })
29 | },
30 |
31 |
32 |
33 |
34 | bindComment(e) {
35 | console.log(e.currentTarget.dataset)
36 | this.setData({
37 | placeholderPL: "回复: " + e.currentTarget.dataset.name,
38 | showZan: e.currentTarget.dataset.indexn,
39 | showPinLun: true,
40 | })
41 | },
42 |
43 | showPinLun() {
44 | var main = this.data.wallData[this.data.showZan].userInfo.nickName
45 | this.setData({
46 | placeholderPL: "留言: " + main,
47 | showPinLun: !this.data.showPinLun,
48 | })
49 | },
50 |
51 | previewImage: function(e) {
52 | console.log(e)
53 | wx.previewImage({
54 | current: e.currentTarget.id, // 当前显示图片的http链接
55 | urls: e.currentTarget.dataset.images // 需要预览的图片http链接列表
56 | })
57 | },
58 |
59 | dianzan(e) {
60 | console.log(e.currentTarget.dataset)
61 | console.log(e.currentTarget.dataset.indexn)
62 | if (!this.data.userInfo) {
63 | wx.pageScrollTo({
64 | scrollTop: 200,
65 | })
66 | wx.showToast({
67 | title: '需要授权才能点赞评论,见第一条墙消息.',
68 | icon: 'none'
69 | })
70 | return
71 | }
72 |
73 | wx.cloud.callFunction({
74 | name: 'login'
75 | }).then(res => {
76 | console.log(res.result.openid)
77 | var isZan = this.data.wallData[e.currentTarget.dataset.indexn].zans.some(a => {
78 | return a.openid === res.result.openid
79 | })
80 | console.log(isZan)
81 | //未点赞
82 | if (!isZan) {
83 | var data = this.data.wallData
84 | data[e.currentTarget.dataset.indexn].zans.push({
85 | name: this.data.userInfo.nickName
86 | })
87 | data[e.currentTarget.dataset.indexn].zanText = data[e.currentTarget.dataset.indexn].zans.map(a => {
88 | return a.name
89 | }).join(", ")
90 | this.setData({
91 | wallData: data
92 | })
93 | wx.cloud.callFunction({
94 | name: 'chat',
95 | data: {
96 | type: 'zan',
97 | collectionname: 'circle',
98 | data: {
99 | username: this.data.userInfo.nickName,
100 | _id: e.currentTarget.dataset._id
101 | }
102 | }
103 | }).then(res => {
104 | //刷新此项数据
105 | // const db = wx.cloud.database()
106 | // db.collection("circle").doc(e.currentTarget.dataset._id).get().then(
107 | // res => {
108 | // console.log(res.data)
109 | // var data = this.data.wallData
110 | // data[e.currentTarget.dataset.indexn] = res.data
111 | // for (let i = 0; i < data.length; i++) {
112 | // data[i].time = this.parseTime(data[i].createTime.getTime())
113 | // data[i].zanText = data[i].zans.map(a => {
114 | // return a.name
115 | // }).join(", ")
116 | // }
117 | // this.setData({
118 | // wallData: data
119 | // })
120 | // }
121 | // )
122 | })
123 | }
124 | this.setData({
125 | showZan: -1,
126 | placeholderPL: "留言"
127 | })
128 | })
129 |
130 | },
131 |
132 | submitComment(e) {
133 | if (!this.data.userInfo) {
134 | wx.pageScrollTo({
135 | scrollTop: 200,
136 | })
137 | wx.showToast({
138 | title: '需要授权才能点赞评论,见第一条墙消息.',
139 | icon: 'none',
140 | duration: 5000
141 | })
142 | return
143 | }
144 | if (this.data.commentValue.length <= 0) {
145 | wx.showToast({
146 | title: '内容为空',
147 | icon: 'none'
148 | })
149 | return
150 | }
151 | var _id = this.data.wallData[this.data.showZan]._id
152 | var formId = e.detail.formId
153 | var toName = ""
154 | if (this.data.placeholderPL.includes("回复")) {
155 | toName = this.data.placeholderPL.replace("回复:", "")
156 | console.log(toName)
157 | }
158 | wx.cloud.callFunction({
159 | name: 'chat',
160 | data: {
161 | type: 'comment',
162 | collectionname: 'circle',
163 | data: {
164 | username: this.data.userInfo.nickName,
165 | userInfo: this.data.userInfo,
166 | formId: formId,
167 | _id: _id,
168 | comment: this.data.commentValue,
169 | toName: toName
170 | }
171 | }
172 | }).then(res => {
173 | console.log(res)
174 |
175 | //更新这条数据
176 | const db = wx.cloud.database()
177 | db.collection("circle").doc(_id).get().then(
178 | res => {
179 | console.log(res.data)
180 | var data = this.data.wallData
181 | console.log(data)
182 | console.log(e.currentTarget.dataset.indexn)
183 | data[this.data.showZan] = res.data
184 |
185 | for (let i = 0; i < data.length; i++) {
186 | data[i].time = this.parseTime(data[i].createTime.getTime())
187 | data[i].zanText = data[i].zans.map(a => {
188 | return a.name
189 | }).join(", ")
190 | }
191 | this.setData({
192 | wallData: data,
193 | showZan: -1,
194 | placeholderPL: "留言",
195 | showPinLun: false,
196 | commentValue: ""
197 | })
198 | }
199 | )
200 | })
201 | },
202 |
203 | copyText(e) {
204 | console.log(e.currentTarget.dataset.text)
205 | wx.setClipboardData({
206 | data: e.currentTarget.dataset.text,
207 | })
208 |
209 | },
210 |
211 |
212 | adminDeletePyq(e) {
213 | var that = this
214 | var item = e.currentTarget.dataset.item
215 | const db = wx.cloud.database()
216 | wx.showModal({
217 | title: '提示',
218 | content: '确定删除吗',
219 | cancelText: '取消',
220 | confirmText: '删除',
221 | success(res) {
222 | if (res.confirm) {
223 | wx.cloud.callFunction({
224 | name: 'chat',
225 | data: {
226 | type: 'delete',
227 | collectionname: 'circle',
228 | data: {
229 | fileIDs: item.images,
230 | _id: item._id
231 | }
232 | }
233 | }).then(res => {
234 | var data = that.data.wallData
235 | data.splice(e.currentTarget.dataset.index, 1)
236 | that.setData({
237 | wallData: data
238 | })
239 |
240 | })
241 | }
242 | }
243 | })
244 |
245 | },
246 |
247 | deletePyq(e) {
248 | console.log(e.currentTarget.dataset.item)
249 | console.log(e.currentTarget.dataset.index)
250 | var that = this
251 | var item = e.currentTarget.dataset.item
252 | const db = wx.cloud.database()
253 | wx.showModal({
254 | title: '提示',
255 | content: '确定删除吗',
256 | cancelText: '取消',
257 | confirmText: '删除',
258 | success(res) {
259 | if (res.confirm) {
260 | console.log('用户点击确定')
261 | var data = that.data.wallData
262 | data.splice(e.currentTarget.dataset.index, 1)
263 | that.setData({
264 | wallData: data
265 | })
266 |
267 | db.collection('circle').doc(item._id).remove()
268 | .then(console.log)
269 | .catch(console.error)
270 |
271 | db.collection('circleback').add({
272 | data: {
273 | userInfo: item.userInfo,
274 | createTime: item.createTime,
275 | content: item.content,
276 | zans: item.zans,
277 | images: item.images,
278 | comments: item.comments,
279 | },
280 | })
281 |
282 | } else if (res.cancel) {}
283 | }
284 | })
285 | },
286 |
287 | onLoad: function(options) {
288 | var that = this
289 | console.log(options)
290 | this.setData({
291 | id: options.id
292 | })
293 | this.getMyWallData(options.id)
294 |
295 | if (app.globalData.userInfo) {
296 | this.setData({
297 | userInfo: app.globalData.userInfo
298 | })
299 | } else {
300 | // 查看是否授权
301 | wx.getSetting({
302 | success(res) {
303 | if (res.authSetting['scope.userInfo']) {
304 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称
305 | wx.getUserInfo({
306 | success(res) {
307 | that.setData({
308 | userInfo: res.userInfo
309 | })
310 | }
311 | })
312 | }
313 | }
314 | })
315 | }
316 |
317 | },
318 |
319 |
320 |
321 | toShowZan(e) {
322 | if (e.currentTarget.dataset.index === this.data.showZan) {
323 | this.setData({
324 | showZan: -1,
325 | placeholderPL: "留言"
326 | })
327 | } else {
328 | this.setData({
329 | showZan: e.currentTarget.dataset.index
330 | })
331 | }
332 | },
333 |
334 |
335 |
336 | onPullDownRefresh: function() {
337 | this.getMyWallData(this.data.id)
338 | },
339 |
340 |
341 | toEdit() {
342 | wx.navigateTo({
343 | url: '../edit/index',
344 | })
345 |
346 | },
347 |
348 |
349 | toHome() {
350 | wx.navigateTo({
351 | url: './index',
352 | })
353 | },
354 |
355 | getMyWallData(id) {
356 | console.log(id)
357 | wx.showNavigationBarLoading()
358 | const db = wx.cloud.database()
359 | db.collection("circle").where({
360 | _id: id
361 | }).get().then(res => {
362 | console.log(res)
363 | console.log("MY")
364 |
365 | var zanText
366 | for (let i = 0; i < res.data.length; i++) {
367 | res.data[i].time = this.parseTime(res.data[i].createTime.getTime())
368 | res.data[i].zanText = res.data[i].zans.map(a => {
369 | return a.name
370 | }).join(", ")
371 | }
372 | var data = res.data.sort(function(a, b) {
373 | return b.createTime.getTime() - a.createTime.getTime()
374 | })
375 | this.setData({
376 | wallData: data
377 | })
378 | wx.hideNavigationBarLoading()
379 |
380 | })
381 | },
382 |
383 | onShow: function() {
384 | // this.getWallData(0, this.data.wallData.length, false)
385 |
386 | },
387 | onShareAppMessage: function(e) {
388 | console.log(e)
389 | console.log(this.data.showZan)
390 | var that = this
391 | var item = e.target.dataset.item
392 | console.log(item)
393 | var imageUrl = "/image/pyq/pyq03.jpg"
394 | if (item.images.length > 0) {
395 |
396 | }
397 | var shareObg = {
398 | // title: '仲恺校友圈',
399 | desc: item.content,
400 | path: '/pages/pyq/circle/index',
401 | imageUrl: imageUrl,
402 | } //转发
403 | return shareObg
404 | },
405 |
406 | onPageScroll: function(e) {
407 | this.setData({
408 | showZan: -1,
409 | placeholderPL: "留言",
410 | showPinLun: false,
411 | })
412 | },
413 | parseTime(dateTimeStamp) { //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
414 | var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
415 | var hour = minute * 60;
416 | var day = hour * 24;
417 | var week = day * 7;
418 | var halfamonth = day * 15;
419 | var month = day * 30;
420 | var now = new Date().getTime(); //获取当前时间毫秒
421 | var diffValue = now - dateTimeStamp; //时间差
422 |
423 | if (diffValue < 0) {
424 | return;
425 | }
426 | var minC = diffValue / minute; //计算时间差的分,时,天,周,月
427 | var hourC = diffValue / hour;
428 | var dayC = diffValue / day;
429 | var weekC = diffValue / week;
430 | var monthC = diffValue / month;
431 | var result = "23分钟前"
432 | if (monthC >= 1 && monthC <= 3) {
433 | result = " " + parseInt(monthC) + "月前"
434 | } else if (weekC >= 1 && weekC <= 3) {
435 | result = " " + parseInt(weekC) + "周前"
436 | } else if (dayC >= 1 && dayC <= 6) {
437 | result = " " + parseInt(dayC) + "天前"
438 | } else if (hourC >= 1 && hourC <= 23) {
439 | result = " " + parseInt(hourC) + "小时前"
440 | } else if (minC >= 1 && minC <= 59) {
441 | result = " " + parseInt(minC) + "分钟前"
442 | } else if (diffValue >= 0 && diffValue <= minute) {
443 | result = "刚刚"
444 | } else {
445 | var datetime = new Date();
446 | datetime.setTime(dateTimeStamp);
447 | var Nyear = datetime.getFullYear();
448 | var Nmonth = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
449 | var Ndate = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
450 | var Nhour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
451 | var Nminute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
452 | var Nsecond = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
453 | result = Nyear + "-" + Nmonth + "-" + Ndate
454 | }
455 | return result;
456 | },
457 |
458 |
459 |
460 | })
--------------------------------------------------------------------------------
/cloudfunctions/chat/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chat",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@cloudbase/database": {
8 | "version": "0.1.1",
9 | "resolved": "https://registry.npm.taobao.org/@cloudbase/database/download/@cloudbase/database-0.1.1.tgz",
10 | "integrity": "sha1-yf/JK3HhkAVxljkL6odpZ3f/l/8=",
11 | "requires": {
12 | "bson": "^4.0.2"
13 | }
14 | },
15 | "@protobufjs/aspromise": {
16 | "version": "1.1.2",
17 | "resolved": "http://registry.npm.taobao.org/@protobufjs/aspromise/download/@protobufjs/aspromise-1.1.2.tgz",
18 | "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78="
19 | },
20 | "@protobufjs/base64": {
21 | "version": "1.1.2",
22 | "resolved": "http://registry.npm.taobao.org/@protobufjs/base64/download/@protobufjs/base64-1.1.2.tgz",
23 | "integrity": "sha1-TIVzDlm5ofHzSQR9vyQpYDS7JzU="
24 | },
25 | "@protobufjs/codegen": {
26 | "version": "2.0.4",
27 | "resolved": "http://registry.npm.taobao.org/@protobufjs/codegen/download/@protobufjs/codegen-2.0.4.tgz",
28 | "integrity": "sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs="
29 | },
30 | "@protobufjs/eventemitter": {
31 | "version": "1.1.0",
32 | "resolved": "http://registry.npm.taobao.org/@protobufjs/eventemitter/download/@protobufjs/eventemitter-1.1.0.tgz",
33 | "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A="
34 | },
35 | "@protobufjs/fetch": {
36 | "version": "1.1.0",
37 | "resolved": "http://registry.npm.taobao.org/@protobufjs/fetch/download/@protobufjs/fetch-1.1.0.tgz",
38 | "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=",
39 | "requires": {
40 | "@protobufjs/aspromise": "^1.1.1",
41 | "@protobufjs/inquire": "^1.1.0"
42 | }
43 | },
44 | "@protobufjs/float": {
45 | "version": "1.0.2",
46 | "resolved": "http://registry.npm.taobao.org/@protobufjs/float/download/@protobufjs/float-1.0.2.tgz",
47 | "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E="
48 | },
49 | "@protobufjs/inquire": {
50 | "version": "1.1.0",
51 | "resolved": "http://registry.npm.taobao.org/@protobufjs/inquire/download/@protobufjs/inquire-1.1.0.tgz",
52 | "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik="
53 | },
54 | "@protobufjs/path": {
55 | "version": "1.1.2",
56 | "resolved": "http://registry.npm.taobao.org/@protobufjs/path/download/@protobufjs/path-1.1.2.tgz",
57 | "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0="
58 | },
59 | "@protobufjs/pool": {
60 | "version": "1.1.0",
61 | "resolved": "http://registry.npm.taobao.org/@protobufjs/pool/download/@protobufjs/pool-1.1.0.tgz",
62 | "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q="
63 | },
64 | "@protobufjs/utf8": {
65 | "version": "1.1.0",
66 | "resolved": "http://registry.npm.taobao.org/@protobufjs/utf8/download/@protobufjs/utf8-1.1.0.tgz",
67 | "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA="
68 | },
69 | "@types/long": {
70 | "version": "4.0.0",
71 | "resolved": "https://registry.npm.taobao.org/@types/long/download/@types/long-4.0.0.tgz",
72 | "integrity": "sha1-cZVR0jUtMBrIuB23Mqy2vcKNve8="
73 | },
74 | "@types/node": {
75 | "version": "10.14.15",
76 | "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-10.14.15.tgz?cache=0&sync_timestamp=1565213868223&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-10.14.15.tgz",
77 | "integrity": "sha1-6Pdym2Mb4bAq4TD/C2Hz4BgABkA="
78 | },
79 | "ajv": {
80 | "version": "6.10.2",
81 | "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz",
82 | "integrity": "sha1-086gTWsBeyiUrWkED+yLYj60vVI=",
83 | "requires": {
84 | "fast-deep-equal": "^2.0.1",
85 | "fast-json-stable-stringify": "^2.0.0",
86 | "json-schema-traverse": "^0.4.1",
87 | "uri-js": "^4.2.2"
88 | }
89 | },
90 | "asn1": {
91 | "version": "0.2.4",
92 | "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz",
93 | "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
94 | "requires": {
95 | "safer-buffer": "~2.1.0"
96 | }
97 | },
98 | "assert-plus": {
99 | "version": "1.0.0",
100 | "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz",
101 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
102 | },
103 | "asynckit": {
104 | "version": "0.4.0",
105 | "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
106 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
107 | },
108 | "aws-sign2": {
109 | "version": "0.7.0",
110 | "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz",
111 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
112 | },
113 | "aws4": {
114 | "version": "1.8.0",
115 | "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz",
116 | "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
117 | },
118 | "base64-js": {
119 | "version": "1.3.1",
120 | "resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.3.1.tgz",
121 | "integrity": "sha1-WOzoy3XdB+ce0IxzarxfrE2/jfE="
122 | },
123 | "bcrypt-pbkdf": {
124 | "version": "1.0.2",
125 | "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
126 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
127 | "requires": {
128 | "tweetnacl": "^0.14.3"
129 | }
130 | },
131 | "bson": {
132 | "version": "4.0.2",
133 | "resolved": "https://registry.npm.taobao.org/bson/download/bson-4.0.2.tgz",
134 | "integrity": "sha1-KSn9/tGhRbHDYZCKK5UKbPS+0sI=",
135 | "requires": {
136 | "buffer": "^5.1.0",
137 | "long": "^4.0.0"
138 | }
139 | },
140 | "buffer": {
141 | "version": "5.2.1",
142 | "resolved": "http://registry.npm.taobao.org/buffer/download/buffer-5.2.1.tgz",
143 | "integrity": "sha1-3Vf6DxCaxZxgJHkETcp7iz0LcdY=",
144 | "requires": {
145 | "base64-js": "^1.0.2",
146 | "ieee754": "^1.1.4"
147 | }
148 | },
149 | "caseless": {
150 | "version": "0.12.0",
151 | "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz",
152 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
153 | },
154 | "combined-stream": {
155 | "version": "1.0.8",
156 | "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz",
157 | "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=",
158 | "requires": {
159 | "delayed-stream": "~1.0.0"
160 | }
161 | },
162 | "core-util-is": {
163 | "version": "1.0.2",
164 | "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
165 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
166 | },
167 | "dashdash": {
168 | "version": "1.14.1",
169 | "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
170 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
171 | "requires": {
172 | "assert-plus": "^1.0.0"
173 | }
174 | },
175 | "delayed-stream": {
176 | "version": "1.0.0",
177 | "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
178 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
179 | },
180 | "ecc-jsbn": {
181 | "version": "0.1.2",
182 | "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz",
183 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
184 | "requires": {
185 | "jsbn": "~0.1.0",
186 | "safer-buffer": "^2.1.0"
187 | }
188 | },
189 | "extend": {
190 | "version": "3.0.2",
191 | "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
192 | "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
193 | },
194 | "extsprintf": {
195 | "version": "1.3.0",
196 | "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
197 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
198 | },
199 | "fast-deep-equal": {
200 | "version": "2.0.1",
201 | "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz?cache=0&sync_timestamp=1562517919182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-2.0.1.tgz",
202 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
203 | },
204 | "fast-json-stable-stringify": {
205 | "version": "2.0.0",
206 | "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz",
207 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
208 | },
209 | "forever-agent": {
210 | "version": "0.6.1",
211 | "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz",
212 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
213 | },
214 | "form-data": {
215 | "version": "2.3.3",
216 | "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz?cache=0&sync_timestamp=1562216133657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.3.3.tgz",
217 | "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
218 | "requires": {
219 | "asynckit": "^0.4.0",
220 | "combined-stream": "^1.0.6",
221 | "mime-types": "^2.1.12"
222 | }
223 | },
224 | "function-bind": {
225 | "version": "1.1.1",
226 | "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz",
227 | "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
228 | },
229 | "getpass": {
230 | "version": "0.1.7",
231 | "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
232 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
233 | "requires": {
234 | "assert-plus": "^1.0.0"
235 | }
236 | },
237 | "har-schema": {
238 | "version": "2.0.0",
239 | "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz",
240 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
241 | },
242 | "har-validator": {
243 | "version": "5.1.3",
244 | "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz",
245 | "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
246 | "requires": {
247 | "ajv": "^6.5.5",
248 | "har-schema": "^2.0.0"
249 | }
250 | },
251 | "has": {
252 | "version": "1.0.3",
253 | "resolved": "http://registry.npm.taobao.org/has/download/has-1.0.3.tgz",
254 | "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
255 | "requires": {
256 | "function-bind": "^1.1.1"
257 | }
258 | },
259 | "http-signature": {
260 | "version": "1.2.0",
261 | "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz",
262 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
263 | "requires": {
264 | "assert-plus": "^1.0.0",
265 | "jsprim": "^1.2.2",
266 | "sshpk": "^1.7.0"
267 | }
268 | },
269 | "ieee754": {
270 | "version": "1.1.13",
271 | "resolved": "http://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz",
272 | "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q="
273 | },
274 | "is-regex": {
275 | "version": "1.0.4",
276 | "resolved": "http://registry.npm.taobao.org/is-regex/download/is-regex-1.0.4.tgz",
277 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
278 | "requires": {
279 | "has": "^1.0.1"
280 | }
281 | },
282 | "is-typedarray": {
283 | "version": "1.0.0",
284 | "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
285 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
286 | },
287 | "isstream": {
288 | "version": "0.1.2",
289 | "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz",
290 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
291 | },
292 | "jsbn": {
293 | "version": "0.1.1",
294 | "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz",
295 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
296 | },
297 | "json-schema": {
298 | "version": "0.2.3",
299 | "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz",
300 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
301 | },
302 | "json-schema-traverse": {
303 | "version": "0.4.1",
304 | "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
305 | "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
306 | },
307 | "json-stringify-safe": {
308 | "version": "5.0.1",
309 | "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
310 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
311 | },
312 | "jsprim": {
313 | "version": "1.4.1",
314 | "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz",
315 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
316 | "requires": {
317 | "assert-plus": "1.0.0",
318 | "extsprintf": "1.3.0",
319 | "json-schema": "0.2.3",
320 | "verror": "1.10.0"
321 | }
322 | },
323 | "lodash.merge": {
324 | "version": "4.6.2",
325 | "resolved": "https://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.2.tgz",
326 | "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo="
327 | },
328 | "long": {
329 | "version": "4.0.0",
330 | "resolved": "http://registry.npm.taobao.org/long/download/long-4.0.0.tgz",
331 | "integrity": "sha1-mntxz7fTYaGU6lVSQckvdGjVvyg="
332 | },
333 | "mime-db": {
334 | "version": "1.40.0",
335 | "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.40.0.tgz",
336 | "integrity": "sha1-plBX6ZjbCQ9zKmj2wnbTh9QSbDI="
337 | },
338 | "mime-types": {
339 | "version": "2.1.24",
340 | "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.24.tgz",
341 | "integrity": "sha1-tvjQs+lR77d97eyhlM/20W9nb4E=",
342 | "requires": {
343 | "mime-db": "1.40.0"
344 | }
345 | },
346 | "oauth-sign": {
347 | "version": "0.9.0",
348 | "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz",
349 | "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
350 | },
351 | "performance-now": {
352 | "version": "2.1.0",
353 | "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz",
354 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
355 | },
356 | "protobufjs": {
357 | "version": "6.8.8",
358 | "resolved": "http://registry.npm.taobao.org/protobufjs/download/protobufjs-6.8.8.tgz",
359 | "integrity": "sha1-yLTxKC/XqQ5vWxCe0RyEr4KQjnw=",
360 | "requires": {
361 | "@protobufjs/aspromise": "^1.1.2",
362 | "@protobufjs/base64": "^1.1.2",
363 | "@protobufjs/codegen": "^2.0.4",
364 | "@protobufjs/eventemitter": "^1.1.0",
365 | "@protobufjs/fetch": "^1.1.0",
366 | "@protobufjs/float": "^1.0.2",
367 | "@protobufjs/inquire": "^1.1.0",
368 | "@protobufjs/path": "^1.1.2",
369 | "@protobufjs/pool": "^1.1.0",
370 | "@protobufjs/utf8": "^1.1.0",
371 | "@types/long": "^4.0.0",
372 | "@types/node": "^10.1.0",
373 | "long": "^4.0.0"
374 | }
375 | },
376 | "psl": {
377 | "version": "1.3.0",
378 | "resolved": "https://registry.npm.taobao.org/psl/download/psl-1.3.0.tgz",
379 | "integrity": "sha1-4ev2o7VWT6g3bz2iJ12nbYdcob0="
380 | },
381 | "punycode": {
382 | "version": "2.1.1",
383 | "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz",
384 | "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
385 | },
386 | "qs": {
387 | "version": "6.5.2",
388 | "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz",
389 | "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
390 | },
391 | "request": {
392 | "version": "2.88.0",
393 | "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz",
394 | "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
395 | "requires": {
396 | "aws-sign2": "~0.7.0",
397 | "aws4": "^1.8.0",
398 | "caseless": "~0.12.0",
399 | "combined-stream": "~1.0.6",
400 | "extend": "~3.0.2",
401 | "forever-agent": "~0.6.1",
402 | "form-data": "~2.3.2",
403 | "har-validator": "~5.1.0",
404 | "http-signature": "~1.2.0",
405 | "is-typedarray": "~1.0.0",
406 | "isstream": "~0.1.2",
407 | "json-stringify-safe": "~5.0.1",
408 | "mime-types": "~2.1.19",
409 | "oauth-sign": "~0.9.0",
410 | "performance-now": "^2.1.0",
411 | "qs": "~6.5.2",
412 | "safe-buffer": "^5.1.2",
413 | "tough-cookie": "~2.4.3",
414 | "tunnel-agent": "^0.6.0",
415 | "uuid": "^3.3.2"
416 | }
417 | },
418 | "safe-buffer": {
419 | "version": "5.2.0",
420 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz",
421 | "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk="
422 | },
423 | "safer-buffer": {
424 | "version": "2.1.2",
425 | "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz",
426 | "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
427 | },
428 | "sax": {
429 | "version": "1.2.4",
430 | "resolved": "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz",
431 | "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk="
432 | },
433 | "sshpk": {
434 | "version": "1.16.1",
435 | "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz",
436 | "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=",
437 | "requires": {
438 | "asn1": "~0.2.3",
439 | "assert-plus": "^1.0.0",
440 | "bcrypt-pbkdf": "^1.0.0",
441 | "dashdash": "^1.12.0",
442 | "ecc-jsbn": "~0.1.1",
443 | "getpass": "^0.1.1",
444 | "jsbn": "~0.1.0",
445 | "safer-buffer": "^2.0.2",
446 | "tweetnacl": "~0.14.0"
447 | }
448 | },
449 | "tcb-admin-node": {
450 | "version": "1.9.0",
451 | "resolved": "https://registry.npm.taobao.org/tcb-admin-node/download/tcb-admin-node-1.9.0.tgz",
452 | "integrity": "sha1-tIlzwQEzuPvSp4dA3WA6Fieg3OE=",
453 | "requires": {
454 | "@cloudbase/database": "0.1.1",
455 | "is-regex": "^1.0.4",
456 | "lodash.merge": "^4.6.1",
457 | "request": "^2.87.0",
458 | "xml2js": "^0.4.19"
459 | }
460 | },
461 | "tough-cookie": {
462 | "version": "2.4.3",
463 | "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz",
464 | "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=",
465 | "requires": {
466 | "psl": "^1.1.24",
467 | "punycode": "^1.4.1"
468 | },
469 | "dependencies": {
470 | "punycode": {
471 | "version": "1.4.1",
472 | "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz",
473 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
474 | }
475 | }
476 | },
477 | "tslib": {
478 | "version": "1.10.0",
479 | "resolved": "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz",
480 | "integrity": "sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo="
481 | },
482 | "tunnel-agent": {
483 | "version": "0.6.0",
484 | "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
485 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
486 | "requires": {
487 | "safe-buffer": "^5.0.1"
488 | }
489 | },
490 | "tweetnacl": {
491 | "version": "0.14.5",
492 | "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz",
493 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
494 | },
495 | "uri-js": {
496 | "version": "4.2.2",
497 | "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz",
498 | "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=",
499 | "requires": {
500 | "punycode": "^2.1.0"
501 | }
502 | },
503 | "uuid": {
504 | "version": "3.3.2",
505 | "resolved": "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz",
506 | "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE="
507 | },
508 | "verror": {
509 | "version": "1.10.0",
510 | "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz",
511 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
512 | "requires": {
513 | "assert-plus": "^1.0.0",
514 | "core-util-is": "1.0.2",
515 | "extsprintf": "^1.2.0"
516 | }
517 | },
518 | "wx-server-sdk": {
519 | "version": "0.8.1",
520 | "resolved": "https://registry.npm.taobao.org/wx-server-sdk/download/wx-server-sdk-0.8.1.tgz",
521 | "integrity": "sha1-F9ruTGtZsYs6iqQi1d58+TTcnMI=",
522 | "requires": {
523 | "protobufjs": "6.8.8",
524 | "tcb-admin-node": "1.9.0",
525 | "tslib": "^1.9.3"
526 | }
527 | },
528 | "xml2js": {
529 | "version": "0.4.19",
530 | "resolved": "http://registry.npm.taobao.org/xml2js/download/xml2js-0.4.19.tgz",
531 | "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=",
532 | "requires": {
533 | "sax": ">=0.6.0",
534 | "xmlbuilder": "~9.0.1"
535 | }
536 | },
537 | "xmlbuilder": {
538 | "version": "9.0.7",
539 | "resolved": "https://registry.npm.taobao.org/xmlbuilder/download/xmlbuilder-9.0.7.tgz",
540 | "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
541 | }
542 | }
543 | }
544 |
--------------------------------------------------------------------------------
/miniprogram/pages/pyq/circle/index.js:
--------------------------------------------------------------------------------
1 | const app = getApp()
2 | Page({
3 | data: {
4 | //导航栏
5 | tabIndex: 3,
6 | tabList: [{
7 | name: "迎新",
8 | isSelect: false
9 | },
10 | {
11 | name: "社团",
12 | isSelect: false
13 | },
14 | {
15 | name: "表白墙",
16 | isSelect: false
17 | },
18 | {
19 | name: "全部",
20 | isSelect: true
21 | },
22 | {
23 | name: "问与答",
24 | isSelect: false
25 | },
26 | {
27 | name: "闲置",
28 | isSelect: false
29 | },
30 | {
31 | name: "失物",
32 | isSelect: false
33 | }
34 | ],
35 | statusBarHeight: app.globalData.statusBarHeight,
36 | wallData: [],
37 | showZan: -1, //显示点赞按钮
38 | showPinLun: false,
39 | nmAvator: '/image/pyq/ng.jpg',
40 | commentValue: '',
41 | placeholderPL: '评论',
42 | userInfo: undefined,
43 | batchTimes: undefined, //分页
44 | btoText: "正在加载...",
45 | adminOpenid: "oOmqu4pDpN-1db4Ms_U0fjmCfBAw",
46 | shareObg: {
47 | title: '仲恺校友圈',
48 | desc: '',
49 | path: '/pages/pyq/circle/index',
50 | imageUrl: "/image/pyq/pyq03.jpg",
51 | } //转发样式
52 | },
53 |
54 | getUserInfo: function(e) {
55 | console.log(e)
56 | this.setData({
57 | userInfo: e.detail.userInfo,
58 | })
59 | },
60 |
61 | lookDetail(e) {
62 | console.log(e.currentTarget.dataset.index)
63 | // var data = JSON.stringify(this.data.wallData[e.currentTarget.dataset.index])
64 | wx.navigateTo({
65 | url: './detail?id=' + e.currentTarget.dataset.index,
66 | })
67 | },
68 |
69 | getcomment(e) {
70 | // console.log(e)
71 | this.setData({
72 | commentValue: e.detail.value
73 | })
74 | },
75 |
76 | bindChangeTab(e) {
77 | console.log(e.currentTarget.dataset.index)
78 | var tab = this.data.tabList
79 | for (var i = 0; i < tab.length; i++) {
80 | tab[i].isSelect = false
81 | }
82 | tab[e.currentTarget.dataset.index].isSelect = true
83 | this.setData({
84 | tabList: tab,
85 | tabIndex: e.currentTarget.dataset.index
86 | })
87 | this.getWallData(0, 10, false, tab[e.currentTarget.dataset.index].name)
88 | },
89 |
90 |
91 | bindComment(e) {
92 | console.log(e.currentTarget.dataset)
93 | this.setData({
94 | placeholderPL: "回复: " + e.currentTarget.dataset.name,
95 | showZan: e.currentTarget.dataset.indexn,
96 | showPinLun: true,
97 | })
98 | },
99 |
100 | lookArticle(e) {
101 | wx.navigateTo({
102 | url: '/pages/code/article/index?url=' + e.currentTarget.dataset.url,
103 | })
104 | },
105 |
106 | showPinLun() {
107 | var main = this.data.wallData[this.data.showZan].userInfo.nickName
108 | this.setData({
109 | placeholderPL: "留言: " + main,
110 | showPinLun: !this.data.showPinLun,
111 | })
112 | },
113 |
114 | previewImage: function(e) {
115 | console.log(e)
116 | wx.previewImage({
117 | current: e.currentTarget.id, // 当前显示图片的http链接
118 | urls: e.currentTarget.dataset.images // 需要预览的图片http链接列表
119 | })
120 | },
121 |
122 | dianzan(e) {
123 | console.log(e.currentTarget.dataset)
124 | console.log(e.currentTarget.dataset.indexn)
125 | if (!this.data.userInfo) {
126 | wx.pageScrollTo({
127 | scrollTop: 200,
128 | })
129 | wx.showToast({
130 | title: '需要授权才能点赞评论,见第一条墙消息.',
131 | icon: 'none'
132 | })
133 | return
134 | }
135 |
136 | wx.cloud.callFunction({
137 | name: 'login'
138 | }).then(res => {
139 | console.log(res.result.openid)
140 | var isZan = this.data.wallData[e.currentTarget.dataset.indexn].zans.some(a => {
141 | return a.openid === res.result.openid
142 | })
143 | console.log(isZan)
144 | //未点赞
145 | if (!isZan) {
146 | var data = this.data.wallData
147 | data[e.currentTarget.dataset.indexn].zans.push({
148 | name: this.data.userInfo.nickName
149 | })
150 | data[e.currentTarget.dataset.indexn].zanText = data[e.currentTarget.dataset.indexn].zans.map(a => {
151 | return a.name
152 | }).join(", ")
153 | this.setData({
154 | wallData: data
155 | })
156 | wx.cloud.callFunction({
157 | name: 'chat',
158 | data: {
159 | type: 'zan',
160 | collectionname: 'circle',
161 | data: {
162 | username: this.data.userInfo.nickName,
163 | _id: e.currentTarget.dataset._id
164 | }
165 | }
166 | }).then(res => {
167 | //刷新此项数据
168 | // const db = wx.cloud.database()
169 | // db.collection("circle").doc(e.currentTarget.dataset._id).get().then(
170 | // res => {
171 | // console.log(res.data)
172 | // var data = this.data.wallData
173 | // data[e.currentTarget.dataset.indexn] = res.data
174 | // for (let i = 0; i < data.length; i++) {
175 | // data[i].time = this.parseTime(data[i].createTime.getTime())
176 | // data[i].zanText = data[i].zans.map(a => {
177 | // return a.name
178 | // }).join(", ")
179 | // }
180 | // this.setData({
181 | // wallData: data
182 | // })
183 | // }
184 | // )
185 | })
186 | }
187 | this.setData({
188 | showZan: -1,
189 | placeholderPL: "留言"
190 | })
191 | })
192 |
193 | },
194 |
195 | submitComment(e) {
196 | // wx.showToast({
197 | // title: '评论功能暂未开放',
198 | // icon: 'none'
199 | // })
200 | // return
201 |
202 | if (!this.data.userInfo) {
203 | wx.pageScrollTo({
204 | scrollTop: 200,
205 | })
206 | wx.showToast({
207 | title: '需要授权才能点赞评论,见第一条墙消息.',
208 | icon: 'none',
209 | duration: 5000
210 | })
211 | return
212 | }
213 | if (this.data.commentValue.length <= 0) {
214 | wx.showToast({
215 | title: '内容为空',
216 | icon: 'none'
217 | })
218 | return
219 | }
220 | var _id = this.data.wallData[this.data.showZan]._id
221 | var formId = e.detail.formId
222 | var toName = ""
223 | if (this.data.placeholderPL.includes("回复")) {
224 | toName = this.data.placeholderPL.replace("回复:", "")
225 | console.log(toName)
226 | }
227 | wx.cloud.callFunction({
228 | name: 'chat',
229 | data: {
230 | type: 'comment',
231 | collectionname: 'circle',
232 | data: {
233 | username: this.data.userInfo.nickName,
234 | userInfo: this.data.userInfo,
235 | formId: formId,
236 | _id: _id,
237 | comment: this.data.commentValue,
238 | toName: toName
239 | }
240 | }
241 | }).then(res => {
242 | console.log(res)
243 |
244 | //更新这条数据
245 | const db = wx.cloud.database()
246 | db.collection("circle").doc(_id).get().then(
247 | res => {
248 | console.log(res.data)
249 | var data = this.data.wallData
250 | console.log(data)
251 | console.log(e.currentTarget.dataset.indexn)
252 | data[this.data.showZan] = res.data
253 |
254 | for (let i = 0; i < data.length; i++) {
255 | data[i].time = this.parseTime(data[i].createTime.getTime())
256 | data[i].zanText = data[i].zans.map(a => {
257 | return a.name
258 | }).join(", ")
259 | }
260 | this.setData({
261 | wallData: data,
262 | showZan: -1,
263 | placeholderPL: "留言",
264 | showPinLun: false,
265 | commentValue: ""
266 | })
267 | }
268 | )
269 | })
270 | },
271 |
272 | copyText(e) {
273 | console.log(e.currentTarget.dataset.text)
274 | wx.setClipboardData({
275 | data: e.currentTarget.dataset.text,
276 | })
277 |
278 | },
279 |
280 | toHome() {
281 | wx.navigateToMiniProgram({
282 | appId: 'wxa596944194794d5b',
283 | })
284 | // wx.switchTab({
285 | // url: '/pages/index/index',
286 | // })
287 | },
288 |
289 | toEdit() {
290 | wx.navigateTo({
291 | url: '../edit/index',
292 | })
293 | // wx.showToast({
294 | // title: '发布功能暂未开放',
295 | // icon: 'none'
296 | // })
297 | },
298 |
299 |
300 | getMyWallData() {
301 | wx.showNavigationBarLoading()
302 | wx.cloud.callFunction({
303 | name: 'login'
304 | }).then(res => {
305 | const db = wx.cloud.database()
306 | db.collection("circle").where({
307 | _openid: res.result.openid
308 | }).get().then(res => {
309 | var zanText
310 | for (let i = 0; i < res.data.length; i++) {
311 | res.data[i].time = this.parseTime(res.data[i].createTime.getTime())
312 | res.data[i].zanText = res.data[i].zans.map(a => {
313 | return a.name
314 | }).join(", ")
315 | }
316 | var data = res.data.sort(function(a, b) {
317 | return b.createTime.getTime() - a.createTime.getTime()
318 | })
319 | this.setData({
320 | wallData: data
321 | })
322 | wx.hideNavigationBarLoading()
323 |
324 | })
325 | })
326 | },
327 |
328 | getWallData(skip = 0, limit = 10, concat = true, tab = undefined) {
329 | wx.showNavigationBarLoading()
330 | wx.showToast({
331 | title: '加载中',
332 | icon: 'loading',
333 | })
334 | const db = wx.cloud.database()
335 |
336 | if (tab === "表白墙") {
337 | tab = "表白"
338 | }
339 | if (tab === "全部") {
340 | tab = undefined
341 | }
342 | db.collection("circle").skip(skip).limit(limit).orderBy('time', 'desc').where({
343 | tab: tab,
344 | isTop: false
345 | }).get().then(res => {
346 | var zanText
347 | for (let i = 0; i < res.data.length; i++) {
348 | res.data[i].time = this.parseTime(res.data[i].createTime.getTime())
349 | res.data[i].zanText = res.data[i].zans.map(a => {
350 | return a.name
351 | }).join(", ")
352 |
353 | if (res.data[i].content.length > 100) {
354 | res.data[i].isOver = true
355 | res.data[i].content = res.data[i].content.slice(0, 96) + "..."
356 |
357 | }
358 |
359 | res.data[i].comments = res.data[i].comments.sort(function(a, b) {
360 | return a.createTime.getTime() - b.createTime.getTime()
361 | })
362 | }
363 |
364 |
365 | console.log(res.data)
366 | var data = res.data.sort(function(a, b) {
367 | return b.createTime.getTime() - a.createTime.getTime()
368 | })
369 | if (concat) {
370 | data = this.data.wallData.concat(data)
371 | }
372 | if (data.length === 0) {
373 | this.setData({
374 | btoText: '暂无更多~'
375 | })
376 | }
377 | this.setData({
378 | wallData: data
379 | })
380 | wx.hideToast()
381 | wx.hideNavigationBarLoading()
382 | wx.stopPullDownRefresh()
383 | })
384 | },
385 |
386 | cancleTop(e) {
387 | var that = this
388 | var item = e.currentTarget.dataset.item
389 | const db = wx.cloud.database()
390 | wx.showModal({
391 | title: '提示',
392 | content: '确定取消置顶吗',
393 | cancelText: '取消',
394 | confirmText: '确定取消',
395 | success(res) {
396 | if (res.confirm) {
397 | wx.cloud.callFunction({
398 | name: 'chat',
399 | data: {
400 | type: 'top',
401 | collectionname: 'circle',
402 | data: {
403 | _id: item._id,
404 | isTop: false
405 | }
406 | }
407 | }).then(res => {
408 | wx.showToast({
409 | title: '成功',
410 | })
411 | })
412 | }
413 | }
414 | })
415 | },
416 |
417 | adminTopPyq(e) {
418 | var that = this
419 | var item = e.currentTarget.dataset.item
420 | const db = wx.cloud.database()
421 | wx.showModal({
422 | title: '提示',
423 | content: '确定置顶吗',
424 | cancelText: '取消',
425 | confirmText: '置顶',
426 | success(res) {
427 | if (res.confirm) {
428 | wx.cloud.callFunction({
429 | name: 'chat',
430 | data: {
431 | type: 'top',
432 | collectionname: 'circle',
433 | data: {
434 | _id: item._id,
435 | isTop: true
436 | }
437 | }
438 | }).then(res => {
439 | wx.showToast({
440 | title: '成功',
441 | })
442 | })
443 | }
444 | }
445 | })
446 | },
447 | adminDeletePyq(e) {
448 | var that = this
449 | var item = e.currentTarget.dataset.item
450 | const db = wx.cloud.database()
451 | wx.showModal({
452 | title: '提示',
453 | content: '确定删除吗',
454 | cancelText: '取消',
455 | confirmText: '删除',
456 | success(res) {
457 | if (res.confirm) {
458 | wx.cloud.callFunction({
459 | name: 'chat',
460 | data: {
461 | type: 'delete',
462 | collectionname: 'circle',
463 | data: {
464 | fileIDs: item.images,
465 | _id: item._id
466 | }
467 | }
468 | }).then(res => {
469 | var data = that.data.wallData
470 | data.splice(e.currentTarget.dataset.index, 1)
471 | that.setData({
472 | wallData: data
473 | })
474 |
475 | })
476 | }
477 | }
478 | })
479 |
480 | },
481 |
482 | deletePyq(e) {
483 | console.log(e.currentTarget.dataset.item)
484 | console.log(e.currentTarget.dataset.index)
485 | var that = this
486 | var item = e.currentTarget.dataset.item
487 | const db = wx.cloud.database()
488 | wx.showModal({
489 | title: '提示',
490 | content: '确定删除吗',
491 | cancelText: '取消',
492 | confirmText: '删除',
493 | success(res) {
494 | if (res.confirm) {
495 | console.log('用户点击确定')
496 | var data = that.data.wallData
497 | data.splice(e.currentTarget.dataset.index, 1)
498 | that.setData({
499 | wallData: data
500 | })
501 |
502 | db.collection('circle').doc(item._id).remove()
503 | .then(console.log)
504 | .catch(console.error)
505 |
506 | db.collection('circleback').add({
507 | data: {
508 | userInfo: item.userInfo,
509 | createTime: item.createTime,
510 | content: item.content,
511 | zans: item.zans,
512 | images: item.images,
513 | comments: item.comments,
514 | },
515 | })
516 | // wx.cloud.deleteFile({
517 | // fileList: ['a7xzcb']
518 | // }).then(res => {
519 | // // handle success
520 | // console.log(res.fileList)
521 | // }).catch(error => {
522 | // // handle error
523 | // })
524 | } else if (res.cancel) {}
525 | }
526 | })
527 | },
528 |
529 | onLoad: function(options) {
530 | var that = this
531 | if (app.globalData.userInfo) {
532 | this.setData({
533 | userInfo: app.globalData.userInfo
534 | })
535 | } else {
536 | // 查看是否授权
537 | wx.getSetting({
538 | success(res) {
539 | if (res.authSetting['scope.userInfo']) {
540 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称
541 | wx.getUserInfo({
542 | success(res) {
543 | that.setData({
544 | userInfo: res.userInfo
545 | })
546 | }
547 | })
548 | }
549 | }
550 | })
551 | }
552 |
553 |
554 | this.getWallData(0, 10, false)
555 |
556 | wx.cloud.callFunction({
557 | name: 'login'
558 | }).then(res => {
559 | console.log(res.result.openid)
560 |
561 | that.setData({
562 | openid: res.result.openid
563 | })
564 | })
565 |
566 | },
567 |
568 |
569 |
570 | toShowZan(e) {
571 | if (e.currentTarget.dataset.index === this.data.showZan) {
572 | this.setData({
573 | showZan: -1,
574 | placeholderPL: "留言"
575 | })
576 | } else {
577 | this.setData({
578 | showZan: e.currentTarget.dataset.index
579 | })
580 | }
581 | },
582 |
583 |
584 |
585 | onPullDownRefresh: function() {
586 | this.getWallData(0, 10, false, this.data.tabList[this.data.tabIndex].name)
587 | if (this.data.tabIndex === 3) {
588 | this.getTopWallData()
589 | }
590 |
591 | },
592 |
593 | getWallDataOfSkip() {
594 | var batchTimes = this.data.batchTimes
595 | var skip = this.data.wallData.length
596 | if (batchTimes > 0) {
597 |
598 | this.getWallData(skip, 10, true, this.data.tabList[this.data.tabIndex].name)
599 |
600 | this.setData({
601 | batchTimes: this.data.batchTimes - 1
602 | })
603 | } else {
604 | this.setData({
605 | btoText: '已经到底了~'
606 | })
607 | }
608 | },
609 |
610 | onReachBottom: function() {
611 | console.log("Bottom")
612 | this.getWallDataOfSkip()
613 | },
614 |
615 | bindShare(e) {
616 | var that = this
617 | var item = e.currentTarget.dataset.item
618 | console.log(item)
619 | var imageUrl = "/image/pyq/pyq03.jpg"
620 | if (item.images.length > 0) {
621 | imageUrl = item.images[0]
622 | }
623 | var shareObg = {
624 | title: '仲恺校友圈',
625 | desc: item.content,
626 | path: '/pages/pyq/circle/index',
627 | imageUrl: imageUrl,
628 | } //转发
629 | this.setData({
630 | shareObg: shareObg
631 | })
632 | },
633 |
634 | onShow: function() {
635 | // this.getWallData(0, this.data.wallData.length, false)
636 | const db = wx.cloud.database()
637 | db.collection('circle').count().then(res => {
638 | console.log(res.total)
639 | const total = res.total
640 | // 计算需分几次取
641 | const batchTimes = Math.ceil(total / 10)
642 | console.log(batchTimes)
643 | this.setData({
644 | batchTimes: batchTimes - 1
645 | })
646 | })
647 |
648 | this.getTopWallData()
649 | },
650 |
651 | onShareAppMessage: function(e) {
652 | var that = this
653 | var item = e.target.dataset.item
654 | var desc = item.content.slice(0, 10)
655 | var imageUrl = "/image/pyq/2.jpg"
656 | console.log(item)
657 | if (item.content.length < 2 || !item.content) {
658 | desc = item.userInfo.nickName + "给你发来一条消息"
659 | console.log("12324")
660 | }
661 | var shareObg = {
662 | desc: desc,
663 | path: '/pages/pyq/circle/detail?id=' + item._id,
664 | imageUrl: imageUrl,
665 | } //转发
666 | return shareObg
667 | },
668 |
669 | onPageScroll: function(e) {
670 | this.setData({
671 | showZan: -1,
672 | placeholderPL: "留言",
673 | showPinLun: false,
674 | })
675 | },
676 |
677 | parseTime(dateTimeStamp) { //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
678 | var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
679 | var hour = minute * 60;
680 | var day = hour * 24;
681 | var week = day * 7;
682 | var halfamonth = day * 15;
683 | var month = day * 30;
684 | var now = new Date().getTime(); //获取当前时间毫秒
685 | var diffValue = now - dateTimeStamp; //时间差
686 |
687 | if (diffValue < 0) {
688 | return;
689 | }
690 | var minC = diffValue / minute; //计算时间差的分,时,天,周,月
691 | var hourC = diffValue / hour;
692 | var dayC = diffValue / day;
693 | var weekC = diffValue / week;
694 | var monthC = diffValue / month;
695 | var result = "23分钟前"
696 | if (monthC >= 1 && monthC <= 3) {
697 | result = " " + parseInt(monthC) + "月前"
698 | } else if (weekC >= 1 && weekC <= 3) {
699 | result = " " + parseInt(weekC) + "周前"
700 | } else if (dayC >= 1 && dayC <= 6) {
701 | result = " " + parseInt(dayC) + "天前"
702 | } else if (hourC >= 1 && hourC <= 23) {
703 | result = " " + parseInt(hourC) + "小时前"
704 | } else if (minC >= 1 && minC <= 59) {
705 | result = " " + parseInt(minC) + "分钟前"
706 | } else if (diffValue >= 0 && diffValue <= minute) {
707 | result = "刚刚"
708 | } else {
709 | var datetime = new Date();
710 | datetime.setTime(dateTimeStamp);
711 | var Nyear = datetime.getFullYear();
712 | var Nmonth = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
713 | var Ndate = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
714 | var Nhour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
715 | var Nminute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
716 | var Nsecond = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
717 | result = Nyear + "-" + Nmonth + "-" + Ndate
718 | }
719 | return result;
720 | },
721 |
722 | getTopWallData() {
723 |
724 | const db = wx.cloud.database()
725 |
726 | db.collection("circle").orderBy('time', 'desc').where({
727 | isTop: true
728 | }).get().then(res => {
729 | var zanText
730 | for (let i = 0; i < res.data.length; i++) {
731 | res.data[i].time = this.parseTime(res.data[i].createTime.getTime())
732 | res.data[i].zanText = res.data[i].zans.map(a => {
733 | return a.name
734 | }).join(", ")
735 |
736 | if (res.data[i].content.length > 100) {
737 | res.data[i].isOver = true
738 | res.data[i].content = res.data[i].content.slice(0, 96) + "..."
739 | }
740 |
741 | res.data[i].comments = res.data[i].comments.sort(function(a, b) {
742 | return a.createTime.getTime() - b.createTime.getTime()
743 | })
744 | }
745 |
746 |
747 | var data = res.data.sort(function(a, b) {
748 | return b.createTime.getTime() - a.createTime.getTime()
749 | })
750 |
751 |
752 | this.setData({
753 | topData: data
754 | })
755 | })
756 | },
757 |
758 | })
--------------------------------------------------------------------------------
/cloudfunctions/wxparse/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wxparse",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@types/node": {
8 | "version": "12.7.2",
9 | "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-12.7.2.tgz?cache=0&sync_timestamp=1566325318079&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-12.7.2.tgz",
10 | "integrity": "sha1-xOY69eiCPOnMPws097mYwhcfDEQ="
11 | },
12 | "ajv": {
13 | "version": "6.10.2",
14 | "resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz",
15 | "integrity": "sha1-086gTWsBeyiUrWkED+yLYj60vVI=",
16 | "requires": {
17 | "fast-deep-equal": "^2.0.1",
18 | "fast-json-stable-stringify": "^2.0.0",
19 | "json-schema-traverse": "^0.4.1",
20 | "uri-js": "^4.2.2"
21 | }
22 | },
23 | "asn1": {
24 | "version": "0.2.4",
25 | "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz",
26 | "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
27 | "requires": {
28 | "safer-buffer": "~2.1.0"
29 | }
30 | },
31 | "assert-plus": {
32 | "version": "1.0.0",
33 | "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz",
34 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
35 | },
36 | "asynckit": {
37 | "version": "0.4.0",
38 | "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
39 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
40 | },
41 | "aws-sign2": {
42 | "version": "0.7.0",
43 | "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz",
44 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
45 | },
46 | "aws4": {
47 | "version": "1.8.0",
48 | "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz",
49 | "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
50 | },
51 | "bcrypt-pbkdf": {
52 | "version": "1.0.2",
53 | "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
54 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
55 | "requires": {
56 | "tweetnacl": "^0.14.3"
57 | }
58 | },
59 | "bluebird": {
60 | "version": "3.5.5",
61 | "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.5.5.tgz",
62 | "integrity": "sha1-qNCv1zJR7/u9X+OEp31zADwXpx8="
63 | },
64 | "boolbase": {
65 | "version": "1.0.0",
66 | "resolved": "http://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz",
67 | "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
68 | },
69 | "caseless": {
70 | "version": "0.12.0",
71 | "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz",
72 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
73 | },
74 | "cheerio": {
75 | "version": "1.0.0-rc.3",
76 | "resolved": "https://registry.npm.taobao.org/cheerio/download/cheerio-1.0.0-rc.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcheerio%2Fdownload%2Fcheerio-1.0.0-rc.3.tgz",
77 | "integrity": "sha1-CUY21CWy6cD065GkbAVjDJoai/Y=",
78 | "requires": {
79 | "css-select": "~1.2.0",
80 | "dom-serializer": "~0.1.1",
81 | "entities": "~1.1.1",
82 | "htmlparser2": "^3.9.1",
83 | "lodash": "^4.15.0",
84 | "parse5": "^3.0.1"
85 | }
86 | },
87 | "combined-stream": {
88 | "version": "1.0.8",
89 | "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz",
90 | "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=",
91 | "requires": {
92 | "delayed-stream": "~1.0.0"
93 | }
94 | },
95 | "core-util-is": {
96 | "version": "1.0.2",
97 | "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
98 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
99 | },
100 | "css-select": {
101 | "version": "1.2.0",
102 | "resolved": "http://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz",
103 | "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
104 | "requires": {
105 | "boolbase": "~1.0.0",
106 | "css-what": "2.1",
107 | "domutils": "1.5.1",
108 | "nth-check": "~1.0.1"
109 | }
110 | },
111 | "css-what": {
112 | "version": "2.1.3",
113 | "resolved": "https://registry.npm.taobao.org/css-what/download/css-what-2.1.3.tgz",
114 | "integrity": "sha1-ptdgRXM2X+dGhsPzEcVlE9iChfI="
115 | },
116 | "dashdash": {
117 | "version": "1.14.1",
118 | "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
119 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
120 | "requires": {
121 | "assert-plus": "^1.0.0"
122 | }
123 | },
124 | "dayjs": {
125 | "version": "1.8.15",
126 | "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.8.15.tgz?cache=0&sync_timestamp=1562597134097&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.8.15.tgz",
127 | "integrity": "sha1-cSG8BOan8mIe1ttWa+SoqvjDkT4="
128 | },
129 | "delayed-stream": {
130 | "version": "1.0.0",
131 | "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
132 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
133 | },
134 | "dom-serializer": {
135 | "version": "0.1.1",
136 | "resolved": "https://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.1.1.tgz?cache=0&sync_timestamp=1564710970695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdom-serializer%2Fdownload%2Fdom-serializer-0.1.1.tgz",
137 | "integrity": "sha1-HsQFnihLq+027sKUHUqXChic58A=",
138 | "requires": {
139 | "domelementtype": "^1.3.0",
140 | "entities": "^1.1.1"
141 | }
142 | },
143 | "domelementtype": {
144 | "version": "1.3.1",
145 | "resolved": "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz",
146 | "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8="
147 | },
148 | "domhandler": {
149 | "version": "2.4.2",
150 | "resolved": "https://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz?cache=0&sync_timestamp=1564708909977&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdomhandler%2Fdownload%2Fdomhandler-2.4.2.tgz",
151 | "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=",
152 | "requires": {
153 | "domelementtype": "1"
154 | }
155 | },
156 | "domutils": {
157 | "version": "1.5.1",
158 | "resolved": "https://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz",
159 | "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
160 | "requires": {
161 | "dom-serializer": "0",
162 | "domelementtype": "1"
163 | }
164 | },
165 | "ecc-jsbn": {
166 | "version": "0.1.2",
167 | "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz",
168 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
169 | "requires": {
170 | "jsbn": "~0.1.0",
171 | "safer-buffer": "^2.1.0"
172 | }
173 | },
174 | "entities": {
175 | "version": "1.1.2",
176 | "resolved": "https://registry.npm.taobao.org/entities/download/entities-1.1.2.tgz",
177 | "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY="
178 | },
179 | "extend": {
180 | "version": "3.0.2",
181 | "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
182 | "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
183 | },
184 | "extsprintf": {
185 | "version": "1.3.0",
186 | "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
187 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
188 | },
189 | "fast-deep-equal": {
190 | "version": "2.0.1",
191 | "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz?cache=0&sync_timestamp=1562517919182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-2.0.1.tgz",
192 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
193 | },
194 | "fast-json-stable-stringify": {
195 | "version": "2.0.0",
196 | "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz",
197 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
198 | },
199 | "forever-agent": {
200 | "version": "0.6.1",
201 | "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz",
202 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
203 | },
204 | "form-data": {
205 | "version": "2.3.3",
206 | "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz?cache=0&sync_timestamp=1562216133657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.3.3.tgz",
207 | "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
208 | "requires": {
209 | "asynckit": "^0.4.0",
210 | "combined-stream": "^1.0.6",
211 | "mime-types": "^2.1.12"
212 | }
213 | },
214 | "getpass": {
215 | "version": "0.1.7",
216 | "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
217 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
218 | "requires": {
219 | "assert-plus": "^1.0.0"
220 | }
221 | },
222 | "har-schema": {
223 | "version": "2.0.0",
224 | "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz",
225 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
226 | },
227 | "har-validator": {
228 | "version": "5.1.3",
229 | "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz",
230 | "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
231 | "requires": {
232 | "ajv": "^6.5.5",
233 | "har-schema": "^2.0.0"
234 | }
235 | },
236 | "htmlparser2": {
237 | "version": "3.10.1",
238 | "resolved": "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz",
239 | "integrity": "sha1-vWedw/WYl7ajS7EHSchVu1OpOS8=",
240 | "requires": {
241 | "domelementtype": "^1.3.1",
242 | "domhandler": "^2.3.0",
243 | "domutils": "^1.5.1",
244 | "entities": "^1.1.1",
245 | "inherits": "^2.0.1",
246 | "readable-stream": "^3.1.1"
247 | }
248 | },
249 | "http-signature": {
250 | "version": "1.2.0",
251 | "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz",
252 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
253 | "requires": {
254 | "assert-plus": "^1.0.0",
255 | "jsprim": "^1.2.2",
256 | "sshpk": "^1.7.0"
257 | }
258 | },
259 | "inherits": {
260 | "version": "2.0.4",
261 | "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz",
262 | "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w="
263 | },
264 | "is-typedarray": {
265 | "version": "1.0.0",
266 | "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
267 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
268 | },
269 | "isstream": {
270 | "version": "0.1.2",
271 | "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz",
272 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
273 | },
274 | "jsbn": {
275 | "version": "0.1.1",
276 | "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz",
277 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
278 | },
279 | "json-schema": {
280 | "version": "0.2.3",
281 | "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz",
282 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
283 | },
284 | "json-schema-traverse": {
285 | "version": "0.4.1",
286 | "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
287 | "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
288 | },
289 | "json-stringify-safe": {
290 | "version": "5.0.1",
291 | "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
292 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
293 | },
294 | "jsprim": {
295 | "version": "1.4.1",
296 | "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz",
297 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
298 | "requires": {
299 | "assert-plus": "1.0.0",
300 | "extsprintf": "1.3.0",
301 | "json-schema": "0.2.3",
302 | "verror": "1.10.0"
303 | }
304 | },
305 | "lodash": {
306 | "version": "4.17.15",
307 | "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.15.tgz",
308 | "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg="
309 | },
310 | "lodash.unescape": {
311 | "version": "4.0.1",
312 | "resolved": "https://registry.npm.taobao.org/lodash.unescape/download/lodash.unescape-4.0.1.tgz",
313 | "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw="
314 | },
315 | "mime-db": {
316 | "version": "1.40.0",
317 | "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.40.0.tgz",
318 | "integrity": "sha1-plBX6ZjbCQ9zKmj2wnbTh9QSbDI="
319 | },
320 | "mime-types": {
321 | "version": "2.1.24",
322 | "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.24.tgz",
323 | "integrity": "sha1-tvjQs+lR77d97eyhlM/20W9nb4E=",
324 | "requires": {
325 | "mime-db": "1.40.0"
326 | }
327 | },
328 | "nth-check": {
329 | "version": "1.0.2",
330 | "resolved": "http://registry.npm.taobao.org/nth-check/download/nth-check-1.0.2.tgz",
331 | "integrity": "sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw=",
332 | "requires": {
333 | "boolbase": "~1.0.0"
334 | }
335 | },
336 | "oauth-sign": {
337 | "version": "0.9.0",
338 | "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz",
339 | "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
340 | },
341 | "parse5": {
342 | "version": "3.0.3",
343 | "resolved": "https://registry.npm.taobao.org/parse5/download/parse5-3.0.3.tgz",
344 | "integrity": "sha1-BC95L/3TaFFVHPTp4Gazh0q0W1w=",
345 | "requires": {
346 | "@types/node": "*"
347 | }
348 | },
349 | "performance-now": {
350 | "version": "2.1.0",
351 | "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz",
352 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
353 | },
354 | "psl": {
355 | "version": "1.3.0",
356 | "resolved": "https://registry.npm.taobao.org/psl/download/psl-1.3.0.tgz",
357 | "integrity": "sha1-4ev2o7VWT6g3bz2iJ12nbYdcob0="
358 | },
359 | "punycode": {
360 | "version": "2.1.1",
361 | "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz",
362 | "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
363 | },
364 | "qs": {
365 | "version": "6.5.2",
366 | "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz",
367 | "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
368 | },
369 | "readable-stream": {
370 | "version": "3.4.0",
371 | "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freadable-stream%2Fdownload%2Freadable-stream-3.4.0.tgz",
372 | "integrity": "sha1-pRwmdUZY4KPCHb9ZFjvUW6b0R/w=",
373 | "requires": {
374 | "inherits": "^2.0.3",
375 | "string_decoder": "^1.1.1",
376 | "util-deprecate": "^1.0.1"
377 | }
378 | },
379 | "request": {
380 | "version": "2.88.0",
381 | "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz",
382 | "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
383 | "requires": {
384 | "aws-sign2": "~0.7.0",
385 | "aws4": "^1.8.0",
386 | "caseless": "~0.12.0",
387 | "combined-stream": "~1.0.6",
388 | "extend": "~3.0.2",
389 | "forever-agent": "~0.6.1",
390 | "form-data": "~2.3.2",
391 | "har-validator": "~5.1.0",
392 | "http-signature": "~1.2.0",
393 | "is-typedarray": "~1.0.0",
394 | "isstream": "~0.1.2",
395 | "json-stringify-safe": "~5.0.1",
396 | "mime-types": "~2.1.19",
397 | "oauth-sign": "~0.9.0",
398 | "performance-now": "^2.1.0",
399 | "qs": "~6.5.2",
400 | "safe-buffer": "^5.1.2",
401 | "tough-cookie": "~2.4.3",
402 | "tunnel-agent": "^0.6.0",
403 | "uuid": "^3.3.2"
404 | }
405 | },
406 | "request-promise": {
407 | "version": "4.2.4",
408 | "resolved": "https://registry.npm.taobao.org/request-promise/download/request-promise-4.2.4.tgz",
409 | "integrity": "sha1-HF7Q1xRB44rVjHzk6k6lsG1UsxA=",
410 | "requires": {
411 | "bluebird": "^3.5.0",
412 | "request-promise-core": "1.1.2",
413 | "stealthy-require": "^1.1.1",
414 | "tough-cookie": "^2.3.3"
415 | }
416 | },
417 | "request-promise-core": {
418 | "version": "1.1.2",
419 | "resolved": "http://registry.npm.taobao.org/request-promise-core/download/request-promise-core-1.1.2.tgz",
420 | "integrity": "sha1-M59qq6vK/bMceZ/xWHADNjAdM0Y=",
421 | "requires": {
422 | "lodash": "^4.17.11"
423 | }
424 | },
425 | "safe-buffer": {
426 | "version": "5.2.0",
427 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz",
428 | "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk="
429 | },
430 | "safer-buffer": {
431 | "version": "2.1.2",
432 | "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz",
433 | "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
434 | },
435 | "sshpk": {
436 | "version": "1.16.1",
437 | "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz",
438 | "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=",
439 | "requires": {
440 | "asn1": "~0.2.3",
441 | "assert-plus": "^1.0.0",
442 | "bcrypt-pbkdf": "^1.0.0",
443 | "dashdash": "^1.12.0",
444 | "ecc-jsbn": "~0.1.1",
445 | "getpass": "^0.1.1",
446 | "jsbn": "~0.1.0",
447 | "safer-buffer": "^2.0.2",
448 | "tweetnacl": "~0.14.0"
449 | }
450 | },
451 | "stealthy-require": {
452 | "version": "1.1.1",
453 | "resolved": "http://registry.npm.taobao.org/stealthy-require/download/stealthy-require-1.1.1.tgz",
454 | "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
455 | },
456 | "string_decoder": {
457 | "version": "1.3.0",
458 | "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.3.0.tgz?cache=0&sync_timestamp=1565170823020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring_decoder%2Fdownload%2Fstring_decoder-1.3.0.tgz",
459 | "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=",
460 | "requires": {
461 | "safe-buffer": "~5.2.0"
462 | }
463 | },
464 | "tough-cookie": {
465 | "version": "2.4.3",
466 | "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz",
467 | "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=",
468 | "requires": {
469 | "psl": "^1.1.24",
470 | "punycode": "^1.4.1"
471 | },
472 | "dependencies": {
473 | "punycode": {
474 | "version": "1.4.1",
475 | "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz",
476 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
477 | }
478 | }
479 | },
480 | "tunnel-agent": {
481 | "version": "0.6.0",
482 | "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
483 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
484 | "requires": {
485 | "safe-buffer": "^5.0.1"
486 | }
487 | },
488 | "tweetnacl": {
489 | "version": "0.14.5",
490 | "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz",
491 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
492 | },
493 | "uri-js": {
494 | "version": "4.2.2",
495 | "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz",
496 | "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=",
497 | "requires": {
498 | "punycode": "^2.1.0"
499 | }
500 | },
501 | "util-deprecate": {
502 | "version": "1.0.2",
503 | "resolved": "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz",
504 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
505 | },
506 | "uuid": {
507 | "version": "3.3.3",
508 | "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.3.3.tgz",
509 | "integrity": "sha1-RWjwIW54dg7h2/Ok0s9T4iQRKGY="
510 | },
511 | "verror": {
512 | "version": "1.10.0",
513 | "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz",
514 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
515 | "requires": {
516 | "assert-plus": "^1.0.0",
517 | "core-util-is": "1.0.2",
518 | "extsprintf": "^1.2.0"
519 | }
520 | },
521 | "we-extract": {
522 | "version": "1.2.10",
523 | "resolved": "https://registry.npm.taobao.org/we-extract/download/we-extract-1.2.10.tgz",
524 | "integrity": "sha1-d9vp2COgsPgFgqisesC2gV7YeqY=",
525 | "requires": {
526 | "cheerio": "^1.0.0-rc.2",
527 | "dayjs": "^1.7.4",
528 | "lodash": "^4.17.15",
529 | "lodash.unescape": "^4.0.1",
530 | "request": "^2.88.0",
531 | "request-promise": "^4.2.2"
532 | }
533 | }
534 | }
535 | }
536 |
--------------------------------------------------------------------------------