海报:完善小程序码获取和海报生成

This commit is contained in:
puhui999
2024-05-13 16:22:55 +08:00
parent 8815972188
commit 004294ae7c
11 changed files with 78 additions and 42 deletions
+13 -6
View File
@@ -1,5 +1,6 @@
import request from '@/sheep/request';
import { baseUrl, apiPath } from '@/sheep/config';
const socialType = 34; // 社交类型 - 微信小程序
export default {
// 微信相关
@@ -19,12 +20,18 @@ export default {
}),
// 获取微信小程序码
getWxacode: (path) =>
`${baseUrl}${apiPath}third/wechat/wxacode?platform=miniProgram&payload=${encodeURIComponent(
JSON.stringify({
getWxacode: async (path, query) => {
return await request({
url: '/member/social-user/wxa-qrcode',
method: 'POST',
data: {
type: socialType,
scene: query,
isCheckPath: false, // TODO 开发环境暂不检查 path 是否存在
path,
}),
)}`,
},
});
},
},
// 苹果相关
+11 -13
View File
@@ -16,12 +16,12 @@ const BrokerageApi = {
});
},
// 获得分销记录分页
getBrokerageRecordPage: (params) => {
getBrokerageRecordPage: params => {
if (params.status === undefined) {
delete params.status
}
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.map(key => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-record/page?${queryString}`,
@@ -29,7 +29,7 @@ const BrokerageApi = {
});
},
// 创建分销提现
createBrokerageWithdraw: (data) => {
createBrokerageWithdraw: data => {
return request({
url: '/trade/brokerage-withdraw/create',
method: 'POST',
@@ -37,17 +37,15 @@ const BrokerageApi = {
});
},
// 获得商品的分销金额
getProductBrokeragePrice: (spuId) => {
getProductBrokeragePrice: spuId => {
return request({
url: '/trade/brokerage-record/get-product-brokerage-price',
method: 'GET',
params: {
spuId
}
params: { spuId }
});
},
// 获得分销用户排行(基于佣金)
getRankByPrice: (params) => {
getRankByPrice: params => {
const queryString = `times=${params.times[0]}&times=${params.times[1]}`;
return request({
url: `/trade/brokerage-user/get-rank-by-price?${queryString}`,
@@ -55,9 +53,9 @@ const BrokerageApi = {
});
},
// 获得分销用户排行分页(基于佣金)
getBrokerageUserChildSummaryPageByPrice: (params) => {
getBrokerageUserChildSummaryPageByPrice: params => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.map(key => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-price?${queryString}`,
@@ -65,9 +63,9 @@ const BrokerageApi = {
});
},
// 获得分销用户排行分页(基于用户量)
getBrokerageUserRankPageByUserCount: (params) => {
getBrokerageUserRankPageByUserCount: params => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.map(key => encodeURIComponent(key) + '=' + params[key])
.join('&');
return request({
url: `/trade/brokerage-user/rank-page-by-user-count?${queryString}`,
@@ -75,7 +73,7 @@ const BrokerageApi = {
});
},
// 获得下级分销统计分页
getBrokerageUserChildSummaryPage: (params) => {
getBrokerageUserChildSummaryPage: params => {
return request({
url: '/trade/brokerage-user/child-summary-page',
method: 'GET',