Browse Source

时间银行

dev_des
1054425342@qq.com 2 months ago
parent
commit
28e63d21de
  1. 275
      components/ActivateAgentPopup.vue
  2. 73
      components/DynamicIsland.vue
  3. 234
      pages/index/iSoul.vue
  4. 4
      pages/index/timeShopBank.vue

275
components/ActivateAgentPopup.vue

@ -0,0 +1,275 @@
<template>
<uni-popup ref="popup" type="bottom" :mask-click="false">
<view class="activate-agent-popup">
<!-- 弹窗头部 -->
<view class="popup-header">
<text class="popup-title">激活AGENT</text>
<text class="popup-close" @click="closePopup">×</text>
</view>
<!-- AGENT列表 -->
<view class="agent-list">
<view
class="agent-item"
v-for="(agent, index) in agentList"
:key="index"
@click="handleAgentClick(agent)"
>
<!-- 头像区域 -->
<view class="agent-avatar">
<view class="avatar-bubble">
<image
:src="agent.avatar"
mode="aspectFill"
class="avatar-img"
></image>
</view>
</view>
<!-- 信息区域 -->
<view class="agent-info">
<view class="agent-name">
<text class="name-chinese">{{ agent.nameChinese }}</text>
<text class="name-pinyin">{{ agent.namePinyin }}</text>
</view>
</view>
<!-- 状态按钮 -->
<view class="agent-status">
<view
class="status-btn"
:class="
agent.status === '待激活' ? 'status-inactive' : 'status-active'
"
>
<text class="status-text">{{ agent.status }}</text>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: "ActivateAgentPopup",
data() {
return {
agentList: [
{
id: 1,
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
nameChinese: "颜真卿",
namePinyin: "YAN ZHENQING",
status: "待激活",
},
{
id: 2,
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
nameChinese: "杜丽娘",
namePinyin: "DU LINNIANG",
status: "去使用",
},
{
id: 3,
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
nameChinese: "文徵明",
namePinyin: "WEN ZHENGMING",
status: "去使用",
},
{
id: 4,
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
nameChinese: "朵朵",
namePinyin: "DUODUO",
status: "去使用",
},
],
};
},
methods: {
//
openPopup() {
this.$refs.popup.open();
},
//
closePopup() {
this.$refs.popup.close();
},
// AGENT
handleAgentClick(agent) {
console.log("点击了AGENT:", agent);
if (agent.status === "待激活") {
//
uni.showToast({
title: `正在激活${agent.nameChinese}...`,
icon: "loading",
});
//
setTimeout(() => {
agent.status = "去使用";
uni.showToast({
title: `${agent.nameChinese}激活成功!`,
icon: "success",
});
}, 2000);
} else {
// 使
uni.showToast({
title: `正在启动${agent.nameChinese}...`,
icon: "loading",
});
// AGENT
setTimeout(() => {
uni.showToast({
title: `${agent.nameChinese}启动成功!`,
icon: "success",
});
}, 1500);
}
},
},
};
</script>
<style lang="scss" scoped>
.activate-agent-popup {
background: #ffffff;
border-radius: 24rpx 24rpx 0 0;
padding: 40rpx 30rpx;
max-height: 80vh;
overflow-y: auto;
}
//
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
padding-bottom: 20rpx;
}
.popup-title {
font-size: 36rpx;
font-weight: bold;
color: #000000;
margin: 0 auto;
}
.popup-close {
font-size: 48rpx;
color: #999999;
padding: 10rpx;
line-height: 1;
}
// AGENT
.agent-list {
display: flex;
flex-direction: column;
gap: 30rpx;
}
.agent-item {
display: flex;
align-items: center;
padding: 20rpx;
background: #F1F1F1;
border-radius: 20rpx;
transition: all 0.3s ease;
&:active {
transform: scale(0.98);
background: #f5f5f5;
}
}
//
.agent-avatar {
margin-right: 24rpx;
}
.avatar-bubble {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
backdrop-filter: blur(10rpx);
border: 2rpx solid rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
}
.avatar-img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
//
.agent-info {
flex: 1;
}
.agent-name {
display: flex;
flex-direction: column;
gap: 4rpx;
}
.name-chinese {
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 1.2;
}
.name-pinyin {
font-size: 24rpx;
color: #77f3f9;
font-weight: 500;
line-height: 1.2;
}
//
.agent-status {
margin-left: 20rpx;
}
.status-btn {
padding: 12rpx 24rpx;
border-radius: 20rpx;
min-width: 120rpx;
text-align: center;
transition: all 0.3s ease;
}
.status-inactive {
background: #354242;
color: #ffffff;
}
.status-active {
background: linear-gradient(135deg, #fffdb7 0%, #97fffa 100%);
color: #000000;
}
.status-text {
font-size: 26rpx;
font-weight: 500;
}
</style>

73
components/DynamicIsland.vue

@ -78,45 +78,39 @@
</template>
<template v-if="styleType == 'timeShop'">
<view class="bottom-section">
<view class="stats-section">
<view class="stat-item">
<text class="stat-number">{{
getStatNumber("时间银行")
}}</text>
<text class="stat-label">时间银行</text>
</view>
</view>
<view class="divider"></view>
<view class="action-section">
<view class="action-text-box">
<view class="action-text-box-des">
在努力一点点为更好的未来蓄力吧
</view>
<view class="action-text-box-msg">
<image
class="action-text-box-img"
:src="
showImg(
'/uploads/20250728/d7ac383902515c9b507c78fdc8d29520.png'
)
"
></image>
今日点赞和留言<text
style="
font-size: 30rpx;
font-weight: bold;
margin: 0 10rpx;
"
>100</text
>
</view>
</view>
<image
class="avatar"
src="https://epic.js-dyyj.com/uploads/20250728/7d9ba1fe109643681396cb03f60f3218.png"
mode="aspectFill"
></image>
</view>
<view class="">
<view class="" style="display: flex;justify-content: space-between;">
<view class="time-reward-container">
<text class="time-reward-title">时间奖励</text>
<view class="time-reward-stats">
<text class="time-reward-number">120</text>
<text class="time-reward-unit"></text>
</view>
<text class="time-reward-label">文旅时间银行</text>
</view>
<view class="">
<view class="time-reward-number">
用户昵称
</view>
<view class="time-reward-label">
积分:999<text>积分获取规则</text>
</view>
</view>
</view>
<view class="" style="display: flex;align-items: center;">
<view class="">
时长
</view>
<view class="">
点赞
</view>
</view>
</view>
<image
class="avatar"
src="https://epic.js-dyyj.com/uploads/20250728/7d9ba1fe109643681396cb03f60f3218.png"
mode="aspectFill"
></image>
</view>
</template>
</template>
@ -622,6 +616,7 @@ export default {
.bottom-section {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
color: #000000;
}

234
pages/index/iSoul.vue

@ -70,69 +70,33 @@
</view>
</view>
<!-- 权益兑换入口 -->
<!-- <view class="exchange-entry" @click="showExchangePopup">
<!-- <view class="exchange-entry" @click="showExchangePopup">
<view class="exchange-icon">🎁</view>
<view class="exchange-text">权益兑换</view>
</view> -->
</view>
</view>
<!-- 待激活的Agent -->
<view class="agent-section" v-if="false">
<view class="agent-header">
<view class="agent-title">待激活的Agent</view>
</view>
<view class="agent-content">
<scroll-view
class="agent-scroll"
scroll-x="true"
:show-scrollbar="false"
:enhanced="true"
>
<view class="agent-avatars">
<view
class="agent-avatar"
v-for="(agent, index) in agentList"
:key="index"
>
<image
:src="agent.avatar"
mode="aspectFill"
class="agent-img"
></image>
</view>
</view>
</scroll-view>
</view>
<view class="action-box">
<image
@click="showExchangePopup"
:src="showImg('/uploads/20250822/7f18265ca351dfd2d6477322b17c1751.png')"
style="width: 233rpx; height: 43rpx"
></image>
<view class="column-divider"></view>
<image
@click="showActivateAgentPopup"
:src="showImg('/uploads/20250822/53718d0d8a655ac33d7197ad11a32f98.png')"
style="width: 200rpx; height: 43rpx"
></image>
</view>
<!-- 操作按钮 -->
<!-- <view class="action-buttons">
<view class="follow-btn" @click="followUser">
<text>关注</text>
</view>
<view class="message-btn" @click="sendMessage">
<text>私信</text>
</view>
</view> -->
<view class="action-box">
<image
@click="showExchangePopup"
:src="showImg('/uploads/20250822/7f18265ca351dfd2d6477322b17c1751.png')"
style="width: 233rpx;height: 43rpx;"
></image>
<view class="column-divider"></view>
<image
:src="showImg('/uploads/20250822/53718d0d8a655ac33d7197ad11a32f98.png')"
style="width: 200rpx;height: 43rpx;"
></image>
</view>
<!-- 数字资产权益 -->
<view class="digital-assets">
<view class="memorial-divider" style="margin-bottom: 0;">
<view class="divider-line"></view>
<view class="divider-text">数字资产权益</view>
<view class="divider-line"></view>
</view>
<view class="memorial-divider" style="margin-bottom: 0">
<view class="divider-line"></view>
<view class="divider-text">数字资产权益</view>
<view class="divider-line"></view>
</view>
<!-- 有数据时显示滑动卡片 -->
<view v-if="assetList.length > 0" class="asset-scroll-container">
<scroll-view
@ -162,7 +126,9 @@
class="asset-action"
style="flex-direction: row; padding: 20rpx"
>
<text class="action-text-order">{{ asset.actionText }}</text>
<text class="action-text-order">{{
asset.actionText
}}</text>
<text class="action-arrow-order"></text>
</view>
</view>
@ -186,7 +152,7 @@
<!-- 底部操作按钮 -->
<view class="goods-actions">
<view class="goods-action " @click="handleAssetAction('待使用')">
<view class="goods-action" @click="handleAssetAction('待使用')">
<text>待使用</text>
</view>
<view class="goods-action" @click="handleAssetAction('待收货')">
@ -212,10 +178,7 @@
class="digital-img"
></image>
<view class="goods-actions">
<view
class="goods-action "
@click="handleGoodsAction('购物车')"
>
<view class="goods-action" @click="handleGoodsAction('购物车')">
<text>购物车</text>
</view>
<view class="goods-action" @click="handleGoodsAction('待发货')">
@ -315,6 +278,9 @@
<CustomTabBar :currentTab="4" />
<MusicControl />
<!-- 激活AGENT弹窗 -->
<ActivateAgentPopup ref="activateAgentPopup" />
<!-- 权益兑换弹窗 -->
<uni-popup ref="exchangePopup" type="center">
<view class="exchange-popup">
@ -337,15 +303,17 @@
确认兑换
</button>
</view>
<view class="popup-actions-bottom">
<view class="" style="color: #77F3F9;">
如何查找兑换码
</view>
<view class="">
前往君到苏州平台<text style="color: #77F3F9;margin: 0 10rpx;">>></text>
我的权益订单<text style="color: #77F3F9;margin: 0 10rpx;">>></text>复制权益码
</view>
</view>
<view class="popup-actions-bottom">
<view class="" style="color: #77f3f9"> 如何查找兑换码 </view>
<view class="">
前往君到苏州平台<text style="color: #77f3f9; margin: 0 10rpx"
>>></text
>
我的权益订单<text style="color: #77f3f9; margin: 0 10rpx"
>>></text
>复制权益码
</view>
</view>
</view>
</view>
</uni-popup>
@ -356,10 +324,12 @@
import moment from "moment";
import CustomTabBar from "@/components/CustomTabBar.vue";
import MusicControl from "@/components/MusicControl.vue";
import ActivateAgentPopup from "@/components/ActivateAgentPopup.vue";
export default {
components: {
CustomTabBar,
MusicControl,
ActivateAgentPopup,
},
data() {
return {
@ -417,9 +387,7 @@ export default {
],
exchangeCode: "", //
memorialItems: [],
assetList: [
],
assetList: [],
};
},
onLoad() {
@ -467,8 +435,18 @@ export default {
"/uploads/20250729/42598a2dcf4c9a6f8c6e122e54b65c4f.png",
badge: "待使用",
name: item.goodsTitle || "数字资产权益",
desc: item.type==1?'IP数字资产':item.type==2?'IP周边': item.skuName,
actionText:item.type==1?'去查看':item.type==2?'去预约': "去核销",
desc:
item.type == 1
? "IP数字资产"
: item.type == 2
? "IP周边"
: item.skuName,
actionText:
item.type == 1
? "去查看"
: item.type == 2
? "去预约"
: "去核销",
status: "待使用",
...item, //
}));
@ -574,23 +552,22 @@ export default {
});
}
},
handleAction(item){
if(item.type==1){
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail?id=" + item.childId,
});
}else if(item.type==2){
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
}else{
uni.showToast({
title: "使用门票",
icon: "none",
});
}
},
handleAction(item) {
if (item.type == 1) {
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail?id=" + item.childId,
});
} else if (item.type == 2) {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${item.goodsId}&orderChildId=${item.childId}`,
});
} else {
uni.showToast({
title: "使用门票",
icon: "none",
});
}
},
//
handleAssetAction(action, asset = null) {
@ -632,14 +609,14 @@ export default {
break;
}
},
showImgJdsz(img) {
if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
showImgJdsz(img) {
if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
//
handleGoodsAction(action) {
switch (action) {
@ -720,6 +697,11 @@ export default {
}
});
},
// AGENT
showActivateAgentPopup() {
this.$refs.activateAgentPopup.openPopup();
},
},
};
</script>
@ -1116,7 +1098,7 @@ view {
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(135deg, #fffdb7e6 0%, #97fffab5 100%);
background: linear-gradient(135deg, #fffdb7e6 0%, #97fffab5 100%);
border-radius: 20rpx;
padding: 10rpx 16rpx;
backdrop-filter: blur(10rpx);
@ -1142,13 +1124,13 @@ view {
flex-shrink: 0;
margin-left: 8rpx;
}
.action-arrow-order{
font-size: 26rpx;
font-weight: bold;
color: black;
transition: transform 0.3s ease;
flex-shrink: 0;
margin-left: 8rpx;
.action-arrow-order {
font-size: 26rpx;
font-weight: bold;
color: black;
transition: transform 0.3s ease;
flex-shrink: 0;
margin-left: 8rpx;
}
.asset-card:active .action-arrow {
@ -1170,10 +1152,6 @@ view {
font-size: 25rpx;
}
.action-icon {
width: 36rpx;
height: 36rpx;
@ -1319,7 +1297,7 @@ view {
}
.single-badge {
background: linear-gradient(135deg, #77F3F9 0%, #764ba2 100%);
background: linear-gradient(135deg, #77f3f9 0%, #764ba2 100%);
color: white;
font-size: 22rpx;
padding: 8rpx 16rpx;
@ -1533,7 +1511,7 @@ view {
box-sizing: border-box;
&:focus {
border-color: #77F3F9;
border-color: #77f3f9;
}
}
@ -1562,11 +1540,11 @@ view {
.cancel-btn {
background: #f5f5f5;
color: #77F3F9;
color: #77f3f9;
}
.confirm-btn {
background: #77F3F9;
background: #77f3f9;
color: #000000;
}
.column-divider {
@ -1576,18 +1554,18 @@ view {
margin: 35rpx 16rpx;
flex-shrink: 0;
}
.action-box{
display: flex;
align-items: center;
justify-content: space-around;
padding: 20rpx 40rpx 0;
}
.popup-actions-bottom{
color: #989898;
font-weight: bold;
font-size: 28rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
.action-box {
display: flex;
align-items: center;
justify-content: space-around;
padding: 20rpx 40rpx 0;
}
.popup-actions-bottom {
color: #989898;
font-weight: bold;
font-size: 28rpx;
margin-top: 30rpx;
margin-bottom: 30rpx;
}
</style>

4
pages/index/timeShopBank.vue

@ -71,9 +71,8 @@ export default {
},
data() {
return {
currentTab: 1, // ""
currentTab: 0, // ""
tabs: [
{ name: "划线", id: "underline" },
{ name: "笔记", id: "notes" },
{ name: "关注", id: "follow" },
{ name: "推荐", id: "recommend" },
@ -313,6 +312,7 @@ page {
background: #ffffff;
padding: 0 32rpx;
margin-top: 40rpx;
margin-bottom: 20rpx;
}
.tab-wrapper {

Loading…
Cancel
Save