shop-applet/libs/order.js

36 lines
1.5 KiB
JavaScript
Raw Permalink Normal View History

2023-09-20 17:00:55 +08:00
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
export function goShopDetail(item, uid) {
return new Promise(resolve => {
if (item.product_type === 1) {
uni.navigateTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}`
})
} else if (item.product_type === 2) {
uni.navigateTo({
url: `/pages/activity/presell_details/index?id=${item.activity_id}`
})
} else if (item.product_type === 0 || item.product_type === 10) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}&referer=${item.referer}`
})
} else if (item.product_type === 4) {
uni.navigateTo({
url: `/pages/activity/combination_details/index?id=${item.activity_id}`
})
} else if (item.product_type === 40) {
uni.navigateTo({
url: `/pages/activity/combination_status/index?id=${item.activity_id}`
})
} else {
resolve(item);
}
});
}