parent
22b0698b7a
commit
f39cdcd3ca
@ -0,0 +1,486 @@ |
||||
<template> |
||||
<view> |
||||
<form @submit="formSubmit"> |
||||
<view class="mode_com lst_sug_unit"> |
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex"> |
||||
<view class="sug_sgu"> |
||||
事故发生地 |
||||
<text class="chel_t_s">(必填)</text> |
||||
</view> |
||||
<view class="sug_r"> |
||||
<view @click="getLocation()" class="sug_dwei">当前位置</view> |
||||
</view> |
||||
</view> |
||||
<view> |
||||
<input type="text" @input="inputVerify" name="address" :value="address" placeholder="手动输入" class="ipt_sug" /> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex"> |
||||
<view class="sug_sgu"> |
||||
投诉对象 |
||||
<text class="chel_t_s">(必填)</text> |
||||
</view> |
||||
<!-- <view class="sug_r"> |
||||
<view class="obj_type"> |
||||
<text class="cue">商家</text><text>旅行社</text><text>导游</text><text>其他</text> |
||||
</view> |
||||
</view> --> |
||||
</view> |
||||
<view> |
||||
<input type="text" @input="inputVerify" name="ctype" placeholder="您要投诉谁" class="ipt_sug" /> |
||||
</view> |
||||
</view> |
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex"> |
||||
<view class="sug_sgu"> |
||||
投诉原因 |
||||
<text class="chel_t_s">(必填)</text> |
||||
</view> |
||||
<view class="sug_r"> |
||||
<!-- <view class=""> |
||||
<text class="chel_t_s">0/500</text> |
||||
</view> --> |
||||
</view> |
||||
</view> |
||||
<view> |
||||
<textarea name="creason" @input="inputVerify" class="ipt_sug" auto-height placeholder="输入投诉的具体事由" /> |
||||
</view> |
||||
</view> |
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex"> |
||||
<view class="sug_sgu">上传证据</view> |
||||
</view> |
||||
<view class="sug_dly_flex sug_lst_img sug_fm_img"> |
||||
<view class="w_33" v-for="(item, index) in pics" :key="index"> |
||||
<view class="fm_img_2"> |
||||
<image :src="imgUrl + item" class="sug_img" mode="aspectFill"></image> |
||||
<view @tap="delImg(index)" class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> |
||||
</view> |
||||
</view> |
||||
<!-- 上传按钮 --> |
||||
<view @tap="beforeUpload" class="w_33"> |
||||
<view class="fm_img_2"> |
||||
<image src="../../static/images/icn_xji.png" class="kou_top" mode="aspectFill"></image> |
||||
</view> |
||||
</view> |
||||
<!-- 上传后自带删除按钮 --> |
||||
<!-- <view class="w_33"> |
||||
<view class="fm_img_2"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> --> |
||||
<!-- 删除图片按钮 --> |
||||
<!-- <view class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> |
||||
</view> |
||||
</view> --> |
||||
<!-- <view class="w_33"> |
||||
<view class="fm_img_2"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
<view class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> |
||||
</view> |
||||
</view> |
||||
<view class="w_33"> |
||||
<view class="fm_img_2"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
<view class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> |
||||
</view> |
||||
</view> |
||||
<view class="w_33"> |
||||
<view class="fm_img_2"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
<view class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> |
||||
</view> |
||||
</view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="mode_com"> |
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex sub_lxir"> |
||||
<text style="color: #ff0000">*</text> |
||||
<view class="sug_sgu">联系人</view> |
||||
<view class="sug_r"> |
||||
<input type="text" name="lineuser" @input="inputVerify" :value="lineuser" placeholder="请输入姓名" class="ipt_sug" /> |
||||
<!-- <view class="btn_del_sug"><image src="../../static/images/del_2.png" mode="aspectFill" class="kou_top3"></image></view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="sug_form_line"> |
||||
<view class="sug_dly_flex sub_lxir"> |
||||
<text style="color: #ff0000">*</text> |
||||
<view class="sug_sgu">联系方式</view> |
||||
<view class="sug_r"> |
||||
<input type="number" name="linemobile" placeholder="请输入手机号码" class="ipt_sug" /> |
||||
<!-- <view class="btn_baoh_sug"><image src="../../static/images/icn_baoh.png" mode="aspectFill" class="kou_top3"></image><text>保护中</text></view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="blk_2"></view> |
||||
<view class="sug_fied"> |
||||
<view class="mode_com sug_edit_btn"> |
||||
<button type="default" form-type="submit" class="state_sub">提交</button> |
||||
</view> |
||||
</view> |
||||
</form> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import aes from '@/common/aes.js'; |
||||
export default { |
||||
data() { |
||||
return { |
||||
pics: [], |
||||
imgUrl: this.$config.ROOTPATH, |
||||
latitude: this.$param.clat, |
||||
longitude: this.$param.clng, |
||||
address: '', |
||||
lineuser: '' |
||||
}; |
||||
}, |
||||
onShow() { |
||||
this.getIdCardType() |
||||
}, |
||||
methods: { |
||||
getIdCardType: function () { |
||||
var data = { |
||||
userkey: this.$param.userkey, |
||||
dicnum: this.$param.suggestType |
||||
}; |
||||
uni.request({ |
||||
url:this.$config.getDicByDicnum, |
||||
data:datas, |
||||
method:'post', |
||||
success: function (res) { |
||||
console.log(res); |
||||
|
||||
}, |
||||
fail: function (err) { |
||||
console.log(err); //App.json中默认超时时间为60秒 |
||||
} |
||||
}); |
||||
// this.$Request.post(this.$config.getDicByDicnum, data,'multipartform-data').then((res) => { |
||||
// console.log(res,'投诉类型') |
||||
// if (this.$util.isSuccess(res)) { |
||||
// var data = res.data; |
||||
// this.idcardList = data; |
||||
// } |
||||
// }); |
||||
}, |
||||
inputVerify: function (e) { |
||||
var value = e.detail.value; |
||||
if (value == '') { |
||||
return; |
||||
} |
||||
}, |
||||
formSubmit: function (e) { |
||||
var that = this; |
||||
var filePath = ''; |
||||
if (that.pics.length > 0) { |
||||
filePath = that.pics.join(','); |
||||
} |
||||
if (e.detail.value.address.length == 0) { |
||||
debugger; |
||||
uni.showModal({ |
||||
title: '温馨提示', |
||||
content: '请填写事故发生地' |
||||
}); |
||||
return false; |
||||
} |
||||
// else{ |
||||
// debugger |
||||
// if(!e.detail.value.address.match("/^[0-9,.]+$/")){ |
||||
// uni.showModal({ |
||||
// title: '温馨提示', |
||||
// content: '请正确输入发生地', |
||||
// }) |
||||
// return; |
||||
// } |
||||
// } |
||||
if (e.detail.value.ctype.length == 0) { |
||||
debugger; |
||||
uni.showModal({ |
||||
title: '温馨提示', |
||||
content: '请填写投诉对象' |
||||
}); |
||||
return false; |
||||
} |
||||
// else{ |
||||
// debugger |
||||
// if(!e.detail.value.ctype.match("^[a-zA-Z0-9_\u4e00-\u9fa5]+$")){ |
||||
// uni.showModal({ |
||||
// title: '温馨提示', |
||||
// content: '请正确输入投诉对象', |
||||
// }) |
||||
// return; |
||||
// } |
||||
// } |
||||
|
||||
if (e.detail.value.creason.length == 0) { |
||||
debugger; |
||||
uni.showModal({ |
||||
title: '温馨提示', |
||||
content: '请填写原因' |
||||
}); |
||||
return false; |
||||
} |
||||
// else{ |
||||
// debugger |
||||
// if(!e.detail.value.creason.match("^[a-zA-Z0-9_\u4e00-\u9fa5]+$")){ |
||||
// uni.showModal({ |
||||
// title: '温馨提示', |
||||
// content: '请正确输入原因', |
||||
// }) |
||||
// return; |
||||
// } |
||||
// } |
||||
|
||||
if (e.detail.value.lineuser.length == 0) { |
||||
debugger; |
||||
uni.showModal({ |
||||
title: '温馨提示', |
||||
content: '请填写联系人' |
||||
}); |
||||
return false; |
||||
} |
||||
// else{ |
||||
// debugger |
||||
// if(!e.detail.value.lineuser.match("^[a-zA-Z0-9_\u4e00-\u9fa5]+$")){ |
||||
// uni.showModal({ |
||||
// title: '温馨提示', |
||||
// content: '请正确输入联系人', |
||||
// }) |
||||
// return; |
||||
// } |
||||
// } |
||||
if (!/^1\d{10}$/.test(e.detail.value.linemobile) || e.detail.value.linemobile.length == 0) { |
||||
debugger; |
||||
uni.showModal({ |
||||
title: '温馨提示', |
||||
content: '请填写正确的联系电话' |
||||
}); |
||||
return false; |
||||
} |
||||
var data = { |
||||
address: e.detail.value.address, |
||||
creason: e.detail.value.creason, |
||||
ctype: e.detail.value.ctype, |
||||
linemobile: e.detail.value.linemobile, |
||||
lineuser: e.detail.value.lineuser, |
||||
filePath: filePath, |
||||
unionid:aes.aesDecrypt(uni.getStorageSync("unionid")), |
||||
// unionid: 'unionIdewrqrfb', |
||||
lat: that.latitude, |
||||
lng: that.longitude, |
||||
userkey: that.$param.userkey |
||||
}; |
||||
this.$Request.post(this.$config.addFeedback, data).then((res) => { |
||||
if (res.status == 200) { |
||||
uni.showModal({ |
||||
title: '提示', |
||||
content: '提交成功', |
||||
showCancel: false, |
||||
success() { |
||||
// uni.redirectTo({ |
||||
// url: "/pages/suggest/sug_list" |
||||
// }) |
||||
uni.navigateBack({ |
||||
delta: 1 |
||||
}); |
||||
} |
||||
}); |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.msg, |
||||
icon: 'none' |
||||
}); |
||||
} |
||||
}); |
||||
}, |
||||
|
||||
beforeUpload: function () { |
||||
var that = this; |
||||
var url = this.$config.getMessageInfoFormFilter; |
||||
var data = { |
||||
type: this.$param.svgType, |
||||
userkey: this.$param.userkey, |
||||
title: '投诉', |
||||
pageSize: 1, |
||||
sort: '2' |
||||
}; |
||||
this.$Request.post(url, data).then((res) => { |
||||
var data = res.data; |
||||
var url = ''; |
||||
if (data.length > 0) { |
||||
url = data[0].logo; |
||||
if (url == undefined || url == null) { |
||||
url = 'kong'; |
||||
} |
||||
} |
||||
switch (uni.getSystemInfoSync().platform) { |
||||
case 'android': |
||||
console.log('运行Android上'); |
||||
this.$util.bindGpsObj(that); |
||||
Android.gotoDetial('ImageFrom', 'camera'); |
||||
Android.gotoDetial('SVGLINE', url); |
||||
break; |
||||
case 'ios': |
||||
console.log('运行iOS上'); |
||||
this.$util.bindGpsObj(that); |
||||
window.location.href = 'https://www.baidu.com?url=svg&value=' + url; |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
}); |
||||
uni.showLoading({ |
||||
title: '开启相机中...', |
||||
mask: true |
||||
}); |
||||
setTimeout( |
||||
function () { |
||||
uni.hideLoading(); |
||||
that.uploadImg(); |
||||
}, |
||||
500, |
||||
that |
||||
); |
||||
}, |
||||
receiveSuccess: function (base64) { |
||||
var that = this; |
||||
var pics = that.pics; |
||||
uni.showLoading({ |
||||
mask: true, |
||||
title: '上传中' |
||||
}); |
||||
var data = { |
||||
file: base64 |
||||
}; |
||||
that.$Request.post(that.$config.base64Upload, data).then((res) => { |
||||
if (res.status != 200) { |
||||
uni.showToast({ |
||||
title: '上传失败', |
||||
icon: 'none' |
||||
}); |
||||
uni.hideLoading(); |
||||
return; |
||||
} |
||||
var obj = res.data; |
||||
pics = pics.concat(obj.path); |
||||
that.pics = pics; |
||||
uni.hideLoading(); |
||||
}); |
||||
}, |
||||
uploadImg: function () { |
||||
var that = this; |
||||
var pics = that.pics; |
||||
if (pics.length < 9) { |
||||
uni.chooseImage({ |
||||
count: 9, // 最多可以选择的图片张数,默认9 |
||||
sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 |
||||
sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 |
||||
success: function (res) { |
||||
uni.showLoading({ |
||||
mask: true, |
||||
title: '上传中' |
||||
}); |
||||
var imgsrc = res.tempFilePaths; |
||||
uni.uploadFile({ |
||||
url: that.$config.fileUpload, |
||||
filePath: imgsrc[0], |
||||
name: 'file', |
||||
success(res) { |
||||
if (res.statusCode != 200) { |
||||
uni.showToast({ |
||||
title: '上传失败', |
||||
icon: 'none' |
||||
}); |
||||
uni.hideLoading(); |
||||
} |
||||
var obj = JSON.parse(res.data); |
||||
var flag = that.$util.isSuccess(obj); |
||||
if (!flag) { |
||||
return; |
||||
} |
||||
obj = obj.data; |
||||
pics = pics.concat(obj.path); |
||||
that.pics = pics; |
||||
uni.hideLoading(); |
||||
}, |
||||
fail(res) { |
||||
uni.showToast({ |
||||
title: '上传失败', |
||||
icon: 'none' |
||||
}); |
||||
uni.hideLoading(); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
} else { |
||||
uni.showToast({ |
||||
title: '最多上传9张', |
||||
icon: 'none' |
||||
}); |
||||
} |
||||
}, |
||||
delImg: function (index) { |
||||
this.pics.splice(index, 1); |
||||
}, |
||||
getLocation: function () { |
||||
var that = this; |
||||
uni.showLoading({ |
||||
title: '定位中', |
||||
mask: true |
||||
}); |
||||
uni.getLocation({ |
||||
type: 'gcj02', |
||||
altitude: true, |
||||
success: function (res) { |
||||
console.log('当前位置的经度:' + res.longitude); |
||||
console.log('当前位置的纬度:' + res.latitude); |
||||
that.address = res.longitude + ',' + res.latitude; |
||||
uni.hideLoading(); |
||||
} |
||||
}); |
||||
}, |
||||
callGpsSuccess: function (lat, lng) { |
||||
var that = this; |
||||
var data = { |
||||
lat: lat, |
||||
lng: lng, |
||||
poi: '0', |
||||
key: 'Z2IBZ-6BRKG-Z52QT-IU3J2-6P3QO-WIBII' |
||||
}; |
||||
that.$Request.post(that.$config.getAddressByLatLng, data).then((res) => { |
||||
if (res.status == 0) { |
||||
that.address = res.result.address; |
||||
} |
||||
}); |
||||
uni.hideLoading(); |
||||
}, |
||||
callGpsFail: function () { |
||||
var that = this; |
||||
var data = { |
||||
lat: this.$param.lat, |
||||
lng: this.$param.lng, |
||||
poi: '0', |
||||
key: 'Z2IBZ-6BRKG-Z52QT-IU3J2-6P3QO-WIBII' |
||||
}; |
||||
that.$Request.post(that.$config.getAddressByLatLng, data).then((res) => { |
||||
if (res.status == 0) { |
||||
that.address = res.result.address; |
||||
} |
||||
}); |
||||
uni.hideLoading(); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style> |
||||
@import url('/static/css/common.css'); |
||||
</style> |
@ -0,0 +1,270 @@ |
||||
<template> |
||||
<refresh @interrupt="interrupt" @pushToInterrupt="to" @backToInterrupt="back" @finished="finished"> |
||||
<view slot="top"> |
||||
<!-- 图标式 --> |
||||
<!-- <view :style="'height: ' + 100 + 'rpx;line-height:' + 100 + 'rpx;'" class="weiz_ref"> |
||||
<view class="sta_static"> |
||||
<view class="icn_ref_pic" v-if="refresh_show == '1' || refresh_show == '2'"> |
||||
<image src="../../../static/images/icn_ref_1.png" class="icn_ref"></image> |
||||
</view> |
||||
</view> |
||||
<view class="sta_rotate"> |
||||
<view class="icn_ref_pic" v-if="refresh_show == '3'"> |
||||
<image src="../../../static/images/icn_ref_1.png" class="icn_ref icn_ref2"></image> |
||||
</view> |
||||
</view> |
||||
|
||||
</view> --> |
||||
<!-- 带文字式 --> |
||||
<view :style="'position: absolute;bottom: 0rpx;height: ' + 60 + 'rpx;line-height:' + 60 + 'rpx;width: 100%;text-align: center; z-index:99'"> |
||||
<view class="ing2_ref" v-if="refresh_show == '1'"> |
||||
<image src="../../static/images/icn_ref.png" class="ing2_ref_pic"></image> |
||||
<text class="ref_ing">{{tip}}</text> |
||||
</view> |
||||
<view class="ing2_ref" v-if="refresh_show == '2'"> |
||||
<image src="../../static/images/icn_ref.png" class="ing2_ref_pic ing2_icn_ref2"></image> |
||||
<text class="ref_ing">{{tip}}</text> |
||||
</view> |
||||
<view class="ing2_ref" v-if="refresh_show == '3'"> |
||||
<image src="../../static/images/loading-icon.png" class="ing2_ref_pic icn_ref2"></image> |
||||
<text class="ref_ing">{{tip}}</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<template slot="vue-mes"> |
||||
<view> |
||||
<scroll-view @scrolltolower="onReachScroll" class="scroll-view" :scroll-top="topNum" scrollY="true"> |
||||
<view class="lst_sug_warp"> |
||||
<view class="lst_sug_unit" v-for="(item, index) in controlList" :key="index"> |
||||
<view @tap="showHideNr" :data-guid="item.guid" class="dly_flex_c mode_com tsu_bt"> |
||||
<view class="b_tol_ipt">{{item.ctype}}</view> |
||||
<view class="kou_top3"> |
||||
<text :class="item.upDownType"> <!-- 折叠图标-向下 --> </text> |
||||
<!--<text class="up_touj"> |
||||
折叠图标-向上 </text>--> |
||||
</view> |
||||
</view> |
||||
|
||||
|
||||
|
||||
<!-- 折叠内容 --> |
||||
<view :class="'mode_com ' + item.showHideType"> |
||||
<!--class为zhed_gao 固定高度--对应向下的箭头----> |
||||
<!-- 投诉时间 --> |
||||
<view><text class="chel_t_s">投诉时间:{{item.createtime}}</text></view> |
||||
<!-- 投诉内容 --> |
||||
<view class="sug_lst_inf"> |
||||
{{item.creason}} |
||||
</view> |
||||
<!-- 投诉图片 --> |
||||
<view class="sug_dly_flex sug_lst_img sug_fm_img"> |
||||
<view class="w_33" v-for="(items, indexs) in item.imgList" :key="indexs"> |
||||
<image :src="imgUrl + items" class="sug_img" mode="aspectFill"></image> |
||||
</view> |
||||
<!-- <view class="w_33"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="w_33"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="w_33"> |
||||
<image src="" class="sug_img" mode="aspectFill"></image> |
||||
</view> --> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
<!-- 地址 --> |
||||
<view class="mode_com"> |
||||
<view class="dly_flex sug_tips"> |
||||
<view class="sug_lst_time "> |
||||
<image src="" class="kou_top3"></image> |
||||
<view class="chel_t_s">{{item.address}}</view> |
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
<view class="blk_2"></view> |
||||
</scroll-view> |
||||
<view class="sug_fied" style="z-index: 99;"> |
||||
<view class="mode_com sug_edit_btn"> |
||||
<button type="default" @tap="goAddSug()" class="state_sub">新增投诉</button> |
||||
</view> |
||||
</view> |
||||
|
||||
</view> |
||||
</template> |
||||
</refresh> |
||||
</template> |
||||
|
||||
<script> |
||||
import refresh from '@/components/refresh_3.vue'; |
||||
import aes from "@/common/aes.js"; |
||||
export default { |
||||
components: { |
||||
refresh |
||||
}, |
||||
data() { |
||||
return { |
||||
tip: '下拉刷新', |
||||
refresh_show: '1', |
||||
showHideType:"down_touj", |
||||
imgUrl:this.$config.ROOTPATH, |
||||
controlList:[], |
||||
topNum:0, |
||||
page:1, |
||||
loadType:true, |
||||
netType:true |
||||
} |
||||
}, |
||||
onLoad:function(){ |
||||
var that = this; |
||||
this.$util.getNetworkType( |
||||
function(res){ |
||||
if(res.networkType === 'none'){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
},function(){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
) |
||||
if(!that.netType){ |
||||
return; |
||||
} |
||||
this.$util.hideLoadingByTime(); |
||||
this.getUserMsg(); |
||||
}, |
||||
methods:{ |
||||
onReachScroll: function(t) { |
||||
if(this.loadType){ |
||||
this.page++; |
||||
this.getUserMsg(); |
||||
} |
||||
}, |
||||
interrupt(e) { |
||||
this.refresh_show = '3'; |
||||
this.tip = "刷新中"; |
||||
setTimeout(() => { |
||||
this.page = 1; |
||||
this.controlList = []; |
||||
this.loadType = true; |
||||
this.getUserMsg(); |
||||
this.tip = '刷新成功'; |
||||
this.refresh_show = '1'; |
||||
e(); |
||||
}, 2000); |
||||
}, |
||||
to() { |
||||
this.tip = '释放刷新'; |
||||
this.refresh_show = '2'; |
||||
}, |
||||
back() { |
||||
this.tip = "下拉刷新" |
||||
this.refresh_show = '1'; |
||||
}, |
||||
finished() { |
||||
this.tip = '下拉刷新'; |
||||
this.refresh_show = '1'; |
||||
}, |
||||
showHideNr:function(e){ |
||||
var that = this; |
||||
for(var i = 0; i < that.controlList.length;i++){ |
||||
if(e.currentTarget.dataset.guid == that.controlList[i].guid){ |
||||
if(that.controlList[i].upDownType == "down_touj"){ |
||||
that.controlList[i].upDownType = "up_touj"; |
||||
that.controlList[i].showHideType = ""; |
||||
}else{ |
||||
that.controlList[i].upDownType = "down_touj"; |
||||
that.controlList[i].showHideType = "zhed_gao"; |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
getUserMsg:function(){ |
||||
var that = this; |
||||
var data = { |
||||
"pageno":that.page, |
||||
"pageSize":"10", |
||||
"unionid":uni.getStorageSync("unionid"), |
||||
// "unionid":"unionIdewrqrfb", |
||||
"userkey": that.$param.userkey |
||||
} |
||||
this.$Request.post(this.$config.selectControlListFormFilter,data).then(res => { |
||||
var flag = that.$util.isSuccess(res); |
||||
if(!flag){ |
||||
return; |
||||
} |
||||
var data = res.data; |
||||
if(data != null && data.length > 0){ |
||||
for(var i = 0;i < data.length;i++){ |
||||
var item = { |
||||
"guid":data[i].guid, |
||||
"creason":data[i].creason, |
||||
"address":data[i].address, |
||||
"createtime":that.timestampToTime(data[i].createtime), |
||||
"ctype":data[i].ctype, |
||||
"imgList":data[i].imgList, |
||||
"showHideType":"zhed_gao", |
||||
"upDownType":"down_touj" |
||||
} |
||||
that.controlList.push(item); |
||||
} |
||||
}else{ |
||||
that.loadType = false; |
||||
} |
||||
}); |
||||
}, |
||||
goAddSug:function(){ |
||||
if (!uni.getStorageSync('unionid')||uni.getStorageSync('unionid')==''||uni.getStorageSync('unionid')==null) { |
||||
uni.showToast({ |
||||
title: '请先到个人中心进行授权', |
||||
icon: 'none' |
||||
}); |
||||
return; |
||||
}else{ |
||||
uni.navigateTo({ |
||||
url: "/sunPackIndex/suggest/sug_from" |
||||
}) |
||||
} |
||||
}, |
||||
timestampToTime:function(timestamp) { |
||||
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 |
||||
var Y = date.getFullYear() + '-'; |
||||
var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; |
||||
var D = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' '; |
||||
var h = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; |
||||
var m = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; |
||||
var s = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); |
||||
return Y+M+D+h+m+s; |
||||
} |
||||
}, |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
@import url("/static/css/common.css"); |
||||
page{ background: #fff;} |
||||
.scroll-view { |
||||
position: absolute; |
||||
top: 0rpx !important; |
||||
right: 0; |
||||
left: 0; |
||||
bottom: 0; |
||||
z-index: 4; |
||||
} |
||||
</style> |
@ -0,0 +1,357 @@ |
||||
page { |
||||
background: #fff; |
||||
} |
||||
|
||||
.lh-swiper { |
||||
width: 100%; |
||||
height: 425rpx; |
||||
position: relative; |
||||
} |
||||
|
||||
.lh-swiper .slide-image { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.swiper-info { |
||||
color: #c8c8c8; |
||||
height: 50rpx; |
||||
line-height: 50rpx; |
||||
position: absolute; |
||||
right: 0; |
||||
bottom: 0; |
||||
left: 0; |
||||
padding: 0 30rpx; |
||||
font-size: 24rpx; |
||||
background: rgba(0,0,0,.6); |
||||
} |
||||
|
||||
.pdc-common-info { |
||||
width: 100%; |
||||
padding: 0rpx 30rpx; |
||||
margin-bottom: 16rpx; |
||||
box-sizing: border-box; |
||||
background: #fff; |
||||
} |
||||
|
||||
|
||||
.info-box { |
||||
padding: 30rpx 0; |
||||
} |
||||
|
||||
|
||||
.info-list { |
||||
display: -webkit-box; |
||||
padding: 10rpx 0; |
||||
|
||||
} |
||||
|
||||
.info-list:last-child { |
||||
border-bottom: none; |
||||
} |
||||
|
||||
.info-list .pic { |
||||
|
||||
|
||||
|
||||
width: 50rpx; |
||||
height: 37rpx; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
|
||||
} |
||||
|
||||
.info-list .pic image { |
||||
width: 32rpx; |
||||
height: 32rpx; |
||||
} |
||||
|
||||
.info-list .address { |
||||
-webkit-box-flex: 1; |
||||
font-size: 26rpx; |
||||
color: #666; |
||||
|
||||
|
||||
} |
||||
|
||||
.info-list .txt { |
||||
-webkit-box-flex: 1; |
||||
font-size: 26rpx; |
||||
color: #2a2a2a; |
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
.info-list .title { |
||||
|
||||
font-size: 40rpx; |
||||
/* font-weight:bold; */ |
||||
padding: 20rpx 0 0 0; |
||||
} |
||||
|
||||
.swiper-tab-wrap { |
||||
width: 100%; |
||||
background: #fff; |
||||
} |
||||
|
||||
.swiper-tab-bar { |
||||
width: 100%; |
||||
height: 80rpx; |
||||
line-height: 80rpx; |
||||
border-bottom: 2rpx solid #e6e6e6; |
||||
text-align: center; |
||||
} |
||||
|
||||
.swiper-tab-nav { |
||||
width: 33.33%; |
||||
height: 76rpx; |
||||
display: inline-block; |
||||
font-size: 32rpx; |
||||
} |
||||
|
||||
.on { |
||||
color: #00b7ee; |
||||
border-bottom: 4rpx solid #00b7ee; |
||||
} |
||||
|
||||
.swiper-tab-box { |
||||
display: none; |
||||
} |
||||
|
||||
.show { |
||||
display: block; |
||||
} |
||||
|
||||
.line-type-wrap { |
||||
padding: 0 30rpx; |
||||
} |
||||
|
||||
.line-type-item { |
||||
display: flex; |
||||
padding: 20rpx 0; |
||||
border-bottom: 2rpx solid #e6e6e6; |
||||
} |
||||
|
||||
.line-type-item:last-child { |
||||
border-bottom: none; |
||||
} |
||||
|
||||
.l-info { |
||||
flex: 1; |
||||
} |
||||
|
||||
.l-info .tit { |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.l-info .txt { |
||||
color: #969696; |
||||
padding-top: 15rpx; |
||||
font-size: 22rpx; |
||||
} |
||||
|
||||
.r-info { |
||||
width: 150rpx; |
||||
margin-left: 20rpx; |
||||
text-align: center; |
||||
} |
||||
|
||||
.r-info .pri { |
||||
color: #ff6b1a; |
||||
font-size: 24rpx; |
||||
} |
||||
|
||||
.r-info .pri .num { |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.r-info .booking-btn { |
||||
color: #fff; |
||||
display: inline-block; |
||||
height: 42rpx; |
||||
line-height: 42rpx; |
||||
padding: 0 24rpx; |
||||
border-radius: 8rpx; |
||||
font-size: 28rpx; |
||||
background: #f63; |
||||
} |
||||
|
||||
.r-info .booking-btnhui { |
||||
color: #fff; |
||||
display: inline-block; |
||||
height: 42rpx; |
||||
line-height: 42rpx; |
||||
padding: 0 24rpx; |
||||
border-radius: 8rpx; |
||||
font-size: 28rpx; |
||||
background: #c8c8c8; |
||||
} |
||||
|
||||
.line-show-wrap { |
||||
} |
||||
|
||||
.line-show-item { |
||||
padding: 20rpx 40rpx; |
||||
} |
||||
|
||||
.yd-box { |
||||
padding: 15rpx 30rpx; |
||||
border-top: 1rpx solid #bfbfc3; |
||||
} |
||||
|
||||
.yd-box .yd-btn { |
||||
color: #fff; |
||||
display: block; |
||||
width: 100%; |
||||
height: 70rpx; |
||||
line-height: 70rpx; |
||||
text-align: center; |
||||
font-size: 28rpx; |
||||
border-radius: 5rpx; |
||||
background: #f63; |
||||
border: 1rpx solid #f63; |
||||
} |
||||
|
||||
.line-show-item .item-title { |
||||
|
||||
|
||||
|
||||
font-size: 32rpx; |
||||
font-weight:bold; |
||||
color: #05A9F0; |
||||
padding: 20rpx 0 ; |
||||
border-bottom: 2rpx solid #05A9F0; |
||||
|
||||
} |
||||
|
||||
.line-show-item .item-txt { |
||||
color: #2a2a2a; |
||||
line-height: 56rpx; |
||||
padding-top: 10rpx; |
||||
font-size: 32rpx; |
||||
} |
||||
|
||||
.line-show-item .item-txt image { |
||||
max-width: 100%!important; |
||||
} |
||||
|
||||
.day-block { |
||||
} |
||||
|
||||
.day-block .day-tit { |
||||
display: flex; |
||||
padding-top: 20rpx; |
||||
font-size: 26rpx; |
||||
} |
||||
|
||||
.day-block .day-tit .sz { |
||||
width: 108rpx; |
||||
} |
||||
|
||||
.day-block .day-tit .bt { |
||||
flex: 1; |
||||
} |
||||
|
||||
.day-block .attr { |
||||
display: flex; |
||||
padding-top: 20rpx; |
||||
font-size: 24rpx; |
||||
} |
||||
|
||||
.day-block .attr .hd { |
||||
width: 108rpx; |
||||
line-height: 40rpx; |
||||
} |
||||
|
||||
.day-block .attr .bd { |
||||
color: #666; |
||||
flex: 1; |
||||
line-height: 40rpx; |
||||
} |
||||
|
||||
.day-block .attr .bd .label { |
||||
display: block; |
||||
} |
||||
|
||||
.day-block .attr .icon { |
||||
width: 24rpx; |
||||
height: 24rpx; |
||||
vertical-align: middle; |
||||
margin: -8rpx 6rpx 0 0; |
||||
} |
||||
|
||||
.comment-container { |
||||
} |
||||
|
||||
.comment-container .tip-bar { |
||||
display: flex; |
||||
padding: 0 30rpx; |
||||
justify-content: space-between; |
||||
border-bottom: 1px solid #e6e6e6; |
||||
} |
||||
|
||||
.comment-container .tip-bar .item { |
||||
line-height: 80rpx; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.comment-container .tip-bar .item .num { |
||||
color: #f80; |
||||
} |
||||
|
||||
.conment-list { |
||||
padding: 30rpx; |
||||
border-bottom: 1px solid #e6e6e6; |
||||
} |
||||
|
||||
.conment-list .comt-info { |
||||
display: flex; |
||||
} |
||||
|
||||
.conment-list .comt-info .pic { |
||||
width: 86rpx; |
||||
height: 86rpx; |
||||
} |
||||
|
||||
.conment-list .comt-info .pic image { |
||||
width: 86rpx; |
||||
height: 86rpx; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
.conment-list .comt-info .user { |
||||
flex: 1; |
||||
padding: 0 20rpx; |
||||
} |
||||
|
||||
.conment-list .comt-info .user .name { |
||||
line-height: 40rpx; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.conment-list .comt-info .user .date { |
||||
color: #999; |
||||
line-height: 40rpx; |
||||
font-size: 24rpx; |
||||
} |
||||
|
||||
|
||||
|
||||
.info-list .more { |
||||
width: 40rpx; |
||||
height: 40rpx; |
||||
position: relative; |
||||
} |
||||
|
||||
.info-list .more:after { |
||||
content: ""; |
||||
width: 16rpx; |
||||
height: 16rpx; |
||||
position: absolute; |
||||
top: 50%; |
||||
border-top: 4rpx solid #c7c7cc; |
||||
border-right: 4rpx solid #c7c7cc; |
||||
transform: rotate(45deg) translateY(-70%); |
||||
} |
@ -0,0 +1,190 @@ |
||||
<template> |
||||
<view class="mt_1"> |
||||
|
||||
<!-- <swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots" :interval="interval"> |
||||
<swiper-item v-for="(item,index) in imgList" :key="index"> |
||||
<image class="slide-image" height="187" :src="item" width="375"></image> |
||||
</swiper-item> |
||||
</swiper> --> |
||||
|
||||
<view class="news_info shadow_fg"> |
||||
|
||||
<view class="arc_t_pd"> |
||||
<view class="news_tit">{{info.title}}</view> |
||||
</view> |
||||
<view> |
||||
<view class="dly_flex zxun_tit"> |
||||
|
||||
<view class="half_unit" > |
||||
|
||||
<text class="new_adr">阅读 {{info.browsenum}}</text> |
||||
|
||||
<text class="new_adr" @click="dianzan(info.guid)" v-if="zan == true"> |
||||
<image src="../../../static/images/icn_like.png" class="pic_zan"></image>{{info.upnum}} 赞 |
||||
</text> |
||||
<text class="new_adr" v-if="zan == false"> |
||||
<image src="../../../static/images/zan.png" class="pic_zan"></image>{{info.upnum}} 赞 |
||||
</text> |
||||
|
||||
</view> |
||||
<view class="lis_time half_unit">{{info.createtime}}</view> |
||||
</view> |
||||
|
||||
|
||||
<view class=""> |
||||
<view bindtap="showMap" class=""> |
||||
<!-- <view class="pic"> |
||||
<image src="../../../static/images/list-icon1.png" style="width:30rpx;height:37rpx;"></image> |
||||
</view> --> |
||||
<!-- <view ><text class="new_adr">{{info.address}}</text></view> --> |
||||
<!-- <view class="more"></view> --> |
||||
</view> |
||||
|
||||
<!--<view class="info-list"> |
||||
<view class="pic"> |
||||
<image src="../../../static/images/list-icon6.png" style="width:30rpx;height:37rpx;"></image> |
||||
</view> |
||||
<view> |
||||
<text class="address">参与时间:</text> |
||||
<text class="txt">{{info.jointime}}</text> |
||||
</view> |
||||
</view>--> |
||||
<!--<view class="info-list"> |
||||
<view class="pic"> |
||||
<image src="../../../static/images/list-icon6.png" style="width:30rpx;height:37rpx;"></image> |
||||
</view> |
||||
<view> |
||||
<text class="address">举办单位:</text> |
||||
<text class="txt">{{info.holdcompany}}</text> |
||||
</view> |
||||
</view>--> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="swiper-tab-wrap"> |
||||
|
||||
|
||||
<view class="line-show-wrap"> |
||||
<view class="line-show-item"> |
||||
<!-- <view class="item-title">概况</view> --> |
||||
<view class="nr_cot"> |
||||
|
||||
<u-parse :content="info.content" /> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
|
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import uParse from '@/components/gaoyia-parse/parse.vue' |
||||
|
||||
export default { |
||||
components: { |
||||
uParse |
||||
}, |
||||
data() { |
||||
return { |
||||
priceSymbol: "", |
||||
indicatorDots: false, |
||||
autoplay: true, |
||||
interval: 3000, |
||||
duration: 500, |
||||
info: {}, |
||||
imgList: [], |
||||
zan: true, |
||||
netType:true |
||||
|
||||
} |
||||
}, |
||||
onLoad: function(options) { |
||||
var that = this; |
||||
this.$util.getNetworkType( |
||||
function(res){ |
||||
if(res.networkType === 'none'){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
},function(){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
) |
||||
if(!that.netType){ |
||||
return; |
||||
} |
||||
this.$util.hideLoadingByTime(); |
||||
this.detailInfo(options.id); |
||||
this.jilu(options.id); |
||||
that.$util.saveOperatorLog(that,"ZIXUN",options.id); |
||||
}, |
||||
methods: { |
||||
detailInfo: function(id) { |
||||
var that = this; |
||||
var data = { |
||||
"userkey":this.$param.userkey, |
||||
"type":this.$param.zixunType, |
||||
"guid":id |
||||
} |
||||
this.$Request.post(this.$config.getMessgeInfoDetailFormId, data).then(res => { |
||||
if(!that.$util.isSuccess(res)){ |
||||
return; |
||||
} |
||||
this.info = res.data; |
||||
var imgList = res.data.imagelist; |
||||
if (imgList != null) { |
||||
for (var i = 0; i < imgList.length; i++) { |
||||
imgList[i] = "" + this.$config.ROOTPATH + imgList[i]; |
||||
} |
||||
} |
||||
this.imgList = imgList; |
||||
}) |
||||
}, |
||||
jilu: function(id) { |
||||
var that = this; |
||||
var data = { |
||||
guid: id, |
||||
browsenum:"1" |
||||
}; |
||||
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then(res => { |
||||
if(that.$util.isSuccess(res)){ |
||||
console.log("已阅读"); |
||||
} |
||||
}); |
||||
}, |
||||
dianzan: function(guid) { |
||||
var that = this; |
||||
var data = { |
||||
guid: guid, |
||||
upnum:"1" |
||||
}; |
||||
this.$Request.post(this.$config.updateMessageInfoUBFeildFormId, data).then(res => { |
||||
if(that.$util.isSuccess(res)){ |
||||
this.zan = false; |
||||
this.info.upnum+=1; |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
@import url("/static/css/common.css"); |
||||
@import url("zixundetail.css"); |
||||
</style> |
@ -0,0 +1,299 @@ |
||||
page { |
||||
height: 100%; |
||||
overflow-y: hidden; |
||||
position: relative; |
||||
background: #fff; |
||||
} |
||||
|
||||
.search-container { |
||||
width: 100%; |
||||
height: 100%; |
||||
overflow: hidden; |
||||
position: relative; |
||||
background: #fff; |
||||
z-index: 3; |
||||
} |
||||
|
||||
.search-tip-bar { |
||||
display: flex; |
||||
height: 60rpx; |
||||
justify-content: space-between; |
||||
border-bottom: 2rpx solid #e5e5e5; |
||||
} |
||||
|
||||
.search-tip-item { |
||||
width: 33.333333%; |
||||
height: 60rpx; |
||||
line-height: 60rpx; |
||||
text-align: center; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.search-tip-item:after { |
||||
content: ""; |
||||
display: inline-block; |
||||
width: 0; |
||||
height: 0; |
||||
vertical-align: middle; |
||||
margin: -2rpx 0 0 6rpx; |
||||
border-top: 8rpx solid #666; |
||||
border-left: 8rpx solid transparent; |
||||
border-right: 8rpx solid transparent; |
||||
} |
||||
|
||||
.search-tip-item.active:after { |
||||
border-bottom: 8rpx solid #666; |
||||
border-left: 8rpx solid transparent; |
||||
border-right: 8rpx solid transparent; |
||||
border-top: 0; |
||||
} |
||||
|
||||
.scroll-view { |
||||
position: absolute; |
||||
top: 100rpx; |
||||
right: 0; |
||||
left: 0; |
||||
bottom: 0; |
||||
} |
||||
|
||||
.list-container { |
||||
width: 100%; |
||||
background: #fff; |
||||
} |
||||
|
||||
.list-wrap { |
||||
width: 100%; |
||||
padding: 0rpx; |
||||
box-sizing: border-box; |
||||
border-top: 1px solid #e1e1e1; |
||||
} |
||||
|
||||
.list-item { |
||||
display: flex; |
||||
padding:30rpx 0; |
||||
border-bottom: 1px solid #eee; |
||||
box-shadow: none; |
||||
margin-top:15rpx |
||||
} |
||||
.mode_com .list-item:last-child {margin-bottom: 30rpx;} |
||||
.list-item .item-pic { |
||||
width: 180rpx; |
||||
height: 140rpx; |
||||
border-radius: 6rpx; |
||||
border:2rpx solid #eee; |
||||
} |
||||
|
||||
.list-item .item-info { |
||||
flex: 1; |
||||
margin-right: 20rpx; |
||||
|
||||
} |
||||
|
||||
.list-item .item-info .title { |
||||
max-height: 102rpx; |
||||
line-height: 51rpx; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; |
||||
-webkit-box-orient: vertical; |
||||
font-size: 34rpx; |
||||
margin-bottom: 10rpx; |
||||
|
||||
|
||||
} |
||||
|
||||
.list-item .item-info .attr .tip { |
||||
display: inline-block; |
||||
height: 32rpx; |
||||
border: 1rpx solid #ff7362; |
||||
font-size: 20rpx; |
||||
color: #ff7362; |
||||
line-height: 32rpx; |
||||
margin-right: 12rpx; |
||||
padding: 0 5rpx; |
||||
border-radius: 5rpx; |
||||
overflow: hidden; |
||||
|
||||
|
||||
} |
||||
|
||||
.list-item .item-info .data { |
||||
display: flex; |
||||
margin-top: 15rpx; |
||||
justify-content: space-between; |
||||
} |
||||
|
||||
.list-item .item-info .data .sell,.list-item .item-info .data .myd { |
||||
color: #05A9F0; |
||||
line-height: 40rpx; |
||||
font-size: 26rpx; |
||||
} |
||||
|
||||
.list-item .item-info .data .sell,.list-item .item-info .data .myd1 { |
||||
color: #969696; |
||||
line-height: 40rpx; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.list-item .item-info .data .price { |
||||
color: #969696; |
||||
line-height: 40rpx; |
||||
font-size: 24rpx; |
||||
} |
||||
|
||||
.list-item .item-info .data .price .num { |
||||
color: #ff4f32; |
||||
line-height: 40rpx; |
||||
font-size: 32rpx; |
||||
} |
||||
|
||||
.sort-page { |
||||
position: absolute; |
||||
top: 62rpx; |
||||
right: 0; |
||||
bottom: 0; |
||||
left: 0; |
||||
z-index: 10; |
||||
background: rgba(0,0,0,.5); |
||||
} |
||||
|
||||
.sort-group { |
||||
background: #fff; |
||||
} |
||||
|
||||
.sort-item { |
||||
color: #666; |
||||
height: 78rpx; |
||||
line-height: 78rpx; |
||||
padding: 0 30rpx; |
||||
position: relative; |
||||
font-size: 28rpx; |
||||
border-bottom: 2rpx solid #e5e5e5; |
||||
} |
||||
|
||||
.sort-item-active { |
||||
color: #eb5e18; |
||||
} |
||||
|
||||
.sort-item-active:after { |
||||
content: ""; |
||||
display: inline-block; |
||||
width: 22rpx; |
||||
height: 18rpx; |
||||
position: absolute; |
||||
top: 50%; |
||||
right: 20rpx; |
||||
margin-top: -14rpx; |
||||
background: url("") center no-repeat; |
||||
background-size: contain; |
||||
} |
||||
|
||||
.filter-page { |
||||
position: absolute; |
||||
top: 62rpx; |
||||
right: 0; |
||||
bottom: 0; |
||||
left: 0; |
||||
z-index: 10; |
||||
background: #fff; |
||||
} |
||||
|
||||
.filter-box { |
||||
display: -webkit-box; |
||||
position: absolute; |
||||
top: 0; |
||||
right: 0; |
||||
bottom: 108rpx; |
||||
left: 0; |
||||
} |
||||
|
||||
.filter-hd { |
||||
width: 220rpx; |
||||
height: 100%; |
||||
background: #f2f6f9; |
||||
} |
||||
|
||||
.filter-hd-item { |
||||
height: 80rpx; |
||||
line-height: 80rpx; |
||||
padding: 0 20rpx; |
||||
position: relative; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.filter-hd-item-active,.filter-bd-item-active { |
||||
color: #eb5e18; |
||||
background: #fff; |
||||
} |
||||
|
||||
.filter-bd-item-active:after { |
||||
content: ""; |
||||
display: inline-block; |
||||
width: 22rpx; |
||||
height: 18rpx; |
||||
position: absolute; |
||||
top: 50%; |
||||
right: 20rpx; |
||||
margin-top: -14rpx; |
||||
background: url("") center no-repeat; |
||||
background-size: contain; |
||||
} |
||||
|
||||
.filter-bd { |
||||
height: 100%; |
||||
-webkit-box-flex: 1; |
||||
padding: 0 20rpx; |
||||
} |
||||
|
||||
.filter-bd-item { |
||||
height: 78rpx; |
||||
line-height: 78rpx; |
||||
padding: 0 20rpx; |
||||
position: relative; |
||||
font-size: 28rpx; |
||||
border-bottom: 2rpx solid #e5e5e5; |
||||
} |
||||
|
||||
.control-bar-block { |
||||
display: -webkit-box; |
||||
height: 80rpx; |
||||
padding: 14rpx 20rpx; |
||||
position: absolute; |
||||
right: 0; |
||||
bottom: 0; |
||||
left: 0; |
||||
background: #fafafa; |
||||
} |
||||
|
||||
.control-back-btn { |
||||
color: #8a8a8a; |
||||
width: 170rpx; |
||||
height: 76rpx; |
||||
line-height: 76rpx; |
||||
margin-right: 20rpx; |
||||
text-align: center; |
||||
border: 2rpx solid #b8b8b8; |
||||
border-radius: 10rpx; |
||||
font-size: 26rpx; |
||||
} |
||||
|
||||
.control-confirm-btn { |
||||
color: #fff; |
||||
height: 80rpx; |
||||
line-height: 80rpx; |
||||
text-align: center; |
||||
-webkit-box-flex: 1; |
||||
font-size: 30rpx; |
||||
border-radius: 10rpx; |
||||
background: #eb5e18; |
||||
} |
||||
|
||||
.goTop { |
||||
height: 80rpx; |
||||
width: 80rpx; |
||||
position: fixed; |
||||
bottom: 50rpx; |
||||
right: 30rpx; |
||||
border-radius: 50%; |
||||
} |
@ -0,0 +1,451 @@ |
||||
<template> |
||||
<refresh @interrupt="interrupt" @pushToInterrupt="to" @backToInterrupt="back" @finished="finished"> |
||||
|
||||
<view slot="top"> |
||||
<!-- 图标式 --> |
||||
<!-- <view :style="'height: ' + 100 + 'rpx;line-height:' + 100 + 'rpx;'" class="weiz_ref"> |
||||
<view class="sta_static"> |
||||
<view class="icn_ref_pic" v-if="refresh_show == '1' || refresh_show == '2'"> |
||||
<image src="../../../static/images/icn_ref_1.png" class="icn_ref"></image> |
||||
</view> |
||||
</view> |
||||
<view class="sta_rotate"> |
||||
<view class="icn_ref_pic" v-if="refresh_show == '3'"> |
||||
<image src="../../../static/images/icn_ref_1.png" class="icn_ref icn_ref2"></image> |
||||
</view> |
||||
</view> |
||||
|
||||
</view> --> |
||||
<!-- 带文字式 --> |
||||
<view :style="'position: absolute;bottom: 0rpx;height: ' + 60 + 'rpx;line-height:' + 60 + 'rpx;width: 100%;text-align: center; z-index:99'"> |
||||
<view class="ing2_ref" v-if="refresh_show == '1'"> |
||||
<image src="../../../static/images/icn_ref.png" class="ing2_ref_pic"></image> |
||||
<text class="ref_ing">{{ tip }}</text> |
||||
</view> |
||||
<view class="ing2_ref" v-if="refresh_show == '2'"> |
||||
<image src="../../../static/images/icn_ref.png" class="ing2_ref_pic ing2_icn_ref2"></image> |
||||
<text class="ref_ing">{{ tip }}</text> |
||||
</view> |
||||
<view class="ing2_ref" v-if="refresh_show == '3'"> |
||||
<image src="../../../static/images/loading-icon.png" class="ing2_ref_pic icn_ref2"></image> |
||||
<text class="ref_ing">{{ tip }}</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<template slot="vue-mes"> |
||||
<view class="an_box_mes wc_sbox"> |
||||
<view class="dy_fx an_sch amb_30"> |
||||
<view class="fx_1"> |
||||
<input v-model="searchValue" @confirm="search" type="text" class="an_sch_ipt" confirm-type="search" placeholder-style="color:#999" placeholder="输入信息名称" /> |
||||
</view> |
||||
<view class="an_sch_img" @click="search"><image src="../../../static/animg/icon-search.png" class="ac_size_1"></image></view> |
||||
</view> |
||||
</view> |
||||
<view class="container"> |
||||
<scroll-view @scroll="onReachScroll" @bindscrolltolower="lower" class="scroll-view amt_30" :scroll-top="topNum" scrollY="true"> |
||||
<view class="mode_com"> |
||||
<!-- <text class="tit_com">旅游资讯</text> --> |
||||
<navigator class="list-item" hover-class="none" :url="'/pages/zixun/zixundetail/zixundetail?id=' + item.id" v-for="(item, index) in listDatas" :key="index"> |
||||
<view class="item-info"> |
||||
<view class="title">{{ item.title }}</view> |
||||
<view class="data"> |
||||
<view class="myd1">{{ item.jointime }}</view> |
||||
</view> |
||||
</view> |
||||
<image class="item-pic" v-if="item.logo != null && item.logo != ''" :src="item.logo"></image> |
||||
</navigator> |
||||
</view> |
||||
|
||||
<view class="data-loading" v-if="param.loading"> |
||||
<image class="icon" src="../../../static/images/loading-icon.png"></image> |
||||
加载中… |
||||
</view> |
||||
<view class="data-is-bottom" v-if="param.finished">{{this.$param.pageMsg}}</view> |
||||
<view class="no-data-info" v-if="param.noData">{{this.$param.dataMsg}}</view> |
||||
</scroll-view> |
||||
|
||||
<!-- <view class="sort-page" :hidden="selectedParam.hiddenSortPanel"> |
||||
<view class="sort-group"> |
||||
<view |
||||
@tap="selected" |
||||
:class="[pageClass.sortItemClass, selectedParam.sortId == item.id ? 'sort-item-active' : '']" |
||||
data-panel="hiddenSortPanel" |
||||
data-type="sortId" |
||||
:data-id="item.id" |
||||
v-for="(item, index) in filter.sort" |
||||
:key="index" |
||||
> |
||||
{{ item.name }} |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
|
||||
<!-- <view class="sort-page" :hidden="selectedParam.hiddenRegionPanel"> |
||||
<view class="sort-group"> |
||||
<view |
||||
@tap="regionSelected" |
||||
:class="[pageClass.sortItemClass, selectedParam.bm == item.bm ? 'sort-item-active' : '']" |
||||
data-panel="hiddenRegionPanel" |
||||
:data-name="item.mc" |
||||
data-type="bm" |
||||
:data-id="item.bm" |
||||
v-for="(item, index) in filter.regionList" |
||||
:key="index" |
||||
> |
||||
{{ item.mc }} |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
</view> |
||||
</template> |
||||
</refresh> |
||||
</template> |
||||
|
||||
<script> |
||||
import refresh from '@/components/refresh_3.vue'; |
||||
export default { |
||||
components: { |
||||
refresh |
||||
}, |
||||
data() { |
||||
return { |
||||
tip: '下拉刷新', |
||||
refresh_show: '1', |
||||
// |
||||
indicatorDots: true, |
||||
autoplay: true, |
||||
interval: 6000, |
||||
duration: 1500, |
||||
|
||||
searchItemClass: 'search-tip-item', |
||||
pageClass: { |
||||
sortItemClass: 'sort-item', |
||||
filterHdItemClass: 'filter-hd-item', |
||||
filterBdItem: 'filter-bd-item' |
||||
}, |
||||
priceSymbol: '', |
||||
destinationBak: 'all', |
||||
destination: 'all', |
||||
filter: [], |
||||
parentLevelItem: 'attribute_etype', |
||||
defaultFilter: {}, |
||||
latitude: 0, |
||||
longitude: 0, |
||||
selectedFIlterBak: { |
||||
price: 0 |
||||
}, |
||||
selectedFIlter: { |
||||
attribute_etype: 0 |
||||
}, |
||||
selectedParam: { |
||||
sortId: 1, |
||||
bm: '', |
||||
hiddenSortPanel: !0, |
||||
hiddenRegionPanel: !0 |
||||
}, |
||||
param: { |
||||
page: 1, |
||||
noData: !1, |
||||
loading: !1, |
||||
finished: !1 |
||||
}, |
||||
listDatas: [], |
||||
topNum: 0, |
||||
rootPaht: this.$config.ROOTPATH, |
||||
selectcondition: { |
||||
bm: this.$config.ARER_CODE, |
||||
sortId: 2 |
||||
}, |
||||
regionname: '区域', |
||||
topVideoList: [], |
||||
topVideoImg: '', |
||||
region: '', |
||||
searchValue:"", |
||||
netType:true |
||||
}; |
||||
}, |
||||
onLoad(option) { |
||||
var that = this; |
||||
this.$util.getNetworkType( |
||||
function(res){ |
||||
if(res.networkType === 'none'){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
},function(){ |
||||
uni.showToast({ |
||||
title:that.$param.netMsg, |
||||
icon:"none", |
||||
duration:2000 |
||||
}) |
||||
that.netType = false; |
||||
} |
||||
) |
||||
if(!that.netType){ |
||||
return; |
||||
} |
||||
this.$util.hideLoadingByTime(); |
||||
uni.showLoading({ |
||||
title: '加载中', |
||||
mask: true |
||||
}); |
||||
var region = option.region; |
||||
this.region = region; |
||||
this.initData(); |
||||
if (region != null && region != '') { |
||||
this.get_data(region); |
||||
} else { |
||||
this.getRedisData(); |
||||
} |
||||
this.get_attribute(); |
||||
that.$util.saveOperatorLog(that,"FUN","资讯"); |
||||
}, |
||||
onShow() { |
||||
this.destinationBak != this.destination && (this.initData(), this.get_data()); |
||||
}, |
||||
methods: { |
||||
getRedisData: function() { |
||||
var that = this; |
||||
var data = { |
||||
key: this.$param.userkey + '_information_list' |
||||
}; |
||||
that.$Request.post(that.$config.getRedisData, data).then(res => { |
||||
if (res.status == 200) { |
||||
var listDatas = this.listDatas, |
||||
dataListLen = res.data.hoteventList.length; |
||||
|
||||
if ( |
||||
(dataListLen == 10 |
||||
? (this.param.page += 1) |
||||
: (this.param.page = 1 && 0 == dataListLen ? (this.param.noData = true) : (this.param.finished = true)), |
||||
(this.param.loading = false), |
||||
dataListLen > 0) |
||||
) { |
||||
for (var i = 0; i < dataListLen; i++) { |
||||
var logo = res.data.hoteventList[i].logo; |
||||
if(logo.indexOf("http") == -1){ |
||||
logo = this.rootPaht + logo; |
||||
} |
||||
var item = { |
||||
id: res.data.hoteventList[i].guid, |
||||
logo: logo, |
||||
title: res.data.hoteventList[i].title, |
||||
jointime: res.data.hoteventList[i].jointime |
||||
}; |
||||
this.listDatas.push(item); |
||||
} |
||||
uni.hideLoading(); |
||||
} |
||||
} else { |
||||
that.get_data(); |
||||
} |
||||
}); |
||||
}, |
||||
interrupt(e) { |
||||
this.refresh_show = '3'; |
||||
this.tip = '刷新中'; |
||||
setTimeout(() => { |
||||
this.get_attribute(), this.initData(), this.get_data(this.region); |
||||
this.tip = '刷新成功'; |
||||
this.refresh_show = '1'; |
||||
e(); |
||||
}, 2000); |
||||
}, |
||||
to() { |
||||
this.tip = '释放刷新'; |
||||
this.refresh_show = '2'; |
||||
}, |
||||
back() { |
||||
this.tip = '下拉刷新'; |
||||
this.refresh_show = '1'; |
||||
}, |
||||
finished() { |
||||
this.tip = '下拉刷新'; |
||||
this.refresh_show = '1'; |
||||
}, |
||||
initData: function() { |
||||
uni.showLoading({ |
||||
title: '加载中', |
||||
mask: true |
||||
}); |
||||
var param = {}; |
||||
param.page = 1; |
||||
param.noData = false; |
||||
param.finished = false; |
||||
|
||||
this.param = param; |
||||
this.listDatas = []; |
||||
this.destinationBak = this.destination; |
||||
}, |
||||
selected: function(event) { |
||||
this.initData(); |
||||
var dataset = event.currentTarget.dataset; |
||||
var param = this.selectedParam; |
||||
|
||||
param[dataset.type] = dataset.id; |
||||
param.hiddenSortPanel = !0; |
||||
|
||||
//console.log(dataset.id); |
||||
this.selectedParam = param; |
||||
this.selectcondition.sortId = dataset.id; |
||||
this.get_data(); |
||||
}, |
||||
regionSelected: function(event) { |
||||
this.initData(); |
||||
var dataset = event.currentTarget.dataset; |
||||
var param = this.selectedParam; |
||||
|
||||
param[dataset.type] = dataset.id; |
||||
param.hiddenRegionPanel = !0; |
||||
|
||||
//console.log(dataset.id); |
||||
this.selectedParam = param; |
||||
this.selectcondition.bm = this.selectedParam.bm; |
||||
this.regionname = dataset.name; |
||||
this.get_data(); |
||||
}, |
||||
changePanel: function(event) { |
||||
var dataSet = event.currentTarget.dataset, |
||||
selectedParam = this.selectedParam; |
||||
'hiddenSortPanel' == dataSet.type ? (selectedParam.hiddenRegionPanel = !0) : (selectedParam.hiddenSortPanel = !0), |
||||
(selectedParam[dataSet.type] = !selectedParam[dataSet.type]), |
||||
(this.selectedParam = selectedParam); |
||||
}, |
||||
changeRegionPanel: function(event) { |
||||
var dataSet = event.currentTarget.dataset, |
||||
selectedParam = this.selectedParam; |
||||
if ('hiddenRegionPanel' == dataSet.type) { |
||||
selectedParam.hiddenSortPanel = !0; |
||||
} else { |
||||
selectedParam.hiddenRegionPanel = !0; |
||||
} |
||||
(selectedParam[dataSet.type] = !selectedParam[dataSet.type]), (this.selectedParam = selectedParam); |
||||
}, |
||||
|
||||
resetFilter: function() { |
||||
this.selectedFIlter = this.defaultFilter; |
||||
}, |
||||
parentLevel: function(t) { |
||||
var currentTarget = t.currentTarget.dataset; |
||||
//console.log("aaaaaaaaaaaaaaaaa"+a.parentlevelitem); |
||||
this.parentLevelItem = currentTarget.parentlevelitem; |
||||
}, |
||||
childLevel: function(t) { |
||||
var a = t.currentTarget.dataset, |
||||
e = this.selectedFIlter; |
||||
|
||||
this.selectedFIlterBak = e; |
||||
e[a.type] = a.id; |
||||
this.selectedFIlter = e; |
||||
}, |
||||
get_attribute: function() { |
||||
var url = this.$config.quyuList; |
||||
var data = { |
||||
type: 'consultation' |
||||
}; |
||||
|
||||
this.$Request.post(url, data).then(res => { |
||||
var e = { |
||||
price: 0 |
||||
}; |
||||
this.filter = res.data; |
||||
this.defaultFilter = e; |
||||
}); |
||||
}, |
||||
search: function() { |
||||
this.initData(); |
||||
this.get_data(); |
||||
}, |
||||
onReachScroll: function(t) { |
||||
//console.log(t); |
||||
t.detail.scrollTop > 100 ? (this.floorstatus = true) : (this.floorstatus = false); |
||||
var a = this.param; |
||||
|
||||
a.noData || a.finished || a.loading || this.get_data(); |
||||
}, |
||||
get_data: function() { |
||||
this.param.loading = true; |
||||
var that = this; |
||||
var url = this.$config.getMessageInfoFormFilter; |
||||
var data = { |
||||
title:this.searchValue, |
||||
type: this.$param.zixunType, |
||||
userkey: this.$param.userkey, |
||||
pageno: this.param.page, |
||||
pageSize: 10, |
||||
sort:"2" |
||||
}; |
||||
this.$Request.post(url, data).then(res => { |
||||
var flag = that.$util.isSuccess(res); |
||||
if (!flag) { |
||||
uni.hideLoading(); |
||||
return; |
||||
} |
||||
var listDatas = this.listDatas, |
||||
dataListLen = res.data.length; |
||||
|
||||
if ( |
||||
(dataListLen == data.pageSize ? (this.param.page += 1) : (this.param.page = 1 && 0 == dataListLen ? (this.param.noData = true) : (this.param.finished = true)), |
||||
(this.param.loading = false), |
||||
dataListLen > 0) |
||||
) { |
||||
for (var i = 0; i < dataListLen; i++) { |
||||
var logo = res.data[i].logo; |
||||
if(logo.indexOf("http") == -1){ |
||||
logo = this.rootPaht + logo; |
||||
} |
||||
var item = { |
||||
id: res.data[i].guid, |
||||
logo: logo, |
||||
title: res.data[i].title, |
||||
jointime: res.data[i].jointime |
||||
}; |
||||
this.listDatas.push(item); |
||||
|
||||
} |
||||
uni.hideLoading(); |
||||
} |
||||
}); |
||||
} |
||||
// getVideoUrl: function() { |
||||
// var data = { |
||||
// "pageno": "1", |
||||
// "pagesize": "1", |
||||
// "sort": "2", |
||||
// "region": "130101", |
||||
// "type": "2916", |
||||
// } |
||||
// this.$Request.post(this.$config.messagelist, data).then(res => { |
||||
// var data = res.data; |
||||
// for (var i = 0; i < data[0].videolist.length; i++) { |
||||
// data[0].videolist[i] = this.$config.ROOTPATH + data[0].videolist[i]; |
||||
// } |
||||
// this.topVideoList = data[0].videolist; |
||||
// this.topVideoImg = this.$config.ROOTPATH + data[0].logo; |
||||
// }) |
||||
// } |
||||
/* requestLocation:function(){ |
||||
this.longitude = 31.22; |
||||
uni.getLocation({ |
||||
type: 'wgs84', |
||||
success: function (res) { |
||||
this.longitude = res.longitude; |
||||
this.latitude = res.latitude; |
||||
|
||||
console.log('当前位置的经度:' + res.longitude); |
||||
console.log('当前位置的纬度:' + res.latitude); |
||||
} |
||||
}); |
||||
} */ |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style> |
||||
@import url('/static/css/common.css'); |
||||
@import url('zixunlist.css'); |
||||
</style> |
Loading…
Reference in new issue