提交 6b2e7ef5 authored 作者: Soup's avatar Soup

Initial commit

上级
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="less">
@import './common/uni.css';
/*每个页面公共css */
::-webkit-scrollbar:horizontal {
height: 0px;
}
::webkit-scrollbar {
display: none;
}
</style>
import {ajax,requestPath} from '../request.js'
export function getSubjectAPI (params) {
return ajax({
url: `${requestPath.resource}/ebookMainBody/list`,
method: 'get'
})
}
//获取上新
export function getNewsAPI (params) {
return ajax({
url: `${requestPath.resource}/ebook/index?oid=${params}`,
method: 'get'
})
}
//根据主体获取年份
export function getYearAPI (params) {
return ajax({
url: `${requestPath.resource}/ebookMainBody/year?oid=${params}`,
method: 'get'
})
}
//获取杂志列表
export function getListAPI (params) {
return ajax({
url: `${requestPath.resource}/ebook/page-book`,
method: 'get',
data:params
})
}
//获取电子杂志的详情
export function getEbookAPI (params) {
return ajax({
url: `${requestPath.resource}/ebook/get?id=${params}`,
method: 'get'
})
}
//热搜词
export function gethotsAPI (params) {
return ajax({
url: `${requestPath.sysuser}/hotsw/list?num=10`,
method: 'get'
})
}
//获取文章详情
export function getArticleAPI (params) {
return ajax({
url: `${requestPath.resource}/article-library/get/${params}`,
method: 'get'
})
}
\ No newline at end of file
export default [{
"id": "1",
"pdImg": "http://www.mescroll.com/demo/res/img/pd1.jpg",
"pdName": "【1】 六罐装荷兰美素佳儿金装2段900g",
"pdPrice": 1149.00,
"pdSold": 648
}, {
"id": "2",
"pdImg": "http://www.mescroll.com/demo/res/img/pd2.jpg",
"pdName": "【2】 韩国Amore爱茉莉红吕洗发水套装修复受损发质",
"pdPrice": 89.00,
"pdSold": 128
}, {
"id": "3",
"pdImg": "http://www.mescroll.com/demo/res/img/pd3.jpg",
"pdName": "【3】 Friso美素佳儿 金装婴儿配方奶粉3段900g",
"pdPrice": 195.00,
"pdSold": 968
}, {
"id": "4",
"pdImg": "http://www.mescroll.com/demo/res/img/pd4.jpg",
"pdName": "【4】 Fisher pdPrice费雪 费雪三轮儿童滑行车",
"pdPrice": 299.00,
"pdSold": 85
}, {
"id": "5",
"pdImg": "http://www.mescroll.com/demo/res/img/pd5.jpg",
"pdName": "【5】 Babylee巴布力 实木婴儿床 雷卡拉130*70cm",
"pdPrice": 1889.00,
"pdSold": 18
}, {
"id": "6",
"pdImg": "http://www.mescroll.com/demo/res/img/pd6.jpg",
"pdName": "【6】 Pigeon贝亲 独立三层奶粉盒 送小罐奶粉1段200g",
"pdPrice": 70.00,
"pdSold": 658
}, {
"id": "7",
"pdImg": "http://www.mescroll.com/demo/res/img/pd7.jpg",
"pdName": "【7】 TTBOO兔兔小布 肩纽扣套装",
"pdPrice": 268.00,
"pdSold": 128
}, {
"id": "8",
"pdImg": "http://www.mescroll.com/demo/res/img/pd8.jpg",
"pdName": "【8】 Nuna璐拉 婴儿布里奇果精纯嫩肤沐浴露婴儿精纯芦荟胶",
"pdPrice": 140.00,
"pdSold": 366
}, {
"id": "9",
"pdImg": "http://www.mescroll.com/demo/res/img/pd9.jpg",
"pdName": "【9】 illuma启赋 奶粉3段900g",
"pdPrice": 252.00,
"pdSold": 98
}, {
"id": "10",
"pdImg": "http://www.mescroll.com/demo/res/img/pd10.jpg",
"pdName": "【10】 Abbott雅培乳蛋白部分水解婴儿配方奶粉3段820g",
"pdPrice": 89.00,
"pdSold": 128
}, {
"id": "11",
"pdImg": "http://www.mescroll.com/demo/res/img/pd11.jpg",
"pdName": "【11】 韩蜜 酷炫唇蜜(礼盒套装)2.8g*4",
"pdPrice": 179.00,
"pdSold": 35
}, {
"id": "12",
"pdImg": "http://www.mescroll.com/demo/res/img/pd12.jpg",
"pdName": "【12】 保税区直发【3包装】日本Merries花王纸尿裤NB90",
"pdPrice": 289.00,
"pdSold": 1928
}, {
"id": "13",
"pdImg": "http://www.mescroll.com/demo/res/img/pd13.jpg",
"pdName": "【13】 Comotomo可么多么 硅胶奶瓶(0-3月奶嘴)150ml绿色",
"pdPrice": 203.00,
"pdSold": 87
}, {
"id": "14",
"pdImg": "http://www.mescroll.com/demo/res/img/pd14.jpg",
"pdName": "【14】 香港直邮德国瑞德露Rival de Loop芦荟精华安瓶",
"pdPrice": 152.00,
"pdSold": 61
}, {
"id": "15",
"pdImg": "http://www.mescroll.com/demo/res/img/pd15.jpg",
"pdName": "【15】 保税区直发药师堂尊马油香草味温和保湿无刺激面霜",
"pdPrice": 269.00,
"pdSold": 73
}, {
"id": "16",
"pdImg": "http://www.mescroll.com/demo/res/img/pd16.jpg",
"pdName": "【16】 香港直邮日本Spatreatment眼膜保湿去细纹法令纹",
"pdPrice": 219.00,
"pdSold": 13
}, {
"id": "17",
"pdImg": "http://www.mescroll.com/demo/res/img/pd17.jpg",
"pdName": "【17】 韩国MEDIHEALNMF可莱丝针剂睡眠面膜",
"pdPrice": 81.00,
"pdSold": 128
}, {
"id": "18",
"pdImg": "http://www.mescroll.com/demo/res/img/pd18.jpg",
"pdName": "【18】 DHC蝶翠诗橄榄蜂蜜滋养洗脸手工皂90g",
"pdPrice": 123.00,
"pdSold": 77
}, {
"id": "19",
"pdImg": "http://www.mescroll.com/demo/res/img/pd19.jpg",
"pdName": "【19】 日本资生堂CPB肌肤之钥新版隔离霜 清爽型 30ml",
"pdPrice": 429.00,
"pdSold": 36
}, {
"id": "20",
"pdImg": "http://www.mescroll.com/demo/res/img/pd20.jpg",
"pdName": "【20】 Heinz亨氏 婴儿面条优加面条全素套餐组合3口味3盒",
"pdPrice": 39.00,
"pdSold": 61
}, {
"id": "21",
"pdImg": "http://www.mescroll.com/demo/res/img/pd21.jpg",
"pdName": "【21】 Heinz亨氏 乐维滋果汁泥组合5口味15袋",
"pdPrice": 69.00,
"pdSold": 55
}, {
"id": "22",
"pdImg": "http://www.mescroll.com/demo/res/img/pd22.jpg",
"pdName": "【22】 保税区直发澳大利亚Swisse高浓度蔓越莓胶囊30粒",
"pdPrice": 271.00,
"pdSold": 19
}, {
"id": "23",
"pdImg": "http://www.mescroll.com/demo/res/img/pd23.jpg",
"pdName": "【23】 挪威Nordic Naturals小鱼婴幼儿鱼油DHA滴剂",
"pdPrice": 102.00,
"pdSold": 125
}, {
"id": "24",
"pdImg": "http://www.mescroll.com/demo/res/img/pd24.jpg",
"pdName": "【24】 澳大利亚Bio island DHA for Pregnancy海藻油DHA",
"pdPrice": 289.00,
"pdSold": 28
}, {
"id": "25",
"pdImg": "http://www.mescroll.com/demo/res/img/pd25.jpg",
"pdName": "【25】 澳大利亚Fatblaster Coconut Detox椰子水",
"pdPrice": 152.00,
"pdSold": 17
}, {
"id": "26",
"pdImg": "http://www.mescroll.com/demo/res/img/pd26.jpg",
"pdName": "【26】 Suitsky舒比奇 高护极薄舒爽纸尿片尿不湿XL60",
"pdPrice": 99.00,
"pdSold": 181
}, {
"id": "27",
"pdImg": "http://www.mescroll.com/demo/res/img/pd27.jpg",
"pdName": "【27】 英国JUST SOAP手工皂 玫瑰天竺葵蛋糕皂",
"pdPrice": 72.00,
"pdSold": 66
}, {
"id": "28",
"pdImg": "http://www.mescroll.com/demo/res/img/pd28.jpg",
"pdName": "【28】 德国NUK 多色婴幼儿带盖学饮杯",
"pdPrice": 92.00,
"pdSold": 138
}]
差异被折叠。
# mescroll-uni
## mescroll-uni : 支持uni-app的下拉刷新和上拉加载组件
## http://www.mescroll.com
1. mescroll-uni 是用在uni-app的下拉刷新和上拉加载的组件, 支持一套代码编译到iOS、Android、H5、小程序等多个平台
2. mescroll-uni 采用的是uni官方推荐的新框架编译模式 : <a href="https://ask.dcloud.net.cn/article/35843" target="_blank">自定义组件模式</a>, 实现了更高的性能及更多的 Vue 语法支持
3. mescroll-uni 继承了mescroll.js的实用功能: 自动处理分页, 自动控制无数据, 空布局提示, 回到顶部按钮 ..
4. mescroll-uni 丰富的案例, 自由灵活的api, 超详细的注释, 可让您快速自定义真正属于自己的下拉上拉组件
## 快速入门 :
#### <a href="http://www.mescroll.com/uni.html" target="_blank">点此查看mescroll官方文档, 排版清晰, 更新及时...</a>
#### 1. 配置 manifest.json 的编译模式为 自定义组件模式 <a href="https://ask.dcloud.net.cn/article/35843" target="_blank">(uni官方配置说明)</a> :
```
// manifest.json (在您uni项目的根目录)
{
// ...
/* App平台特有配置 */
"app-plus": {
"usingComponents":true // true表示新的`自定义组件模式` ,否则为`template模板模式`
}
/* 微信小程序特有配置 */
"mp-weixin": {
"usingComponents":true // true表示新的`自定义组件模式`,否则为`template模板模式`
}
}
```
#### 2. 安装mescroll-uni . 运行 npm 命令 :
```
npm install --save mescroll-uni //不要使用cnpm安装, 因为更新下来有可能是旧的版本
详细步骤:
1.安装 node.js
2.打开命令提示符,定位到uni项目根目录
3.输入 npm install --save mescroll-uni 回车即可
```
( 您也可以下载mescroll-uni案例, 把components目录下的mescroll-uni拷贝到自己的项目, 但还是推荐npm命令安装, 方便更新mescroll-uni的版本 )
#### 3. 配置 pages.json :
```
{
"path" : "pages/xxx/xxx", // 只配置使用mescroll-uni的页面
"style" : {
"navigationBarTitleText" : "xxx",
"enablePullDownRefresh" : false, // 不开启下拉刷新, 默认就是false
"onReachBottomDistance" : 100, // 页面上拉触底事件触发时距页面底部距离, 默认 50
"app-plus" : {
"bounce" : "none" // 取消iOS回弹,避免和下拉刷新冲突 (小程序无法取消)
}
}
}
```
#### 4. 在具体页面中的示例 :
```
<template>
<mescroll-uni :down="downOption" @down="downCallback" :up="upOption" @up="upCallback" @init="mescrollInit">
<!-- <view> @down, @up, @init 必须配置 </view> -->
<!-- <view> :down, :up, 可省略 </view> -->
<!-- <view v-for="data in dataList"> 数据列表... </view> -->
</mescroll-uni>
<template>
<script>
// 引入mescroll-uni组件
import MescrollUni from "mescroll-uni/mescroll-uni.vue";
export default {
components: {
MescrollUni
},
data() {
return {
mescroll: null, //mescroll实例对象
// 下拉刷新的配置
downOption: {
use: true, // 是否启用下拉刷新; 默认true
auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
},
// 上拉加载的配置
upOption: {
use: true, // 是否启用上拉加载; 默认true
auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
isLock: false, // 是否锁定上拉加载 (可用于不触发upCallback,只保留回到顶部按钮的场景)
page: {
num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
size: 10 // 每页数据的数量,默认10
},
noMoreSize: 3, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
empty: {
tip: '暂无相关数据'
}
},
// 列表数据
dataList: []
}
},
// 必须注册滚动到底部的事件,使上拉加载生效
onReachBottom() {
this.mescroll && this.mescroll.onReachBottom();
},
// 必须注册列表滚动事件,使下拉刷新生效
onPageScroll(e) {
this.mescroll && this.mescroll.onPageScroll(e);
},
methods: {
// mescroll组件初始化的回调,可获取到mescroll对象
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
/*下拉刷新的回调, 有三种处理方式: */
downCallback(mescroll){
// 第1种: 请求具体接口
uni.request({
url: 'xxxx',
success: () => {
// 成功隐藏下拉加载状态
mescroll.endSuccess()
},
fail: () => {
// 失败隐藏下拉加载状态
mescroll.endErr()
}
})
// 第2种: 下拉刷新和上拉加载调同样的接口, 那以上请求可删, 直接用mescroll.resetUpScroll()代替
mescroll.resetUpScroll(); // 重置列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
// 第3种: 下拉刷新什么也不处理, 可直接调用或者延时一会调用 mescroll.endSuccess() 结束即可
mescroll.endSuccess()
},
/*上拉加载的回调*/
upCallback(mescroll) {
// 此时mescroll会携带page的参数:
let pageNum = mescroll.num; // 页码, 默认从1开始
let pageSize = mescroll.size; // 页长, 默认每页10条
uni.request({
url: 'xxxx?pageNum='+pageNum+'&pageSize='+pageSize,
success: (data) => {
// 接口返回的当前页数据列表 (数组)
let curPageData = data.xxx;
// 接口返回的总页数 (比如列表有26个数据,每页10条,共3页; 则totalPage值为3)
let totalPage = data.xxx;
// 接口返回的总数据量(比如列表有26个数据,每页10条,共3页; 则totalSize值为26)
let totalSize = data.xxx;
// 接口返回的是否有下一页 (true/false)
let hasNext = data.xxx;
// 成功隐藏下拉加载状态
//方法一(推荐): 后台接口有返回列表的总页数 totalPage
mescroll.endByPage(curPageData.length, totalPage);
//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
//mescroll.endBySize(curPageData.length, totalSize);
//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
//mescroll.endSuccess(curPageData.length, hasNext);
//设置列表数据
if(mescroll.num == 1) this.dataList = []; //如果是第一页需手动制空列表
this.dataList = this.dataList.concat(curPageData); //追加新数据
},
fail: () => {
// 失败隐藏下拉加载状态
mescroll.endErr()
}
})
}
}
}
</script>
<style>
</style>
```
## 自定义mescroll-uni :
#### 快速的自定义是mescroll-uni的优势, 您可以随心所欲的进行全局配置 和 在具体界面的自定义
<a href="http://stream.cdn.aliyun.dcloud.net.cn/marketplace/43dc2f00-66aa-11e9-945e-e3c4c1708066/plugin.zip?v=666666" target="_blank">(请先点击本界面左上角的下载, 查看完整的演示案例)</a>
1. npm安装的, 可以直接修改 /node_modules/mescroll-uni/mescroll-uni-option.js 进行全局配置
2. 下载拷贝的, 可以直接修改 /components/mescroll-uni/mescroll-uni-option.js 进行全局配置
3. 在具体的页面中,您可以配置downOption 和 upOption 实现具体界面的自定义, 建议参考mescroll-uni-options.vue
4. 深度定制化, 请参考mescroll-uni的中高级案例
## 在线案例和参数说明,请移步至<a href="http://www.mescroll.com">mescroll官网</a>
\ No newline at end of file
// mescroll 全局配置
const GlobalOption = {
down: {
textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
textLoading: '加载中 ...', // 加载中的提示文本
offset: 80 // 在列表顶部,下拉大于80upx,松手即可触发下拉刷新的回调
},
up: {
textLoading: '加载中 ...', // 加载中的提示文本
textNoMore: '-- END --', // 没有更多数据的提示文本
toTop: {
// 回到顶部按钮,需配置src才显示
src: "http://www.mescroll.com/img/mescroll-totop.png?v=1", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
duration: 300, // 回到顶部的动画时长,默认300ms
},
empty: {
use: true, // 是否显示空布局
icon: "http://www.mescroll.com/img/mescroll-empty.png?v=1", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
tip: '~ 暂无相关数据 ~' // 提示
}
}
}
export default GlobalOption
/*! mescroll-uni
* version 1.0.2
* 2019-05-28 文举
* http://www.mescroll.com
*/
/*下拉刷新区域*/
.mescroll-downwarp {
position: relative;
width: 100%;
height: 0;
overflow: hidden;
text-align: center;
}
/*下拉刷新--内容区,定位于区域底部*/
.mescroll-downwarp .downwarp-content {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: 60upx;
padding: 20upx 0;
text-align: center;
}
/*上拉加载区域*/
.mescroll-upwarp {
min-height: 60upx;
padding: 30upx 0;
text-align: center;
clear: both;
}
/*下拉刷新,上拉加载--提示文本*/
.mescroll-downwarp .downwarp-tip,
.mescroll-upwarp .upwarp-tip,
.mescroll-upwarp .upwarp-nodata {
display: inline-block;
font-size: 28upx;
color: gray;
vertical-align: middle;
}
.mescroll-downwarp .downwarp-tip,
.mescroll-upwarp .upwarp-tip {
margin-left: 16upx;
}
/*下拉刷新,上拉加载--旋转进度条*/
.mescroll-downwarp .downwarp-progress,
.mescroll-upwarp .upwarp-progress {
display: inline-block;
width: 32upx;
height: 32upx;
border-radius: 50%;
border: 2upx solid gray;
border-bottom-color: transparent;
vertical-align: middle;
}
/*下拉刷新--高度重置的过渡动画*/
.mescroll-downwarp-reset {
-webkit-transition: height 300ms;
transition: height 300ms;
}
/*旋转动画*/
.mescroll-rotate {
-webkit-animation: mescrollRotate 0.6s linear infinite;
animation: mescrollRotate 0.6s linear infinite;
}
@-webkit-keyframes mescrollRotate {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes mescrollRotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/*无任何数据的空布局*/
.mescroll-empty {
width: 100%;
padding: 40upx;
text-align: center;
}
.mescroll-empty.empty-fixed{
z-index: 99;
position: fixed;
top: 30%;
left: 0;
}
.mescroll-empty .empty-icon {
width: 45%;
}
.mescroll-empty .empty-tip {
margin-top: 20upx;
font-size: 24upx;
color: gray;
}
.mescroll-empty .empty-btn {
display: inline-block;
margin-top: 40upx;
min-width: 200upx;
padding: 18upx;
font-size: 28upx;
border: 1upx solid #E04B28;
border-radius: 60upx;
color: #E04B28;
}
.mescroll-empty .empty-btn:active {
opacity: .75;
}
/*回到顶部的按钮*/
.mescroll-totop {
z-index: 9990;
position: fixed;
right: 20upx;
bottom: 120upx;
width: 72upx;
height: 72upx;
border-radius: 50%;
opacity: 0;
}
/*显示动画--淡入*/
.mescroll-lazy-in,
.mescroll-fade-in {
-webkit-animation: mescrollFadeIn .3s linear forwards;
animation: mescrollFadeIn .3s linear forwards;
}
@-webkit-keyframes mescrollFadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes mescrollFadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
/*隐藏动画--淡出*/
.mescroll-fade-out {
pointer-events: none;
-webkit-animation: mescrollFadeOut .5s linear forwards;
animation: mescrollFadeOut .5s linear forwards;
}
@-webkit-keyframes mescrollFadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes mescrollFadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
差异被折叠。
差异被折叠。
{
"_from": "mescroll-uni",
"_id": "mescroll-uni@1.0.2",
"_inBundle": false,
"_integrity": "sha512-sA3m9xXE/vG527UIdN9xaKY17AYh4BXfokRByP+KNRFXzDoZgvMZPMvMq03P/ladZIOOt/OvUpJUOvZCsOR4FA==",
"_location": "/mescroll-uni",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "mescroll-uni",
"name": "mescroll-uni",
"escapedName": "mescroll-uni",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/mescroll-uni/-/mescroll-uni-1.0.2.tgz",
"_shasum": "d76b35faa8e6c8e4d83df0e60a466b6bbd5b3d0c",
"_spec": "mescroll-uni",
"_where": "E:\\wy\\project\\wordWeb",
"author": {
"name": "wenju"
},
"bundleDependencies": false,
"deprecated": false,
"description": "mescroll-uni -支持uni-app的下拉刷新上拉加载组件",
"license": "MIT",
"main": "mescroll-uni.js",
"name": "mescroll-uni",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.2"
}
<template>
<view :class="{'uni-scroll-tab': scroll === true }" class="uni-tab">
<view
v-for="(tab,index) in tabList" :key="index"
:class="{ 'uni-tab-active': index === value, 'uni-tab-scroll-item': scroll === true, ' uni-tab-scroll-active': index === value && scroll === true }"
:style="[{color:index === value ? activeColor : defaultColor,backgroundColor: bgColor}]"
@tap="itemClick(index,tab)"
class="uni-tab-item">
<span v-if="tab.icon != undefined" class="iconfont mr5" :class="tab.icon"></span>
<text>{{rangeKey == '' ? tab : tab[rangeKey]}}</text>
</view>
<view v-if="!scroll" :style="[{ right: barRight + '%', left : barLeft + '%', borderColor: activeColor }]" class="uni-tab-bar" :class="back ? 'uni-tab-bar-backward' : 'uni-tab-bar-forward'"></view>
</view>
</template>
<script>
export default {
name: 'uni-tab',
data() {
return {
average: 0,
back: false
};
},
props: {
value: {
type: Number, //当前选中下标
default () {
return 0;
}
},
tabList: {
type: Array,
default () {
return [];
}
},
bgColor: { //背景颜色
type: String,
default () {
return '#FFFFFF';
}
},
defaultColor: { //默认未选中文字颜色
type: String,
default () {
return '#000000';
}
},
activeColor: { //选中时文字颜色 线条颜色
type: String,
default () {
return '#1e9fff';
}
},
rangeKey: { // 当tabList为对象时 显示指定下标值
type: String,
default () {
return '';
}
},
scroll: { //横向滑动
type: Boolean,
default () {
return false;
}
},
},
computed:{
barLeft () {
return this.value * this.average;
},
barRight () {
let index = this.tabList.length - this.value - 1;
return index * this.average;
},
},
created() {
this.average = 100 / this.tabList.length;
},
methods: {
itemClick(index,tab){
if(this.value == index) return false;
if(this.value > index){
this.back = true;
}else{
this.back = false;
}
// this.value = index;
this.$emit('update:value', index);
this.$emit('change',{tab:tab});
}
}
};
</script>
<style lang="scss" scoped>
// @import "../../static/icon/iconfont.css";
.uni-tab{
position: relative;
display: flex;
font-size: 14px;
height: 44px;
line-height: 44px;
background-color: #fff;
.uni-tab-item{
flex: 1;
height: 100%;
text-align: center;
box-sizing: border-box;
overflow: hidden;
}
.uni-tab-scroll-item{
flex: none;
padding: 0px 12px;
}
.uni-tab-active{
color: #1e9fff;
}
.uni-tab-scroll-active{
border-bottom: 3px solid #1e9fff;
}
.uni-tab-bar{
display: block;
height: 3px;
position: absolute;
bottom: 0;
border-bottom: 3px solid #1e9fff;
}
.uni-tab-bar-forward{
transition: right 0.3s cubic-bezier(0.35, 0, 0.25, 1), left 0.3s cubic-bezier(0.35, 0, 0.25, 1) 0.09s;
}
.uni-tab-bar-backward{
transition: right 0.3s cubic-bezier(0.35, 0, 0.25, 1) 0.09s, left 0.3s cubic-bezier(0.35, 0, 0.25, 1);
}
}
.uni-scroll-tab{
overflow-x: scroll;
}
</style>
\ No newline at end of file
<template>
<view class="uni-load-more">
<view
v-if="iconType==='circle' || iconType==='auto' && platform === 'android'"
v-show="status === 'loading' && showIcon"
class="uni-load-more__img"
>
<view
:style="{borderColor : color}"
class="loader-android" />
</view>
<view
v-else
v-show="status === 'loading' && showIcon"
class="uni-load-more__img">
<view class="load1 load">
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
</view>
<view class="load2 load">
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
</view>
<view class="load3 load">
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
<view
:style="{ background: color }"
class="uni-load-view_wrapper" />
</view>
</view>
<text
:style="{ color: color }"
class="uni-load-more__text">
{{ status === 'more' ? contentText.contentdown : status === 'loading' ? contentText.contentrefresh : contentText.contentnomore }}
</text>
</view>
</template>
<script>
const platform = uni.getSystemInfoSync().platform
export default {
name: 'UniLoadMore',
props: {
status: {
// 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
type: String,
default: 'more'
},
showIcon: {
type: Boolean,
default: true
},
iconType: {
type: String,
default: 'auto'
},
color: {
type: String,
default: '#777777'
},
contentText: {
type: Object,
default () {
return {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
}
}
}
},
data () {
return {
platform: platform
}
}
}
</script>
<style lang="scss">
.uni-load-more {
display: flex;
flex-direction: row;
height: 80upx;
align-items: center;
justify-content: center;
&__text {
font-size: 28upx;
color: $uni-text-color-grey;
}
&__img {
position: relative;
height: 24px;
width: 24px;
margin-right: 10px;
& > .load {
position: absolute;
.uni-load-view_wrapper {
width: 6px;
height: 2px;
border-top-left-radius: 1px;
border-bottom-left-radius: 1px;
background: $uni-text-color-grey;
position: absolute;
opacity: 0.2;
transform-origin: 50%;
animation: load 0.96s ease infinite;
&:nth-child(1) {
transform: rotate(90deg);
top: 2px;
left: 9px;
}
&:nth-child(2) {
transform: rotate(180deg);
top: 11px;
right: 0px;
}
&:nth-child(3) {
transform: rotate(270deg);
bottom: 2px;
left: 9px;
}
&:nth-child(4) {
top: 11px;
left: 0px;
}
}
}
& > .loader-android {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
box-sizing: border-box;
border: solid 2px #777777;
border-radius: 50%;
border-bottom-color: transparent !important;
animation: loader-android 1s 0s linear infinite;
}
}
}
.load1,
.load2,
.load3 {
height: 24px;
width: 24px;
}
.load2 {
transform: rotate(30deg);
}
.load3 {
transform: rotate(60deg);
}
.load1 .uni-load-view_wrapper:nth-child(1) {
animation-delay: 0s;
}
.load2 .uni-load-view_wrapper:nth-child(1) {
animation-delay: 0.08s;
}
.load3 .uni-load-view_wrapper:nth-child(1) {
animation-delay: 0.16s;
}
.load1 .uni-load-view_wrapper:nth-child(2) {
animation-delay: 0.24s;
}
.load2 .uni-load-view_wrapper:nth-child(2) {
animation-delay: 0.32s;
}
.load3 .uni-load-view_wrapper:nth-child(2) {
animation-delay: 0.40s;
}
.load1 .uni-load-view_wrapper:nth-child(3) {
animation-delay: 0.48s;
}
.load2 .uni-load-view_wrapper:nth-child(3) {
animation-delay: 0.56s;
}
.load3 .uni-load-view_wrapper:nth-child(3) {
animation-delay: 0.64s;
}
.load1 .uni-load-view_wrapper:nth-child(4) {
animation-delay: 0.72s;
}
.load2 .uni-load-view_wrapper:nth-child(4) {
animation-delay: 0.80s;
}
.load3 .uni-load-view_wrapper:nth-child(4) {
animation-delay: 0.88s;
}
@-webkit-keyframes load {
0% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
@-webkit-keyframes loader-android {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
const ApiUrl='http://192.168.2.173:8708'
const uploadUrl = `http://192.168.2.173:8708/file/`
export {
ApiUrl,
uploadUrl
}
\ No newline at end of file
import Vue from 'vue'
import App from './App'
import { uploadUrl } from 'env.js'
Vue.prototype.fileUrl = function(link) { //"http://192.168.2.231:8696/file/file/?fileName=3737b4397b9e4ec7ab3538c5b11ee6ea
return `${uploadUrl}file/?fileName=` + link
}
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
{
"name" : "cppc",
"appid" : "__UNI__0DF6F11",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"h5" : {
"title" : "中国政协杂志社",
"domain" : "http://192.168.2.173:8708",
"router" : {
"base" : "/wap/"
}
}
}
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index"
},
{
"path": "pages/search/index"
},
{
"path": "pages/search/list"
},
{
"path": "pages/search/yearList"
},
{
"path": "pages/details/index"
},
{
"path": "pages/details/article"
}
],
"globalStyle": {
"navigationStyle":"custom"
}
}
<template>
<view class="article_page">
<view class="searchHeader">
<view class="backImgBox" @click="goBack()">
<image src=../../static/back.png mode="" class="back"></image>
</view>
<view class="ipt">阅读</view>
</view>
<view class="title">
<h6>{{articleData.name}}</h6>
<view class="readNum">
<text class="time">2019-07-24 21:04:47 </text>
<text class="source">来源:{{articleData.source}}</text>
<text class="read">阅读量:{{articleData.browseNum}}</text>
</view>
</view>
<view class="articleCon" v-html="articleData.text"></view>
</view>
</template>
<script>
import {getArticleAPI } from '../../api/index.js';
export default {
data() {
return {
id:'',
articleData:{}
}
},
onLoad(option) {
this.id=option.id
this.getDetail()
},
methods: {
goBack(){
uni.navigateBack({
delta: 1
});
},
getDetail(){
console.log(777)
getArticleAPI(this.id).then( res => {
if(res.data.code==0){
this.articleData=res.data.data;
}
})
}
}
}
</script>
<style lang="less" scoped>
.article_page{
.searchHeader{
padding: 16upx 30upx 10upx 24upx;
display: flex;
align-items: center;
height: 68upx;
background: url('../../static/banner.png') no-repeat;
background-size: 100%;
.backImgBox{
height: 100%;
}
.back{
height: 38upx;
width: 21upx;
margin-right: 27upx;
vertical-align: middle;
margin-top: 6upx;
}
.ipt{
height: 68upx;
width: 574upx;
color: white;
text-align: center;
line-height: 68upx;
font-size: 18px;
margin-right: 18upx;
}
.search{
height: 38upx;
width: 38upx;
}
}
.title{
margin: 58upx 32upx 0;
border-bottom: 1px solid #E6E6E6;
h6{
font-size: 20px;
}
.readNum{
margin: 46upx 0 32upx;
display: flex;
justify-content: space-between;
font-size: 12px;
color: #C8CAD2;
}
.read{
color: #F55827;
}
}
.articleCon{
padding: 48upx 34upx;
color: #333;
text-indent: 32upx;
}
}
</style>
<template>
<view class="details_page">
<view class="banner" id="banner">
<view class="backBox">
<image src="../../static/back.png" mode="" class="back" @click="goBack()"></image>
</view>
<view class="pos">
<view>
<image v-if="bookData.bookCover" :src=fileUrl(bookData.bookCover) mode="" class="cover"></image>
<image v-else src="../../static/cover.png" mode="" class="cover"></image>
</view>
<view>
<image src="../../static/shadow.png" mode="" class="shadow"></image>
</view>
</view>
</view>
<view class="tit">{{bookData.name}}</view>
<view class="con">
<view class="tabs" id="tabBars">
<sun-tab :value.sync="swiperIndex" activeColor='#CF171F' @change="swiperChange" :tabList="tabSwiperList"></sun-tab>
</view>
<view class="conBox">
<view class="catalog" v-html="bookData.bookCatalog" v-if="tab=='目录'"></view>
<view class="article" v-else-if="tab=='文章'">
<view class="olist" @click="toArticle(item.resourceId)" v-for="(item,index) in bookData.listArticle" :key="index">
<view class="img" v-if="item.cover">
<image :src=fileUrl(item.cover) mode=""></image>
</view>
<view class="word">
<view class="names">{{item.name}}</view>
<view class="author">作者: {{item.author}}</view>
</view>
</view>
</view>
<view class="details" v-else>
<view class="basic">
<h6><image src="../../static/tit.png"></image>基本信息</h6>
<view class="basiCon">
<p>主管单位:<span>{{bookData.competentUnit}}</span></p>
<p>邮发代号:<span>{{bookData.postalCode}}</span></p>
<p>主办单位:<span>{{bookData.sponsor}}</span></p>
<p>执行主编:<span>{{bookData.executiveEditor}}</span></p>
<p>期刊编码:<span>{{bookData.journalCode}}</span></p>
<p>美术编辑:<span>{{bookData.artEditor}}</span></p>
<p>ISSN刊号:<span>{{bookData.issnNumber}}</span></p>
<p>出版日期:<span>{{bookData.publishTime}}</span></p>
<p>CN刊号:<span>{{bookData.cnNumber}}</span></p>
</view>
</view>
<view class="intro">
<h6><image src="../../static/tit.png"></image>杂志简介</h6>
<view class="detailCon" v-html="bookData.summary"></view>
</view>
</view>
</view>
</view>
<view class="readBox" @click="readpdf(bookData.id,bookData.download)">
<view class="readbtn">
<image src="../../static/read.png" mode=""></image>
<text>立即阅读</text>
</view>
</view>
</view>
</template>
<script>
import sunTab from '@/components/sun-tab/sun-tab.vue';
import {getEbookAPI } from '../../api/index.js';
import{ApiUrl} from '../../env.js'
export default {
components: {
sunTab
},
data() {
return {
swiperIndex: 0,
tabSwiperList: ['目录', '文章', '详情'],
bookData: {},
id:'',
tab:'目录'
}
},
onLoad(option) {
this.id=option.id;
this.getDetail()
},
methods: {
goBack() {
uni.navigateBack({
delta: 1
});
},
swiperChange(e) {
this.tab=e.tab
},
toArticle(id){
uni.navigateTo({
url: 'article?id='+id
});
},
//获取杂志详情
getDetail(){
getEbookAPI(this.id).then( res => {
if(res.data.code==0){
this.bookData=res.data.data
}
})
},
//pdf阅读
readpdf(id,download){
console.log(download,"00")
if(download==0){
window.open(ApiUrl+'/pdf/viewer.html?id=2442bf3cd9944efb9bd88b2904ef2d09')
}else if (download==1){
window.open(ApiUrl+'/pdfd/viewer.html?id=2442bf3cd9944efb9bd88b2904ef2d09')
}
},
//获取页面滚动高度
getScrollTop(){
let scrollTop;
if(typeof window.pageYOffset != 'undefined'){
scrollTop = window.pageYOffset;
}else if(typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
scrollTop = document.documentElement.scrollTop;
}else if(typeof document.body != 'undefined'){
scrollTop = document.body.scrollTop;
}
return scrollTop;
}
},
mounted() {
let that=this;
window.addEventListener("scroll", function () {
let topScroll = that.getScrollTop();
console.log(topScroll)
let bignav = document.getElementById("tabBars");
if(topScroll > 322){
bignav.style.position = 'fixed';
bignav.style.top = '0';
bignav.style.zIndex = '9999';
}
if(topScroll < 277){
bignav.style.position = 'static';
}
})
}
}
</script>
<style lang="less" scoped>
.details_page {
.banner {
height: 399upx;
background: url('../../static/backD.png') no-repeat;
background-size: 100%;
.backBox {
height: 68upx;
padding: 16upx 30upx 10upx 24upx;
}
.back {
height: 38upx;
width: 21upx;
vertical-align: middle;
margin-top: 6upx;
}
.pos {
text-align: center;
margin: 0 auto;
margin-top: -10upx;
}
.cover {
height: 346upx;
width: 270upx;
}
.shadow {
height: 35upx;
width: 366upx;
}
}
.tit{
margin-top: 80upx;
padding: 36upx 32upx 49upx;
border-bottom: 5px solid #F4F4F4;
color: #333333;
font-size: 16px;
font-weight: bold;
}
.con{
padding-bottom: 130upx;
.img{
margin-right: 22upx;
}
.catalog{
padding: 51upx 92upx 40upx 72upx;
color: #333333;
font-size: 14px;
}
.article{
margin: 51upx 24upx 0;
.olist{
border-bottom: 1px solid #eee;
padding: 30upx 0;
display: flex;
image{
height: 150upx;
width: 200upx;
}
.names{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
color: #333333;
font-weight: bold;
line-height: 34upx;
height: 68upx;
}
.author{
color: #999999;
font-size: 12px;
margin-bottom: 8px;
margin-top: 46upx;
line-height: 23upx;
}
}
}
.details{
padding: 40upx 18upx;
h6{
color: #333333;
font-size: 14px;
margin-bottom: 50upx;
}
image{
height: 36upx;
width: 8upx;
vertical-align: middle;
margin-right: 14upx;
}
.basiCon{
color: #666;
margin-bottom: 20upx;
padding-left: 11upx;
span{
color: #333333;
}
}
.detailCon{
color: #666;
padding: 0 11upx 30upx;
text-indent: 32px;
}
}
}
.tabs {
height: 90upx;
border-bottom: 1px solid #EBEBEB;
width: 100%;
background: white;
.uni-tab {
margin: 0 40upx;
height: 90upx;
/deep/.uni-tab-item {
line-height: 90upx;
font-weight: bold;
}
/deep/.uni-tab-bar {
height: 2px !important;
border-bottom: 2px solid #CF171F !important;
}
}
}
.readBox{
width: 100%;
position: fixed;
background: white;
bottom: 0;
box-shadow:0px 8px 11px 0px rgba(255, 49, 163, 0.35);
.readbtn{
bottom: 0;
margin: 16upx 64upx;
width:620upx;
height:76upx;
font-size: 16px;
background:rgba(255,163,49,1);
border-radius:38px;
color: white;
text-align: center;
line-height: 76upx;
image{
width: 40upx;
height: 34upx;
margin-right: 20upx;
vertical-align: middle;
}
}
}
}
</style>
<template>
<view class="content">
<view class="header">
<image class="logo" src="../../static/logo.png" mode=""></image>
<image class="search" @click="toSearch()" src="../../static/search.png" mode=""></image>
</view>
<view class="uni-tab-bar11">
<scroll-view id="tab-bar" class="uni-swiper-tab" scroll-x :scroll-left="scrollLeft">
<view v-for="(tab,index) in subjectList" :key="index" :class="['swiper-tab-list',siteCode==index ? 'active' : '']"
:id="index" :data-current="index" @click="tapTab(tab,index)">
<view class="wordCont">{{tab.name}}</view>
<view :class="[siteCode==index ? 'borderBtm' : '']"></view>
</view>
</scroll-view>
</view>
<view class="newArrival">
<view class="titBox">
<view class="tit_l">
<image src="../../static/tit.png" mode=""></image>
<text>最新上架</text>
</view>
<view class="tit_r" @click="getMore(0)">
<text>查看更多</text>
<image src="../../static/arrow.png" mode=""></image>
</view>
</view>
<view class="managizeIntro" v-if="bookList.length>0">
<view class="imgBox" @click="readBook(news.id)">
<image v-if="news.bookCover" :src="fileUrl(news.bookCover)" mode=""></image>
<image v-else src="../../static/news.png" mode=""></image>
</view>
<view class="wordBox">
<view class="title" @click="readBook(news.id)">
{{news.name}}
</view>
<view class="intro" @click="readBook(news.id)">
【本期导读】{{news.summary}}
</view>
<view class="readBtn" @click="readBook(news.id)">
<image src="../../static/read.png" mode=""></image>
<text>立即阅读</text>
</view>
</view>
</view>
</view>
<view class="managizeList">
<view :class="['olist',index%3!=2?'marginR':'']" @click="readBook(item.id)" v-for="(item,index) in bookList" :key="index">
<view class="imgs">
<image v-if="item.bookCover" :src=fileUrl(item.bookCover) mode=""></image>
<image v-else src="../../static/list.png" mode=""></image>
</view>
<view class="txt">{{item.name}}</view>
</view>
</view>
<view class="toUpdate">
<view class="tit">
<image src="../../static/tit.png" mode=""></image>
<text>正版杂志 持续更新</text>
</view>
<view class="olist" v-if="stageList.length>0">
<view :class="['list',index%2!=1?'marginR':'']" @click="getMore(index,item.yearId)" v-for="(item,index) in stageList" :key="index">{{item.name}}年刊</view>
<view class='list' @click="getMore(0)">查看更多>></view>
</view>
</view>
</view>
</template>
<script>
import {getSubjectAPI,getNewsAPI,getYearAPI } from '../../api/index.js';
export default {
data() {
return {
scrollLeft: 0,
siteCode:0,
subjectList:[],
subjectId:'',
bookList:[],
stageList:[],
news:{},
year:''
}
},
onLoad() {
this.getSubject()
},
methods: {
//切换杂志主体
tapTab(tab,index){
this.siteCode=index;
this.subjectId=tab.id;
this.getNewsBook();
this.getYear();
},
//跳到检索页
toSearch(){
uni.navigateTo({
url: '../search/index'
});
},
getMore(index,year){
if(year){
this.year=year
}else{
this.year=this.stageList[0].yearId
}
uni.navigateTo({
url: '../search/yearList?subjectId='+this.subjectId+'&index='+index+'&year='+this.year
});
},
//立即阅读
readBook(id){
uni.navigateTo({
url: '../details/index?id='+id
});
},
//获取杂志主体
getSubject(){
getSubjectAPI().then(res=>{
if(res.data.code==0){
this.subjectList=res.data.data;
if(res.data.data&&res.data.data.length>0){
this.subjectId=res.data.data[0].id
this.getNewsBook();
this.getYear();
}
}
})
},
//最新上架
getNewsBook(){
getNewsAPI(this.subjectId).then(res=>{
if(res.data.code==0){
if(res.data.data.bookList&&res.data.data.bookList.length>0){
this.news=res.data.data.bookList[0]
res.data.data.bookList.shift()
this.bookList=res.data.data.bookList
}else{
this.bookList=[]
this.news={}
}
}
})
},
//根据主体获取年份
getYear(){
getYearAPI(this.subjectId).then(res=>{
if(res.data.code==0){
if(res.data.data.length>0){
this.stageList=res.data.data;
this.year=res.data.data[0].yearId;
}else{
this.stageList=[]
}
}else{
this.stageList=[]
}
})
}
}
}
</script>
<style lang="less" scoped>
.header{
height: 160upx;
background: url(../../static/banner.png) no-repeat;
background-size: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 28upx 0 34upx;
.logo{
height: 52upx;
width: 160upx;
}
.search{
height: 38upx;
width: 38upx;
}
}
.uni-tab-bar11 {
height: 100upx;
overflow: hidden;
background: white;
border-bottom: 1px solid #eeeeee;
.uni-swiper-tab {
line-height: 100upx;
height: 100upx;
.swiper-tab-list {
width: auto !important;
padding: 0 40upx;
color: #666666;
font-size: 28upx;
.wordCont {
margin-bottom: 4upx;
}
}
.active {
width: auto !important;
padding: 0 20upx;
color: #DB1115 !important;
font-size: 36upx;
opacity: 1;
font-weight: bold;
}
.borderBtm {
height: 8upx;
width: 50upx;
background: #DB1115;
border-radius: 10upx;
margin-top: 12upx;
margin: 10upx auto;
}
}
}
.newArrival{
margin: 0 24upx;
padding: 50upx 0 40upx;
border-bottom: 1px solid #eee;
.titBox{
display: flex;
justify-content: space-between;
margin-bottom: 50upx;
}
.tit_l{
image{
height: 34upx;
width: 8upx;
margin-right: 20upx;
vertical-align: middle;
}
color: #333;
font-size: 16px;
font-weight: bold;
}
.tit_r{
font-size: 14px;
color: #888888;
image{
height: 20upx;
width: 12upx;
margin-left: 20upx;
}
}
.managizeIntro{
display: flex;
.imgBox{
image{
height: 336upx;
width: 250upx;
}
margin-right: 30upx;
}
.title{
color: #212020;
font-size: 16px;
margin-bottom: 32upx;
}
.intro{
font-size: 14px;
color: #555;
margin-bottom: 49upx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.readBtn{
height: 52upx;
width: 230upx;
border-radius: 26upx;
background: #FFA331;
color: white;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
image{
height: 26upx;
width: 30upx;
margin-right: 12upx;
}
}
}
}
.managizeList{
padding: 40upx 24upx 50upx;
border-bottom: 8px solid #eee;
display: flex;
flex-wrap: wrap;
.olist{
width: 196upx;
margin-bottom: 50upx;
}
.marginR{
margin-right: 52upx;
}
image{
height: 264upx;
width: 196upx;
margin-bottom: 30upx;
}
.txt{
text-align: center;
color: #202021;
font-size: 12px;
}
}
.toUpdate{
padding: 50upx 24upx 28upx;
.tit{
margin-bottom: 50upx;
image{
height: 34upx;
width: 8upx;
margin-right: 12upx;
vertical-align: middle;
}
text{
font-size: 16px;
color: #333333;
font-weight: bold;
}
}
.olist{
display: flex;
flex-wrap: wrap;
}
.list{
height: 110upx;
width: 338upx;
background: url(../../static/stage.png) no-repeat;
background-size: 100%;
text-align: center;
line-height: 110upx;
color: #333;
margin-bottom: 24upx;
}
.marginR{
margin-right: 26upx;
}
}
</style>
<template>
<view class="search_page">
<view class="searchHeader">
<view class="backImgBox" @click="goBack()">
<image src=../../static/back.png mode="" class="back"></image>
</view>
<view class="ipt">
<image src="../../static/searchIdx.png" mode="" class="inpImg"></image>
<input type="text" v-model="keywords" placeholder="请输入搜索内容" />
<image src="../../static/delete.png" @click="deletes" v-if="keywords" mode="" class="delete"></image>
</view>
<text @click="toList(keywords)">搜索</text>
</view>
<view class="hotsBox">
<h6>热门搜索</h6>
<view class="olist">
<view class="hot" @click="toList(item.hotSearchWord)" v-for="(item,index) in hotList" :key="index">{{item.hotSearchWord}}</view>
</view>
</view>
</view>
</template>
<script>
import {gethotsAPI} from '../../api/index.js';
export default {
data() {
return {
hotList:[],
keywords:''
}
},
onLoad() {
this.gethots()
},
methods: {
goBack(){
uni.navigateBack({
delta: 1
});
},
deletes(){
this.keywords=''
},
toList(key){
uni.navigateTo({
url: 'list?keywords='+key
});
},
//获取热搜词
gethots(){
gethotsAPI().then(res => {
if(res.data.code==0){
this.hotList=res.data.data;
}
})
}
}
}
</script>
<style lang="less" scoped>
.search_page{
.searchHeader{
padding: 16upx 30upx 10upx 24upx;
display: flex;
align-items: center;
height: 68upx;
background: url('../../static/banner.png') no-repeat;
background-size: 100%;
.backImgBox{
height: 100%;
}
.back{
height: 38upx;
width: 21upx;
margin-right: 27upx;
vertical-align: middle;
margin-top: 6upx;
}
.ipt{
height: 68upx;
width: 574upx;
position: relative;
margin-right: 18upx;
.inpImg{
height: 26upx;
width: 26upx;
position: absolute;
top: 21upx;
left: 21upx;
z-index: 100;
}
.delete{
height: 28upx;
width: 28upx;
position: absolute;
top: 21upx;
right: 21upx;
z-index: 100;
}
/deep/.input-placeholder{
color: #BBBEC3;
}
input{
background: white;
border-radius: 34upx;
color: #333;
padding: 0 60upx;
height: 100%;
}
}
text{
color: white;
font-size: 14px;
}
}
.hotsBox{
padding: 49upx 24upx;
h6{
color: #3D3D3D;
margin-bottom: 35upx;
font-size: 14px;
}
.olist{
display: flex;
flex-wrap:wrap;
}
.hot{
padding: 20upx 28upx;
background: #F9F5ED;
margin: 0 20upx 20upx 0;
font-size: 14px;
color: #555555;
}
}
}
</style>
<template>
<view class="searchlist_page">
<view class="fixedBox">
<view class="searchHeader">
<view class="backImgBox" @click="goBack">
<image src=../../static/back.png mode="" class="back"></image>
</view>
<view class="ipt">
<image src="../../static/searchIdx.png" mode="" class="inpImg"></image>
<input type="text" v-model="listQuery.keywords" placeholder="请输入搜索内容" />
<image src="../../static/delete.png" @click="deletes" v-if="listQuery.keywords" mode="" class="delete"></image>
</view>
<text @click="searchFor">搜索</text>
</view>
<view class="tabBox">
<view :class="['tabs',tabIndex==index?'active':'']" v-for="(item,index) in tabList" :key="index" @click="tabs(item,index)">
<image :src="'../../static/'+item.id+'.png'" mode=""></image>
<span>{{item.name}}</span>
</view>
<view class="cutLine"></view>
</view>
</view>
<view class="listBox">
<uni-load-more status="loading" v-if="isShowLoad"></uni-load-more>
<mescroll-uni v-else @down="downCallback" @up="upCallback" @init="mescrollInit">
<view class="olist">
<view class="list" v-for="(item,index) in booklist" :key="index">
<view class="tit">{{item.name}}</view>
<view class="intro" v-html="item.synopsis"></view>
<view class="stageBox">
<view class="stage" v-if="item.mainBody">{{item.mainBody}}</view>
<view class="stage" v-if="item.source">来源: {{item.source}}</view>
<view class="date">{{item.uploadTime }}</view>
</view>
</view>
</view>
</mescroll-uni>
</view>
</view>
</template>
<script>
import {getListAPI} from '../../api/index.js';
import MescrollUni from "../../components/mescroll-uni/mescroll-uni.vue";
import uniLoadMore from "../../components/uni-load-more/uni-load-more.vue";
import { ApiUrl } from '../../env.js'
export default {
components: {
MescrollUni,
uniLoadMore
},
data() {
return {
tabList:[
{name:'杂志',id:'managizeAc'},
{name:'文章',id:'article'}
],
tabIndex:0,
booklist:[],
isShowLoad: false,
showLoading:false,
mescroll: null,
downOption: {
use: false,
auto: false
},
listQuery:{
type:1,
keywords:'',
pageNum: 1,
pageSize: 20
}
}
},
//注册滚动到底部的事件,用于上拉加载
onReachBottom() {
this.mescroll && this.mescroll.onReachBottom();
},
//注册列表滚动事件,用于下拉刷新
onPageScroll(e) {
this.mescroll && this.mescroll.onPageScroll(e);
},
onLoad(option) {
this.listQuery.keywords=option.keywords;
//this.getList()
},
methods: {
goBack(){
uni.navigateBack({
delta: 1
});
},
deletes(){
this.listQuery.keywords=''
},
tabs(item,index){
this.isShowLoad=true;
this.tabList.forEach((ele,idx) => {
this.tabList[idx].id=this.tabList[idx].id.replace(/Ac/g,"")
if(index==idx){
this.tabList[index].id=this.tabList[index].id+"Ac"
}
})
this.tabIndex=index;
//this.listQuery.keywords=''
this.listQuery.type=index+1;
this.getList()
},
getList(){
getListAPI(this.listQuery).then( res => {
this.isShowLoad=false
if(res.data.code==0){
this.booklist=res.data.data.list
}else{
this.booklist=[]
}
})
},
searchFor(){
this.getList()
},
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
// 下拉刷新的回调
downCallback(mescroll){
mescroll.resetUpScroll()
},
upCallback(mescroll) {
//联网加载数据
this.listQuery.pageNum=mescroll.num;
this.getListDataFromNet(this.listQuery, (curPageData)=>{
mescroll.endSuccess(curPageData.length);
//设置列表数据
if(mescroll.num == 1)
this.booklist = [];
this.booklist=this.booklist.concat(curPageData);
}, () => {
//联网失败的回调,隐藏下拉刷新的状态
mescroll.endErr();
})
},
getListDataFromNet(postdata,successCallback,errorCallback) {
uni.request({
url: ApiUrl+'/resource/wap/ebook/page-book',
data:postdata,
method:'get',
success: (data) => {
var listData=[];
if(data.data.code==0){
listData=data.data.data.list
}
//联网成功的回调
successCallback && successCallback(listData);
},
fail: () => {
errorCallback && errorCallback();
}
})
}
}
}
</script>
<style lang="less" scoped>
.searchlist_page{
.searchHeader{
padding: 16upx 30upx 10upx 24upx;
display: flex;
align-items: center;
height: 68upx;
background: url('../../static/banner.png') no-repeat;
background-size: 100%;
.backImgBox{
height: 100%;
}
.back{
height: 38upx;
width: 21upx;
margin-right: 27upx;
vertical-align: middle;
margin-top: 6upx;
}
.ipt{
height: 68upx;
width: 574upx;
position: relative;
margin-right: 18upx;
.inpImg{
height: 26upx;
width: 26upx;
position: absolute;
top: 21upx;
left: 18upx;
z-index: 100;
}
.delete{
height: 28upx;
width: 28upx;
position: absolute;
top: 21upx;
right: 21upx;
z-index: 100;
}
input{
background: white;
border-radius: 34upx;
color: #333;
padding: 0 60upx;
height: 100%;
}
/deep/.input-placeholder{
color: #BBBEC3;
}
}
text{
color: white;
font-size: 14px;
}
}
.fixedBox{
position: fixed;
top: 0;
z-index: 9999;
}
.listBox{
margin-top: 184upx;
}
.tabBox{
display: flex;
height: 90upx;
width: 100%;
align-items: center;
justify-content: center;
.tabs{
width: 50%;
text-align: center;
font-size: 16px;
font-weight: bold;
color: #333333;
border-bottom: 1px solid #E9DBC1;
background: #FDFAF4;
height: 100%;
line-height: 90upx;
image{
width: 40upx;
height: 42upx;
margin-right: 12upx;
vertical-align:middle;
}
}
.active{
color:#EB0208;
}
.cutLine{
height: 80upx;
width: 1px;
background: #FDFAF4;
border-left: 1px solid #E9DBC1;
position: absolute;
}
}
.olist{
padding: 41upx 24upx;
.list{
border-bottom: 1px solid #EDEDED;
margin-bottom: 40px;
font-size: 14px;
.tit{
color: #202020;
font-size: 16px;
margin-bottom: 25upx;
font-weight: bold;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.intro{
margin-bottom: 35upx;
color: #555555;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
.stageBox{
margin-bottom: 25upx;
display: flex;
justify-content: space-between;
color: #BBBBBB;
.stage{
flex: 1;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
font-size: 12px;
}
.date{
width: 240upx;
font-size: 12px;
margin-left: 20upx;
}
}
}
}
}
</style>
<template>
<view class="yearlist_page">
<view class="searchHeader">
<view class="backImgBox" @click="goBack()">
<image src=../../static/back.png mode="" class="back"></image>
</view>
<view class="ipt">列表页</view>
<image class="search" @click="toSearch()" src="../../static/search.png" mode=""></image>
</view>
<view class="uni-tab-bar11">
<scroll-view id="tab-bar" class="uni-swiper-tab" scroll-x :scroll-left="scrollLeft">
<view v-for="(tab,index) in subjectList" :key="index" :class="['swiper-tab-list',siteCode==index ? 'active' : '']"
:id="index" :data-current="index" @click="tapTab(tab,index)">
<view class="wordCont">{{tab.name}}</view>
<view :class="[siteCode==index ? 'borderBtm' : '']"></view>
</view>
</scroll-view>
</view>
<view class="managizeList">
<uni-load-more status="loading" v-if="isShowLoad"></uni-load-more>
<mescroll-uni v-else @down="downCallback" @up="upCallback" @init="mescrollInit">
<view :class="['olist',index%3!=2?'marginR':'']" @click="toDetails(item.id)" v-for="(item,index) in list" :key="index">
<view class="imgs">
<image :src="fileUrl(item.bookCover)" v-if="item.bookCover" mode=""></image>
<image src="../../static/list.png" v-else mode=""></image>
</view>
<view class="txt">{{item.mainBody}}</view>
</view>
<view class="" v-if="showLoading"></view>
</mescroll-uni>
</view>
</view>
</template>
<script>
import {getYearAPI,getListAPI} from '../../api/index.js';
import MescrollUni from "../../components/mescroll-uni/mescroll-uni.vue";
import uniLoadMore from "../../components/uni-load-more/uni-load-more.vue";
import { ApiUrl } from '../../env.js'
export default {
components: {
MescrollUni,
uniLoadMore
},
data() {
return {
siteCode:0,
scrollLeft:0,
subjectId:'',
subjectList:[],
list:[],
isShowLoad: false,
showLoading:false,
mescroll: null,
downOption: {
use: false,
auto: false
},
listQuery:{
type:1,
year:null,
mainBody:null,
pageNum: 1,
pageSize: 10
}
}
},
//注册滚动到底部的事件,用于上拉加载
onReachBottom() {
this.mescroll && this.mescroll.onReachBottom();
},
//注册列表滚动事件,用于下拉刷新
onPageScroll(e) {
this.mescroll && this.mescroll.onPageScroll(e);
},
onLoad(option) {
this.subjectId=option.subjectId;
this.listQuery.mainBody=option.subjectId;
this.listQuery.year=option.year;
this.getYear();
this.siteCode=option.index;
},
methods: {
//切换杂志年份
tapTab(val,index){
this.siteCode=index;
this.isShowLoad=true;
this.listQuery.year=val.yearId;
this.getList()
},
goBack(){
uni.navigateBack({
delta: 1
});
},
//跳到检索页
toSearch(){
uni.navigateTo({
url: '../search/index'
});
},
//根据主体获取年份
getYear(){
getYearAPI(this.subjectId).then(res=>{
if(res.data.code==0){
if(res.data.data.length>0){
this.subjectList=res.data.data;
}else{
this.subjectList=[]
}
}
})
},
//获取杂志
getList(){
getListAPI(this.listQuery).then(res => {
this.isShowLoad=false
if(res.data.code==0){
this.list=res.data.data.list
}else{
this.list=[]
}
})
},
//跳到详情页
toDetails(id){
uni.navigateTo({
url: '../details/index?id='+id
});
},
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
// 下拉刷新的回调
downCallback(mescroll){
mescroll.resetUpScroll()
},
upCallback(mescroll) {
console.log(9)
//联网加载数据
this.listQuery.pageNum=mescroll.num;
this.getListDataFromNet(this.listQuery, (curPageData)=>{
mescroll.endSuccess(curPageData.length);
//设置列表数据
if(mescroll.num == 1) this.list = [];
this.list=this.list.concat(curPageData);
}, () => {
//联网失败的回调,隐藏下拉刷新的状态
mescroll.endErr();
})
},
getListDataFromNet(postdata,successCallback,errorCallback) {
uni.request({
url: ApiUrl+'/resource/wap/ebook/page-book',
data:postdata,
method:'get',
success: (data) => {
var listData=[];
if(data.data.code==0){
listData=data.data.data.list
}
//联网成功的回调
successCallback && successCallback(listData);
},
fail: () => {
errorCallback && errorCallback();
}
})
}
}
}
</script>
<style lang="less" scoped>
.yearlist_page{
.searchHeader{
padding: 16upx 30upx 10upx 24upx;
display: flex;
align-items: center;
height: 68upx;
background: url('../../static/banner.png') no-repeat;
background-size: 100%;
.backImgBox{
height: 100%;
}
.back{
height: 38upx;
width: 21upx;
margin-right: 27upx;
vertical-align: middle;
margin-top: 6upx;
}
.ipt{
height: 68upx;
width: 574upx;
color: white;
text-align: center;
line-height: 68upx;
font-size: 18px;
margin-right: 18upx;
}
.search{
height: 38upx;
width: 38upx;
}
}
.uni-tab-bar11 {
height: 100upx;
overflow: hidden;
background: white;
border-bottom: 1px solid #eeeeee;
.uni-swiper-tab {
line-height: 100upx;
height: 100upx;
.swiper-tab-list {
width: auto !important;
padding: 0 40upx;
color: #666666;
font-size: 28upx;
.wordCont {
margin-bottom: 4upx;
}
}
.active {
width: auto !important;
padding: 0 20upx;
color: #DB1115 !important;
font-size: 36upx;
opacity: 1;
font-weight: bold;
}
.borderBtm {
height: 8upx;
width: 50upx;
background: #DB1115;
border-radius: 10upx;
margin-top: 12upx;
margin: 10upx auto;
}
}
}
.managizeList{
padding: 40upx 24upx 50upx;
// display: flex;
// flex-wrap: wrap;
.olist{
width: 196upx;
height: 350upx;
margin-bottom: 50upx;
float: left;
}
.marginR{
margin-right: 52upx;
}
image{
height: 264upx;
width: 196upx;
margin-bottom: 30upx;
}
.txt{
text-align: center;
color: #202021;
font-size: 12px;
}
}
}
</style>
import { ApiUrl } from './env.js'
const requestPath = {
common: '/sysuser/wap',
book: '/book/wap',
content: 'content/wap',
stock: '/repertory/wap',
marketing: '/marketing/wap',
order: '/order/wap',
resource: '/resource/wap',
third: '/third',
file: '/file/file/',
works: '/works/wap',
ftp:'/file/ftp',
statistics:'/statistics/wap',
sysuser:'/sysuser/fg',
pdf:'/pdf/file'
// ipPort:'http://122.14.50.6:8096',
// ipPort:'http://192.168.2.7:8096',
}
const ajax = (opt) => {
opt = opt || {}
opt.url = opt.url || ''
opt.method = opt.method || 'GET';
opt.header = opt.header || {
"Content-Type": "application/json"
};
opt.success = opt.success || function () {}
return new Promise((resolve,reject) => {
console.log(ApiUrl+opt.url,"0000")
uni.request({
url:ApiUrl+opt.url,
data: opt.data,
method: opt.method,
header: opt.header,
dataType: 'json',
success: function (res) {
// opt.success(res);
resolve(res)
},
fail: function (res) {
reject(
/* uni.showToast({
title: '请稍后重试',
icon:'none',
duration:12000,
})*/)
}
})
})
}
const upload = (opt) => {
opt = opt || {}
opt.url = opt.url || ''
opt.filePath = opt.filePath || null;//要上传文件资源的路径。
opt.name = opt.name || null;
// opt.header = opt.header || {
// "Content-Type": "multipart/form-data"
// };
opt.success = opt.success || function () {}
return new Promise((resolve,reject) => {
uni.uploadFile({
url:ApiUrl+opt.url,
filePath: opt.filePath,
name:opt.name,
formData:opt.formData,
success: function (res) {
resolve(res)
},
fail: function (res) {
reject(
uni.showToast({
title: '请稍后重试',
icon:'none',
duration:12000,
}))
}
})
})
}
export {
ajax,
requestPath,
upload
}
\ No newline at end of file
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24upx;
$uni-font-size-base:28upx;
$uni-font-size-lg:32upx;
/* 图片尺寸 */
$uni-img-size-sm:40upx;
$uni-img-size-base:52upx;
$uni-img-size-lg:80upx;
/* Border Radius */
$uni-border-radius-sm: 4upx;
$uni-border-radius-base: 6upx;
$uni-border-radius-lg: 12upx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20upx;
$uni-spacing-row-lg: 30upx;
/* 垂直间距 */
$uni-spacing-col-sm: 8upx;
$uni-spacing-col-base: 16upx;
$uni-spacing-col-lg: 24upx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx;
\ No newline at end of file
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>中国政协杂志社</title><script>document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/wap/static/index.css><link href=/wap/static/js/pages-details-article.e3685172.js rel=prefetch><link href=/wap/static/js/pages-details-index.2a358567.js rel=prefetch><link href=/wap/static/js/pages-index-index.53f12303.js rel=prefetch><link href=/wap/static/js/pages-search-index.94ba07dc.js rel=prefetch><link href=/wap/static/js/pages-search-list.f24d97f0.js rel=prefetch><link href=/wap/static/js/pages-search-list~pages-search-yearList.f1b340bf.js rel=prefetch><link href=/wap/static/js/pages-search-yearList.6dc2be43.js rel=prefetch><link href=/wap/static/js/chunk-vendors.39e5fd46.js rel=preload as=script><link href=/wap/static/js/index.6ae67db8.js rel=preload as=script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/wap/static/js/chunk-vendors.39e5fd46.js></script><script src=/wap/static/js/index.6ae67db8.js></script></body></html>
\ No newline at end of file
差异被折叠。
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-details-article"],{"260e":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=t.requestPath=t.ajax=void 0;var i=a("3ad8"),n={common:"/sysuser/wap",book:"/book/wap",content:"content/wap",stock:"/repertory/wap",marketing:"/marketing/wap",order:"/order/wap",resource:"/resource/wap",third:"/third",file:"/file/file/",works:"/works/wap",ftp:"/file/ftp",statistics:"/statistics/wap",sysuser:"/sysuser/fg",pdf:"/pdf/file"};t.requestPath=n;var r=function(e){return e=e||{},e.url=e.url||"",e.method=e.method||"GET",e.header=e.header||{"Content-Type":"application/json"},e.success=e.success||function(){},new Promise(function(t,a){console.log(i.ApiUrl+e.url,"0000"),uni.request({url:i.ApiUrl+e.url,data:e.data,method:e.method,header:e.header,dataType:"json",success:function(e){t(e)},fail:function(e){a()}})})};t.ajax=r;var o=function(e){return e=e||{},e.url=e.url||"",e.filePath=e.filePath||null,e.name=e.name||null,e.success=e.success||function(){},new Promise(function(t,a){uni.uploadFile({url:i.ApiUrl+e.url,filePath:e.filePath,name:e.name,formData:e.formData,success:function(e){t(e)},fail:function(e){a(uni.showToast({title:"请稍后重试",icon:"none",duration:12e3}))}})})};t.upload=o},5460:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a("73f3"),n={data:function(){return{id:"",articleData:{}}},onLoad:function(e){this.id=e.id,this.getDetail()},methods:{goBack:function(){uni.navigateBack({delta:1})},getDetail:function(){var e=this;console.log(777),(0,i.getArticleAPI)(this.id).then(function(t){0==t.data.code&&(e.articleData=t.data.data)})}}};t.default=n},"6ea3":function(e,t,a){e.exports=a.p+"static/img/banner.f92e01db.png"},"73f3":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubjectAPI=n,t.getNewsAPI=r,t.getYearAPI=o,t.getListAPI=c,t.getEbookAPI=s,t.gethotsAPI=u,t.getArticleAPI=l;var i=a("260e");function n(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/ebookMainBody/list"),method:"get"})}function r(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/ebook/index?oid=").concat(e),method:"get"})}function o(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/ebookMainBody/year?oid=").concat(e),method:"get"})}function c(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/ebook/page-book"),method:"get",data:e})}function s(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/ebook/get?id=").concat(e),method:"get"})}function u(e){return(0,i.ajax)({url:"".concat(i.requestPath.sysuser,"/hotsw/list?num=10"),method:"get"})}function l(e){return(0,i.ajax)({url:"".concat(i.requestPath.resource,"/article-library/get/").concat(e),method:"get"})}},7422:function(e,t,a){"use strict";a.r(t);var i=a("d289"),n=a("92ed");for(var r in n)"default"!==r&&function(e){a.d(t,e,function(){return n[e]})}(r);a("f50f");var o=a("2877"),c=Object(o["a"])(n["default"],i["a"],i["b"],!1,null,"1a776d2e",null);t["default"]=c.exports},"92ed":function(e,t,a){"use strict";a.r(t);var i=a("5460"),n=a.n(i);for(var r in i)"default"!==r&&function(e){a.d(t,e,function(){return i[e]})}(r);t["default"]=n.a},9945:function(e,t,a){var i=a("b041");t=e.exports=a("2350")(!1),t.push([e.i,".article_page .searchHeader[data-v-1a776d2e]{padding:%?16?% %?30?% %?10?% %?24?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:%?68?%;background:url("+i(a("6ea3"))+") no-repeat;background-size:100%}.article_page .searchHeader .backImgBox[data-v-1a776d2e]{height:100%}.article_page .searchHeader .back[data-v-1a776d2e]{height:%?38?%;width:%?21?%;margin-right:%?27?%;vertical-align:middle;margin-top:%?6?%}.article_page .searchHeader .ipt[data-v-1a776d2e]{height:%?68?%;width:%?574?%;color:#fff;text-align:center;line-height:%?68?%;font-size:18px;margin-right:%?18?%}.article_page .searchHeader .search[data-v-1a776d2e]{height:%?38?%;width:%?38?%}.article_page .title[data-v-1a776d2e]{margin:%?58?% %?32?% 0;border-bottom:1px solid #e6e6e6}.article_page .title h6[data-v-1a776d2e]{font-size:20px}.article_page .title .readNum[data-v-1a776d2e]{margin:%?46?% 0 %?32?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;font-size:12px;color:#c8cad2}.article_page .title .read[data-v-1a776d2e]{color:#f55827}.article_page .articleCon[data-v-1a776d2e]{padding:%?48?% %?34?%;color:#333;text-indent:%?32?%}",""])},b041:function(e,t){e.exports=function(e){return"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},cbf6:function(e,t,a){var i=a("9945");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("47963827",i,!0,{sourceMap:!1,shadowMode:!1})},d289:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"article_page"},[a("v-uni-view",{staticClass:"searchHeader"},[a("v-uni-view",{staticClass:"backImgBox",on:{click:function(t){t=e.$handleEvent(t),e.goBack()}}},[a("v-uni-image",{staticClass:"back",attrs:{src:"../../static/back.png",mode:""}})],1),a("v-uni-view",{staticClass:"ipt"},[e._v("阅读")])],1),a("v-uni-view",{staticClass:"title"},[a("h6",[e._v(e._s(e.articleData.name))]),a("v-uni-view",{staticClass:"readNum"},[a("v-uni-text",{staticClass:"time"},[e._v("2019-07-24 21:04:47")]),a("v-uni-text",{staticClass:"source"},[e._v("来源:"+e._s(e.articleData.source))]),a("v-uni-text",{staticClass:"read"},[e._v("阅读量:"+e._s(e.articleData.browseNum))])],1)],1),a("v-uni-view",{staticClass:"articleCon",domProps:{innerHTML:e._s(e.articleData.text)}})],1)},n=[];a.d(t,"a",function(){return i}),a.d(t,"b",function(){return n})},f50f:function(e,t,a){"use strict";var i=a("cbf6"),n=a.n(i);n.a}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-search-index"],{"0c9e":function(e,t,a){var n=a("b041");t=e.exports=a("2350")(!1),t.push([e.i,".search_page .searchHeader[data-v-76f812c4]{padding:%?16?% %?30?% %?10?% %?24?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:%?68?%;background:url("+n(a("6ea3"))+") no-repeat;background-size:100%}.search_page .searchHeader .backImgBox[data-v-76f812c4]{height:100%}.search_page .searchHeader .back[data-v-76f812c4]{height:%?38?%;width:%?21?%;margin-right:%?27?%;vertical-align:middle;margin-top:%?6?%}.search_page .searchHeader .ipt[data-v-76f812c4]{height:%?68?%;width:%?574?%;position:relative;margin-right:%?18?%}.search_page .searchHeader .ipt .inpImg[data-v-76f812c4]{height:%?26?%;width:%?26?%;position:absolute;top:%?21?%;left:%?21?%;z-index:100}.search_page .searchHeader .ipt .delete[data-v-76f812c4]{height:%?28?%;width:%?28?%;position:absolute;top:%?21?%;right:%?21?%;z-index:100}.search_page .searchHeader .ipt[data-v-76f812c4] .input-placeholder{color:#bbbec3}.search_page .searchHeader .ipt uni-input[data-v-76f812c4]{background:#fff;-webkit-border-radius:%?34?%;border-radius:%?34?%;color:#333;padding:0 %?60?%;height:100%}.search_page .searchHeader uni-text[data-v-76f812c4]{color:#fff;font-size:14px}.search_page .hotsBox[data-v-76f812c4]{padding:%?49?% %?24?%}.search_page .hotsBox h6[data-v-76f812c4]{color:#3d3d3d;margin-bottom:%?35?%;font-size:14px}.search_page .hotsBox .olist[data-v-76f812c4]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.search_page .hotsBox .hot[data-v-76f812c4]{padding:%?20?% %?28?%;background:#f9f5ed;margin:0 %?20?% %?20?% 0;font-size:14px;color:#555}",""])},"260e":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.upload=t.requestPath=t.ajax=void 0;var n=a("3ad8"),r={common:"/sysuser/wap",book:"/book/wap",content:"content/wap",stock:"/repertory/wap",marketing:"/marketing/wap",order:"/order/wap",resource:"/resource/wap",third:"/third",file:"/file/file/",works:"/works/wap",ftp:"/file/ftp",statistics:"/statistics/wap",sysuser:"/sysuser/fg",pdf:"/pdf/file"};t.requestPath=r;var i=function(e){return e=e||{},e.url=e.url||"",e.method=e.method||"GET",e.header=e.header||{"Content-Type":"application/json"},e.success=e.success||function(){},new Promise(function(t,a){console.log(n.ApiUrl+e.url,"0000"),uni.request({url:n.ApiUrl+e.url,data:e.data,method:e.method,header:e.header,dataType:"json",success:function(e){t(e)},fail:function(e){a()}})})};t.ajax=i;var o=function(e){return e=e||{},e.url=e.url||"",e.filePath=e.filePath||null,e.name=e.name||null,e.success=e.success||function(){},new Promise(function(t,a){uni.uploadFile({url:n.ApiUrl+e.url,filePath:e.filePath,name:e.name,formData:e.formData,success:function(e){t(e)},fail:function(e){a(uni.showToast({title:"请稍后重试",icon:"none",duration:12e3}))}})})};t.upload=o},3636:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("73f3"),r={data:function(){return{hotList:[],keywords:""}},onLoad:function(){this.gethots()},methods:{goBack:function(){uni.navigateBack({delta:1})},deletes:function(){this.keywords=""},toList:function(e){uni.navigateTo({url:"list?keywords="+e})},gethots:function(){var e=this;(0,n.gethotsAPI)().then(function(t){0==t.data.code&&(e.hotList=t.data.data)})}}};t.default=r},"3f56":function(e,t,a){"use strict";a.r(t);var n=a("3636"),r=a.n(n);for(var i in n)"default"!==i&&function(e){a.d(t,e,function(){return n[e]})}(i);t["default"]=r.a},"69d0":function(e,t,a){"use strict";a.r(t);var n=a("fe9f"),r=a("3f56");for(var i in r)"default"!==i&&function(e){a.d(t,e,function(){return r[e]})}(i);a("89ea");var o=a("2877"),s=Object(o["a"])(r["default"],n["a"],n["b"],!1,null,"76f812c4",null);t["default"]=s.exports},"6ea3":function(e,t,a){e.exports=a.p+"static/img/banner.f92e01db.png"},"73f3":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSubjectAPI=r,t.getNewsAPI=i,t.getYearAPI=o,t.getListAPI=s,t.getEbookAPI=c,t.gethotsAPI=u,t.getArticleAPI=d;var n=a("260e");function r(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/ebookMainBody/list"),method:"get"})}function i(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/ebook/index?oid=").concat(e),method:"get"})}function o(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/ebookMainBody/year?oid=").concat(e),method:"get"})}function s(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/ebook/page-book"),method:"get",data:e})}function c(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/ebook/get?id=").concat(e),method:"get"})}function u(e){return(0,n.ajax)({url:"".concat(n.requestPath.sysuser,"/hotsw/list?num=10"),method:"get"})}function d(e){return(0,n.ajax)({url:"".concat(n.requestPath.resource,"/article-library/get/").concat(e),method:"get"})}},"857f":function(e,t,a){var n=a("0c9e");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var r=a("4f06").default;r("6e740647",n,!0,{sourceMap:!1,shadowMode:!1})},"89ea":function(e,t,a){"use strict";var n=a("857f"),r=a.n(n);r.a},b041:function(e,t){e.exports=function(e){return"string"!==typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},fe9f:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"search_page"},[a("v-uni-view",{staticClass:"searchHeader"},[a("v-uni-view",{staticClass:"backImgBox",on:{click:function(t){t=e.$handleEvent(t),e.goBack()}}},[a("v-uni-image",{staticClass:"back",attrs:{src:"../../static/back.png",mode:""}})],1),a("v-uni-view",{staticClass:"ipt"},[a("v-uni-image",{staticClass:"inpImg",attrs:{src:"../../static/searchIdx.png",mode:""}}),a("v-uni-input",{attrs:{type:"text",placeholder:"请输入搜索内容"},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}),e.keywords?a("v-uni-image",{staticClass:"delete",attrs:{src:"../../static/delete.png",mode:""},on:{click:function(t){t=e.$handleEvent(t),e.deletes(t)}}}):e._e()],1),a("v-uni-text",{on:{click:function(t){t=e.$handleEvent(t),e.toList(e.keywords)}}},[e._v("搜索")])],1),a("v-uni-view",{staticClass:"hotsBox"},[a("h6",[e._v("热门搜索")]),a("v-uni-view",{staticClass:"olist"},e._l(e.hotList,function(t,n){return a("v-uni-view",{key:n,staticClass:"hot",on:{click:function(a){a=e.$handleEvent(a),e.toList(t.hotSearchWord)}}},[e._v(e._s(t.hotSearchWord))])}),1)],1)],1)},r=[];a.d(t,"a",function(){return n}),a.d(t,"b",function(){return r})}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-search-list"],{"06c5":function(e,t,i){"use strict";i.r(t);var a=i("f9fd"),s=i.n(a);for(var o in a)"default"!==o&&function(e){i.d(t,e,function(){return a[e]})}(o);t["default"]=s.a},3442:function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"searchlist_page"},[i("v-uni-view",{staticClass:"fixedBox"},[i("v-uni-view",{staticClass:"searchHeader"},[i("v-uni-view",{staticClass:"backImgBox",on:{click:function(t){t=e.$handleEvent(t),e.goBack(t)}}},[i("v-uni-image",{staticClass:"back",attrs:{src:"../../static/back.png",mode:""}})],1),i("v-uni-view",{staticClass:"ipt"},[i("v-uni-image",{staticClass:"inpImg",attrs:{src:"../../static/searchIdx.png",mode:""}}),i("v-uni-input",{attrs:{type:"text",placeholder:"请输入搜索内容"},model:{value:e.listQuery.keywords,callback:function(t){e.$set(e.listQuery,"keywords",t)},expression:"listQuery.keywords"}}),e.listQuery.keywords?i("v-uni-image",{staticClass:"delete",attrs:{src:"../../static/delete.png",mode:""},on:{click:function(t){t=e.$handleEvent(t),e.deletes(t)}}}):e._e()],1),i("v-uni-text",{on:{click:function(t){t=e.$handleEvent(t),e.searchFor(t)}}},[e._v("搜索")])],1),i("v-uni-view",{staticClass:"tabBox"},[e._l(e.tabList,function(t,a){return i("v-uni-view",{key:a,class:["tabs",e.tabIndex==a?"active":""],on:{click:function(i){i=e.$handleEvent(i),e.tabs(t,a)}}},[i("v-uni-image",{attrs:{src:"../../static/"+t.id+".png",mode:""}}),i("span",[e._v(e._s(t.name))])],1)}),i("v-uni-view",{staticClass:"cutLine"})],2)],1),i("v-uni-view",{staticClass:"listBox"},[e.isShowLoad?i("uni-load-more",{attrs:{status:"loading"}}):i("mescroll-uni",{on:{down:function(t){t=e.$handleEvent(t),e.downCallback(t)},up:function(t){t=e.$handleEvent(t),e.upCallback(t)},init:function(t){t=e.$handleEvent(t),e.mescrollInit(t)}}},[i("v-uni-view",{staticClass:"olist"},e._l(e.booklist,function(t,a){return i("v-uni-view",{key:a,staticClass:"list"},[i("v-uni-view",{staticClass:"tit"},[e._v(e._s(t.name))]),i("v-uni-view",{staticClass:"intro",domProps:{innerHTML:e._s(t.synopsis)}}),i("v-uni-view",{staticClass:"stageBox"},[t.mainBody?i("v-uni-view",{staticClass:"stage"},[e._v(e._s(t.mainBody))]):e._e(),t.source?i("v-uni-view",{staticClass:"stage"},[e._v("来源: "+e._s(t.source))]):e._e(),i("v-uni-view",{staticClass:"date"},[e._v(e._s(t.uploadTime))])],1)],1)}),1)],1)],1)],1)},s=[];i.d(t,"a",function(){return a}),i.d(t,"b",function(){return s})},"348c":function(e,t,i){var a=i("b041");t=e.exports=i("2350")(!1),t.push([e.i,".searchlist_page .searchHeader[data-v-573b3eeb]{padding:%?16?% %?30?% %?10?% %?24?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:%?68?%;background:url("+a(i("6ea3"))+") no-repeat;background-size:100%}.searchlist_page .searchHeader .backImgBox[data-v-573b3eeb]{height:100%}.searchlist_page .searchHeader .back[data-v-573b3eeb]{height:%?38?%;width:%?21?%;margin-right:%?27?%;vertical-align:middle;margin-top:%?6?%}.searchlist_page .searchHeader .ipt[data-v-573b3eeb]{height:%?68?%;width:%?574?%;position:relative;margin-right:%?18?%}.searchlist_page .searchHeader .ipt .inpImg[data-v-573b3eeb]{height:%?26?%;width:%?26?%;position:absolute;top:%?21?%;left:%?18?%;z-index:100}.searchlist_page .searchHeader .ipt .delete[data-v-573b3eeb]{height:%?28?%;width:%?28?%;position:absolute;top:%?21?%;right:%?21?%;z-index:100}.searchlist_page .searchHeader .ipt uni-input[data-v-573b3eeb]{background:#fff;-webkit-border-radius:%?34?%;border-radius:%?34?%;color:#333;padding:0 %?60?%;height:100%}.searchlist_page .searchHeader .ipt[data-v-573b3eeb] .input-placeholder{color:#bbbec3}.searchlist_page .searchHeader uni-text[data-v-573b3eeb]{color:#fff;font-size:14px}.searchlist_page .fixedBox[data-v-573b3eeb]{position:fixed;top:0;z-index:9999}.searchlist_page .listBox[data-v-573b3eeb]{margin-top:%?184?%}.searchlist_page .tabBox[data-v-573b3eeb]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:%?90?%;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.searchlist_page .tabBox .tabs[data-v-573b3eeb]{width:50%;text-align:center;font-size:16px;font-weight:700;color:#333;border-bottom:1px solid #e9dbc1;background:#fdfaf4;height:100%;line-height:%?90?%}.searchlist_page .tabBox .tabs uni-image[data-v-573b3eeb]{width:%?40?%;height:%?42?%;margin-right:%?12?%;vertical-align:middle}.searchlist_page .tabBox .active[data-v-573b3eeb]{color:#eb0208}.searchlist_page .tabBox .cutLine[data-v-573b3eeb]{height:%?80?%;width:1px;background:#fdfaf4;border-left:1px solid #e9dbc1;position:absolute}.searchlist_page .olist[data-v-573b3eeb]{padding:%?41?% %?24?%}.searchlist_page .olist .list[data-v-573b3eeb]{border-bottom:1px solid #ededed;margin-bottom:40px;font-size:14px}.searchlist_page .olist .list .tit[data-v-573b3eeb]{color:#202020;font-size:16px;margin-bottom:%?25?%;font-weight:700;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.searchlist_page .olist .list .intro[data-v-573b3eeb]{margin-bottom:%?35?%;color:#555;display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-o-text-overflow:ellipsis;text-overflow:ellipsis;-webkit-line-clamp:2}.searchlist_page .olist .list .stageBox[data-v-573b3eeb]{margin-bottom:%?25?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;color:#bbb}.searchlist_page .olist .list .stageBox .stage[data-v-573b3eeb]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.searchlist_page .olist .list .stageBox .date[data-v-573b3eeb]{width:%?240?%;font-size:12px;margin-left:%?20?%}",""])},"56bd":function(e,t,i){"use strict";i.r(t);var a=i("3442"),s=i("06c5");for(var o in s)"default"!==o&&function(e){i.d(t,e,function(){return s[e]})}(o);i("850f");var n=i("2877"),l=Object(n["a"])(s["default"],a["a"],a["b"],!1,null,"573b3eeb",null);t["default"]=l.exports},"61dc":function(e,t,i){var a=i("348c");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var s=i("4f06").default;s("87dcf610",a,!0,{sourceMap:!1,shadowMode:!1})},"850f":function(e,t,i){"use strict";var a=i("61dc"),s=i.n(a);s.a},f9fd:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i("73f3"),s=l(i("ef9c")),o=l(i("a409")),n=i("3ad8");function l(e){return e&&e.__esModule?e:{default:e}}var c={components:{MescrollUni:s.default,uniLoadMore:o.default},data:function(){return{tabList:[{name:"杂志",id:"managizeAc"},{name:"文章",id:"article"}],tabIndex:0,booklist:[],isShowLoad:!1,showLoading:!1,mescroll:null,downOption:{use:!1,auto:!1},listQuery:{type:1,keywords:"",pageNum:1,pageSize:20}}},onReachBottom:function(){this.mescroll&&this.mescroll.onReachBottom()},onPageScroll:function(e){this.mescroll&&this.mescroll.onPageScroll(e)},onLoad:function(e){this.listQuery.keywords=e.keywords},methods:{goBack:function(){uni.navigateBack({delta:1})},deletes:function(){this.listQuery.keywords=""},tabs:function(e,t){var i=this;this.isShowLoad=!0,this.tabList.forEach(function(e,a){i.tabList[a].id=i.tabList[a].id.replace(/Ac/g,""),t==a&&(i.tabList[t].id=i.tabList[t].id+"Ac")}),this.tabIndex=t,this.listQuery.type=t+1,this.getList()},getList:function(){var e=this;(0,a.getListAPI)(this.listQuery).then(function(t){e.isShowLoad=!1,0==t.data.code?e.booklist=t.data.data.list:e.booklist=[]})},searchFor:function(){this.getList()},mescrollInit:function(e){this.mescroll=e},downCallback:function(e){e.resetUpScroll()},upCallback:function(e){var t=this;this.listQuery.pageNum=e.num,this.getListDataFromNet(this.listQuery,function(i){e.endSuccess(i.length),1==e.num&&(t.booklist=[]),t.booklist=t.booklist.concat(i)},function(){e.endErr()})},getListDataFromNet:function(e,t,i){uni.request({url:n.ApiUrl+"/resource/wap/ebook/page-book",data:e,method:"get",success:function(e){var i=[];0==e.data.code&&(i=e.data.data.list),t&&t(i)},fail:function(){i&&i()}})}}};t.default=c}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-search-yearList"],{"0e30":function(t,a,i){"use strict";var e=i("ba60"),n=i.n(e);n.a},"124c":function(t,a,i){"use strict";var e=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("v-uni-view",{staticClass:"yearlist_page"},[i("v-uni-view",{staticClass:"searchHeader"},[i("v-uni-view",{staticClass:"backImgBox",on:{click:function(a){a=t.$handleEvent(a),t.goBack()}}},[i("v-uni-image",{staticClass:"back",attrs:{src:"../../static/back.png",mode:""}})],1),i("v-uni-view",{staticClass:"ipt"},[t._v("列表页")]),i("v-uni-image",{staticClass:"search",attrs:{src:"../../static/search.png",mode:""},on:{click:function(a){a=t.$handleEvent(a),t.toSearch()}}})],1),i("v-uni-view",{staticClass:"uni-tab-bar11"},[i("v-uni-scroll-view",{staticClass:"uni-swiper-tab",attrs:{id:"tab-bar","scroll-x":"","scroll-left":t.scrollLeft}},t._l(t.subjectList,function(a,e){return i("v-uni-view",{key:e,class:["swiper-tab-list",t.siteCode==e?"active":""],attrs:{id:e,"data-current":e},on:{click:function(i){i=t.$handleEvent(i),t.tapTab(a,e)}}},[i("v-uni-view",{staticClass:"wordCont"},[t._v(t._s(a.name)+"年")]),i("v-uni-view",{class:[t.siteCode==e?"borderBtm":""]})],1)}),1)],1),i("v-uni-view",{staticClass:"managizeList"},[t.isShowLoad?i("uni-load-more",{attrs:{status:"loading"}}):i("mescroll-uni",{on:{down:function(a){a=t.$handleEvent(a),t.downCallback(a)},up:function(a){a=t.$handleEvent(a),t.upCallback(a)},init:function(a){a=t.$handleEvent(a),t.mescrollInit(a)}}},[t._l(t.list,function(a,e){return i("v-uni-view",{key:e,class:["olist",e%3!=2?"marginR":""],on:{click:function(i){i=t.$handleEvent(i),t.toDetails(a.id)}}},[i("v-uni-view",{staticClass:"imgs"},[a.bookCover?i("v-uni-image",{attrs:{src:t.fileUrl(a.bookCover),mode:""}}):i("v-uni-image",{attrs:{src:"../../static/list.png",mode:""}})],1),i("v-uni-view",{staticClass:"txt"},[t._v(t._s(a.name))])],1)}),t.showLoading?i("v-uni-view",{}):t._e()],2)],1)],1)},n=[];i.d(a,"a",function(){return e}),i.d(a,"b",function(){return n})},5078:function(t,a,i){"use strict";i.r(a);var e=i("124c"),n=i("5596");for(var s in n)"default"!==s&&function(t){i.d(a,t,function(){return n[t]})}(s);i("0e30");var r=i("2877"),o=Object(r["a"])(n["default"],e["a"],e["b"],!1,null,"354a30b9",null);a["default"]=o.exports},5596:function(t,a,i){"use strict";i.r(a);var e=i("de50"),n=i.n(e);for(var s in e)"default"!==s&&function(t){i.d(a,t,function(){return e[t]})}(s);a["default"]=n.a},"5bd8":function(t,a,i){var e=i("b041");a=t.exports=i("2350")(!1),a.push([t.i,".yearlist_page .searchHeader[data-v-354a30b9]{padding:%?16?% %?30?% %?10?% %?24?%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:%?68?%;background:url("+e(i("6ea3"))+") no-repeat;background-size:100%}.yearlist_page .searchHeader .backImgBox[data-v-354a30b9]{height:100%}.yearlist_page .searchHeader .back[data-v-354a30b9]{height:%?38?%;width:%?21?%;margin-right:%?27?%;vertical-align:middle;margin-top:%?6?%}.yearlist_page .searchHeader .ipt[data-v-354a30b9]{height:%?68?%;width:%?574?%;color:#fff;text-align:center;line-height:%?68?%;font-size:18px;margin-right:%?18?%}.yearlist_page .searchHeader .search[data-v-354a30b9]{height:%?38?%;width:%?38?%}.yearlist_page .uni-tab-bar11[data-v-354a30b9]{height:%?100?%;overflow:hidden;background:#fff;border-bottom:1px solid #eee}.yearlist_page .uni-tab-bar11 .uni-swiper-tab[data-v-354a30b9]{line-height:%?100?%;height:%?100?%}.yearlist_page .uni-tab-bar11 .uni-swiper-tab .swiper-tab-list[data-v-354a30b9]{width:auto!important;padding:0 %?40?%;color:#666;font-size:%?28?%}.yearlist_page .uni-tab-bar11 .uni-swiper-tab .swiper-tab-list .wordCont[data-v-354a30b9]{margin-bottom:%?4?%}.yearlist_page .uni-tab-bar11 .uni-swiper-tab .active[data-v-354a30b9]{width:auto!important;padding:0 %?20?%;color:#db1115!important;font-size:%?36?%;opacity:1;font-weight:700}.yearlist_page .uni-tab-bar11 .uni-swiper-tab .borderBtm[data-v-354a30b9]{height:%?8?%;width:%?50?%;background:#db1115;-webkit-border-radius:%?10?%;border-radius:%?10?%;margin-top:%?12?%;margin:%?10?% auto}.yearlist_page .managizeList[data-v-354a30b9]{padding:%?40?% %?24?% %?50?%}.yearlist_page .managizeList .olist[data-v-354a30b9]{width:%?196?%;height:%?350?%;margin-bottom:%?50?%;float:left}.yearlist_page .managizeList .marginR[data-v-354a30b9]{margin-right:%?52?%}.yearlist_page .managizeList uni-image[data-v-354a30b9]{height:%?264?%;width:%?196?%;margin-bottom:%?30?%}.yearlist_page .managizeList .txt[data-v-354a30b9]{text-align:center;color:#202021;font-size:12px}",""])},ba60:function(t,a,i){var e=i("5bd8");"string"===typeof e&&(e=[[t.i,e,""]]),e.locals&&(t.exports=e.locals);var n=i("4f06").default;n("38288c8a",e,!0,{sourceMap:!1,shadowMode:!1})},de50:function(t,a,i){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var e=i("73f3"),n=o(i("ef9c")),s=o(i("a409")),r=i("3ad8");function o(t){return t&&t.__esModule?t:{default:t}}var l={components:{MescrollUni:n.default,uniLoadMore:s.default},data:function(){return{siteCode:0,scrollLeft:0,subjectId:"",subjectList:[],list:[],isShowLoad:!1,showLoading:!1,mescroll:null,downOption:{use:!1,auto:!1},listQuery:{type:1,year:null,mainBody:null,pageNum:1,pageSize:10}}},onReachBottom:function(){this.mescroll&&this.mescroll.onReachBottom()},onPageScroll:function(t){this.mescroll&&this.mescroll.onPageScroll(t)},onLoad:function(t){this.subjectId=t.subjectId,this.listQuery.mainBody=t.subjectId,this.listQuery.year=t.year,this.getYear(),this.siteCode=t.index},methods:{tapTab:function(t,a){this.siteCode=a,this.isShowLoad=!0,this.listQuery.year=t.yearId,this.getList()},goBack:function(){uni.navigateBack({delta:1})},toSearch:function(){uni.navigateTo({url:"../search/index"})},getYear:function(){var t=this;(0,e.getYearAPI)(this.subjectId).then(function(a){0==a.data.code&&(a.data.data.length>0?t.subjectList=a.data.data:t.subjectList=[])})},getList:function(){var t=this;(0,e.getListAPI)(this.listQuery).then(function(a){t.isShowLoad=!1,0==a.data.code?t.list=a.data.data.list:t.list=[]})},toDetails:function(t){uni.navigateTo({url:"../details/index?id="+t})},mescrollInit:function(t){this.mescroll=t},downCallback:function(t){t.resetUpScroll()},upCallback:function(t){var a=this;console.log(9),this.listQuery.pageNum=t.num,this.getListDataFromNet(this.listQuery,function(i){t.endSuccess(i.length),1==t.num&&(a.list=[]),a.list=a.list.concat(i)},function(){t.endErr()})},getListDataFromNet:function(t,a,i){uni.request({url:r.ApiUrl+"/resource/wap/ebook/page-book",data:t,method:"get",success:function(t){var i=[];0==t.data.code&&(i=t.data.data.list),a&&a(i)},fail:function(){i&&i()}})}}};a.default=l}}]);
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论