修改分享

This commit is contained in:
张凯 2025-05-13 14:58:32 +08:00
parent 7a1962f746
commit b5602f098c

View File

@ -6,8 +6,8 @@
</view>
<view class="box flex justify-start flex-column align-items" :class="overlay ? 'no-scroll' : ''">
<view class="swiper">
<u-swiper :list="detail.images" indicator indicatorActiveColor="#323232" indicatorMode="dot" :indicator-style="{ bottom: '60rpx',zIndex: 999}"
:height="height_sw" circular></u-swiper>
<u-swiper :list="detail.images" indicator indicatorActiveColor="#323232" indicatorMode="dot"
:indicator-style="{ bottom: '60rpx', zIndex: 999 }" :height="height_sw" circular></u-swiper>
</view>
<view class="con-center w-100 flex justify-center flex-column align-items flex-start">
@ -26,56 +26,52 @@
</view>
<view class="first-box flex flex-start flex-column justify-start">
<view class="flex align-items">
<span class="first-name">{{detail.title}}</span>
<span class="first-name">{{ detail.title }}</span>
</view>
<span class="first-image flex align-items" style="margin-top: 25rpx;width: 100%;">
<image :src="detail.user.avatar" mode="" class="icon-size" style="width: 36rpx;height: 36rpx;"></image>
<image :src="detail.user.avatar" mode="" class="icon-size" style="width: 36rpx;height: 36rpx;">
</image>
<span style="color: #9C9C9C ;width: 32%;">{{ detail.user.nickname }}</span>
<span class="flex justify-center align-items xieyi">
<image src="/static/detail/baohu.png" mode="" style="width: 28rpx;height: 28rpx;margin-right: 0;" ></image>
<span class="white-space" style="width: 90rpx;text-align: center;">{{ detail.refund_info.title }}</span>
<image src="/static/detail/zidong.png" mode="" style="width: 20rpx;height: 20rpx;margin-right: 0;" ></image>
<image src="/static/detail/baohu.png" mode=""
style="width: 28rpx;height: 28rpx;margin-right: 0;"></image>
<span class="white-space" style="width: 90rpx;text-align: center;">{{
detail.refund_info.title }}</span>
<image src="/static/detail/zidong.png" mode=""
style="width: 20rpx;height: 20rpx;margin-right: 0;"></image>
</span>
</span>
<span class="first-image flex align-items" style="margin-top: 20rpx;">
<image src="../../static/center/Alarm.png" mode="" class="icon-size"></image>
<span>{{formattedTime.formattedTime}}</span>
<span>{{ formattedTime.formattedTime }}</span>
</span>
<span class="line"></span>
<span class="first-image flex align-items"
@click.stop="toMap(detail.latitude,detail.longitude,detail.address_detail)">
@click.stop="toMap(detail.latitude, detail.longitude, detail.address_detail)">
<image src="/static/center/address.png" mode="" class="icon-size"></image>
<span>{{detail.address_detail}}</span>
<image src="/static/detail/daohang.png" class="icon-size" style="width: 50rpx; height: 50rpx;"></image>
<span>{{ detail.address_detail }}</span>
<image src="/static/detail/daohang.png" class="icon-size" style="width: 50rpx; height: 50rpx;">
</image>
</span>
<span class="line"></span>
<view class="second-box flex align-items space-between">
<view class="flex align-items">
<u-avatar-group :urls="detail.join_info.users"
keyName="avatar" size="30" gap="0.3" :maxCount="3"></u-avatar-group>
<image
src="/static/index/dian.png"
:class="detail.join_info.users && detail.join_info.users.length > 0 ? '' :'smalld'"
style="width: 60rpx;height: 60rpx;margin-left:-20rpx;z-index: 1;"
></image>
<u-avatar-group :urls="detail.join_info.users" keyName="avatar" size="30" gap="0.3"
:maxCount="3"></u-avatar-group>
<image src="/static/index/dian.png"
:class="detail.join_info.users && detail.join_info.users.length > 0 ? '' : 'smalld'"
style="width: 60rpx;height: 60rpx;margin-left:-20rpx;z-index: 1;"></image>
</view>
<span class="number">{{detail.join_info.people_number}}/{{detail.join_info.stock >= 10000 ? '9999+' : detail.join_info.stock}}
<span class="number">{{ detail.join_info.people_number }}/{{ detail.join_info.stock >= 10000 ?
'9999+' : detail.join_info.stock}}
人数</span>
<view class="value_slide">
<u-slider
v-model="value_slide"
showValue
min="0"
max="100"
blockSize="12"
inactiveColor="#EBEBEB"
activeColor="#BBFC5B"
disabled
></u-slider>
<u-slider v-model="value_slide" showValue min="0" max="100" blockSize="12"
inactiveColor="#EBEBEB" activeColor="#BBFC5B" disabled></u-slider>
</view>
</view>
</view>
@ -92,7 +88,8 @@
<view class="v_html">
<rich-text :nodes="detail.content"></rich-text>
</view>
<image mode="widthFix" class="imgs" v-for="(item,index) in detail.images" :key="index" :src="item"></image>
<image mode="widthFix" class="imgs" v-for="(item, index) in detail.images" :key="index" :src="item">
</image>
</view>
</view>
@ -143,22 +140,22 @@
</view>
<!-- <span class="line"></span> -->
<view class="times flex align-items justify-center" style="flex-wrap: wrap;">
<span class="selectTime flex justify-center align-items" v-for="(item,index) in timeList"
<span class="selectTime flex justify-center align-items" v-for="(item, index) in timeList"
:key="index" :class="{ selected: timeSelected(item) }" @click="selectTime(item)">
{{item.name}}</span>
{{ item.name }}</span>
</view>
</view>
</u-popup>
<!-- 购买弹窗 -->
<u-popup :show="buyShow" mode="center" :round="10" :zIndex="99999" :custom-style="popupStyle" @close="buyClose"
@open="buyOpen" :safeAreaInsetBottom="false" :closeable="true">
<u-popup :show="buyShow" mode="center" :round="10" :zIndex="99999" :custom-style="popupStyle"
@close="buyClose" @open="buyOpen" :safeAreaInsetBottom="false" :closeable="true">
<view class="popupBox flex justify-start align-items flex-column">
<view class="pop-header flex align-items flex-column flex-start">
<span class="name white-space">{{detail.title}}</span>
<span class="name white-space">{{ detail.title }}</span>
<span class="price">
<span v-if="detail.feel == 0">{{detail.price}}</span>
<span v-if="detail.feel == 0">{{ detail.price }}</span>
<span v-if="detail.feel == 1">公益</span>
</span>
<!-- <image src="../../static/center/buy.png" mode="" style="width: 168rpx; height: 48rpx;">
@ -167,11 +164,11 @@
<view class="popup flex-column">
<span class="first-image flex align-items" style="margin: 16rpx 0;">
<image src="../../static/center/Alarm.png" mode="" class="icon-size"></image>
<span>{{formattedTime.formattedTime}} (共计{{formattedTimeList.length}})</span>
<span>{{ formattedTime.formattedTime }} (共计{{ formattedTimeList.length }})</span>
</span>
<span class="first-image flex align-items">
<image src="../../static/center/address.png" mode="" class="icon-size"></image>
<span>{{detail.address_detail}}</span>
<span>{{ detail.address_detail }}</span>
</span>
<!-- <image :src="detail.headimage" mode="" style="width: 200rpx; height: 140rpx;"></image>
<view class="popur-right flex flex-column">
@ -206,7 +203,7 @@
<view ref="painter" class="title_top">
<view class="toutop">
<image class="toutu" :src="detail.user.avatar" />
<view class="toututt">{{detail.user.nickname}}的邀请</view>
<view class="toututt">{{ detail.user.nickname }}的邀请</view>
</view>
<view class="center_con">
<image v-if="detail.images" :src="detail.images[0]" class="cenimg" />
@ -214,12 +211,13 @@
<view>
<view class="c1t1">{{ formattedTitle }}</view>
<view class="c2t2">{{ detail.price }}</view>
<view class="c3t3">地址{{ detail.address }}</view>
<view class="c3t3 white-space">地址{{ detail.address }}</view>
</view>
<view style="background-color: #ffffff;border-radius: 18rpx;">
<l-painter>
<l-painter-view css="margin:20rpx;">
<l-painter-qrcode css="width: 160rpx; height: 160rpx;margin:0 auto;" :text="qrUrl"></l-painter-qrcode>
<l-painter-qrcode css="width: 160rpx; height: 160rpx;margin:0 auto;"
:text="qrUrl"></l-painter-qrcode>
</l-painter-view>
</l-painter>
</view>
@ -236,9 +234,8 @@
<span> </span>
</button>
</view>
<canvas
canvas-id="myCanvas"
style="position: absolute;top:256rpx;left: 48rpx; width: 661rpx;height:1075rpx; visibility: hidden;">
<canvas canvas-id="myCanvas"
style="position: absolute;top:256rpx;left: 48rpx; width: 661rpx;height:1075rpx; visibility: hidden;z-index: 10;">
</canvas>
</u-overlay>
@ -247,12 +244,12 @@
</template>
<script>
import dayjs from 'dayjs';
import {
import dayjs from 'dayjs';
import {
dateWeek,
dateWeekend
} from '../../utils/dateFormat'
export default {
} from '../../utils/dateFormat'
export default {
computed: {
formattedTitle() {
if (this.detail.title.length > 9) {
@ -282,14 +279,14 @@
data() {
return {
height_sw:'580rpx',
height_sw: '580rpx',
style: {
//
img: 'width: 100%'
},
isShare:'',
value_slide:0,
isShare: '',
value_slide: 0,
scrollTop: 0,
overlay: false,
userInfo: {},
@ -349,7 +346,7 @@
onLoad(options) {
this.userInfo = uni.getStorageSync("userInfo")
this.id = options.id
if(options.isShare){
if (options.isShare) {
this.isShare = options.isShare;
}
// this.id = 1
@ -371,6 +368,7 @@
methods: {
capturePage() {
let that = this;
uni.canvasToTempFilePath({
x: 0, // x
y: 0, // y
@ -381,7 +379,8 @@
canvasId: 'myCanvas', // Canvasid
success: function (res) {
console.log('tempFilePath:', res.tempFilePath); //
this.save(res.tempFilePath)
uni.previewImage({ urls: [res.tempFilePath] });
that.save(res.tempFilePath);
},
fail: function (err) {
console.error(err); //
@ -390,13 +389,13 @@
},
//
goHome() {
if(this.isShare == 1){
if (this.isShare == 1) {
uni.switchTab({
url: "/pages/index/index"
})
}
},
closeoo(){
closeoo() {
this.overlay = false;
},
overlayShow() {
@ -412,8 +411,8 @@
title: '请登录',
icon: 'none',
duration: 2000,
complete: function() {
setTimeout(function() {
complete: function () {
setTimeout(function () {
uni.switchTab({
url: '/pages/my/index',
});
@ -565,7 +564,7 @@
duration: 2000
})
}
}).catch(error => {});
}).catch(error => { });
},
// 0 1 2 3
@ -627,8 +626,8 @@
title: res.msg,
icon: 'none',
duration: 2000,
complete: function() {
setTimeout(function() {
complete: function () {
setTimeout(function () {
uni.reLaunch({
url: "/packageA/my/makeList?status=" + -1
})
@ -662,7 +661,7 @@
latitude: parseFloat(latitude),
longitude: parseFloat(longitude),
name: name,
success: function() {
success: function () {
console.log('success');
}
});
@ -687,36 +686,47 @@
//
save(e) {
let base64 = this.path.replace(/^data:image\/\w+;base64,/, ""); //
let filePath = wx.env.USER_DATA_PATH + '/qrcode.png';
uni.getFileSystemManager().writeFile({
filePath: filePath, //
data: base64, //
encoding: 'base64', //
success: (res) => {
uni.saveImageToPhotosAlbum({
filePath: filePath,
success: () => {
uni.showToast({
wx.saveImageToPhotosAlbum({
filePath: e,
success: function(res) {
wx.showToast({
title: '保存成功',
icon: "none",
duration: 5000
})
},
fail: (err) => {
console.log(err);
uni.showToast({
title: '保存失败',
icon: "none",
duration: 5000
})
}
})
},
fail: (err) => {
console.log(err)
fail: function(err) {
console.log(err, '失败')
}
})
// let base64 = this.path.replace(/^data:image\/\w+;base64,/, ""); //
// let filePath = wx.env.USER_DATA_PATH + '/qrcode.png';
// uni.getFileSystemManager().writeFile({
// filePath: filePath, //
// data: base64, //
// encoding: 'base64', //
// success: (res) => {
// uni.saveImageToPhotosAlbum({
// filePath: filePath,
// success: () => {
// uni.showToast({
// title: '',
// icon: "none",
// duration: 5000
// })
// },
// fail: (err) => {
// console.log(err);
// uni.showToast({
// title: '',
// icon: "none",
// duration: 5000
// })
// }
// })
// },
// fail: (err) => {
// console.log(err)
// }
// })
},
//
sharePoster() { //
@ -811,14 +821,14 @@
timeSelected(time) {
return this.selectedTime === time;
},
moveScroll() {},
moveScroll() { },
//
getMoney() {
uni.$u.http.post('/api/school.newactivity.order/confirm', {
activity_id: this.id,
order_no: this.order_no,
is_compute: 1,
num:1
num: 1
}).then(res => {
if (res.code == 1) {
this.PayPirce = res.data.order_data.totalprice
@ -851,8 +861,8 @@
title: '创建成功',
icon: 'success',
duration: 2000,
complete: function() {
setTimeout(function() {
complete: function () {
setTimeout(function () {
uni.redirectTo({
url: "/packageA/my/orderList?status=" + 3
})
@ -920,43 +930,44 @@
});
},
},
}
}
</script>
<style lang="scss" scoped>
.detail_all{
.detail_all {
background-color: #f7f7f7;
height: 100vh;
}
.w-100 {
}
.w-100 {
width: 100%;
}
}
.flex {
.flex {
display: flex;
}
}
.flex-start {
.flex-start {
align-items: flex-start;
}
}
.justify-center {
.justify-center {
justify-content: center;
}
}
.align-items {
.align-items {
align-items: center;
}
}
.flex-column {
.flex-column {
flex-flow: column;
}
}
.justify-start {
.justify-start {
justify-content: start;
}
}
.white-space {
.white-space {
overflow: hidden;
/* 确保超出容器的文本被隐藏 */
white-space: nowrap;
@ -964,56 +975,60 @@
text-overflow: ellipsis;
/* 使用省略号表示被截断的文本 */
width: 100%;
}
}
.con-center {
.con-center {
background: white;
border-radius: 44rpx;
position: relative;
}
}
.space-between {
.space-between {
justify-content: space-between;
}
}
.swiper {
.swiper {
width: 100%;
height: 580rpx;
}
}
.box {
.box {
position: relative;
}
}
.topimgs_rmb{
.topimgs_rmb {
position: absolute;
top: -168rpx;
right: 30rpx;
width: 201rpx;
height: 118rpx;
z-index: 0;
}
.topimgs{
}
.topimgs {
position: absolute;
top: -120rpx;
width: 100%;
z-index: 0;
}
.top_texts{
}
.top_texts {
position: absolute;
top: -151rpx;
right: 68rpx;
z-index: 3;
color: #ffffff;
.xiao{
.xiao {
margin-left: 4rpx;
font-size: 22rpx;
font-weight: bold;
}
}
.first-box {
}
.first-box {
width: 690rpx;
background: #FFFFFF;
// background: url('@/static/detail/conbg.png');
@ -1021,6 +1036,7 @@
// margin-top: 20rpx;
border-radius: 20rpx;
z-index: 1;
.sigh {
width: 88rpx;
height: 40rpx;
@ -1031,7 +1047,8 @@
font-size: 24rpx;
color: #222222;
}
.first-name{
.first-name {
width: 586rpx;
height: 52rpx;
font-family: PingFang SC, PingFang SC;
@ -1074,25 +1091,27 @@
font-size: 26rpx;
color: #222222;
}
.xieyi{
background-color:#BBFC5B;
.xieyi {
background-color: #BBFC5B;
width: 156rpx;
height: 48rpx;
border-radius: 8rpx;
margin-left: 20rpx;
}
}
}
}
.second-box {
.second-box {
width: 690rpx;
height: 64rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin: 20rpx 0 16rpx 0;
.smalld{
.smalld {
margin-left: 0 !important;
}
.number {
height: 40rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
@ -1111,28 +1130,31 @@
margin: 0 22rpx 0 4rpx;
}
}
}
}
.third {
.third {
width: 100%;
background: #ffffff;
margin-top:20rpx;
margin-top: 20rpx;
border-radius: 44rpx;
margin-bottom: 150rpx;
.third-top{
.third-top {
font-family: PingFang SC, PingFang SC;
font-weight: bold;
font-size: 36rpx;
color: #323232;
line-height: 50rpx;
margin-top: 30rpx;
margin-left:30rpx;
margin-left: 30rpx;
position: relative;
z-index: 10;
}
span{
span {
position: relative;
.icons{
.icons {
width: 37rpx;
height: 20rpx;
position: absolute;
@ -1141,41 +1163,45 @@
z-index: -1;
}
}
.third-center {
padding: 30rpx;
overflow: hidden;
margin: 0 auto;
height: 100%;
.v_html{
word-wrap: break-word;word-break: break-all;
.v_html {
word-wrap: break-word;
word-break: break-all;
font-size: 26rpx;
line-height: 42rpx;
}
.imgs{
margin-top:30rpx;
.imgs {
margin-top: 30rpx;
width: 690rpx;
}
}
}
}
.line {
.line {
width: 690rpx;
height: 1rpx;
background: #F0F0F0;
margin: 19rpx 0;
}
}
.icon-size {
.icon-size {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
}
.footer {
.footer {
width: 100%;
height: 166rpx;
// background: #ffffff;
@ -1234,10 +1260,10 @@
color: #BBFC5B;
}
}
}
}
.popupBox {
.popupBox {
width: 690rpx;
height: 716rpx;
@ -1367,9 +1393,9 @@
margin: 24rpx 32rpx 0 0;
}
}
}
.share {
.share {
position: fixed;
color: #FFFFFF;
right: 0;
@ -1379,9 +1405,9 @@
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
box-shadow: 0 0 20upx rgba(0, 0, 0, .09);
}
}
.cancel {
.cancel {
width: 100vw;
padding: 30rpx;
text-align: center;
@ -1389,49 +1415,49 @@
color: red;
font-weight: bold;
font-size: 30rpx;
}
}
.md-content {
.md-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 50rpx 0;
background-color: white;
}
}
.md-content-item {
.md-content-item {
margin: 0 70rpx;
position: relative;
}
}
.md-content-item image {
.md-content-item image {
width: 100rpx;
height: 100rpx;
}
}
.md-content-item view {
.md-content-item view {
margin-top: 15rpx;
font-size: 28rpx;
}
}
.sharebtn {
.sharebtn {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
}
}
.cu-modal {
.cu-modal {
position: fixed;
bottom: 166rpx;
left: 0;
z-index: 999999;
}
}
.gj {
.gj {
.title {
font-family: PingFang SC, PingFang SC;
font-weight: 800;
@ -1482,9 +1508,9 @@
}
}
}
}
}
::v-deep ::-webkit-scrollbar {
::v-deep ::-webkit-scrollbar {
/*滚动条整体样式*/
width: 4px !important;
height: 1px !important;
@ -1492,58 +1518,66 @@
background: #ccc !important;
-webkit-appearance: auto !important;
display: block;
}
}
::v-deep ::-webkit-scrollbar-thumb {
::v-deep ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px !important;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background: #7b7979 !important;
}
}
::v-deep ::-webkit-scrollbar-track {
::v-deep ::-webkit-scrollbar-track {
/*滚动条里面轨道*/
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
// border-radius: 10px !important;
background: #FFFFFF !important;
}
.pos {
}
.pos {
position: relative;
width: 100%;
height: 100%;
}
.Poster {
}
.Poster {
position: relative;
margin: 0 auto;
.posterClose {
position: absolute;
right: 8rpx;
top: 200rpx;
}
.title_top{
.title_top {
position: relative;
margin: 0 auto;
width: 661rpx;height:1075rpx;
width: 661rpx;
height: 1075rpx;
background-image: url('https://naweigetetest2.hschool.com.cn/dyqc/fenxiang.png');
background-size: 100%;
background-repeat: no-repeat;
margin-top: 240rpx;
}
.toutop{
.toutop {
position: absolute;
top: 120rpx;
left: 30rpx;
display: flex;
align-items: center;
width: 80%;
.toutu{
.toutu {
width: 60rpx;
height: 60rpx;
border-radius: 134rpx 134rpx 134rpx 134rpx;
border: 2rpx solid #FFFFFF;
}
.toututt{
.toututt {
padding-left: 15rpx;
height: 36rpx;
font-family: PingFang SC Bold, PingFang SC Bold;
@ -1556,48 +1590,56 @@
text-transform: none;
}
}
.center_con{
.center_con {
padding-top: 200rpx;
.cenimg{
.cenimg {
width: 620rpx;
height: 620rpx;
border-radius: 24rpx;
margin: 0 auto;
display: block;
}
.center_text{
.center_text {
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 30rpx;
.c1t1{
color: #202020;font-size: 36rpx;
.c1t1 {
color: #202020;
font-size: 36rpx;
// margin-top: 30rpx;
}
.c2t2{
.c2t2 {
font-family: D-DIN-PRO, D-DIN-PRO;
font-weight: 900;
font-size: 28rpx;
color: #FF4810;
margin-top: 20rpx;
}
.c3t3{
.c3t3 {
margin-top: 20rpx;
font-family: PingFang SC Regular, PingFang SC Regular;
font-weight: 400;
font-size: 26rpx;
color: #9C9C9C;
width: 340rpx;
}
}
}
}
}
.btnList {
.btnList {
width: 690rpx;
position: absolute;
bottom: 150rpx;
@ -1624,18 +1666,18 @@
}
.save {}
}
}
.no-scroll {
.no-scroll {
overflow: hidden;
height: 100vh;
}
}
::v-deep ._root {
::v-deep ._root {
padding: 0 10rpx;
}
}
.no-border-button {
.no-border-button {
background-color: transparent;
/* 去掉背景色 */
border: none;
@ -1670,12 +1712,14 @@
}
</style>
<style lang="scss">
.value_slide{
.value_slide {
width: 50%;
::v-deep .uni-slider-handle-wrapper{
::v-deep .uni-slider-handle-wrapper {
height: 10rpx;
}
::v-deep .uni-slider-handle{
::v-deep .uni-slider-handle {
background: url('@/static/detail/qiu.png') !important;
border-radius: 0;
background-size: 36rpx 36rpx !important;
@ -1684,17 +1728,21 @@
top: 14rpx;
margin-left: -18rpx !important;
}
::v-deep .uni-slider-value{
::v-deep .uni-slider-value {
color: #323232;
&::after{
&::after {
content: '%';
}
}
// #ifdef MP-WEIXIN
.wx-slider-handle-wrapper{
.wx-slider-handle-wrapper {
height: 8rpx;
}
.wx-slider-handle{
.wx-slider-handle {
background: url('@/static/detail/qiu.png') !important;
border-radius: 0;
background-size: 30rpx 30rpx !important;
@ -1703,12 +1751,13 @@
top: 14rpx;
margin-left: -14rpx !important;
}
.wx-slider-value{
.wx-slider-value {
display: flex;
width: 30rpx;
color: #323232;
&::after{
content: '%';
&::after { content: '%';
}
}
// #endif