feat: 企微获客助手小程序 - 首页商品详情+遮蔽层跳转+工具箱

This commit is contained in:
陈誉午
2026-07-31 17:37:06 +08:00
commit 84d543eb14
46 changed files with 25402 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
// index.ts
import { BASE_URL, appId } from '../../env'
Component({
data: {
showPopup: false,
showToast: false,
},
methods: {
preventTouchMove() {},
onOverlayTap() {
wx.request({
url: `${BASE_URL}/api/ad/ww-join-fans/result/${appId}`,
method: 'GET',
success: (res: any) => {
const data = res.data
if (data.data.url || data.data) {
// @ts-ignore
wx.openOfficialAccountArticle({
url: data.data.url || data.data,
fail: () => {
wx.showToast({ title: '打开失败', icon: 'none' })
},
})
} else {
wx.showToast({ title: '未获取到链接', icon: 'none' })
}
},
fail: () => {
wx.showToast({ title: '请求失败', icon: 'none' })
},
})
},
},
})