1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js",null,"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwC3tB;AACA,gD,ihBAAA;eACA;AACA;AACA,wBADA,EADA;;AAIA,MAJA,kBAIA;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,EASA;AACA,yBAVA,EAUA;AACA,sBAXA;;AAaA,GAlBA;AAmBA,QAnBA,kBAmBA,EAnBA,EAmBA;AACA;AACA;AACA;AACA;AACA,GAxBA;AAyBA,QAzBA,oBAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA,KAPA,MAOA;AACA;AACA;AACA;AACA,GArCA;AAsCA;AACA,mBAvCA,6BAuCA,GAvCA,EAuCA;AACA;AACA;AACA,gBADA;;AAGA,GA5CA;AA6CA;AACA,iBA9CA,2BA8CA,GA9CA,EA8CA;AACA;AACA;AACA,gBADA;;AAGA,GAnDA;AAoDA;AACA;AACA,UAFA,kBAEA,GAFA,EAEA;AACA;AACA,uDADA;;AAGA,KANA;;AAQA;AACA,gBATA,0BASA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;;AAEA,KAjBA;AAkBA;AACA,aAnBA,qBAmBA,EAnBA,EAmBA;AACA;AACA,oBADA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OATA;AAUA,KAlCA;AAmCA;AACA,cApCA,sBAoCA,QApCA,EAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA7CA;;AA+CA,IA/CA,EA+CA;AACA;AACA,oBADA;AAEA,yBAFA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA,KAPA,MAOA;AACA;AACA;AACA;AACA;AACA;AACA,OALA;AAMA;;AAEA,GApEA,CApDA,E","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 && isLoading\">\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-play.png\" mode=\"widthFix\"></image>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 新闻概述 -->\r\n\t\t<view class=\"shop-summary news-summary\" v-if=\"isLoading\">\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>{{articleDetail.is_collected == 1?'已收藏':'收藏'}}</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\" v-if=\"isLoading\">\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,userInfoEv} 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\tcacheBusinessId:-1, //商户id\r\n\t\t\t\tisLoading:false,\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\tif(op.business_id){\r\n\t\t\t\tthis.cacheBusinessId = op.business_id;\r\n\t\t\t}\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tif(this.cacheBusinessId !== -1){\r\n\t\t\t\tthis.$requst.post('/api/index/change-business',{business_id:this.cacheBusinessId}).then(res=>{\r\n\t\t\t\t\tif(res.code == 0){\r\n\t\t\t\t\t\tthis.getDetail(this.id);\r\n\t\t\t\t\t\tuserInfoEv();\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}else{\r\n\t\t\t\tthis.getDetail(this.id);\r\n\t\t\t\tuserInfoEv();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 分享到微信\r\n\t\tonShareAppMessage(res) {\r\n\t\t\tlet path = uni.getStorageSync('page-path-options')+'&business_id='+uni.getStorageSync('business_id');\r\n\t\t\treturn {\r\n\t\t\t\tpath:path\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 分享到朋友圈\r\n\t\tonShareTimeline(res){\r\n\t\t\tlet path = uni.getStorageSync('page-path-options')+'&business_id='+uni.getStorageSync('business_id');\r\n\t\t\treturn {\r\n\t\t\t\tpath:path\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\t uni.navigateTo({\r\n\t\t\t\t\turl: `/pagesB/video/playVideo?src=${url}`\r\n\t\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\t\ttitle: '加载中'\r\n\t\t\t\t});\r\n\t\t\t\tthis.isLoading =false;\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\t// console.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.replace(/-/g,'/'))\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\tthis.isLoading =true;\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":""} |