diff --git a/src/pages/sreachReq/index.vue b/src/pages/sreachReq/index.vue
index 6cec609..c5ed0f4 100644
--- a/src/pages/sreachReq/index.vue
+++ b/src/pages/sreachReq/index.vue
@@ -1,64 +1,66 @@
+
+
+
-
-
-
-
-
+
+ :border="false" />
+ 搜索
-
+
- 加载更多
+
-
+
+
+
-
+
-
+
@@ -82,6 +84,13 @@ function goBack() {
uni.navigateBack();
}
+// 导航栏路由返回
+const handleBack = () => {
+ uni.navigateBack({
+ delta: 1,
+ });
+};
+
// login 弹框是否显示
const LoginShow = ref(false);
@@ -99,6 +108,7 @@ const handleSub = async () => {
if (item.type === itemType) {
item.needpay = false;
}
+
return item;
});
articleList.value = articleResult;
@@ -140,14 +150,23 @@ const handleShowPay = (type) => {
// 点击轮播图进入详情
const handleSwiperJump = (item: any) => {
console.log("item ===>", item);
- if (item.needpay) {
- // 需要先弹出订阅的弹框
- handleShowPay(item.type);
+ if (uni.getStorageSync("token")) {
+ uni.navigateTo({
+ url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
+ });
} else {
uni.navigateTo({
- url: `/pages/detail/index?id=${item.id}&type=${item.type}`,
+ url: "/pages/login/indexMini",
});
}
+ // if (item.needpay) {
+ // // 需要先弹出订阅的弹框
+ // handleShowPay(item.type);
+ // } else {
+ // uni.navigateTo({
+ // url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
+ // });
+ // }
};
const handleChange = (val: string) => {
@@ -188,16 +207,14 @@ const getData = async () => {
screenResult = res.data.filter((item) => {
item.newType = "search";
item.time = formatTimestamp(item.time);
- item.MarkInRedTitle = item.title.replace(
- new RegExp(inputValue.value, "gi"),
- `$&`
- );
+ item.MarkInRedTitle = item.title.replace(new RegExp(inputValue.value, "gi"), `$&`);
+
+ item.title = item.title.replace(keyWord.value, '' + keyWord.value + "");
+ console.log("🚀 ~ getData ~ item.title :", item.title);
+
item.MarkInRedContent =
item.contentText &&
- extractText(item.contentText, inputValue.value).replace(
- new RegExp(inputValue.value, "gi"),
- `$&`
- );
+ extractText(item.contentText, inputValue.value).replace(new RegExp(inputValue.value, "gi"), `$&`);
return item;
});
if (screenList.value.length > 0) {
@@ -223,7 +240,7 @@ onShow(() => {
.sreachcss {
min-height: 100vh;
background-color: #ffffff;
- padding: 0 30rpx;
+ // padding: 0 30rpx;
.sreach {
display: flex;
@@ -244,6 +261,11 @@ onShow(() => {
height: 70%;
border-radius: 20rpx;
padding: 0 20rpx;
+ border-radius: 100rpx;
+ }
+
+ :deep(.u-input) {
+ background-color: rgba(118, 118, 128, 0.12);
}
.tabsListContainer {
@@ -260,11 +282,13 @@ onShow(() => {
align-items: center;
box-sizing: border-box;
padding: 21rpx 0;
+
.line {
width: 69rpx;
height: 3rpx;
background-color: #b9b9b9;
}
+
.text {
padding: 0 10rpx;
}
@@ -282,4 +306,50 @@ onShow(() => {
color: #828b92;
}
}
+
+.custom-bav-bar {
+ width: 100%;
+ height: 88rpx;
+ background-color: #fff;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+
+ .back_icon {
+ width: 40rpx;
+ height: 40rpx;
+ }
+
+ .logo_icon {
+ width: 168rpx;
+ height: 40rpx;
+ margin-right: 6rpx;
+ }
+
+ .left {
+ position: absolute;
+ top: 24rpx;
+ left: 40rpx;
+ }
+
+ .center {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ // font-size: 28rpx;
+ font-size: var(--h2-font-size);
+ color: #333;
+ }
+}
+
+.serach_btn {
+ font-family: PingFangSC, PingFang SC;
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #d13e3c;
+ line-height: 45rpx;
+ text-align: right;
+ font-style: normal;
+}