Commit 8f4e7ca2 authored by huangyuanyuan's avatar huangyuanyuan
parents 1aeb99f2 aea4e5cb
......@@ -52,8 +52,8 @@ App({
let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + getApp().state.admin.token + '&' + 'key=' + '')
wx.request({
// url: 'http://192.168.2.214:8082/api/Common/Post',
// url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
url: 'https://reborn.oytour.com/api/common/post', //线上
url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
// url: 'https://reborn.oytour.com/api/common/post', //线上
// url: ' http://test.viitto.com/api/common/post',
method: 'POST',
......@@ -92,8 +92,8 @@ App({
let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + getApp().state.admin.token + '&' + 'key=' + '')
wx.request({
// url: 'http://192.168.2.214:8082/api/Common/Post',
// url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
url: 'https://reborn.oytour.com/api/common/post', //线上
url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
// url: 'https://reborn.oytour.com/api/common/post', //线上
// url: ' http://test.viitto.com/api/common/post',
method: 'POST',
......@@ -175,8 +175,8 @@ App({
let timestamp = (new Date()).valueOf()
let sign = md5('msg=' + encodeURIComponent(JSON.stringify(msg)).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + token + '&' + 'key=' + secretKey)
wx.request({
url: 'https://efficient.oytour.com/'+ url, //线上
// url: 'http://47.96.12.235:9001/' + url, //测试
// url: 'https://efficient.oytour.com/'+ url, //线上
url: 'http://47.96.12.235:9001/' + url, //测试
// url: 'http://192.168.2.215:9000/'+ url,
method: 'POST',
......@@ -224,8 +224,8 @@ App({
let timestamp = (new Date()).valueOf()
let sign = md5('msg=' + encodeURIComponent(JSON.stringify(msg)).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + token + '&' + 'key=' + secretKey)
wx.request({
url: 'https://efficient.oytour.com/'+ url, //线上
// url: 'http://47.96.12.235:9001/' + url, //测试
// url: 'https://efficient.oytour.com/'+ url, //线上
url: 'http://47.96.12.235:9001/' + url, //测试
method: 'POST',
data: {
......
......@@ -27,6 +27,7 @@
"pages/member/investigation/investigation",
"pages/member/nameList/nameList",
"pages/member/invesDetails/invesDetails",
"pages/member/Coupon/Coupon",
"pages/visa/visa",
"pages/Voucher/Voucher",
"pages/Voucher/rating/rating",
......
......@@ -7,11 +7,57 @@ Page({
*/
data: {
telPhone: '',
tcId: null,
orderId: null
tcId: 904,
orderId: null,
dataList: [],
},
goPage: function (e) {
console.log(e)
let index = e.currentTarget.dataset.index;
let name = this.data.dataList[index].nameID
let orderId = this.data.dataList[index].OrderId
wx.setStorage({
key: "info",
data: {
ID: this.data.dataList[index].Id,
nameID: name
}
})
wx.navigateTo({
url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + orderId + '&tcId=' + this.data.tcId
// url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + _this.data.orderId + '&tcId=3278'
})
return
wx.navigateTo({
url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + orderId + '&tcId=' + _this.data.tcId
// url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + _this.data.orderId + '&tcId=3278'
})
},
//问券详情跳转
Details: function (e) {
let data = {
guestMobile: this.data.telPhone,
TCID: this.data.tcId
// TCID: 3278
}
app.$api('miniProgram_price_GetGuestByPhone', data).then(res => {
let _this = this;
let data = res
for(let i = 0; i< data.length; i++){
data[i].nameID = data[i].SurName + (data[i].Sex === 1 ? '先生' : '女士');
data[i].MobilePhoneS = data[i].MobilePhone.substr(0, 3) + '****' + data[i].MobilePhone.substr(7)
}
_this.setData({
dataList: data
})
}).catch(err => {
wx.showToast({
title: err.message,
icon: 'none',
duration: 1000
})
})
return
if (!this.data.telPhone) {
wx.showToast({
title: '请输入手机号',
......@@ -19,41 +65,7 @@ Page({
duration: 1000
})
} else {
let data = {
guestMobile: this.data.telPhone,
TCID: this.data.tcId
}
app.$api('miniProgram_price_GetGuestByPhone', data).then(res => {
if (res.Id === 0) {
wx.showToast({
title: '旅客信息有误,请检查手机号',
icon: 'none',
duration: 1000
})
return
}
let _this = this;
let nameID = res.SurName + (res.Sex === 1 ? '先生' : '女士');
wx.setStorage({
key: "info",
data: {
nameID: nameID,
ID: res.Id,
}
})
this.setData({
orderId: res.OrderId
})
wx.navigateTo({
url: '/pages/Voucher/VoucherDetails/VoucherDetails?&orderId=' + _this.data.orderId + '&tcId=' + _this.data.tcId
})
}).catch(err => {
wx.showToast({
title: err.message,
icon: 'none',
duration: 1000
})
})
}
},
......@@ -70,13 +82,17 @@ Page({
onLoad: function (options) {
const scene = decodeURIComponent(options.scene)
if (scene) {
// let tcId = scene.split('=')[1] ? scene.split('=')[1] : options.tcid;
let tcId = 4006
console.log(tcId)
this.setData({
tcId: tcId
})
let tcId = scene.split('=')[1] ? scene.split('=')[1] : options.tcid;
// let tcId = 4006
// this.setData({
// tcId: tcId
// })
}else{
// this.setData({
// tcId: 3278
// })
}
this.Details()
//修改title
wx.setNavigationBarTitle({
title: '意见调查'
......
<view class='page-Voucher'>
<text class='text'>身份确认</text>
<view class='page-Voucher'>
<view class='item' wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" data-index="{{index}}" bindtap='goPage'>
<view>
<text class='name'>{{item.SurName + item.Name}}</text>
<text class='phone'>{{item.MobilePhoneS}}</text>
</view>
<image mode='widthFix' src='../../images/group/chakn.png'></image>
</view>
<!-- <text class='text'>身份确认</text>
<input bindinput='TelPhone' placeholder='请输入手机号以确认身份'></input>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button> -->
</view>
\ No newline at end of file
......@@ -2,10 +2,32 @@ page{
height: 100%
}
.page-Voucher{
padding: 162rpx 49rpx;
padding: 20rpx;
height: 100%;
background-color: white;
}
.page-Voucher .item{
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
font-size: 28rpx;
border-bottom: 1px solid #DEDEDE
}
.page-Voucher .item>view{
display: flex;
align-items: center;
}
.phone{
padding-left: 10rpx;
}
.name{
width: 250rpx;
display: inline-block;
}
.page-Voucher .item image{
width: 10rpx;
}
.page-Voucher .text{
font-size: 48rpx;
font-weight:500;
......
......@@ -64,8 +64,8 @@ Page({
})
app.$api('survey_post_SetGuestTravelNotes', msg).then(res => {
if (res.Id > 0) {
thi.setData({
ActivateCode: ActivateCode,
this.setData({
ActivateCode: res.ActivateCode,
})
}
this.setData({
......
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 0,
dropdownActive: 0,
tagBoxShow: false,
dropdown: [
{
id: 1,
name: '通用'
},
{
id: 2,
name: '跟团游'
},
{
id: 3,
name: '签证'
},
{
id: 4,
name: '机票'
},
// {
// id: 0,
// name: '当地游'
// },
// {
// id: 0,
// name: '定制游'
// },
// {
// id: 0,
// name: '酒店'
// },
],
TitList: [
{
id: 0,
Status: 1,
name: '全部优惠券'
},
{
id: 2,
Status: 1,
name: '折扣券'
},
{
id: 1,
Status: 1,
name: '抵扣券'
},
{
id: 0,
Status: 3,
name: '已过期'
},
],
msg: {
pageIndex: 1,
pageSize: 8,
useState: 1,
lineId: 0,
lineteamId: 0,
couponsName: "",
couponsType: "",
couponStatus: 1,
couponEffectStatus: 1,
couponsUseScope: 1
},
dataList: [],
pageIndex: 1,
totalPage: 1,
count: 0,
},
formSubmit: function (e) {
wx.getStorage({
key: 'admin',
success: res => {
console.log(e)
let type = e.detail.target.dataset.type;
let formId = e.detail.formId
let url = '';
if (url == 1 || type == 2) {
url = '/pages/Home/home'
} else if (type == 3) {
url = '/pages/visa/visa'
} else if (type == 4) {
url = '/pages/Ticket/Ticket'
}
app.$apiSaveFormId('survey_post_SaveFormId', { formId: formId, customerId: res.data.id }).then(res => {
}).catch(err => { })
if (url == 1 || type == 2) {
url = '/pages/Home/home'
wx.switchTab({
url: url,
})
} else if (type == 3) {
url = '/pages/visa/visa'
wx.navigateTo({
url: url,
})
} else if (type == 4) {
url = '/pages/Ticket/Ticket'
wx.navigateTo({
url: url,
})
}
}
})
},
// 加载更多
scrollGetMore: function () {
this.setData({
'msg.pageIndex': this.data.pageIndex + 1,
})
this.getList(1)
},
// 获取数据
getList: function (type) {
console.log(this.data.pageIndex, this.data.totalPage, type)
if (this.data.pageIndex >= this.data.totalPage && type) {
return
}
app.$apiJavaNew('api/b2b/user/getUserCouponAllotList', this.data.msg).then(res => {
let arr = this.data.dataList;
let arr2 = res.pageData;
if (type) {
for (let i = 0; i < arr2.length; i++) {
arr2[i].effectDate = arr2[i].effectDate.split(' ')[0]
arr2[i].expirationDate = arr2[i].expirationDate.split(' ')[0]
arr.push(arr2[i])
}
} else {
for (let i = 0; i < arr2.length; i++) {
arr2[i].effectDate = arr2[i].effectDate.split(' ')[0]
arr2[i].expirationDate = arr2[i].expirationDate.split(' ')[0]
}
arr = arr2
}
this.setData({
dataList: arr,
totalPage: res.pageCount ? res.pageCount : 1,
pageIndex: res.pageIndex ? res.pageIndex : 1,
count: res.count ? res.count : 1
})
}).catch(err => { })
},
//切换类型
setActiveTag: function (e) {
let index = e.target.id.split('active')[1]
console.log(index)
this.setData({
dropdownActive: Number(index),
tagBoxShow: false,
'msg.couponsUseScope': this.data.dropdown[Number(index)].id
})
this.getList()
},
// 切换状态
setActive: function (e) {
let index = e.target.id.split('active')[1]
this.setData({
active: Number(index),
tagBoxShow: false,
'msg.couponsType': this.data.TitList[Number(index)].id,
'msg.couponEffectStatus': Number(index) == 3 ? 3 : 1,
})
this.getList()
},
// 切换类型显示?
setShow: function () {
this.setData({
tagBoxShow: !this.data.tagBoxShow
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getList()
wx.setNavigationBarTitle({
title: '我的优惠券'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class='list-box'>
<view class='top-nav'>
<view class='left-btn'>
<text bindtap='setShow'>{{dropdown[dropdownActive].name}}</text>
<image mode='widthFix' src='../../../images/group/bx.png'></image>
</view>
<view class='right-nav'>
<scroll-view scroll-x style="width: 100%;white-space: nowrap;padding-right: 80rpx;padding-left: 147rpx;">
<view class='bottom-nav'>
<view wx:for="{{TitList}}" class='{{active == index ? "active" : ""}}' wx:for-item="item" wx:for-index="index" wx:key="index" id="active{{index}}" bindtap='setActive'>
{{item.name}}
</view>
</view>
</scroll-view>
</view>
<view wx:if="{{tagBoxShow}}" class='tab-box'>
<text wx:for="{{dropdown}}" bindtap='setActiveTag' class='tag{{index}} {{dropdownActive == index ? "active" : ""}}' wx:for-item="item" wx:for-index="index" wx:key="index" id="active{{index}}">{{item.name}}</text>
</view>
</view>
<scroll-view class='data_body' scroll-y bindscrolltolower="scrollGetMore">
<view wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" class='item {{item.couponEffectStatus!=1? "guoqi" :""}}'>
<view class='left' style="background: url({{item.couponEffectStatus!=1? '../../../images/menber/quanbg_8.png' : '../../../images/menber/quanbg_0'+ item.couponsUseScope +'.png'}}) no-repeat; background-size: 100% 100%;">
<view class='coupom_type' wx:if="{{item.couponsType == 1}}">
<view class='price' >
¥<text>{{item.denomination}}</text>
</view>
<view class='text'>
<text>抵扣券</text>
</view>
</view>
<view class='coupom_type' wx:else>
<view class='price'>
<text>{{item.denomination}}</text>折
</view>
<view class='text'>
<text>折扣券</text>
</view>
</view>
</view>
<view class='right'>
<view>
<text class='tit'>{{item.couponsName}}</text>
<block>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 1}}">通用</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 2}}">跟团游</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 3}}">签证</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 4}}">机票</text>
</block>
</view>
<view>
<text class='line'>{{item.lineName}}、{{item.lineTeamName}}</text>
</view>
<view class='last_row'>
<text class='time'>{{item.effectDate}}-{{item.expirationDate}}</text>
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-type="{{item.couponsUseScope}}">
<text class='shiyong shiyong{{item.couponsUseScope}}'>去使用</text>
</button>
</form>
</view>
</view>
</view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view>
</view>
\ No newline at end of file
page{background-color: #F8F5F5}
.data_body{
padding: 0 30rpx;
width: 100%;
height: 100VH;
padding-top: 130rpx;
}
.data_body .item{
display: flex;
padding: 24rpx;
align-items: center;
background:rgba(255,255,255,1);
border-radius:20rpx;
margin-bottom: 30rpx;
}
.data_body .item .left{
width: 146rpx;
height: 143rpx;
margin-right: 31rpx;
}
.data_body .item .right{
flex: 1;
line-height: 1rem;
}
.data_body .item .right .tit{
font-size: 28rpx;
color: #000;
padding-right: 10rpx;
}
.data_body .item .right .tag{
font-size: 24rpx;
padding: 5rpx 11rpx;
background:rgba(97,220,212,.5);
border-radius: 0 0 4rpx 4rpx;
color: #1D9890;
}
.data_body .item .right .tag.tag1{
background:rgba(31,193,62,.5);
color: #378F47;
}
.data_body .item .right .tag.tag2{
background:rgba(97,220,212,.5);
color: #1D9890;
}
.data_body .item .right .tag.tag3{
background:rgba(233,235,51,.5);
color: #B8A313;
}
.data_body .item .right .tag.tag4{
background:rgba(255,150,0,.5);
color: #BA6E01;
}
.data_body .item.guoqi .right .tag{
background:rgba(212,212,212,.5) !important;
color: #8F8F8F !important;
}
.data_body .item .right .shiyong{
font-size: 22rpx;
color: white;
padding: 11rpx 25rpx;
background:linear-gradient(133deg,rgba(38,198,165,1),rgba(97,220,212,1));
border-radius:12rpx;
}
.data_body .item.guoqi .right .shiyong{
background:linear-gradient(133deg,rgb(160, 160, 160),rgb(230, 230, 230)) !important;
}
.data_body .item .right .shiyong.shiyong1{
background:linear-gradient(133deg,rgba(31,193,62,1),rgba(90,225,154,1));
}
.data_body .item .right .shiyong.shiyong2{
background:linear-gradient(133deg,rgba(38,198,165,1),rgba(97,220,212,1));
}
.data_body .item .right .shiyong.shiyong3{
background:linear-gradient(133deg,rgba(235,211,51,1),rgba(235,243,140,1));
}
.data_body .item .right .shiyong.shiyong4{
background:linear-gradient(133deg,rgba(255,150,0,1),rgba(255,198,0,1));
}
.data_body .item .right .line{
font-size: 22rpx;
color: #666;
}
.data_body .item .right .time{
font-size: 22rpx;
color: #C2C2C2;
padding-right: 80rpx;
}
.last_row{
display: flex;
align-items: flex-end;
}
.top-nav{
position: fixed;
z-index: 10;
top: 0repx;
left: 0rpx;
width: 100%;
padding: 27rpx 0 10rpx 54rpx;
font-size: 28rpx;
color: #000000;
box-shadow:0px 2px 18px 0px rgba(177,177,177,1);
background-color: white;
}
.left-btn{
position: absolute;
padding-right: 10rpx;
border-right: 1px solid #CFCFCF;
display: flex;
align-items: center;
width: 140rpx;
}
.bottom-nav{
display: flex;
padding-left: 34rpx;
}
.bottom-nav>view{
margin-right: 43rpx;
padding-bottom: 15rpx;
border-bottom: 4rpx solid transparent;
}
.bottom-nav>view.active{
color: #EE4454;
border-bottom: 4rpx solid #EE4454;
}
.left-btn image{
width: 13rpx;
}
.left-btn text{
padding-right: 20rpx;
}
.tab-box{
display: flex;
flex-wrap:wrap;
position: relative;
left: -18rpx;
padding: 25rpx 0;
}
.tab-box text{
width: 142rpx;
height: 60rpx;
color: #000000;
background:#EEEEEE;
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
display: inline-block;
border-radius: 10rpx;
margin: 10rpx 0 20rpx 38rpx;
}
.tab-box text.active{
color: #EE4454;
background:rgba(238,68,84,.2);
}
.tab-box text.tag0,.tab-box text.tag4{
margin-left: 0;
}
.body_footer{
display: flex;
justify-content: center;
align-items: center;
height: 30px;
font-size: 12px;
color: #666666;
background-color:#F5F5F5;
}
.coupom_type{
text-align: center;
color: white
}
.coupom_type .price{
margin: 15rpx 0 0 0;
font-size: 20rpx;
}
.coupom_type .price text{
font-size: 48rpx;
}
.coupom_type .text{
font-size: 24rpx;
}
button{
padding: 0;
font-size: 22rpx;
border: none;
background-color: transparent;
}
button::after{
border: none
}
button:active{
background-color: transparent;
}
\ No newline at end of file
......@@ -143,7 +143,7 @@
</view>
<view>
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/visa/visa">
<button hover-class="btn-hover" form-type="submit" data-url="/pages/member/Coupon/Coupon">
<image mode="aspectFit" src="../../images/menber/menu-you.png"></image>
<view class='order-type-name'>我的优惠券</view>
</button>
......
......@@ -43,6 +43,20 @@ Page({
ID: 3,
}
],
TitListJiPiao: [
{
Type: "待付款",
ID: 1
},
{
Type: "正常",
ID: 2
},
{
Type: "取消",
ID: 3
}
],
tagList: [
{
id: 1,
......@@ -105,35 +119,39 @@ Page({
tagIndex: 0,
},
formSubmit: function (e) {
console.log(e)
wx.getStorage({
key: 'admin',
success: res => {
let index = e.detail.target.dataset.index;
let formId = e.detail.formId
app.$apiSaveFormId('survey_post_SaveFormId', { formId: formId, customerId: res.data.id }).then(res => {
console.log(res)
}).catch(err => { })
console.log(formId, code)
let index = e.currentTarget.dataset.index;
// let formId = e.detail.formId
// app.$apiSaveFormId('survey_post_SaveFormId', { formId: formId, customerId: res.data.id }).then(res => {
// console.log(res)
// }).catch(err => { })
this.goDetails(index)
}
})
},
endPaoPao: function () {
console.log('阻止冒泡····')
},
// 跳转详情页面
goDetails: function (e) {
let index = e,
item = this.data.dataList[index];
let orderId = item.orderId ? item.orderId : item.id
wx.setStorage({
key: "DetailsItem",
data: item
})
wx.navigateTo({
url: '/pages/member/orderDeatils/orderDeatils?tagID=' + this.data.tagID + '&tagIndex=' + this.data.tagIndex,
url: '/pages/member/orderDeatils/orderDeatils?tagID=' + this.data.tagID + '&tagIndex=' + this.data.tagIndex + '&orderId=' + orderId,
})
},
// 加载更多
scrollGetMore: function () {
this.setData({
'getOrderMsg.pageIndex': this.data.pageIndex + 1
'getOrderMsg.pageIndex': this.data.pageIndex + 1,
})
this.getOrderList(1)
},
......@@ -142,12 +160,15 @@ Page({
let url = 'api/b2b/user/getrecentorder',
tagID = this.data.tagID,
msg = this.data.getOrderMsg;
if (tagID !== 6 && tagID !== 8) {
if (tagID !== 6 && tagID !== 8 && tagID !== 4) {
// console.log(tagID)
url = 'api/b2b/user/getrecentorder'
} else{ // 8美食 6门票
} else if (tagID !== 4){ // 8美食 6门票
msg.status = msg.orderState
url = tagID == 8 ? 'api/b2b/food/getFoodOrder' : 'api/b2b/scenic/getTicketCouponsOrder'
} else {
msg.status = msg.orderState
url = 'api/b2b/user/getAirTicketOrder'
}
this.data.getOrderMsg.CustomerId = this.data.userInfo.id
if (this.data.pageIndex >= this.data.totalPage && type){
......@@ -155,7 +176,7 @@ Page({
}
app.$apiJavaNew(url, msg).then(res => {
let arr = this.data.dataList;
let arr2 = res.pageData
let arr2 = res.pageData ? res.pageData : [];
for (let i = 0; i < arr2.length; i++) {
if (tagID !== 6 && tagID !== 8) {
arr2[i].day = arr2[i].createDate.replace(/-/g, '.').substring(0, 10)
......@@ -164,6 +185,7 @@ Page({
}
}
if (type) {
console.log(type, '组装数据')
for (let i = 0; i < arr2.length; i++){
arr.push(arr2[i])
}
......@@ -172,9 +194,9 @@ Page({
}
this.setData({
dataList: arr,
totalPage: res.pageCount,
pageIndex: res.pageIndex,
count: res.count
totalPage: res.pageCount ? res.pageCount : 1,
pageIndex: res.pageIndex ? res.pageIndex : 1,
count: res.count ? res.count : 1
})
}).catch(err => { })
},
......@@ -186,8 +208,10 @@ Page({
} else {
index = Number(e.target.id.split('active')[1])
}
if (this.data.tagList[index].name !== '美食' && this.data.tagList[index].name !== '门票'){
if (this.data.tagList[index].name !== '美食' && this.data.tagList[index].name !== '门票' && this.data.tagList[index].name !== '机票'){
TitList = this.data.TitListTc
} else if ( this.data.tagList[index].name == '机票'){
TitList = this.data.TitListJiPiao
} else {
TitList = this.data.TitListMenJi
}
......@@ -198,7 +222,7 @@ Page({
pageIndex: 1,
TitList: TitList,
tagID: this.data.tagList[index].id,
tagIndex: index
tagIndex: index + 1
})
this.getOrderList()
},
......@@ -222,14 +246,23 @@ Page({
*/
onLoad: function (options) {
let userInfo = wx.getStorageSync('admin');
let index = options.index ? Number(options.index) : null
// console.log(index,this.data.tagList[index-1])
let index = options.index ? Number(options.index) : 1
let TitList = [];
if (this.data.tagList[index - 1].name !== '美食' && this.data.tagList[index - 1].name !== '门票' && this.data.tagList[index - 1].name !== '机票') {
TitList = this.data.TitListTc
} else if (this.data.tagList[index - 1].name == '机票') {
TitList = this.data.TitListJiPiao
} else {
TitList = this.data.TitListMenJi
}
if (index) {
this.setData({
tagBoxActive: index - 1,
userInfo: userInfo,
TitList: this.data.TitListTc,
TitList: TitList,
tagID: this.data.tagList[index - 1].id,
'getOrderMsg.orderType': this.data.tagList[index - 1].id,
tagIndex: index
})
}else{
this.setData({
......
......@@ -18,10 +18,10 @@
</view>
</view>
<scroll-view class='data_body' scroll-y bindscrolltolower="scrollGetMore">
<view wx:if="{{tagID !== 6 && tagID !== 8}}">
<view wx:if="{{tagID !== 6 && tagID !== 8 && tagID !== 4}}">
<view class='list-item' wx:for="{{dataList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/member/orderCenter/orderCenter" data-index='{{index}}'>
<!-- <form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/member/orderCenter/orderCenter" data-index='{{index}}'> -->
<text class='list-item-tag {{tagList[tagBoxActive].Class}}'>{{tagList[tagBoxActive].name}}</text>
<view class='list-item-states'>
<text wx:if="{{item.orderState == 1}}">待付定金</text>
......@@ -30,7 +30,7 @@
<text wx:elif="{{item.orderState == 4}}">交易完成</text>
<text wx:elif="{{item.orderState == 5}}">取消</text>
</view>
<view class='list-item-info' data-index='{{index}}' bindtap='goDetails'>
<view class='list-item-info' data-index='{{index}}' bindtap='formSubmit'>
<view class='list-item-name'>{{item.title}}</view>
<view class='list-item-detail'>
<view class='list-item-detail-left'>
......@@ -43,18 +43,18 @@
<view class='list-item-btn'>
<view wx:if="{{item.orderState == 1}}">联系客服</view>
<view wx:if="{{item.orderState == 3 || item.orderState == 2}}">取消订单</view>
<view wx:if="{{item.orderState == 1 || item.orderState == 2}}" class='btn-red'>付款</view>
<view wx:if="{{item.orderState == 1 || item.orderState == 2}}" catchtap="endPaoPao" class='btn-red'>付款</view>
<!-- <view class='btn-red'>确认收货</view> -->
<view class='btn-red' wx:if="{{item.orderState == 5 || item.orderState == 4}}">再次购买</view>
</view>
</button>
</form>
<!-- </button>
</form> -->
</view>
</view>
<view wx:elif="{{tagID ==8}}">
<view class='list-item' wx:for="{{dataList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/member/orderCenter/orderCenter" data-index='{{index}}'>
<!-- <form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-url="/pages/member/orderCenter/orderCenter" data-index='{{index}}'> -->
<text class='list-item-tag {{tagList[tagBoxActive].Class}}'>{{tagList[tagBoxActive].name}}</text>
<view class='list-item-states'>
<text wx:if="{{item.status == 1}}">正常</text>
......@@ -77,21 +77,21 @@
<view wx:if="{{item.status == 3}}" class='btn-red'>付款</view>
<view class='btn-red' wx:if="{{item.orderState == 1}}">再次购买</view>
</view>
</button>
</form>
<!-- </button>
</form> -->
</view>
</view>
<view wx:elif="{{tagID ==6}}">
<view class='list-item' wx:for="{{dataList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-index='{{index}}'>
<!-- <form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-index='{{index}}'> -->
<text class='list-item-tag {{tagList[tagBoxActive].Class}}'>{{tagList[tagBoxActive].name}}</text>
<view class='list-item-states'>
<text wx:if="{{item.status == 1}}">正常</text>
<text wx:elif="{{item.status == 2}}">取消</text>
<text wx:elif="{{item.status == 3}}">待付款</text>
</view>
<view class='list-item-info' data-index='{{index}}' bindtap='goDetails'>
<view class='list-item-info' data-index='{{index}}' bindtap='formSubmit'>
<view class='list-item-name'>{{item.couponsName}}</view>
<view class='list-item-detail'>
<view class='list-item-detail-left'>
......@@ -107,10 +107,46 @@
<view wx:if="{{item.status == 3}}" class='btn-red'>付款</view>
<view class='btn-red' wx:if="{{item.orderState == 1}}">再次购买</view>
</view>
</button>
</form>
</view>
<!-- </button>
</form> -->
</view>
</view>
<view wx:elif="{{tagID == 4}}">
<view class='list-item' wx:for="{{dataList}}" wx:for-item="item" wx:key="index" wx:for-index="index">
<!-- <form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-index='{{index}}'> -->
<text class='list-item-tag {{tagList[tagBoxActive].Class}}'>{{tagList[tagBoxActive].name}}</text>
<view class='list-item-states'>
<text wx:if="{{item.orderState == 2}}">正常</text>
<text wx:elif="{{item.orderState == 3}}">取消</text>
<text wx:elif="{{item.orderState == 1}}">待付款</text>
</view>
<view class='list-item-info' data-index='{{index}}' bindtap='formSubmit'>
<view class='list-item-name' wx:if="{{item.airticket.ticketType==2}}">
<text>往:{{item.airticket.goStartCityName}} - {{item.airticket.goEndCityName}}</text>
<text style='color: #fff;'>......</text>
<text>返:{{item.airticket.backStartCityName}} - {{item.airticket.backEndCityName}}</text>
</view>
<view wx:else>
{{item.airticket.goStartCityName}} - {{item.airticket.goEndCityName}}
</view>
<view class='list-item-detail'>
<view class='list-item-detail-left'>
<text>{{item.guestNum+'张'}}</text>
<text>{{item.day}}</text>
</view>
<view>¥{{item.preferPrice}}</view>
</view>
</view>
<view class='list-item-btn'>
<view wx:if="{{item.orderState == 1}}">联系客服</view>
<view wx:if="{{item.orderState == 1}}">取消订单</view>
<view wx:if="{{item.orderState == 1}}" class='btn-red'>付款</view>
<view class='btn-red' wx:if="{{item.orderState == 2}}">再次购买</view>
</view>
<!-- </button>
</form> -->
</view>
</view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view>
......
......@@ -125,6 +125,7 @@ page{background-color: #F8F5F5}
font-size: 15px;
}
.list-item-name{
text-align: left;
width: 484rpx;
color: #333;
overflow: hidden;
......
// pages/member/orderDeatils/orderDeatils.js
let app = getApp()
Page({
/**
......@@ -6,7 +6,7 @@ Page({
*/
data: {
tagID: 0,
datilse: {},
details: {},
tagBoxActive: 0,
tagName: '',
tagList: [
......@@ -52,23 +52,54 @@ Page({
},
],
},
getDetailse: function (url, orderId, index) {
console.log(index)
let msg = {
orderType: index,
orderId: orderId
}
app.$apiJavaNew(url, msg).then(res => {
this.setData({
details: res
})
}).catch(err => { })
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let _this = this;
wx.getStorage({
key: 'DetailsItem',
success: function (res) {
_this.setData({
datilse: res.data,
tagID: options.tagID,
tagBoxActive: Number(options.tagIndex),
tagName: _this.data.tagList[Number(options.tagIndex)].name
})
},
let index = Number(options.tagIndex);
let url = '';
if (index == 4){ // 机票
url = 'api/b2b/user/getAirTicketOrderDetail'
_this.getDetailse(url, options.orderId, index)
} else if (index == 5){ //签证
url = 'api/b2b/visa/getVisaOrderDetail'
_this.getDetailse(url, options.orderId, index)
} else if (index == 6) { // 门票
url = 'api/b2b/scenic/getTicketCouponsOrderDetail'
_this.getDetailse(url, options.orderId, index)
} else if (index == 8) { // 美食 读取缓存数据
console.log('美食1')
wx.getStorage({
key: 'DetailsItem',
success: function (res) {
_this.setData({
details: res.data,
})
},
})
} else {
// 1:跟团游 2:自由行 3:当地游 7: 定制游
url = 'api/b2b/user/getrecentOrderDetail'
_this.getDetailse(url, options.orderId, index)
}
console.log(index,"荷藕")
_this.setData({
tagBoxActive: index -1,
tagName: _this.data.tagList[index - 1].name
})
wx.setNavigationBarTitle({
title: '订单详情'
......
This diff is collapsed.
......@@ -39,23 +39,8 @@
"list": []
},
"miniprogram": {
"current": 2,
"current": 9,
"list": [
{
"id": -1,
"name": "产品",
"pathName": "pages/product/product",
"query": "",
"scene": "1001"
},
{
"id": -1,
"name": "个人中心",
"pathName": "pages/mine/mine",
"query": "",
"scene": "1036",
"referrerInfo": {}
},
{
"id": 2,
"name": "写游记",
......@@ -67,7 +52,7 @@
"id": 3,
"name": "调查",
"pathName": "pages/Voucher/Voucher",
"query": "tcid=4006",
"query": "",
"scene": null
},
{
......@@ -118,6 +103,13 @@
"pathName": "pages/member/invesDetails/invesDetails",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的票券",
"pathName": "pages/member/Coupon/Coupon",
"query": "",
"scene": null
}
]
}
......
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