Commit 133dfa04 authored by 沈良进's avatar 沈良进

111

parent 35fd2c8b
......@@ -2,6 +2,7 @@
<view class="content">
<scroll-view
:scroll-y="true"
:scroll-top="scrollTop" @scroll="scroll"
style="height: 100%; flex: 1; box-sizing: border-box"
>
<view class="header">
......@@ -54,7 +55,7 @@
</view>
</view>
<view class="section">
<view v-for="(res, line) in resDate" class="item" :key="line">
<view v-for="(res, line) in resDate" :id="`month${line}`" class="item" :key="line">
<view class="year">{{ res.year }}{{ res.month }}</view>
<view class="day">
<view
......@@ -147,6 +148,10 @@ import json from "./day.js";
export default {
props: {
showPop: {
type: Boolean,
default: false,
},
priceList: {
type: Array,
default: [],
......@@ -212,12 +217,17 @@ export default {
}
}
}
setTimeout(()=>{
this.scrollTop = 370 * this.monthInto + this.dayInfo * 20
},500)
return this.date;
},
},
data() {
return {
oldScrollTop: 0,
scrollTop: 0,
monthInto: null,
out: 0,
festival: json, //节假日
type: "-", //日期分隔符
......@@ -257,7 +267,9 @@ export default {
uni.setNavigationBarTitle({
title: "",
});
// #endif
},
watch: {
......@@ -285,13 +297,11 @@ export default {
}
if (this.priceStauts.length > 0) {
console.log(this.lastNot);
for (var i = newVal[0]; i < this.priceStauts.length; i++) {
if (i == newVal[0]) {
for (var j = newVal[1]; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j];
console.log(this.lastNot);
return;
}
}
......@@ -299,7 +309,6 @@ export default {
for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j];
console.log(this.lastNot);
return;
}
}
......@@ -311,10 +320,21 @@ export default {
},
},
methods: {
scroll: function(e) {
this.oldScrollTop = e.detail.scrollTop; // 必要
},
goTop: function(e) {
this.scrollTop = this.oldScrollTop
this.$nextTick(function() {
this.scrollTop = 0
});
},
initPrice() {
//年份
var year = new Date().getFullYear();
let data = [];
this.monthInto = null
this.scrollTop = 0
//月份
var month = new Date().getMonth();
for (let i = 0; i < this.count; i++) {
......@@ -326,6 +346,11 @@ export default {
let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
if (x.startDate == `${year}-${m}-${d}`) {
// 记录第一个游价格的日期的位置
if(!this.monthInto) {
this.monthInto = data.length
this.dayInfo = d % 7
}
isexsit = true;
if (x.remainNum > 0) {
// days.push(this.$utils.getretailer() ? x.b2BPrice : x.b2CPrice);
......@@ -573,7 +598,6 @@ export default {
//月份
var month = new Date().getMonth();
console.log("执行了...");
for (let i = 0; i < this.count; i++) {
var day = [];
var week = 0;
......@@ -629,7 +653,6 @@ export default {
};
let tempPrice = {};
this.priceList.forEach((x, i) => {
console.log(x.startDate, obj.start);
if (obj.start == x.startDate) {
obj.priceObj = i;
}
......
......@@ -428,10 +428,10 @@
</view>
<view
class="jz_TripDays"
v-if="
dataList.feature &&
v-if="imgList.length ||
(dataList.feature &&
dataList.feature.tripImageList &&
dataList.feature.tripImageList.length > 0
dataList.feature.tripImageList.length > 0)
"
>
<span
......@@ -472,6 +472,14 @@
style="width: 100%"
></image>
</view>
<view class="jz_TripMain">
<image
v-for="x in imgList"
:src="x"
mode="widthFix"
style="width: 100%"
></image>
</view>
</view>
<view
class="jz_TripDays"
......@@ -580,30 +588,32 @@
<view class="jz_Place">
<view class="jz_ComDian"></view>
<text class="jz_Canyin">餐饮</text>
<text class="jz_CanInner">
<view class="jz_CanInner">
<template
v-for="(subItem, sIndex2) in item.dayArray"
v-if="subItem.type == 4"
>
<text
<view><text
style="margin-right: 20px"
:key="sIndex2"
v-if="subItem.childItem.useDinnerType == '1'"
>早餐:{{ subItem.childItem.dinnerName }}</text
>
></view>
<view>
<text
style="margin-right: 20px"
v-if="subItem.childItem.useDinnerType == '2'"
>午餐:{{ subItem.childItem.dinnerName }}</text
>
></view>
<view>
<text v-if="subItem.childItem.useDinnerType == '3'"
>晚餐:{{ subItem.childItem.dinnerName }}</text
>
></view>
</template>
</text>
</view>
</view>
<view class="jz_Place">
<view class="jz_ComDian"></view>
<view v-if="item.type3" class="jz_ComDian"></view>
<text v-if="item.type3" class="jz_Canyin">酒店</text>
<text class="jz_CanInner">
<template
......@@ -849,13 +859,14 @@
flex-direction: column;
"
>
<view style="flex: 1; width: 100%; height: 1rpx">
<view style="flex: 1; width: 100%; height: 1rpx" v-if="showOrderPreviwe">
<canlendar
@finish="chosenDateResult"
:showPop="isSHowDate"
:immediately="true"
:defaultDate="currentPrice.startDate"
:priceList="dataList.priceList"
title="确定日期和人数"
title="确定日期和人数22222"
></canlendar>
</view>
<view style="background: #ecf1f4; padding: 20rpx 0">
......@@ -1053,9 +1064,11 @@ export default {
},
data() {
return {
imgList: [],
pageTitle: "线路详情",
showDateChosen: false,
showOrderPreviwe: false,
isSHowDate: false,
crCount: 1,
etCount: 0,
yeCount: 0,
......@@ -1121,6 +1134,7 @@ export default {
this.U = uni.getStorageSync("mall_UserInfo");
if (this.U) {
this.getLXYProductSharf()
this.getImgList()
}
let that = this;
uni.getSystemInfo({
......@@ -1209,6 +1223,9 @@ export default {
openOrderPreview() {
if (this.canCreateOrder && this.finishFirstLoad) {
this.showOrderPreviwe = true;
this.$nextTick(() => {
this.isSHowDate = true
})
}
},
chosenDateResult(result) {
......@@ -1279,6 +1296,21 @@ export default {
},
(err) => {
}
);
},
getImgList(){//获取显示返佣金额
this.request4(
{
url: "/Home/GetTripImage",
method: 'Get',
data:{configId:this.delMsg.configId},
},
(res) => {
this.imgList = res.OtherFile || [];
},
(err) => {
}
);
},
......@@ -1297,7 +1329,6 @@ export default {
this.dataList = res.data;
this.scenicNum = 0;
//this.dataList.productRecommend=this.dataList.productRecommend.split('\n').join('&hc')
console.log(this.dataList.productRecommend);
this.dataList.dayList.forEach((x) => {
x.type6 = false
x.type4 = false
......@@ -1331,8 +1362,6 @@ export default {
});
});
this.currentPrice = this.dataList.currentPriceInfo;
console.log('this.dataList>>>',this.dataList);
if (this.currentPrice.remainNum == 0) {
let temp = this.dataList.priceList.find((x) => x.remainNum > 0);
if (temp) {
......@@ -1973,8 +2002,8 @@ export default {
background-color: #dfbe6e;
border-radius: 50%;
position: absolute;
left: -17.6px;
top: 4px;
left: -34rpx;
top: 10rpx;
}
.jz_ImgDiv {
......
......@@ -6,6 +6,7 @@ export default {
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
// Vue.prototype.host3 = "http://192.168.20.17:8015"
Vue.prototype.host3 = "https://reborn.oytour.com"
Vue.prototype.host4 = "https://upload.oytour.com"
Vue.prototype.request = function (param, success, failed) {
//网络请求
......@@ -75,6 +76,27 @@ export default {
}
});
}
Vue.prototype.request4 = function (param, success, failed) {
//网络请求
uni.request({
url: this.host4 + param.url,
method: param.method || "Post",
header: param.header || {
'content-type': "application/json"
},
data: param.data,
success: res => {
success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
//请求app接口
Vue.prototype.apipost = function (cmd, msg, success, failed) {
var postData = this.GetPostData(cmd, msg, "");
......
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