diff --git a/src/App.vue b/src/App.vue index ac1e267..034ebbc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,10 +8,9 @@ onLaunch(() => { console.log("App Launch"); stores.initWxConfig(); }); -onShow(() => { }); +onShow(() => {}); onHide(() => { console.log("App Hide"); - uni.setStorageSync('homeTabIndex', null) }); diff --git a/src/components/articleList/indexDomestic.vue b/src/components/articleList/indexDomestic.vue new file mode 100644 index 0000000..1266a4e --- /dev/null +++ b/src/components/articleList/indexDomestic.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/src/components/domestic.vue b/src/components/domestic.vue index cdcb098..26f3c0f 100644 --- a/src/components/domestic.vue +++ b/src/components/domestic.vue @@ -21,8 +21,16 @@ - - + + @@ -44,8 +52,11 @@ - + @@ -95,7 +106,11 @@ watch( () => props.newsList, (newValue, oldValue) => { const token = Session.get("token"); - isPay.value = !token ? true : newValue[0]?.needpay ? newValue[0]?.needpay : false; + isPay.value = !token + ? true + : newValue[0]?.needpay + ? newValue[0]?.needpay + : false; } ); @@ -253,7 +268,8 @@ const handlePopupSuccessCallback = () => { display: block; width: 44rpx; height: 6rpx; - background: url("https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_dot.png") no-repeat center; + background: url("https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_dot.png") + no-repeat center; background-size: 100% 100%; } } @@ -434,7 +450,11 @@ const handlePopupSuccessCallback = () => { // margin-bottom: 24rpx; padding: 40rpx 0; border-radius: 8rpx; - background: linear-gradient(90deg, rgba(255, 250, 240, 1) 0%, rgba(254, 238, 210, 1) 100%); + background: linear-gradient( + 90deg, + rgba(255, 250, 240, 1) 0%, + rgba(254, 238, 210, 1) 100% + ); .need-pay-text { font-size: 28rpx; @@ -452,7 +472,11 @@ const handlePopupSuccessCallback = () => { font-size: 32rpx; color: #fff; border-radius: 20rpx; - background: linear-gradient(90deg, rgba(252, 92, 105, 1) 0%, rgba(231, 48, 63, 1) 100%); + background: linear-gradient( + 90deg, + rgba(252, 92, 105, 1) 0%, + rgba(231, 48, 63, 1) 100% + ); } } } diff --git a/src/components/domesticMini.vue b/src/components/domesticMini.vue new file mode 100644 index 0000000..7f79897 --- /dev/null +++ b/src/components/domesticMini.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/components/mine.vue b/src/components/mine.vue index e0d23b1..8788d69 100644 --- a/src/components/mine.vue +++ b/src/components/mine.vue @@ -2,7 +2,10 @@ - + {{ !isLoginStatus @@ -33,30 +36,53 @@ - + }" + @click="handleClick(-1)" + > - + }" + @click="handleClick(0)" + > - + }" + @click="handleClick(1)" + > - + }" + @click="handleClick(2)" + > - - @@ -83,8 +107,12 @@ - + @@ -151,7 +179,6 @@ const loginOut = () => { uni.reLaunch({ url: "/pages/login/index", }); - }; const handleClick = (val: number) => { diff --git a/src/components/mineMini.vue b/src/components/mineMini.vue index 1771326..068aa17 100644 --- a/src/components/mineMini.vue +++ b/src/components/mineMini.vue @@ -3,7 +3,10 @@ - + {{ !isLoginStatus ? "未登录用户" : maskPhoneNumber() @@ -38,24 +41,41 @@ color: '#333333', }" @click="handleClick(-1)"> --> - + }" + @click="handleClick(0)" + > - + }" + @click="handleClick(1)" + > - + }" + @click="handleClick(2)" + > - - + }" + @click="handleClick(3)" + > @@ -88,8 +112,12 @@ - + @@ -99,9 +127,9 @@ import { onPullDownRefresh, onShow } from "@dcloudio/uni-app"; import { Session } from "@/utils/storage"; import LoginPopup from "@/components/loginPopup/index.vue"; import { useShareStore } from "@/stores/shareStore"; -import Navbar from '@/components/mini/Navbar.vue' +import Navbar from "@/components/mini/Navbar.vue"; -const emit = defineEmits(['logout']) +const emit = defineEmits(["logout"]); const stores = useShareStore(); const curPages = getCurrentPages(); @@ -161,23 +189,23 @@ const loginBtnStatus = () => { // 退出登录,回到登录页面 const loginOut = () => { - uni.clearStorageSync() - emit("logout") + uni.clearStorageSync(); + emit("logout"); }; const handleClick = (val: number) => { + uni.setStorageSync("homeTabIndex", 1); if (val === -1) { uni.navigateTo({ url: "/pages/subscribed/index", }); } else if (val === 3) { wx.openPrivacyContract({ - success: () => { }, // 打开成功 - fail: () => { }, // 打开失败 - complete: () => { }, + success: () => {}, // 打开成功 + fail: () => {}, // 打开失败 + complete: () => {}, }); - } - else { + } else { uni.navigateTo({ url: `/pages/bookmark/index?tabs=${val}`, }); diff --git a/src/components/mini/Tabbar.vue b/src/components/mini/Tabbar.vue index 3aaca59..3fd11db 100644 --- a/src/components/mini/Tabbar.vue +++ b/src/components/mini/Tabbar.vue @@ -1,35 +1,85 @@ diff --git a/src/pages/sreachReq/index.vue b/src/pages/sreachReq/index.vue index 5f34938..9e6c5d3 100644 --- a/src/pages/sreachReq/index.vue +++ b/src/pages/sreachReq/index.vue @@ -1,40 +1,78 @@ @@ -63,7 +104,6 @@ import LoginPopup from "@/components/loginPopup/index.vue"; import Pay from "@/components/pay/index.vue"; import { getNavHeight } from "@/utils/util"; - const articleList = ref([]); const finish = ref(false); const screenList = ref([]); @@ -99,7 +139,6 @@ const handleSub = async () => { item.needpay = false; } - return item; }); articleList.value = articleResult; @@ -141,14 +180,23 @@ const handleShowPay = (type) => { // 点击轮播图进入详情 const handleSwiperJump = (item: any) => { console.log("item ===>", item); - if (item.needpay) { - // 需要先弹出订阅的弹框 - handleShowPay(item.type); - } else { + if (uni.getStorageSync("token")) { uni.navigateTo({ url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`, }); + } else { + uni.navigateTo({ + 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) => { @@ -194,9 +242,11 @@ const getData = async () => { `$&` ); - item.title = item.title.replace(keyWord.value, '' + keyWord.value + ''); - console.log("🚀 ~ getData ~ item.title :", item.title) - + item.title = item.title.replace( + keyWord.value, + '' + keyWord.value + "" + ); + console.log("🚀 ~ getData ~ item.title :", item.title); item.MarkInRedContent = item.contentText && @@ -229,7 +279,7 @@ onShow(() => { .sreachcss { min-height: 100vh; background-color: #ffffff; - padding: 0 30rpx; + // padding: 0 30rpx; .sreach { display: flex; @@ -296,7 +346,6 @@ onShow(() => { } } - .custom-bav-bar { width: 100%; height: 88rpx; @@ -337,10 +386,9 @@ onShow(() => { font-family: PingFangSC, PingFang SC; font-weight: bold; font-size: 32rpx; - color: #D13E3C; + color: #d13e3c; line-height: 45rpx; text-align: right; font-style: normal; - flex: 1; } diff --git a/src/pages/subscribed/components/col.vue b/src/pages/subscribed/components/col.vue index 1d69730..7a01b5a 100644 --- a/src/pages/subscribed/components/col.vue +++ b/src/pages/subscribed/components/col.vue @@ -10,7 +10,12 @@ - + {{ item.name }} {{ item.desc }} @@ -38,7 +43,7 @@ const props = defineProps({ // 列表内容 data: { type: Object, - default: () => { }, + default: () => {}, }, }); @@ -53,7 +58,9 @@ const formatData = (data: any) => { if (data.indexOf(item.type) !== -1) { return { ...item, - validTime: formatTime(new Date().getTime() + 1000 * 60 * 60 * 24 * 30), + validTime: formatTime( + new Date().getTime() + 1000 * 60 * 60 * 24 * 30 + ), }; } }) @@ -135,7 +142,8 @@ const colList = ref([ align-items: center; position: relative; - .flashBack {} + .flashBack { + } .title { font-size: var(--h1-font-size);