Merge remote-tracking branch 'refs/remotes/yudao/master'
# Conflicts: # pages/order/confirm.vue
This commit is contained in:
@@ -49,6 +49,28 @@ const SocialApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取订阅消息模板列表
|
||||
getSubscribeTemplateList: () =>
|
||||
request({
|
||||
url: '/member/social-user/get-subscribe-template-list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
// 获取微信小程序码
|
||||
getWxaQrcode: async (path, query) => {
|
||||
return await request({
|
||||
url: '/member/social-user/wxa-qrcode',
|
||||
method: 'POST',
|
||||
data: {
|
||||
scene: query,
|
||||
path,
|
||||
checkPath: false, // TODO 开发环境暂不检查 path 是否存在
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default SocialApi;
|
||||
@@ -1,34 +1,6 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
export default {
|
||||
// 微信相关
|
||||
wechat: {
|
||||
// 小程序订阅消息
|
||||
getSubscribeTemplateList: () =>
|
||||
request({
|
||||
url: '/member/social-user/get-subscribe-template-list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showError: false,
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// 获取微信小程序码
|
||||
// TODO @puhui999:这个接口,挪到 /Users/yunai/Java/yudao-mall-uniapp/sheep/api/member/social.js
|
||||
getWxacode: async (path, query) => {
|
||||
return await request({
|
||||
url: '/member/social-user/wxa-qrcode',
|
||||
method: 'POST',
|
||||
data: {
|
||||
scene: query,
|
||||
path,
|
||||
checkPath: false, // TODO 开发环境暂不检查 path 是否存在
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
// 苹果相关
|
||||
apple: {
|
||||
// 第三方登录
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import user from './user';
|
||||
import goods from './goods';
|
||||
import groupon from './groupon';
|
||||
import third from '@/sheep/api/migration/third';
|
||||
import SocialApi from '@/sheep/api/member/social';
|
||||
|
||||
export function getPosterData(options) {
|
||||
switch (options.shareInfo.poster.type) {
|
||||
@@ -34,6 +34,6 @@ export function formatImageUrlProtocol(url) {
|
||||
|
||||
// 获得微信小程序码 (Base64 image)
|
||||
export async function getWxaQrcode(path, query) {
|
||||
const res = await third.wechat.getWxacode(path, query);
|
||||
const res = await SocialApi.getWxaQrcode(path, query);
|
||||
return 'data:image/png;base64,' + res.data;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import third from '@/sheep/api/migration/third';
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
import SocialApi from '@/sheep/api/member/social';
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
@@ -164,7 +163,7 @@ const checkUpdate = async (silence = true) => {
|
||||
|
||||
// 获取订阅消息模板
|
||||
async function getSubscribeTemplate() {
|
||||
const { code, data } = await third.wechat.getSubscribeTemplateList();
|
||||
const { code, data } = await SocialApi.getSubscribeTemplateList();
|
||||
if (code === 0) {
|
||||
subscribeEventList = data;
|
||||
}
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ const app = defineStore({
|
||||
this.info = {
|
||||
name: '芋道商城',
|
||||
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
|
||||
version: '1.1.13',
|
||||
version: '2.2.0',
|
||||
copyright: '全部开源,个人与企业可 100% 免费使用',
|
||||
copytime: 'Copyright© 2018-2024',
|
||||
|
||||
|
||||
+7
-6
@@ -56,14 +56,15 @@ export const TimeStatusEnum = {
|
||||
END: '已结束',
|
||||
}
|
||||
|
||||
// TODO 订阅模版枚举
|
||||
export const SubscribeTemplate = {
|
||||
WALLET_RECHARGER_PAID: "充值成功通知",
|
||||
DELIVERY_ORDER: "订单发货通知",
|
||||
COMBINATION_RESULT: "拼团结果通知"
|
||||
/**
|
||||
* 微信小程序的订阅模版
|
||||
*/
|
||||
export const WxaSubscribeTemplate = {
|
||||
TRADE_ORDER_DELIVERY: "订单发货通知",
|
||||
PROMOTION_COMBINATION_SUCCESS: "拼团结果通知",
|
||||
PAY_WALLET_RECHARGER_SUCCESS: "充值成功通知",
|
||||
}
|
||||
|
||||
|
||||
export const getTimeStatusEnum = (startTime, endTime) => {
|
||||
const now = dayjs();
|
||||
if (now.isBefore(startTime)) {
|
||||
|
||||
Reference in New Issue
Block a user