|
|
@@ -45,8 +45,7 @@ if (query.code) {
|
|
|
desc: '人工智能技术驱动的自然语言处理工具',
|
|
|
link: location.origin + '/ui',
|
|
|
imgUrl: 'https://cdn.raex.vip/image/2023-04-20-19-12-26ndDGBmTC.png',
|
|
|
- success: function () {
|
|
|
- }
|
|
|
+ success: function () {}
|
|
|
})
|
|
|
wx.updateTimelineShareData({
|
|
|
title: 'ChillGPT——人工智能技术驱动的自然语言处理工具',
|
|
|
@@ -54,6 +53,20 @@ if (query.code) {
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
+ .catch(e => {
|
|
|
+ if (e.message === 'code been used') {
|
|
|
+ if (isWechat) {
|
|
|
+ fetchRedirectUrl().then(res => {
|
|
|
+ const str = String(res).replace(
|
|
|
+ /redirect_uri=undefined/g,
|
|
|
+ 'redirect_uri=' + encodeURIComponent(resolveUrl(baseURL, '#/home'))
|
|
|
+ )
|
|
|
+
|
|
|
+ window.location.href = str
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
} else if (isWechat) {
|
|
|
fetchRedirectUrl().then(res => {
|
|
|
const str = String(res).replace(
|