增加分享页面,新版本提醒

This commit is contained in:
2025-04-02 16:02:12 +08:00
parent e70a21241b
commit a66df12632
16 changed files with 328 additions and 8 deletions

23
app.js
View File

@ -45,6 +45,7 @@ App({
if(options.query.shared_user_code){
this.globalData.shared_user_code = options.query.shared_user_code;
}
this.checkUpdate();
},
navToLogin(){
wx.reLaunch({
@ -181,5 +182,27 @@ App({
},
getAddressList(){
},
checkUpdate() {
if (!wx.canIUse('getUpdateManager')) {
return;
}
const updateManager = wx.getUpdateManager();
updateManager.onCheckForUpdate((res) => {
console.log(res);
});
updateManager.onUpdateReady(() => {
wx.showModal({
title: '更新提示',
content: '新版本已准备好,重启应用以使用新版本',
showCancel: false,
success: (res) => {
if (res.confirm) {
updateManager.applyUpdate();
}
}
});
});
}
})

View File

@ -25,7 +25,8 @@
"pages/my/setting/name/index",
"pages/browser/index",
"pages/my/promation/wx-group/index",
"pages/order/markup/index"
"pages/order/markup/index",
"pages/my/promation/share/index"
],
"window": {
"navigationBarTextStyle": "black",

BIN
assets/icon/my/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
assets/imgs/share/icon1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/imgs/share/icon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/imgs/share/icon3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

BIN
assets/imgs/share/icon4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/imgs/share/share.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

View File

@ -82,11 +82,11 @@
<view class="title">{{appConfig.join_group_title}}</view>
<view class="sub-title">{{appConfig.join_group_desc}}</view>
</view>
<button class="item right share" open-type="share">
<navigator url="/pages/my/promation/share/index" class="item right share">
<image src="/assets/icon/help/share.png" class="icon"/>
<view class="title">{{appConfig.share_button_title}}</view>
<view class="sub-title">{{appConfig.share_button_mini_desc}}</view>
</button>
</navigator>
</view>
<!-- <navigator url="/pages/my/promation/wx-group/index?communityId={{currentCommunity.id}}"
class="promotion-panel" wx:if="{{currentCommunity.id}}" wx:if="{{appConfig&&appConfig.join_group_title}}">

View File

@ -56,9 +56,6 @@ Page({
wx.navigateTo({
url: `/pages/browser/index?url=${encodeURIComponent(url)}`,
})
},
shareFriend(){
},
showQRCode(){
userApi.shareQRCode().then((data)=>{

View File

@ -38,14 +38,14 @@
<view class="cell-ft"></view>
</navigator>
</view> -->
<button class="invite-cell" bind:tap="shareFriend" open-type="share">
<navigator url="/pages/my/promation/share/index" class="invite-cell">
<view class="title">
<image class="icon" src="/assets/icon/my/share@2x.png"></image>
<view class="text">{{appConfig.share_button_title}}</view>
<view class="right-arrow"></view>
</view>
<view class="sub-title">{{appConfig.share_button_desc}}</view>
</button>
</navigator>
<view class="cells cells-access">
<navigator url="/pages/my/firend/index" class="cell" hover-class="cell-active">
<view class="cell-hd">

View File

@ -0,0 +1,66 @@
// pages/my/promation/share/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "宠粉行动"
}

View File

@ -0,0 +1,77 @@
<scroll-view scroll-y class="scroll-view">
<view class="scroll-view-top-margin"></view>
<view class="logo-area">
<image src="/assets/icon/my/logo.png" class="logo"/>
</view>
<image class="share-title" src="/assets/imgs/share/share-title.png" mode="widthFix"/>
<view class="main">
<view class="head">奖励规则</view>
<view class="m-item large">
<view class="left">
<image class="icon" src="/assets/imgs/share/icon1.png"/>
</view>
<view class="right">
<view class="title">好友首单奖励</view>
<view class="sub-title">
好友注册并完成首单,您将获得<label class="point">30积分</label>奖励
</view>
</view>
</view>
<view class="m-item large">
<view class="left">
<image class="icon" src="/assets/imgs/share/icon1.png"/>
</view>
<view class="right">
<view class="title">好友首单奖励</view>
<view class="sub-title">
好友每完成后续订单,您将获得<label class="point">3积分</label>奖励
</view>
</view>
</view>
<view class="spliter"></view>
<view class="m-item small">
<view class="left">
<image class="icon" src="/assets/imgs/share/icon1.png"/>
</view>
<view class="right">
<view class="sub-title">
积分可用于抵扣配送费,<label class="point">10积分=1元</label>
</view>
</view>
</view>
<view class="m-item small">
<view class="left">
<image class="icon" src="/assets/imgs/share/icon1.png"/>
</view>
<view class="right">
<view class="sub-title">
积分长期有效,无需担心过期
</view>
</view>
</view>
<button type="primary" class="btn-share" open-type="share">
<image src="/assets/imgs/share/share.png" class="icon"/>
<label>立即邀请好友</label>
</button>
<view class="step-area">
<view class="title">邀请步骤</view>
<view class="steps">
<view class="item">
<view class="icon">1</view>
<view class="text">分享给好友</view>
</view>
<view class="item">
<view class="icon">2</view>
<view class="text">好友下单完成</view>
</view>
<view class="item">
<view class="icon">3</view>
<view class="text">获得积分奖励</view>
</view>
</view>
</view>
</view>
</scroll-view>

View File

@ -0,0 +1,152 @@
page{
background-color:var(--main-color);
}
.scroll-view{
height:100vh;
}
.logo-area{
background-color: rgba(237, 181, 0, 1);
border-radius: 50%;
width:132rpx;height:132rpx;
margin:70rpx auto 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
.logo-area .logo{
width:84rpx;height:84rpx;
}
.share-title{
width:512rpx;
margin:36rpx auto 0 auto;
display: block;
}
.main{
background-color: #fff;
border-radius: 18rpx;
margin:40rpx 24rpx;
padding:40rpx 24rpx;
box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.1);
}
.main .head{
font-size: 36rpx;
display: flex;
gap: 24rpx;
align-items: center;
color: var(--main-color);
}
.main .head::before{
content: '';
background-color: var(--main-color);
border-radius: 18rpx;
width:8rpx;height:32rpx;
}
.main .m-item{
display: flex;
align-items: center;
margin:50rpx 0 60rpx 0;
}
.main .m-item.small{
margin:30rpx 0;
}
.main .m-item .left{
width:70rpx;height:70rpx;
background-color: rgba(255, 246, 217, 1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.main .m-item.small .left{
width:52rpx;height:52rpx;
}
.main .m-item .right{
margin-left:24rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
}
.main .m-item .icon{
width:40rpx;height:40rpx;
}
.main .m-item .title{
font-weight: 500;
}
.main .m-item .sub-title{
font-size:26rpx;
color: rgba(85, 85, 85, 1);
}
.main .m-item .point{
color: var(--main-color);
font-weight: 600;
margin:0 12rpx;
}
.spliter{
position: relative;
margin:64rpx 0 60rpx 0;
}
.spliter::before{
content:'积分说明';
position: absolute;
top:-14rpx;left:50%;
margin-left: -78rpx;
padding:0 22rpx;
font-size: 28rpx;
background-color: #fff;
}
.btn-share{
border-radius: 60rpx;
margin:60rpx 70rpx 0 70rpx!important;
line-height: 1;
}
.step-area{
background-color: rgba(255, 246, 217, 1);
border-radius: 18rpx;
padding:30rpx 24rpx 34rpx 24rpx;
margin-top:60rpx;
}
.step-area .title{
color: var(--main-color);
text-align: center;
}
.step-area .steps{
display: flex;
font-size: 22rpx;
margin-top:34rpx;
}
.step-area .steps .item{
display: flex;
flex-direction: column;
gap: 30rpx;
flex: 1;
align-items: center;
position: relative;
}
.step-area .steps .icon{
width:60rpx;height:60rpx;
background-color: rgba(237, 181, 0, 1);
font-size: 36rpx;
font-weight: bold;
border-radius: 50%;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.step-area .steps .item::after{
background:transparent url(data:image/svg+xml,%3Csvg%20t%3D%221743574928938%22%20class%3D%22icon%22%20viewBox%3D%220%200%201024%201024%22%20version%3D%221.1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20p-id%3D%2245741%22%20width%3D%22128%22%20height%3D%22128%22%3E%3Cpath%20d%3D%22M456.99072%20608.60416l-272.9984-28.73344a68.23936%2068.23936%200%200%201%200-135.74144l272.9984-28.73344A61.44%2061.44%200%200%200%20512%20354.28352v-132.15744C512%20201.23648%20529.73568%20184.32%20551.60832%20184.32c10.15808%200%2019.94752%203.72736%2027.32032%2010.4448L882.688%20470.91712a54.90688%2054.90688%200%200%201%200%2082.1248L578.92864%20829.25568a40.96%2040.96%200%200%201-56.0128-1.31072A36.90496%2036.90496%200%200%201%20512%20801.87392V669.696a61.44%2061.44%200%200%200-55.00928-61.11232z%22%20p-id%3D%2245742%22%20fill%3D%22%23EDB500%22%3E%3C/path%3E%3C/svg%3E);
content: '';
position: absolute;
width:40rpx;height:40rpx;
right: -20rpx;top:10rpx;
background-size: 100%;
}
.step-area .steps .item:last-child::after{
display: none;
}