feat(login): 添加隐私政策点击事件处理
refactor: 移除mock数据引用并优化代码格式 style: 统一代码缩进和换行格式
This commit is contained in:
parent
b3cd7aff28
commit
13e67b8aa9
|
|
@ -24,7 +24,11 @@
|
||||||
<image :src="props.data.picture" mode="widthFix" />
|
<image :src="props.data.picture" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="articleDes" :class="props?.data?.needpay && 'needpay'" v-html="props.data.content">
|
<view
|
||||||
|
class="articleDes"
|
||||||
|
:class="props?.data?.needpay && 'needpay'"
|
||||||
|
v-html="props.data.content"
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -38,12 +42,12 @@ import {
|
||||||
onShareAppMessage,
|
onShareAppMessage,
|
||||||
onShareTimeline,
|
onShareTimeline,
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
import articleMock from "@/mock/article.js";
|
// import articleMock from "@/mock/article.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,31 @@
|
||||||
|
|
||||||
<!-- 两个标签 start -->
|
<!-- 两个标签 start -->
|
||||||
<view class="r_r_tags">
|
<view class="r_r_tags">
|
||||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw">
|
<view
|
||||||
|
style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw"
|
||||||
|
>
|
||||||
<view class="r_tags">
|
<view class="r_tags">
|
||||||
<view class="tag" style="background-color: #fff9ec; color: #ffb100"
|
<view
|
||||||
v-for="(item, index) in props.data.conceptLabels" :key="index">{{ item }}</view>
|
class="tag"
|
||||||
|
style="background-color: #fff9ec; color: #ffb100"
|
||||||
|
v-for="(item, index) in props.data.conceptLabels"
|
||||||
|
:key="index"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw">
|
<view
|
||||||
|
style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw"
|
||||||
|
>
|
||||||
<view class="r_tags">
|
<view class="r_tags">
|
||||||
<view class="tag" style="background-color: #f5f8fe; color: #007aff"
|
<view
|
||||||
v-for="(item, index) in props.data.industryLabels" :key="index">{{ item }}</view>
|
class="tag"
|
||||||
|
style="background-color: #f5f8fe; color: #007aff"
|
||||||
|
v-for="(item, index) in props.data.industryLabels"
|
||||||
|
:key="index"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -42,15 +56,17 @@
|
||||||
<image :src="props.data.picture" mode="widthFix" />
|
<image :src="props.data.picture" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="padding: 35rpx;">
|
<view style="padding: 35rpx">
|
||||||
|
|
||||||
<!-- <text class="articleDes" :class="props?.data?.needpay && 'needpay'" style="white-space: pre-wrap;"
|
<!-- <text class="articleDes" :class="props?.data?.needpay && 'needpay'" style="white-space: pre-wrap;"
|
||||||
v-html="props.data.content">
|
v-html="props.data.content">
|
||||||
</text> -->
|
</text> -->
|
||||||
|
|
||||||
<rich-text class="articleDes" :class="props?.data?.needpay && 'needpay'" style="white-space: pre-wrap;"
|
<rich-text
|
||||||
v-html="props.data.content"></rich-text>
|
class="articleDes"
|
||||||
|
:class="props?.data?.needpay && 'needpay'"
|
||||||
|
style="white-space: pre-wrap"
|
||||||
|
v-html="props.data.content"
|
||||||
|
></rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view
|
<!-- <view
|
||||||
|
|
@ -71,12 +87,12 @@ import {
|
||||||
onShareAppMessage,
|
onShareAppMessage,
|
||||||
onShareTimeline,
|
onShareTimeline,
|
||||||
} from "@dcloudio/uni-app";
|
} from "@dcloudio/uni-app";
|
||||||
import articleMock from "@/mock/article.js";
|
// import articleMock from "@/mock/article.js";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const tagList1 = ref([
|
const tagList1 = ref([
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<view class="tips">
|
<view class="tips">
|
||||||
<u-checkbox class="checkbox" shape="circle"></u-checkbox>
|
<u-checkbox class="checkbox" shape="circle"></u-checkbox>
|
||||||
<text class="r_userAgreement"
|
<text class="r_userAgreement"
|
||||||
>已阅读并同意<text class="userAgreement"
|
>已阅读并同意<text class="userAgreement" @click="goUserAgreement"
|
||||||
>《江南农商银行隐私政策》《中证参考智能资讯小程序服务使用许可及服务协议》</text
|
>《江南农商银行隐私政策》《中证参考智能资讯小程序服务使用许可及服务协议》</text
|
||||||
>,首次登录的手机号将自动注册。</text
|
>,首次登录的手机号将自动注册。</text
|
||||||
>
|
>
|
||||||
|
|
@ -68,6 +68,14 @@ onLoad((option) => {
|
||||||
// }, 2000)
|
// }, 2000)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function goUserAgreement() {
|
||||||
|
wx.openPrivacyContract({
|
||||||
|
success: () => {}, // 打开成功
|
||||||
|
fail: () => {}, // 打开失败
|
||||||
|
complete: () => {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 当离开页面时
|
// 当离开页面时
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
clearTimeout(timer.value);
|
clearTimeout(timer.value);
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,22 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bannerContainer">
|
<view class="bannerContainer">
|
||||||
<u-swiper :list="bannerList" keyName="image" class="banner" radius="10" autoPlay interval="5000"
|
<u-swiper
|
||||||
img-mode="heightFix"></u-swiper>
|
:list="bannerList"
|
||||||
|
keyName="image"
|
||||||
|
class="banner"
|
||||||
|
radius="10"
|
||||||
|
autoPlay
|
||||||
|
interval="5000"
|
||||||
|
img-mode="heightFix"
|
||||||
|
></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="subscribe" v-show="subShow">
|
<view class="subscribe" v-show="subShow">
|
||||||
<view class="subTitle">订阅「要闻」,解锁全部资讯</view>
|
<view class="subTitle">订阅「要闻」,解锁全部资讯</view>
|
||||||
<view class="subBtn" @click="show = true">立即解锁 ¥ <text class="price">25</text>/月</view>
|
<view class="subBtn" @click="show = true"
|
||||||
|
>立即解锁 ¥ <text class="price">25</text>/月</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 文章列表 -->
|
<!-- 文章列表 -->
|
||||||
|
|
@ -32,7 +41,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 全部解锁 -->
|
<!-- 全部解锁 -->
|
||||||
<Pay :isShow="false" :show="show" @onClick="handleClick" @handleSub="handleSub" />
|
<Pay
|
||||||
|
:isShow="false"
|
||||||
|
:show="show"
|
||||||
|
@onClick="handleClick"
|
||||||
|
@handleSub="handleSub"
|
||||||
|
/>
|
||||||
<!-- 单篇解锁 -->
|
<!-- 单篇解锁 -->
|
||||||
<Pay :show="Newsshow" @onClick="handleClose" @handleSub="handleNewsSub" />
|
<Pay :show="Newsshow" @onClick="handleClose" @handleSub="handleNewsSub" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -44,7 +58,7 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||||
import List from "@/components/articleList/index.vue";
|
import List from "@/components/articleList/index.vue";
|
||||||
import Pay from "@/components/pay/index.vue";
|
import Pay from "@/components/pay/index.vue";
|
||||||
import articleListMock from "@/mock/articleList.js";
|
import articleListMock from "@/mock/articleList.js";
|
||||||
import { newsList } from "@/mock/list.js";
|
// import { newsList } from "@/mock/list.js";
|
||||||
|
|
||||||
const articleList = ref([...articleListMock]);
|
const articleList = ref([...articleListMock]);
|
||||||
|
|
||||||
|
|
@ -88,8 +102,7 @@ function back() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {});
|
||||||
});
|
|
||||||
|
|
||||||
function handleSubListItem(id: any) {
|
function handleSubListItem(id: any) {
|
||||||
uni.setStorageSync("newsItem", id);
|
uni.setStorageSync("newsItem", id);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue