fix: news.vue补userStore定义(v1.4.6引入的收藏报错);登录页isMiniApp简化(去掉v-if由条件编译保证);版本v1.4.8

This commit is contained in:
Hermes Agent
2026-09-19 21:46:10 +08:00
parent a87a631459
commit de125dae67
3 changed files with 4 additions and 10 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "宇之然AI维度", "name": "宇之然AI维度",
"appid": "wxdad62baf4ccd09e3", "appid": "wxdad62baf4ccd09e3",
"versionName": "1.4.7", "versionName": "1.4.8",
"versionCode": "100", "versionCode": "100",
"description": "AI 知识探索社区 — 从5个维度系统理解人工智能", "description": "AI 知识探索社区 — 从5个维度系统理解人工智能",
"uni-app": { "uni-app": {
+1 -9
View File
@@ -59,7 +59,7 @@
</view> </view>
<!-- 微信小程序一键登录 --> <!-- 微信小程序一键登录 -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="wx-login-row" v-if="isMiniApp"> <view class="wx-login-row">
<view class="wx-login-btn" @click="wechatLogin"> <view class="wx-login-btn" @click="wechatLogin">
<text class="wx-icon">💬</text> <text class="wx-icon">💬</text>
<text>微信一键登录</text> <text>微信一键登录</text>
@@ -135,14 +135,6 @@ import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { ref } from 'vue' import { ref } from 'vue'
import { useUserStore } from '@/stores/index' import { useUserStore } from '@/stores/index'
// 编译期判定:MP-WEIXIN 构建即小程序(运行时系统信息与按钮显示无关,避免旧API字段缺失导致按钮不渲染)
// #ifdef MP-WEIXIN
const isMiniApp = ref(true)
// #endif
// #ifndef MP-WEIXIN
const isMiniApp = ref(false)
// #endif
const activeTab = ref('login') const activeTab = ref('login')
const loading = ref(false) const loading = ref(false)
const agreed = ref(false) const agreed = ref(false)
+2
View File
@@ -94,6 +94,8 @@
<script setup> <script setup>
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app' import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
import { useUserStore } from '@/stores/user'
const userStore = useUserStore()
import { ref, computed, onMounted } from 'vue' import { ref, computed, onMounted } from 'vue'
import { trendApi, knowledgeApi } from '@/utils/api' import { trendApi, knowledgeApi } from '@/utils/api'