Commit e5315757 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp into master

parents c621c4a0 2a36cb3e
<template>
<view class="guidecarOrderdetails" :style="{'height':contentHeight}">
<view class="u-skeleton-rect">
<swiper
indicator-dots
:autoplay="false"
:interval="1000"
style="height:100vw;"
>
<block v-for="(item, index) in g.pic_url" :key="index">
<swiper-item>
<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url"
:autoplay="false" loop muted show-play-btn :enable-progress-gesture="true"
:controls="true" :show-progress="true" :show-mute-btn="true" objectFit="cover"></video>
<image @click="previewImage(index)" style="width:100%;height:100%;" v-else :src="item.pic_url" mode=""></image>
</swiper-item>
</block>
</swiper>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "详情",
GoodsId:367471,
g:{},
imgs:[]
}
},
onLoad(option){
if(option && option.GoodsId){
this.GoodsId = option.GoodsId
}
this.init()//商品详情
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods: {
init(){
uni.showLoading({
title: "加载中",
});
this.request2(
{
url: '/api/AppletGuideCar/GetAppletSDGoodsInfo',
data: {
GoodsId:this.GoodsId
}
},
(res) => {
uni.hideLoading();
this.g = res.data.goods;
this.g.pic_url.forEach((x) => {
this.imgs.push(x.pic_url);
});
}
);
},
//点击跳转
startPlay(item){
uni.navigateTo({ url: '/pages/video/index?GoodsId='+this.id+'&VideoUrl='+item.pic_url })
},
previewImage(i) {
uni.previewImage({
urls: this.imgs,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {
console.log(
"选中了第" +
(data.tapIndex + 1) +
"个按钮,第" +
(data.index + 1) +
"张图片"
);
},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
}
}
</script>
<style>
.guidecarOrderdetails{
background: #FFFFFF;
}
</style>
...@@ -15,16 +15,27 @@ ...@@ -15,16 +15,27 @@
</view> </view>
</div> </div>
<view style="padding: 10px 0 0; background: #fff;width: 100%;border-bottom: 1px solid #E2E2E2;"> <view style="padding: 10px 0 0;position: relative;background: #fff;width: 100%;height: 55px;">
<!-- <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mainColor"></u-tabs> --> <view style=" border-bottom: 1px solid #E2E2E2;">
<wyb-drop-down <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mainColor"></u-tabs>
ref="dropDown"
:options="options"
@select="onItemSelect">
<!-- 自定义模式开启时,这里可以放内容 -->
</wyb-drop-down>
</view> </view>
<view v-if="screenshow==true" class="tanchu" >
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
style="max-height: 283px;">
<view class="tanchu_item" v-for="(item, index) in screenList" :key="index" @click="onItemSelect(item)">
<span>{{item.Name}}</span>
<u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.OrderBy && current==0'></u-icon>
<u-icon name="success" :color="mainColor" size="30" v-if='item.ID==msg.CarBrandId && current==1'></u-icon>
</view>
</scroll-view>
</view>
</view>
<div style='display: flex;width: 100%;'> <div style='display: flex;width: 100%;'>
<view v-if="screenshow==true" class="Mask" @click="screenshow=false"></view>
<div class="left-slider"> <div class="left-slider">
<sidebar <sidebar
:active="tic" :active="tic"
...@@ -42,10 +53,11 @@ ...@@ -42,10 +53,11 @@
:enable-back-to-top="true" :enable-back-to-top="true"
:enable-flex="true" :enable-flex="true"
@scrolltolower="lower" @scrolltolower="lower"
v-if="g.length > 0"
style=" height: calc(100vh - (44px+10px+50px)) ;width: calc(100vw - 85px);" style=" height: calc(100vh - (44px+10px+50px)) ;width: calc(100vw - 85px);"
> >
<view style="width: 100%;display: flex;flex-direction: column;align-items: center;padding: 10px;"> <view style="width: 100%;display: flex;flex-direction: column;align-items: center;padding: 10px;">
<view class="c_list_item" v-for="(x, i) in g" :key="i"> <view class="c_list_item" v-for="(x, i) in g" :key="i" @click="goDetails(x)">
<view class="itemb" > <view class="itemb" >
<view class="c_t_l"> <view class="c_t_l">
<image :src="x.cover_pic" mode="aspectFill" style="width: 100%;height: 100%;"></image> <image :src="x.cover_pic" mode="aspectFill" style="width: 100%;height: 100%;"></image>
...@@ -95,11 +107,10 @@ ...@@ -95,11 +107,10 @@
<script> <script>
import sidebar from "../../components/sidebar/index.vue"; import sidebar from "../../components/sidebar/index.vue";
import wybDropDown from './wyb-drop-down/wyb-drop-down.vue'
export default { export default {
components: { components: {
sidebar, sidebar
wybDropDown
}, },
data() { data() {
return { return {
...@@ -108,14 +119,14 @@ export default { ...@@ -108,14 +119,14 @@ export default {
pageTitle: "订车", pageTitle: "订车",
classList:[], classList:[],
current:0, current:0,
screenshow:false,
tic:0, tic:0,
msg:{ msg:{
pageIndex:1, pageIndex:1,
pageSize:15, pageSize:15,
Name:"", Name:"",
GoodsType:1, GoodsType:1,
OrderBy:1, OrderBy:0,
StartTime:'', StartTime:'',
EndTime:'', EndTime:'',
CarType:0, CarType:0,
...@@ -126,14 +137,17 @@ export default { ...@@ -126,14 +137,17 @@ export default {
CarBrandId:0, CarBrandId:0,
RegionIds:0 RegionIds:0
}, },
screenList:[],
options: [{ contents:[
header: '综合排序', {'ID':0,Name:'不限'},
contents: ['不限','综合升序', '综合降序', '价格升序', '价格降序','评分升序','评分降序'] {'ID':1,Name:'综合升序'},
}, { {'ID':2,Name:'综合降序'},
header: '品牌', {'ID':3,Name:'价格升序'},
contents: [] {'ID':4,Name:'价格降序'},
}], {'ID':5,Name:'评分升序'},
{'ID':6,Name:'评分降序'},
],
contents2:[],//品牌
list: [{name: '综合排序'}, {name: '品牌'}], list: [{name: '综合排序'}, {name: '品牌'}],
STime:'', STime:'',
ETime:'', ETime:'',
...@@ -176,19 +190,17 @@ export default { ...@@ -176,19 +190,17 @@ export default {
if(options && options.tic){ if(options && options.tic){
this.tic = options.tic this.tic = options.tic
} }
this.getCarClassList() this.getCarClassList()//车辆类型
this.init(); this.init();
this.getGuideCarBrandList() this.getGuideCarBrandList()//车辆品牌
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`; this.activeStyle = `background:${this.mainColor};`;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
}, },
methods: { methods: {
init(){ init(){
...@@ -222,12 +234,11 @@ getGuideCarBrandList(){ ...@@ -222,12 +234,11 @@ getGuideCarBrandList(){
this.BrandList = res.data; this.BrandList = res.data;
let obj = {Name: "全部", ID: 0} let obj = {Name: "全部", ID: 0}
this.BrandList.unshift(obj) this.BrandList.unshift(obj)
console.log(this.BrandList)
let list=[]; let list=[];
this.BrandList.forEach(x=>{ this.BrandList.forEach(x=>{
list.push(x.Name) list.push(x)
}) })
this.options[1].contents = list this.contents2 = list
} }
); );
}, },
...@@ -253,20 +264,41 @@ getGuideCarBrandList(){ ...@@ -253,20 +264,41 @@ getGuideCarBrandList(){
}, },
change(val){ change(val){
console.log(val) console.log(val)
if(val==0){
if(val==this.current&& this.screenshow==true){
this.screenshow= false
}else{
this.screenshow= true
}
this.screenList = this.contents
}else{
if(val==this.current&& this.screenshow==true){
this.screenshow= false
}else{
this.screenshow= true
}
this.screenList = this.contents2
}
console.log(this.screenList)
this.current= val this.current= val
}, },
onItemSelect(val){ onItemSelect(val){
console.log(val) if(this.current==0){
if(val.headerIndex ==0){ this.msg.OrderBy = val.ID;
this.msg.OrderBy = val.contentIndex }else{
} this.msg.CarBrandId = val.ID
if(val.headerIndex ==1){
this.msg.CarBrandId = this.BrandList[val.contentIndex].ID
} }
this.screenshow = false
this.msg.pageIndex=1; this.msg.pageIndex=1;
this.g = []; this.g = [];
this.init() this.init()
this.$refs.dropDown.close() // 关闭
},
goDetails(x){//跳转商品详情
uni.navigateTo({
url:'/pages/guidecar/guidecarOrderdetails?GoodsId='+x.id
})
}, },
lower(e) { lower(e) {
...@@ -365,4 +397,21 @@ getGuideCarBrandList(){ ...@@ -365,4 +397,21 @@ getGuideCarBrandList(){
margin-top: 10px; margin-top: 10px;
background: #E2E2E2; background: #E2E2E2;
} }
.guidecarList .Mask{
width: 100%;height: 100%;background: #000000;opacity: 0.3;position: absolute;left: 0;top: 130px;z-index: 999;
}
.guidecarList .tanchu{
width: 100%;display: flex;flex-direction: column;align-items: center;background: #FFF;position: absolute;top: 55px;left: 0;z-index: 1999;
}
.guidecarList .tanchu_item{
width: 94%;
margin-left: 3%;
height: 40px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E2E2E2;
}
</style> </style>
@font-face {font-family: "iconfont";
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMoAAsAAAAABxwAAALZAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDHAqBYIFNATYCJAMQCwoABCAFhG0HPRs0BsgusG3YowCKZblG/A248I8FOyAe+Oye987uPHySFUCVQo0KTFJCRZnz739uc6TZ6xcSFkmmSfPs/p8faiVYyJAysa8jwJbrp83gaCY/j/s8l9O7q4ACmd/Ochtr0Z5+1AswDijQsQZt4QI6QW6pXcSBwSv/1nYCCqqqsdC7M5oKSRHpFxDmudwQkr2QKEbZvCA7MzUKh2Tkk93JOxzUvw//aBnyJDIpMnTQjLYt1H4v9UeQN/18GCcJYQJ3dgYpGiMSZs2mppCFiJ8qyI6iLfLyEn7P/b7mjxDH1smHZfQvjyCRErJIZWHQ2kun/J7jNIHfTzQJf4gVUvghxnw/0x4DfV5lXaBHlFVi7aO0/bxWdv6+cPdRmdlrbzn+qfO6PVN6994+P/v5PWXZ++LdvWUs9gsXP7QrtrfB91P9aflbn1u37JV5vmPHmbH/a+bW/pculdBKpMfTy/pJ27c1d3s3Ha40b4Xnb7c73PMn7hxVM+r+psb222nvS698xqM+qUXITmlvaakgkG5KhgsC6ePkJarZcby5/0ws1vn5QhH8iDY/1tYIZoAvBViBWAWwLpYq4ogxV3N5FYzKghIJClIX6MxR0m9XGMuAawnyyhwI5lRpkcqrTUZeY2QU0hpZed1QUCP9ZhdSyhKyEAugoe0OguIeIlHUK6SKe09G3q/IKOs/ZBUPKQoaEUotWUjdMDvda4XGBm2YcoTZFkWMuTZpUz1Gvg2MVVelBXNcrd0otGjafJjtYoSrK0Ys3fHKsg2DGSsKoa+zGwYBwaIVeWhtCrM2m0W1WbMZc3cqTKVQSOtlBRk2kA1McQRms5AIk8030qPvjyFuK2BYrTAW0nNoZc1tH7TQVHMA2dVHIMav3LLUDlexzAYDZlghIdDX8aKApghYNN/JgywbBbMOJBaqmnmNZkD1heeNIYZboCByVgxJSEMMGdlpW5fTVplG+0he5RqCAAAAAA==') format('woff2')
}
.iconfont {
font-family: "iconfont" !important;
margin-top: 5rpx;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-selected:before {
content: "\e613";
}
.icon-down:before {
font-weight: bold;
content: "\e67a";
}
.icon-down-fill:before {
content: "\e701";
}
This diff is collapsed.
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }"> <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<!-- <view style="display: flex;flex-direction: column;align-items: center;"> --> <!-- <view style="display: flex;flex-direction: column;align-items: center;"> -->
<view> <view>
<u-swipe-action :show="item.show" :disabled="item.disabled" :index="index" v-for="(item, index) in g" :key="item.id" @click="click" @open="open" <u-swipe-action :show="item.show" :disabled="item.disabled" :index="index" v-for="(item, index) in g" @content-click="goUrl" :key="item.id" @click="click" @open="open"
:options="options"> :options="options">
<view class="share_Item u-border-bottom"> <view class="share_Item u-border-bottom">
<!-- <u-avatar :src="item.Photo" size="64"></u-avatar> --> <!-- <u-avatar :src="item.Photo" size="64"></u-avatar> -->
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 --> <!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
<view class="title-wrap" style="width:100%;" @click="goUrl(item.UserId)"> <view class="title-wrap" style="width:100%;">
<view class="box_top"> <view class="box_top">
<u-avatar :src="item.Photo" size="64"></u-avatar> <u-avatar :src="item.Photo" size="64"></u-avatar>
<view class="box_r"> <view class="box_r">
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
GradeName: '普通会员' GradeName: '普通会员'
}, ] //设置默认值 }, ] //设置默认值
this.getUserMyTeamTitelListForFX() this.getUserMyTeamTitelListForFX()
// this.init2()
} else { } else {
this.init() this.init()
} }
...@@ -165,7 +165,6 @@ ...@@ -165,7 +165,6 @@
}, },
methods: { methods: {
open() { open() {
}, },
getDirest() { getDirest() {
if (this.isCheckIn) { if (this.isCheckIn) {
...@@ -175,7 +174,7 @@ ...@@ -175,7 +174,7 @@
} }
this.titleDirect=this.msg2.IsDirect this.titleDirect=this.msg2.IsDirect
this.getUserMyTeamTitelListForFX(); this.getUserMyTeamTitelListForFX();
this.init2(1);
}, },
getUserMyTeamTitelListForFX() { getUserMyTeamTitelListForFX() {
uni.showLoading({ uni.showLoading({
...@@ -192,7 +191,8 @@ ...@@ -192,7 +191,8 @@
uni.hideLoading(); uni.hideLoading();
this.list = res.data; this.list = res.data;
this.msg2.FXGradeId = this.list[0].Id; this.msg2.FXGradeId = this.list[0].Id;
this.init2() this.current=0;
this.init2(1);
} }
); );
}, },
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
} }
this.init2(1); this.init2(1);
}, },
//获取数据
init2(num) { init2(num) {
if (num == 1) { if (num == 1) {
this.g = []; this.g = [];
...@@ -298,7 +299,8 @@ ...@@ -298,7 +299,8 @@
} }
}, },
//跳转详情 //跳转详情
goUrl(UserId) { goUrl(index) {
let UserId = this.g[index].UserId
uni.navigateTo({ uni.navigateTo({
url: '/pages/share-team/share-detail?UserId=' + UserId url: '/pages/share-team/share-detail?UserId=' + UserId
}); });
...@@ -315,18 +317,25 @@ ...@@ -315,18 +317,25 @@
(res) => { (res) => {
this.request2({ this.request2({
url: '/api/AppletUser/GerUserMyTeamTitelListForFX', url: '/api/AppletUser/GerUserMyTeamTitelListForFX',
data: {} data: {
IsDirect:this.titleDirect
}
}, },
(res) => { (res) => {
this.list = res.data; this.list = res.data;
} }
); );
this.init2(1) this.getNewTitle();
// this.init2(1)
} }
); );
this.g[index].show = false; this.g[index].show = false;
}, },
getNewTitle(){
this.msg2.FXGradeId = this.list[this.current].Id;
this.init2(1);
},
open(index) { open(index) {
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制, // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
// 原本为'false',再次设置为'false'会无效 // 原本为'false',再次设置为'false'会无效
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment