1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/detail.vue?3111","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/detail.vue?f86a","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/detail.vue?72cb","webpack:///D:/鲁班家具小程序/luban-mall/pages/tabbar/news/detail.vue?0513","uni-app:///pages/tabbar/news/detail.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,oG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,eAAD,CAAV,C;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;;;AAGrD;AACuL;AACvL,gBAAgB,2LAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAusB,CAAgB,srBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4C3tB;AACA,gD,2iBAAA;;AAEA;AACA,wBADA,E;;AAGA,M,kBAAA;AACA;AACA,uGADA;AAEA,mDAFA;AAGA,sBAHA,EAGA;AACA,kBAJA,EAIA;AACA,uBALA,EAKA;AACA,YANA,EAMA;AACA,uBAPA,EAOA;AACA,cARA,EAQA;AACA,iBATA,CASA;AATA;AAWA,G;AACA,c;;;AAGA,Q,kBAAA,E,EAAA;AACA;AACA;AACA,G;AACA,mB,+BAAA;;AAEA,G;AACA,Q,oBAAA;AACA;AACA,G;;AAEA;;AAEA,C;;AAEA;;AAEA,C;;AAEA;AACA,Q,kBAAA,G,EAAA;AACA,iEADA,CACA;AACA;AACA;AACA;AACA,0BALA,CAKA;AACA,G;AACA;AACA,c,wBAAA,C,EAAA;AACA;AACA;AACA,6BAFA,CAEA;AACA;AACA,G;;AAEA;AACA,c,0BAAA;AACA;AACA;AACA;AACA,KAFA,MAEA;AACA;AACA;;AAEA,G;AACA;AACA,W,qBAAA,E,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARA;AASA,G;AACA;AACA,Y,sBAAA,Q,EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;AAEA,E,EAAA;AACA;AACA,kBADA;AAEA,uBAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,KALA;AAMA,GAPA,MAOA;AACA;AACA;AACA;AACA;AACA;AACA,KALA;AAMA;;AAEA,C","file":"pages/tabbar/news/detail.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/tabbar/news/detail.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./detail.vue?vue&type=template&id=5e083d15&\"\nvar renderjs\nimport script from \"./detail.vue?vue&type=script&lang=js&\"\nexport * from \"./detail.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/tabbar/news/detail.vue\"\nexport default component.exports","export * from \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=template&id=5e083d15&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../HBuilderX-app开发版/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./detail.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<status-nav :ifReturn=\"true\" navBarTitle=\"新闻详情\" :marginBottom=\"0\"></status-nav>\r\n\t\t<!-- 新闻视频 -->\r\n\t\t<view class=\"news-video-img\" v-if=\"articleDetail.video\">\r\n\t\t\t<image :src=\"articleDetail.cover\" mode=\"widthFix\"></image>\r\n\t\t\t<view class=\"news-video-btn\" @tap.stop=\"playEv(articleDetail.video)\">\r\n\t\t\t\t<image src=\"/static/public/icon-suspend.png\" mode=\"widthFix\" v-if=\"videoPlay\"></image>\r\n\t\t\t\t<image src=\"/static/public/icon-play.png\" mode=\"widthFix\" v-else></image>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 视频弹窗 -->\r\n\t\t<view class=\"news-video-content\" v-if=\"videoPlay\" :style=\"{width:newWidth+'px'}\"></view>\r\n\t\t<video id=\"my-video\" controls :src=\"articleDetail.video\" v-if=\"videoPlay\" @fullscreenchange=\"screenChange\" :style=\"{width:newWidth+'px'}\"></video>\r\n\t\t<!-- 新闻概述 -->\r\n\t\t<view class=\"shop-summary news-summary\">\r\n\t\t\t<view class=\"shop-title\">{{articleDetail.title}}</view>\r\n\t\t\t<view class=\"shop-txt news-txt flex\">\r\n\t\t\t\t<view class=\"left\">\r\n\t\t\t\t\t<view class=\"news-author\">作者:{{articleDetail.author}}</view>\r\n\t\t\t\t\t<view class=\"news-time\">发布时间:{{time}}</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"right flex\">\r\n\t\t\t\t\t<view class=\"collection-btn flex\" :class=\"articleDetail.is_collected == 1?'active':''\" @tap=\"collectionEv(articleDetail.id)\">\r\n\t\t\t\t\t\t<image src=\"/static/public/icon-collection.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t<text>收藏</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"share-btn flex\">\r\n\t\t\t\t\t\t<image src=\"/static/public/icon-share.png\" mode=\"widthFix\"></image>\r\n\t\t\t\t\t\t<text>分享</text>\r\n\t\t\t\t\t\t<button plain=\"true\" data-name=\"shareBtn\" open-type=\"share\"></button>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 新闻详情 -->\r\n\t\t<view class=\"shop-detail news-detail\">\r\n\t\t\t<rich-text :nodes=\"content\"></rich-text>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport statusNav from '@/components/status-navs/status-nav';\r\n\timport {getCartNum} from '@/jsFile/public-api.js';\r\n\timport { mapState } from 'vuex'//引入mapState\r\n\texport default {\r\n\t\tcomponents:{\r\n\t\t\tstatusNav\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tscrollHeight:uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50,\r\n\t\t\t\tnewWidth:uni.getSystemInfoSync().windowWidth,\r\n\t\t\t\tvideoPlay: false, //是否全屏\r\n\t\t\t\tvideoUrl:'', //视频url\r\n\t\t\t\tarticleDetail:{}, //文章详情\r\n\t\t\t\tid:'',//文章id\r\n\t\t\t\taction:'collect', //收藏类型\r\n\t\t\t\ttime:'', //发布时间\r\n\t\t\t\tcontent:'',//文章内容\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed:{\r\n\t\t\t\r\n\t\t},\r\n\t\tonLoad(op) {\r\n\t\t\tthis.id = op.id;\r\n\t\t\tthis.getDetail(this.id);\r\n\t\t},\r\n\t\tonShareAppMessage() {\r\n\t\t\t\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\t// getNewsDetail()\r\n\t\t},\r\n\t\t// 分享到微信\r\n\t\tonShareAppMessage() {\r\n\t\t\t\r\n\t\t},\r\n\t\t// 分享到朋友圈\r\n\t\tonShareTimeline(){\r\n\t\t\t\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 全屏播放\r\n\t\t\tplayEv(url){\r\n\t\t\t\tthis.videoContext = uni.createVideoContext(\"my-video\", this); // this这个是实例对象 必传\r\n\t\t\t\tthis.videoUrl = url;\r\n\t\t\t\tthis.videoContext.play();\r\n\t\t\t\tthis.videoContext.requestFullScreen({ direction: 90 });\r\n\t\t\t\tthis.videoPlay = true; // 显示播放盒子\r\n\t\t\t},\r\n\t\t\t// 退出全屏\r\n\t\t\tscreenChange(e) {\r\n\t\t\t if (e.detail.fullScreen) {\r\n\t\t\t //退出全屏\r\n\t\t\t this.videoPlay = false; // 隐藏播放盒子\r\n\t\t\t }\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//收藏\r\n\t\t\tcollectionEv(){\r\n\t\t\t\tconsole.log(this.shopDetail.collection,'是否分享')\r\n\t\t\t\tif(this.shopDetail.collection !== 0){\r\n\t\t\t\t\tthis.shopDetail.collection = 1\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.shopDetail.collection = 0\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t\t// 查询文章详情\r\n\t\t\tgetDetail(id){\r\n\t\t\t\tuni.showLoading();\r\n\t\t\t\tthis.$requst.post('/api/archives/detail',{id:id}).then(res=>{\r\n\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\tconsole.log(res,'文章详情')\r\n\t\t\t\t\t\tthis.articleDetail = res.data;\r\n\t\t\t\t\t\tthis.time = this.dateFormat(res.data.published_at)\r\n\t\t\t\t\t\tthis.content = this.$toolAll.tools.escape2Html(res.data.content)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\t// 时间格式转换\r\n\t\t\tdateFormat (dateData) {\r\n\t\t\t var date = new Date(dateData)\r\n\t\t\t var y = date.getFullYear()\r\n\t\t\t var m = date.getMonth() + 1\r\n\t\t\t m = m < 10 ? '0' + m : m\r\n\t\t\t var d = date.getDate()\r\n\t\t\t d = d < 10 ? '0' + d : d\r\n\t\t\t const time = y + '.' + m + '.' + d\r\n\t\t\t return time\r\n\t\t\t},\r\n\t\t\t//收藏\r\n\t\t\tcollectionEv(id){\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\tarchive_id:id,\r\n\t\t\t\t\taction:this.action\r\n\t\t\t\t}\r\n\t\t\t\tif(this.articleDetail.is_collected == 1){\r\n\t\t\t\t\tthis.$requst.post('/api/archives/un-record',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\t// this.$toolAll.tools.showToast('取消收藏成功');\r\n\t\t\t\t\t\t\tthis.getDetail(this.id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.$requst.post('/api/archives/record',params).then(res=>{\r\n\t\t\t\t\t\tif(res.code==0) {\r\n\t\t\t\t\t\t\t// this.$toolAll.tools.showToast('收藏成功');\r\n\t\t\t\t\t\t\tthis.getDetail(this.id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t\r\n</style>"],"sourceRoot":""} |