diff --git a/pages.json b/pages.json
index 7e8afa7..f8f6033 100644
--- a/pages.json
+++ b/pages.json
@@ -117,6 +117,12 @@
"navigationBarTitleText" : "有感商店香",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "letter/detail",
+ "style": {
+ "navigationBarTitleText": "文章详情"
+ }
}
]
}],
diff --git a/pages/index/index.vue b/pages/index/index.vue
index cef99a0..9e4ab9b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -67,44 +67,6 @@
}
});
},
- // 2是各种详情页,3是列表专题页面,4是小程序
- gotoUrlNew(item) {
- console.log(item);
- let that = this;
- let url = '';
- switch (item.jump_type) {
- case 0:
- break;
- case 2:
- uni.navigateTo({
- url: item.tdata
- });
- break;
- case 3:
- uni.navigateTo({
- url: '/subPackages/webPage/webPage?url=' + item.tdata
- });
- break;
- case 4:
- uni.navigateToMiniProgram({
- appId: item.tdata.appid, // 此为appid
- path: item.tdata.page, // 此为首页路径
- envVersion: 'release',
- success: res => {
- // 打开成功
- console.log('打开成功', res);
- },
- fail: err => {
- console.log(err);
- }
- });
- break;
- default:
- break;
- }
- },
-
-
gotoVideo(item) {
uni.navigateTo({
url: '/subPackages/video/video?item=' + encodeURIComponent(JSON.stringify(item))
diff --git a/pages/index/readingBody.vue b/pages/index/readingBody.vue
index 9a32b11..31409da 100644
--- a/pages/index/readingBody.vue
+++ b/pages/index/readingBody.vue
@@ -2,24 +2,33 @@
-
+
+ 底部指示点
-
+ -->
+
+
+
+
+
+
+
+
-
+
@@ -29,11 +38,11 @@
- {{item}}
+ {{item.title}}
-
+
@@ -50,44 +59,81 @@
},
data() {
return {
- swiperList: [{
- img: 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img.png'
- },
- {
- img: 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img.png'
- },
- {
- img: 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img.png'
- },
- {
- img: 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img.png'
- }
- ],
+ swiperList: [],
+ current: 0,
+ swiperDotIndex: 0,
+ mode: 'round',
+ dotsStyles: {
+ selectedBackgroundColor: 'rgb(133, 133, 133)',
+ selectedBorder: 'none',
+ backgroundColor: 'rgba(150, 150, 150, 0.5)',
+ border: 'none'
+ },
currentIndex: 0,
- categories: [
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img1.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img1.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img1.png'
- ],
- readingList: [
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png',
- 'https://static.ticket.sz-trip.com/epicSoul/readingBody/img2.png'
- ],
- readingType: ['2025', '2026', '更多'],
+ categories: [],
+ readingList: [],
+ readingType: [{title: '2025', id: 3}, {title: '2026', id: 6}, {title: '全部', id: ''},],
readingIndex: 0
}
},
+ onReady() {
+ this.sendRequest()
+ },
methods: {
+ sendRequest() {
+ this.Post({
+ type_id: 3,
+ position: 2,
+ }, '/api/adv/getAdv').then(res => {
+ if(res.data) {
+ this.swiperList = res.data;
+ }
+ });
+
+ this.Post({
+ type_id: 3,
+ position: 1,
+ }, '/api/adv/getAdv').then(res => {
+ if(res.data) {
+ this.categories = res.data;
+ }
+ });
+
+ this.getList()
+ },
+ // 全部阅读 文章
+ getList() {
+ this.Post({
+ type_id: this.readingType[this.readingIndex].id,
+ offset: 0,
+ limit: 1
+ }, '/api/article/getArticleByType').then(res => {
+ if(res.data) {
+ this.readingList = res.data
+ }
+ })
+ },
+ change(e) {
+ this.current = e.detail.current
+ },
onSwiperChange(e) {
this.currentIndex = e.detail.current;
},
changeType(index) {
this.readingIndex = index
+ this.getList()
console.log(index,this.readingIndex)
+ },
+ viewDetail(item) {
+ if (item.url) {
+ uni.navigateTo({
+ url:"/subPackages/webPage/webPage?url="+encodeURIComponent(item.url)
+ })
+ return
+ }
+ uni.navigateTo({
+ url:'/subPackages/letter/detail?id='+item.id
+ })
}
}
}
@@ -98,13 +144,19 @@
padding-bottom: 200rpx;
}
- .top-box {
+ .swiper-box, .top-box {
margin: 60rpx 40rpx 0;
height: 830rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
border-radius: 20rpx;
- padding-top: 10rpx;
- background-color: #fff;
+ overflow: hidden;
+ // padding-top: 10rpx;
+ // background-color: #fff;
+
+ image {
+ width: 100%;
+ height: 100%;
+ }
}
.carousel-swiper {
@@ -156,6 +208,7 @@
height: 260rpx;
flex-shrink: 0;
margin-right: 20rpx;
+ border-radius: 20rpx;
}
}
diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js
index a311e0b..fb7eb4a 100644
--- a/static/js/CommonFunction.js
+++ b/static/js/CommonFunction.js
@@ -292,15 +292,52 @@ Vue.prototype.goOtherDetail = (item,type) => {
return true
}
}
+
// 根据类型判断详情页
Vue.prototype.goDetailByType= function(item){
- let res = this.goOtherDetail(item)
- if (res) {
- return
- }
+ // let res = this.goOtherDetail(item)
+ // if (res) {
+ // return
+ // }
uni.navigateTo({
url: `/subPackages/techan/detail?id=?${item.id}`
})
+}
+// 轮播图跳转 2是各种详情页,3是列表专题页面,4是小程序
+Vue.prototype.gotoUrlNew = (item) => {
+ console.log(item);
+ let that = this;
+ let url = '';
+ switch (item.jump_type) {
+ case 0:
+ break;
+ case 2:
+ uni.navigateTo({
+ url: item.tdata
+ });
+ break;
+ case 3:
+ uni.navigateTo({
+ url: '/subPackages/webPage/webPage?url=' + item.tdata
+ });
+ break;
+ case 4:
+ uni.navigateToMiniProgram({
+ appId: item.tdata.appid, // 此为appid
+ path: item.tdata.page, // 此为首页路径
+ envVersion: 'release',
+ success: res => {
+ // 打开成功
+ console.log('打开成功', res);
+ },
+ fail: err => {
+ console.log(err);
+ }
+ });
+ break;
+ default:
+ break;
+ }
}
\ No newline at end of file
diff --git a/subPackages/haveFeeling/detailXiang.vue b/subPackages/haveFeeling/detailXiang.vue
index b8188e2..1dd6d43 100644
--- a/subPackages/haveFeeling/detailXiang.vue
+++ b/subPackages/haveFeeling/detailXiang.vue
@@ -1,10 +1,10 @@
-
+
-
+
{{item.title}}
@@ -16,10 +16,7 @@
-
- 富文本 富文本
- 两千年的柏树“清、奇、古、怪”,自西汉年便扎根江南太湖畔的光福。每年柏子熟时,遵循古老的仪式:于古柏枝干系上红绳,燃清香,向自然致以敬意。这是江南百姓世代流传的生存智慧,将草木荣枯视为对生命共同体的敬畏,也感恩时间的馈赠。
-
+
@@ -31,6 +28,7 @@
},
data() {
return {
+ detail: {},
list: [
{
img: 'https://static.ticket.sz-trip.com/epicSoul/readingBody/productImg.png',
@@ -70,6 +68,23 @@
}
]
}
+ },
+ onLoad(option) {
+ this.Post({
+ id: option.id,
+ }, '/api/goods/goods_type_detail').then(res => {
+ if(res.data) {
+ this.detail = res.data
+ }
+ });
+
+ this.Post({
+ type_id: option.id,
+ offset: this.list.length,
+ limit: 100,
+ },'/api/tag/getGoodsByTypeId').then(res => {
+ this.list = res.data;
+ })
}
}
diff --git a/subPackages/letter/detail.vue b/subPackages/letter/detail.vue
new file mode 100644
index 0000000..ed502a2
--- /dev/null
+++ b/subPackages/letter/detail.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{detail.title}}
+
+
+
+ {{detail.author}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file