├── .gitignore
├── README.md
├── cloud
├── commentList
│ ├── config.json
│ ├── index.js
│ └── package.json
├── delete_notices
│ ├── config.json
│ ├── index.js
│ └── package.json
├── login
│ ├── config.json
│ ├── index.js
│ └── package.json
├── operation
│ ├── config.json
│ ├── index.js
│ └── package.json
├── parerInfo
│ ├── config.json
│ ├── index.js
│ └── package.json
├── updata_user
│ ├── config.json
│ ├── index.js
│ └── package.json
├── update_index
│ ├── config.json
│ ├── index.js
│ └── package.json
└── update_revert
│ ├── config.json
│ ├── index.js
│ └── package.json
├── miniprogram
├── app.js
├── app.json
├── app.wxss
├── pages
│ ├── about
│ │ ├── about.js
│ │ ├── about.json
│ │ ├── about.wxml
│ │ └── about.wxss
│ ├── activity
│ │ ├── activity.js
│ │ ├── activity.json
│ │ ├── activity.wxml
│ │ ├── activity.wxss
│ │ └── activityDetail
│ │ │ ├── activityDetail.js
│ │ │ ├── activityDetail.json
│ │ │ ├── activityDetail.wxml
│ │ │ └── activityDetail.wxss
│ ├── admin
│ │ ├── admin.js
│ │ ├── admin.json
│ │ ├── admin.wxml
│ │ └── admin.wxss
│ ├── articleList
│ │ ├── articleList.js
│ │ ├── articleList.json
│ │ ├── articleList.wxml
│ │ └── articleList.wxss
│ ├── college
│ │ ├── addcollege
│ │ │ ├── addcollege.js
│ │ │ ├── addcollege.json
│ │ │ ├── addcollege.wxml
│ │ │ └── addcollege.wxss
│ │ ├── college.js
│ │ ├── college.json
│ │ ├── college.wxml
│ │ └── college.wxss
│ ├── detail
│ │ ├── detail.js
│ │ ├── detail.json
│ │ ├── detail.wxml
│ │ └── detail.wxss
│ ├── icon
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── about.png
│ │ ├── add.png
│ │ ├── addCollege.png
│ │ ├── addimags.png
│ │ ├── admin_true.png
│ │ ├── collega_false.png
│ │ ├── collega_true.png
│ │ ├── del.png
│ │ ├── delete.svg
│ │ ├── home-select.png
│ │ ├── home.png
│ │ ├── icon_add.png
│ │ ├── icon_admin.png
│ │ ├── icon_cancel.png
│ │ ├── icon_college.png
│ │ ├── icon_come.png
│ │ ├── icon_fabu.png
│ │ ├── icon_pinglun.png
│ │ ├── icon_shezhi.png
│ │ ├── icon_shoucang.png
│ │ ├── icon_update.svg
│ │ ├── issuance-select.png
│ │ ├── issuance.png
│ │ ├── me-select.png
│ │ ├── me.png
│ │ ├── noticeBar.png
│ │ ├── shoucangFalse.svg
│ │ └── shoucangTrue.svg
│ ├── images
│ │ ├── login.png
│ │ ├── logo.jpg
│ │ └── tip_jinggao.png
│ ├── img
│ │ ├── activity.png
│ │ ├── chengji.png
│ │ ├── love.png
│ │ ├── questions.png
│ │ ├── qushi.png
│ │ └── sign.png
│ ├── index
│ │ ├── cet
│ │ │ ├── cet.js
│ │ │ ├── cet.json
│ │ │ ├── cet.wxml
│ │ │ └── cet.wxss
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── info
│ │ ├── info.js
│ │ ├── info.json
│ │ ├── info.wxml
│ │ └── info.wxss
│ ├── issuance
│ │ ├── issuance.js
│ │ ├── issuance.json
│ │ ├── issuance.wxml
│ │ └── issuance.wxss
│ ├── login
│ │ ├── login.js
│ │ ├── login.json
│ │ ├── login.wxml
│ │ └── login.wxss
│ └── me
│ │ ├── me.js
│ │ ├── me.json
│ │ ├── me.wxml
│ │ ├── me.wxss
│ │ ├── mycollect
│ │ ├── mycollect.js
│ │ ├── mycollect.json
│ │ ├── mycollect.wxml
│ │ └── mycollect.wxss
│ │ ├── mycomment
│ │ ├── mycomment.js
│ │ ├── mycomment.json
│ │ ├── mycomment.wxml
│ │ └── mycomment.wxss
│ │ ├── myissuance
│ │ ├── myissuance.js
│ │ ├── myissuance.json
│ │ ├── myissuance.wxml
│ │ └── myissuance.wxss
│ │ └── setting
│ │ ├── setting.js
│ │ ├── setting.json
│ │ ├── setting.wxml
│ │ ├── setting.wxss
│ │ └── settingInfo
│ │ ├── settingInfo.js
│ │ ├── settingInfo.json
│ │ ├── settingInfo.wxml
│ │ └── settingInfo.wxss
├── sitemap.json
└── weui.wxss
├── project.config.json
├── project.private.config.json
├── 数据库
├── activity.json
├── articles.json
├── collect.json
├── comment.json
├── index.json
├── user.json
└── 说明.txt
└── 节目秀
├── Snipaste_2021-05-31_21-30-11.png
├── Snipaste_2021-05-31_21-30-29.png
├── Snipaste_2021-05-31_21-30-38.png
├── Snipaste_2021-05-31_21-30-53.png
├── Snipaste_2021-05-31_21-31-14.png
├── Snipaste_2021-05-31_21-31-40.png
├── Snipaste_2021-05-31_21-31-53.png
├── Snipaste_2021-05-31_21-32-10.png
├── Snipaste_2021-05-31_21-32-25.png
├── Snipaste_2021-05-31_21-32-42.png
├── Snipaste_2021-05-31_21-32-58.png
├── Snipaste_2021-05-31_21-33-11.png
├── Snipaste_2021-05-31_21-33-30.png
└── programShow
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows
2 | [Dd]esktop.ini
3 | Thumbs.db
4 | $RECYCLE.BIN/
5 |
6 | # macOS
7 | .DS_Store
8 | .fseventsd
9 | .Spotlight-V100
10 | .TemporaryItems
11 | .Trashes
12 |
13 | # Node.js
14 | node_modules/
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 这算得上自己第一个独立完成的项目吧,不太完美,但还是满足了基本功能。
2 |
3 | **1、这个小程序是我的毕业设计,基本实现了社交软件的基本功能**
4 |
5 | **2、代码是直接从微信开发者工具内推送,如需使用请 修改其中部分代码**
6 |
7 | 特别是appid 要改成自己的appid
8 |
9 | 主图如下
10 |
11 | 
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cloud/commentList/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/commentList/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 | const db = cloud.database()
6 | // 云函数入口函数
7 | exports.main = async (event, context) => {
8 | return await db.collection('comment').aggregate()
9 | .lookup({
10 | from: 'articles',
11 | localField: 'articleid',
12 | foreignField: 'articleid',
13 | as: 'commentList',
14 | })
15 | .end()
16 | .then(res => console.log(res))
17 | .catch(err => console.error(err))
18 | .end()
19 | }
--------------------------------------------------------------------------------
/cloud/commentList/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "commentList",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/delete_notices/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/delete_notices/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 | const db = cloud.database()
6 | const _ = db.command
7 | // 云函数入口函数
8 | exports.main = async (event, context) => {
9 | return await db.collection('index').where({
10 | '_id':'b00064a76054bf6b0adc04827ae254ba',
11 | }).update({
12 | data:{
13 | notices:_.pull(event.notices)
14 | },
15 | success:res=>{
16 | console.log(res)
17 | }
18 | })
19 | }
--------------------------------------------------------------------------------
/cloud/delete_notices/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "delete_notices",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/login/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": []
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/cloud/login/index.js:
--------------------------------------------------------------------------------
1 | // 云函数模板
2 | // 部署:在 cloud-functions/login 文件夹右击选择 “上传并部署”
3 |
4 | const cloud = require('wx-server-sdk')
5 |
6 | // 初始化 cloud
7 | cloud.init({
8 | // API 调用都保持和云函数当前所在环境一致
9 | env: cloud.DYNAMIC_CURRENT_ENV
10 | })
11 |
12 | /**
13 | * 这个示例将经自动鉴权过的小程序用户 openid 返回给小程序端
14 | *
15 | * event 参数包含小程序端调用传入的 data
16 | *
17 | */
18 | exports.main = async (event, context) => {
19 | console.log(event)
20 | console.log(context)
21 |
22 | // 可执行其他自定义逻辑
23 | // console.log 的内容可以在云开发云函数调用日志查看
24 |
25 | // 获取 WX Context (微信调用上下文),包括 OPENID、APPID、及 UNIONID(需满足 UNIONID 获取条件)等信息
26 | const wxContext = cloud.getWXContext()
27 |
28 | return {
29 | event,
30 | openid: wxContext.OPENID,
31 | appid: wxContext.APPID,
32 | unionid: wxContext.UNIONID,
33 | env: wxContext.ENV,
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/cloud/login/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "login",
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": "~2.4.0"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/cloud/operation/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/operation/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 |
6 | // 云函数入口函数
7 | exports.main = async (event, context) => {
8 | return await cloud.database().collection('comment').doc(event.id).update({
9 | data:{
10 | articleid:event.articleid,
11 | openid:event.openid,
12 | up : event.up,
13 | down: event.down,
14 | sc : event.sc,
15 | pinglun:event.pinglun,
16 | commentid:event.commentid
17 |
18 | }
19 | }).then(res=>{
20 | console.log("success",res)
21 | return res
22 | }).catch(res=>{
23 | console.log("false",res)
24 | return res
25 | })
26 | }
--------------------------------------------------------------------------------
/cloud/operation/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shoucang",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/parerInfo/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/parerInfo/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 | const db = cloud.database()
6 | const _ = db.command
7 | // 云函数入口函数
8 | exports.main = async (event, context) => {
9 | return await cloud.database().collection('activity').doc(event.id).update({
10 | data:{
11 | id: event.id,
12 | organizer : event.organizer,
13 | title: event.title,
14 | place : event.place,
15 | number:event.number,
16 | link : event.link,
17 | contents:event.contents,
18 | star_time:event.star_time,
19 | end_time:event.end_time,
20 | parter:_.addToSet(event.parter)
21 | }
22 | }).then(res=>{
23 | console.log("success",res)
24 | return res
25 | }).catch(res=>{
26 | console.log("false",res)
27 | return res
28 | })
29 | }
--------------------------------------------------------------------------------
/cloud/parerInfo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "parerInfo",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/updata_user/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/updata_user/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | // 云函数入口文件
3 | const cloud = require('wx-server-sdk')
4 |
5 | cloud.init()
6 | const db = cloud.database()
7 | const _ = db.command
8 | // 云函数入口函数
9 | exports.main = async (event, context) => {
10 | const targetDB = db.collection(event.db)
11 | //return targetDB
12 | try {
13 | console.log(event);
14 | if (event.type == "insert") {
15 | return await targetDB.add({
16 | data: event.data,
17 | success: res => {
18 | console.log("添加纪录成功", res);
19 | },
20 | fail: res => {
21 | console.log("添加纪录失败", res);
22 | }
23 | })
24 | }
25 |
26 | if (event.type == "update") {
27 | return await targetDB.doc(event.indexKey).update({
28 | data: event.data
29 | })
30 | }
31 | if (event.type == "delete") {
32 | return await targetDB.doc(event.indexKey).remove()
33 | }
34 |
35 | if (event.type == "get") {
36 | return await targetDB.where(event.condition).get()
37 | }
38 | } catch (e) {
39 | console.error(e)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/cloud/updata_user/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "updata_user",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/update_index/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/update_index/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 | const db = cloud.database()
6 | const _ = db.command
7 | // 云函数入口函数
8 | exports.main = async (event, context) => {
9 | return await db.collection('index').where({
10 | '_id':'b00064a76054bf6b0adc04827ae254ba',
11 | }).update({
12 | data:{
13 | notices:_.addToSet(event.notices)
14 | },
15 | success:res=>{
16 | console.log(res)
17 | }
18 | })
19 |
20 | }
--------------------------------------------------------------------------------
/cloud/update_index/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "update_parter",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloud/update_revert/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": [
4 | ]
5 | }
6 | }
--------------------------------------------------------------------------------
/cloud/update_revert/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init()
5 | const db = cloud.database()
6 | const _ = db.command
7 | // 云函数入口函数
8 | exports.main = async (event, context) => {
9 | return await db.collection('comment').doc(event.id).update({
10 | data:{
11 | revert:_.addToSet(event.revert)
12 | },
13 | success:res=>{
14 | console.log(res)
15 | }
16 | })
17 |
18 | }
--------------------------------------------------------------------------------
/cloud/update_revert/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "update_revert",
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": "~2.4.0"
13 | }
14 | }
--------------------------------------------------------------------------------
/miniprogram/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | if (!wx.cloud) {
5 | console.error('请使用 2.2.3 或以上的基础库以使用云能力')
6 | } else {
7 | wx.cloud.init({
8 | // env 参数说明:
9 | // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
10 | // 此处请填入环境 ID, 环境 ID 可打开云控制台查看
11 | // 如不填则使用默认环境(第一个创建的环境)
12 | // env: 'my-env-id',
13 | traceUser: true,
14 | })
15 | }
16 | this.globalData = {}
17 | }
18 | })
19 |
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "useExtendedLib": {
3 | "kbone": true,
4 | "weui": true
5 | },
6 |
7 | "pages": [
8 | "pages/index/index",
9 | "pages/info/info",
10 | "pages/login/login",
11 | "pages/index/cet/cet",
12 | "pages/activity/activity",
13 | "pages/me/me",
14 | "pages/college/college",
15 | "pages/college/addcollege/addcollege",
16 | "pages/me/myissuance/myissuance",
17 | "pages/me/mycollect/mycollect",
18 | "pages/me/mycomment/mycomment",
19 | "pages/me/setting/setting",
20 | "pages/me/setting/settingInfo/settingInfo",
21 | "pages/issuance/issuance",
22 | "pages/articleList/articleList",
23 | "pages/detail/detail",
24 | "pages/activity/activityDetail/activityDetail",
25 | "pages/admin/admin",
26 | "pages/about/about"
27 | ],
28 | "window": {
29 | "navigationBarBackgroundColor": "#239DF8",
30 | "navigationBarTitleText": "合经院社区",
31 | "navigationBarTextStyle": "black",
32 | "backgroundTextStyle": "dark"
33 | },
34 | "tabBar": {
35 | "backgroundColor": "#1A73E8",
36 | "color": "#0000",
37 | "selectedColor": "#ffffff",
38 | "borderStyle": "black",
39 | "list": [
40 | {
41 | "pagePath": "pages/index/index",
42 | "text": "首页",
43 | "iconPath": "/pages/icon/home.png",
44 | "selectedIconPath": "/pages/icon/home-select.png"
45 | },
46 | {
47 | "pagePath": "pages/issuance/issuance",
48 | "text": "发布",
49 | "iconPath": "/pages/icon/issuance.png",
50 | "selectedIconPath": "/pages/icon/issuance-select.png"
51 | },
52 | {
53 | "pagePath": "pages/me/me",
54 | "text": "我的",
55 | "iconPath": "/pages/icon/me.png",
56 | "selectedIconPath": "/pages/icon/me-select.png"
57 | }
58 | ]
59 | },
60 | "sitemapLocation": "sitemap.json",
61 | "style": "v2"
62 | }
--------------------------------------------------------------------------------
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 | @import'weui.wxss';
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
--------------------------------------------------------------------------------
/miniprogram/pages/about/about.js:
--------------------------------------------------------------------------------
1 | // pages/about/about.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 | pact() {
11 | wx.navigateTo({
12 | url: './pact',
13 | success: (result) => {
14 | console.log(result)
15 | },
16 | fail: (res) => {},
17 | complete: (res) => {},
18 | })
19 | },
20 | service(){
21 | wx.navigateTo({
22 | url: 'service',
23 | success: (result) => {},
24 | fail: (res) => {},
25 | complete: (res) => {},
26 | })
27 | }
28 | })
--------------------------------------------------------------------------------
/miniprogram/pages/about/about.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/about/about.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 | 合经院社区
11 |
12 |
13 |
14 |
15 | 隐私协议
16 |
17 |
18 |
19 | 用户服务协议
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 在使用过程中遇到各种问题、反馈以及申请管理员、社团人员请联系客服操作
30 |
31 |
32 |
33 |
34 |
35 |
43 |
--------------------------------------------------------------------------------
/miniprogram/pages/about/about.wxss:
--------------------------------------------------------------------------------
1 | /* pages/about/about.wxss */
2 | .header {
3 | text-align: center;
4 | }
5 | .header image {
6 | width: 200rpx;
7 | height: 200rpx;
8 | }
9 | .line{
10 | height: 2px;
11 | width: 100%;
12 | margin: 20px 0 ;
13 | background-color: #c0c0c059;
14 | }
15 | .weui-cell__bd{
16 | height: 40px;
17 | padding: 5px;
18 | line-height: 40px;
19 | display: flex;
20 | flex-flow: row;
21 | }
22 | .tips{
23 | width: 80%;
24 | }
25 | .img{
26 | margin-top: 10px;
27 | width: 20px;
28 | height: 20px;
29 | }
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activity.js:
--------------------------------------------------------------------------------
1 | // pages/activity/activity.js
2 | var app = getApp()
3 | const db = wx.cloud.database()
4 | const _ = db.command
5 | let ID = ''
6 |
7 | Page({
8 |
9 | data: {
10 | activityDetail: '',
11 | Name: '',
12 | Class: '',
13 | Phone: '',
14 | nickName: '',
15 | inputDialog: false,
16 | },
17 |
18 | onShow() {
19 | wx.cloud.callFunction({
20 | name: 'login',
21 | data: {},
22 | success: res => {
23 | //获取openid
24 | console.log('user openid: ', res.result.openid)
25 | app.globalData.openid = res.result.openid
26 | this.setData({
27 | openID: res.result.openid
28 | })
29 | console.log("openid:", this.data.openID)
30 | wx.cloud.database().collection('user').where({
31 | _openid: this.data.openID
32 | }).get().then(res => {
33 | console.log("用户信息数组长度", res.data)
34 | if (res.data.length != 1) {
35 | this.setData({
36 | nickName: ''
37 | })
38 | } else {
39 | this.setData({
40 | nickName: res.data[0].nickName
41 | })
42 | }
43 | })
44 | },
45 | fail: err => {
46 | console.error('调用失败', err)
47 | }
48 | })
49 | db.collection('activity').orderBy('activityid', 'desc').get().then(res => {
50 | console.log(res)
51 | this.setData({
52 | activityDetail: res.data
53 | })
54 | })
55 | },
56 |
57 | goDetail(event) {
58 | // console.log("获取的_id", event)
59 | db.collection('activity').where({
60 | id: event.currentTarget.dataset.id,
61 | parter: _.all([_.elemMatch({ parter_id: this.data.openID })])
62 | }).get().then(res => {
63 | // console.log("是否报名", res)
64 | if (res.data.length == 0) {
65 | wx.showToast({
66 | title: '报名后才能查看',
67 | icon: "error"
68 | })
69 | return
70 | } else {
71 | wx.navigateTo({
72 | url: '/pages/activity/activityDetail/activityDetail?id=' + event.currentTarget.dataset.id,
73 | }),
74 | wx.setNavigationBarTitle({
75 | title: '活动详情'
76 | })
77 | }
78 | })
79 | },
80 |
81 | powerDrawer: function (e) {
82 | if (this.data.nickName == '') {
83 | wx.showModal({
84 | cancelColor: 'cancelColor',
85 | title: '您没有登入,是否登入?',
86 | content: '没有登入将无法使用!',
87 | success(res) {
88 | if (res.confirm) {
89 | wx.navigateTo({
90 | url: '../login/login',
91 | })
92 | // console.log('用户点击确定')
93 | } else if (res.cancel) {
94 | // console.log('用户点击取消')
95 | }
96 | }
97 | })
98 | return
99 | } else {
100 | // console.log("活动id", e.target.id)
101 | ID = e.target.id
102 | var currentStatu = e.currentTarget.dataset.statu;
103 | this.setData({
104 | inputDialog: true
105 | });
106 | }
107 | },
108 | close: function () {
109 | this.setData({
110 | inputDialog: false,
111 | })
112 | },
113 | //获取信息
114 | getName(event) {
115 | this.setData({
116 | Name: event.detail.value
117 | })
118 | console.log("获取到的姓名", this.data.Name)
119 | },
120 | getClass(event) {
121 | this.setData({
122 | Class: event.detail.value
123 | })
124 | console.log("获取到的班级", this.data.Class)
125 | },
126 | getPhone(event) {
127 | this.setData({
128 | Phone: event.detail.value
129 | })
130 | console.log("获取到的手机", this.data.Phone)
131 | },
132 | //确认报名
133 | inputButton() {
134 | if (this.data.Name.length < 2 || this.data.Name.length > 8 || this.data.Class.length < 2 || this.data.Phone.length < 5 || this.data.Phone.length > 20) {
135 | wx.showToast({
136 | icon: 'none',
137 | title: '您的信息有误',
138 | })
139 | return
140 | }
141 | let parterItems = {}
142 | parterItems.parter_id = this.data.openID
143 | parterItems.parter_name = this.data.Name
144 | parterItems.school_class = this.data.Class
145 | parterItems.link_qq = this.data.Phone
146 | console.log("用户数组:", parterItems)
147 | wx.showLoading({
148 | title: '提交中',
149 | })
150 |
151 | wx.cloud.callFunction({
152 | name: 'parerInfo',
153 | data: {
154 | id: ID,
155 | parter: parterItems
156 | }
157 | }).then(res => {
158 | this.setData({
159 | inputDialog: false,
160 | Name: '',
161 | Class: '',
162 | Phone: ''
163 | })
164 | wx.hideLoading(), 1000
165 | wx.navigateTo({
166 | url: '/pages/activity/activityDetail/activityDetail?id=' + ID,
167 | })
168 | wx.setNavigationBarTitle({
169 | title: '活动详情',
170 | }),
171 | console.log("success", res.result.stats)
172 | }).catch(res => {
173 | console.log("false", res)
174 | })
175 | }
176 | })
177 |
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activity.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activity.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 活动名称:
8 | {{item.title}}
9 |
10 |
11 |
12 |
13 | 组织人员:
14 | {{item.organizer}}
15 |
16 |
17 | 参与人数:
18 | {{item.number}}
19 |
20 |
21 | 活动地点:
22 | {{item.place}}
23 |
24 |
25 | 开始时间:
26 | {{item.star_time}}
27 |
28 |
29 |
30 |
31 | 活动详情:
32 |
33 | {{item.contents}}
34 |
35 |
36 |
37 |
38 |
39 | 我要参加
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 填写信息
48 |
49 |
50 |
51 | 个人姓名:
52 |
53 |
54 |
55 |
56 |
57 | 专业班级:
58 |
59 |
60 |
61 |
62 |
63 | 联系方式:
64 |
65 |
66 |
67 |
68 |
69 |
70 | 确认报名即代表同意本小程序
71 | 《隐私条款》
72 |
73 |
74 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activity.wxss:
--------------------------------------------------------------------------------
1 | /* pages/activity/activity.wxss */
2 | page {
3 | background: #f0f0f0;
4 | }
5 |
6 | .backgroundItem {
7 | background: #ffffff;
8 | border-radius: 10px;
9 | margin: 10px 5px 5px 5px;
10 | padding: 8px;
11 | }
12 |
13 | .items {
14 | padding: 4px;
15 | }
16 |
17 | .itemTitle {
18 | font-size: 40rpx;
19 | margin: 8rpx 0;
20 | }
21 |
22 | .itemTags {
23 | font-size: 35rpx;
24 | margin-left: 10px;
25 | }
26 |
27 | .itemTag {
28 | color: #707070;
29 | margin: 8rpx;
30 | }
31 |
32 | .tagText {
33 | display: inline-block;
34 | width: 30%;
35 | color: black;
36 | }
37 |
38 | .le {
39 | height: 1rpx;
40 | background: #ccc9c9;
41 | margin: 5rpx 0;
42 | }
43 |
44 | .itemContent {
45 | font-size: 38rpx;
46 | display: inline-block;
47 | height: 120px;
48 | }
49 |
50 | .contents {
51 | padding: 20rpx;
52 | }
53 |
54 | .inputButton {
55 | margin: 20px 0;
56 | padding: 0 0;
57 | font-size: 40rpx;
58 | }
59 |
60 | /*表单*/
61 | /*button*/
62 | .btn {
63 | font-size: 40rpx;
64 | font-weight: bolder;
65 | padding: 10rpx 0;
66 | border-radius: 10rpx;
67 | text-align: center;
68 | margin: 20rpx 10%;
69 | background: #ffffff;
70 | color: #277a00;
71 | }
72 |
73 |
74 | /*content*/
75 |
76 |
77 | .drawerContent {
78 | height: 170px;
79 | text-align: left;
80 | }
81 | .drawerGrid {
82 | display: flex;
83 | flex-flow: row;
84 | margin: 10px;
85 | }
86 |
87 | .titleGrid {
88 | width: 30%;
89 | text-align: center;
90 | height: 30px;
91 | line-height: 30px;
92 | }
93 | .inputTable {
94 | width: 70%;
95 | }
96 | .inputGrid {
97 | border: 2rpx solid #ccc;
98 | height: 30px;
99 | width: 90%;
100 | line-height: 30px;
101 | font: 12px "microsoft yahei";
102 | background: #fff;
103 | color: #000;
104 | padding-left: 4px;
105 | }
106 |
107 | .tipsText {
108 | font-size: 13px;
109 | }
110 |
111 | .tip_jinggao {
112 | width: 15px;
113 | height: 15px;
114 | margin: 0 10px 0 20px;
115 | }
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activityDetail/activityDetail.js:
--------------------------------------------------------------------------------
1 | // pages/activity/activityDetail/activityDetail.js
2 | const db = wx.cloud.database()
3 | const _ = db.command
4 |
5 | Page({
6 | data: {
7 | activityDetail:'',
8 | parter:[]
9 | },
10 | onLoad(option) {
11 | db.collection('activity').doc(option.id).get().then(res=>{
12 | console.log("参与者:",res.data.parter)
13 | console.log(res.data)
14 | this.setData({
15 | activityDetail:res.data,
16 | parter:res.data.parter
17 | })
18 | })
19 | },
20 | })
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activityDetail/activityDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activityDetail/activityDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 活动名称:
4 | {{activityDetail.title}}
5 |
6 |
7 |
8 |
9 |
10 |
11 | 组织人员:
12 | {{activityDetail.organizer}}
13 |
14 |
15 | 参与人数:
16 | {{activityDetail.number}}
17 |
18 |
19 | 活动地点:
20 | {{activityDetail.place}}
21 |
22 |
23 | 联系方式:
24 | {{activityDetail.contact}}:{{activityDetail.link}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | {{activityDetail.contents}}
33 |
34 |
35 |
36 |
37 |
38 |
39 | 开始时间:
40 | {{activityDetail.star_time}}
41 |
42 |
43 | 结束时间:
44 | {{activityDetail.end_time}}
45 |
46 |
47 | 创建者:
48 | {{activityDetail.office}}:{{activityDetail.nickName}}
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 报名人员信息:
60 |
61 |
62 |
63 |
64 | 姓名:
65 | {{item.parter_name}}
66 |
67 |
68 | 班级:
69 | {{item.school_class}}
70 |
71 |
72 | 联系方式:
73 | {{item.link_qq}}
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/miniprogram/pages/activity/activityDetail/activityDetail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/activity/activityDetail/activityDetail.wxss */
2 | /* pages/activity/activity.wxss */
3 | .items{
4 | margin: 20rpx 30rpx;
5 | margin-bottom: 40px;
6 | }
7 | .itemTitle{
8 | font-size: 40rpx;
9 | margin: 8rpx 0;
10 | }
11 | .itemTags{
12 | font-size: 35rpx;
13 | margin-left: 10px;
14 | }
15 | .itemTag{
16 | color: #4b4b4b;
17 | margin: 8rpx;
18 | }
19 |
20 |
21 | .tagText{
22 |
23 | width: 30%;
24 | color: black;
25 | }
26 | .le{
27 | height: 1rpx;
28 | background: #ecececb6;
29 | margin: 5rpx 10rpx ;
30 | }
31 | .itemContent{
32 | font-size: 38rpx;
33 | height: 140px;
34 | padding: 20rpx;
35 | }
36 | .infoText{
37 | font-size: 20px;
38 | margin: 20rpx 0;
39 | }
40 | .date{
41 | padding: 20rpx 0;
42 | }
43 | .line{
44 | height: 1rpx;
45 | background-color: #ecececb6;
46 | margin: 20rpx 10rpx 20rpx 10rpx;
47 | }
--------------------------------------------------------------------------------
/miniprogram/pages/admin/admin.js:
--------------------------------------------------------------------------------
1 | // pages/me/admin/admin.js
2 | const app = getApp()
3 |
4 | Page({
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | curNav: 1,
10 | // 公告内容
11 | slideButtons: [{
12 | src: '/pages/icon/delete.svg', // icon的路径
13 | }],
14 | delete: false,
15 | deleteValue: '',
16 | indexTextData: '',
17 | textNumber: '0',
18 | notice: '',
19 | wordNumber: 0,
20 |
21 | // 轮播图
22 | indexImgData: '',
23 | fileID: '',
24 |
25 | // 社团人员
26 | bossheads: '',
27 |
28 | // 所有用户
29 | show: false,
30 | addCollegaId: '',
31 | officeInfo: '',
32 |
33 | // 文章列表
34 | articles: '',
35 |
36 | // 评论列表
37 | comments: ''
38 | },
39 |
40 | // 切换菜单
41 | switchRightTab: function (e) {
42 | let id = e.target.dataset.id;
43 | console.log(id);
44 | this.setData({
45 | curNav: id,
46 | show: false,
47 | })
48 | },
49 |
50 | // 页面加载
51 | onLoad() {
52 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(res => {
53 | console.log("onload 公告轮播图:", res.data)
54 | this.setData({
55 | indexImgData: res.data.images,
56 | indexImgData_0: res.data.images[0],
57 | indexImgData_1: res.data.images[1],
58 | indexImgData_2: res.data.images[2],
59 | indexTextData: res.data.notices,
60 | })
61 | })
62 |
63 | wx.cloud.database().collection('user').where({
64 | bosshead: true
65 | }).get().then(res => {
66 | console.log("onload 社团人员:", res.data)
67 | this.setData({
68 | bossheads: res.data
69 | })
70 | })
71 |
72 | wx.cloud.database().collection('user').get().then(res => {
73 | console.log("onload 所有用户:", res.data)
74 | this.setData({
75 | users: res.data,
76 | })
77 | })
78 |
79 | wx.cloud.database().collection('articles').get().then(res => {
80 | console.log("onload 文章:", res.data)
81 | this.setData({
82 | articles: res.data
83 | })
84 | })
85 |
86 | wx.cloud.database().collection('comment').get().then(res => {
87 | console.log("onload 评论", res.data)
88 | this.setData({
89 | comments: res.data
90 | })
91 | })
92 |
93 | },
94 |
95 | // 公告栏
96 |
97 | hide(e) {
98 | // console.log(e)
99 | this.setData({
100 | delete: false
101 | })
102 | console.log("滑动显示删除:", this.data.delete)
103 | },
104 | show(e) {
105 | // console.log(e)
106 | this.setData({
107 | delete: true,
108 | deleteValue: e.currentTarget.id
109 | })
110 | console.log("滑动显示删除:", this.data.delete)
111 | },
112 |
113 | slideButtonTap(e) {
114 | var that = this
115 | if (this.data.delete == true) {
116 | wx.showModal({
117 | cancelColor: 'cancelColor',
118 | title: '确定删除此条公告 ?',
119 | content: '删除后无法撤销!',
120 | success(res) {
121 | console.log(res)
122 | if (res.confirm) {
123 | const _ = wx.cloud.database().command
124 |
125 | wx.cloud.callFunction({
126 | name: 'delete_notices',
127 | data: {
128 | notices: that.data.deleteValue
129 | }
130 | }).then(res => {
131 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(res => {
132 | console.log(res.data)
133 | that.setData({
134 | indexTextData: res.data.notices,
135 | notice: ''
136 | })
137 | })
138 | })
139 | } else if (res.cancel) {
140 | console.log('取消')
141 | }
142 |
143 | }
144 | })
145 | }
146 | },
147 |
148 |
149 | getNotices(e) {
150 | this.setData({
151 | notice: e.detail.value,
152 | wordNumber: e.detail.value.length
153 | })
154 | console.log("notice文字", this.data.notice)
155 | },
156 |
157 | setNotices() {
158 | if (this.data.notice.length > 4) {
159 | const _ = wx.cloud.database().command
160 | wx.cloud.callFunction({
161 | name: 'update_index',
162 | data: {
163 | notices: this.data.notice
164 | }
165 | }).then(res => {
166 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(res => {
167 | console.log(res.data)
168 | this.setData({
169 | indexTextData: res.data.notices,
170 | notice: ''
171 | })
172 | })
173 | })
174 | }else{
175 | wx.showToast({
176 | title: '至少 5 个字符',
177 | icon:'error',
178 | duration:1500
179 | })
180 | }
181 | },
182 |
183 | // 轮播图
184 | /** 预览图片 */
185 | showImg: function (event) {
186 | console.log("图片数组", this.data.indexImgData)
187 | console.log("viewID", event.currentTarget.id)
188 | if (event.currentTarget.id == 0) {
189 | wx.previewMedia({
190 | sources: [{ url: this.data.indexImgData_0, type: "image" }],
191 | })
192 | } else if (event.currentTarget.id == 1) {
193 | wx.previewMedia({
194 | sources: [{ url: this.data.indexImgData_1, type: "image" }],
195 | })
196 | } else {
197 | wx.previewMedia({
198 | sources: [{ url: this.data.indexImgData_2, type: "image" }],
199 | })
200 | }
201 | },
202 |
203 |
204 | /**上传图片 */
205 | updateImg(e) {
206 | var buttonid = e.currentTarget.id
207 | console.log("按钮id", e.currentTarget.id)
208 | var that = this
209 | wx.chooseImage({
210 | count: 1,
211 | sizeType: ['compressed'],
212 | sourceType: ['album', 'camera'],
213 | success: function (res) {
214 | wx.showLoading({
215 | title: '上传中',
216 | })
217 | const filePath = res.tempFilePaths[0]
218 | console.log("临时数据:", res)
219 | // 上传图片
220 | const cloudPath = '轮播图/' + Date.parse(new Date()) + `${filePath.match(/\.[^.]+?$/)[0]}` // 图片位置
221 | wx.cloud.uploadFile({
222 | cloudPath,
223 | filePath,
224 | success: res => {
225 | console.log('[上传文件] 成功:', res.fileID)
226 | that.setData({ fileID: res.fileID })
227 | },
228 | fail: e => {
229 | console.error('[上传文件] 失败:', e)
230 | wx.showToast({
231 | icon: 'none',
232 | title: '上传失败',
233 | })
234 | },
235 | complete: () => {
236 | wx.hideLoading()
237 | wx.cloud.callFunction({
238 | name: 'updata_user', //云函数名称
239 | data: {
240 | type: 'update', //data所有的变量都是关联云函数的,按照编写的云函数需要的变量来
241 | db: 'index', //需要操作的集合
242 | indexKey: 'b00064a76054bf6b0adc04827ae254ba',
243 | data: {
244 | ['images.' + [buttonid]]: that.data.fileID
245 | },
246 | },
247 | success: res => {
248 | console.log(res)
249 | that.setData({
250 | fileID: ''
251 | })
252 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(res => {
253 | console.log("onload 公告轮播图:", res.data)
254 | that.setData({
255 | indexImgData: res.data.images,
256 | indexImgData_0: res.data.images[0],
257 | indexImgData_1: res.data.images[1],
258 | indexImgData_2: res.data.images[2],
259 | indexTextData: res.data.notices,
260 | })
261 | })
262 | }
263 | })
264 | }
265 | })
266 | },
267 | })
268 | },
269 |
270 |
271 | // 社团人员
272 | cancelCollega(e) {
273 | var that = this
274 | console.log("字段 _id:", e.currentTarget.id)
275 | var collegaId = e.currentTarget.id
276 | wx.showModal({
277 | cancelColor: 'cancelColor',
278 | title: "是否删除社团人员身份?",
279 | success(res) {
280 | if (res.confirm) {
281 | wx.cloud.callFunction({
282 | name: 'updata_user',
283 | data: {
284 | type: 'update',
285 | db: 'user',
286 | indexKey: collegaId,
287 | data: {
288 | bosshead: false,
289 | office: '',
290 | },
291 | }
292 | })
293 | wx.showToast({
294 | title: '删除成功!',
295 | icon: 'success',
296 | duration: 2000,
297 | success: res => {
298 | wx.startPullDownRefresh({
299 | success: (res) => {
300 | wx.cloud.database().collection('user').where({
301 | bosshead: true
302 | }).get().then(res => {
303 | console.log('自动刷新,社团:', res)
304 | that.setData({
305 | bossheads: res.data
306 | })
307 | })
308 | },
309 | })
310 | }
311 | })
312 | console.log('用户点击确定')
313 | } else if (res.cancel) {
314 | console.log('用户点击取消')
315 | }
316 | }
317 | })
318 | },
319 |
320 |
321 |
322 | // 所有用户 //
323 | // 添加社团
324 | addCollega(e) {
325 | this.setData({
326 | show: true,
327 | addCollegaId: e.currentTarget.id
328 | })
329 | // console.log(e.currentTarget.id)
330 | },
331 |
332 | bindKeyInput(e) {
333 | // console.log("弹窗文字:",e.detail.value)
334 | this.setData({
335 | officeInfo: e.detail.value
336 | })
337 | },
338 | btnDonate() {
339 | if (this.data.officeInfo.length < 1) {
340 | wx.showToast({
341 | title: '内容不能为空!',
342 | icon: 'error'
343 | })
344 | return
345 | }
346 | wx.cloud.callFunction({
347 | name: 'updata_user', //你的云函数名称
348 | data: {
349 | type: 'update', //data所有的变量都是关联云函数的,按照编写的云函数需要的变量来
350 | db: 'user', //需要操作的集合
351 | indexKey: this.data.addCollegaId,
352 | data: {
353 | bosshead: true,
354 | office: this.data.officeInfo,
355 | },
356 | }
357 | })
358 | wx.showToast({
359 | title: '添加成功!',
360 | icon: 'success',
361 | success: res => {
362 | wx.startPullDownRefresh({
363 | success: (res) => {
364 | wx.cloud.database().collection('user').get().then(res => {
365 | // console.log(res.data)
366 | this.setData({
367 | users: res.data,
368 | show: false
369 | })
370 | })
371 | },
372 | })
373 | }
374 | })
375 | },
376 | //删除用户
377 | deleteUser(e) {
378 | var that = this
379 | // console.log(e.currentTarget.dataset.id) 是否管理员
380 | var id = e.currentTarget.id // 字段: _id
381 | if (e.currentTarget.dataset.id == true) {
382 | wx.showToast({
383 | title: '无法删除管理员',
384 | icon:'none'
385 | })
386 | return
387 | }
388 | wx.showModal({
389 | cancelColor: 'cancelColor',
390 | title: '是否删除该用户 ?',
391 | content: '仅删除用户注册信息,无法删除该用户文章及评论',
392 | success(res) {
393 | if (res.confirm) {
394 | wx.cloud.callFunction({
395 | name: 'updata_user', //你的云函数名称
396 | data: {
397 | type: 'delete', //data所有的变量都是关联云函数的,按照编写的云函数需要的变量来
398 | db: 'user', //需要操作的集合
399 | indexKey: id,
400 | }
401 | })
402 | wx.showToast({
403 | title: '删除成功',
404 | success: res => {
405 | wx.startPullDownRefresh({
406 | success: (res) => {
407 | wx.cloud.database().collection('user').get().then(res => {
408 | console.log("删除用户后:", res.data)
409 | that.setData({
410 | users: res.data
411 | })
412 | })
413 | },
414 | })
415 | }
416 | })
417 | console.log('用户点击确定')
418 | } else if (res.cancel) {
419 | console.log('用户点击取消')
420 | }
421 | }
422 | })
423 | },
424 |
425 |
426 |
427 | // 文章列表
428 | deleteArticle(e) {
429 | var that = this
430 | console.log(e.currentTarget.id)
431 | var id = e.currentTarget.id
432 | wx.showModal({
433 | cancelColor: 'cancelColor',
434 | title: '是否删除该文章?',
435 | success(res) {
436 | if (res.confirm) {
437 | wx.cloud.callFunction({
438 | name: 'updata_user', //你的云函数名称
439 | data: {
440 | type: 'delete', //data所有的变量都是关联云函数的,按照编写的云函数需要的变量来
441 | db: 'articles', //需要操作的集合
442 | indexKey: id,
443 | }
444 | })
445 | wx.showToast({
446 | title: '删除成功',
447 | success: res => {
448 | wx.startPullDownRefresh({
449 | success: (res) => {
450 | wx.cloud.database().collection('articles').get().then(res => {
451 | console.log("文章2:", res.data)
452 | that.setData({
453 | articles: res.data
454 | })
455 | })
456 | },
457 | })
458 | }
459 | })
460 | console.log('用户点击确定')
461 | } else if (res.cancel) {
462 | console.log('用户点击取消')
463 | }
464 | }
465 | })
466 | },
467 |
468 | // 评论列表
469 | deleteComment(e) {
470 | var that = this
471 | console.log(e.currentTarget.id)
472 | var id = e.currentTarget.id
473 | wx.showModal({
474 | cancelColor: 'cancelColor',
475 | title: '是否删除该条评论 ?',
476 | success(res) {
477 | if (res.confirm) {
478 | wx.cloud.callFunction({
479 | name: 'updata_user', //你的云函数名称
480 | data: {
481 | type: 'delete', //data所有的变量都是关联云函数的,按照编写的云函数需要的变量来
482 | db: 'comment', //需要操作的集合
483 | indexKey: id,
484 | }
485 | })
486 | wx.showToast({
487 | title: '删除成功',
488 | success: res => {
489 | wx.startPullDownRefresh({
490 | success: (res) => {
491 | wx.cloud.database().collection('comment').get().then(res => {
492 | console.log("评论:", res.data)
493 | that.setData({
494 | comments: res.data
495 | })
496 | })
497 | },
498 | })
499 | }
500 | })
501 | console.log('用户点击确定')
502 | } else if (res.cancel) {
503 | console.log('用户点击取消')
504 | }
505 | }
506 | })
507 | },
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 | /**
519 | * 生命周期函数--监听页面初次渲染完成
520 | */
521 | onReady: function () {
522 |
523 | },
524 |
525 | /**
526 | * 生命周期函数--监听页面显示
527 | */
528 | onShow() {
529 |
530 | },
531 |
532 | /**
533 | * 生命周期函数--监听页面隐藏
534 | */
535 | onHide: function () {
536 |
537 | },
538 |
539 | /**
540 | * 生命周期函数--监听页面卸载
541 | */
542 | onUnload: function () {
543 |
544 | },
545 |
546 | /**
547 | * 页面相关事件处理函数--监听用户下拉动作
548 | */
549 | onPullDownRefresh: function () {
550 | wx.stopPullDownRefresh({
551 | success: (res) => {
552 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(res => {
553 | console.log('公告与轮播图:', res.data)
554 | this.setData({
555 | indexImgData: res.data.images,
556 | indexImgData_0: res.data.images[0],
557 | indexImgData_1: res.data.images[1],
558 | indexImgData_2: res.data.images[2],
559 | indexTextData: res.data.notices,
560 | })
561 | })
562 |
563 | wx.cloud.database().collection('user').where({
564 | bosshead: true
565 | }).get().then(res => {
566 | console.log('社团人员:', res)
567 | this.setData({
568 | bossheads: res.data
569 | })
570 | })
571 |
572 | wx.cloud.database().collection('user').get().then(res => {
573 | console.log("用户列表:", res.data)
574 | this.setData({
575 | users: res.data,
576 | })
577 | })
578 |
579 |
580 | wx.cloud.database().collection('articles').get().then(res => {
581 | console.log("文章:", res.data)
582 | this.setData({
583 | articles: res.data
584 | })
585 | })
586 |
587 | wx.cloud.database().collection('comment').get().then(res => {
588 | console.log("评论:", res.data)
589 | this.setData({
590 | comments: res.data
591 | })
592 | })
593 |
594 |
595 | },
596 | })
597 | },
598 |
599 | /**
600 | * 页面上拉触底事件的处理函数
601 | */
602 | onReachBottom: function () {
603 |
604 | },
605 |
606 | /**
607 | * 用户点击右上角分享
608 | */
609 | onShareAppMessage: function () {
610 |
611 | }
612 | })
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 | // Page({
627 | // data: {
628 | // slideButtons: [{
629 | // src: '/pages/icon/shoucangFalse.svg', // icon的路径
630 | // }, {
631 | // src: '/pages/icon/delete.svg', // icon的路径
632 | // }],
633 | // },
634 |
635 |
636 | // onLoad: function () {
637 |
638 | // },
639 | // slideButtonTap(e) {
640 | // console.log('slide button tap', e.detail)
641 | // this.setData({
642 | // slideButtons: [{
643 | // src: '/pages/icon/shoucangTrue.svg', // icon的路径
644 | // }, {
645 | // src: '/pages/icon/delete.svg', // icon的路径
646 | // }],
647 | // });
648 | // }
649 | // });
650 |
651 |
652 |
--------------------------------------------------------------------------------
/miniprogram/pages/admin/admin.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true ,
3 | "usingComponents": {
4 | "mp-cells": "weui-miniprogram/cells/cells",
5 | "mp-cell": "weui-miniprogram/cell/cell",
6 | "mp-slideview": "weui-miniprogram/slideview/slideview",
7 | "mp-half-screen-dialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog"
8 | }
9 | }
--------------------------------------------------------------------------------
/miniprogram/pages/admin/admin.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 公告栏
9 |
10 |
11 | 轮播图
12 |
13 |
14 | 社团人员
15 |
16 |
17 | 所有用户
18 |
19 |
20 | 文章列表
21 |
22 |
23 | 评论列表
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
36 |
37 | {{item}}
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
48 | {{wordNumber}}/20
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | tip:选择长宽比合适的图片;
91 | 如果没有加载出来请下拉刷新
92 |
93 | 图片只会加载所点击的图
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | {{item.nickName}}
111 |
112 | {{item.office}}
113 |
114 |
115 |
116 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 | {{item.nickName}}
138 |
139 |
141 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 | 添加至社团人员
164 |
165 |
166 |
167 | 填写所在社团及职位
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 | 标题:{{item.title}}
192 | 分类:{{item.type}}
193 |
194 | {{item.content}}
195 |
196 |
197 | 来源:{{item.nickName}}
198 |
199 |
200 |
201 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
230 |
231 |
232 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
--------------------------------------------------------------------------------
/miniprogram/pages/admin/admin.wxss:
--------------------------------------------------------------------------------
1 | /**/
2 | /* 1. 设置整个页面的背景颜色 */
3 | page {
4 | background: #f5f5f5;
5 | }
6 |
7 | /* 2.主盒子 */
8 | .container {
9 | width: 100%;
10 | height: 100%;
11 | background-color: #eeeeeed8;
12 | }
13 |
14 | /* 3.左盒子*/
15 | .nav_left {
16 | position: absolute;
17 | top: 0px;
18 | left: 0px;
19 | width: 20%;
20 | background: #f5f5f5;
21 | text-align: center;
22 | }
23 |
24 | .nav_left .nav_left_items {
25 | height: 80rpx;
26 | padding: 6rpx 0;
27 | border-bottom: 1px solid #dedede;
28 | font-size: 28rpx;
29 | line-height: 80rpx;
30 | }
31 |
32 | .nav_left .nav_left_items.active {
33 | background: #fff;
34 | color: #3385ff;
35 | border-left: 3px solid #3385ff;
36 | }
37 |
38 | /* 4.右盒子 */
39 | .nav_right {
40 | position: absolute;
41 | top: 0;
42 | left: 20%;
43 | width: 80%;
44 | height: 100%;
45 | padding: 10px;
46 | box-sizing: border-box;
47 | background: #fff;
48 | display: inline-block;
49 | overflow: scroll;
50 | }
51 |
52 | /* 公告栏 */
53 | .blockNotice {
54 | margin-right: 10px;
55 | margin-top: 10rpx;
56 | padding-bottom: 60px;
57 | }
58 |
59 | .weui-cell {
60 | padding: 8px;
61 | }
62 |
63 | .inputArea {
64 | margin-top: 100px;
65 | margin-left: 20rpx;
66 | margin-right: 20rpx;
67 | border: 0.5px #cccccc93 ridge;
68 | padding: 8px 16px;
69 | width: 82%;
70 | }
71 |
72 | .inputText {
73 | height: 80px;
74 | width: 100%;
75 | }
76 |
77 | .line {
78 | margin: 16rpx 0;
79 | height: 1px;
80 | background-color: #e7e6e665;
81 | }
82 |
83 | .button {
84 | margin-top: 60px;
85 | }
86 |
87 |
88 | /* 轮播图 */
89 |
90 | .imgData_items {
91 | display: flex;
92 | flex-flow: row;
93 | }
94 |
95 | .imgData {
96 | padding: 10px;
97 | width: 70%;
98 | text-align: center;
99 | }
100 |
101 | .imgDelete {
102 | padding: 10px;
103 | width: 30%;
104 | height: 220rpx;
105 | text-align: center;
106 | line-height: 220rpx;
107 | }
108 |
109 | .imgData_item {
110 | width: 400rpx;
111 | height: 200rpx;
112 | }
113 |
114 | .imgData_delete {
115 | width: 72rpx;
116 | height: 72rpx;
117 | }
118 | .tipsBar{
119 | margin: 10px;
120 | }
121 |
122 | .blockInfo{
123 | padding-bottom: 40rpx;
124 | }
125 |
126 | /* 社团人员 */
127 |
128 | .bossheadInfo {
129 | display: flex;
130 | flex-flow: row;
131 | }
132 |
133 | .weui-cell_info {
134 | margin-left: 10px;
135 | width: 340rpx;
136 | height: 110rpx;
137 | }
138 |
139 | .weui-cell_Name {
140 | padding-bottom: 2px;
141 | }
142 |
143 | .weui-cell_Info_img {
144 | width: 100rpx;
145 | height: 100rpx;
146 | }
147 |
148 | .weui-cell_Img {
149 | width: 100rpx;
150 | height: 100rpx;
151 | }
152 |
153 | .weui-cell_cancel_img {
154 | width: 100rpx;
155 | height: 100rpx;
156 | text-align: center;
157 | }
158 |
159 | .weui-cell_cancelImg {
160 | width: 25px;
161 | height: 25px;
162 | margin-top: 25rpx;
163 | }
164 |
165 |
166 | /* 所有用户 */
167 | .weui-cell_all {
168 | height: 100rpx;
169 | line-height: 45rpx;
170 | }
171 |
172 | .weui-cell_allName {
173 | margin-left: 10px;
174 | width: 300rpx;
175 | height: 50rpx;
176 | }
177 |
178 | .weui-cells__title {
179 | margin: 10px 0;
180 | color: #000000;
181 | font-size: 14px;
182 | font-weight: 545;
183 | }
184 |
185 | .weui-input {
186 | margin: 10px;
187 | font-size: 18px;
188 | }
189 |
190 | .weui-cell_collegaImages {
191 | margin-left: 10px;
192 | }
193 |
194 | .collegaImages {
195 | width: 120rpx;
196 | height: 60rpx;
197 | }
198 | .adminImages{
199 | width: 60rpx;
200 | height: 60rpx;
201 | }
202 | .weui-cell_operate_img {
203 | width: 160rpx;
204 | height: 100rpx;
205 | display: flex;
206 | flex-flow: row;
207 | }
208 |
209 | .weui-cell_operate_add {
210 | width: 100rpx;
211 | height: 100rpx;
212 | text-align: center;
213 | }
214 |
215 | .weui-cell_operate_del {
216 | width: 100rpx;
217 | height: 100rpx;
218 | text-align: center;
219 | }
220 |
221 | .weui-cell_delete_user_Img {
222 | width: 25px;
223 | height: 25px;
224 | margin-top: 25rpx;
225 | }
226 |
227 |
228 | /* 文章列表 */
229 | .weui-cell_title {
230 | font-weight: 545;
231 | font-size: 34rpx;
232 | }
233 |
234 | .weui-cell_title_Contents {
235 | margin: 6rpx;
236 | padding: 4rpx;
237 | border-radius: 4px;
238 | background-color: #e0e0e02c;
239 | width: 480rpx;
240 | }
241 |
242 | .weui-cell_title_articleContent {
243 | height: 50px;
244 | font-size: 15px;
245 | overflow: hidden;
246 | text-overflow: ellipsis;
247 | display: -webkit-box;
248 | -webkit-line-clamp: 2;
249 | -webkit-box-orient: vertical;
250 | }
251 |
252 | .weui-cell_articleInfo {
253 | font-size: small;
254 | color: #6b6b6b;
255 | }
256 |
257 | .tips {
258 | font-size: small;
259 | color: #6b6b6b;
260 | }
261 |
262 | .weui-cell_type {
263 | font-size: 14px;
264 | color: #6b6b6b;
265 | }
266 |
267 | .weui-cell_delete_img {
268 | margin-left: 1vw;
269 | padding-top: 20%;
270 | }
271 |
272 | .weui-cell_deleteImg {
273 | width: 50rpx;
274 | height: 50rpx;
275 | }
276 |
277 |
278 | /* 评论 */
279 |
280 | .weui-cell_comments {
281 | font-weight: 545;
282 | font-size: 34rpx;
283 | margin: 2px 0 2px 6px;
284 | }
285 |
286 | .weui-cell_commenter {
287 | font-size: 14px;
288 | color: #6b6b6bce;
289 | margin-left: 12px;
290 | }
291 |
292 | .weui-cell_comment_Contents {
293 | margin: 6rpx;
294 | padding: 4rpx;
295 | border-radius: 4px;
296 | background-color: #e0e0e021;
297 | width: 480rpx;
298 | }
299 |
300 | .weui-cell_title_commentContent {
301 | margin-left: 4px;
302 | height: 26px;
303 | font-size: 16px;
304 | overflow: hidden;
305 | text-overflow: ellipsis;
306 | display: -webkit-box;
307 | -webkit-line-clamp: 1;
308 | -webkit-box-orient: vertical;
309 | }
310 | .weui-cell_author{
311 | padding-left: 4px;
312 | }
313 | .tip {
314 | color: #7e7e7ed2;
315 | font-size: 4px;
316 | }
--------------------------------------------------------------------------------
/miniprogram/pages/articleList/articleList.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data: {
3 | detail: [],
4 | type: '',
5 | },
6 |
7 | onLoad(event) {
8 | console.log(event.type)
9 | this.setData({
10 | type: event.type,
11 | })
12 | wx.cloud.database().collection('articles').where({ topicid: Number(this.data.type) }).orderBy('articleid', 'desc').get().then(res => {
13 | console.log(res)
14 | this.setData({
15 | detail: res.data
16 | })
17 | }).catch(res => {
18 | console.log(res)
19 | })
20 | },
21 |
22 |
23 |
24 | /**跳转 */
25 | goDetail(event) {
26 | console.log("获取的id", event.currentTarget.dataset.id)
27 | wx.navigateTo({
28 | url: '/pages/detail/detail?id=' + event.currentTarget.dataset.id,
29 | })
30 | wx.setNavigationBarTitle({
31 | title: '内容详情',
32 | })
33 | },
34 |
35 | // 下拉刷新
36 | onPullDownRefresh: function () {
37 | wx.cloud.database().collection('articles').where({ topicid: Number(this.data.type) }).orderBy('articleid', 'desc').get().then(res => {
38 | console.log(res)
39 | this.setData({
40 | detail: res.data,
41 | })
42 | }).catch(res => {
43 | console.log(res)
44 | })
45 | wx.stopPullDownRefresh()
46 | },
47 | })
--------------------------------------------------------------------------------
/miniprogram/pages/articleList/articleList.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true ,
3 | "usingComponents": {
4 | "mp-searchbar": "weui-miniprogram//searchbar/searchbar"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/pages/articleList/articleList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{item.title}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{item.nickName}}
31 |
32 |
33 |
34 |
35 |
36 | {{item.content}}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/miniprogram/pages/articleList/articleList.wxss:
--------------------------------------------------------------------------------
1 | /* pages/home/home.wxss */
2 | page {
3 | background-color: #ebebeb96;
4 | }
5 |
6 | .searchItem {
7 | line-height: 50%;
8 | display: flex;
9 | flex-flow: row;
10 | padding: 6px;
11 | background: #d8d4d46e;
12 | }
13 | .srearchIcon{
14 | margin-top: 3.5px;
15 | padding: 4px;
16 | background-color: white;
17 | height: 26px;
18 | border-top-left-radius: 4px;
19 | border-bottom-left-radius: 4px;
20 | }
21 | .searchInputItem {
22 | padding: 4px 4px 4px 0;
23 | height: 28px;
24 | width: 80%;
25 | }
26 |
27 | .searchInput {
28 | border-top-right-radius: 4px;
29 | border-bottom-right-radius: 4px;
30 | background: white;
31 | padding: 6px;
32 | }
33 |
34 | .searchButton {
35 | padding-top: 5px;
36 | width: 20%;
37 | text-align: center;
38 | }
39 |
40 | .items {
41 | margin: 20rpx;
42 | }
43 |
44 | .itembg {
45 | margin: 10rpx 8rpx 0 8rpx;
46 | border: 2px solid #ebebeb96;
47 | background-color: #ffffff;
48 | border-radius: 15px;
49 | }
50 |
51 | .itemTitle {
52 | font-size: 46rpx;
53 | margin: 4rpx 0;
54 | font-weight: 350;
55 | }
56 |
57 | .itemAT {
58 | margin: 5rpx 0;
59 | }
60 |
61 | .itemAuthor {
62 | color: #313131;
63 | display: flex;
64 | flex-flow: row;
65 | }
66 |
67 | .authorImg {
68 | width: 80rpx;
69 | height: 80rpx;
70 | }
71 |
72 | .authorName {
73 | height: 80rpx;
74 | text-align: center;
75 | font-size: 36rpx;
76 | margin-top: 24rpx;
77 | margin-left: 40rpx;
78 | }
79 |
80 | .img {
81 | width: 80rpx;
82 | height: 80rpx;
83 | }
84 |
85 | .itemContent {
86 | font-size: 36rpx;
87 | margin: 0 5rpx;
88 | }
89 | .itemImages{
90 | margin-top: 8px;
91 | }
92 | .itemImages image {
93 | width: 180rpx;
94 | height: 180rpx;
95 | }
96 | .imagesList{
97 | margin: 0 10px 0 5px;
98 | }
99 | .none {
100 | height: 20px;
101 | background: #ebebeb3f;
102 | }
--------------------------------------------------------------------------------
/miniprogram/pages/college/addcollege/addcollege.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | let name = ''
3 | let organizer = ''
4 | let number = ''
5 | let place = ''
6 | let link = ''
7 | let content = ''
8 |
9 | let activityid = Date.parse(new Date()); //文章id 为string类型时间
10 | Page({
11 |
12 | data: {
13 | links: ["微信", "QQ", "手机号"],
14 | linksIndex: 0,
15 | contact: '微信',
16 | startime: "2021-01-01",
17 | endtime: "2021-01-01",
18 | wordNumber: "0",
19 | nickName:'',
20 | office:''
21 | },
22 | onLoad() {
23 | wx.cloud.callFunction({
24 | name: 'login',
25 | data: {},
26 | success: res => {
27 | //获取openid
28 | console.log('user openid: ', res.result.openid)
29 | app.globalData.openid = res.result.openid
30 | this.setData({
31 | openID: res.result.openid
32 | })
33 | // 通过openid查找
34 | // console.log(res.result)
35 | // console.log(this.data.openID)
36 | wx.cloud.database().collection('user').where({
37 | _openid: this.data.openID
38 | }).get().then(res => {
39 | console.log("昵称", res.data.length)
40 | // for 遍历数组
41 | for (var i = 0; i < res.data.length; ++i) {
42 | // console.log(i);
43 | if (i >= 1) break;
44 | console.log(res.data[i])
45 | this.setData({
46 | nickName:res.data[i].nickName,
47 | office:res.data[i].office
48 | })
49 | }
50 | })
51 | },
52 |
53 | fail: err => {
54 | console.error('调用失败', err)
55 | }
56 | })
57 |
58 |
59 | },
60 | // 获取页面所有的值
61 | getName(event) {
62 | console.log("名称", event.detail.value)
63 | name = event.detail.value
64 | },
65 | getColleger(event) {
66 | console.log("人员", event.detail.value)
67 | organizer = event.detail.value
68 | },
69 | getNumber(event) {
70 | console.log("人数", event.detail.value)
71 | number = event.detail.value
72 | },
73 | getPlace(event) {
74 | console.log("地点", event.detail.value)
75 | place = event.detail.value
76 | },
77 | getLink(event) {
78 | console.log("联系", event.detail.value)
79 | link = event.detail.value
80 | },
81 | getContent(event) {
82 | console.log("详情", event.detail.value)
83 | content = event.detail.value
84 | this.setData({
85 | wordNumber: event.detail.value.length
86 | })
87 | },
88 | getStartime(event) {
89 | console.log("开始时间", event.detail.value)
90 | this.setData({ startime: event.detail.value })
91 | },
92 | getEndtime(event) {
93 | console.log("结束时间", event.detail.value)
94 | this.setData({ endtime: event.detail.value })
95 | },
96 |
97 |
98 | changeLinks: function (e) {
99 | console.log('值为', e.detail.value);
100 | this.setData({
101 | linksIndex: e.detail.value
102 | })
103 | if (e.detail.value == 0) {
104 | this.setData({
105 | contact: "微信"
106 | })
107 | } else if (e.detail.value == 1) {
108 | this.setData({
109 | contact: "QQ"
110 | })
111 | } else {
112 | this.setData({
113 | contact: "手机"
114 | })
115 | }
116 | },
117 |
118 |
119 |
120 | issuance() {
121 | if (name.length < 2 || organizer.length < 2 || number.length < 1 || place.length < 2 || link.length < 4 || content.length < 3) {
122 | wx.showToast({
123 | title: '内容过短或未填完',
124 | icon: 'none'
125 | })
126 | } else {
127 | wx.showLoading({
128 | title: '发布中'
129 | })
130 | wx.cloud.database().collection('activity').add({
131 | data: {
132 | activityid: activityid,
133 | title: name,
134 | organizer: organizer,
135 | number: number,
136 | place: place,
137 | link: link,
138 | contents: content,
139 | star_time: this.data.startime,
140 | end_time: this.data.endtime,
141 | contact: this.data.contact,
142 | nickName: this.data.nickName,
143 | office:this.data.office
144 | }
145 | })
146 | wx.hideLoading(), 2000
147 | }
148 | wx.navigateBack({
149 | delta: 1
150 | })
151 |
152 |
153 | }
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 | })
--------------------------------------------------------------------------------
/miniprogram/pages/college/addcollege/addcollege.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/college/addcollege/addcollege.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 活动名称:
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 组织人员:
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 参与人数:
29 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 活动地点:
41 |
42 |
43 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | {{links[linksIndex]}}
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
70 | {{wordNumber}}/50
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 开始时间:
79 |
80 |
81 |
82 | {{startime}}
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 结束时间:
92 |
93 |
94 |
95 | {{endtime}}
96 |
97 |
98 |
99 |
100 |
101 |
102 |
107 | 确认发布
108 |
109 |
110 |
--------------------------------------------------------------------------------
/miniprogram/pages/college/addcollege/addcollege.wxss:
--------------------------------------------------------------------------------
1 | /* pages/college/addcollege/addcollege.wxss */
2 | .textarea{
3 | margin: 5rpx 0;
4 | }
5 | .line{
6 | height: 1px;
7 | background: #ebebeb8c;
8 | margin: 16rpx 0;
9 | }
10 |
11 | .weui-cell__bd{
12 | font-size: 32rpx;
13 | margin: 0rpx 14rpx;
14 | }
15 |
16 |
17 |
18 | .sendArticle{
19 | padding-top: 0rpx;
20 | }
21 |
22 | .confirm{
23 | margin-top: 30rpx;
24 | width: 250rpx;
25 | margin-bottom: 30rpx;
26 | }
--------------------------------------------------------------------------------
/miniprogram/pages/college/college.js:
--------------------------------------------------------------------------------
1 |
2 | const db = wx.cloud.database()
3 | const _ = db.command
4 | let ID = ''
5 | let Name = ''
6 | let Class = ''
7 | let Phone = ''
8 |
9 | Page({
10 |
11 | data: {
12 | openID:'',
13 | slideButtons: [{
14 | src: '/pages/icon/delete.svg', // icon的路径
15 | }],
16 | delete: false,
17 | delid:'',
18 | activityDetail: '',
19 | showModalStatus: false,
20 | masterhead: []
21 | },
22 |
23 | onLoad() {
24 | db.collection('activity').orderBy('activityid','desc').get().then(res => {
25 | console.log(res)
26 | this.setData({
27 | activityDetail: res.data
28 | })
29 | })
30 |
31 | wx.cloud.callFunction({
32 | name: 'login',
33 | data: {},
34 | success: res => {
35 | //获取openid
36 | console.log('user openid: ', res.result.openid)
37 | this.setData({
38 | openID: res.result.openid
39 | })
40 | }
41 | })
42 | },
43 |
44 | hide(e) {
45 | // console.log(e)
46 | this.setData({
47 | delete: false
48 | })
49 | console.log("删除:",this.data.delete)
50 | },
51 | show(e) {
52 | // console.log(e)
53 | this.setData({
54 | delete: true
55 | })
56 | console.log("删除:", this.data.delete)
57 | },
58 |
59 |
60 |
61 | slideButtonTap(e) {
62 | // console.log(this.data.delete)
63 | console.log('slide button tap', e.target.id) // 文章的 _id
64 | this.setData({
65 | delid:e.currentTarget.id
66 | })
67 | if (this.data.delete == true) {
68 | console.log("id?=", this.data.delid)
69 |
70 | // 删除字段
71 | wx.cloud.database().collection('activity').doc(
72 | this.data.delid
73 | ).remove({
74 | success: res => {
75 | wx.showToast({
76 | title: '删除成功',
77 | })
78 | // 刷新页面
79 | db.collection('activity').orderBy('activityid','desc').get().then(res => {
80 | console.log(res)
81 | this.setData({
82 | activityDetail: res.data
83 | })
84 | })
85 | },
86 | fail: err => {
87 | wx.showToast({
88 | icon:'none',
89 | title: '无法删除他人创建的活动',
90 | })
91 | }
92 | })
93 | }else{
94 | wx.showToast({
95 | icon: 'error',
96 | title: '删除失败',
97 | })
98 | return
99 | }
100 | },
101 |
102 |
103 |
104 | goDetail(option) {
105 | console.log("获取的_id", option.currentTarget.dataset.id)
106 | wx.navigateTo({
107 | url: '/pages/activity/activityDetail/activityDetail?id=' + option.currentTarget.dataset.id,
108 | }),
109 | wx.setNavigationBarTitle({
110 | title: '活动详情'
111 | })
112 | },
113 |
114 |
115 |
116 | addCollege(){
117 | wx.navigateTo({
118 | url: './addcollege/addcollege',
119 | })
120 | wx.setNavigationBarTitle({
121 | title: '添加活动',
122 | })
123 | },
124 |
125 |
126 |
127 | onPullDownRefresh: function () {
128 | db.collection('activity').orderBy('activityid','desc').get().then(res => {
129 | console.log(res)
130 | this.setData({
131 | activityDetail: res.data
132 | })
133 | })
134 | },
135 |
136 | })
137 |
--------------------------------------------------------------------------------
/miniprogram/pages/college/college.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true ,
3 | "usingComponents": {
4 | "mp-cells": "weui-miniprogram/cells/cells",
5 | "mp-cell": "weui-miniprogram/cell/cell",
6 | "mp-slideview": "weui-miniprogram/slideview/slideview"
7 | }
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/college/college.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 活动列表
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
21 |
22 |
23 | 活动名称:
24 | {{item.title}}
25 |
26 |
27 |
28 |
29 | 组织人员:
30 | {{item.organizer}}
31 |
32 |
33 | 参与人数:
34 | {{item.number}}人
35 |
36 |
37 | 活动地点:
38 | {{item.place}}
39 |
40 |
41 | 创建者:
42 | {{item.office}}
43 | {{item.nickName}}
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/miniprogram/pages/college/college.wxss:
--------------------------------------------------------------------------------
1 | /* pages/college/college.wxss */
2 | page {
3 | background-color: #ebebeb96;
4 | }
5 | .titleBar{
6 | margin-top: 10rpx;
7 | height: 80rpx;
8 | width: 100%;
9 | display: flex;
10 | flex-flow: row;
11 | background-color:#ffffff;
12 | }
13 | .none{
14 |
15 | width: 20%;
16 | }
17 | .itembg {
18 | border: 2px solid #ebebeb96;
19 | background-color: #ffffff;
20 | border-radius: 15px;
21 | margin: 10rpx 8rpx 0 8rpx;
22 | padding: 10px;
23 | }
24 | .titleName{
25 | font-size: 46rpx;
26 | font-weight: 600;
27 | text-align: center;
28 | /* background-color: gold; */
29 | width: 60%;
30 | }
31 | .titleImg{
32 | margin-left: 20rpx;
33 | width: 80rpx;
34 | height: 80rpx;
35 | }
36 | .titleImg image{
37 | width: 80rpx;
38 | height: 80rpx;
39 | }
40 | .nickName{
41 | color: gray;
42 | font-size: 14px;
43 | }
--------------------------------------------------------------------------------
/miniprogram/pages/detail/detail.js:
--------------------------------------------------------------------------------
1 |
2 | var app = getApp()
3 | let ID = ''
4 | let commentator = ''
5 | Page({
6 | data: {
7 | articletitle: '',
8 | articletype: '',
9 | author: '',
10 | comments: '', //评论列表加载
11 | articleid: '',
12 | detail: '',
13 | collect: false, //收藏
14 | commentText: '', //评论value值
15 | comment: '', //评论内容
16 | images: '',
17 | openID: '',
18 | nickName: '',
19 | avatarUrl: '',
20 | wordNumber: 0,
21 | revert: [],
22 | revcontent: ''
23 | },
24 |
25 | onLoad(options) {
26 | wx.cloud.callFunction({
27 | name: 'login',
28 | data: {},
29 | success: res => {
30 | //获取openid
31 | console.log('user openid: ', res.result.openid)
32 | app.globalData.openid = res.result.openid
33 | this.setData({
34 | openID: res.result.openid
35 | })
36 |
37 | // 通过openid查找
38 | wx.cloud.database().collection('user').where({
39 | _openid: this.data.openID
40 | }).get().then(res => {
41 | console.log("昵称", res.data.length)
42 | // for 遍历数组
43 | for (var i = 0; i < res.data.length; ++i) {
44 | // console.log(i);
45 | if (i >= 1) break;
46 | console.log(res.data[i])
47 | this.setData({
48 | nickName: res.data[0].nickName,
49 | avatarUrl: res.data[0].avatarUrl,
50 | })
51 | }
52 | }).then(res => {
53 | // // 加载收藏
54 | wx.cloud.database().collection('collect').where({
55 | _openid: this.data.openID,
56 | articleid: this.data.articleid
57 | }).get().then(res => {
58 | console.log(this.data.nickName)
59 | console.log('数据', res.data)
60 | if (res.data.length < 1 || this.data.nickName == '') {
61 | this.setData({
62 | collect: false
63 | })
64 | console.log('值', this.data.collect)
65 | return
66 | } else {
67 | this.setData({
68 | collect: true
69 | })
70 | }
71 | console.log('值', this.data.collect)
72 | })
73 | })
74 | },
75 | fail: err => {
76 | console.error('调用失败', err)
77 | }
78 | })
79 |
80 | // 加载内容
81 | ID = options.id
82 | wx.cloud.database().collection('articles').doc(ID).get().then(res => {
83 | //设置data初始值
84 | console.log("详情页成功", res)
85 | this.setData({
86 | detail: res.data,
87 | author: res.data.nickName,
88 | articleid: res.data.articleid,
89 | articletitle: res.data.title,
90 | articletype: res.data.type,
91 | images: res.data.images
92 | })
93 |
94 | // 加载评论
95 | wx.cloud.database().collection('comment').orderBy('commentid', 'desc').where({
96 | articleid: this.data.articleid
97 | }).get().then(res => {
98 | console.log("加载成功", res)
99 | this.setData({
100 | comments: res.data,
101 | })
102 | }).catch(res => {
103 | console.log(res)
104 | })
105 | }).catch(res => {
106 | console.log("详情页失败", res)
107 | })
108 | },
109 |
110 |
111 | //获取评论内容
112 | getPinglun(event) {
113 | this.setData({ comment: event.detail.value, wordNumber: event.detail.value.length })
114 | console.log("获取到的内容", this.data.comment)
115 | },
116 |
117 | // 查看图片
118 | previewImage: function (e) {
119 | wx.previewImage({
120 | current: e.currentTarget.id, // 当前显示图片的http链接
121 | urls: this.data.images // 需要预览的图片http链接列表
122 | })
123 | },
124 |
125 | //发表按钮
126 |
127 | fabiao() {
128 | if (this.data.nickName == '') {
129 | wx.showModal({
130 | cancelColor: 'cancelColor',
131 | title: '您没有登入,是否登入?',
132 | content: '没有登入将无法使用!',
133 | success(res) {
134 | if (res.confirm) {
135 | wx.navigateTo({
136 | url: '/pages/login/login',
137 | })
138 | console.log('用户点击确定')
139 | } else if (res.cancel) {
140 | console.log('用户点击取消')
141 | }
142 | }
143 | })
144 | return
145 | }
146 | if (this.data.comment.length < 2) {
147 | wx.showToast({
148 | icon: 'error',
149 | title: '内容过短',
150 | })
151 | return
152 | } else {
153 | var commentid = Date.parse(new Date())
154 | console.log(this.data.articleid)
155 | wx.cloud.database().collection('comment').add({
156 | data: {
157 | avatarUrl: this.data.avatarUrl,
158 | articleid: this.data.articleid,
159 | commenter: this.data.nickName,
160 | content: this.data.comment,
161 | commentid: commentid,
162 | articletitle: this.data.articletitle,
163 | articletype: this.data.articletype,
164 | article_id: ID
165 | }
166 | }).then(res => {
167 | console.log("success", res)
168 | this.setData({
169 | commentText: '', //清空输入框
170 | comment: ''
171 | })
172 | wx.cloud.database().collection('comment').orderBy('commentid', 'desc').where({
173 | articleid: this.data.articleid
174 | }).get().then(res => {
175 | this.setData({
176 | comments: res.data,
177 | })
178 | })
179 | })
180 | }
181 | wx.showToast({
182 | title: '发表成功',
183 | icon: 'success'
184 | })
185 |
186 | },
187 |
188 |
189 |
190 | // // 收藏功能
191 | start(e) {
192 | this.startTime = e.timeStamp;
193 | },
194 | end(e) {
195 | this.endTime = e.timeStamp;
196 | },
197 | setCollect() {
198 | var that = this
199 | if (this.endTime - this.startTime > 350) {
200 | console.log("长按")
201 | return
202 | }
203 | if (this.data.nickName == '') {
204 | wx.showModal({
205 | cancelColor: 'cancelColor',
206 | title: '您没有登入,是否登入?',
207 | content: '没有登入将无法使用!',
208 | success(res) {
209 | if (res.confirm) {
210 | wx.navigateTo({
211 | url: '../login/login',
212 | })
213 | console.log('用户点击确定')
214 | } else if (res.cancel) {
215 | console.log('用户点击取消')
216 | }
217 | }
218 | })
219 | return
220 | }
221 | wx.cloud.database().collection('collect').where({
222 | _openid: this.data.openID,
223 | articleid: this.data.articleid
224 | }).get().then(res => {
225 | console.log('数据', res.data)
226 | if (res.data.length < 1) {
227 | wx.cloud.database().collection('collect').add({
228 | data: {
229 | articleid: this.data.articleid,
230 | collect: true,
231 | title: this.data.articletitle,
232 | author: this.data.author,
233 | collectid: ID
234 | }
235 | }).then(res => {
236 | wx.showToast({
237 | title: '收藏成功,长按取消收藏!',
238 | icon: 'none',
239 | success: res => {
240 | that.setData({
241 | collect: true
242 | })
243 | }
244 | })
245 | })
246 | return
247 | } else {
248 | wx.showToast({
249 | title: '你已经收藏过了!',
250 | icon: 'error'
251 | })
252 | }
253 | })
254 | },
255 |
256 |
257 | delCollect() {
258 | wx.cloud.database().collection('collect').where({
259 | _openid: this.data.openID,
260 | articleid: this.data.articleid
261 | }).get().then(res => {
262 | console.log('数据', res.data)
263 | if (res.data.length < 1) {
264 | wx.showToast({
265 | title: '你还没有收藏!',
266 | icon: 'error'
267 | })
268 | return
269 | } else {
270 | wx.cloud.database().collection('collect').where({
271 | _openid: this.data.openID,
272 | articleid: this.data.articleid
273 | }).remove().then(res => {
274 | wx.showToast({
275 | title: '取消成功',
276 | success: res => {
277 | this.setData({
278 | collect: false
279 | })
280 | }
281 | })
282 | })
283 | }
284 | })
285 | },
286 |
287 |
288 | /**跳转个人主页 */
289 | // 作者跳转
290 | goInfo(e) {
291 | console.log("用户_openid:", e)
292 | console.log("匿名id", e.currentTarget.dataset.id)
293 | if (e.currentTarget.dataset.id == 1) {
294 | wx.showToast({
295 | title: '匿名时无法查看',
296 | icon: 'error'
297 | })
298 | return
299 | } else {
300 | wx.navigateTo({
301 | url: '/pages/info/info?id=' + e.currentTarget.id,
302 | })
303 | wx.setNavigationBarTitle({
304 | title: this.data.author + '的信息',
305 | })
306 | }
307 | },
308 | // 跳转用户信息
309 | goCommenterInfo(e) {
310 | console.log("评论者 _openid:", e)
311 | wx.navigateTo({
312 | url: '/pages/info/info?id=' + e.currentTarget.id,
313 | })
314 | wx.setNavigationBarTitle({
315 | title: '个人信息',
316 | })
317 | },
318 |
319 | /**回复 评论*/
320 | //弹出窗
321 | close: function () {
322 | this.setData({
323 | dialog: false,
324 | });
325 | },
326 |
327 | review(e) {
328 | console.log(e.currentTarget.id)
329 | var revcommentid = e.currentTarget.id
330 | this.setData({ revcommentid: revcommentid })
331 | wx.cloud.database().collection('comment').doc(revcommentid).get().then(res => {
332 | console.log(res)
333 | this.setData({
334 | revcommenter: res.data.commenter
335 | })
336 | })
337 | this.setData({
338 | dialog: true,
339 | revcommenter: '',
340 | });
341 | },
342 |
343 |
344 | reviews(e) {
345 | //console.log(e)
346 | const db = wx.cloud.database()
347 | const _ = db.command
348 | console.log(e.currentTarget.id)
349 | this.setData({
350 | dialog: true,
351 | revcommenter: e.currentTarget.id,
352 | revcommentid: e.currentTarget.dataset.rev_id
353 | });
354 | },
355 |
356 |
357 |
358 | revcontent(e) {
359 | console.log(e.detail.value)
360 | this.setData({
361 | revcontent: e.detail.value
362 | })
363 | },
364 |
365 | btnDonate() {
366 | if (this.data.nickName == '') {
367 | wx.showModal({
368 | cancelColor: 'cancelColor',
369 | title: '您没有登入,是否登入?',
370 | content: '没有登入将无法使用!',
371 | success(res) {
372 | if (res.confirm) {
373 | wx.navigateTo({
374 | url: '../login/login',
375 | })
376 | console.log('用户点击确定')
377 | } else if (res.cancel) {
378 | console.log('用户点击取消')
379 | }
380 | }
381 | })
382 | return
383 | }
384 | if (this.data.revcontent.length < 2) {
385 | wx.showToast({
386 | title: '内容太短',
387 | icon: 'error',
388 | })
389 | return
390 | }
391 | console.log(this.data.revcommentid)
392 | let revertItem = {}
393 | revertItem.rev_id = this.data.revcommentid,
394 | revertItem.rev_obj = this.data.revcommenter
395 | revertItem.rev_name = this.data.nickName
396 | revertItem.rev_content = this.data.revcontent
397 | this.data.revert.push(revertItem)
398 | console.log(this.data.revert)
399 |
400 | wx.cloud.callFunction({
401 | name: 'update_revert',
402 | data: {
403 | id: this.data.revcommentid,
404 | revert: revertItem
405 | }
406 | }).then(res => {
407 | wx.cloud.database().collection('comment').orderBy('commentid', 'desc').where({
408 | articleid: this.data.articleid
409 | }).get().then(res => {
410 | this.setData({
411 | comments: res.data,
412 | })
413 | })
414 | })
415 | wx.showToast({
416 | title: '回复成功',
417 | success: res => {
418 | this.setData({
419 | dialog: false,
420 | })
421 | }
422 | })
423 | },
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 | })
433 |
--------------------------------------------------------------------------------
/miniprogram/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true ,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{detail.title}}
6 |
7 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 来源:
18 | {{detail.nickName}}
20 |
21 |
22 | 标签:
23 | {{detail.type}}
24 |
25 |
26 |
27 | {{detail.content}}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 全部评论
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | {{item.commenter}}:
52 | 回复
53 |
54 | {{item.content}}
55 |
56 |
57 |
58 | {{item.rev_name}}
59 | 回复
60 | {{item.rev_obj}}:{{item.rev_content}}
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
78 | {{wordNumber}}/50
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 | 返回
93 |
94 |
95 | 回复
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/miniprogram/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index/share/sharedetail/sharedetail.wxss */
2 | .titleBar{
3 | display: flex;
4 | flex-flow: row;
5 | }
6 | .collect_view{
7 | margin-top: 25rpx;
8 | width: 26px;
9 | height: 26px;
10 | padding: 1px;
11 | }
12 | .collectImage{
13 | width: 25px;
14 | height: 25px;
15 | }
16 |
17 |
18 |
19 |
20 | .itemDetail{
21 | margin: 15rpx;
22 | }
23 | .itemTitle{
24 | font-size: 50rpx;
25 | margin: 8rpx 0 0 0;
26 | font-weight: 545;
27 | width: 90%;
28 | }
29 | .weui-cells__title{
30 | width: 300rpx;
31 | margin-top: 4px;
32 | margin-bottom: 8px;
33 |
34 | }
35 | .itemAT{
36 | margin: 8rpx 0 0 0;
37 | display: flex;
38 | flex-direction: row;
39 | font-size: 34rpx;
40 | }
41 | .itemAuthor{
42 | color: #868686;
43 | width: 400rpx;
44 | }
45 | .itemTags{
46 | margin-left: 80rpx;
47 | color: #868686;
48 | }
49 | .itemContent{
50 | padding: 10rpx;
51 | font-size: 18px;
52 | }
53 |
54 | .img_1{
55 | max-height: 200rpx;
56 | max-width: 200rpx;
57 | margin: 5rpx 0 5rpx 36rpx;
58 | }
59 | .line{
60 | margin-bottom: 8px;
61 | height: 2px;
62 | background-color: #f2f2f2;
63 | }
64 | /* image{
65 | margin: 0 8%;
66 | padding: 20rpx;
67 | width: 64rpx;
68 | height: 64rpx;
69 | } */
70 | .weui-article__h2{
71 | margin-left: 20rpx;
72 | }
73 |
74 |
75 | .tips{
76 | margin-top: 15rpx;
77 | font-size: 50rpx;
78 | }
79 |
80 | .inputCentent{
81 | height: 100px;
82 | width: 94%;
83 | border: 1px solid gray;
84 | margin: 20rpx 3%;
85 | }
86 | .inputName{
87 | border: 1px solid gray;
88 | margin-top:80rpx;
89 | margin: 0 20rpx;
90 | height: 30px;
91 | margin-bottom: 30rpx;
92 | }
93 | button{
94 | margin-top: 30rpx;
95 | margin-bottom: 100rpx;
96 | }
97 |
98 |
99 | .pinglunItems{
100 | display: flex;
101 | flex-flow: row;
102 | font-size: 30rpx;
103 | margin-left: 4%;
104 | margin-top: 15rpx;
105 | margin-right: 4%;
106 | width: 92%;
107 | }
108 | .pinglunItems_avatarurl{
109 | width: 84rpx;
110 | height: 84rpx;
111 | border-radius: 42rpx;
112 | }
113 | .pinglunItems_info{
114 | border-radius: 50%;
115 | }
116 | .pinglun_content{
117 | margin-left: 10rpx;
118 |
119 | }
120 |
--------------------------------------------------------------------------------
/miniprogram/pages/icon/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/3.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/4.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/about.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/add.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/addCollege.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/addCollege.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/addimags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/addimags.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/admin_true.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/admin_true.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/collega_false.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/collega_false.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/collega_true.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/collega_true.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/del.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/delete.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/icon/home-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/home-select.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/home.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_add.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_admin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_admin.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_cancel.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_college.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_college.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_come.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_come.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_fabu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_fabu.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_pinglun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_pinglun.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_shezhi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_shezhi.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_shoucang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/icon_shoucang.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/icon_update.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/icon/issuance-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/issuance-select.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/issuance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/issuance.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/me-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/me-select.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/me.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/noticeBar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/icon/noticeBar.png
--------------------------------------------------------------------------------
/miniprogram/pages/icon/shoucangFalse.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/icon/shoucangTrue.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/pages/images/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/images/login.png
--------------------------------------------------------------------------------
/miniprogram/pages/images/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/images/logo.jpg
--------------------------------------------------------------------------------
/miniprogram/pages/images/tip_jinggao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/images/tip_jinggao.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/activity.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/chengji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/chengji.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/love.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/love.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/questions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/questions.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/qushi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/qushi.png
--------------------------------------------------------------------------------
/miniprogram/pages/img/sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/img/sign.png
--------------------------------------------------------------------------------
/miniprogram/pages/index/cet/cet.js:
--------------------------------------------------------------------------------
1 | Page({
2 |
3 | /**
4 | * 页面的初始数据
5 | */
6 | data: {
7 | newsUrl:"https://www.chsi.com.cn/cet/"
8 | },
9 | })
--------------------------------------------------------------------------------
/miniprogram/pages/index/cet/cet.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/cet/cet.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/cet/cet.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/miniprogram/pages/index/cet/cet.wxss
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.js:
--------------------------------------------------------------------------------
1 | // pages/index/index.js
2 | Page({
3 | data: {
4 | url: '',
5 | notices: '',
6 | },
7 |
8 | onLoad() {
9 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(
10 | res => {
11 | // console.log(res.data.images)
12 | this.setData({
13 | url: res.data.images,
14 | notices: res.data.notices,
15 | })
16 | }
17 | )
18 | },
19 | onShow() {
20 | wx.cloud.database().collection('index').doc('b00064a76054bf6b0adc04827ae254ba').get().then(
21 | res => {
22 | // console.log(res.data)
23 | this.setData({
24 | url: res.data.images,
25 | notices: res.data.notices,
26 | })
27 | }
28 | )
29 | },
30 | qushi() { //逸闻趣事
31 | wx.navigateTo({
32 | url: '../articleList/articleList?type=0',
33 | })
34 | wx.setNavigationBarTitle({
35 | title: '逸闻趣事'
36 | })
37 | },
38 | questions() { //疑问互答
39 | wx.navigateTo({
40 | url: '../articleList/articleList?type=1',
41 | })
42 | wx.setNavigationBarTitle({
43 | title: '疑问互答'
44 | })
45 | },
46 | sight() { //校园一角
47 | wx.navigateTo({
48 | url: '../articleList/articleList?type=2',
49 | })
50 | wx.setNavigationBarTitle({
51 | title: '校园一角'
52 | })
53 | },
54 | love() { //表白交友
55 | wx.navigateTo({
56 | url: '../articleList/articleList?type=3',
57 | })
58 | wx.setNavigationBarTitle({
59 | title: '表白交友'
60 | })
61 | },
62 | activityPage() { //社团活动
63 | wx.navigateTo({
64 | url: '../activity/activity',
65 | })
66 | wx.setNavigationBarTitle({
67 | title: '社团活动'
68 | })
69 | },
70 | chengji() { //四六级
71 | wx.navigateTo({
72 | url: './cet/cet',
73 | })
74 | wx.setNavigationBarTitle({
75 | title: '四六级查询'
76 | })
77 | },
78 | })
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-searchbar": "weui-miniprogram//searchbar/searchbar"
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{item}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 逸闻趣事
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | 疑问互答
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 校园一角
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | 表白交友
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | 社团活动
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | CET查询
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index/index.wxss */
2 |
3 | /* 轮播图 */
4 | .swiper_lbt{
5 | width: 700rpx;
6 | height: 300rpx;
7 | padding: 16rpx;
8 | }
9 | .bg{
10 | width: 674rpx;
11 | height: 300rpx;
12 | display: block;
13 | border-radius: 15px;
14 | margin-left: 22rpx;
15 | }
16 |
17 | .notice{
18 | margin: 10rpx 25rpx;
19 | height: 52rpx;
20 | background-color: #dbdada1e;
21 | padding-left: 10rpx;
22 | display: flex;
23 | flex-flow: row;
24 | border-radius: 6px;
25 | }
26 | .noticeBar{
27 | margin: 1rpx 0;
28 | height: 50rpx;
29 | line-height: 50rpx;
30 | }
31 |
32 | .noticeBarImg{
33 | width: 48rpx;
34 | height: 48rpx;
35 | }
36 | .swiper{
37 | height: 50rpx;
38 | width: 80vw;
39 | }
40 | .noticeBarText{
41 | padding-left: 10px;
42 | margin-left: 18px;
43 | border-radius: 6px;
44 | }
45 | .swiperText{
46 | font-size: 28rpx;
47 | overflow: hidden;
48 | text-overflow: ellipsis;
49 | white-space: nowrap;
50 | letter-spacing: 2px;
51 | }
52 | /*项目分类*/
53 | .items{
54 | width: 100%;
55 | height: auto;
56 | font-size: 38rpx;
57 | }
58 | .classification{
59 | display: flex;
60 | flex-flow: row;
61 | margin: 10rpx 20rpx;
62 |
63 | }
64 | .itemsActivity{
65 | width: 200rpx;
66 | margin: 10rpx 0 10rpx 106rpx;
67 | background-color: #f0f0f027;
68 |
69 | }
70 | .image{
71 | width: 130rpx;
72 | height: 130rpx;
73 | margin: 5rpx 5rpx 5rpx 34rpx;
74 | }
75 | .activityText{
76 | text-align: center;
77 | }
78 |
--------------------------------------------------------------------------------
/miniprogram/pages/info/info.js:
--------------------------------------------------------------------------------
1 | // pages/info/info.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | info:''
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 | console.log(options)
16 | wx.cloud.database().collection('user').where({_openid : options.id}).get().then(res=>{
17 |
18 | this.setData({
19 | info:res.data[0]
20 | })
21 | console.log(this.data.info)
22 | })
23 | },
24 | })
--------------------------------------------------------------------------------
/miniprogram/pages/info/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/info/info.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 昵称
26 |
27 |
28 | {{info.nickName}}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | 性别
37 |
38 |
39 | {{info.sex}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 年龄
48 |
49 |
50 | {{info.age}}
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 社团
59 |
60 |
61 | {{info.office}}
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | 城市
70 |
71 |
72 | {{info.province}}{{info.city}}
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | QQ
83 |
84 |
85 | {{info.qqnumber}}
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | 邮箱
94 |
95 |
96 | {{info.mailnumber}}
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/miniprogram/pages/info/info.wxss:
--------------------------------------------------------------------------------
1 | /* pages/info/info.wxss */
2 | .top{
3 | height: 5px;
4 | background-color: #ebebebce;
5 | }
6 | .infoPage{
7 | margin: 20rpx 20rpx;
8 | font-size: 40rpx;
9 | border-radius: 10px;
10 | }
11 | .info_images{
12 | display: flex;
13 | flex-flow: row;
14 | }
15 | .image{
16 | width: 140rpx;
17 | height: 140rpx;
18 | margin-right: 20rpx;
19 | }
20 | .info_admin_college{
21 | height: 140rpx;
22 | }
23 | .info_admin_college_view{
24 | width: 140rpx;
25 | height: 70rpx;
26 | }
27 | .info_admin_college_view_Images{
28 | padding: 5px;
29 | width: 120rpx;
30 | height: 60rpx;
31 | }
32 | .info_admin_view_Images{
33 | padding: 5px;
34 | width: 120rpx;
35 | height: 50rpx;
36 | }
37 | .line{
38 | height: 1px;
39 | background: #ddddddcc;
40 | }
41 | .meinfo{
42 | display: flex;
43 | flex-flow: row;
44 | height: 60rpx;
45 | margin: 20rpx 0;
46 | width: 100%;
47 | }
48 | .meInfo{
49 | display: flex;
50 | flex-flow: row;
51 | height: 120rpx;
52 | margin: 20rpx 0;
53 | width: 100%;
54 | }
55 | .item{
56 | width: 400rpx;
57 | }
58 |
59 | .text{
60 | width: 100px;
61 | /* background-color: gray; */
62 | }
63 | .button{
64 | margin-top: 60rpx;
65 | margin-bottom: 60rpx;
66 | }
--------------------------------------------------------------------------------
/miniprogram/pages/issuance/issuance.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 | let listArr = ''
4 | let fileidsArr = []
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | theme: {
12 | color: '#1890FF',
13 | tabColor: '#333' || '#20ACAB',
14 | },
15 | topic: {
16 | sorts:
17 | ["逸闻趣事", "疑问互答", "校园一角", "表白交友"],
18 | selected: 0
19 | },
20 | valueInput: '',
21 | articleid: '',
22 | title: '',
23 | content: '',
24 | images: '',
25 | topicid: 0,
26 | anonymous: false,
27 | imageList: [],
28 | fileidArr: [],
29 | avatarUrl: '',
30 | nickName: '',
31 | type: '',
32 | anonymity:'0',
33 | },
34 |
35 | // 是否匿名
36 | postStatus: function (e) {
37 | this.setData({
38 | anonymous: !this.data.anonymous
39 | }, () => {
40 | console.log("是否匿名", this.data.anonymous)
41 | })
42 | },
43 | /**
44 | * 生命周期函数--监听页面加载
45 | */
46 | onShow: function () {
47 | wx.cloud.callFunction({
48 | name: 'login',
49 | data: {},
50 | success: res => {
51 | //获取openid
52 | console.log('user openid: ', res.result.openid)
53 | app.globalData.openid = res.result.openid
54 | this.setData({
55 | openID: res.result.openid
56 | })
57 | // 通过openid查找
58 | console.log("openid:", this.data.openID)
59 | wx.cloud.database().collection('user').where({
60 | _openid: this.data.openID
61 | }).get().then(res => {
62 | // console.log(res.data[0])
63 | console.log("用户信息数组长度", res.data.length)
64 | // for 遍历数组
65 | for (var i = 0; i < res.data.length; ++i) {
66 | console.log("用户信息数组下标",i);
67 | if (i >= 1) break;
68 | // console.log("信息数组",res.data[i])
69 | this.setData({
70 | avatarUrl: res.data[i].avatarUrl,
71 | nickName: res.data[i].nickName,
72 | })
73 | }
74 | })
75 | },
76 | fail: err => {
77 | console.error('调用失败', err)
78 | }
79 | })
80 | },
81 |
82 | getTitle(event) {
83 | this.data.title = event.detail.value
84 | console.log("获取到的标题:", this.data.title.length)
85 | },
86 | getContent(event) {
87 | this.data.content = event.detail.value
88 | console.log("获取到的内容:", this.data.content.length)
89 | },
90 | // 清空照片或者图片
91 | clearInput: function (name) {
92 | if (name != 'imageList') {
93 | this.setData({ imageList: [] })
94 | }
95 | },
96 |
97 | // 选择照片
98 | chooseImage: function (e) {
99 | var that = this;
100 | let surplus = 9 - this.data.imageList.length
101 | wx.chooseImage({
102 | count: surplus,
103 | sizeType: ['compressed'],
104 | sourceType: ['album', 'camera'],
105 | success: function (res) {
106 | that.clearInput("imageList");
107 | that.addNewImage(res.tempFilePaths);
108 | wx.showToast({
109 | title: '上传成功!',
110 | duration: 500
111 | })
112 | }
113 | })
114 | },
115 |
116 | addNewImage(imagePath) {
117 | listArr = this.data.imageList
118 | listArr = listArr.concat(imagePath)
119 | this.setData({
120 | imageList: listArr
121 | })
122 | console.log("临时路径", listArr) //图片临时路径
123 | },
124 |
125 | thisImage: function (e) {
126 | let index = e.currentTarget.dataset.imageid;
127 | let list = this.data.imageList;
128 | console.log("点击大图", index)
129 | wx.previewImage({
130 | urls: list,
131 | current: list[index]
132 | })
133 | },
134 |
135 | deleteImage: function (e) {
136 | let index = e.currentTarget.dataset.imageid;
137 | let list = this.data.imageList;
138 | list.splice(index, 1)
139 | this.setData({
140 | imageList: list
141 | })
142 | },
143 |
144 |
145 |
146 | // 发布的类型
147 | clickTag: function (e) {
148 | console.log("topicid=", e.currentTarget.dataset.topicid)
149 | let topicId = e.target.dataset.topicid;
150 | let topic = this.data.topic;
151 | topic.selected = topicId;
152 | this.setData({
153 | topic,
154 | topicid: e.currentTarget.dataset.topicid
155 | })
156 | },
157 |
158 | issuance() {
159 | if (this.data.nickName == '') {
160 | console.log(this.data.nickName)
161 | wx.showModal({
162 | cancelColor: 'cancelColor',
163 | title: '您没有登入,是否登入?',
164 | content:'没有登入将无法使用!',
165 | success(res) {
166 | if (res.confirm) {
167 | wx.navigateTo({
168 | url: '../login/login',
169 | })
170 | console.log('用户点击确定')
171 | } else if (res.cancel) {
172 | console.log('用户点击取消')
173 | }
174 | }
175 | })
176 | return
177 | }
178 | if (this.data.title.length < 3) { //判断文字是否过短
179 | wx.showToast({
180 | title: '内容过短',
181 | icon: 'error',
182 | duration: 1500
183 | })
184 | return
185 | }else if(this.data.topicid == 2 && listArr == []){
186 | wx.showToast({
187 | title: '至少有一张图',
188 | icon:'error'
189 | })
190 | return
191 | }else {
192 | this.setData({
193 | articleid: Date.parse(new Date())
194 | })
195 | //文章id 为string类型时间
196 | let PromiseArr = [];
197 | for (let i = 0; i < listArr.length; i++) {
198 | PromiseArr.push(new Promise((reslove, reject) => {
199 | wx.cloud.uploadFile({
200 | cloudPath: `${'2021-' + new Date().getUTCMonth()}/${new Date().getUTCDate() + 1}/${Date.parse(new Date())}${i}.png`,
201 | filePath: listArr[i],
202 | success: res => {
203 | this.setData({
204 | fileidArr: this.data.fileidArr.concat(res.fileID), //
205 | })
206 | console.log("已存入的fileID", this.data.fileidArr)
207 | reslove();
208 | },
209 | fail: console.error
210 | })
211 | }))
212 | }
213 | if (this.data.anonymous == true) {
214 | this.setData({
215 | nickName: '匿名',
216 | avatarUrl: 'cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/login.png',
217 | anonymity:'1'
218 | })
219 | } else {
220 | console.log(this.data.nickName)
221 | }
222 | if (this.data.topicid == 0) {
223 | this.setData({
224 | type: '逸闻趣事'
225 | })
226 | } else if (this.data.topicid == 1) {
227 | this.setData({
228 | type: '疑问互答'
229 | })
230 | } else if (this.data.topicid == 2) {
231 | this.setData({
232 | type: '校园一角'
233 | })
234 | } else {
235 | this.setData({
236 | type: '表白交友'
237 | })
238 | }
239 |
240 |
241 |
242 | Promise.all(PromiseArr).then(res => { //数据都存入数组后打印
243 | this.data.fileidsArr = this.data.fileidArr
244 | console.log("文件id", fileidsArr)
245 | const db = wx.cloud.database()
246 | const _ = db.command
247 | db.collection('articles').add({
248 | data: {
249 | articleid: this.data.articleid,
250 | title: this.data.title,
251 | content: this.data.content,
252 | images: this.data.fileidsArr,
253 | anonymous: this.data.anonymous,
254 | topicid: this.data.topicid,
255 | avatarUrl: this.data.avatarUrl,
256 | nickName: this.data.nickName,
257 | type: this.data.type,
258 | anonymity:this.data.anonymity
259 | }
260 | }).then(res => {
261 | // wx.clearStorage()
262 | this.setData({
263 | valueInput: '',
264 | articleid: '',
265 | title: '',
266 | content: '',
267 | fileidArr: [],
268 | anonymous: false,
269 | topicid: 0,
270 | type: '',
271 | imageList: [],
272 | anonymity:'0'
273 | })
274 | })
275 | })
276 | wx.showToast({
277 | title: '发布成功',
278 | icon: 'success',
279 | duration: 1500
280 | })
281 |
282 | }
283 | wx.navigateTo({
284 | url: '../articleList/articleList?type='+this.data.topicid,
285 | })
286 | }
287 |
288 |
289 |
290 | })
291 |
--------------------------------------------------------------------------------
/miniprogram/pages/issuance/issuance.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/issuance/issuance.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 匿名发布
38 |
39 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | 选择类型
53 |
54 | {{item}}
57 |
58 |
59 |
60 |
61 |
62 |
67 | 确认发布
68 |
69 |
70 |
--------------------------------------------------------------------------------
/miniprogram/pages/issuance/issuance.wxss:
--------------------------------------------------------------------------------
1 | /* 虚假页面 */
2 | .bg{
3 | width: 100%;
4 | height: 600px;
5 | }
6 | .title{
7 | width: 100%;
8 | height: 600px;
9 | text-align: center;
10 | }
11 | .bg_img{
12 | width: 80%;
13 | height: 550px;
14 | }
15 |
16 | /* 真实页面 */
17 | .content-input {
18 | background-color: #ffffff;
19 | margin-bottom: 0rpx;
20 | position: relative;
21 | padding: 18rpx 24rpx;
22 | }
23 | .title-input{
24 | height: 40rpx;
25 | margin: 0rpx 8rpx;
26 | }
27 | .text-input {
28 | height: 350rpx;
29 | width: 100%;
30 | min-height: 350rpx;
31 | max-height: 450rpx;
32 | z-index: 998;
33 | margin: 0rpx 8rpx;
34 | }
35 |
36 | /* 视频以及图片展示 */
37 | .image-list{
38 | display: flex;
39 | flex-wrap: wrap;
40 | /* padding-left: 18rpx; */
41 | /* justify-content: center; */
42 | }
43 |
44 | .showImage{
45 | width: 20vw;
46 | height: 20vw;
47 | margin: 6rpx 10rpx 10rpx 10rpx;
48 | }
49 |
50 | .showImage image{
51 | width: 100%;
52 | height: 100%;
53 | }
54 |
55 | .addImage{
56 | background: #f8f8f8;
57 | width: 20vw;
58 | height: 20vw;
59 | margin: 6rpx;
60 | display: flex;
61 | justify-content: center;
62 | align-items: center;
63 | }
64 |
65 | .addImage image{
66 | width: 40%;
67 | height: 40%;
68 | }
69 |
70 |
71 | .video {
72 | width: 40vw;
73 | height: 40vw;
74 | }
75 |
76 | .video video {
77 | width: 100%;
78 | height: 100%;
79 | z-index: 999;
80 | }
81 |
82 |
83 |
84 | /* 删除和增加 */
85 | .box{
86 | box-sizing: border-box;
87 | position: relative;
88 | }
89 |
90 | .delete{
91 | position:absolute;
92 | top: -21rpx;
93 | right: -21rpx;
94 | width: 42rpx;
95 | height: 42rpx;
96 | border-radius: 50%;
97 | background: rgba(0, 0, 0, .3);
98 | z-index: 1000;
99 | display: flex;
100 | align-items: center;
101 | justify-content: center;
102 | }
103 |
104 | .delete image{
105 | width: 32rpx;
106 | height: 32rpx;
107 | }
108 |
109 |
110 |
111 | /* 上传 */
112 | .toUpload{
113 | display: flex;
114 | align-items: center;
115 | }
116 |
117 | .uploadIcon{
118 | margin: 0px 10rpx 0rpx 0rpx;
119 | padding: 0px;
120 | }
121 | .uploadIcon image{
122 | vertical-align: middle;
123 | width: 56rpx;
124 | height: 56rpx;
125 | padding: 8rpx 8rpx;
126 | }
127 |
128 | .uploadIcon:hover{
129 | background-color: rgb(248, 248, 248);
130 | }
131 |
132 |
133 | /* 标签 */
134 | .tag-title {
135 | font-size: 32rpx;
136 | margin: 0rpx 8rpx;
137 | }
138 |
139 | .tag-list {
140 | margin-left: -14rpx;
141 | display: flex;
142 | white-space: nowrap;
143 | justify-content: space-between;
144 | height: 80rpx;
145 | margin-top: 6rpx;
146 |
147 | }
148 |
149 | .tag {
150 | border: 1px solid lightgray;
151 | border-radius: 2px;
152 | font-size: 28rpx;
153 | color: gray;
154 | padding: 6rpx 16rpx;
155 | margin: 10rpx 20rpx 10rpx 20rpx;
156 | word-break: keep-all;
157 | }
158 |
159 | .arrow-right {
160 | margin-left: auto;
161 | width: 48rpx;
162 | height: 48rpx;
163 | min-width: 48rpx;
164 | max-width: 48rpx;
165 | }
166 |
167 | .switch{
168 | display: flex;
169 | }
170 |
171 | .weui-cell__bd{
172 | font-size: 32rpx;
173 | margin: 0rpx 14rpx;
174 | }
175 |
176 |
177 |
178 | .sendArticle{
179 | padding-top: 0rpx;
180 | }
181 |
182 | .confirm{
183 | margin-top: 60rpx;
184 | width: 250rpx;
185 | margin-bottom: 60rpx;
186 | }
187 |
188 | .line{
189 | height: 1px;
190 | background: #ebebeb8c;
191 | margin: 20rpx 0;
192 | }
--------------------------------------------------------------------------------
/miniprogram/pages/login/login.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | Page({
4 | data: {
5 | //判断小程序的API,回调,参数,组件等是否在当前版本可用。
6 | canIUse: wx.canIUse('button.open-type.getUserInfo')
7 | },
8 | onLoad: function () {
9 |
10 | },
11 |
12 | //获取用户信息接口
13 | queryUsreInfo: function () {
14 | wx.request({
15 | url: getApp().globalData.urlPath + 'hstc_interface/queryByOpenid',
16 | data: {
17 | openid: getApp().globalData.openid
18 | },
19 | header: {
20 | 'content-type': 'application/json'
21 | },
22 | success: function (res) {
23 | console.log(res.data);
24 | getApp().globalData.userInfo = res.data;
25 | }
26 | })
27 | },
28 |
29 |
30 | returnMe() {
31 | wx.navigateBack({
32 | delta: 1,
33 | })
34 | },
35 |
36 | getUserProfile(e) {
37 | console.log(e)
38 | var that = this
39 | // if (e.detail.userInfo) {
40 | wx.getUserProfile({
41 | desc: '用于完善资料',
42 | lang: 'zh_CN',
43 | success: (res) => {
44 | this.setData({
45 | userInfo: res.userInfo,
46 | hasUserInfo: true
47 | })
48 | console.log(res.userInfo)
49 | wx.cloud.database().collection('user').add({
50 | data: {
51 | openid: getApp().globalData.openid,
52 | nickName: res.userInfo.nickName,
53 | avatarUrl: res.userInfo.avatarUrl,
54 | province: res.userInfo.province,
55 | city: res.userInfo.city,
56 | sex: '',
57 | qqnumber: '',
58 | mailnumber: '',
59 | age: '',
60 | bosshead: false,
61 | admin: true,
62 | office:'无',
63 |
64 | },
65 | }).then(res => {
66 | //从数据库获取用户信息
67 | that.queryUsreInfo();
68 | console.log("插入小程序登录用户信息成功!");
69 | wx.switchTab({
70 | url: '/pages/index/index'
71 | })
72 | })
73 | }, fail: res => {
74 | wx.showModal({
75 | title: '警告',
76 | content: '您点击了拒绝授权,将无法使用小程序,请授权之后再进入',
77 | showCancel: false,
78 | confirmText: '返回授权',
79 | success: function (res) {
80 | if (res.confirm) {
81 | console.log('用户点击了“返回授权”')
82 | }
83 | }
84 | })
85 | }
86 | })
87 | },
88 | })
89 |
--------------------------------------------------------------------------------
/miniprogram/pages/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 | 申请获取以下权限
16 | 获得你的公开信息(昵称,头像等)
17 | 登录后将返回首页
18 |
19 |
20 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/miniprogram/pages/login/login.wxss:
--------------------------------------------------------------------------------
1 | /* pages/index/index.wxss */
2 |
3 | .header {
4 | margin: 90rpx 0 90rpx 50rpx;
5 | border-bottom: 1px solid #ccc;
6 | text-align: center;
7 | width: 650rpx;
8 | }
9 | .header image {
10 | width: 200rpx;
11 | height: 200rpx;
12 | }
13 | .name{
14 | width: 100%;
15 | height: 60rpx;
16 | font-size: 40rpx;
17 | text-align: center;
18 | line-height: 60rpx;
19 | margin: 60rpx 0;
20 | }
21 | .content {
22 | margin-left: 50rpx;
23 | margin-bottom: 90rpx;
24 | }
25 |
26 | .content text {
27 | display: block;
28 | color: #9d9d9d;
29 | margin-top: 40rpx;
30 | }
31 |
32 | .bottom {
33 | border-radius: 80rpx;
34 | margin: 70rpx 50rpx;
35 | font-size: 35rpx;
36 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/me.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 |
3 | Page({
4 | data: {
5 | avatarUrl: '',
6 | openID: '',
7 | nickName: '点击登入',
8 | bosshead: false,
9 | admin: false
10 | },
11 |
12 | login() {
13 | if (this.data.avatarUrl.length < 1) {
14 | wx.navigateTo({
15 | url: '../login/login',
16 | })
17 | }
18 | },
19 | onShow() {
20 | wx.cloud.callFunction({
21 | name: 'login',
22 | data: {},
23 | success: res => {
24 | //获取openid
25 | console.log('user openid: ', res.result.openid)
26 | app.globalData.openid = res.result.openid
27 | this.setData({
28 | openID: res.result.openid
29 | })
30 | // 通过openid查找
31 | // console.log(res.result)
32 | // console.log(this.data.openID)
33 | wx.cloud.database().collection('user').where({
34 | _openid: this.data.openID
35 | }).get().then(res => {
36 | console.log("信息数组长度", res.data.length)
37 | // for 遍历数组
38 | for (var i = 0; i < res.data.length; ++i) {
39 | // console.log(i);
40 | if (i >= 1) break;
41 | // console.log(res.data[i])
42 | this.setData({
43 | avatarUrl: res.data[i].avatarUrl,
44 | nickName: res.data[i].nickName,
45 | bosshead: res.data[i].bosshead,
46 | admin: res.data[i].admin
47 | })
48 | }
49 | })
50 | },
51 |
52 | fail: err => {
53 | console.error('调用失败', err)
54 | }
55 | })
56 | },
57 | updateInfo() {
58 | wx.cloud.callFunction({
59 | name: 'login',
60 | data: {},
61 | success: res => {
62 | //获取openid
63 | app.globalData.openid = res.result.openid
64 | this.setData({
65 | openID: res.result.openid
66 | })
67 | // 通过openid查找
68 | // console.log(res.result)
69 | // console.log(this.data.openID)
70 | wx.cloud.database().collection('user').where({
71 | _openid: this.data.openID
72 | }).get().then(res => {
73 | // for 遍历数组
74 | for (var i = 0; i < res.data.length; ++i) {
75 | // console.log(i);
76 | if (i >= 1) break;
77 | this.setData({
78 | nickName: res.data[i].nickName,
79 | bosshead: res.data[i].bosshead,
80 | admin: res.data[i].admin
81 | })
82 | }
83 | })
84 | }
85 | })
86 |
87 | },
88 |
89 | goCollege() {
90 | if (this.data.bosshead == false) {
91 | wx.showToast({
92 | title: '您不是社团人员',
93 | icon: 'error'
94 | })
95 | return
96 | } else {
97 | wx.navigateTo({
98 | url: '../college/college',
99 | })
100 | wx.setNavigationBarTitle({
101 | title: '活动管理',
102 | })
103 | }
104 | },
105 |
106 | goadmin() {
107 | if (this.data.admin == false) {
108 | wx.showToast({
109 | title: '您不是管理员',
110 | icon: 'error'
111 | })
112 | return
113 | } else {
114 | wx.navigateTo({
115 | url: '../admin/admin',
116 | })
117 | wx.setNavigationBarTitle({
118 | title: '管理员设置',
119 | })
120 | }
121 | },
122 | about() {
123 | wx.navigateTo({
124 | url: '../about/about',
125 | })
126 | wx.setNavigationBarTitle({
127 | title: '关于我们',
128 | })
129 | }
130 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/me.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/me.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{nickName}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 我的发布
17 |
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 | 我的评论
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 个人信息
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | 活动管理
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | 管理员设置
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | 关于我们
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/me.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/me.wxss */
2 |
3 | .row{
4 | background-color: #eceaea2c;
5 | margin-bottom: 10rpx;
6 | padding: 30rpx;
7 | border-bottom: 1px solid #b1b0b04f;
8 | height: 250rpx;
9 | }
10 |
11 | .user{
12 | text-align: center;
13 | }
14 |
15 | .username{
16 | margin: 15rpx auto;
17 | }
18 | .user image{
19 | width: 180rpx;
20 | height: 180rpx;
21 | /* border-radius: 90rpx; */
22 | border: 1px solid #f6f6f6;
23 | }
24 | .base-info image{
25 | height: 40rpx;
26 | width: 40rpx;
27 | margin-left: 40rpx;
28 | position: relative;
29 | margin-right: 30rpx;
30 | top: 4rpx;
31 | }
32 | .tags{
33 | display: flex;
34 | flex-flow: row;
35 | }
36 |
37 | .imageIcon{
38 | width: 18%;
39 | }
40 | .text{
41 | width: 60%;
42 | }
43 | .col-12{
44 | height: 56rpx;
45 | line-height: 56rpx;
46 | border-bottom: 1px solid #b1b0b04f;
47 | padding-bottom: 30rpx;
48 | padding-top: 30rpx;
49 | color: #000000;
50 | background: #ffffff9a;
51 | }
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycollect/mycollect.js:
--------------------------------------------------------------------------------
1 | // pages/me/mycollect/mycollect.js
2 | var app = getApp()
3 | Page({
4 | data: {
5 | slideButtons: [{
6 | src: '/pages/icon/delete.svg', // icon的路径
7 | }],
8 | openID: '',
9 | collects: '',
10 | delete: false,
11 | delid: ''
12 | },
13 |
14 | onLoad() {
15 | wx.cloud.callFunction({
16 | name: 'login',
17 | data: {},
18 | success: res => {
19 | //获取openid
20 | console.log('user openid: ', res.result.openid)
21 | app.globalData.openid = res.result.openid
22 | this.setData({
23 | openID: res.result.openid
24 | })
25 | // console.log("openid", this.data.openID)
26 |
27 | wx.cloud.database().collection('collect').where({
28 | _openid: this.data.openID
29 | }).orderBy('articleid', 'desc').get().then(res => {
30 | this.setData({
31 | collects: res.data
32 | })
33 | // console.log(res)
34 | })
35 | },
36 | fail: err => {
37 | console.error('调用失败', err)
38 | }
39 | })
40 |
41 | },
42 |
43 | goDetail(event){
44 | console.log("获取的id",event.currentTarget.id)
45 | wx.navigateTo({
46 | url: '/pages/detail/detail?id='+event.currentTarget.id,
47 | })
48 | wx.setNavigationBarTitle({
49 | title: '内容详情',
50 | })
51 | },
52 | hide(e) {
53 | // console.log(e)
54 | this.setData({
55 | delete: false
56 | })
57 | console.log("删除:", this.data.delete)
58 | },
59 | show(e) {
60 | // console.log(e)
61 | this.setData({
62 | delete: true
63 | })
64 | console.log("删除:", this.data.delete)
65 | },
66 |
67 | slideButtonTap(e) {
68 | // console.log(this.data.delete)
69 | console.log('slide button tap', e.target.id) // 文章的 _id
70 | this.setData({
71 | delid: e.currentTarget.id
72 | })
73 | if (this.data.delete == true) {
74 | console.log("id?=", this.data.delid)
75 |
76 | // 删除字段
77 | wx.cloud.database().collection('collect').doc(
78 | this.data.delid
79 | ).remove({
80 | success: res => {
81 | wx.showToast({
82 | title: '删除成功',
83 | })
84 |
85 | // 刷新页面
86 | wx.cloud.database().collection('collect').where({
87 | _openid: this.data.openID
88 | }).orderBy('articleid', 'desc').get().then(res => {
89 | this.setData({
90 | collects: res.data
91 | })
92 | console.log(res)
93 | })
94 |
95 | },
96 | fail: err => {
97 | wx.showToast({
98 | icon: 'error',
99 | title: '删除失败',
100 | })
101 | console.error('[数据库] [删除记录] 失败:', err)
102 | }
103 | })
104 | } else {
105 | wx.showToast({
106 | icon: 'error',
107 | title: '删除失败',
108 | })
109 | return
110 | }
111 | }
112 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycollect/mycollect.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-cells": "weui-miniprogram/cells/cells",
4 | "mp-cell": "weui-miniprogram/cell/cell",
5 | "mp-slideview": "weui-miniprogram/slideview/slideview"
6 | },
7 | "navigationBarTitleText":"我的收藏"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycollect/mycollect.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 | {{item.title}}
12 |
13 |
14 |
15 |
16 |
17 | 来源:{{item.author}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycollect/mycollect.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/mycollect/mycollect.wxss */
2 | page{
3 | background-color: #ebe9e985;
4 | }
5 | .item{
6 | margin: 10rpx 2rpx;
7 | }
8 | .slidecells{
9 | padding: 4px 10px;
10 | border: 2px solid #ebebeb96;
11 | background-color: #ffffff;
12 | border-radius: 15px;
13 | margin: 4px;
14 | }
15 | .title{
16 | font-weight: 545;
17 | height: 40rpx;
18 | margin: 5rpx 0;
19 | font-size: 36rpx;
20 | }
21 | .contentBar{
22 | background-color: #e7e7e72c;
23 | margin: 14px 8px 8px 8px;
24 | padding: 4px;
25 | font-weight: 500;
26 | border-radius: 10px;
27 | }
28 | .type{
29 | color: #797979;
30 | height: 40rpx;
31 | margin-top: 20rpx;
32 | font-size: 14px;
33 | line-height: 40rpx;
34 | margin-left: 10px;
35 | }
36 | .weui-media-box__desc{
37 | color: #3d3d3d;
38 | margin-top: 10rpx;
39 | margin-bottom: 10rpx;
40 | margin-left: 10px;
41 | padding-top: 2px;
42 | font-size: 18px;
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycomment/mycomment.js:
--------------------------------------------------------------------------------
1 |
2 | var app = getApp()
3 |
4 | Page({
5 | data: {
6 | slideButtons: [{
7 | src: '/pages/icon/delete.svg', // icon的路径
8 | }],
9 | openID: '',
10 | mycomment: ''
11 | },
12 |
13 | onLoad() {
14 | wx.cloud.callFunction({
15 | name: 'login',
16 | data: {},
17 | success: res => {
18 | //获取openid
19 | console.log('user openid: ', res.result.openid)
20 | app.globalData.openid = res.result.openid
21 | this.setData({
22 | openID: res.result.openid
23 | })
24 | console.log("openid", this.data.openID)
25 |
26 |
27 | wx.cloud.database().collection('comment').where({
28 | _openid: this.data.openID
29 | }).orderBy('commentid', 'desc').get().then(res => {
30 | console.log(res)
31 | this.setData({
32 | mycomment: res.data
33 | })
34 | })
35 | },
36 | fail: err => {
37 | console.error('调用失败', err)
38 | }
39 | })
40 | },
41 |
42 |
43 | goDetail(event) {
44 | console.log(event)
45 | wx.navigateTo({
46 | url: '/pages/detail/detail?id=' + event.currentTarget.id,
47 | })
48 | wx.setNavigationBarTitle({
49 | title: '内容详情',
50 | })
51 | },
52 |
53 | hide(e) {
54 | // console.log(e)
55 | this.setData({
56 | delete: false
57 | })
58 | console.log("删除:", this.data.delete)
59 | },
60 | show(e) {
61 | // console.log(e)
62 | this.setData({
63 | delete: true
64 | })
65 | console.log("删除:", this.data.delete)
66 | },
67 |
68 | slideButtonTap(e) {
69 | // console.log(this.data.delete)
70 | console.log('slide button tap', e.target.id) // 文章的 _id
71 | this.setData({
72 | delid: e.currentTarget.id
73 | })
74 | if (this.data.delete == true) {
75 | console.log("id?=", this.data.delid)
76 |
77 | // 删除字段
78 | wx.cloud.database().collection('comment').doc(
79 | this.data.delid
80 | ).remove({
81 | success: res => {
82 | wx.showToast({
83 | title: '删除成功',
84 | })
85 |
86 | // 刷新页面
87 |
88 | wx.cloud.database().collection('comment').where({
89 | _openid: this.data.openID
90 | }).orderBy('commentid', 'desc').get().then(res => {
91 | console.log(res)
92 | this.setData({
93 | mycomment: res.data
94 | })
95 | })
96 |
97 | },
98 | fail: err => {
99 | wx.showToast({
100 | icon: 'error',
101 | title: '删除失败',
102 | })
103 | console.error('[数据库] [删除记录] 失败:', err)
104 | }
105 | })
106 | } else {
107 | wx.showToast({
108 | icon: 'error',
109 | title: '删除失败',
110 | })
111 | return
112 | }
113 | }
114 |
115 |
116 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycomment/mycomment.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-cells": "weui-miniprogram/cells/cells",
4 | "mp-cell": "weui-miniprogram/cell/cell",
5 | "mp-slideview": "weui-miniprogram/slideview/slideview"
6 | },
7 | "navigationBarTitleText":"我的评论"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycomment/mycomment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 | {{item.content}}
12 |
13 |
14 |
15 |
16 | 文章:{{item.articletitle}}
17 |
18 |
19 | 分类:{{item.articletype}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/mycomment/mycomment.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/mycomment/mycomment.wxss */
2 | page{
3 | background-color: #d3d3d385;
4 | }
5 | .item{
6 | background-color: #ffffff;
7 | margin: 5px 10px 5px 10px;
8 | padding: 4px;
9 | border-radius: 15px;
10 | }
11 | .content{
12 | font-size: 20px;
13 | padding: 6px;
14 | }
15 | .acrticleInfo{
16 | border-radius: 10px;
17 | background-color: #e7e7e757;
18 | margin: 4px 20px;
19 | font-size: 14px;
20 | color: #686868e3;
21 | padding: 6px;
22 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/myissuance/myissuance.js:
--------------------------------------------------------------------------------
1 | // pages/me/myissuance/myissuance.js
2 | var app = getApp()
3 | Page({
4 | data: {
5 | slideButtons: [{
6 | src: '/pages/icon/delete.svg', // icon的路径
7 | }],
8 | openID: '',
9 | issuance: '',
10 | delete: false,
11 | delid:''
12 | },
13 |
14 | onLoad() {
15 | wx.cloud.callFunction({
16 | name: 'login',
17 | data: {},
18 | success: res => {
19 | //获取openid
20 | console.log('user openid: ', res.result.openid)
21 | app.globalData.openid = res.result.openid
22 | this.setData({
23 | openID: res.result.openid
24 | })
25 | // console.log("openid", this.data.openID)
26 |
27 | wx.cloud.database().collection('articles').where({
28 | _openid: this.data.openID
29 | }).orderBy('articleid', 'desc').get().then(res => {
30 | this.setData({
31 | issuance: res.data
32 | })
33 | // console.log(res)
34 | })
35 | },
36 | fail: err => {
37 | console.error('调用失败', err)
38 | }
39 | })
40 |
41 | },
42 |
43 | goDetail(event){
44 | console.log(event)
45 | wx.navigateTo({
46 | url: '/pages/detail/detail?id='+event.currentTarget.id,
47 | })
48 | wx.setNavigationBarTitle({
49 | title: '内容详情',
50 | })
51 | },
52 |
53 |
54 | hide(e) {
55 | // console.log(e)
56 | this.setData({
57 | delete: false
58 | })
59 | console.log("删除:",this.data.delete)
60 | },
61 | show(e) {
62 | // console.log(e)
63 | this.setData({
64 | delete: true
65 | })
66 | console.log("删除:", this.data.delete)
67 | },
68 |
69 | slideButtonTap(e) {
70 | // console.log(this.data.delete)
71 | console.log('slide button tap', e.target.id) // 文章的 _id
72 | this.setData({
73 | delid:e.currentTarget.id
74 | })
75 | if (this.data.delete == true) {
76 | console.log("id?=", this.data.delid)
77 |
78 | // 删除字段
79 | wx.cloud.database().collection('articles').doc(
80 | this.data.delid
81 | ).remove({
82 | success: res => {
83 | wx.showToast({
84 | title: '删除成功',
85 | })
86 |
87 | // 刷新页面
88 | wx.cloud.database().collection('articles').where({
89 | _openid: this.data.openID
90 | }).orderBy('articleid', 'desc').get().then(res => {
91 | this.setData({
92 | issuance: res.data
93 | })
94 | console.log(res)
95 | })
96 |
97 | },
98 | fail: err => {
99 | wx.showToast({
100 | icon: 'error',
101 | title: '删除失败',
102 | })
103 | console.error('[数据库] [删除记录] 失败:', err)
104 | }
105 | })
106 | }else{
107 | wx.showToast({
108 | icon: 'error',
109 | title: '删除失败',
110 | })
111 | return
112 | }
113 | }
114 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/myissuance/myissuance.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "mp-cells": "weui-miniprogram/cells/cells",
4 | "mp-cell": "weui-miniprogram/cell/cell",
5 | "mp-slideview": "weui-miniprogram/slideview/slideview"
6 | },
7 | "navigationBarTitleText":"我的发布"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/myissuance/myissuance.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 | {{item.title}}
15 |
16 |
17 |
18 |
19 |
20 | 分类:{{item.type}}
21 |
22 |
23 | {{item.content}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/myissuance/myissuance.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/myissuance/myissuance.wxss */
2 | page{
3 | background-color: #ebe9e985;
4 | }
5 | .item{
6 | margin: 10rpx 2rpx;
7 | }
8 | .slidecells{
9 | padding: 4px 10px;
10 | border: 2px solid #ebebeb96;
11 | background-color: #ffffff;
12 | border-radius: 15px;
13 | margin: 4px;
14 | }
15 | .title{
16 | font-weight: 545;
17 | height: 40rpx;
18 | margin: 5rpx 0;
19 | font-size: 36rpx;
20 | }
21 | .contentBar{
22 | background-color: #e7e7e72c;
23 | margin: 14px 8px 8px 8px;
24 | padding: 4px;
25 | font-weight: 500;
26 | border-radius: 10px;
27 | }
28 | .type{
29 | color: #797979;
30 | height: 40rpx;
31 | margin-top: 20rpx;
32 | font-size: 14px;
33 | line-height: 40rpx;
34 | margin-left: 10px;
35 | }
36 | .weui-media-box__desc{
37 | color: #3d3d3d;
38 | margin-top: 10rpx;
39 | margin-bottom: 10rpx;
40 | margin-left: 10px;
41 | padding-top: 2px;
42 | font-size: 18px;
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/setting.js:
--------------------------------------------------------------------------------
1 | // pages/me/setting/setting.js
2 |
3 | var app = getApp()
4 | let bosshead = false
5 | Page({
6 |
7 | data: {
8 | nickName:'',
9 | avatarUrl:'',
10 | sex:'',
11 | age:'',
12 | province:'',
13 | city:'',
14 | qqnumber:'',
15 | mailnumber:'',
16 | },
17 |
18 | onShow() {
19 | wx.cloud.callFunction({
20 | name: 'login',
21 | data: {},
22 | success: res => {
23 | //获取openid
24 | console.log('user openid: ', res.result.openid)
25 | app.globalData.openid = res.result.openid
26 | this.setData({
27 | openID: res.result.openid
28 | })
29 | // 通过openid查找
30 | // console.log(res.result)
31 | // console.log(this.data.openID)
32 | wx.cloud.database().collection('user').where({
33 | _openid: this.data.openID
34 | }).get().then(res => {
35 | console.log("昵称", res.data.length)
36 | // for 遍历数组
37 | for (var i = 0; i < res.data.length; ++i) {
38 | // console.log(i);
39 | if (i >= 1) break;
40 | console.log(res.data[i])
41 | this.setData({
42 | nickName:res.data[i].nickName,
43 | avatarUrl:res.data[i].avatarUrl,
44 | sex:res.data[i].sex,
45 | age:res.data[i].age,
46 | province:res.data[i].province,
47 | city:res.data[i].city,
48 | qqnumber:res.data[i].qqnumber,
49 | mailnumber:res.data[i].mailnumber,
50 | bosshead:res.data[i].bosshead,
51 | admin:res.data[i].admin
52 | })
53 | }
54 | })
55 | },
56 |
57 | fail: err => {
58 | console.error('调用失败', err)
59 | }
60 | })
61 |
62 |
63 | },
64 | settingInfo(){
65 | wx.navigateTo({
66 | url: './settingInfo/settingInfo',
67 | })
68 | wx.setNavigationBarTitle({
69 | title: '设置信息',
70 | })
71 | },
72 |
73 |
74 | //下拉刷新
75 | onPullDownRefresh: function () {
76 | wx.stopPullDownRefresh({
77 | success: (res) => {
78 | wx.cloud.callFunction({
79 | name: 'login',
80 | data: {},
81 | success: res => {
82 | //获取openid
83 | console.log('user openid: ', res.result.openid)
84 | app.globalData.openid = res.result.openid
85 | this.setData({
86 | openID: res.result.openid
87 | })
88 | // 通过openid查找
89 | // console.log(res.result)
90 | // console.log(this.data.openID)
91 | wx.cloud.database().collection('user').where({
92 | _openid: this.data.openID
93 | }).get().then(res => {
94 | console.log("昵称", res.data.length)
95 | // for 遍历数组
96 | for (var i = 0; i < res.data.length; ++i) {
97 | // console.log(i);
98 | if (i >= 1) break;
99 | console.log(res.data[i])
100 | this.setData({
101 | nickName:res.data[i].nickName,
102 | avatarUrl:res.data[i].avatarUrl,
103 | sex:res.data[i].sex,
104 | age:res.data[i].age,
105 | province:res.data[i].province,
106 | city:res.data[i].city,
107 | qqnumber:res.data[i].qqnumber,
108 | mailnumber:res.data[i].mailnumber,
109 | bosshead:res.data[i].bosshead,
110 | admin:res.data[i].admin
111 | })
112 | }
113 | })
114 | },
115 |
116 | fail: err => {
117 | console.error('调用失败', err)
118 | }
119 | })
120 | },
121 | })
122 | },
123 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/setting.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": true ,
3 | "usingComponents": {},
4 | "navigationBarTitleText":"个人信息"
5 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/setting.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 昵称
30 |
31 |
32 | {{nickName}}
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 性别
41 |
42 |
43 | {{sex}}
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 年龄
52 |
53 |
54 | {{age}}
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 城市
63 |
64 |
65 | {{province}}{{city}}
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | QQ
76 |
77 |
78 | {{qqnumber}}
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 邮箱
87 |
88 |
89 | {{mailnumber}}
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/setting.wxss:
--------------------------------------------------------------------------------
1 |
2 | .top{
3 | height: 5px;
4 | background-color: #ebebebce;
5 | }
6 | .infoPage{
7 | margin: 20rpx 20rpx;
8 | font-size: 40rpx;
9 | border-radius: 10px;
10 | }
11 | .info_images{
12 | display: flex;
13 | flex-flow: row;
14 | }
15 | .image{
16 | width: 140rpx;
17 | height: 140rpx;
18 | margin-right: 20rpx;
19 | }
20 | .info_admin_college{
21 | height: 140rpx;
22 | }
23 | .info_admin_college_view{
24 | width: 140rpx;
25 | height: 70rpx;
26 | }
27 | .info_admin_college_view_Images{
28 | padding: 5px;
29 | width: 120rpx;
30 | height: 60rpx;
31 | }
32 | .info_admin_view_Images{
33 | padding: 5px;
34 | width: 120rpx;
35 | height: 50rpx;
36 | }
37 | .line{
38 | height: 1px;
39 | background: #ddddddcc;
40 | }
41 | .meinfo{
42 | display: flex;
43 | flex-flow: row;
44 | height: 60rpx;
45 | margin: 20rpx 0;
46 | width: 100%;
47 | }
48 | .meInfo{
49 | display: flex;
50 | flex-flow: row;
51 | height: 120rpx;
52 | margin: 20rpx 0;
53 | width: 100%;
54 | }
55 | .item{
56 | width: 400rpx;
57 | }
58 |
59 | .text{
60 | width: 100px;
61 | /* background-color: gray; */
62 | }
63 | .button{
64 | margin-top: 60rpx;
65 | margin-bottom: 60rpx;
66 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/settingInfo/settingInfo.js:
--------------------------------------------------------------------------------
1 | // pages/me/setting/setting.js
2 | var app = getApp()
3 | let bosshead = false
4 | Page({
5 |
6 | data: {
7 | openid: '',
8 | nickName: '',
9 | sex: '',
10 | age: '',
11 | province: '',
12 | city: '',
13 | qqnumber: '',
14 | mailnumber: '',
15 | },
16 |
17 | // 设置初始值
18 | onLoad() {
19 | wx.cloud.callFunction({
20 | name: 'login',
21 | data: {},
22 | success: res => {
23 | //获取openid
24 | console.log('user openid: ', res.result.openid)
25 | app.globalData.openid = res.result.openid
26 | this.setData({
27 | openID: res.result.openid
28 | })
29 | wx.cloud.database().collection('user').where({
30 | _openid: this.data.openID
31 | }).get().then(res => {
32 | console.log("昵称", res.data.length)
33 | // for 遍历数组
34 | for (var i = 0; i < res.data.length; ++i) {
35 | // console.log(i);
36 | if (i >= 1) break;
37 | console.log(res.data[i])
38 | this.setData({
39 | openid: res.data[i]._openid,
40 | nickName: res.data[i].nickName,
41 | sex: res.data[i].sex,
42 | age: res.data[i].age,
43 | province: res.data[i].province,
44 | city: res.data[i].city,
45 | qqnumber: res.data[i].qqnumber,
46 | mailnumber: res.data[i].mailnumber
47 | })
48 | console.log(this.data.openid)
49 | }
50 | })
51 | },
52 |
53 | fail: err => {
54 | console.error('调用失败', err)
55 | }
56 | })
57 | },
58 |
59 | // 获取值
60 | getname(event) {
61 | console.log("昵称", event.detail.value)
62 | this.setData({ nickName: event.detail.value })
63 | },
64 | getsex(event) {
65 | console.log("性别", event.detail.value)
66 | this.setData({ sex: event.detail.value })
67 | },
68 | getage(event) {
69 | console.log("年龄", event.detail.value)
70 | this.setData({ age: event.detail.value })
71 | },
72 | getprovince(event) {
73 | console.log("省份", event.detail.value)
74 | this.setData({ province: event.detail.value })
75 | },
76 | getcity(event) {
77 | console.log("城市", event.detail.value)
78 | this.setData({ city: event.detail.value })
79 | },
80 | getqq(event) {
81 | console.log("QQ", event.detail.value)
82 | this.setData({ qqnumber: event.detail.value })
83 | },
84 | getmail(event) {
85 | console.log("邮箱", event.detail.value)
86 | this.setData({ mailnumber: event.detail.value })
87 | },
88 |
89 |
90 | settingInfo() {
91 | if (this.data.nickName.length < 1) {
92 | wx.showToast({
93 | title: '昵称不能为空',
94 | icon: 'error'
95 | })
96 | } else {
97 | wx.cloud.database().collection('user').where({
98 | _openid: this.data.openid
99 | }).update({
100 | data: {
101 | nickName: this.data.nickName,
102 | sex: this.data.sex,
103 | age: this.data.age,
104 | province: this.data.province,
105 | city: this.data.city,
106 | qqnumber: this.data.qqnumber,
107 | mailnumber: this.data.mailnumber
108 | }
109 | })
110 | wx.showToast({
111 | title: '修改成功!',
112 | icon: 'success'
113 | })
114 | wx.navigateBack({
115 | delta: 1
116 | })
117 | }
118 | }
119 | })
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/settingInfo/settingInfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/settingInfo/settingInfo.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 昵称
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
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 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | QQ
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | 邮箱
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/miniprogram/pages/me/setting/settingInfo/settingInfo.wxss:
--------------------------------------------------------------------------------
1 | /* pages/me/setting/settingInfo/settingInfo.wxss */
2 | /* pages/me/setting/setting.wxss */
3 | .top{
4 | height: 5px;
5 | background-color: #ebebebce;
6 | }
7 | .infoPage{
8 | margin: 20rpx 20rpx;
9 | font-size: 40rpx;
10 | }
11 | .line{
12 | height: 1px;
13 | background: #ddddddcc;
14 | }
15 | .meinfo{
16 | display: flex;
17 | flex-flow: row;
18 | height: 70rpx;
19 | margin: 20rpx 0;
20 | width: 100%;
21 | }
22 | .item{
23 | height: 70rpx;
24 | width: 150rpx;
25 | line-height: 70rpx;
26 | }
27 | .itemLogion{
28 | height: 70rpx;
29 | width: 500rpx;
30 | line-height: 70rpx;
31 | max-height: 140rpx;
32 | }
33 | .text{
34 | width: 100px;
35 | /* background-color: gray; */
36 | }
37 | .button{
38 | margin-top: 60rpx;
39 | margin-bottom: 60rpx;
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "miniprogram/",
3 | "cloudfunctionRoot": "cloud/",
4 | "setting": {
5 | "urlCheck": false,
6 | "es6": true,
7 | "enhance": true,
8 | "postcss": true,
9 | "preloadBackgroundData": false,
10 | "minified": true,
11 | "newFeature": true,
12 | "coverView": true,
13 | "nodeModules": true,
14 | "autoAudits": false,
15 | "showShadowRootInWxmlPanel": true,
16 | "scopeDataCheck": false,
17 | "uglifyFileName": false,
18 | "checkInvalidKey": true,
19 | "checkSiteMap": false,
20 | "uploadWithSourceMap": true,
21 | "compileHotReLoad": false,
22 | "useMultiFrameRuntime": true,
23 | "useApiHook": true,
24 | "useApiHostProcess": true,
25 | "babelSetting": {
26 | "ignore": [],
27 | "disablePlugins": [],
28 | "outputPath": ""
29 | },
30 | "enableEngineNative": false,
31 | "bundle": false,
32 | "useIsolateContext": true,
33 | "useCompilerModule": true,
34 | "userConfirmedUseCompilerModuleSwitch": false,
35 | "userConfirmedBundleSwitch": false,
36 | "packNpmManually": false,
37 | "packNpmRelationList": [],
38 | "minifyWXSS": true
39 | },
40 | "appid": "wx6d29fc7ea4313be3",
41 | "projectname": "%E6%A0%A1%E5%9B%AD%E6%9C%8D%E5%8A%A1%E5%B9%B3%E5%8F%B0",
42 | "libVersion": "2.16.1",
43 | "condition": {
44 | "search": {
45 | "list": []
46 | },
47 | "conversation": {
48 | "list": []
49 | },
50 | "plugin": {
51 | "list": []
52 | },
53 | "game": {
54 | "list": []
55 | },
56 | "miniprogram": {
57 | "list": [
58 | {
59 | "id": -1,
60 | "name": "db guide",
61 | "pathName": "pages/databaseGuide/databaseGuide"
62 | }
63 | ]
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/project.private.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "setting": {},
3 | "condition": {
4 | "plugin": {
5 | "list": []
6 | },
7 | "game": {
8 | "list": []
9 | },
10 | "gamePlugin": {
11 | "list": []
12 | },
13 | "miniprogram": {
14 | "list": [
15 | {
16 | "name": "pages/index/index",
17 | "pathName": "pages/index/index",
18 | "query": "",
19 | "scene": null
20 | },
21 | {
22 | "name": "pages/me/me",
23 | "pathName": "pages/me/me",
24 | "query": "",
25 | "scene": null
26 | },
27 | {
28 | "name": "pages/question/question",
29 | "pathName": "pages/question/question",
30 | "query": "",
31 | "scene": null
32 | },
33 | {
34 | "name": "pages/college/college",
35 | "pathName": "pages/college/college",
36 | "query": "",
37 | "scene": null
38 | },
39 | {
40 | "name": "pages/college/addcollege/addcollege",
41 | "pathName": "pages/college/addcollege/addcollege",
42 | "query": "",
43 | "scene": null
44 | },
45 | {
46 | "name": "pages/me/setting/setting",
47 | "pathName": "pages/me/setting/setting",
48 | "query": "",
49 | "scene": null
50 | },
51 | {
52 | "name": "pages/me/setting/settingInfo/settingInfo",
53 | "pathName": "pages/me/setting/settingInfo/settingInfo",
54 | "query": "",
55 | "scene": null
56 | },
57 | {
58 | "name": "pages/me/myissuance/myissuance",
59 | "pathName": "pages/me/myissuance/myissuance",
60 | "query": "",
61 | "scene": null
62 | },
63 | {
64 | "name": "pages/detail/detail",
65 | "pathName": "pages/detail/detail",
66 | "query": "",
67 | "scene": null
68 | },
69 | {
70 | "name": "pages/question/question",
71 | "pathName": "pages/question/question",
72 | "query": "",
73 | "scene": null
74 | },
75 | {
76 | "name": "pages/me/mycomment/mycomment",
77 | "pathName": "pages/me/mycomment/mycomment",
78 | "query": "",
79 | "scene": null
80 | },
81 | {
82 | "name": "pages/index/sights/sights",
83 | "pathName": "pages/index/sights/sights",
84 | "query": "",
85 | "scene": null
86 | },
87 | {
88 | "name": "pages/index/sights/sightsdetail/sightsdetail",
89 | "pathName": "pages/index/sights/sightsdetail/sightsdetail",
90 | "query": "",
91 | "scene": null
92 | },
93 | {
94 | "name": "pages/me/myissuance/myissuance",
95 | "pathName": "pages/me/myissuance/myissuance",
96 | "query": "",
97 | "scene": null
98 | },
99 | {
100 | "name": "pages/admin/admin",
101 | "pathName": "pages/admin/admin",
102 | "query": "",
103 | "scene": null
104 | },
105 | {
106 | "name": "pages/index/index",
107 | "pathName": "pages/index/index",
108 | "query": "",
109 | "scene": null
110 | },
111 | {
112 | "name": "pages/activity/activity",
113 | "pathName": "pages/activity/activity",
114 | "query": "",
115 | "scene": null
116 | },
117 | {
118 | "name": "pages/detail/detail",
119 | "pathName": "pages/detail/detail",
120 | "query": "",
121 | "scene": null
122 | },
123 | {
124 | "name": "pages/question/question",
125 | "pathName": "pages/question/question",
126 | "query": "",
127 | "scene": null
128 | },
129 | {
130 | "name": "pages/admin/admin",
131 | "pathName": "pages/admin/admin",
132 | "query": "",
133 | "scene": null
134 | },
135 | {
136 | "name": "pages/login/login",
137 | "pathName": "pages/login/login",
138 | "query": "",
139 | "scene": null
140 | },
141 | {
142 | "name": "pages/issuance/issuance",
143 | "pathName": "pages/issuance/issuance",
144 | "query": "",
145 | "scene": null
146 | },
147 | {
148 | "name": "pages/admin/admin",
149 | "pathName": "pages/admin/admin",
150 | "query": "",
151 | "scene": null
152 | },
153 | {
154 | "name": "pages/test/test",
155 | "pathName": "pages/test/test",
156 | "query": "",
157 | "scene": null
158 | },
159 | {
160 | "name": "pages/index/index",
161 | "pathName": "pages/index/index",
162 | "query": "",
163 | "scene": null
164 | },
165 | {
166 | "name": "pages/index/share/sharedetail/sharedetail",
167 | "pathName": "pages/index/share/sharedetail/sharedetail",
168 | "query": "id=cbddf0af6084fca603900d7e0e9336bb",
169 | "scene": null
170 | },
171 | {
172 | "name": "pages/me/mycollect/mycollect",
173 | "pathName": "pages/me/mycollect/mycollect",
174 | "query": "",
175 | "scene": null
176 | },
177 | {
178 | "name": "pages/me/myissuance/myissuance",
179 | "pathName": "pages/me/myissuance/myissuance",
180 | "query": "",
181 | "scene": null
182 | },
183 | {
184 | "name": "pages/articleList/articleList",
185 | "pathName": "pages/articleList/articleList",
186 | "query": "type=0",
187 | "scene": null
188 | },
189 | {
190 | "name": "pages/login/login",
191 | "pathName": "pages/login/login",
192 | "query": "",
193 | "scene": null
194 | }
195 | ]
196 | }
197 | }
198 | }
--------------------------------------------------------------------------------
/数据库/activity.json:
--------------------------------------------------------------------------------
1 | {"_id":"b00064a7604ccdb609d4a4b03c6df165","contents":"学联组织的书法大赛,欢迎报名各位参加","organizer":"学联","place":"在线提交","activityid":1.61564601E+12,"end_time":"2021/3/20","link":"1668567834","number":"不限","star_time":"2021/3/13","title":"书法大赛","_openid":"o7atc4I-oB_ci5mOmuDniKWTUTPg","contact":"QQ","nickName":"青轩","office":"学联组织部长","id":"b00064a7604ccdb609d4a4b03c6df165","parter":[{"link_qq":"1515556644","parter_id":"o7atc5I-oB_ci5mOmuDniKWTUTPg","parter_name":"李四","school_class":"软件工程"}]}
2 | {"_id":"79550af2604f68340a32ab51421d1afe","activityid":1.615816633E+12,"contents":"选定特定诗词,进行朗诵大赛","end_time":"2021/03/20","place":"图书馆负一楼","title":"朗诵大赛","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","number":"不限","organizer":"学生会","star_time":"2021/03/15","link":"11234567890","contact":"手机","nickName":"青轩","id":"79550af2604f68340a32ab51421d1afe","parter":[],"office":"学生会组织部长"}
3 | {"_id":"b00064a76055dd590af56e124a5d711f","end_time":"2021-03-21","place":"东苑食堂门口","contact":"手机","contents":"义务献血,大家可以来","link":"15889977153","number":"不限","organizer":"学生会","star_time":"2021-03-21","_openid":"o8atc5I-oB_ci5mOmuDniKWTUTPg","activityid":1.616239851E+12,"title":"义务献血","id":"b00064a76055dd590af56e124a5d711f","parter":[{"link_qq":"15665617911","parter_id":"o7atc5AHWHREWMHOmh1xsbCuPxcY","parter_name":"王二麻子","school_class":"软件工程一班"},{"link_qq":"15151515","parter_id":"o7atc5I-oB_ci5mOmuDniKWTUTPg","parter_name":"张三","school_class":"软工一班"}],"nickName":"青啊","office":"学生会主席"}
4 |
--------------------------------------------------------------------------------
/数据库/articles.json:
--------------------------------------------------------------------------------
1 | {"_id":"79550af2608bce0b1272b1324d0b8c67","articleid":1.619774985E+12,"avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","content":"海边风景真漂亮!!","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-3/31/16197749850000.png"],"_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","anonymous":false,"title":"风景好好啊","topicid":0.0,"type":"逸闻趣事","anonymity":"0","nickName":"青轩"}
2 | {"_id":"17453ede608bcec10590f6c2642b490d","anonymity":"0","articleid":1.619775167E+12,"content":"内容看图","nickName":"青轩","title":"这个onshow跟onload有什么区别啊?","type":"疑问互答","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-3/31/16197751670000.png"],"topicid":1.0,"anonymous":false}
3 | {"_id":"cbddf0af60968a62072cb82d6a337277","anonymity":"0","articleid":1.620478561E+12,"content":"java怎么导入第三方包?","nickName":"Mi Manchi","title":"java如何导入包啊?","topicid":1.0,"type":"疑问互答","_openid":"o7atc5AHWHREWMHOmh1xsbCuPxcY","anonymous":false,"avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/53Z7ZntS8oibMbicLuDDkfQA5LKxaBdQmbLYiba7l13xHwFeKzCibBhT2p6Ppu9nZPfMRIKet7SwNGzPTAcGrHEqDw/132","images":[]}
4 | {"_id":"28ee4e3e60968afb16f980397b55c1f7","articleid":1.620478713E+12,"content":"为什么下面还要一个getchar( )\n","type":"疑问互答","_openid":"o7atc5AHWHREWMHOmh1xsbCuPxcY","anonymity":"0","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/9/16204787130000.png"],"nickName":"Mi Manchi","title":"为什么下面还要一个 getchar ( )","topicid":1.0,"anonymous":false,"avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/53Z7ZntS8oibMbicLuDDkfQA5LKxaBdQmbLYiba7l13xHwFeKzCibBhT2p6Ppu9nZPfMRIKet7SwNGzPTAcGrHEqDw/132"}
5 | {"_id":"79550af260968b72154094d90d9df927","anonymous":true,"avatarUrl":"cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/login.png","images":[],"nickName":"匿名","title":"c/c++ 如何查看函数是否重写","topicid":1.0,"_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.620478833E+12,"content":"这里有一行代码: fopen(levelFile, \"a+F\"))\n\n打开方式没有F形式,从哪里能看到是不是重写了\nfopen呢","type":"疑问互答","anonymity":"1"}
6 | {"_id":"28ee4e3e60b0cd9d1d8b182353c7cad9","anonymity":"0","articleid":1.622199707E+12,"avatarUrl":"https://img2.woyaogexing.com/2021/04/15/14fe8c409743412aac6a8915f9e5a920!400x400.jpeg","title":"东苑食堂","type":"校园一角","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT18","anonymous":false,"content":"食堂门","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/29/16221997070000.png"],"nickName":"尽染","topicid":2.0}
7 | {"_id":"28ee4e3e60b0cf061d8b9dda4ef9014a","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/29/16222000700000.png"],"title":"找对象,本人女","topicid":3.0,"content":"要求男","nickName":"青轩","type":"表白交友","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","anonymity":"0","anonymous":false,"articleid":1.62220007E+12}
8 | {"_id":"79550af260b0f2541b2a50791c6a6bdc","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","anonymous":false,"avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","content":"我在评论区找答案!!!","title":"端午有什么好去处吗?","anonymity":"0","articleid":1.622209107E+12,"images":[],"nickName":"青轩","topicid":0.0,"type":"逸闻趣事"}
9 | {"_id":"b00064a760b221801c24043d257eed7a","content":"食堂","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222867180000.png","cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222867180001.png"],"nickName":"。","title":"东苑食堂","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT17","anonymity":"0","anonymous":false,"avatarUrl":"https://img2.woyaogexing.com/2021/04/18/04c6cd5e8a1e4bf38fd27676f5b08c70!400x400.jpeg","topicid":2.0,"articleid":1.622286718E+12,"type":"校园一角"}
10 | {"_id":"b00064a760b221d81c24213e4abf1de2","anonymity":"0","anonymous":false,"title":"校园美食","topicid":0.0,"type":"逸闻趣事","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT16","articleid":1.622286806E+12,"avatarUrl":"https://img2.woyaogexing.com/2021/04/25/68c8bbf7de9640febd83f78145d5b5b5!400x400.jpeg","content":"可乐煎鸡饭","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222868060000.png"],"nickName":"#!"}
11 | {"_id":"b00064a760b230141c2922e640db64d8","title":"夜晚的校园","anonymity":"0","avatarUrl":"https://img2.woyaogexing.com/2021/04/27/898e03fd1958457cb998e7360250ef62!400x400.jpeg","nickName":"顾染","content":"操场","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222904510000.png","cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222904510001.png","cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222904510002.png"],"topicid":2.0,"type":"校园一角","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT15","anonymous":false,"articleid":1.622290451E+12}
12 | {"_id":"79550af260b230e81b7b3c4e1f0aa844","title":"问渠湖","anonymity":"0","anonymous":false,"content":"","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222906640000.png"],"nickName":"catkins","topicid":2.0,"type":"校园一角","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT14","articleid":1.622290664E+12,"avatarUrl":"https://img2.woyaogexing.com/2021/05/02/0fa9c0e5b3a147019468b8ebe9ce942e!400x400.jpeg"}
13 | {"_id":"cbddf0af60b231fd0cbde1dc4cc2a45d","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT12","anonymity":"0","anonymous":false,"articleid":1.62229094E+12,"avatarUrl":"https://img2.woyaogexing.com/2021/05/09/e0e75dd6e6704c3e9272c0c7ddca16a3!400x400.jpeg","content":"","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222909400000.png"],"title":"怪搞笑的","type":"逸闻趣事","nickName":"喝伏特加的猫","topicid":0.0}
14 | {"_id":"cbddf0af60b232760cbe0c4d74d29fdb","articleid":1.622291059E+12,"images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222910590000.png"],"nickName":"灰头土脸","topicid":0.0,"title":"天热多喝水吧","type":"逸闻趣事","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT10","anonymity":"0","anonymous":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/22/67f483cb174f42b1a6f57f73f73d3256!400x400.jpeg","content":""}
15 |
--------------------------------------------------------------------------------
/数据库/collect.json:
--------------------------------------------------------------------------------
1 | {"_id":"b00064a760a78ced194e7ad97ce22c12","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.620478713E+12,"author":"Mi Manchi","collect":true,"collectid":"28ee4e3e60968afb16f980397b55c1f7","title":"为什么下面还要一个getchar( )"}
2 | {"_id":"28ee4e3e60a79c281acdd9665faaaba5","title":"这个onshow跟onload有什么区别啊?","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.619775167E+12,"author":"青轩","collect":true,"collectid":"17453ede608bcec10590f6c2642b490d"}
3 | {"_id":"cbddf0af60abad9c0b3be8c454dd709d","collectid":"79550af2608bce0b1272b1324d0b8c67","title":"风景好好啊","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.619774985E+12,"author":"青轩","collect":true}
4 | {"_id":"79550af260b236001b7d006613ffdd24","title":"问渠湖","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.622290664E+12,"author":"catkins","collect":true,"collectid":"79550af260b230e81b7b3c4e1f0aa844"}
5 | {"_id":"b00064a760b2360f1c2b40e835c82405","collect":true,"collectid":"cbddf0af60b232760cbe0c4d74d29fdb","title":"天热多喝水吧","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.622291059E+12,"author":"灰头土脸"}
6 | {"_id":"b00064a760b2459c1c3132b12c908c3d","articleid":1.622290451E+12,"author":"顾染","collect":true,"collectid":"b00064a760b230141c2922e640db64d8","title":"夜晚的校园","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg"}
7 | {"_id":"79550af260b24a8d1b8460a947cc4bf3","collect":true,"collectid":"cbddf0af60b232760cbe0c4d74d29fdb","title":"天热多喝水吧","_openid":"o7atc5AHWHREWMHOmh1xsbCuPxcY","articleid":1.622291059E+12,"author":"灰头土脸"}
8 |
--------------------------------------------------------------------------------
/数据库/comment.json:
--------------------------------------------------------------------------------
1 | {"_id":"b00064a7608bce2412c184935dcb2667","content":"真漂亮!!","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.619774985E+12,"articletitle":"风景好好啊","articletype":"逸闻趣事","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","commenter":"青轩","commentid":1.619775011E+12,"revert":[{"rev_content":"的确好看!","rev_id":"b00064a7608bce2412c184935dcb2667","rev_name":"Mi Manchi","rev_obj":"青轩"},{"rev_content":"是吧是吧!!","rev_id":"b00064a7608bce2412c184935dcb2667","rev_name":"青轩","rev_obj":"Mi Manchi"}]}
2 | {"_id":"17453ede608bcf0005910e437ae82a9c","articletype":"疑问互答","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","commenter":"青轩","commentid":1.619775231E+12,"content":"onload加载一次,onshow每次点开都加载,","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.619775167E+12,"articletitle":"这个onshow跟onload有什么区别啊?","revert":[{"rev_content":"没错","rev_id":"17453ede608bcf0005910e437ae82a9c","rev_name":"Mi Manchi","rev_obj":"青轩"}]}
3 | {"_id":"17453ede6094f6a708016e4b273cc20b","_openid":"o7atc5AHWHREWMHOmh1xsbCuPxcY","articleid":1.619775167E+12,"articletitle":"这个onshow跟onload有什么区别啊?","articletype":"疑问互答","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/53Z7ZntS8oibMbicLuDDkfQA5LKxaBdQmbLYiba7l13xHwFeKzCibBhT2p6Ppu9nZPfMRIKet7SwNGzPTAcGrHEqDw/132","commenter":"Mi Manchi","commentid":1.620375206E+12,"content":"我知道"}
4 | {"_id":"79550af26094f6cb14f5d5180766f8da","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/53Z7ZntS8oibMbicLuDDkfQA5LKxaBdQmbLYiba7l13xHwFeKzCibBhT2p6Ppu9nZPfMRIKet7SwNGzPTAcGrHEqDw/132","commenter":"Mi Manchi","commentid":1.620375243E+12,"content":"onload 只会加载一次,onshow每次打开都加载。","_openid":"o7atc5AHWHREWMHOmh1xsbCuPxcY","articleid":1.619775167E+12,"articletitle":"这个onshow跟onload有什么区别啊?","articletype":"疑问互答"}
5 | {"_id":"28ee4e3e609a7bee17d3a3c773c9365e","articletitle":"为什么下面还要一个getchar( )","articletype":"疑问互答","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","commenter":"青轩","commentid":1.620737005E+12,"content":"不清楚,不了解","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.620478713E+12}
6 | {"_id":"b00064a760a79ca3195412b04d123188","commenter":"青轩","commentid":1.621597347E+12,"content":"建议 baidu","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","articleid":1.620478561E+12,"articletitle":"java如何导入包啊?","articletype":"疑问互答","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132"}
7 | {"_id":"28ee4e3e60b236021df71833457798ab","articletype":"校园一角","commenter":"青轩","content":"收藏了","commentid":1.622291971E+12,"_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","article_id":"79550af260b230e81b7b3c4e1f0aa844","articleid":1.622290664E+12,"articletitle":"问渠湖","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132"}
8 | {"_id":"28ee4e3e60b236111df71e1d581d0c64","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","commenter":"青轩","content":"好图啊","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","article_id":"cbddf0af60b232760cbe0c4d74d29fdb","articleid":1.622291059E+12,"articletitle":"天热多喝水吧","articletype":"逸闻趣事","commentid":1.622291986E+12,"revert":[{"rev_content":"+1","rev_id":"28ee4e3e60b236111df71e1d581d0c64","rev_name":"Mi Manchi","rev_obj":"青轩"}]}
9 | {"_id":"79550af260b236421b7d17441de30770","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","article_id":"b00064a760b221d81c24213e4abf1de2","articletype":"逸闻趣事","commentid":1.622292034E+12,"articleid":1.622286806E+12,"articletitle":"校园美食","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","commenter":"青轩","content":"好吃,味道不错"}
10 |
--------------------------------------------------------------------------------
/数据库/index.json:
--------------------------------------------------------------------------------
1 | {"_id":"b00064a76054bf6b0adc04827ae254ba","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/轮播图/1617087963000.jpg","cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/轮播图/1617087970000.jpg","cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/轮播图/1622297743000.jpg"],"notices":["合经院小程序开通啦!啦啦啦啦啦啦","欢迎同学们体验!","哈哈哈哈哈"],"_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg"}
2 |
--------------------------------------------------------------------------------
/数据库/user.json:
--------------------------------------------------------------------------------
1 | {"_id":"28ee4e3e608aa710138987f10d1ab810","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/22/67f483cb174f42b1a6f57f73f73d3256!400x400.jpeg","city":"合肥","office":"爱拍协会","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT10","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT10","sex":"男","nickName":"灰头土脸","age":"21","mailnumber":"3515635135@qq.com","province":"安徽","qqnumber":"3515635135"}
2 | {"_id":"28ee4e3e608aa710138987f10d1ab811","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/16/0de26d73c25d477bb0ad99590ffa43ef!400x400.jpeg","city":"合肥","office":"","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT11","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT11","sex":"男","nickName":"镜","age":"22","mailnumber":"1231355546@qq.com","province":"安徽","qqnumber":"1231355546"}
3 | {"_id":"28ee4e3e608aa710138987f10d1ab812","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/09/e0e75dd6e6704c3e9272c0c7ddca16a3!400x400.jpeg","city":"合肥","office":"尚舞社组织部长","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT12","bosshead":true,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT12","sex":"男","nickName":"喝伏特加的猫","age":"19","mailnumber":"245625625@qq.com","province":"安徽","qqnumber":"245625625"}
4 | {"_id":"28ee4e3e608aa710138987f10d1ab813","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/09/e240f71ab90d4340bf4aa0489342977f!400x400.jpeg","city":"合肥","office":"","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT13","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT13","sex":"男","nickName":"✿","age":"18","mailnumber":"2134682582@qq.com","province":"安徽","qqnumber":"2134682582"}
5 | {"_id":"28ee4e3e608aa710138987f10d1ab814","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/05/02/0fa9c0e5b3a147019468b8ebe9ce942e!400x400.jpeg","city":"合肥","office":"蓝天环保协会组织部长","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT14","bosshead":true,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT14","sex":"男","nickName":"catkins","age":"19","mailnumber":"2134682582@qq.com","province":"安徽","qqnumber":"2045050586"}
6 | {"_id":"28ee4e3e608aa710138987f10d1ab815","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/04/27/898e03fd1958457cb998e7360250ef62!400x400.jpeg","city":"合肥","office":"","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT15","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT15","sex":"男","nickName":"顾染","age":"22","mailnumber":"1624616516@qq.com","province":"安徽","qqnumber":"1624616516"}
7 | {"_id":"28ee4e3e608aa710138987f10d1ab816","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/04/25/68c8bbf7de9640febd83f78145d5b5b5!400x400.jpeg","city":"合肥","office":"","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT16","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT16","sex":"男","nickName":"#!","age":"21","mailnumber":"103438181@qq.com","province":"安徽","qqnumber":"103438181"}
8 | {"_id":"28ee4e3e608aa710138987f10d1ab817","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/04/18/04c6cd5e8a1e4bf38fd27676f5b08c70!400x400.jpeg","city":"合肥","office":"IT协会宣传部长","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT17","bosshead":true,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT17","sex":"男","nickName":"。","age":"21","mailnumber":"1365721819@qq.com","province":"安徽","qqnumber":"1365721819"}
9 | {"_id":"28ee4e3e608aa710138987f10d1ab818","admin":false,"avatarUrl":"https://img2.woyaogexing.com/2021/04/15/14fe8c409743412aac6a8915f9e5a920!400x400.jpeg","city":"合肥","office":"","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT18","bosshead":false,"openid":"o7atc5I-oB_ci5mOmuDniKWTUT18","sex":"男","nickName":"尽染","age":"20","mailnumber":"4628562213@qq.com","province":"安徽","qqnumber":"4628562213"}
10 | {"_id":"b00064a760b221d81c24213e4abf1de2","anonymity":"0","anonymous":false,"title":"校园美食","topicid":0.0,"type":"逸闻趣事","_openid":"o7atc5I-oB_ci5mOmuDniKWTUT16","articleid":1.622286806E+12,"avatarUrl":"https://img2.woyaogexing.com/2021/04/25/68c8bbf7de9640febd83f78145d5b5b5!400x400.jpeg","content":"可乐煎鸡饭","images":["cloud://campus-service-7gifi4wm69286cfd.6361-campus-service-7gifi4wm69286cfd-1304436265/2021-4/30/16222868060000.png"],"nickName":"#!"}
11 | {"_id":"79550af260b4ea1d1c1e4f60562e71d4","province":"安徽","_openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","city":"合肥","mailnumber":"","bosshead":false,"nickName":"青轩","office":"无","openid":"o7atc5I-oB_ci5mOmuDniKWTUTPg","qqnumber":"","admin":true,"age":"","avatarUrl":"https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoesCguX74bhPvgMRfo9eSCMicGXjUHaWl5dpkRFVH4EnfhL00etFCML7HYptKSR23KpqYZzx9eQrQ/132","sex":""}
12 |
--------------------------------------------------------------------------------
/数据库/说明.txt:
--------------------------------------------------------------------------------
1 | json数据库文档,导入云开发数据库
2 | 内容图片会自己丢失,应为你的云存储中没有,可以改成其他图片地址
3 |
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-30-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-30-11.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-30-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-30-29.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-30-38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-30-38.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-30-53.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-30-53.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-31-14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-31-14.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-31-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-31-40.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-31-53.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-31-53.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-32-10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-32-10.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-32-25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-32-25.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-32-42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-32-42.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-32-58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-32-58.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-33-11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-33-11.png
--------------------------------------------------------------------------------
/节目秀/Snipaste_2021-05-31_21-33-30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Liu-Hsin/WechatMini_program_School_Social_Software/3edbfc67e63b4ae51ee3d837525a942f788681f0/节目秀/Snipaste_2021-05-31_21-33-30.png
--------------------------------------------------------------------------------
/节目秀/programShow:
--------------------------------------------------------------------------------
1 |
2 | 展示项目部分图片
3 |
--------------------------------------------------------------------------------