Commit 59113574 authored by 华国豪's avatar 华国豪 🙄

no message

parent ae9fd3b9
<template> <template>
<div v-loading="detailLoading" class="commonF FreeDetail" v-if="loading"> <div v-loading="detailLoading" class="commonF FreeDetail" v-if="!noData">
<div class="w1200"> <div class="w1200">
<div @click.stop.prevent="BigImgShow(1)" class="bannerImg" :style="{background:'url(' + ActiveSrc + ') no-repeat center left/100% auto'}"> <div @click.stop.prevent="BigImgShow(1)" class="bannerImg" :style="{background:'url(' + ActiveSrc + ') no-repeat center left/100% auto'}">
<!-- <img style="width:100%;" :src="ActiveSrc" :onerror="defaultImg" alt=""> --> <!-- <img style="width:100%;" :src="ActiveSrc" :onerror="defaultImg" alt=""> -->
...@@ -239,6 +239,10 @@ ...@@ -239,6 +239,10 @@
<img v-for="(item,index) in images" :src="item.img_url" :key="index+5000"> <img v-for="(item,index) in images" :src="item.img_url" :key="index+5000">
</viewer> </viewer>
</div> </div>
<div class="empty-data" v-else>
<i class="iconfont icon-kong"></i>
很抱歉,此商品已经下架了,客官看看别的吧~
</div>
</template> </template>
<script> <script>
import moment from 'moment' import moment from 'moment'
...@@ -293,6 +297,7 @@ export default { ...@@ -293,6 +297,7 @@ export default {
pkg_no:"", pkg_no:"",
scrollTop:0, scrollTop:0,
rightFixed:"0", rightFixed:"0",
noData: false,
} }
}, },
created(){ created(){
...@@ -470,7 +475,7 @@ export default { ...@@ -470,7 +475,7 @@ export default {
this.GetCurrentDays() this.GetCurrentDays()
}else{ }else{
this.Error(res.data.data.result_msg) // this.Error(res.data.data.result_msg)
} }
}) })
}, },
...@@ -524,7 +529,7 @@ export default { ...@@ -524,7 +529,7 @@ export default {
} }
} else { } else {
this.loading=false; this.loading=false;
this.noData = true;
this.Error(res.data.data.result_msg) this.Error(res.data.data.result_msg)
} }
}, },
......
...@@ -652,14 +652,14 @@ ...@@ -652,14 +652,14 @@
<div class="fh-search-box"> <div class="fh-search-box">
<div class="fh-search-box-input"> <div class="fh-search-box-input">
<div> <div>
<!-- <el-select <el-select
v-model="changeId" v-model="changeId"
filterable filterable
remote remote
reserve-keyword reserve-keyword
placeholder="输入目的地/景点/关键字,搜索您需要的信息.." placeholder="输入目的地/景点/关键字,搜索您需要的信息.."
:remote-method="searchKey" :remote-method="searchKey"
@focus="inputActive = true, changeId = '', queryStr = '', searchList = []" @focus="inputActive = true, changeId = '', queryStr = '', searchList = ''"
@change='getSelect' @change='getSelect'
:loading="loading2"> :loading="loading2">
<el-option <el-option
...@@ -673,12 +673,12 @@ ...@@ -673,12 +673,12 @@
</div> </div>
<div v-else> <div v-else>
<span style="float: left; width: 370px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.prod_name.replace(/KKday/g, '印象之旅') }}</span> <span style="float: left; width: 370px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{ item.prod_name.replace(/KKday/g, '印象之旅') }}</span>
<span style="float: right">{{ item.countries[0].name + item.countries[0].cities[0].name }}</span> <span v-if="item.countries && item.countries.length > 0" style="float: right">{{ item.countries[0].name + item.countries[0].cities[0].name }}</span>
<i style="float: right;color: rgb(204, 204, 204)" class="iconfont icon-ico_dingwei"></i> <i style="float: right;color: rgb(204, 204, 204)" class="iconfont icon-ico_dingwei"></i>
</div> </div>
</el-option> </el-option>
</el-select> --> </el-select>
<input type="text" @click.stop="inputActive = true" placeholder="输入目的地/景点/关键字,搜索您需要的信息.."> <!-- <input type="text" @click.stop="inputActive = true" placeholder="输入目的地/景点/关键字,搜索您需要的信息.."> -->
</div> </div>
<div @click="goList"> <div @click="goList">
搜索 搜索
...@@ -953,6 +953,7 @@ export default { ...@@ -953,6 +953,7 @@ export default {
this.getDataList() this.getDataList()
this.getDataCanList() this.getDataCanList()
this.getCCList() this.getCCList()
this.getCheList()
}, },
methods: { methods: {
getSelect(e){ getSelect(e){
...@@ -979,7 +980,8 @@ export default { ...@@ -979,7 +980,8 @@ export default {
"locale": "zh-cn", "locale": "zh-cn",
"state": "CN" , "state": "CN" ,
"sort": "PASC", "sort": "PASC",
"keywords": query "keywords": query,
"page_size": 5,
}, },
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
...@@ -1055,6 +1057,7 @@ export default { ...@@ -1055,6 +1057,7 @@ export default {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
let data = res.data.data.Countries let data = res.data.data.Countries
let deleteIdiot = [] let deleteIdiot = []
data = data.length > 0 ? data : []
data.map(x=>{ data.map(x=>{
if(x.Country_Name !== "台湾" && x.Country_Name !== "香港" && x.Country_Name !== "澳门" && x.Country_Name !== "港澳") { if(x.Country_Name !== "台湾" && x.Country_Name !== "香港" && x.Country_Name !== "澳门" && x.Country_Name !== "港澳") {
deleteIdiot.push(x) deleteIdiot.push(x)
...@@ -1102,7 +1105,7 @@ export default { ...@@ -1102,7 +1105,7 @@ export default {
"cat_main_keys": [ "cat_main_keys": [
"TAG_3" "TAG_3"
], ],
"cat_sub_keys": [ "cat_keys": [
"TAG_3_2" "TAG_3_2"
], ],
"sort": "PASC", "sort": "PASC",
...@@ -1123,6 +1126,38 @@ export default { ...@@ -1123,6 +1126,38 @@ export default {
null null
); );
}, },
getCheList(){
// http://efficient.oytour.com/api/kkday/commodityList
this.loading = true
this.apiJavaPost(
"/api/kkday/commodityList",
{
"locale": "zh-cn",
"state": "CN" ,
"cat_main_keys": [
"TAG_5"
],
"sort": "PASC",
"page_size": 20,
},
res => {
if (res.data.resultCode === 1) {
let data = res.data.data.prods, list = [];
data.map(x=>{
if (x.countries[0].name.indexOf('台湾') !== -1 || x.countries[0].name.indexOf('台灣') !== -1 || x.countries[0].name.indexOf('香港') !== -1 || x.countries[0].name.indexOf('澳門') !== -1 || x.countries[0].name.indexOf('澳门') !== -1){
x.countries[0].name = `中国-${x.countries[0].name}`
}
list.push(x)
})
this.list3 = list;
this.loading = false
} else {
this.Error(res.data.message);
}
},
null
);
},
getDataList(){ getDataList(){
// http://efficient.oytour.com/api/kkday/commodityList // http://efficient.oytour.com/api/kkday/commodityList
this.loading = true this.loading = true
...@@ -1131,15 +1166,15 @@ export default { ...@@ -1131,15 +1166,15 @@ export default {
{ {
"locale": "zh-cn", "locale": "zh-cn",
"state": "CN" , "state": "CN" ,
"cat_sub_keys": [ "cat_keys": [
"TAG_1_3" "TAG_1_3"
], ],
"sort": "PASC", "sort": "PASC",
"page_size": 110, "page_size": 40,
}, },
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
let data = res.data.data.prods,menPiaoList = [], list1 = [], list2 = [], list3 = [], TaoCanIds = []; let data = res.data.data.prods,menPiaoList = [], list1 = [], list2 = [], TaoCanIds = [];
this.KkdayDomain = res.data.data.KkdayDomain; this.KkdayDomain = res.data.data.KkdayDomain;
// M01 一日遊 // M01 一日遊
// M02 多日遊 // M02 多日遊
...@@ -1166,15 +1201,14 @@ export default { ...@@ -1166,15 +1201,14 @@ export default {
} }
list2.push(x) list2.push(x)
} else if (x.prod_type == 'M04' || x.prod_type == 'M08' || x.prod_type == 'M03') { // M04 司機/交通 M03 機場接送 M08 點對點接送 } else if (x.prod_type == 'M04' || x.prod_type == 'M08' || x.prod_type == 'M03') { // M04 司機/交通 M03 機場接送 M08 點對點接送
list3.push(x)
} }
}) })
this.list2 = list2; this.list2 = list2;
this.list3 = list3;
this.dataList = data this.dataList = data
this.menPiaoList = menPiaoList this.menPiaoList = menPiaoList
this.loading = false this.loading = false
this.getTaocanList(TaoCanIds) // this.getTaocanList(TaoCanIds)
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -1196,12 +1230,12 @@ export default { ...@@ -1196,12 +1230,12 @@ export default {
}, },
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
let data = res.data.data // let data = res.data.data
console.log(data) // console.log(data)
for(let i = 0; i < data.length ; i ++){ // for(let i = 0; i < data.length ; i ++){
data[i].url = TaoCanIds[i].url // data[i].url = TaoCanIds[i].url
} // }
this.TaoCanList = data // this.TaoCanList = data
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
...@@ -882,7 +882,7 @@ export default { ...@@ -882,7 +882,7 @@ export default {
// 选中小标签 加载数据 // 选中小标签 加载数据
setChangeTag(item){ setChangeTag(item){
delete this.msg.cat_main_keys; delete this.msg.cat_main_keys;
this.msg.cat_sub_keys = item.checkedCities this.msg.cat_keys = item.checkedCities
this.getList() this.getList()
}, },
// 游玩类型切换 取消其他选中 // 游玩类型切换 取消其他选中
...@@ -896,16 +896,16 @@ export default { ...@@ -896,16 +896,16 @@ export default {
}) })
if(item.id == "TAG_0") { if(item.id == "TAG_0") {
delete this.msg.cat_main_keys delete this.msg.cat_main_keys
this.msg.cat_sub_keys = [item.list[0].id] this.msg.cat_keys = [item.list[0].id]
} else { } else {
this.msg.cat_main_keys = [item.id] this.msg.cat_main_keys = [item.id]
delete this.msg.cat_sub_keys delete this.msg.cat_keys
} }
this.getList() this.getList()
} else { } else {
delete this.msg.cat_main_keys delete this.msg.cat_main_keys
delete this.msg.cat_sub_keys delete this.msg.cat_keys
this.getList() this.getList()
} }
}, },
...@@ -1118,8 +1118,8 @@ export default { ...@@ -1118,8 +1118,8 @@ export default {
} }
this.msg.sort = this.priceSort this.msg.sort = this.priceSort
this.laoding = true; this.laoding = true;
if (this.msg.cat_sub_keys && this.msg.cat_sub_keys.length < 1) { if (this.msg.cat_keys && this.msg.cat_keys.length < 1) {
delete this.msg.cat_sub_keys delete this.msg.cat_keys
} }
//http://efficient.oytour.com/api/kkday/commodityList //http://efficient.oytour.com/api/kkday/commodityList
this.apiJavaPost( this.apiJavaPost(
......
...@@ -907,7 +907,7 @@ export default { ...@@ -907,7 +907,7 @@ export default {
this.msg.cat_main_keys = ["TAG_2"] this.msg.cat_main_keys = ["TAG_2"]
this.typeTagIndex = 0 this.typeTagIndex = 0
} else if (this.$route.query.tag == 'canshi'){ } else if (this.$route.query.tag == 'canshi'){
this.msg.cat_sub_keys = ["TAG_2_5"] this.msg.cat_keys = ["TAG_2_5"]
this.typeTagIndex = 3 this.typeTagIndex = 3
} else if (this.$route.query.tag == 'yiri'){ } else if (this.$route.query.tag == 'yiri'){
this.msg.cat_main_keys = ["TAG_4"] this.msg.cat_main_keys = ["TAG_4"]
...@@ -954,9 +954,9 @@ export default { ...@@ -954,9 +954,9 @@ export default {
changeMainTag(e){ changeMainTag(e){
console.log(e) console.log(e)
if(e.length > 0) { if(e.length > 0) {
this.msg.cat_sub_keys = e this.msg.cat_keys = e
} else { } else {
delete this.msg.cat_sub_keys delete this.msg.cat_keys
} }
delete this.msg.cat_main_keys delete this.msg.cat_main_keys
this.getList() this.getList()
...@@ -968,10 +968,10 @@ export default { ...@@ -968,10 +968,10 @@ export default {
this.typeTagIndex = num this.typeTagIndex = num
if (id !== 'TAG_0') { if (id !== 'TAG_0') {
this.msg.cat_main_keys = [id] this.msg.cat_main_keys = [id]
delete this.msg.cat_sub_keys delete this.msg.cat_keys
} else { } else {
delete this.msg.cat_main_keys delete this.msg.cat_main_keys
this.msg.cat_sub_keys = ["TAG_2_5"] this.msg.cat_keys = ["TAG_2_5"]
} }
this.getList() this.getList()
}, },
...@@ -983,7 +983,7 @@ export default { ...@@ -983,7 +983,7 @@ export default {
// 选中小标签 加载数据 // 选中小标签 加载数据
setChangeTag(item){ setChangeTag(item){
delete this.msg.cat_main_keys; delete this.msg.cat_main_keys;
this.msg.cat_sub_keys = item.checkedCities this.msg.cat_keys = item.checkedCities
this.getList() this.getList()
}, },
// 游玩类型切换 取消其他选中 // 游玩类型切换 取消其他选中
...@@ -997,16 +997,16 @@ export default { ...@@ -997,16 +997,16 @@ export default {
}) })
if(item.id == "TAG_0") { if(item.id == "TAG_0") {
delete this.msg.cat_main_keys delete this.msg.cat_main_keys
this.msg.cat_sub_keys = [item.list[0].id] this.msg.cat_keys = [item.list[0].id]
} else { } else {
this.msg.cat_main_keys = [item.id] this.msg.cat_main_keys = [item.id]
delete this.msg.cat_sub_keys delete this.msg.cat_keys
} }
this.getList() this.getList()
} else { } else {
this.msg.cat_main_keys = ["TAG_4"] this.msg.cat_main_keys = ["TAG_4"]
delete this.msg.cat_sub_keys delete this.msg.cat_keys
this.getList() this.getList()
} }
}, },
......
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