修改生成的优惠券的截图

This commit is contained in:
zhl 2021-05-21 16:34:43 +08:00
parent 9eab9aa71f
commit e9cd01b715

View File

@ -62,7 +62,7 @@ export function checkQrExists(gameId: string, version: string, shop: string) {
* @return {Promise<string | Buffer | (string | Buffer)[]>}
*/
export function generateCouponImg(shop: string, couponId: string, content: string) {
let subPath = `/coupon/${shop}/`
let subPath = `/coupon/${shop}`
let path = generateUploadPath(subPath)
let file = `${path}/${couponId}.png`
if (content.search(/meta name=.+?viewport/) === -1) {
@ -85,6 +85,6 @@ export function generateCouponImg(shop: string, couponId: string, content: strin
}
export function getCouponUrl(shop: string, couponId: string) {
let subPath = `/coupon/${shop}/`
let subPath = `/coupon/${shop}`
return `${config.file.show_url}${subPath}/${couponId}.png`
}