jiazhipeng 12 months ago
parent
commit
d469b30c08
  1. 7
      pages.json
  2. 5
      pages/index/index.vue
  3. 2
      static/css/base.css
  4. 2
      static/font/font.css
  5. BIN
      static/font/font.ttf
  6. 118
      subPackages/novelty/index.vue

7
pages.json

@ -344,6 +344,13 @@
"navigationBarTitleText": "同里新鲜事",
"navigationStyle": "custom"
}
},
{
"path": "novelty/index",
"style": {
"navigationBarTitleText": "游踪指南",
"navigationStyle": "custom"
}
}
]
}],

5
pages/index/index.vue

@ -164,7 +164,7 @@
{
img: 'yzzn',
text: '游踪指南',
// path: '/subPackages/webPage/webPage?url='+ encodeURIComponent('https://yandumap.sz-trip.com/'),
path: '/subPackages/novelty/index'
},
{
img: 'shtl',
@ -577,6 +577,7 @@
.line-box {
overflow-x: auto;
overflow-y: hidden;
display: flex;
padding-left: 26rpx;
}
@ -754,7 +755,7 @@
font-weight: 500;
font-size: 24rpx;
color: #6b6262;
margin-top: 8rpx;
margin-top: 10rpx;
}
}
}

2
static/css/base.css

@ -14,6 +14,8 @@ input {
view {
box-sizing: border-box;
font-family: "MyFont" !important;
font-weight: bold;
}
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */

2
static/font/font.css

@ -1,6 +1,6 @@
@font-face {
font-family:"MyFont"; //自定义字体名称
src: url('https://static.ticket.sz-trip.com/tongli/font.ttf'); //引入字体路径
src: url('https://static.ticket.sz-trip.com/tongli/simsun.ttc'); //引入字体路径
font-weight: normal; //字体粗细
font-style: normal;//字体风格
}

BIN
static/font/font.ttf

Binary file not shown.

118
subPackages/novelty/index.vue

@ -0,0 +1,118 @@
<template>
<view class="bg">
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<img :src="showImg(headImg)" class="topImg" />
<navigator :url="'/subPackages/novelty/detail?id='+item.id" v-for="(item,index) in list" :key="index" class="item">
<image class="img" :src="showImg(item.image)" mode="aspectFill"></image>
<view class="content flex-column">
<view class="title">{{item.title}}</view>
<view class="subtitle flex-between">
<view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/user.png" mode=""></image>
{{item.author}}
</view>
<view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/eye.png" mode=""></image>
{{item.view}}
</view>
</view>
</view>
</navigator>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
finished: false,
headImg: ''
}
},
onReady() {
this.getHeadImg('shuhui').then(res => {this.headImg = res})
this.getArticleByType()
},
methods: {
//
getArticleByType() {
this.Post({
type_id: 46,
offset: this.list.length,
limit: 10
},'/api/Article/getArticleByType').then(res => {
if (res.data.length < 10) {
this.finished = true
}
this.list = [...this.list, ...res.data]
})
},
},
//
onReachBottom() {
setTimeout(() => {
if (!this.finished) this.getArticleByType();
}, 1000);
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #F7F7F7;
padding-bottom: 100rpx;
}
.topImg {
width: 100%;
height: 440rpx;
}
.item {
width: 697rpx;
height: 227rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin: 26rpx auto 0;
display: flex;
.img {
width: 280rpx;
height: 227rpx;
border-radius: 13rpx;
}
.content {
width: 370rpx;
height: 227rpx;
margin-left: 20rpx;
padding: 15rpx 0;
justify-content: space-between;
.title {
font-weight: bold;
font-size: 31rpx;
color: #000000;
}
.subtitle {
font-weight: 500;
font-size: 27rpx;
color: #666666;
image {
width: 26rpx;
height: 26rpx;
margin-right: 6rpx;
vertical-align: text-bottom;
}
}
}
}
</style>
Loading…
Cancel
Save