feat: 分享的文案 + 点击头像看模卡 + 提现文案 + 协议弹窗 + 进群限制
This commit is contained in:
@ -15,10 +15,14 @@ const getRandomCount = () => {
|
||||
return (seed % 300) + 500;
|
||||
};
|
||||
|
||||
export const getCommonShareMessage = (useCapture: boolean = true, inviteCode?: string): ShareAppMessageReturn => {
|
||||
export const getCommonShareMessage = (
|
||||
useCapture: boolean = true,
|
||||
inviteCode?: string,
|
||||
title?: string
|
||||
): ShareAppMessageReturn => {
|
||||
console.log('share share message', getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined));
|
||||
return {
|
||||
title: `昨天新增了${getRandomCount()}条主播通告,宝子快来看看`,
|
||||
title: title || `昨天新增了${getRandomCount()}条主播通告,宝子快来看看`,
|
||||
path: getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined),
|
||||
imageUrl: useCapture ? undefined : imageUrl,
|
||||
};
|
||||
|
||||
@ -151,3 +151,20 @@ export async function followGroup(blGroupId: FollowGroupRequest['blGroupId']) {
|
||||
|
||||
export const getAgreementSigned = (): boolean | '' => Taro.getStorageSync(CacheKey.AGREEMENT_SIGNED);
|
||||
export const setAgreementSigned = (signed: boolean) => Taro.setStorageSync(CacheKey.AGREEMENT_SIGNED, signed);
|
||||
export const getCityCodes = (): string[] => {
|
||||
const cachedValue = Taro.getStorageSync(CacheKey.CITY_CODES);
|
||||
return !cachedValue || !Array.isArray(cachedValue) ? [] : cachedValue;
|
||||
};
|
||||
export const setCityCodes = (cityCode: string[]) => Taro.setStorageSync(CacheKey.CITY_CODES, cityCode);
|
||||
export const checkCityCode = (cityCode: string): boolean => {
|
||||
const cachedCityCodes = getCityCodes();
|
||||
const isNewCityCode = cachedCityCodes.indexOf(cityCode) === -1;
|
||||
if (cachedCityCodes.length === 2 && isNewCityCode) {
|
||||
Toast.info('最多只能进入2个城市');
|
||||
return false;
|
||||
}
|
||||
if (isNewCityCode) {
|
||||
setCityCodes([...cachedCityCodes, cityCode]);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user