| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714 |
- <template>
- <div class="content">
- <div class="title-box">
- <div class="title">{{ infoObj.title }}</div>
- <div class="title-time">
- <p class="time">{{ infoObj.publish_time | globalTime }}</p>
- <p class="read-count">
- 阅读量
- {{
- Number(infoObj.base_read_count) + Number(infoObj.real_read_count)
- }}
- </p>
- </div>
- </div>
- <div class="video-box" v-if="infoObj.video_url">
- <video :src="infoObj.video_url" id="myVideo" controls="true"></video>
- </div>
- <!-- 企业研发投入补贴 -->
- <div class="card-input-content">
- <div class="card-input">
- <div class="card-title">{{ infoObj.project_name || '-'}}</div>
- <div class="table">
- <p class="table-item">
- <span>项目金额:</span>
- <span>{{ infoObj.project_money || '-' }}</span>
- </p>
- <p class="table-item">
- <span>申报时间:</span>
- <span
- >{{ infoObj.project_start_date || '-'}} 至
- {{ infoObj.project_end_date || '-' }}</span
- >
- </p>
- <p class="table-item">
- <span>申报状态:</span>
- <span v-if="infoObj.project_end_date">剩
- {{
- Math.floor(new Date(new Date(infoObj.project_end_date).getTime() -new Date().getTime()).getTime() / (1 * 24 * 60 * 60 * 1000)) + 1 >= 1 ?
- Math.floor(new Date(new Date(infoObj.project_end_date).getTime() -new Date().getTime()).getTime() / (1 * 24 * 60 * 60 * 1000)) + 1 : 0
- }}
- 天</span>
- <span v-else>长期可申报</span>
- </p>
- </div>
- </div>
- </div>
- <!-- 项目概况 -->
- <div class="card-situation" v-if="infoObj.project_desc">
- <div class="card-title">项目概况</div>
- <p>
- {{ infoObj.project_desc || '-'}}
- </p>
- </div>
- <!-- <div class="card-group" v-for="(item, idx) in model" :key="idx">
- <policy-deatil-card :model="item" :isMar="idx == model.length - 1"></policy-deatil-card>
- </div> -->
- <div class="card-group">
- <div class="content-basic">
- <div class="card-title">基本信息</div>
- <div class="item-list">
- <div class="term">
- <div class="term-name">项目名称:</div>
- <div class="term-value-group">
- <p class="term-value-item">{{ infoObj.project_name || '-'}}</p>
- </div>
- </div>
- <div class="term">
- <div class="term-name">受理部门:</div>
- <div class="term-value-group">
- <p class="term-value-item">{{ infoObj.sponsor_name || '-'}}</p>
- </div>
- </div>
- <div class="term">
- <div class="term-name">政策层级:</div>
- <div class="term-value-group">
- <p class="term-value-item">{{ infoObj.level }}</p>
- </div>
- </div>
- <div class="term">
- <div class="term-name">信息提供日期:</div>
- <div class="term-value-group">
- <p class="term-value-item">
- {{ infoObj.publish_time | globalTime }}
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="card-group">
- <div class="content-basic">
- <div class="card-title">支持力度</div>
- <div class="item-list">
- <div class="term">
- <div class="term-name">支持金额:</div>
- <div class="term-value-group">
- <p class="term-value-item">{{ infoObj.project_money || '-'}}</p>
- </div>
- </div>
- <div class="term">
- <div class="term-name">资助标准:</div>
- <div class="term-value-group">
- <!-- <p class="term-value-item" v-html="infoObj.lidu"></p> -->
- <u-parse :content="infoObj.lidu" @navigate="navigateUrl" />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="content-rich" :class="{ 'margin-bottom-80': false }">
- <div class="card-title">{{ textModel1.title }}</div>
- <div class="item-list">
- <div class="term">
- <div class="term-value-group">
- <!-- <p class="term-value-item" v-html="textModel1.text"></p> -->
- <u-parse :content="textModel1.text" @navigate="navigateUrl" />
- </div>
- </div>
- </div>
- </div>
- <div class="content-rich" :class="{ 'margin-bottom-80': false }">
- <div class="card-title">{{ textModel2.title }}</div>
- <div class="item-list">
- <div class="term">
- <div class="term-value-group">
- <!-- <p class="term-value-item" v-html="textModel2.text"></p> -->
- <u-parse :content="textModel2.text" @navigate="navigateUrl" />
- </div>
- </div>
- </div>
- </div>
- <div class="content-rich" :class="{ 'margin-bottom-80': false }">
- <div class="card-title">{{ textModel3.title }}</div>
- <div class="item-list">
- <div class="term">
- <div class="term-value-group">
- <!-- <p class="term-value-item" v-html="textModel3.text"></p> -->
- <u-parse :content="textModel3.text" @navigate="navigateUrl" />
- </div>
- </div>
- </div>
- </div>
- <div class="content-rich" :class="{ 'margin-bottom-80': false }" style="margin-bottom: 90rpx;">
- <div class="card-title">联系方式</div>
- <div class="item-list">
- <div class="term">
- <div class="term-value-group">
- <p class="term-value-item">{{ infoObj.contact || '-'}}</p>
- </div>
- </div>
- </div>
- </div>
- <div style="width: 100%">
- <footer-share
- style="width: 100%"
- :isCollection="true"
- :isCollectedIcon="infoObj.if_collect"
- @collectionPages="collectionPage"
- @sharePages="sharePage"
- ></footer-share>
- </div>
- </div>
- </template>
- <script>
- import policy_deatil_card from "./policy_deatil_card";
- import policy_rich_card from "./policy_rich_card";
- import md5 from "@/common/md5.js";
- import uParse from '@/components/gaoyia-parse/parse.vue'
- export default {
- components: {
- policyDeatilCard: policy_deatil_card,
- policyRichCard: policy_rich_card,
- uParse
- },
- data() {
- return {
- model: [],
- levelList: {
- 1: "省级政策",
- 2: "市级政策",
- 3: "新区政策",
- 4: "新城政策",
- },
- id: "",
- pageId:'',
- textModel1: {
- title: "申报条件",
- text: "",
- },
- textModel2: {
- title: "申报材料",
- text: "",
- },
- textModel3: {
- title: "申报途径",
- text: "",
- },
- // textModel4: {
- // title: "联系方式",
- // text: "",
- // },
- scrollTop: 0,
- infoObj: {},
- };
- },
- onLoad(option) {
- this.pageId = option.id;
- // this.getDetailInfo(id);
- this.getUserAuth();
- },
- onShow() {
- this.getDetailInfo(this.pageId);
- },
- methods: {
- goAuthPage(){
- uni.navigateTo({
- url:'../auth/index'
- })
- },
- getUserAuth(){
- let md5Sign = md5("method="+'user'+"×tamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
- let url = getApp().globalData.shareUrl+'api/api.php'+'?method=user&action=info_by_openid×tamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
- uni.request({
- url:url,
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- openId:getApp().globalData.open_id
- },
- success: (res) => {
- if(res.data.code === 200){
- res.data.data.nickname ? getApp().globalData.user_name = res.data.data.nickname :getApp().globalData.user_name = ''
- }
- },
- fail: () => {
- console.log("连接失败");
- }
- });
- },
- getDetailInfo(ids) {
- let md5Sign = md5(
- "method=" +
- "common" +
- "×tamp=" +
- getApp().globalData.globalTimestamp +
- "&secret=" +
- getApp().globalData.secret
- );
- let url =
- getApp().globalData.shareUrl +
- "api/api.php" +
- "?method=common&source=policy&action=info_by_id×tamp=" +
- getApp().globalData.globalTimestamp +
- "&sign=" +
- md5Sign;
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: {
- id: ids,
- openId: getApp().globalData.open_id,
- },
- success: (res) => {
- if (res.data.code === 200) {
- if (res.data.data.video_url) {
- res.data.data.video_url =
- getApp().globalData.shareUrl + res.data.data.video_url;
- }
- res.data.data.level = this.levelList[res.data.data.level];
- this.infoObj = res.data.data;
- this.getRich1(ids);
- this.getRich2(ids);
- this.getRich3(ids);
- this.getRich4(ids);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- getRich1(ids) {
- uni.request({
- url: `https://kiq.xazhima.com/content/policy/${Math.floor(
- ids / 1000
- )}/${ids}_1.html`,
- method: "GET",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- success: (res) => {
- if (res.statusCode === 200) {
- this.$set(this.infoObj, "lidu", res.data);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- getRich2(ids) {
- uni.request({
- url: `https://kiq.xazhima.com/content/policy/${Math.floor(
- ids / 1000
- )}/${ids}_2.html`,
- method: "GET",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- success: (res) => {
- if (res.statusCode === 200) {
- this.$set(this.textModel1, "text", res.data);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- // previewUrl(src, e) {
- // console.log(src)
- // // do something
- // },
- navigateUrl(href, e) {
- uni.setClipboardData({
- data:href,//要被复制的内容
- success:()=>{//复制成功的回调函数
- uni.showToast({//提示
- title:'复制成功'
- })
- }
- });
- },
- getRich3(ids) {
- uni.request({
- url: `https://kiq.xazhima.com/content/policy/${Math.floor(
- ids / 1000
- )}/${ids}_3.html`,
- method: "GET",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- success: (res) => {
- if (res.statusCode === 200) {
- this.$set(this.textModel2, "text", res.data);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- getRich4(ids) {
- uni.request({
- url: `https://kiq.xazhima.com/content/policy/${Math.floor(
- ids / 1000
- )}/${ids}_4.html`,
- method: "GET",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- success: (res) => {
- if (res.statusCode === 200) {
- this.$set(this.textModel3, "text", res.data);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- collectionPage() {
- if(!getApp().globalData.user_name){
- this.goAuthPage();
- return
- }
- let md5Sign = md5(
- "method=" +
- "user" +
- "×tamp=" +
- getApp().globalData.globalTimestamp +
- "&secret=" +
- getApp().globalData.secret
- );
- let url =
- getApp().globalData.shareUrl +
- "api/api.php" +
- "?method=user&source=policy&action=collect_add×tamp=" +
- getApp().globalData.globalTimestamp +
- "&sign=" +
- md5Sign;
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: {
- openId: getApp().globalData.open_id,
- source: "policy",
- source_name: "政策",
- source_id: this.infoObj.id,
- source_title: this.infoObj.title,
- },
- success: (res) => {
- if (res.data.code === 200) {
- res.data.data
- ? (this.infoObj.if_collect = true)
- : (this.infoObj.if_collect = false);
- this.$forceUpdate();
- uni.showToast({
- duration: 3000,
- title: res.data.msg,
- icon: "none",
- });
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- shareRequest() {
- let md5Sign = md5(
- "method=" +
- "user" +
- "×tamp=" +
- getApp().globalData.globalTimestamp +
- "&secret=" +
- getApp().globalData.secret
- );
- let url =
- getApp().globalData.shareUrl +
- "api/api.php" +
- "?method=user&source=policy&action=repost×tamp=" +
- getApp().globalData.globalTimestamp +
- "&sign=" +
- md5Sign;
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: {
- openId: getApp().globalData.open_id,
- source_id: this.infoObj.id,
- source: "policy",
- },
- success: (res) => {
- if (res.data.code === 200) {
- console.log(res);
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- sharePage() {
- let that = this;
- uni.showShareMenu({
- title: that.infoObj.title,
- path: "pages/policy/policy_detail?id=" + that.infoObj.id,
- success(res) {
- that.shareRequest();
- },
- });
- // if(!getApp().globalData.user_phone){
- // that.goAuthPage();
- // }else {
- // // uni.showShareMenu({
- // // title: that.infoObj.title,
- // // path: "pages/policy/policy_detail?id=" + that.infoObj.id,
- // // success(res) {
- // // that.shareRequest();
- // // },
- // // });
- // }
- },
- changeScroll(height) {
- //点的时候触发这个函数 height 是之前的高度
- uni.pageScrollTo({
- scrollTop: this.scrollTop,
- duration: 0,
- });
- },
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- };
- </script>
- <style lang="scss" scoped>
- * {
- box-sizing: border-box;
- }
- .footer-share-box {
- margin-left: -20rpx;
- }
- .content {
- margin-top: 20rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 20rpx;
- height: auto;
- .title-box {
- width: 100%;
- display: flex;
- flex-direction: column;
- padding-bottom: 10rpx;
- margin-left: 30rpx;
- .title {
- letter-spacing: 5rpx;
- font-size: 35rpx;
- font-weight: 500;
- }
- .title-time {
- display: flex;
- font-size: 24rpx;
- color: $uni-text-color-grey;
- margin-top: 20rpx;
- .time {
- margin-right: 100rpx;
- }
- }
- }
- .video-box {
- width: 100%;
- // image {
- // width: 100%;
- // height: 400rpx;
- // border-radius: 32rpx;
- // }
- }
- #myVideo {
- width: 100%;
- border-radius: 10rpx;
- }
- .card-input-content {
- width: 100%;
- margin-top: 20rpx;
- .card-input {
- padding: 30rpx 30rpx;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- .card-title {
- font-weight: 600;
- padding: 20rpx 20rpx 0rpx 20rpx;
- }
- .table {
- border-radius: 32rpx;
- background-color: #f2f2f2;
- margin-top: 20rpx;
- display: flex;
- padding: 0 20rpx;
- flex-direction: column;
- .table-item {
- box-sizing: border-box;
- width: 100%;
- margin: 20rpx 0;
- font-size: 28rpx;
- font-weight: 300;
- display: flex;
- justify-content: space-between;
- }
- }
- }
- }
- .card-situation {
- margin-top: 20rpx;
- padding: 20rpx;
- border-top: 8rpx solid #f2f2f2;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- .card-title {
- font-weight: 600;
- padding: 20rpx 20rpx 0rpx 20rpx;
- }
- p {
- padding: 20rpx;
- margin-top: 20rpx;
- font-size: 28rpx;
- letter-spacing: 1rpx;
- line-height: 50rpx;
- }
- }
- .card-group {
- width: 100%;
- }
- .share-collection {
- background-color: #ffffff;
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .share,
- .collection {
- width: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- }
- .share {
- border-right: 1px solid $uni-border-color;
- }
- image {
- width: 50rpx;
- height: 50rpx;
- margin-left: 40rpx;
- }
- }
- .content-basic {
- box-sizing: border-box;
- margin-top: 20rpx;
- padding: 20rpx;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- width: 100%;
- display: flex;
- flex-direction: column;
- // margin-bottom: 80rpx;
- .card-title {
- padding: 20rpx 20rpx 0rpx 20rpx;
- font-weight: 600;
- }
- .item-list {
- margin-left: 20rpx;
- display: flex;
- flex-direction: column;
- .term {
- display: flex;
- padding: 20rpx;
- .term-name {
- font-size: 28rpx;
- width: 30%;
- display: flex;
- margin: 20rpx;
- color: #7f7f7f;
- }
- .term-value-group {
- flex: 1;
- display: flex;
- flex-direction: column;
- font-size: 28rpx;
- .term-value-item {
- margin: 20rpx;
- }
- }
- }
- }
- }
- .content-rich {
- box-sizing: border-box;
- margin-top: 20rpx;
- padding: 20rpx;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- width: 100%;
- display: flex;
- flex-direction: column;
- // margin-bottom: 80rpx;
- .card-title {
- padding: 20rpx 20rpx 0rpx 20rpx;
- font-weight: 600;
- }
- .item-list {
- margin-left: 20rpx;
- display: flex;
- flex-direction: column;
- .term {
- display: flex;
- padding: 20rpx;
- .term-name {
- font-size: 28rpx;
- width: 30%;
- display: flex;
- margin: 20rpx;
- color: #7f7f7f;
- }
- .term-value-group {
- flex: 1;
- display: flex;
- flex-direction: column;
- font-size: 28rpx;
- .term-value-item {
- margin: 20rpx;
- }
- }
- }
- }
- }
- .margin-bottom-80 {
- margin-bottom: 80rpx;
- }
- }
- </style>
|