From 444ccd6384f26efb3a8e60ee66387c367a1911be Mon Sep 17 00:00:00 2001 From: congzc Date: Tue, 19 Sep 2023 17:51:42 +0800 Subject: [PATCH] 1 --- README.md | 5 + src/App.vue | 4 +- src/api/lookPhoto.js | 12 ++ src/api/uploadphoto.js | 25 +++ src/pages/closeStyle/closeStyle copy.vue | 225 +++++++++++++++++++++++ src/pages/closeStyle/closeStyle.vue | 69 +++++-- src/pages/index/index.vue | 39 +++- src/pages/login/index.vue | 35 ++-- src/pages/lookPhoto/index.vue | 103 ++++++++++- src/pages/uploadPhoto/uploadPhoto.vue | 59 +++++- src/utils/request.js | 4 +- 11 files changed, 527 insertions(+), 53 deletions(-) create mode 100644 src/pages/closeStyle/closeStyle copy.vue diff --git a/README.md b/README.md index b9c19e8..f7311b6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Suimang-wxapp +setStorageSync 键名 +userId --用户id,用于邀请分享功能 +loginAwardCoin --注册奖励金币 +inviteAwardCoin --邀请奖励金币 +plat --根据平台不同来返回的值,用于发送请求 1为微信,2为抖音 wx-"appid": "wx75cf14e3a0d45821", diff --git a/src/App.vue b/src/App.vue index 416bfc9..a64281b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,8 +19,10 @@ onLaunch(() => { if (res.uniPlatform == "web") { uniPlatform = 1; } else if (res.uniPlatform == "mp-weixin") { + uni.setStorageSync("plat", 1); uniPlatform = 2; } else if (res.uniPlatform == "mp-toutiao") { + uni.setStorageSync("plat", 2); uniPlatform = 3; } if (res.osName == "windows") { @@ -42,7 +44,7 @@ onLaunch(() => { }, }); - uni.setStorageSync("userId", "114514"); + // uni.setStorageSync("userId", "114514"); const updateManager = uni.getUpdateManager(); diff --git a/src/api/lookPhoto.js b/src/api/lookPhoto.js index df6e4f1..d0dcd02 100644 --- a/src/api/lookPhoto.js +++ b/src/api/lookPhoto.js @@ -52,3 +52,15 @@ export function getUserQrcodeApi(data) { data }) } + +/** +* @description:获取订阅消息模版id +* @param +* @return: data +*/ +export function getTemplateMsgApi() { + return request({ + url: `api/templateMsg/list?projectType=5&plat=${uni.getStorageSync("plat")}&type=1`, + method: 'get', + }) +} diff --git a/src/api/uploadphoto.js b/src/api/uploadphoto.js index 7006a54..2cfd8f2 100644 --- a/src/api/uploadphoto.js +++ b/src/api/uploadphoto.js @@ -27,4 +27,29 @@ export function addImageApi(data) { method: 'post', data }); +} + +/** +* @description:获取登陆,注册送多少金币的接口 +* @param "projectType":5,//智像固定5 "type":1-注册,2-邀请 +* @return: data +*/ +export function getProjectConfigApi(data) { + return request({ + url: `api/glodConfig/getProjectConfig`, + method: 'post', + data + }) +} + +/** +* @description:获取照片生成次数,判断是不是首次生成 +* @param "projectType":5,//智像固定5 "type":1-注册,2-邀请 +* @return: data +*/ +export function getCountApi() { + return request({ + url: `api/digitalAvatarPhoto/getCount`, + method: 'get', + }) } \ No newline at end of file diff --git a/src/pages/closeStyle/closeStyle copy.vue b/src/pages/closeStyle/closeStyle copy.vue new file mode 100644 index 0000000..c8098d3 --- /dev/null +++ b/src/pages/closeStyle/closeStyle copy.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/pages/closeStyle/closeStyle.vue b/src/pages/closeStyle/closeStyle.vue index c8098d3..58827a3 100644 --- a/src/pages/closeStyle/closeStyle.vue +++ b/src/pages/closeStyle/closeStyle.vue @@ -1,14 +1,22 @@