移除无用文件
This commit is contained in:
100
utils/helper.ts
100
utils/helper.ts
@@ -3,7 +3,7 @@
|
||||
|
||||
const tabbar_pages = [
|
||||
'/pages/index/index',
|
||||
'/pages/cart/index',
|
||||
'/pages/todo/todoList',
|
||||
'/pages/mine/index',
|
||||
]
|
||||
|
||||
@@ -48,56 +48,56 @@ export const goToLoginPage = (redirect_url ?: string) => {
|
||||
// })
|
||||
// }
|
||||
|
||||
export const goToOtherMiniProgram = async () => {
|
||||
try {
|
||||
const res = await fetchConfig();
|
||||
console.log('config response:', res);
|
||||
const appid = res.go_to_app_id;
|
||||
const path = res.go_to_app_path;
|
||||
uni.navigateToMiniProgram({
|
||||
appId: appid, // 替换为目标小程序的appid
|
||||
path: path,
|
||||
success(res) {
|
||||
console.log('跳转成功', res);
|
||||
},
|
||||
fail(err) {
|
||||
console.error('跳转失败', err);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Failed to load shop config:', error);
|
||||
uni.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
// export const goToOtherMiniProgram = async () => {
|
||||
// try {
|
||||
// const res = await fetchConfig();
|
||||
// console.log('config response:', res);
|
||||
// const appid = res.go_to_app_id;
|
||||
// const path = res.go_to_app_path;
|
||||
// uni.navigateToMiniProgram({
|
||||
// appId: appid, // 替换为目标小程序的appid
|
||||
// path: path,
|
||||
// success(res) {
|
||||
// console.log('跳转成功', res);
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.error('跳转失败', err);
|
||||
// }
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error('Failed to load shop config:', error);
|
||||
// uni.showToast({
|
||||
// title: '加载失败',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
export const showPayImgs = async () => {
|
||||
try {
|
||||
const res = await fetchConfig();
|
||||
console.log('config response:', res);
|
||||
// 注意这里可能要根据你的实际数据结构调整
|
||||
const store_qr_codes = res.pay_qr_code?.map(item => item.url) || [];
|
||||
if (store_qr_codes.length === 0) {
|
||||
uni.showToast({
|
||||
title: '暂无图片',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log('preview images:', store_qr_codes);
|
||||
uni.previewImage({
|
||||
urls: store_qr_codes
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Failed to load shop config:', error);
|
||||
uni.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
// export const showPayImgs = async () => {
|
||||
// try {
|
||||
// const res = await fetchConfig();
|
||||
// console.log('config response:', res);
|
||||
// // 注意这里可能要根据你的实际数据结构调整
|
||||
// const store_qr_codes = res.pay_qr_code?.map(item => item.url) || [];
|
||||
// if (store_qr_codes.length === 0) {
|
||||
// uni.showToast({
|
||||
// title: '暂无图片',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
// console.log('preview images:', store_qr_codes);
|
||||
// uni.previewImage({
|
||||
// urls: store_qr_codes
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.error('Failed to load shop config:', error);
|
||||
// uni.showToast({
|
||||
// title: '加载失败',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
export const clearReactiveData = (obj) => {
|
||||
for (const key in obj) {
|
||||
|
||||
Reference in New Issue
Block a user