fix 针对抖音再提交一个版本

This commit is contained in:
tsui110 2026-01-06 17:26:55 +08:00
parent a083681697
commit 0609f5c531
12 changed files with 142 additions and 79 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@ node_modules/
*.tmp
*.swp
.claude/settings.local.json
.hbuilderx/project.config.json
clean-cache.bat

16
App.vue
View File

@ -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')

View File

@ -1,18 +1,23 @@
<template>
<view class="custom-tab-bar">
<view class="tab-bar-item" @tap="switchTab('pages/index/index')">
<image class="tab-icon" :src="selected === 0 ? '/static/tab/home_active.png' : '/static/tab/home.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 0 }">首页</text>
</view>
<view class="tab-bar-item" @tap="switchTab('pages/shop/index')">
<image class="tab-icon" :src="selected === 0 ? '/static/tab/shop_active.png' : '/static/tab/shop.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 0 }">商城</text>
<image class="tab-icon" :src="selected === 1 ? '/static/tab/shop_active.png' : '/static/tab/shop.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 1 }">商城</text>
</view>
<view class="tab-bar-item" @tap="switchTab('pages/cabinet/index')">
<image class="tab-icon" :src="selected === 1 ? '/static/tab/box_active.png' : '/static/tab/box.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 1 }">盒柜</text>
<image class="tab-icon" :src="selected === 2 ? '/static/tab/box_active.png' : '/static/tab/box.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 2 }">盒柜</text>
</view>
<view class="tab-bar-item" @tap="switchTab('pages/mine/index')">
<image class="tab-icon" :src="selected === 2 ? '/static/tab/profile_active.png' : '/static/tab/profile.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 2 }">我的</text>
<image class="tab-icon" :src="selected === 3 ? '/static/tab/profile_active.png' : '/static/tab/profile.png'" mode="aspectFit"></image>
<text class="tab-text" :class="{ active: selected === 3 }">我的</text>
</view>
</view>
</template>
@ -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) {

View File

@ -1,6 +1,6 @@
{
"name" : "app_client",
"appid": "",
"appid" : "__UNI__07C684D",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@ -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(() => {

View File

@ -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) {

View File

@ -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(() => {

View File

@ -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) {

View File

@ -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(() => {

View File

@ -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) {

View File

@ -56,13 +56,13 @@
<!-- 玩法分类专区 -->
<!-- #ifndef MP-TOUTIAO -->
<view class="gameplay-section">
<view class="section-header">
<text class="section-title">玩法分类</text>
</view>
<view class="gameplay-grid-v2">
<!-- 上排两大核心 -->
<!-- #ifndef MP-TOUTIAO -->
<view class="grid-row-top">
<view class="game-card-large card-yifan" @tap="navigateTo('/pages-activity/activity/list/index?category=一番赏')">
<view class="card-bg-decoration"></view>
@ -80,7 +80,6 @@
</view>
</view>
</view>
<!-- #endif -->
<!-- 下排三小功能 -->
<view class="grid-row-bottom">
@ -104,8 +103,10 @@
</view>
</view>
</view>
<!-- #endif -->
<!-- 推荐活动列表 -->
<!-- #ifndef MP-TOUTIAO -->
<view class="activity-section">
<view class="section-header">
<text class="section-title">推荐活动</text>
@ -132,6 +133,7 @@
</view>
<view v-else class="activity-empty">暂无更多活动</view>
</view>
<!-- #endif -->
<!-- 底部垫高 -->
<view style="height: 40rpx"></view>

View File

@ -38,6 +38,11 @@
<text class="level-text">Lv1 {{ title }}</text>
</view>
</view>
<!-- 绑定的抖音号 -->
<view class="douyin-id-row" v-if="douyinUserId">
<text class="douyin-id-label">抖音号</text>
<text class="douyin-id-value">{{ douyinUserId }}</text>
</view>
<view class="userid" v-if="userId">ID: {{ userId }}</view>
<!-- <view class="progress-container" v-if="nickname">
<view class="progress-bar">
@ -988,13 +993,14 @@ export default {
uni.showModal({
title: '绑定抖音',
content: '请输入您的抖店订单号即可完成绑定',
editable: true,
placeholderText: '请输入您的抖音号(Buyer ID)',
placeholderText: '请输入您的抖店订单号',
success: async (res) => {
if (res.confirm) {
const douyinId = res.content?.trim()
if (!douyinId) {
uni.showToast({ title: '抖号不能为空', icon: 'none' })
uni.showToast({ title: '抖店订单号不能为空', icon: 'none' })
return
}
@ -1600,6 +1606,23 @@ export default {
.userid { font-size: $font-sm; color: $text-tertiary; font-family: monospace; }
/* 绑定的抖音号 */
.douyin-id-row {
display: flex;
align-items: center;
margin-top: 8rpx;
font-size: $font-sm;
}
.douyin-id-label {
color: $text-tertiary;
margin-right: 8rpx;
}
.douyin-id-value {
color: $brand-primary;
font-weight: 600;
font-family: monospace;
}
.join-btn {
background: $text-main;
color: $text-inverse;