当前位置:网站首页>Wedding studio portal applet based on wechat applet
Wedding studio portal applet based on wechat applet
2022-06-28 05:13:00 【Classmate CC】
Business background
Wedding studio applet provides a platform to connect users and studios , It is equivalent to the studio's official website on wechat . It can help studios show their shooting strength , Record visitor data , Promotional offers . High frequency of use , Easy to spread , It is the right-hand assistant of the studio in wechat marketing . It adopts the small program cloud development solution provided by Tencent , No servers and domain names . The sample page is used by the studio to show excellent photographic samples for users to enjoy and attract customers . The cover page is a set of different packages launched by the studio according to the market demand , Users can reserve the set according to their own preferences . The personal center can view the shooting plan reserved by the user , You can also get the contact information of the studio .
functional requirement

Database design

Technical research
At present, the small procedures are more and more strict , need Content published to users , picture , Video, etc. for security compliance verification , Make sure there is no indecent content .
To this end, we have developed a verification method for images and textUGC Public mode encapsulation
const cloudHelper = require('../helper/cloud_helper.js');
const pageHelper = require('../helper/page_helper.js');
const setting = require('../setting/setting.js');
/** * Picture type verification * @param {*} fileName * @param {*} type */
function imgTypeCheck(path, type = ['jpg', 'jpeg', 'png','JPG','JPEG','PNG']) {
let fmt = path.split(".")[(path.split(".")).length - 1];
if (type.indexOf(fmt) > -1)
return true;
else
return false;
}
/** * Picture size check * @param {*} size * @param {*} maxSize */
function imgSizeCheck(size, maxSize) {
return size < maxSize;
}
async function imgCheckCloud(path, opt) {
/* let result = await cloudHelper.callCloudSumbit('check/img', params, opt).then(res => { return true; }).catch(err => { return false; }); */
let result = await wx.cloud.callFunction({
name: 'cloud',
data: {
route: 'check/img',
token : '',
params:{
img: wx.cloud.CDN( {
type: 'filePath',
filePath: path,
})
}
},
success: function (res) {
console.log(res)
console.log('succ')
return true;
},
fail: function (res) {
console.log(res)
return false;
},
complete: function (res) {
}
});
return result;
}
/** * Image verification * @param {*} imgData */
async function imgCheck(imgData) {
let result = await wx.serviceMarket.invokeService({
service: 'wxee446d7507c68b11',
api: 'imgSecCheck',
data: {
"Action": "ImageModeration",
"Scenes": ["PORN", "POLITICS", "TERRORISM"],
"ImageUrl": new wx.serviceMarket.CDN({
type: 'filePath',
filePath: imgData,
}),
"ImageBase64": '',
"Config": "",
"Extra": ""
},
}).then(res => {
if (res && res.data && res.data.Response &&
res.data.Response.PornResult && res.data.Response.PornResult.Suggestion === 'PASS' &&
res.data.Response.PoliticsResult && res.data.Response.PoliticsResult.Suggestion === 'PASS' &&
res.data.Response.TerrorismResult && res.data.Response.TerrorismResult.Suggestion === 'PASS')
return true;
else
return false;
}).catch(err => {
console.log(err);
return false;
});
return result;
}
module.exports = {
imgCheck,
imgCheckCloud,
imgTypeCheck,
imgSizeCheck
}
Front end interface design




Back end interface design

Git Code :
Git Code
边栏推荐
猜你喜欢
随机推荐
!‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
Simple usage of GSAP
学习太极创客 — MQTT 第二章(五)心跳机制
Qcom LCD commissioning
2022高处安装、维护、拆除考试题及答案
[JVM series] JVM tuning
电源插座是如何传输电的?困扰小伙伴这么多年的简单问题
氨基染料研究:Lumiprobe FAM 胺,6-异构体
如何学习可编程逻辑控制器(PLC)?
别卷!如何高质量地复现一篇论文?
Unity out ref params
交流电和直流电的区别是什么?
2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
Dart学习——函数、类
二级造价工程师证书含金量到底有多高?看这些就知道了
公司为什么选择云数据库?它的魅力到底是什么!
Is it enough for the project manager to finish the PMP? no, it isn't!
2022年安全员-A证考试题库及模拟考试
MySQL export query results to excel file








