You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news/recycling/detail.vue

531 lines
12 KiB

10 months ago
<template>
<view class="recycling">
<view class="recycling-swiper">
10 months ago
<!-- <u-swiper :list="list" mode="number" height="750" indicator-pos="bottomRight"></u-swiper> -->
10 months ago
<image :src="info.recovery_image" style="width: 100%; height: 750rpx;"></image>
10 months ago
</view>
<view class="recycling-hd">
<view class="a">
<view class="price" v-if="type== 1"><text>{{info.server_price}}</text></view>
<view class="price" v-else>免支付预约</view>
10 months ago
<view class="exchange">已售{{info.sold}}</view>
10 months ago
</view>
<view class="b" v-if="type== 1">{{info.server_name}}</view>
<view class="c" v-if="type== 1">{{info.server_category}}</view>
<view class="b" v-if="type== 2">{{info.recovery_name}}</view>
<view class="c" v-if="type== 2">{{info.recovery_category}}</view>
10 months ago
<view class="d">
<view class="l">
10 months ago
<image :src="$picUrl+'/static/news/icon-recycling-05.png'"></image>24小时客服
10 months ago
</view>
<view class="l">
10 months ago
<image :src="$picUrl+'/static/news/icon-recycling-05.png'"></image>未服务全额退
10 months ago
</view>
<view class="l">
10 months ago
<image :src="$picUrl+'/static/news/icon-recycling-05.png'"></image>未额外收费
10 months ago
</view>
<view class="l">
10 months ago
<image :src="$picUrl+'/static/news/icon-recycling-05.png'"></image>全程保障
10 months ago
</view>
</view>
</view>
<view class="recycling-select">
<view class="item">
<view class="a">已选</view>
10 months ago
<view class="b" v-if="type == 1">上门服务</view>
<view class="b" v-else @click="openPage(2)">{{selector[tabIndex]}}<u-icon name="arrow-right"></u-icon></view>
10 months ago
</view>
10 months ago
<view class="item" v-if="type == 2">
<view class="a">门店</view>
<view class="b" @click="openPage(4)">
{{storeIndex>=0?storeList[storeIndex].shop_name:'请选择门店'}}<u-icon name="arrow-right"></u-icon>
</view>
</view>
10 months ago
<view class="item">
<view class="a">服务</view>
<view class="b">优质服务全程跟踪</view>
</view>
</view>
10 months ago
<view class="recycling-chat" hidden>
10 months ago
<view class="a">
<view class="l">用户评价<text>30</text></view>
<view class="r">查看更多 <u-icon name="arrow-right"></u-icon></view>
</view>
<view class="b">
<view class="item">全部12</view>
<view class="item">沟通愉快4</view>
</view>
<view class="c">
<view class="item" v-for="i in 5" :key="i">
<view class="name">
10 months ago
<image :src="$picUrl+'/static/news/avater.png'"></image>Shark特
10 months ago
</view>
<view class="desc">非常棒讲解细致下次还来</view>
</view>
</view>
</view>
<view class="recycling-bd">
<view class="title">产品详情</view>
10 months ago
<view class="conten" v-html="info.content"></view>
10 months ago
</view>
<view class="recycling-fd">
<view class="a">
10 months ago
<image :src="$picUrl+'/static/news/icon-recycling-06.png'"></image>客服
10 months ago
<button open-type="contact"></button>
</view>
<view class="c" v-if="type== 1" @click="openPage(3)">立即预约</view>
10 months ago
<view class="c" v-else @click="openPage(5)">立即预约</view>
10 months ago
</view>
10 months ago
<u-picker v-model="isShow" mode="selector" :range="selector" @confirm="confirm"></u-picker>
<!-- 选择门店 -->
<u-popup v-model="isShow1" mode="bottom" border-radius="12" mask-close-able="false" closeable>
<view class="recycling-classify">
<view class="recycling-classify-hd">门店列表</view>
<view class="recycling-classify-bd">
<scroll-view scroll-y class="m">
<view class="item" v-for="(a,i) in storeList" :key="i" @click="tabMItem(a,i)"><view :class="storeIndex == i?'item-on':''">{{a.shop_name}}</view></view>
</scroll-view>
</view>
</view>
</u-popup>
10 months ago
</view>
</template>
10 months ago
<script>
import * as newFunApi from '@/api/newFun'
10 months ago
export default{
data(){
return {
10 months ago
addressInfo: {},
tabIndex: 0,
10 months ago
isShow: false,
selector: ["门店回收","上门回收","邮寄回收"],
10 months ago
type: 1,
10 months ago
info: {},
storeInfo: {},
isShow1: false,
storeList:[],
storeIndex: -1,
10 months ago
}
},
10 months ago
onLoad(o) {
let info = uni.getStorageSync("getInfo");
if(info.content){
info.content.replace(/style=""/g,'').replace(/<img src=/g,'<img style="width: 100%; display:block" src=');
}
10 months ago
this.info = info;
this.type = o.type
uni.setNavigationBarTitle({
title: o.type == 1?"服务详情": '上门回收'
10 months ago
})
},
onShow() {
10 months ago
if(uni.getStorageSync("AccessToken")){
10 months ago
this.getList()
}
},
10 months ago
methods: {
10 months ago
//获取门店列表
async getList() {
const { status, data } = await newFunApi.storeList({
platform: 'H5'
})
if(status == 200){
this.storeList = data.list
}
},
10 months ago
openPage(index) {
if(index == 2){
this.isShow = true;
10 months ago
}else if(index == 3){
10 months ago
if(!uni.getStorageSync("AccessToken")){
10 months ago
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
uni.navigateTo({
url: "/pages/news/recycling/confirm?tabIndex="+this.tabIndex+"&id="+this.info.server_id+"&type="+this.type
})
}else if(index == 5){
10 months ago
if(!uni.getStorageSync("AccessToken")){
uni.navigateTo({
url: "/pages/login/index"
})
return ;
10 months ago
}
if(this.storeInfo && this.storeInfo.shop_id){
uni.setStorageSync("storeHsInfo",this.storeInfo)
uni.navigateTo({
url: "/pages/news/recycling/confirm1?tabIndex="+this.tabIndex+"&id="+this.info.recovery_id+"&type="+this.type
})
}else{
uni.showToast({
title: '请选择门店',
icon: "none",
})
}
10 months ago
}else if(index == 4){
10 months ago
if(!uni.getStorageSync("AccessToken")){
10 months ago
uni.navigateTo({
url: "/pages/login/index"
})
return ;
10 months ago
}
10 months ago
this.isShow1 = true
10 months ago
}
10 months ago
},
tabMItem(a,i){
this.storeInfo = a;
this.storeIndex = i;
this.isShow1 = false
10 months ago
},
confirm(e){
this.tabIndex = e[0]
},
}
}
</script>
<style lang="scss" scoped>
.recycling{
padding-bottom: 130rpx;
10 months ago
overflow: hidden;
&-classify{
width: 100%;
overflow: hidden;
&-hd{
padding: 30rpx 60rpx;
position: relative;
font-size: 32rpx;
font-weight: 500;
color: #303030;
text-align: center;
.a{
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 500;
color: #FF624F;
position: absolute;
top: 30rpx;
left: 40rpx;
z-index: 2;
}
}
&-bd{
overflow: hidden;
display: flex;
align-items: flex-start;
.l{
width: 210rpx;
height: 560rpx;
background-color: #F7F8FA;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 30rpx;
box-sizing: border-box;
text-align: left;
&-on{
background-color: #fff;
font-weight: 500;
}
}
}
.m{
width: 100%;
text-align: center;
max-height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
text-align: left;
&-on{
color: #FF624F;
}
}
}
.r{
width: 540rpx;
height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
&-on{
color: #FF624F;
}
}
}
}
}
10 months ago
&-hd{
width: 720rpx;
min-height: 262rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding: 25rpx;
box-sizing: border-box;
.a{
display: flex;
align-items: baseline;
justify-content: space-between;
.price{
font-size: 32rpx;
font-weight: 500;
color: #ED2B00;
text{
margin-left: 10rpx;
font-size: 48rpx;
}
}
.exchange{
font-size: 24rpx;
font-weight: 400;
color: #989898;
}
}
.b{
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #000000;
line-height: 43rpx;
}
.c{
font-size: 28rpx;
color: #989898;
line-height: 43rpx;
}
.d{
display: flex;
align-items: center;
font-size: 20rpx;
font-weight: 400;
color: #CDA55E;
margin-top: 10rpx;
.l{
display: flex;
align-items: center;
margin-right: 20rpx;
}
image{
width: 40rpx;
height: 40rpx;
}
}
}
&-select{
width: 720rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding: 15rpx 25rpx;
box-sizing: border-box;
.item{
padding: 12rpx 0;
display: flex;
align-items: center;
overflow: hidden;
.a{
width: 100rpx;
font-size: 24rpx;
font-weight: 400;
color: #C4C4C4;
}
.b{
flex: 1;
font-size: 24rpx;
font-weight: 400;
color: #3D3D3D;
display: flex;
align-items: center;
justify-content: space-between;
}
}
}
&-chat{
width: 720rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding: 15rpx 25rpx;
box-sizing: border-box;
.a{
display: flex;
align-items: baseline;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
color: #000000;
padding-top: 10rpx;
.l{
text{
font-size: 28psx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #909090;
}
}
.r{
flex: 1;
display: flex;
align-items: center;
font-size: 24rpx;
font-weight: 400;
color: #909090;
}
}
.b{
overflow: hidden;
width: 100%;
display: flex;
flex-wrap: wrap;
padding: 10rpx 0;
.item{
line-height: 50rpx;
background: #FFE7E7;
border-radius: 8rpx;
font-size: 28rpx;
font-weight: 400;
color: #515151;
padding: 0 20rpx;
margin-right: 20rpx;
margin-top: 20rpx;
}
}
.c{
.item{
padding: 20rpx 0;
border-top: 1px solid #f3f3f3;
&:first-child{
border-top: 1px solid #FFFFFF;
}
overflow: hidden;
.name{
font-size: 28rpx;
font-weight: 400;
color: #515151;
display: flex;
align-items: center;
image{
width: 75rpx;
height: 75rpx;
border-radius: 50%;
margin-right: 20rpx;
}
}
.desc{
font-size: 28rpx;
font-weight: 400;
color: #515151;
line-height: 45rpx;
margin-top: 20rpx;
}
}
}
}
&-bd{
width: 720rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding: 25rpx 25rpx;
box-sizing: border-box;
.a{
font-size: 32rpx;
font-weight: 500;
color: #000000;
}
.b{
width: 100%;
padding: 20rpx 0;
image{
width: 100%;
}
}
}
&-fd{
width: 100%;
height: 120rpx;
background-color: #FFFFFF;
padding: 25rpx 20rpx;
display: flex;
align-items: center;
10 months ago
justify-content: space-between;
10 months ago
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
.a{
10 months ago
width: 100rpx;
10 months ago
text-align: center;
font-size: 20rpx;
font-weight: 400;
color: #3D3D3D;
image{
width: 40rpx;
height: 40rpx;
display: block;
margin: 0 auto;
}
}
.b{
width: 200rpx;
height: 78rpx;
line-height: 78rpx;
background: #FF9E2B;
border-radius: 78rpx;
text-align: center;
font-size: 24rpx;
font-weight: 600;
color: #FFFFFF;
margin-left: 20rpx;
}
.c{
10 months ago
width: 500rpx;
10 months ago
height: 78rpx;
line-height: 78rpx;
background: linear-gradient(102deg, #FE5E06 0%, #F3221A 100%);
border-radius: 78rpx;
text-align: center;
font-size: 24rpx;
font-weight: 600;
color: #FFFFFF;
margin-left: 20rpx;
}
}
}
</style>