Browse Source

跳转退思园

dev_des
1054425342@qq.com 1 month ago
parent
commit
d66e080a60
  1. 12
      components/Book.vue
  2. 9
      components/CustomTabBar.vue
  3. 10
      components/DynamicIsland.vue
  4. 737
      components/IPComponents.vue
  5. 2
      manifest.json
  6. 6
      static/js/request.js

12
components/Book.vue

@ -80,7 +80,6 @@ export default {
currentIndex: 0, currentIndex: 0,
scrollLeft: 0, scrollLeft: 0,
itemWidth: 224, // 207rpx + 30rpx margin itemWidth: 224, // 207rpx + 30rpx margin
JDSU_IMG_URL: "https://epic.js-dyyj.com",
}; };
}, },
mounted() { mounted() {
@ -109,17 +108,6 @@ export default {
} }
}); });
}, },
//
showImg(img) {
if (!img) return "";
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
// //
prevSlide() { prevSlide() {
if (!this.validateData()) return; if (!this.validateData()) return;

9
components/CustomTabBar.vue

@ -11,8 +11,8 @@
> >
<image <image
:src="currentTab === i ? item.select_img : item.img" :src="currentTab === i ? item.select_img : item.img"
style="height: 80rpx" style="height: 80rpx;"
mode="heightFix" :style="{'width':item.width}"
></image> ></image>
<!-- <text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{ <!-- <text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{
item.text item.text
@ -39,6 +39,7 @@ export default {
img: require("@/static/image/tabbar/home.png"), img: require("@/static/image/tabbar/home.png"),
select_img: require("@/static/image/tabbar/home_select.png"), select_img: require("@/static/image/tabbar/home_select.png"),
text: "首页", text: "首页",
width:'53rpx'
}, },
{ {
pagePath: "pages/index/readingBody", pagePath: "pages/index/readingBody",
@ -46,6 +47,7 @@ export default {
text: "阅读体", text: "阅读体",
img: require("@/static/image/tabbar/book.png"), img: require("@/static/image/tabbar/book.png"),
select_img: require("@/static/image/tabbar/book_select.png"), select_img: require("@/static/image/tabbar/book_select.png"),
width:'58rpx'
}, },
// { // {
// pagePath: "pages/index/sensoryStore", // pagePath: "pages/index/sensoryStore",
@ -58,6 +60,7 @@ export default {
text: "时间银行", text: "时间银行",
img: require("@/static/image/tabbar/time.png"), img: require("@/static/image/tabbar/time.png"),
select_img: require("@/static/image/tabbar/time_select.png"), select_img: require("@/static/image/tabbar/time_select.png"),
width:'58rpx'
}, },
{ {
pagePath: "pages/index/intelligentAgent", pagePath: "pages/index/intelligentAgent",
@ -65,6 +68,7 @@ export default {
text: "智能体", text: "智能体",
img: require("@/static/image/tabbar/agent.png"), img: require("@/static/image/tabbar/agent.png"),
select_img: require("@/static/image/tabbar/agent_select.png"), select_img: require("@/static/image/tabbar/agent_select.png"),
width:'58rpx'
}, },
{ {
pagePath: "pages/index/iSoul", pagePath: "pages/index/iSoul",
@ -72,6 +76,7 @@ export default {
text: "iSoul", text: "iSoul",
img: require("@/static/image/tabbar/isoul.png"), img: require("@/static/image/tabbar/isoul.png"),
select_img: require("@/static/image/tabbar/isoul_select.png"), select_img: require("@/static/image/tabbar/isoul_select.png"),
width:'47rpx'
}, },
], ],
tabBarShowList: [], tabBarShowList: [],

10
components/DynamicIsland.vue

@ -196,7 +196,6 @@
currentAvatar: "https://picsum.photos/80/80", currentAvatar: "https://picsum.photos/80/80",
currentAction: "激活你的Agent", currentAction: "激活你的Agent",
userInfo: {}, userInfo: {},
JDSU_IMG_URL: "https://epic.js-dyyj.com",
}; };
}, },
computed: { computed: {
@ -372,15 +371,6 @@
}) })
}, },
//
showImg(img) {
if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
toDesInfo(){ toDesInfo(){
uni.navigateTo({ uni.navigateTo({
url:'/subPackages/other/introduction' url:'/subPackages/other/introduction'

737
components/IPComponents.vue

@ -1,389 +1,378 @@
<template> <template>
<view class="product-section"> <view class="product-section">
<view class="title-section"> <view class="title-section">
<div <div style="
style="
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
" ">
> <text class="title">文化IP合作体</text>
<text class="title">文化IP合作体</text> </div>
</div> </view>
</view> <!-- 轮播容器 -->
<!-- 轮播容器 --> <view class="carousel-container">
<view class="carousel-container"> <!-- 左箭头 -->
<!-- 左箭头 --> <view class="nav-arrow left-arrow" @click="prevSlide" v-if="list.length > 1 && currentIndex > 0">
<view <image style="width: 50rpx;height: 50rpx;"
class="nav-arrow left-arrow" :src="showImg('/uploads/20250908/29beeddf1e45571d2c5a4187f2f1ae05.png')"></image>
@click="prevSlide" </view>
v-if="list.length > 1 && currentIndex > 0"
> <!-- 轮播内容 -->
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/29beeddf1e45571d2c5a4187f2f1ae05.png')"></image> <scroll-view class="carousel-scroll" scroll-x="true" :show-scrollbar="false" :enhanced="true"
</view> :scroll-with-animation="true" :scroll-left="scrollLeft" @scroll="onScroll" @scrollend="onScrollEnd">
<view class="carousel-content">
<!-- 轮播内容 --> <view class="carousel-item" v-for="(item, index) in list" :key="index" @click="gotoDetail(item)"
<scroll-view v-if="item && item.image">
class="carousel-scroll" <view class="issue-card">
scroll-x="true" <!-- 背景图片 -->
:show-scrollbar="false" <image class="card-bg" :src="showImg(item.image)" mode="aspectFill"></image>
:enhanced="true" <view class="title-info">
:scroll-with-animation="true" <view class="title-item">
:scroll-left="scrollLeft" {{item.title}}
@scroll="onScroll" </view>
@scrollend="onScrollEnd" <view class="title-des">
> {{item.des}}
<view class="carousel-content"> </view>
<view </view>
class="carousel-item" </view>
v-for="(item, index) in list" </view>
:key="index"
@click="gotoDetail" <!-- 无数据时的提示 -->
v-if="item && item.image" <view v-if="!list || list.length === 0" class="no-data">
> <text>暂无数据</text>
<view class="issue-card"> </view>
<!-- 背景图片 -->
<image
class="card-bg"
:src="showImg(item.image)"
mode="aspectFill"
></image>
<view class="title-info">
<view class="title-item">
{{item.title}}
</view>
<view class="title-des">
{{item.des}}
</view> </view>
</view> </scroll-view>
</view>
</view> <!-- 右箭头 -->
<view class="nav-arrow right-arrow" @click="nextSlide"
<!-- 无数据时的提示 --> v-if="list.length > 1 && currentIndex < list.length - 1">
<view v-if="!list || list.length === 0" class="no-data">
<text>暂无数据</text> <image style="width: 50rpx;height: 50rpx;"
</view> :src="showImg('/uploads/20250908/6622b3699518d6b559e1241d7addb7af.png')"></image>
</view> </view>
</scroll-view> </view>
</view>
<!-- 右箭头 -->
<view
class="nav-arrow right-arrow"
@click="nextSlide"
v-if="list.length > 1 && currentIndex < list.length - 1"
>
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/6622b3699518d6b559e1241d7addb7af.png')"></image>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
list: [{ list: [{
image:'/uploads/20250908/bb069c36e88de7cde4e8dd24ac3b33b5.png', image: '/uploads/20250908/bb069c36e88de7cde4e8dd24ac3b33b5.png',
title:'太湖NAINO', title: '太湖NAINO',
des:'NAINO的异次元发现', des: 'NAINO的异次元发现',
}, },
{ {
image:'/uploads/20250908/ab1ffc93875de79fc87ee2c5e70cad3f.png', image: '/uploads/20250908/ab1ffc93875de79fc87ee2c5e70cad3f.png',
title:'SUNRISE日出东方', title: 'SUNRISE日出东方',
des:'扬州瓜洲古渡', des: '扬州瓜洲古渡',
}, },
{ {
image:'/uploads/20250908/4d38fcd2e403a13b85a96188de12a2a8.png', image: '/uploads/20250908/4d38fcd2e403a13b85a96188de12a2a8.png',
title:'中国昆曲博物馆', title: '中国昆曲博物馆',
des:'姹紫婿红里', des: '姹紫婿红里',
}, },
{ {
image:'/uploads/20250908/d4115d6c907f8b3ed5d30a11f9912460.png', image: '/uploads/20250908/d4115d6c907f8b3ed5d30a11f9912460.png',
title:'退思园', title: '退思园',
des:'苏州古典园林生活', des: '苏州古典园林生活',
}], mini: {
currentIndex: 0, appID: 'wxf3af8e268906fd6d',
scrollLeft: 0, path: 'pages/index/index'
itemWidth: 224, // 207rpx + 30rpx margin }
JDSU_IMG_URL: "https://epic.js-dyyj.com", }
}; ],
}, currentIndex: 0,
mounted() { scrollLeft: 0,
// this.getList(); itemWidth: 224, // 207rpx + 30rpx margin
}, };
methods: { },
handleMoreClick(){ mounted() {
uni.switchTab({ // this.getList();
url:'/pages/index/readingBody' },
}) methods: {
}, handleMoreClick() {
gotoDetail(){ uni.switchTab({
uni.showToast({ url: '/pages/index/readingBody'
title:'功能暂未开放', })
icon:'none' },
}) gotoDetail(item) {
}, if(item.mini){
getList() { wx.navigateToMiniProgram({
// this.Post( appId: item.mini.appID,
// { path: item.mini.path,
// type_id: 3, envVersion: 'release',
// offset: 0, success(res) {
// limit: 10, // //
// }, },
// "/api/article/getArticleByType" fail(e){
// ).then((res) => { console.log(e)
// if (res.data && res.data.length > 0) { }
// this.list = res.data; })
// // }else{
// this.currentIndex = 0; uni.showToast({
// this.scrollLeft = 0; title: '功能暂未开放',
// } icon: 'none'
// }); })
}, }
// },
showImg(img) { getList() {
if (!img) return ""; // this.Post(
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) { // {
return img; // type_id: 3,
} else { // offset: 0,
return this.JDSU_IMG_URL + img; // limit: 10, //
} // },
}, // "/api/article/getArticleByType"
// ).then((res) => {
// // if (res.data && res.data.length > 0) {
prevSlide() { // this.list = res.data;
if (!this.validateData()) return; // //
// this.currentIndex = 0;
if (this.list.length > 1) { // this.scrollLeft = 0;
this.currentIndex = // }
this.currentIndex > 0 ? this.currentIndex - 1 : this.list.length - 1; // });
this.$nextTick(() => { },
this.scrollToCurrentItem();
}); //
} prevSlide() {
}, if (!this.validateData()) return;
// if (this.list.length > 1) {
nextSlide() { this.currentIndex =
if (!this.validateData()) return; this.currentIndex > 0 ? this.currentIndex - 1 : this.list.length - 1;
this.$nextTick(() => {
if (this.list.length > 1) { this.scrollToCurrentItem();
this.currentIndex = });
this.currentIndex < this.list.length - 1 ? this.currentIndex + 1 : 0; }
this.$nextTick(() => { },
this.scrollToCurrentItem();
}); //
} nextSlide() {
}, if (!this.validateData()) return;
// if (this.list.length > 1) {
scrollToCurrentItem() { this.currentIndex =
// this.currentIndex < this.list.length - 1 ? this.currentIndex + 1 : 0;
if (this.currentIndex < 0) { this.$nextTick(() => {
this.currentIndex = 0; this.scrollToCurrentItem();
} });
if (this.currentIndex >= this.list.length) { }
this.currentIndex = this.list.length - 1; },
}
//
const scrollPosition = this.currentIndex * this.itemWidth; scrollToCurrentItem() {
this.scrollLeft = scrollPosition; //
}, if (this.currentIndex < 0) {
this.currentIndex = 0;
// }
onScroll(e) { if (this.currentIndex >= this.list.length) {
const scrollLeft = e.detail.scrollLeft; this.currentIndex = this.list.length - 1;
const index = Math.round(scrollLeft / this.itemWidth); }
if (
index !== this.currentIndex && const scrollPosition = this.currentIndex * this.itemWidth;
index >= 0 && this.scrollLeft = scrollPosition;
index < this.list.length },
) {
this.currentIndex = index; //
} onScroll(e) {
}, const scrollLeft = e.detail.scrollLeft;
const index = Math.round(scrollLeft / this.itemWidth);
// if (
onScrollEnd(e) { index !== this.currentIndex &&
const scrollLeft = e.detail.scrollLeft; index >= 0 &&
const index = Math.round(scrollLeft / this.itemWidth); index < this.list.length
// ) {
this.currentIndex = Math.max(0, Math.min(index, this.list.length - 1)); this.currentIndex = index;
this.$nextTick(() => { }
this.scrollToCurrentItem(); },
});
}, //
onScrollEnd(e) {
// const scrollLeft = e.detail.scrollLeft;
handleItemClick(item) { const index = Math.round(scrollLeft / this.itemWidth);
console.log("点击了卡片:", item); //
// this.currentIndex = Math.max(0, Math.min(index, this.list.length - 1));
}, this.$nextTick(() => {
this.scrollToCurrentItem();
// });
validateData() { },
if (!this.list || this.list.length === 0) {
this.currentIndex = 0; //
this.scrollLeft = 0; handleItemClick(item) {
return false; console.log("点击了卡片:", item);
} //
},
//
if (this.currentIndex < 0) { //
this.currentIndex = 0; validateData() {
} if (!this.list || this.list.length === 0) {
if (this.currentIndex >= this.list.length) { this.currentIndex = 0;
this.currentIndex = this.list.length - 1; this.scrollLeft = 0;
} return false;
}
return true;
}, //
}, if (this.currentIndex < 0) {
}; this.currentIndex = 0;
}
if (this.currentIndex >= this.list.length) {
this.currentIndex = this.list.length - 1;
}
return true;
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.product-section { .product-section {
width: 100%; width: 100%;
background-color: #fffdd6; background-color: #fffdd6;
padding: 40rpx 25rpx; padding: 40rpx 25rpx;
margin: 30rpx 0; margin: 30rpx 0;
border-radius: 40rpx; border-radius: 40rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1), box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1),
0 0 0 1rpx rgba(255, 255, 255, 0.2) inset; 0 0 0 1rpx rgba(255, 255, 255, 0.2) inset;
}
//
.carousel-container {
position: relative;
width: 100%;
height: 191rpx ;
display: flex;
align-items: center;
justify-content: center;
}
//
.carousel-scroll {
width: 100%;
height: 100%;
white-space: nowrap;
}
//
.carousel-content {
display: flex;
align-items: center;
height: 100%;
min-width: max-content;
}
//
.carousel-item {
flex-shrink: 0;
width: 154rpx;
height: 191rpx;
margin: 0 7rpx;
will-change: transform;
}
//
.issue-card {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
//
.card-bg {
width: 100%;
height: 100%;
}
//
.nav-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 60rpx;
height: 60rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 3;
transition: all 0.3s ease;
&.left-arrow {
left: 0rpx;
}
&.right-arrow {
right: 0rpx;
}
}
.arrow-icon {
font-size: 32rpx;
color: #ffffff;
font-weight: bold;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}
//
.no-data {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 368rpx;
color: #999;
font-size: 28rpx;
}
//
.title-section {
display: inline-block;
padding: 0rpx 0 30rpx;
width: 100%;
.title {
font-size: 34rpx;
font-weight: bold;
color: #000000;
}
.more-btn {
font-size: 26rpx;
color: #000000;
margin-left: 35rpx;
}
}
.title-info{
position: absolute;
bottom: 10rpx;
right: 0;
width: 100%;
color: white;
padding: 0 5rpx;
.title-item{
text-align: center;
font-size: 16rpx;
font-weight: bold;
overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
} }
.title-des{
margin-top: 5rpx; //
text-align: center; .carousel-container {
font-size: 14rpx; position: relative;
width: 100%;
height: 191rpx;
display: flex;
align-items: center;
justify-content: center;
}
//
.carousel-scroll {
width: 100%;
height: 100%;
white-space: nowrap;
}
//
.carousel-content {
display: flex;
align-items: center;
height: 100%;
min-width: max-content;
}
//
.carousel-item {
flex-shrink: 0;
width: 154rpx;
height: 191rpx;
margin: 0 7rpx;
will-change: transform;
}
//
.issue-card {
width: 100%;
height: 100%;
position: relative;
overflow: hidden; overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
} }
}
//
.card-bg {
width: 100%;
height: 100%;
}
//
.nav-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 60rpx;
height: 60rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 3;
transition: all 0.3s ease;
&.left-arrow {
left: 0rpx;
}
&.right-arrow {
right: 0rpx;
}
}
.arrow-icon {
font-size: 32rpx;
color: #ffffff;
font-weight: bold;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}
//
.no-data {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 368rpx;
color: #999;
font-size: 28rpx;
}
//
.title-section {
display: inline-block;
padding: 0rpx 0 30rpx;
width: 100%;
.title {
font-size: 34rpx;
font-weight: bold;
color: #000000;
}
.more-btn {
font-size: 26rpx;
color: #000000;
margin-left: 35rpx;
}
}
.title-info {
position: absolute;
bottom: 10rpx;
right: 0;
width: 100%;
color: white;
padding: 0 5rpx;
.title-item {
text-align: center;
font-size: 16rpx;
font-weight: bold;
overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
}
.title-des {
margin-top: 5rpx;
text-align: center;
font-size: 14rpx;
overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
}
}
</style> </style>

2
manifest.json

@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx8954209bb3ad489e", "appid" : "wx9660f8c5776663e0",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true, "es6" : true,

6
static/js/request.js

@ -2,14 +2,14 @@ import Vue from 'vue';
import store from '@/store'; import store from '@/store';
// 定义 API URL // 定义 API URL
const DEV_API_URL = 'https://epic.new.js-dyyj.com'; const DEV_API_URL = 'http://1.13.193.49';
// const DEV_API_URL = 'https://epic.js-dyyj.com'; // const DEV_API_URL = 'https://epic.js-dyyj.com';
// const PROD_API_URL = 'https://epic.js-dyyj.com'; // const PROD_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'https://epic.new.js-dyyj.com'; const PROD_API_URL = 'https://epic.new.js-dyyj.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL; const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
const DEV_API_URL_DES = 'http://192.168.124.177:8083/xcx'; // const DEV_API_URL_DES = 'http://192.168.124.177:8083/xcx';
// const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx'; const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const PROD_API_URL_DES = 'https://des.js-dyyj.com/xcx'; const PROD_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES; const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;
const getToken = () => { const getToken = () => {

Loading…
Cancel
Save