|
|
- <template>
- <view>
- <view class="head-box"></view>
- <uv-navbar autoBack title="旅行详情" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
-
- <view class="content">
- <view class="content-head">
- <image class="image-box" :src="travelDetails.travel.image" mode=""></image>
- <view class="msg-box">
- <view class="msg-box-title">{{travelDetails.travel.title}}</view>
- <view class="msg-box-time">开始时间:{{travelDetails.travel.startTime}}</view>
- <view class="lingdui-box">
- <image class="use-img" :src="travelDetails.adminUserInfo.headImage" mode=""></image>
- <view class="lingdui-msg">
- <view class="lingdui-msg-name">
- <view>{{travelDetails.adminUserInfo.nickName}}</view>
- <view class="name-tip">领队</view>
- </view>
- <view>
- <uv-rate :count="count" v-model="travelDetails.adminUser.num" size="23" activeColor="#FFA200"></uv-rate>
- </view>
- </view>
- <view class="add-wx" @click="$refs.ewmpopup.open()">添加微信</view>
- </view>
- </view>
- </view>
- <view class="lv-miaoshu">
- <view class="title-box">旅行描述</view>
- <view class="value-box">
- <view class="tabs-box">
- <uv-tabs :list="list" @click="tabsClick" lineColor="#FE5E5E" :activeStyle="{color:'#FE5E5E',fontSize:'29rpx',fontWeight: 'bold'}" :inactiveStyle="{color:'#D6D6D6',fontSize:'29rpx',fontWeight: 'bold'}"></uv-tabs>
- </view>
- <view class="lv-msg-box">
- <uv-parse :content="content"></uv-parse>
- </view>
- </view>
- </view>
- </view>
- <view class="bottom-box">
- <view class="price-box">
- <view class="peice-val"><text>¥</text>{{travelDetails.travel.price}}</view>
- <view>报名费用</view>
- </view>
- <view class="caozuo-box">
- <view class="caozuo-item border-r">
- <image src="@/static/image/home/shoucang-icon.png" mode=""></image>
- <view>收藏</view>
- </view>
- <button type="primary" style="background-color: transparent;height: 100rpx;font-size: 20rpx;padding: 0;" open-type="share" >
- <view class="caozuo-item">
- <image src="@/static/image/home/zhuanfa-icon.png" mode=""></image>
- <text style="line-height: initial;">转发</text>
- </view>
- </button>
- </view>
- <view class="btn-box" @click="toBaoming">立即报名</view>
- </view>
- <uv-popup ref="ewmpopup" mode="center" round="30rpx">
- <view class="pop-cont">
- <uv-image :src="travelDetails.adminUser.img" width="380rpx" height="380rpx"></uv-image>
- </view>
- </uv-popup>
- </view>
- </template>
-
- <script>
- export default{
- data() {
- return {
- travelDetails: null,
- bgColor:'transparent',
- count:5,
- value:3,
- content:'',
- current:0,
- list:[
- {
- name:'介绍',
- key:'js'
- },
- {
- name:'路线',
- key:'lx'
- },
- {
- name:'费用',
- key:'fy'
- },
- {
- name:'须知',
- key:'xz'
- },
- {
- name:'代理',
- key:'dl'
- },
- ],
- travelId:'',
- }
- },
- onShareAppMessage(res) {
- console.log(res)
- if (res.from === 'button') {
- // 来自详情页页面内分享按
- return {
- title:this.travelDetails.travel.title,
- path: `/pages_order/lvyou-detail?travelId=${this.travelId}`,
- imageUrl: this.travelDetails.travel.image,
- success: function(res) {
- // 转发成功
- console.log('转发成功')
- },
- fail: function(res) {
- // 转发失败
- }
- };
- }
- // 设置转发的参数
- return {
- title:this.travelDetails.title,
- path: `/pages_order/lvyou-detail?travelId=${this.travelId}`,
- imageUrl: this.travelDetails.travel.image,
- success: function(res) {
- console.log(res, '发生过是');
- if (res.errMsg == 'shareAppMessage:ok') {
- console.log("成功", res)
- }
- },
- fail: function(res) {
-
- console.log("失败", res)
-
- }
- }
- },
- onPageScroll(e) {
- if(e.scrollTop > 50) {
- this.bgColor = '#49070c'
- }else{
- this.bgColor = 'transparent'
- }
- },
- onLoad({travelId}) {
- this.travelId = travelId
- this.travelInfo(travelId)
- },
- methods:{
- toBaoming() {
- this.$api('createOrder',{id:this.travelId,typePrice:1,type:1},res=>{
- if(res.code === 200) {
- uni.requestPaymentWxPay(res)
- .then(res => {
- uni.showToast({
- title: '下单成功',
- icon: 'none'
- })
-
- }).catch(n => {
-
- })
- }
- })
- },
- tabsClick(val) {
- this.current = val.index
- this.content = this.travelDetails.travel[this.list[this.current].key]
- },
- travelInfo(travelId) {
- this.$api('travelInfo',{travelId},res=> {
- if(res.code==200) {
- this.travelDetails = res.result
- this.content = res.result.travel[this.list[this.current].key]
- }
- })
- }
- }
- }
- </script>
-
- <style lang="scss">
- page {
- background-color: #060504;
- }
- </style>
- <style lang="scss" scoped>
- .pop-cont {
- border-radius: 30rpx;
- padding: 10rpx;
- }
- .head-box {
- background: url('@/static/image/nav-bg.png') no-repeat;
- background-size: 100% 100%;
- width: 100%;
- height: 534rpx;
- position: absolute;
- z-index: -1;
- }
- .content {
- padding: 0 30rpx 170rpx;
- padding-top: calc(var(--status-bar-height) + 110rpx);
- .content-head {
- position: relative;
- .image-box {
- width: 100%;
- border-radius: 20rpx 20rpx 0 0;
- height: 546rpx;
- }
- .msg-box {
- background: #1B1713;
- border-radius: 27rpx 27rpx 67rpx 67rpx;
- position: absolute;
- top: 429rpx;
- left: 0;
- right: 0;
- padding-top: 38rpx;
- .msg-box-title {
- font-weight: 500;
- font-size: 32rpx;
- color: #FFFFFF;
- margin-bottom: 40rpx;
- padding-left: 38rpx;
- }
- .msg-box-time {
- font-weight: 400;
- font-size: 27rpx;
- color: #999999;
- padding-left: 38rpx;
- }
- .lingdui-box {
- margin-top: 43rpx;
- height: 130rpx;
- background: #26201A;
- border-radius: 60rpx;
- display: flex;
- align-items: center;
- padding: 0 40rpx;
- .use-img {
- width: 86rpx;
- height: 86rpx;
- border-radius: 50%;
- }
- .lingdui-msg {
- flex: 1;
- margin-left: 24rpx;
- .lingdui-msg-name {
- font-weight: 500;
- font-size: 29rpx;
- color: #E6E6E6;
- display: flex;
- align-items: center;
- margin-bottom: 11rpx;
- .name-tip {
- padding: 0 20rpx;
- height: 27rpx;
- background: #3C2D17;
- border-radius: 0rpx 12rpx 12rpx 12rpx;
- font-weight: 500;
- font-size: 19rpx;
- color: #FFA200;
- line-height: 27rpx;
- margin-left: 14rpx;
- }
- }
- }
- .add-wx {
- width: 172rpx;
- height: 51rpx;
- background: #3C2D17;
- border-radius: 23rpx 23rpx 23rpx 23rpx;
- text-align: center;
- line-height: 51rpx;
- font-weight: 400;
- font-size: 25rpx;
- color: #FF8A00;
- }
- }
- }
- }
- .title-box {
- font-weight: 500;
- font-size: 33rpx;
- color: #E6E6E6;
- text-align: center;
- position: relative;
- &::after {
- content: "";
- position: absolute;
- top: 50%;
- left: 0;
- transform: translate(0,-50%);
- width: 100%;
- height: 12rpx;
- background: url(@/static/image/home/title-line.png) no-repeat;
- background-size: 100% 100%;
- }
- }
- .lv-miaoshu {
- margin-top: 250rpx;
- .value-box {
- background: #1B1713;
- border-radius: 27rpx;
- margin-top: 35rpx;
- .tabs-box {
- border-bottom: 1px solid #2D241B;
- }
- .lv-msg-box {
- padding: 20rpx 40rpx;
- font-weight: 400;
- font-size: 27rpx;
- color: #E6E6E6;
- line-height: 41rpx;
- }
- }
- }
- }
- .bottom-box {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- height: 150rpx;
- background-color: #1B1713;
- display: flex;
- align-items: center;
- padding: 0 40rpx;
- .price-box {
- font-weight: 400;
- font-size: 25rpx;
- color: #999999;
- flex: 1;
- .peice-val {
- font-weight: 500;
- font-size: 40rpx;
- color: #FF3535;
- margin-bottom: 15rpx;
- text {
- font-size: 26rpx;
- }
- }
- }
- .caozuo-box {
- display: flex;
- align-items: center;
- .caozuo-item {
- font-weight: 400;
- font-size: 20rpx;
- color: #999999;
- padding: 0 35rpx;
- text-align: center;
- height: 100rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- image {
- width: 48rpx;
- height: 48rpx;
- margin-bottom: 10rpx;
- }
- }
- .border-r {
- position: relative;
- // border-right: 1px solid #4A3E32;
- &::after {
- content: "";
- width: 2rpx;
- height: 47rpx;
- position: absolute;
- right: 0;
- top: 50%;
- transform: translate(0,-50%);
- background-color: #4A3E32;
- }
- }
- }
- .btn-box {
- width: 252rpx;
- height: 74rpx;
- font-weight: 500;
- font-size: 32rpx;
- color: #FFFFFF;
- text-align: center;
- line-height: 74rpx;
- background: url(@/static/image/home/hdqd-btn.png) no-repeat;
- background-size: 100% 100%;
- }
- }
- </style>
|