diff --git a/src/components/RankListMini.vue b/src/components/RankListMini.vue
index 29e5e22..10ad0a4 100644
--- a/src/components/RankListMini.vue
+++ b/src/components/RankListMini.vue
@@ -144,6 +144,11 @@ const props = defineProps({
required: true,
default: () => [],
},
+ userParams: {
+ type: Object,
+ required: true,
+ default: () => {},
+ },
});
const clickItem = ref({});
@@ -158,8 +163,10 @@ function goDetail(item) {
// url: "/pages/login/indexMini",
// });
// }
+ let phone = props.userParams.phone || "";
+ let userType = props.userParams.userType || "";
uni.navigateTo({
- url: `/pages/detail/indexNewsInfo?id=${item.news_id}`,
+ url: `/pages/detail/indexNewsInfo?id=${item.news_id}&phone=${phone}&userType=${userType}`,
});
}
diff --git a/src/pages/detail/indexNewsInfo.vue b/src/pages/detail/indexNewsInfo.vue
index b023aff..ae0248c 100644
--- a/src/pages/detail/indexNewsInfo.vue
+++ b/src/pages/detail/indexNewsInfo.vue
@@ -12,7 +12,7 @@
-
-
+ -->
@@ -143,7 +143,6 @@ onLoad(async (option: any) => {
}
if (option?.userType == 2) {
- console.log("🚀 ~ Date.now():", Date.now());
// 打开页面时链接中带有time字段,表示上次分享的时间
let shareTime = option?.time || 0;
// 现在的时间对比上次的分享时间,如果超过24小时,则刷新推荐栏目
@@ -153,6 +152,21 @@ onLoad(async (option: any) => {
window.location.reload();
}
}
+
+ console.log("准备发送消息到小程序");
+ if (typeof wx !== "undefined" && wx.miniProgram) {
+ wx.miniProgram.postMessage({
+ data: {
+ type: "share_info",
+ userType: option?.userType || null,
+ phone: option?.phone || null,
+ id: option?.id || null,
+ },
+ });
+ console.log("消息已发送");
+ } else {
+ console.log("非微信小程序环境,无法发送消息");
+ }
});
const newList = async (columnId: number) => {
diff --git a/src/pages/minihome/index.vue b/src/pages/minihome/index.vue
index 8302218..ce3139e 100644
--- a/src/pages/minihome/index.vue
+++ b/src/pages/minihome/index.vue
@@ -85,7 +85,7 @@
-
+
diff --git a/src/pages/sreachReq/index.vue b/src/pages/sreachReq/index.vue
index 9e6c5d3..8de8aa1 100644
--- a/src/pages/sreachReq/index.vue
+++ b/src/pages/sreachReq/index.vue
@@ -12,7 +12,7 @@
-
-
+ -->
@@ -52,15 +52,11 @@
:border="false"
/>
- 搜索
+ 搜索
-
+
@@ -70,7 +66,6 @@
v-if="screenList.length === 0"
text="无搜索结果"
width="157"
- height="50"
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/nosearch_icon%E5%A4%87%E4%BB%BD%402x.png"
>
@@ -242,10 +237,7 @@ const getData = async () => {
`$&`
);
- item.title = item.title.replace(
- keyWord.value,
- '' + keyWord.value + ""
- );
+ item.title = item.title.replace(keyWord.value, '' + keyWord.value + "");
console.log("🚀 ~ getData ~ item.title :", item.title);
item.MarkInRedContent =
@@ -285,7 +277,6 @@ onShow(() => {
display: flex;
align-items: center;
// height: 60rpx;
- gap: 20rpx;
box-sizing: border-box;
padding: 12rpx 0;
position: sticky;