|
|
@@ -89,7 +89,7 @@ export function savePendingInviteFromOption(option) {
|
|
|
ghsShopId: option.shopId || option.sId,
|
|
|
ghsShopAdminId: option.ghsShopAdminId || option.gId || 0,
|
|
|
fromCg: option.fromCg || 0,
|
|
|
- source: option.fromCg == 1 ? 'from_cg' : 'query'
|
|
|
+ source: option.fromCg == 1 ? 'hd_share' : 'query'
|
|
|
}
|
|
|
} else if (option.ghsShopAdminId) {
|
|
|
const scene = uni.getStorageSync('ghsCgScene')
|
|
|
@@ -147,6 +147,24 @@ export function getGhsProductQueryFromPending(pending) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export function buildGhsInviteSharePayload(ghsInfo) {
|
|
|
+ if (!ghsInfo) {
|
|
|
+ return null
|
|
|
+ }
|
|
|
+ const shopId = ghsInfo.shopId || 0
|
|
|
+ if (!shopId) {
|
|
|
+ return null
|
|
|
+ }
|
|
|
+ const ghsShopAdminId = ghsInfo.ghsShopAdminId || ghsInfo.shopAdminId || 0
|
|
|
+ const path = `pagesPurchase/ghsProduct?shopId=${shopId}&id=0&ghsShopAdminId=${ghsShopAdminId}&fromCg=1`
|
|
|
+ return {
|
|
|
+ title: ghsInfo.name || '批发店采购',
|
|
|
+ desc: '',
|
|
|
+ path: path,
|
|
|
+ imageUrl: ghsInfo.shareLogo || ghsInfo.avatar || ghsInfo.smallAvatar || ''
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
export function tryBindPendingInvite() {
|
|
|
const token = uni.getStorageSync('token')
|
|
|
if (!token) {
|