parent
e5a4ba1099
commit
dae1083fa8
@ -1,112 +1,163 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"moment@2.29.3",
|
||||
"/Users/mac/Documents/朗业/2023/s-苏州博物馆/szgb-book-wx"
|
||||
]
|
||||
],
|
||||
"_from": "moment@2.29.3",
|
||||
"_id": "moment@2.29.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==",
|
||||
"_location": "/moment",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "moment@2.29.3",
|
||||
"name": "moment",
|
||||
"version": "2.29.3",
|
||||
"description": "Parse, validate, manipulate, and display dates",
|
||||
"homepage": "https://momentjs.com",
|
||||
"author": "Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)",
|
||||
"contributors": [
|
||||
"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)",
|
||||
"Rocky Meza (http://rockymeza.com)",
|
||||
"Matt Johnson <mj1856@hotmail.com> (http://codeofmatt.com)",
|
||||
"Isaac Cambron <isaac@isaaccambron.com> (http://isaaccambron.com)",
|
||||
"Andre Polykanine <andre@oire.org> (https://github.com/oire)"
|
||||
],
|
||||
"keywords": [
|
||||
"moment",
|
||||
"date",
|
||||
"time",
|
||||
"parse",
|
||||
"format",
|
||||
"validate",
|
||||
"i18n",
|
||||
"l10n",
|
||||
"ender"
|
||||
],
|
||||
"main": "./moment.js",
|
||||
"jsnext:main": "./dist/moment.js",
|
||||
"typings": "./moment.d.ts",
|
||||
"typesVersions": {
|
||||
">=3.1": {
|
||||
"*": [
|
||||
"ts3.1-typings/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moment/moment.git"
|
||||
"escapedName": "moment",
|
||||
"rawSpec": "2.29.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.29.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
|
||||
"_spec": "2.29.3",
|
||||
"_where": "/Users/mac/Documents/朗业/2023/s-苏州博物馆/szgb-book-wx",
|
||||
"author": {
|
||||
"name": "Iskren Ivov Chernev",
|
||||
"email": "iskren.chernev@gmail.com",
|
||||
"url": "https://github.com/ichernev"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/moment/moment/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Tim Wood",
|
||||
"email": "washwithcare@gmail.com",
|
||||
"url": "http://timwoodcreates.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/moment/moment/issues"
|
||||
{
|
||||
"name": "Rocky Meza",
|
||||
"url": "http://rockymeza.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"benchmark": "latest",
|
||||
"coveralls": "latest",
|
||||
"cross-env": "^6.0.3",
|
||||
"es6-promise": "latest",
|
||||
"eslint": "~6",
|
||||
"grunt": "latest",
|
||||
"grunt-benchmark": "latest",
|
||||
"grunt-cli": "latest",
|
||||
"grunt-contrib-clean": "latest",
|
||||
"grunt-contrib-concat": "latest",
|
||||
"grunt-contrib-copy": "latest",
|
||||
"grunt-contrib-uglify": "latest",
|
||||
"grunt-contrib-watch": "latest",
|
||||
"grunt-env": "latest",
|
||||
"grunt-exec": "latest",
|
||||
"grunt-karma": "latest",
|
||||
"grunt-nuget": "latest",
|
||||
"grunt-string-replace": "latest",
|
||||
"karma": "latest",
|
||||
"karma-chrome-launcher": "latest",
|
||||
"karma-firefox-launcher": "latest",
|
||||
"karma-qunit": "latest",
|
||||
"karma-sauce-launcher": "4.1.4",
|
||||
"load-grunt-tasks": "latest",
|
||||
"lodash": ">=4.17.19",
|
||||
"node-qunit": "latest",
|
||||
"nyc": "latest",
|
||||
"prettier": "latest",
|
||||
"qunit": "^2.10.0",
|
||||
"rollup": "2.17.1",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript3": "npm:typescript@^3.1.6",
|
||||
"uglify-js": "latest"
|
||||
{
|
||||
"name": "Matt Johnson",
|
||||
"email": "mj1856@hotmail.com",
|
||||
"url": "http://codeofmatt.com"
|
||||
},
|
||||
"ender": "./ender.js",
|
||||
"dojoBuild": "package.js",
|
||||
"jspm": {
|
||||
"files": [
|
||||
"moment.js",
|
||||
"moment.d.ts",
|
||||
"locale"
|
||||
],
|
||||
"map": {
|
||||
"moment": "./moment"
|
||||
},
|
||||
"buildConfig": {
|
||||
"uglify": true
|
||||
}
|
||||
{
|
||||
"name": "Isaac Cambron",
|
||||
"email": "isaac@isaaccambron.com",
|
||||
"url": "http://isaaccambron.com"
|
||||
},
|
||||
"scripts": {
|
||||
"ts3.1-typescript-test": "cross-env node_modules/typescript3/bin/tsc --project ts3.1-typing-tests",
|
||||
"typescript-test": "cross-env node_modules/typescript/bin/tsc --project typing-tests",
|
||||
"test": "grunt test",
|
||||
"eslint": "eslint Gruntfile.js tasks src",
|
||||
"prettier-check": "prettier --check Gruntfile.js tasks src",
|
||||
"prettier-fmt": "prettier --write Gruntfile.js tasks src",
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
|
||||
{
|
||||
"name": "Andre Polykanine",
|
||||
"email": "andre@oire.org",
|
||||
"url": "https://github.com/oire"
|
||||
}
|
||||
],
|
||||
"description": "Parse, validate, manipulate, and display dates",
|
||||
"devDependencies": {
|
||||
"benchmark": "latest",
|
||||
"coveralls": "latest",
|
||||
"cross-env": "^6.0.3",
|
||||
"es6-promise": "latest",
|
||||
"eslint": "~6",
|
||||
"grunt": "latest",
|
||||
"grunt-benchmark": "latest",
|
||||
"grunt-cli": "latest",
|
||||
"grunt-contrib-clean": "latest",
|
||||
"grunt-contrib-concat": "latest",
|
||||
"grunt-contrib-copy": "latest",
|
||||
"grunt-contrib-uglify": "latest",
|
||||
"grunt-contrib-watch": "latest",
|
||||
"grunt-env": "latest",
|
||||
"grunt-exec": "latest",
|
||||
"grunt-karma": "latest",
|
||||
"grunt-nuget": "latest",
|
||||
"grunt-string-replace": "latest",
|
||||
"karma": "latest",
|
||||
"karma-chrome-launcher": "latest",
|
||||
"karma-firefox-launcher": "latest",
|
||||
"karma-qunit": "latest",
|
||||
"karma-sauce-launcher": "4.1.4",
|
||||
"load-grunt-tasks": "latest",
|
||||
"lodash": ">=4.17.19",
|
||||
"node-qunit": "latest",
|
||||
"nyc": "latest",
|
||||
"prettier": "latest",
|
||||
"qunit": "^2.10.0",
|
||||
"rollup": "2.17.1",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript3": "npm:typescript@^3.1.6",
|
||||
"uglify-js": "latest"
|
||||
},
|
||||
"dojoBuild": "package.js",
|
||||
"ender": "./ender.js",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"homepage": "https://momentjs.com",
|
||||
"jsnext:main": "./dist/moment.js",
|
||||
"jspm": {
|
||||
"files": [
|
||||
"moment.js",
|
||||
"moment.d.ts",
|
||||
"locale"
|
||||
],
|
||||
"map": {
|
||||
"moment": "./moment"
|
||||
},
|
||||
"spm": {
|
||||
"main": "moment.js",
|
||||
"output": [
|
||||
"locale/*.js"
|
||||
]
|
||||
"buildConfig": {
|
||||
"uglify": true
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"moment",
|
||||
"date",
|
||||
"time",
|
||||
"parse",
|
||||
"format",
|
||||
"validate",
|
||||
"i18n",
|
||||
"l10n",
|
||||
"ender"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./moment.js",
|
||||
"name": "moment",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/moment/moment.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc npm test && nyc report",
|
||||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
|
||||
"eslint": "eslint Gruntfile.js tasks src",
|
||||
"prettier-check": "prettier --check Gruntfile.js tasks src",
|
||||
"prettier-fmt": "prettier --write Gruntfile.js tasks src",
|
||||
"test": "grunt test",
|
||||
"ts3.1-typescript-test": "cross-env node_modules/typescript3/bin/tsc --project ts3.1-typing-tests",
|
||||
"typescript-test": "cross-env node_modules/typescript/bin/tsc --project typing-tests"
|
||||
},
|
||||
"spm": {
|
||||
"main": "moment.js",
|
||||
"output": [
|
||||
"locale/*.js"
|
||||
]
|
||||
},
|
||||
"typesVersions": {
|
||||
">=3.1": {
|
||||
"*": [
|
||||
"ts3.1-typings/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"typings": "./moment.d.ts",
|
||||
"version": "2.29.3"
|
||||
}
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class='contop'>
|
||||
<image :src='info.image.url' mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- <view class='detail'>
|
||||
<view class='title'>{{info.name?info.name:''}}</view>
|
||||
<u-parse v-if='showContent' :content="info.content?info.content:' '" />
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uParse from '@/components/gaoyia-parse/parse.vue'
|
||||
export default {
|
||||
components: {
|
||||
uParse,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
id: '',
|
||||
showContent: false,
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id ? options.id : ''
|
||||
this.loadDetail()
|
||||
},
|
||||
methods: {
|
||||
cancelTime(val) {
|
||||
return val.substring(0, 10)
|
||||
},
|
||||
loadDetail() {
|
||||
var that = this;
|
||||
this.util.request({
|
||||
api: '/api/mobile/book/show',
|
||||
data: {
|
||||
id: that.id
|
||||
},
|
||||
utilSuccess: function(res) {
|
||||
that.info = res
|
||||
that.showContent = true
|
||||
},
|
||||
utilFail: function(res) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("/components/gaoyia-parse/parse.css");
|
||||
|
||||
.content {
|
||||
background-color: #fbf8f4;
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
/* padding-bottom:180rpx */
|
||||
}
|
||||
|
||||
.contop {
|
||||
/* padding: 80rpx 0;
|
||||
height: 648rpx; */
|
||||
font-size: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #393c40;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
/* height: calc(100vh - 240rpx) */
|
||||
}
|
||||
|
||||
.contop image {
|
||||
/* width: 368rpx;
|
||||
height: 488rpx; */
|
||||
width: 100%;
|
||||
margin: 0rpx auto;
|
||||
display: block;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: left;
|
||||
/* padding: 30rpx 0rpx; */
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
/* position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); */
|
||||
width: 90%;
|
||||
line-height: 1.5;
|
||||
/* padding: 30rpx; */
|
||||
}
|
||||
|
||||
.detail {
|
||||
background: linear-gradient(to bottom, #fff 30%, #fbf8f4 70%);
|
||||
/* min-height: calc(100vh - 648rpx); */
|
||||
/* height: 240rpx; */
|
||||
/* height:calc(100vh - 648rpx); */
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
/* overflow: scroll; */
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wxParse {
|
||||
line-height: 2.3;
|
||||
}
|
||||
</style>
|
||||
@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="bgtop">
|
||||
<image src="../../static/img/nav_top.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
<view class="bgcenter">
|
||||
|
||||
<view class="box-content">
|
||||
<scroll-view :scroll-y="true" :style="{height:height+'px'}">
|
||||
<rich-text :nodes="info.value"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bgbottom">
|
||||
<image src="../../static/img/nav_bottom.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.height = res.windowHeight - 80;
|
||||
}
|
||||
});
|
||||
this.loadConfigInfo();
|
||||
},
|
||||
methods: {
|
||||
|
||||
loadConfigInfo() {
|
||||
var that = this;
|
||||
this.util.request({
|
||||
api: '/api/mobile/other/config-show',
|
||||
data: {
|
||||
tag: "about"
|
||||
},
|
||||
utilSuccess: function(res) {
|
||||
res.value=res.value.replace(/\<img/g,"<img style='width:100%;height:auto;display:block'")
|
||||
that.info = res;
|
||||
},
|
||||
utilFail: function(res) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res,
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.box {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bgtop {
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.bgcenter {
|
||||
background: url("../../static/img/nav_middle.png") repeat-y;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.box-content {
|
||||
padding: 15rpx 20rpx;
|
||||
color: #351C1B;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.bgbottom {
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
@ -1,109 +0,0 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="bgtop">
|
||||
<image src="../../static/img/nav_top.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
<view class="bgcenter" :style="{height:height+'px'}">
|
||||
<view class="box-title">
|
||||
{{info.name||""}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{info.created_at||""}}
|
||||
</view>
|
||||
<view class="box-content">
|
||||
<rich-text :nodes="info.content"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bgbottom">
|
||||
<image src="../../static/img/nav_bottom.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
urls: {
|
||||
1: '/api/mobile/other/visit-notice-show',
|
||||
2: '/api/mobile/other/traffic-notice-show',
|
||||
4: '/api/mobile/other/ask-show'
|
||||
},
|
||||
info: {},
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.height = res.windowHeight - 60;
|
||||
}
|
||||
});
|
||||
this.type = options.type;
|
||||
that.loadInfo(options.id);
|
||||
},
|
||||
methods: {
|
||||
loadInfo(id) {
|
||||
var that = this;
|
||||
this.util.request({
|
||||
api: this.urls[this.type],
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
utilSuccess: function(res) {
|
||||
res.content = res.content.replace(/\<img/g,
|
||||
"<img style='width:100%;height:auto;display:block'")
|
||||
that.info = res;
|
||||
},
|
||||
utilFail: function(res) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res,
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.box {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bgtop {
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.bgcenter {
|
||||
background: url("../../static/img/nav_middle.png") repeat-y;
|
||||
background-size: 100% 100%;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
|
||||
.time {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.newbox {
|
||||
padding: 15rpx 20rpx;
|
||||
color: #351C1B;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.bgbottom {
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
@ -1,111 +0,0 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
<view class="bgtop">
|
||||
<image src="../../static/img/nav_top.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
<view class="bgcenter" :style="{height:height+'px'}">
|
||||
|
||||
<view class="listnews">
|
||||
<view class="newbox justify-between" v-for="(item,index) in list" :key="index" @click="toinfo(item.id)">
|
||||
<view class="newboxleft flex-row">
|
||||
<u-icon name="grid" color="#351C1B" size="24"></u-icon>
|
||||
<text class="title" style="margin-left: 10rpx;">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="newboxright">
|
||||
<text class="time">{{item.created_at}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bgbottom">
|
||||
<image src="../../static/img/nav_bottom.png" style="width: 100%;height: 100%;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
urls: {
|
||||
1: '/api/mobile/other/visit-notice-index',
|
||||
2: '/api/mobile/other/traffic-notice-index',
|
||||
4: '/api/mobile/other/ask-index'
|
||||
},
|
||||
type: 1,
|
||||
list: [],
|
||||
isloading: true
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
that.height = res.windowHeight - 60;
|
||||
}
|
||||
});
|
||||
this.type = options.type;
|
||||
that.loadList();
|
||||
},
|
||||
methods: {
|
||||
toinfo(id) {
|
||||
uni.navigateTo({
|
||||
url: "info?type=" + this.type + "&id=" + id
|
||||
})
|
||||
},
|
||||
loadList(page) {
|
||||
var that = this;
|
||||
this.util.request({
|
||||
api: this.urls[this.type],
|
||||
data: {
|
||||
page: page
|
||||
},
|
||||
utilSuccess: function(res) {
|
||||
that.list = res.data;
|
||||
this.isloading = false;
|
||||
},
|
||||
utilFail: function(res) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: res
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.box {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bgtop {
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.bgcenter {
|
||||
background: url("../../static/img/nav_middle.png") repeat-y;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.newbox {
|
||||
padding: 15rpx 20rpx;
|
||||
color: #351C1B;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.bgbottom {
|
||||
height: 40rpx;
|
||||
}
|
||||
</style>
|
||||
@ -1,27 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: "领取我的预约码"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@ -1,178 +0,0 @@
|
||||
<template>
|
||||
<view class='content'>
|
||||
<view>
|
||||
<u-empty v-if="dataList.length==0" marginTop="250"></u-empty>
|
||||
<view class="relic_list" v-else='dataList.length>0'>
|
||||
<view class='relic_item' v-for='item in dataList' @click='todetail(item.id)'>
|
||||
<img :src="item.head_upload.url" alt="">
|
||||
<view>
|
||||
<view>{{item.name}}</view>
|
||||
<view class='contain'>{{item.contain}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
isLoading: false,
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadrelic(1)
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
console.log("onPullDownRefresh")
|
||||
if (!this.isLoading) {
|
||||
this.loadrelic(this.currentPage + 1);
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log("onReachBottom")
|
||||
if (!this.isLoading) {
|
||||
this.loadrelic(this.currentPage + 1);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
relicChange(e) {
|
||||
this.current = e.index;
|
||||
this.loadrelic(1);
|
||||
},
|
||||
cancelTime(str) {
|
||||
return str ? str.substring(0, 10) : ''
|
||||
},
|
||||
todetail(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/relic/detail?id=" + id
|
||||
});
|
||||
},
|
||||
loadrelic(page) {
|
||||
uni.hideKeyboard()
|
||||
var that = this;
|
||||
that.isLoading = true;
|
||||
this.util.request({
|
||||
api: '/api/mobile/cultural-relic/index',
|
||||
customLoading: false,
|
||||
data: {
|
||||
page: page,
|
||||
page_size: 7,
|
||||
sort_name:'release_time',
|
||||
sort_type:"DESC",
|
||||
},
|
||||
utilSuccess: function(r) {
|
||||
var res = r.data;
|
||||
that.isLoading = false;
|
||||
var hasNoMore = r.total < 6 && page > 1;
|
||||
if (hasNoMore || res.length == 0 && page > 1) {
|
||||
uni.stopPullDownRefresh(); // 服务器总条数 < 每页条数, 会将第一页的条数重新返回
|
||||
// 已加载到最后一页
|
||||
uni.showToast({
|
||||
title: '已加载到最后一页',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var dataList = that.dataList;
|
||||
|
||||
// for (var m of res) {
|
||||
// if (m.created_at.indexOf('T') > 0)
|
||||
// m.created_at = m.created_at.split("T")[0] + " " + m.created_at.split("T")[
|
||||
// 1].split(".")[0];
|
||||
|
||||
|
||||
// m.poster = (weixin.isNull(m.poster) ? "../../static/rishang.png" : m
|
||||
// .poster_url)
|
||||
// }
|
||||
|
||||
if (page == 1) {
|
||||
dataList = res;
|
||||
} else {
|
||||
dataList.push(...res);
|
||||
}
|
||||
|
||||
that.currentPage = page;
|
||||
that.dataList = dataList;
|
||||
},
|
||||
utilFail: function(res) {
|
||||
|
||||
if (page == 1) {
|
||||
|
||||
that.currentPage = page;
|
||||
}
|
||||
|
||||
that.util.alert(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.tabsnav {
|
||||
background-color: #fbf3ea;
|
||||
}
|
||||
|
||||
.relic_list {
|
||||
padding: 0 30rpx;
|
||||
padding-top: 10rpx;
|
||||
border-top: 1px solid #fafaf9;
|
||||
}
|
||||
|
||||
.relic_item {
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1px solid #fafaf9;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.relic_item img {
|
||||
width: 310rpx;
|
||||
height: 183rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.relic_item>view {
|
||||
width: 370rpx;
|
||||
}
|
||||
|
||||
.relic_item>view view {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.relic_item>view view:first-child {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
/* 这里是超出几行省略 */
|
||||
overflow: hidden;
|
||||
font-size: 30rpx;
|
||||
margin-top:0
|
||||
}
|
||||
|
||||
.relic_item>view view:last-child {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
/* 这里是超出几行省略 */
|
||||
overflow: hidden;
|
||||
font-size: 26rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 50 KiB |
Loading…
Reference in new issue