From e52a5fd2f38be9b0f723d72ac9004bba03a3b559 Mon Sep 17 00:00:00 2001
From: qijq <624811160@qq.com>
Date: Tue, 19 Aug 2025 10:46:22 +0800
Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E5=A4=8D=E5=8F=91=E7=8E=B0?=
=?UTF-8?q?=E9=9C=80=E8=A6=81=E7=99=BB=E5=BD=95=E6=B2=A1=E6=9C=89=E5=85=B3?=
=?UTF-8?q?=E9=97=AD=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/themes/diy.vue | 15 ++++++++++++++
pages/index/image.vue | 43 ++++++++++++++++++++++++++++-----------
2 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/components/themes/diy.vue b/components/themes/diy.vue
index 10aae37..3756e4e 100644
--- a/components/themes/diy.vue
+++ b/components/themes/diy.vue
@@ -973,6 +973,12 @@ export default {
return "diy";
},
},
+ isLogin:{
+ type:Boolean,
+ default(){
+ return false
+ }
+ }
},
data() {
return {
@@ -1110,7 +1116,16 @@ export default {
});
},
tplGoToPage: function (e) {
+
let that = this;
+ if(this.isLogin){
+
+ if(!this.hasLogin){
+ that.$emit("showLogin",true)
+ return
+ }
+ }
+ debugger;
var t = e.currentTarget.dataset;
//console.info(t);
switch (parseInt(t.type)) {
diff --git a/pages/index/image.vue b/pages/index/image.vue
index a64db00..ec1511b 100644
--- a/pages/index/image.vue
+++ b/pages/index/image.vue
@@ -19,6 +19,7 @@
:style="{ background: PageNav.window.navigationBarBackgroundColor }"
>
+
@@ -43,10 +44,10 @@
@confirm="searchinput"
/>
-
-
+
@@ -67,6 +68,8 @@
:pageId="pageId"
:PageNav="PageNav"
:loadPageFlag="loadPageFlag"
+ :isLogin="true"
+ @showLogin="handerShowLogin"
>
@@ -88,7 +91,7 @@
-
+
-
+
@@ -199,12 +202,6 @@ export default {
},
mounted() {
-
- if(!this.hasLogin){
- this.showLoginPopup = true
- }
-
-
let view = uni.createSelectorQuery().in(this).select(".movableArea");
let that = this;
@@ -360,6 +357,11 @@ export default {
// item 返回选中 JSON 对象
//console.log(item)
+ if(!this.hasLogin){
+ this.showLoginPopup = true
+ return
+ }
+
let url = "/community/community/detail?id=" + item.story_id;
if (item.story_type == 4) {
@@ -378,7 +380,21 @@ export default {
this.$.gopage(url);
},
-
+ handerShowLogin(){
+ this.showLoginPopup = true
+ },
+ checkLoginBeforeNavigate(url){
+ if(!this.hasLogin) {
+ this.showLoginPopup = true
+ return false
+ }else{
+ uni.navigateTo({
+ url:url
+ })
+ }
+
+
+ },
getPostsList: function (force_refresh) {
let that = this;
var params = { page: this.page, rand: 1 };
@@ -619,6 +635,9 @@ export default {
duration: 300,
});
},
+ closeLoginPopup(){
+ this.showLoginPopup = false
+ }
},
};