|
|
|
@@ -0,0 +1,159 @@ |
|
|
|
<template>
|
|
|
|
<view class="page">
|
|
|
|
<!-- 轮播图 -->
|
|
|
|
<u-swiper
|
|
|
|
indicatorMode="line"
|
|
|
|
:list="swiperList"
|
|
|
|
@change=""
|
|
|
|
@click="click"
|
|
|
|
></u-swiper>
|
|
|
|
<!-- 底部 -->
|
|
|
|
<view class="bottomBox">
|
|
|
|
<text class="balance">金币余额: 30</text>
|
|
|
|
<up-button
|
|
|
|
type="primary"
|
|
|
|
text="下载照片"
|
|
|
|
color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
|
|
|
|
@click=""
|
|
|
|
></up-button>
|
|
|
|
<view class="btnBox">
|
|
|
|
<up-button
|
|
|
|
type="primary"
|
|
|
|
text="分享"
|
|
|
|
color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
|
|
|
|
open-type="share"
|
|
|
|
@click="share"
|
|
|
|
></up-button>
|
|
|
|
<up-button
|
|
|
|
type="primary"
|
|
|
|
text="邀请好友"
|
|
|
|
color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
|
|
|
|
open-type="share"
|
|
|
|
@click="inviteFriend"
|
|
|
|
></up-button>
|
|
|
|
<up-button
|
|
|
|
type="primary"
|
|
|
|
text="购买金币"
|
|
|
|
color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
|
|
|
|
@click="bueCoin"
|
|
|
|
></up-button>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
//#region 导入
|
|
|
|
import { ref, reactive } from "vue";
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
//#region 轮播图
|
|
|
|
const swiperList = ref([
|
|
|
|
"https://uiadmin.net/uview-plus/common/logo.png",
|
|
|
|
"../../assets/img/img1.jpg",
|
|
|
|
"https://uiadmin.net/uview-plus/common/logo.png",
|
|
|
|
"../../assets/img/img1.jpg",
|
|
|
|
]);
|
|
|
|
//#endregion ---------------------
|
|
|
|
|
|
|
|
//#region 分享
|
|
|
|
function share() {
|
|
|
|
uni.share({
|
|
|
|
provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
|
|
|
|
scene: "WXSenceTimeline", //WXSceneSession(分享到聊天界面)、WXSenceTimeline(分享到朋友圈)、WXSceneFavorite(分享到微信收藏)
|
|
|
|
type: 5,
|
|
|
|
title: "分享到朋友圈",
|
|
|
|
summary: "分享描述",
|
|
|
|
href: "www.baidu.com", //分享跳转地址
|
|
|
|
imageUrl: "../static/lovehot.png", //分享图片路径(必须是线上可访问图片)
|
|
|
|
miniProgram: {
|
|
|
|
id: "wx75cf14e3a0d45821",
|
|
|
|
path: "pages/index/index",
|
|
|
|
type: 0,
|
|
|
|
webUrl: "",
|
|
|
|
},
|
|
|
|
success: function (res) {
|
|
|
|
// console.log("success:" + JSON.stringify(res));
|
|
|
|
},
|
|
|
|
fail: function (err) {
|
|
|
|
// console.log("fail:" + JSON.stringify(err));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function inviteFriend() {
|
|
|
|
uni.share({
|
|
|
|
provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
|
|
|
|
scene: "WXSceneSession", //WXSceneSession(分享到聊天界面)、WXSenceTimeline(分享到朋友圈)、WXSceneFavorite(分享到微信收藏)
|
|
|
|
type: 5,
|
|
|
|
title: "分享给好友",
|
|
|
|
summary: "分享描述",
|
|
|
|
href: "www.baidu.com", //分享跳转地址
|
|
|
|
imageUrl: "../static/lovehot.png", //分享图片路径(必须是线上可访问图片)
|
|
|
|
miniProgram: {
|
|
|
|
id: "gwx75cf14e3a0d45821",
|
|
|
|
path: "pages/index/index",
|
|
|
|
type: 0,
|
|
|
|
webUrl: "",
|
|
|
|
},
|
|
|
|
success: function (res) {
|
|
|
|
// console.log("success:" + JSON.stringify(res));
|
|
|
|
},
|
|
|
|
fail: function (err) {
|
|
|
|
// console.log("fail:" + JSON.stringify(err));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//#endregion ---------------------
|
|
|
|
|
|
|
|
//#region 页面跳转
|
|
|
|
function bueCoin() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/home/buyCoin",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//#endregion ---------------------
|
|
|
|
|
|
|
|
//#region
|
|
|
|
|
|
|
|
//#endregion ---------------------
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.u-swiper {
|
|
|
|
width: 90%;
|
|
|
|
height: 800rpx !important;
|
|
|
|
swiper {
|
|
|
|
width: 100%;
|
|
|
|
height: 700rpx !important;
|
|
|
|
image {
|
|
|
|
width: 100%;
|
|
|
|
height: 700rpx !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottomBox {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
.balance {
|
|
|
|
margin-top: 30rpx;
|
|
|
|
font-size: 40rpx;
|
|
|
|
margin-bottom: 50rpx;
|
|
|
|
}
|
|
|
|
button {
|
|
|
|
width: 60% !important;
|
|
|
|
}
|
|
|
|
.btnBox {
|
|
|
|
margin-top: 90rpx;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
button {
|
|
|
|
width: 30% !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|