first commit

This commit is contained in:
lxj
2025-06-26 12:38:35 +08:00
commit c536475e19
1236 changed files with 186274 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
<template>
<view class="waper">
<u-navbar :autoBack="true" bgColor="#fff">
<view slot='center' class="navbar_title">{{channelName}}</view>
</u-navbar>
<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption" :top="paddingTop + 'px'">
<view class="list_waper">
<navigator hover-class="none" class="list" v-for="(item, index) in list" :url="'/pages/strategy/detail?id=' + item.id" :key="index">
<view class="img">
<image :src="$utils.setImgUrl(item.image)" mode=""></image>
</view>
<view class="info">
<view class="title">{{item.title}}</view>
<view class="msg">{{item.description || ''}}</view>
<view class="from">
<view class="left">{{$utils.formatDate('Y-M-D', item.publishtime * 1000)}}</view>
<view class="right">
<u-icon name="eye" size="28rpx" color="rgba(0, 0, 0, 0.45)" top="2rpx"></u-icon>
<view class="num">{{item.views}}</view>
</view>
</view>
</view>
</navigator>
</view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: { auto: false },
paddingTop: 0,
list: [],
channelId: '',
channelName: ''
}
},
onLoad (options) {
this.channelName = options.name;
this.channelId = options.id;
this.paddingTop = this.$paddingTop;
this.mescroll && this.mescroll.resetUpScroll();
},
methods: {
async upCallback (page) {
let obj = { pageNum: page.num, pageSize: page.size, channelId: this.channelId };
let info = await this.$http.archivesList(obj);
if (page.num == 1) this.list = [];
this.list = this.list.concat(info.rows)
this.mescroll.endBySize(info.rows.length, info.total);
}
}
}
</script>
<style lang="scss">
.menu{
width: 100%; height: 110rpx; background: #fff; box-sizing: border-box; padding: 0 154rpx; display: flex; justify-content: space-between; align-items: center; position: fixed; left: 0; z-index: 11;
view{
color: #333; height: 46rpx; line-height: 46rpx; font-size: 32rpx; font-weight: 500;
&.active{
color: #00BE69; font-weight: bold; position: relative;
&::after{ content: ""; width: 30rpx; height: 8rpx; background: #00BE69; border-radius: 12rpx; position: absolute; left: 50%; transform: translateX(-50%); bottom: -12rpx; }
}
}
}
.list_waper{
width: 100%; box-sizing: border-box; padding: 32rpx;
.list{
width: 100%; box-sizing: border-box; margin-bottom: 20rpx; padding: 20rpx; padding-left: 288rpx; position: relative; height: 222rpx; border-radius: 10rpx; background: #fff;
&:last-child{ margin-bottom: 0; }
.img{
width: 243rpx; height: 182rpx; position: absolute; left: 20rpx; top: 20rpx;
image{ border-radius: 10rpx; }
}
.info{
width: 100%; height: 100%; box-sizing: border-box; padding-top: 4rpx;
.title{ line-height: 48rpx; color: rgba(0, 0, 0, 0.85); font-size: 32rpx; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg{ margin-top: 8rpx; line-height: 42rpx; color: rgba(0, 0, 0, 0.65); font-size: 28rpx; height: 84rpx; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
.from{
width: 100%; margin-top: 0; height: 36rpx; display: flex; justify-content: space-between; align-items: center;
.left{ color: rgba(0, 0, 0, 0.45); font-size: 24rpx; }
.right{
display: flex; align-items: center;
.num{ color: rgba(0, 0, 0, 0.45); font-size: 24rpx; margin-left: 4rpx; }
}
}
}
}
</style>

215
pages/strategy/detail.vue Normal file
View File

@@ -0,0 +1,215 @@
<template>
<view class="waper">
<u-navbar @leftClick="leftClick" :placeholder="true" bgColor="#fff">
<view slot='center' class="navbar_title">详情</view>
</u-navbar>
<view class="waper_box" v-if="detail">
<view class="title">{{detail.title}}</view>
<view class="info">
<view class="left">发布时间{{$utils.formatDate('Y-M-D', detail.publishtime * 1000)}}</view>
<view class="right">
<view class="icon" @click="addUserCollect">
<u-icon size="36rpx" color="#03AE80" :name="detail.isCollect > 0 ? 'star-fill' : 'star'"></u-icon>
</view>
<button open-type="share" class="icon">
<u-icon size="36rpx" color="#03AE80" name="share-square"></u-icon>
</button>
</view>
</view>
<view class="content">
<u-parse :content="detail.params.content"></u-parse>
</view>
<!-- <view class="recommend" v-if="detail.params.associationType == '2' && list.length > 0">
<view class="recommend_title">相关推荐</view>
<view class="recommend_list">
<navigator hover-class="none" :url="'/pages/scenic/ticket?id=' + i.id" class="list" v-for="(i, index) in list" :key="index">
<view class="img">
<image :src="$utils.setImgUrl(i.image11)" mode=""></image>
</view>
<view class="text">
<view class="name">{{i.ticketName}}</view>
<view class="tag">
<view v-if="i.refundRule == '0'">不可退</view>
<view v-if="i.refundRule == '3'">有效期可退</view>
<view v-if="i.refundRule == '4'">{{i.refundDay}}天内可退</view>
<view v-if="i.refundRule == '5'">未激活可退</view>
</view>
<view :class="'price' + (i.salesRice > 0 ? '' : ' free')">{{i.salesRice > 0 ? i.salesRice.toFixed(2) : '免费'}}</view>
<view class="btn">购票</view>
</view>
</navigator>
</view>
</view>
<view class="recommend" v-if="detail.params.associationType == '1' && list1.length > 0">
<view class="recommend_title">相关推荐</view>
<view class="recommend_list">
<navigator hover-class="none" :url="'/pages/scenic/spot?id=' + i.id" class="list1" v-for="(i, index) in list1" :key="index">
<view class="img1">
<image :src="$utils.setImgUrl(i.image)" mode=""></image>
</view>
<view class="text1">
<view class="name">{{i.scenicName}}</view>
<view class="tag">
<view>{{i.blurb}}</view>
</view>
</view>
</navigator>
</view>
</view> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
detail: null,
list: [],
list1: []
}
},
onShareAppMessage (e) {
return {
title: '巴松措风景区',
path: '/pages/login/index'
}
},
onLoad (options) {
this.id = options.id
this.archieveRmglDetail()
},
methods: {
leftClick () {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
if (prevPage) {
uni.navigateBack({ delta: 1 })
prevPage.onLoad(prevPage.options);
} else uni.reLaunch({ url: '/pages/tabbar/home' })
},
async archieveRmglDetail() {
let info = await this.$http.archieveRmglDetail({ id: this.id, scenicType: '1' })
info.data.params.content = this.$utils.replaceImg(info.data.params.content);
// 门票
let list = [];
if (info.data.ticketList && info.data.ticketList.length > 0) {
info.data.ticketList.forEach((item) => {
list.push(item)
})
}
this.list = list;
// 景点
let list1 = [];
if (info.data.spotList && info.data.spotList.length > 0) {
info.data.spotList.forEach((item) => {
list1.push(item)
})
}
this.list1 = list1;
this.detail = info.data
},
async addUserCollect () {
let info = null;
if (this.detail.isCollect > 0) {
info = await this.$http.deleteUserCollect({ archivesId: this.detail.id });
} else {
info = await this.$http.addUserCollect({ archivesId: this.detail.id, type: 'strategyDetails' });
}
if (info.code == 200) {
uni.showToast({ mask: true, title: '操作成功', icon: 'success' });
this.archieveRmglDetail();
}
},
}
}
</script>
<style lang="scss">
page{ background: white; }
</style>
<style lang="scss" scoped>
.waper_box{
width: 100%; box-sizing: border-box; padding: 24rpx 32rpx;
.title{
font-weight: 600;
font-size: 40rpx;
color: rgba(0,0,0,0.85);
line-height: 47rpx;
}
.info{
width: 100%; margin-top: 30rpx; display: flex; justify-content: space-between; align-items: center;
.left{
font-size: 28rpx;
color: rgba(0,0,0,0.45);
line-height: 33rpx;
}
.right{
display: flex; align-items: center;
.icon{
width: 60rpx; height: 60rpx; background: rgba(3,174,128,0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 16rpx; border: none; padding: 0;
&::after{ border: none; }
&:last-child{ margin-right: 0; }
}
}
}
.content{ margin-top: 32rpx; color: #666; line-height: 40rpx; font-size:28rpx; }
.recommend{
width: 100%; margin-top: 32rpx;
.recommend_title{ line-height: 50rpx; color: rgba(0,0,0,0.85); font-size: 36rpx; font-weight: 500; }
.recommend_list{
width: 100%; margin-top: 24rpx;
.list{
box-sizing: border-box; position: relative; height: 222rpx; width: 100%; margin-bottom: 20rpx; background: #fff; border-radius: 10rpx; padding: 32rpx 24rpx 32rpx 202rpx;
&:last-child{ margin-bottom: 0; }
.img{
width: 158rpx; height: 158rpx; position: absolute; left: 24rpx; top: 32rpx;
image{ border-radius: 10rpx; }
}
.text{
width: 100%; height: 158rpx;
.name{ line-height: 40rpx; color: #333; font-size: 28rpx; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; height: 40rpx; }
.tag{
margin-top: 16rpx; display: flex; align-items: center; height: 34rpx;
view{ color: #999; font-size: 24rpx; }
}
.price{
margin-top: 30rpx; box-sizing: border-box; padding-left: 24rpx; position: relative; line-height: 40rpx; color: #FF3333; font-size: 32rpx; font-weight: 500;
&::after{ content: "¥"; line-height: 34rpx; color: #FF3333; font-size: 24rpx; font-weight: 500; position: absolute; left: 0; bottom: 0; }
&.free{
padding-left: 0;
&::after{ font-size: 0; }
}
}
.btn{ width: 178rpx; height: 64rpx; color: #fff; text-align: center; line-height: 64rpx; border-radius: 32rpx; background: linear-gradient( 141deg, #54C76E 0%, #03AE80 100%); font-size: 24rpx; position: absolute; right: 24rpx; bottom: 32rpx; }
}
}
.list1 {
box-sizing: border-box; position: relative; height: 222rpx; width: 100%; margin-bottom: 20rpx; background: #fff; border-radius: 10rpx; padding: 32rpx 24rpx 32rpx 254rpx;
&:last-child{ margin-bottom: 0; }
.img1{
width: 210rpx; height: 158rpx; position: absolute; left: 24rpx; top: 32rpx;
image{ border-radius: 10rpx; }
}
.text1{
width: 100%; height: 158rpx;
.name{ line-height: 40rpx; color: #333; font-size: 28rpx; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; height: 40rpx; }
.tag{
margin-top: 16rpx; display: flex; align-items: center;
view{
color: #999;
font-size: 24rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
}
}
}
</style>

105
pages/strategy/index.vue Normal file
View File

@@ -0,0 +1,105 @@
<template>
<view class="waper">
<u-navbar :autoBack="true" bgColor="#fff">
<view slot='center' class="navbar_title">{{configData && configData.examine == 'true' ? '景点攻略' : '热门攻略'}}</view>
</u-navbar>
<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption" :top="paddingTop + 'px'">
<view class="list_waper">
<navigator hover-class="none" class="list" v-for="(item, index) in list" :url="'/pages/strategy/detail?id=' + item.id" :key="index">
<view class="img">
<image :src="$utils.setImgUrl(item.image)" mode=""></image>
</view>
<view class="info">
<view class="title">{{item.title}}</view>
<view class="msg">{{item.description || ''}}</view>
<view class="from">
<view class="left">{{$utils.formatDate('Y-M-D', item.publishtime * 1000)}}</view>
<view class="right">
<u-icon name="eye" size="28rpx" color="#999" top="2rpx"></u-icon>
<view class="num">{{item.views}}</view>
</view>
</view>
</view>
</navigator>
</view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin],
data() {
return {
paddingTop: 0,
list: [],
configData: null,
menuIndex: '1'
}
},
async onLoad () {
let config = uni.getStorageSync('configData');
this.configData = config;
this.paddingTop = this.$paddingTop;
},
methods: {
async upCallback (page) {
let obj = { pageNum: page.num, pageSize: page.size };
let info = await this.$http.introductionList(obj);
if (page.num == 1) this.list = [];
this.list = this.list.concat(info.rows)
this.mescroll.endBySize(info.rows.length, info.total);
}
}
}
</script>
<style lang="scss" scoped>
.list_waper{
width: 100%; box-sizing: border-box; padding: 32rpx;
.list{
width: 100%; box-sizing: border-box; margin-bottom: 20rpx; padding: 24rpx; padding-left: 314rpx; position: relative; height: 250rpx; border-radius: 10rpx; background: #fff;
&:last-child{ margin-bottom: 0; }
.img{
width: 270rpx; height: 202rpx; position: absolute; left: 24rpx; top: 24rpx;
image{ border-radius: 10rpx; }
}
.info{
width: 100%; height: 100%; box-sizing: border-box; padding-top: 4rpx;
.title{
height: 47rpx;
font-weight: 600;
font-size: 32rpx;
color: rgba(0,0,0,0.85);
line-height: 38rpx;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg{
font-size: 28rpx;
color: rgba(0,0,0,0.45);
line-height: 33rpx;
height: 84rpx;
margin-top: 4rpx;
-webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
.from{
width: 100%; margin-top: 23rpx; height: 34rpx; display: flex; justify-content: space-between; align-items: center;
.left{
font-size: 24rpx;
color: rgba(0,0,0,0.45);
line-height: 28rpx;
}
.right{
display: flex; align-items: center;
.num{
margin-left: 4rpx;
font-size: 24rpx;
color: rgba(0,0,0,0.45);
line-height: 28rpx;
}
}
}
}
}
</style>

90
pages/strategy/list.vue Normal file
View File

@@ -0,0 +1,90 @@
<template>
<view class="waper">
<u-navbar :autoBack="true" bgColor="#fff">
<view slot='center' class="navbar_title">精彩活动</view>
</u-navbar>
<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption" :top="paddingTop + 'px'">
<view class="list_waper">
<navigator hover-class="none" class="list" v-for="(item, index) in list" :url="'/pages/strategy/detail?id=' + item.id" :key="index">
<view class="img">
<image :src="$utils.setImgUrl(item.image)" mode=""></image>
</view>
<view class="info">
<view class="title">{{item.title}}</view>
<view class="msg">{{item.description || ''}}</view>
<view class="from">
<view class="left">{{$utils.formatDate('Y-M-D', item.publishtime * 1000)}}</view>
<view class="right">
<u-icon name="eye" size="28rpx" color="#999" top="2rpx"></u-icon>
<view class="num">{{item.views}}</view>
</view>
</view>
</view>
</navigator>
</view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin],
data() {
return {
paddingTop: 0,
list: []
}
},
onLoad () {
this.paddingTop = this.$paddingTop;
},
methods: {
async upCallback (page) {
let obj = { pageNum: page.num, pageSize: page.size };
let info = await this.$http.activityZoneList(obj);
if (page.num == 1) this.list = [];
this.list = this.list.concat(info.rows)
this.mescroll.endBySize(info.rows.length, info.total);
}
}
}
</script>
<style lang="scss">
.menu{
width: 100%; height: 110rpx; background: #fff; box-sizing: border-box; padding: 0 154rpx; display: flex; justify-content: space-between; align-items: center; position: fixed; left: 0; z-index: 11;
view{
color: #333; height: 46rpx; line-height: 46rpx; font-size: 32rpx; font-weight: 500;
&.active{
color: #00BE69; font-weight: bold; position: relative;
&::after{ content: ""; width: 30rpx; height: 8rpx; background: #00BE69; border-radius: 12rpx; position: absolute; left: 50%; transform: translateX(-50%); bottom: -12rpx; }
}
}
}
.list_waper{
width: 100%; box-sizing: border-box; padding: 32rpx;
.list{
width: 100%; box-sizing: border-box; margin-bottom: 20rpx; padding: 24rpx; padding-left: 314rpx; position: relative; height: 250rpx; border-radius: 10rpx; background: #fff;
&:last-child{ margin-bottom: 0; }
.img{
width: 270rpx; height: 202rpx; position: absolute; left: 24rpx; top: 24rpx;
image{ border-radius: 10rpx; }
}
.info{
width: 100%; height: 100%; box-sizing: border-box; padding-top: 4rpx;
.title{ line-height: 40rpx; color: #333; font-size: 28rpx; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg{ margin-top: 12rpx; line-height: 34rpx; color: #666; font-size: 24rpx; height: 68rpx; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
.from{
width: 100%; margin-top: 42rpx; height: 34rpx; display: flex; justify-content: space-between; align-items: center;
.left{ color: #999; font-size: 22rpx; }
.right{
display: flex; align-items: center;
.num{ color: #999; font-size: 24rpx; margin-left: 10rpx; }
}
}
}
}
</style>