first commit

This commit is contained in:
Jane Doe
2025-03-04 15:25:38 +08:00
commit 4ad00dedd5
188 changed files with 7420 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
var e = getApp();
Page({
data: {
inviteCount: 0,
rewardCount: 0,
countdown: "3天12时30分20秒",
number: 0,
uuid:wx.getStorageSync("uuid"),
},
onLoad: function(e) {
wx.showShareMenu({
withShareTicket: !0,
menus: [ "shareAppMessage", "shareTimeline" ]
}), console.log(1), this.startCountdown();
},
startCountdown: function() {
var e = this, n = 30422e4;
setTimeout(function t() {
var o = Math.floor(n / 864e5) + "天" + Math.floor(n % 864e5 / 36e5) + "时" + Math.floor(n % 36e5 / 6e4) + "分" + Math.floor(n % 6e4 / 1e3) + "秒";
e.setData({
countdown: o
}), (n -= 1e3) >= 0 ? setTimeout(t, 1e3) : e.setData({
countdown: "活动已结束"
});
}, 1e3);
},
onReady: function() {},
onShow: function() {
var n = this;
e.getUserInfo().then(function() {
console.log(wx.getStorageSync("invitees_count"), "人"), console.log(10 * wx.getStorageSync("invitees_count"), "次"),
n.setData({
inviteCount: wx.getStorageSync("invitees_count"),
rewardCount: 10 * wx.getStorageSync("invitees_count"),
number: wx.getStorageSync("balance")
});
}).catch(function(e) {
console.error("An error occurred:", e);
});
},
copyPath: function () {
const path = '/pages/index/index?uuid=' + this.data.uuid;
wx.setClipboardData({
data: path,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'success',
duration: 1500
});
}
});
},
onHide: function() {},
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {
return {
title: "推荐一款免费又超好用的AI视频文案创作工具分享给大家一起使用",
path: "/pages/index/index?uuid=" + wx.getStorageSync("uuid"),
imageUrl: "/images/share.jpg",
success: function(e) {
wx.showToast({
title: "分享成功",
icon: "success",
duration: 2e3
});
},
fail: function(e) {
wx.showToast({
title: "分享失败",
icon: "none",
duration: 2e3
});
}
};
}
});

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "邀请奖励",
"navigationBarBackgroundColor": "#222238",
"navigationBarTextStyle": "white",
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,33 @@
<view class="container">
<view class="section1">
<view class="item">
<text class="title">已邀请:</text>
<text class="count">{{inviteCount}} 人</text>
</view>
<view class="item">
<text class="title">邀请奖励:</text>
<text class="count">{{number}} 元</text>
</view>
</view>
<view class="section2">
<text class="subtitle">邀请规则:</text>
<view class="description">每邀请一个新用户使用小程序奖励,</view>
<view class="description">分享给好友使用即可获得奖励。</view>
<view class="description">邀请的用户首次开通会员您将获得80%返利。</view>
<view class="description">后续续费您将获得40%奖励。</view>
<view class="description">提现门槛100元。</view>
<view class="description warning">禁止任何形式的作弊行为,</view>
<view class="description warning">如发现使用外挂等违规行为,</view>
<view class="description warning">将取消活动资格。</view>
<view class="countdown">活动限时有效</view>
<view class="invite-path">
<text class="path-text" bindtap="copyPath" selectable="true">/pages/index/index?uuid={{uuid}}</text>
</view>
</view>
<view class="button-container">
<button class="reward-button reward-button1" openType="contact">提现</button>
<button class="reward-button reward-button2" openType="share">邀请好友</button>
</view>
</view>

View File

@@ -0,0 +1,126 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
background-color: #f8f8f8;
}
.section1 {
width: 90%;
max-width: 600px;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
display: flex;
justify-content: space-around;
}
.item {
text-align: center;
}
.title {
font-size: 14px;
color: #333;
margin-bottom: 5px;
}
.count {
font-size: 18px;
font-weight: bold;
color: #007bff;
}
.section2 {
width: 90%;
max-width: 600px;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.subtitle {
font-size: 16px;
font-weight: bold;
color: #333;
text-align: center;
}
.description {
margin-top: 15px;
font-size: 14px;
color: #666;
line-height: 1.6;
margin-bottom: 8px;
}
.warning {
color: #d9534f;
margin-top: 5px;
}
.countdown {
font-size: 14px;
color: #999;
text-align: center;
margin-top: 15px;
}
.button-container {
width: 90%;
max-width: 600px;
display: flex;
justify-content: space-around;
}
.invite-path {
margin-top: 20px;
padding: 10px;
background-color: #f0f0f0;
border-radius: 5px;
display: flex;
align-items: center;
}
.path-title {
font-size: 14px;
color: #333;
margin-right: 10px;
}
.path-text {
font-size: 14px;
color: #007bff;
word-break: break-all; /* 长路径自动换行 */
}
.reward-button {
width: 48%;
margin: 10px;
border-radius: 25px;
font-size: 16px;
font-weight: 500;
color: white; /* 字体颜色改为白色 */
border: none;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影更明显 */
transition: transform 0.2s ease, box-shadow 0.2s ease;
text-align: center;
}
.reward-button:active {
transform: translateY(2px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.reward-button1 {
background: linear-gradient(135deg, #4CAF50, #2E7D32); /* 深绿色渐变 */
}
.reward-button2 {
background: linear-gradient(135deg, #2196F3, #1976D2); /* 深蓝色渐变 */
}