Commit 7ffe602e authored by zhengke's avatar zhengke

修改

parent b00a64d7
......@@ -582,6 +582,13 @@
}
}]
},
//九寨沟分包
{
"root": "pages/jiuzhai",
"pages": [{
"path":"jz_Line" //九寨-线路
}]
},
//相亲分包
{
"root": "pages/blindDate",
......
<style>
.jz_Line {}
.jz_Content {
margin: 30rpx 30rpx 0 30rpx;
}
.jz_List {
display: flex;
justify-content: space-between;
}
.jz_TuDiv {
width: 280rpx;
height: 220rpx;
border-radius: 6px;
overflow: hidden;
position: relative;
}
.jz_TuDiv .jz_TuBigImg {
width: 100%;
height: 100%
}
.jz_Right {
width: 380rpx;
margin-top: 5px;
font-size: 14px;
}
.jz_LineName {
color: #111111;
font-size: 30rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 600;
}
.jz_Canhoubu {
color: #FF3166;
margin-left: 10px;
}
.jz_redType {
color: #FF3166;
}
.jz_TuDivBotm {
position: absolute;
width: 100%;
height: 18px;
text-align: center;
bottom: 0;
color: #fff;
font-size: 12px;
line-height: 18px;
background-color: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
}
.jz_Remark {
width: 100%;
font-size: 13px;
background-color: #f1f0f0;
padding: 10px;
}
.op_remark {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.jz_ListMain {
padding-bottom: 10px;
border-bottom: 1px solid #d1d1d1;
margin-bottom: 10px;
}
.jz_TuDivBotm img {
width: 12px;
height: 12px;
margin-right: 5px;
}
.jz_calederImg {
width: 16px;
height: 16px;
position: relative;
top: 2px;
margin-right: 5px;
}
.jz_Sort {
width: 100%;
/* justify-content: space-between;
display: flex;
*/
margin: 20px 0;
}
.jz_SortItem {
display: inline-block;
width: 25%;
text-align: center;
}
.Jz_tanchu {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background: #FFF;
position: absolute;
top: 100px;
left: 0;
z-index: 1999;
}
.Jz_tanchu_item {
width: 94%;
margin-left: 3%;
height: 45px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #f1f1f1;
}
.Jz_Mask {
width: 100%;
height: 100%;
background: #000000;
opacity: 0.3;
position: absolute;
left: 0;
top: 130px;
z-index: 999;
}
</style>
<template>
<div class="jz_Line" >
<view class="jz_Content">
<u-search placeholder="目的地,旅游线路" shape="round" v-model="searchKey" input-align="left" :value="searchKey" text-color="#111"
:show-action="false"></u-search>
<view class="jz_Sort">
<view class="jz_SortItem">价格</view>
<view class="jz_SortItem">团期</view>
<view class="jz_SortItem" @click="screenshow=true">线路</view>
<view class="jz_SortItem" @click="isShowDate=true">日期</view>
</view>
<view v-if="screenshow==true" class="Jz_tanchu">
<scroll-view :scroll-y="true" :enable-back-to-top="true" style="max-height: 321px;">
<view class="Jz_tanchu_item" v-for="(item, index) in lineList" :key="index" @click="onItemSelect(item)">
<view style="display: flex;flex-direction: row;align-items: center;">
<span>{{item.label}}</span>
</view>
<u-icon name="success" :color="mainColor" size="30"></u-icon>
</view>
</scroll-view>
</view>
<view v-if="screenshow==true" class="Jz_Mask" @click="screenshow=false"></view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<template v-else>
<view style="height: calc(100vh - 120px);overflow: hidden;">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
<view class="jz_ListMain" v-for="(item,index) in dataList" :key="index">
<view class="jz_List">
<view class="jz_TuDiv">
<img class="jz_TuBigImg" src="http://imgfile.oytour.com/Upload/DMC/20200603030333648.jpg?x-oss-process=image/resize,l_140"
alt="" />
<view class="jz_TuDivBotm">
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/address.png" />成都出发
{{item.dayNum}}
</view>
</view>
<view class="jz_Right">
<view class="jz_LineName">{{item.title}}</view>
<view style="margin:10px 0">
<img class="jz_calederImg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/canlder.png" />{{item.startDate}}<text
class="jz_Canhoubu">不可候补</text>
</view>
<view style="margin-bottom:10px">航班:<text></text>(余位:10)</view>
<view>
同业价:<text class="jz_redType">{{item.b2BPrice}}</text>
<text style="margin-left:10px;">统一售价:<text class="jz_redType">{{item.b2CPrice}}</text></text>
</view>
</view>
</view>
<view class="jz_Remark">
<view class="op_remark" style="margin-bottom:10px;">OP备注:1不占床小孩收费1不占床小孩收费1不占床小孩收费1不占床小孩收费</view>
<view class="op_remark">本团卖点:1不占床小孩收费1不占床小孩收费1不占床小孩收费1不占床小孩收费</view>
</view>
</view>
</scroll-view>
</view>
</template>
</view>
<u-picker mode="time" v-model="isShowDate" @confirm='getStratDate' :params="params"></u-picker>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
pageTitle: '线路',
msg: {
pageIndex: 1,
pageSize: 15
},
time: '',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
dataList: [], //数据
searchKey: '', //搜索数据
value1: 1,
isShowDate: false,
delMsg: {
tcid: 10964
},
lineList: [{
label: '出境日本线',
value: 1,
},
{
label: '国内线',
value: 2,
}
],
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
screenshow: false,
status: "加载中",
page_count:0
};
},
created() {
this.getList();
this.getDetails();
},
methods: {
//获取数据
getList() {
this.apipost(
"b2b_get_GetB2BHomeLineTravelPageList",
this.msg,
res => {
if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData);
this.page_count = res.data.pageCount;
console.log(this.dataList, 'dataList');
} else {
}
},
null
);
},
//获取详情
getDetails() {
this.apipost(
"b2b_get_GetB2BTravelInfoNoDes",
this.delMsg,
res => {
console.log(res, '详情');
if (res.data.resultCode == 1) {
} else {
}
},
null
);
},
//获取日期
getStratDate(val) {
console.log(val, 'val');
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.getList();
} else {
this.status = "nomore";
}
},
},
};
</script>
......@@ -2,11 +2,14 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.1.5:8088"
Vue.prototype.host2 = "http://192.168.20.17:8014"
// Vue.prototype.host2 = "http://192.168.1.13:8088"
// Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue.prototype.host3 = "http://reborn.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.24"
Vue.prototype.request = function(param, success, failed) {
//网络请求
......@@ -76,41 +79,108 @@ export default {
}
});
}
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0;
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword :
0;
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : '';
this.request2({
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId: SmallShopId,
UserPageType: Up,
CounponPassword: CounponPassword,
KeyWord: KeyWord,
}
//请求app接口
Vue.prototype.apipost = function(cmd, msg, success, failed) {
var postData = this.GetPostData(cmd, msg, "");
uni.request({
url: this.host3+'/api/common/post',
method: "Post",
header: {
'Content-Type': 'application/json'
//'Referer-Viitto': this.$route.path
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
uni.removeStorageSync("Up");
uni.removeStorageSync("CounponPassword");
uni.removeStorageSync("KeyWord");
data: postData,
success: res => {
if (res.data.resultCode == 10000) {
let u = uni.getStorageSync("mall_UserInfo");
if (u) {
this.getLogin_t(u)
typeof failed == "function" && failed(res.data);
}
} else if (res.data.resultCode != 1) {
if (res.data.message != '') {
uni.showToast({
title: res.data.message,
icon: "none",
});
}
typeof failed == "function" && failed(res.data);
} else {
typeof success == "function" && success(res.data);
}
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
);
}
})
},
//获取请求参数
Vue.prototype.GetPostData = function(cmd, msg) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
var token = "";
var key = "";
var MallBaseId = 1; //小程序ID
var TenantId = 1; //商户Id
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: '',
languageId: 0,
cmd: cmd,
MallBaseId: MallBaseId,
TenantId: TenantId,
version:''
}
return postData
},
// token失效再次登录接口
Vue.prototype.getLogin_t = function(obj) {
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0;
let CounponPassword = uni.getStorageSync("CounponPassword") ? uni.getStorageSync("CounponPassword").CounponPassword :
0;
let KeyWord = uni.getStorageSync("KeyWord") ? uni.getStorageSync("KeyWord").KeyWord : '';
this.request2({
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: obj.OpenId,
Name: obj.Name,
Photo: obj.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId: SmallShopId,
UserPageType: Up,
CounponPassword: CounponPassword,
KeyWord: KeyWord,
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
uni.removeStorageSync("Up");
uni.removeStorageSync("CounponPassword");
uni.removeStorageSync("KeyWord");
}
}
);
}
// 获取小程序APPID
Vue.prototype.GetMiniAppId = function() {
let appObj = {};
......@@ -159,21 +229,21 @@ export default {
};
break;
case 7:
appObj = {//韩国馆
appObj = { //韩国馆
AppId: 'wxbb033190e0ffa5db',
TenantId: 18,
MallBaseId: 8,
};
break;
case 8:
appObj = {//恋爱星球
appObj = { //恋爱星球
AppId: 'wx681f8ad58e6c48e4',
TenantId: 21,
MallBaseId: 11,
};
break;
case 9:
appObj = {//罗演的杂货铺
appObj = { //罗演的杂货铺
AppId: 'wx67a8fb290ec58af4',
TenantId: 20,
MallBaseId: 10,
......
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