-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,229 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"permissions": { | ||
"openapi": [ | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// 云函数入口文件 | ||
const cloud = require('wx-server-sdk'); | ||
|
||
cloud.init({ | ||
env: cloud.DYNAMIC_CURRENT_ENV | ||
}); | ||
const db = cloud.database(); | ||
const _ = db.command; | ||
|
||
// 权限检查 | ||
async function check_manager(level) { | ||
const wxContext = cloud.getWXContext() | ||
const openid = wxContext.OPENID; | ||
const isManager = (await cloud.callFunction({ | ||
name: 'isManager', | ||
data: { | ||
openid: openid, | ||
req: level | ||
} | ||
})); | ||
return isManager; | ||
} | ||
|
||
// 云函数入口函数 | ||
exports.main = async (event, context) => { | ||
if (event.deploy_test === true) { | ||
// 进行部署检查 | ||
return; | ||
} | ||
const type = event.type; | ||
|
||
if (type == "saveRelationTypes") { | ||
// 新建关系类型 | ||
if (!event.relationTypes) { | ||
return false; | ||
} | ||
return await db.collection("setting").doc("relation").update({ | ||
data: { | ||
types: event.relationTypes | ||
} | ||
}); | ||
} | ||
if (type == "saveRelation") { | ||
var cat_id = event.cat_id; | ||
var relations = event.relations; | ||
return await db.collection("cat").doc(cat_id).update({ | ||
data: { | ||
relations: relations | ||
} | ||
}); | ||
} | ||
|
||
return `unk type ${type}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "relationOp", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"wx-server-sdk": "~2.6.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ App({ | |
checkUpdateVersion(); | ||
|
||
this.globalData = { | ||
version: "v1.8.1" | ||
version: "v1.8.3" | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,73 @@ | ||
{ | ||
"pages": [ | ||
"pages/genealogy/genealogy", | ||
"pages/genealogy/addPhoto/addPhoto", | ||
"pages/genealogy/detailCat/detailCat", | ||
"pages/info/info", | ||
"pages/info/photoRank/photoRank", | ||
"pages/info/reward/reward", | ||
"pages/info/feedback/feedback", | ||
"pages/info/feedback/myFeedback/myFeedback", | ||
"pages/info/devTeam/devTeam", | ||
"pages/manage/addCat/addCat", | ||
"pages/manage/imProcess/imProcess", | ||
"pages/manage/checkPhotos/checkPhotos", | ||
"pages/manage/filters/filters", | ||
"pages/debug/debug", | ||
"pages/manage/managers/managers", | ||
"pages/genealogy/feedbackDetail/feedbackDetail", | ||
"pages/manage/checkFeedbacks/checkFeedbacks", | ||
"pages/manage/replyFeedback/replyFeedback", | ||
"pages/manage/rewards/rewards", | ||
"pages/recognize/recognize", | ||
"pages/genealogy/commentBoard/commentBoard", | ||
"pages/debug/deployTip/deployTip", | ||
"pages/news/news", | ||
"pages/news/detailNews/detailNews", | ||
"pages/news/modifyNews/modifyNews", | ||
"pages/news/createNews/createNews", | ||
"pages/news/sciDetail/sciDetail" | ||
], | ||
"tabBar": { | ||
"selectedColor": "#000", | ||
"borderStyle": "white", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/genealogy/genealogy", | ||
"iconPath": "./images/tabs/default/cat.png", | ||
"selectedIconPath": "./images/tabs/active/cat.png", | ||
"text": "猫谱" | ||
}, | ||
{ | ||
"pagePath": "pages/news/news", | ||
"iconPath": "./images/tabs/default/sci.png", | ||
"selectedIconPath": "./images/tabs/active/sci.png", | ||
"text": "公告" | ||
}, | ||
{ | ||
"pagePath": "pages/info/info", | ||
"iconPath": "./images/tabs/default/info.png", | ||
"selectedIconPath": "./images/tabs/active/info.png", | ||
"text": "关于" | ||
} | ||
] | ||
}, | ||
"window": { | ||
"backgroundColor": "#fff", | ||
"backgroundTextStyle": "light", | ||
"navigationBarBackgroundColor": "#ffd101", | ||
"navigationBarTitleText": "中大猫谱", | ||
"navigationBarTextStyle": "black" | ||
}, | ||
"supportedMaterials": [ | ||
{ | ||
"materialType": "image/*", | ||
"name": "用${nickname}识别", | ||
"desc": "根据图片识别校园中相似的猫咪", | ||
"path": "pages/recognize/recognize" | ||
} | ||
], | ||
"sitemapLocation": "sitemap.json" | ||
"pages": [ | ||
"pages/genealogy/genealogy", | ||
"pages/genealogy/addPhoto/addPhoto", | ||
"pages/genealogy/detailCat/detailCat", | ||
"pages/info/info", | ||
"pages/info/photoRank/photoRank", | ||
"pages/info/reward/reward", | ||
"pages/info/feedback/feedback", | ||
"pages/info/feedback/myFeedback/myFeedback", | ||
"pages/info/devTeam/devTeam", | ||
"pages/manage/addCat/addCat", | ||
"pages/manage/imProcess/imProcess", | ||
"pages/manage/checkPhotos/checkPhotos", | ||
"pages/manage/filters/filters", | ||
"pages/debug/debug", | ||
"pages/manage/managers/managers", | ||
"pages/genealogy/feedbackDetail/feedbackDetail", | ||
"pages/manage/checkFeedbacks/checkFeedbacks", | ||
"pages/manage/replyFeedback/replyFeedback", | ||
"pages/manage/rewards/rewards", | ||
"pages/recognize/recognize", | ||
"pages/genealogy/commentBoard/commentBoard", | ||
"pages/debug/deployTip/deployTip", | ||
"pages/news/news", | ||
"pages/news/detailNews/detailNews", | ||
"pages/news/modifyNews/modifyNews", | ||
"pages/news/createNews/createNews", | ||
"pages/news/sciDetail/sciDetail", | ||
"pages/manage/addRelations/addRelations" | ||
], | ||
"tabBar": { | ||
"selectedColor": "#000", | ||
"borderStyle": "white", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/genealogy/genealogy", | ||
"iconPath": "./images/tabs/default/cat.png", | ||
"selectedIconPath": "./images/tabs/active/cat.png", | ||
"text": "猫谱" | ||
}, | ||
{ | ||
"pagePath": "pages/news/news", | ||
"iconPath": "./images/tabs/default/sci.png", | ||
"selectedIconPath": "./images/tabs/active/sci.png", | ||
"text": "公告" | ||
}, | ||
{ | ||
"pagePath": "pages/info/info", | ||
"iconPath": "./images/tabs/default/info.png", | ||
"selectedIconPath": "./images/tabs/active/info.png", | ||
"text": "关于" | ||
} | ||
] | ||
}, | ||
"window": { | ||
"backgroundColor": "#fff", | ||
"backgroundTextStyle": "light", | ||
"navigationBarBackgroundColor": "#ffd101", | ||
"navigationBarTitleText": "中大猫谱", | ||
"navigationBarTextStyle": "black" | ||
}, | ||
"supportedMaterials": [ | ||
{ | ||
"materialType": "image/*", | ||
"name": "用${nickname}识别", | ||
"desc": "根据图片识别校园中相似的猫咪", | ||
"path": "pages/recognize/recognize" | ||
} | ||
], | ||
"sitemapLocation": "sitemap.json", | ||
"lazyCodeLoading" : "requiredComponents" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.