Commit 9de7d4dd authored by 潘永坪's avatar 潘永坪

组合票跳转修改

parent e07e2db3
......@@ -139,12 +139,6 @@
"enablePullDownRefresh": false
}
}, {
"path": "pages/payment/changeNumPayment/changeNumPayment",
"style": {
"navigationBarTitleText": "支付",
"enablePullDownRefresh": false
}
},
{
"path": "pages/indexs/center/center",
......
......@@ -11,7 +11,7 @@
<view class="middle">
<view class="tabbar">
<view @click="jumpPage(item.projectLinkUrl)" v-for="(item,index) in iconList" :key='index'>
<view @click="jumpPage(item.projectLinkUrl)" v-for="(item,index) in iconList" :key='index' v-show="item.projectStatus==0">
<image :src="item.projectImgUrl"></image>
<view>
{{item.merchantExtendProjectName}}
......@@ -181,7 +181,44 @@ export default {
image: 'http://wx.pangdly.com/static/img/home3.df60ec3.jpg'
}
],
iconList:[],//图标列表
iconList:[//图标列表
{
merchantExtendProjectName:'景区名称',
projectImgUrl:'/static/img/index/classify1.png',
projectLinkUrl:'/pages/scenic/scenicIndex/scenicIndex',
projectStatus:0
},
{
merchantExtendProjectName:'酒店民宿',
projectImgUrl:'/static/img/index/classify2.png',
projectLinkUrl:'/pages/hotel/hotelIndex/hotelIndex',
projectStatus:0
},
{
merchantExtendProjectName:'周边游',
projectImgUrl:'/static/img/index/classify4.png',
projectLinkUrl:'/pages/scenic/scenicIndex/scenicIndex',
projectStatus:0
},
{
merchantExtendProjectName:'跟团游',
projectImgUrl:'/static/img/index/classify5.png',
projectLinkUrl:'/pages/scenic/scenicIndex/scenicIndex',
projectStatus:0
},
{
merchantExtendProjectName:'亲子游',
projectImgUrl:'/static/img/index/classify6.png',
projectLinkUrl:'/pages/scenic/scenicIndex/scenicIndex',
projectStatus:0
},
{
merchantExtendProjectName:'行程订制',
projectImgUrl:'/static/img/index/classify7.png',
projectLinkUrl:'/pages/my/travelList/travelList/travelList',
projectStatus:0
}
],
}
},
onLoad(option){
......@@ -226,7 +263,7 @@ export default {
}
this.$request('scenic/merchantExtendProject/loadList',data).then((res)=>{
if(res.code=='00'){
this.iconList=res.data||[]
this.iconList=res.data
}
})
},
......
......@@ -23,13 +23,12 @@ export default {
methods:{
//---登录
login(){
let _this = this
uni.getProvider({
service: 'oauth',
success(proRes) {
success:proRes=>{
uni.login({
provider: proRes.provider[0],
success: function(res) {
success:res=> {
if (res.code) {
let source = ''
if (proRes.provider[0] == 'weixin') {
......@@ -45,13 +44,13 @@ export default {
if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||''
}
_this.$request('wechat/wx/getUserInfoByCode', data).then(res => {
this.$request('wechat/wx/getUserInfoByCode', data).then(res => {
if (res.code == '00') {
let openid = res.data.openid
uni.setStorageSync('openid', openid)
let userId = res.data.userId || ''
let datas = { openid, source, userId }
_this.$request('wechatUser/login/findWxUserAndLogin', datas).then(res => {
this.$request('wechatUser/login/findWxUserAndLogin', datas).then(res => {
//通过openid获取token
if (res.code == '00') {
let token = res.data.token || ''
......@@ -71,7 +70,7 @@ export default {
url: '/' + enterOptions.path + '?' + queryTotal
})
//保存当前日期
let oldDate=_this.$commonjs.today()
let oldDate=this.$commonjs.today()
uni.setStorageSync('oldDate', oldDate)
// uni.navigateBack({
// delta:1
......@@ -88,8 +87,8 @@ export default {
title: '登录失败,请退出并重新登录',
icon: 'none'
})
_this.timer = setTimeout(() => {
_this.login()
this.timer = setTimeout(() => {
this.login()
}, 2000)
})
} else {
......@@ -103,8 +102,8 @@ export default {
title: '登录失败,请退出并重新登录',
icon: 'none'
})
_this.timer = setTimeout(() => {
_this.login()
this.timer = setTimeout(() => {
this.login()
}, 2000)
})
}
......
<template>
<!-- 传入价格,通过改变数量改变价格的支付页面 -->
<view class="wrap">
<view class="top">
<view class="name">
皇冠大扶梯
</view>
<view class="number">
<text>
购买数量
</text>
<u-number-box
v-model="buyNumber"
bg-color='#3688FF'
color='#ffffff'
:input-height="60"
size='28'>
</u-number-box>
</view>
<view class="price">
<text>
总价
</text>
<text>
¥6.00
</text>
</view>
<view class="remark">
<input placeholder="添加备注(20字以内)" maxlength="20" v-model.trim="remark" style="margin-bottom:20rpx;" />
</view>
<view class="tips">
温馨提示:请核对以上付款金额、付款对象等信息与交易匹配。
</view>
</view>
<view class="bottom">
<text class="btn">立即支付</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
remark:'',//备注
payType:'',//支付方式
buyNumber:'',//购买数量
}
},
onLoad(option) {
//#ifdef MP-WEIXIN
this.payType = 42
//#endif
//#ifdef MP-ALIPAY
this.payType = 33
//#endif
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.wrap{
height: 100%;
background: #ffffff;
}
.top{
padding: 40rpx 24rpx;
}
.name{
font-size: 32rpx;
font-weight: bold;
color: #191919;
text-align: center;
}
.number{
display: flex;
justify-content: space-between;
font-weight: bold;
margin-top: 80rpx;
align-items: center;
}
.price{
display: flex;
justify-content: space-between;
font-weight: bold;
margin-top: 48rpx;
text:nth-child(2){
font-size: 40rpx;
color: $red;
}
}
.remark{
margin-top: 48rpx;
color: $grey;
}
.tips{
margin-top: 24rpx;
color: $grey;
font-size: 24rpx;
}
.bottom{
position: fixed;
width: 100%;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
bottom: 0;
box-shadow: 0px -4px 12px 2px rgba(0,0,0,0.08);
background: #ffffff;
}
.btn{
display: flex;
align-items: center;
justify-content: center;
width: 90%;
height: 80rpx;
background: #3688FF;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: bold;
}
</style>
......@@ -97,13 +97,12 @@ export default {
methods: {
login() {
//---登录
let _this = this
uni.getProvider({
service: 'oauth',
success(proRes) {
success:proRes=>{
uni.login({
provider: proRes.provider[0],
success: function(res) {
success: res=>{
if (res.code) {
let source = ''
if (proRes.provider[0] == 'weixin') {
......@@ -119,12 +118,12 @@ export default {
if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||''
}
_this.$request('wechat/wx/getUserInfoByCode', data)
this.$request('wechat/wx/getUserInfoByCode', data)
.then(res => {
if (res.code == '00') {
_this.openid = res.data.openid
uni.setStorageSync('openid', _this.openid)
_this.initDetail()
this.openid = res.data.openid
uni.setStorageSync('openid', this.openid)
this.initDetail()
} else {
uni.showToast({
title: res.message,
......@@ -203,7 +202,6 @@ export default {
},
goPay() {
//-------------------------------------------------------去支付
let _this = this
if (this.errorMessage) {
uni.showToast({
title: this.errorMessage,
......@@ -224,9 +222,9 @@ export default {
package: this.package,
signType: this.signType,
paySign: this.paySign,
success: function(res) {
success:res=>{
uni.navigateTo({
url: '/pages/payment/paySuccess/paySuccess?orderId=' + _this.orderId+'&afterBuyUrl=' + _this.afterBuyUrl + '&ifyukuaiCode=' + _this.ifyukuaiCode
url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId+'&afterBuyUrl=' + this.afterBuyUrl + '&ifyukuaiCode=' + this.ifyukuaiCode
})
},
fail: function(err) {
......@@ -242,9 +240,9 @@ export default {
uni.requestPayment({
provider: 'alipay', // 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo: this.orderInfo, // 支付宝订单号
success: function(res) {
success: res=> {
uni.navigateTo({
url: '/pages/payment/paySuccess/paySuccess?orderId=' + _this.orderId+'&afterBuyUrl=' + _this.afterBuyUrl + '&ifyukuaiCode=' + _this.ifyukuaiCode
url: '/pages/payment/paySuccess/paySuccess?orderId=' + this.orderId+'&afterBuyUrl=' + this.afterBuyUrl + '&ifyukuaiCode=' + this.ifyukuaiCode
})
},
fail: function(err) {
......
This diff is collapsed.
......@@ -57,14 +57,22 @@ export default {
let data = {
orderId: this.orderId
}
this.$request('order/order/getStatusById', data).then((res) => {
this.$request('order/userOrder/getStatusById', data).then((res) => {
if (res.code == '00') {
this.status = res.data
//如果是组合票,直接跳订单列表页面
let orderType=res.data.orderType
if(orderType=='10'){
uni.reLaunch({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
})
return
}
this.status = res.data.orderStatus
if (this.status == '2' || this.status == '4' || this.status == '5') {
//1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this.title='支付成功!'
this.loadImg=false
uni.redirectTo({
uni.reLaunch({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
})
}
......
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