diff --git a/.gitignore b/.gitignore
index d457693..f66ec21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@ node_modules/
*.tmp
*.swp
.claude/settings.local.json
+.hbuilderx/project.config.json
+clean-cache.bat
diff --git a/App.vue b/App.vue
index 1a74b74..5d75b18 100644
--- a/App.vue
+++ b/App.vue
@@ -20,21 +20,7 @@ export default {
console.warn('Failed to load public config:', err)
})
- // #ifdef MP-TOUTIAO
- // 抖音平台:跳转到"我的"页面作为首页
- // 检查是否已经登录,如果未登录则跳转到登录页
- const token = uni.getStorageSync('token')
- if (!token) {
- uni.reLaunch({
- url: '/pages/login/index'
- })
- } else {
- // 已登录,跳转到我的页面
- uni.reLaunch({
- url: '/pages/mine/index'
- })
- }
- // #endif
+ // 抖音平台现在也显示首页,不再需要强制跳转
},
onShow: function() {
console.log('App Show')
diff --git a/components/custom-tab-bar-toutiao.vue b/components/custom-tab-bar-toutiao.vue
index c4e8b33..dfe228f 100644
--- a/components/custom-tab-bar-toutiao.vue
+++ b/components/custom-tab-bar-toutiao.vue
@@ -1,18 +1,23 @@
+
+
+ 首页
+
+
-
- 商城
+
+ 商城
-
- 盒柜
+
+ 盒柜
-
- 我的
+
+ 我的
@@ -21,7 +26,7 @@
export default {
data() {
return {
- selected: 2 // 默认选中"我的"
+ selected: 3 // 默认选中"我的"
}
},
mounted() {
@@ -37,9 +42,10 @@ export default {
const currentPage = pages[pages.length - 1]
const route = currentPage.route
- if (route === 'pages/shop/index') this.selected = 0
- else if (route === 'pages/cabinet/index') this.selected = 1
- else if (route === 'pages/mine/index') this.selected = 2
+ if (route === 'pages/index/index') this.selected = 0
+ else if (route === 'pages/shop/index') this.selected = 1
+ else if (route === 'pages/cabinet/index') this.selected = 2
+ else if (route === 'pages/mine/index') this.selected = 3
}
},
switchTab(url) {
diff --git a/manifest.json b/manifest.json
index 8868b79..0b117a4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,28 +1,28 @@
{
- "name": "app_client",
- "appid": "",
- "description": "",
- "versionName": "1.0.0",
- "versionCode": "100",
- "transformPx": false,
+ "name" : "app_client",
+ "appid" : "__UNI__07C684D",
+ "description" : "",
+ "versionName" : "1.0.0",
+ "versionCode" : "100",
+ "transformPx" : false,
/* 5+App特有相关 */
- "app-plus": {
- "usingComponents": true,
- "nvueStyleCompiler": "uni-app",
- "compilerVersion": 3,
- "splashscreen": {
- "alwaysShowBeforeRender": true,
- "waiting": true,
- "autoclose": true,
- "delay": 0
+ "app-plus" : {
+ "usingComponents" : true,
+ "nvueStyleCompiler" : "uni-app",
+ "compilerVersion" : 3,
+ "splashscreen" : {
+ "alwaysShowBeforeRender" : true,
+ "waiting" : true,
+ "autoclose" : true,
+ "delay" : 0
},
/* 模块配置 */
- "modules": {},
+ "modules" : {},
/* 应用发布信息 */
- "distribute": {
+ "distribute" : {
/* android打包配置 */
- "android": {
- "permissions": [
+ "android" : {
+ "permissions" : [
"",
"",
"",
@@ -41,45 +41,45 @@
]
},
/* ios打包配置 */
- "ios": {},
+ "ios" : {},
/* SDK配置 */
- "sdkConfigs": {}
+ "sdkConfigs" : {}
}
},
/* 快应用特有相关 */
- "quickapp": {},
+ "quickapp" : {},
/* 小程序特有相关 */
- "mp-weixin": {
- "appid": "wx26ad074017e1e63f",
- "setting": {
- "urlCheck": false,
- "minified": true,
- "es6": true,
- "postcss": true
+ "mp-weixin" : {
+ "appid" : "wx26ad074017e1e63f",
+ "setting" : {
+ "urlCheck" : false,
+ "minified" : true,
+ "es6" : true,
+ "postcss" : true
},
- "usingComponents": true,
- "lazyCodeLoading": "requiredComponents",
- "optimization": {
- "subPackages": true
+ "usingComponents" : true,
+ "lazyCodeLoading" : "requiredComponents",
+ "optimization" : {
+ "subPackages" : true
}
},
- "mp-alipay": {
- "usingComponents": true
+ "mp-alipay" : {
+ "usingComponents" : true
},
- "mp-baidu": {
- "usingComponents": true
+ "mp-baidu" : {
+ "usingComponents" : true
},
- "mp-toutiao": {
- "usingComponents": true,
- "appid": "ttf031868c6f33d91001",
- "privacy": {
- "getPhoneNumber": {
- "desc": "用于登录和账号绑定"
+ "mp-toutiao" : {
+ "usingComponents" : true,
+ "appid" : "ttf031868c6f33d91001",
+ "privacy" : {
+ "getPhoneNumber" : {
+ "desc" : "用于登录和账号绑定"
}
}
},
- "uniStatistics": {
- "enable": false
+ "uniStatistics" : {
+ "enable" : false
},
- "vueVersion": "3"
-}
\ No newline at end of file
+ "vueVersion" : "3"
+}
diff --git a/pages-activity/activity/list/index.vue b/pages-activity/activity/list/index.vue
index 368f9e7..ae52702 100644
--- a/pages-activity/activity/list/index.vue
+++ b/pages-activity/activity/list/index.vue
@@ -122,11 +122,21 @@ import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
onShareAppMessage(() => {
const inviteCode = uni.getStorageSync('invite_code') || (uni.getStorageSync('user_info') || {}).invite_code || ''
+ // #ifdef MP-TOUTIAO
+ // 抖音平台分享到商城页面
+ return {
+ title: `${title.value || '精彩活动'} - 柯大鸭潮玩`,
+ path: `/pages/shop/index?invite_code=${inviteCode}`,
+ imageUrl: '/static/logo.png'
+ }
+ // #endif
+ // #ifndef MP-TOUTIAO
return {
title: `${title.value || '精彩活动'} - 柯大鸭潮玩`,
path: `/pages/index/index?invite_code=${inviteCode}`,
imageUrl: '/static/logo.png'
}
+ // #endif
})
onShareTimeline(() => {
diff --git a/pages-user/address/submit.vue b/pages-user/address/submit.vue
index e170116..9853ae2 100644
--- a/pages-user/address/submit.vue
+++ b/pages-user/address/submit.vue
@@ -174,7 +174,13 @@ async function onSubmit() {
content: '收货信息已提交,请等待发货。' + (isLoggedIn.value ? '资产已转移至您的盒柜。' : ''),
showCancel: false,
success: () => {
+ // #ifdef MP-TOUTIAO
+ // 抖音平台跳转到商城
+ uni.switchTab({ url: '/pages/shop/index' })
+ // #endif
+ // #ifndef MP-TOUTIAO
uni.switchTab({ url: '/pages/index/index' })
+ // #endif
}
})
} catch (e) {
diff --git a/pages-user/coupons/index.vue b/pages-user/coupons/index.vue
index e541d4d..2da7bac 100644
--- a/pages-user/coupons/index.vue
+++ b/pages-user/coupons/index.vue
@@ -285,10 +285,18 @@ async function fetchData(append = false) {
// 去使用优惠券
function onUseCoupon(item) {
vibrateShort()
+ // #ifdef MP-TOUTIAO
+ // 抖音平台跳转到商城
+ uni.switchTab({
+ url: '/pages/shop/index'
+ })
+ // #endif
+ // #ifndef MP-TOUTIAO
// 通常跳转到首页或抽盒页
uni.switchTab({
url: '/pages/index/index'
})
+ // #endif
}
onLoad(() => {
diff --git a/pages-user/invite/landing.vue b/pages-user/invite/landing.vue
index f8bf607..74fb22f 100644
--- a/pages-user/invite/landing.vue
+++ b/pages-user/invite/landing.vue
@@ -186,7 +186,13 @@ function onGetPhoneNumber(e) {
uni.showToast({ title: '欢迎加入!', icon: 'success' })
setTimeout(() => {
+ // #ifdef MP-TOUTIAO
+ // 抖音平台跳转到商城
+ uni.switchTab({ url: '/pages/shop/index' })
+ // #endif
+ // #ifndef MP-TOUTIAO
uni.switchTab({ url: '/pages/index/index' })
+ // #endif
}, 500)
} catch (err) {
diff --git a/pages-user/item-cards/index.vue b/pages-user/item-cards/index.vue
index 1617a05..2ec1467 100644
--- a/pages-user/item-cards/index.vue
+++ b/pages-user/item-cards/index.vue
@@ -253,10 +253,18 @@ async function fetchData(append = false) {
// 去使用道具卡
function onUseCard(item) {
vibrateShort()
+ // #ifdef MP-TOUTIAO
+ // 抖音平台跳转到商城
+ uni.switchTab({
+ url: '/pages/shop/index'
+ })
+ // #endif
+ // #ifndef MP-TOUTIAO
// 道具卡通常去首页或指定的活动页
uni.switchTab({
url: '/pages/index/index'
})
+ // #endif
}
onLoad(() => {
diff --git a/pages-user/orders/index.vue b/pages-user/orders/index.vue
index fb67c1c..9efac3b 100644
--- a/pages-user/orders/index.vue
+++ b/pages-user/orders/index.vue
@@ -406,7 +406,13 @@ function goOrderDetail(item) {
}
function goShopping() {
+ // #ifdef MP-TOUTIAO
+ // 抖音平台跳转到商城
+ uni.switchTab({ url: '/pages/shop/index' })
+ // #endif
+ // #ifndef MP-TOUTIAO
uni.switchTab({ url: '/pages/index/index' })
+ // #endif
}
async function doCancelOrder(item) {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index afa185b..e1e1d3c 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -56,13 +56,13 @@
+
-
@@ -80,8 +80,7 @@
-
-
+
@@ -89,13 +88,13 @@
碰一碰消除
-
+
扫雷
福利挑战
-
+
更多
敬请期待
@@ -104,8 +103,10 @@
+
+
暂无更多活动
+
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 3ced4e2..4504056 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -38,6 +38,11 @@
Lv1 {{ title }}
+
+
+ 抖音号:
+ {{ douyinUserId }}
+
ID: {{ userId }}