Commit 0e072b0e authored by qipeng's avatar qipeng

Merge branch 'develop' of http://git.tbd.yanzuoguang.com/panyongping/uni-pdtravel into develop

parents a9aa5d94 9de7d4dd
...@@ -139,12 +139,6 @@ ...@@ -139,12 +139,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "pages/payment/changeNumPayment/changeNumPayment",
"style": {
"navigationBarTitleText": "支付",
"enablePullDownRefresh": false
}
}, },
{ {
"path": "pages/indexs/center/center", "path": "pages/indexs/center/center",
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="middle"> <view class="middle">
<view class="tabbar"> <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> <image :src="item.projectImgUrl"></image>
<view> <view>
{{item.merchantExtendProjectName}} {{item.merchantExtendProjectName}}
...@@ -181,7 +181,44 @@ export default { ...@@ -181,7 +181,44 @@ export default {
image: 'http://wx.pangdly.com/static/img/home3.df60ec3.jpg' 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){ onLoad(option){
...@@ -226,7 +263,7 @@ export default { ...@@ -226,7 +263,7 @@ export default {
} }
this.$request('scenic/merchantExtendProject/loadList',data).then((res)=>{ this.$request('scenic/merchantExtendProject/loadList',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
this.iconList=res.data||[] this.iconList=res.data
} }
}) })
}, },
......
...@@ -23,13 +23,12 @@ export default { ...@@ -23,13 +23,12 @@ export default {
methods:{ methods:{
//---登录 //---登录
login(){ login(){
let _this = this
uni.getProvider({ uni.getProvider({
service: 'oauth', service: 'oauth',
success(proRes) { success:proRes=>{
uni.login({ uni.login({
provider: proRes.provider[0], provider: proRes.provider[0],
success: function(res) { success:res=> {
if (res.code) { if (res.code) {
let source = '' let source = ''
if (proRes.provider[0] == 'weixin') { if (proRes.provider[0] == 'weixin') {
...@@ -45,13 +44,13 @@ export default { ...@@ -45,13 +44,13 @@ export default {
if(uni.getStorageSync('enterOptions').query){ if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||'' 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') { if (res.code == '00') {
let openid = res.data.openid let openid = res.data.openid
uni.setStorageSync('openid', openid) uni.setStorageSync('openid', openid)
let userId = res.data.userId || '' let userId = res.data.userId || ''
let datas = { openid, source, userId } let datas = { openid, source, userId }
_this.$request('wechatUser/login/findWxUserAndLogin', datas).then(res => { this.$request('wechatUser/login/findWxUserAndLogin', datas).then(res => {
//通过openid获取token //通过openid获取token
if (res.code == '00') { if (res.code == '00') {
let token = res.data.token || '' let token = res.data.token || ''
...@@ -71,7 +70,7 @@ export default { ...@@ -71,7 +70,7 @@ export default {
url: '/' + enterOptions.path + '?' + queryTotal url: '/' + enterOptions.path + '?' + queryTotal
}) })
//保存当前日期 //保存当前日期
let oldDate=_this.$commonjs.today() let oldDate=this.$commonjs.today()
uni.setStorageSync('oldDate', oldDate) uni.setStorageSync('oldDate', oldDate)
// uni.navigateBack({ // uni.navigateBack({
// delta:1 // delta:1
...@@ -88,8 +87,8 @@ export default { ...@@ -88,8 +87,8 @@ export default {
title: '登录失败,请退出并重新登录', title: '登录失败,请退出并重新登录',
icon: 'none' icon: 'none'
}) })
_this.timer = setTimeout(() => { this.timer = setTimeout(() => {
_this.login() this.login()
}, 2000) }, 2000)
}) })
} else { } else {
...@@ -103,8 +102,8 @@ export default { ...@@ -103,8 +102,8 @@ export default {
title: '登录失败,请退出并重新登录', title: '登录失败,请退出并重新登录',
icon: 'none' icon: 'none'
}) })
_this.timer = setTimeout(() => { this.timer = setTimeout(() => {
_this.login() this.login()
}, 2000) }, 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 { ...@@ -97,13 +97,12 @@ export default {
methods: { methods: {
login() { login() {
//---登录 //---登录
let _this = this
uni.getProvider({ uni.getProvider({
service: 'oauth', service: 'oauth',
success(proRes) { success:proRes=>{
uni.login({ uni.login({
provider: proRes.provider[0], provider: proRes.provider[0],
success: function(res) { success: res=>{
if (res.code) { if (res.code) {
let source = '' let source = ''
if (proRes.provider[0] == 'weixin') { if (proRes.provider[0] == 'weixin') {
...@@ -119,12 +118,12 @@ export default { ...@@ -119,12 +118,12 @@ export default {
if(uni.getStorageSync('enterOptions').query){ if(uni.getStorageSync('enterOptions').query){
data.companyId=uni.getStorageSync('enterOptions').query.companyId||'' data.companyId=uni.getStorageSync('enterOptions').query.companyId||''
} }
_this.$request('wechat/wx/getUserInfoByCode', data) this.$request('wechat/wx/getUserInfoByCode', data)
.then(res => { .then(res => {
if (res.code == '00') { if (res.code == '00') {
_this.openid = res.data.openid this.openid = res.data.openid
uni.setStorageSync('openid', _this.openid) uni.setStorageSync('openid', this.openid)
_this.initDetail() this.initDetail()
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
...@@ -203,7 +202,6 @@ export default { ...@@ -203,7 +202,6 @@ export default {
}, },
goPay() { goPay() {
//-------------------------------------------------------去支付 //-------------------------------------------------------去支付
let _this = this
if (this.errorMessage) { if (this.errorMessage) {
uni.showToast({ uni.showToast({
title: this.errorMessage, title: this.errorMessage,
...@@ -224,9 +222,9 @@ export default { ...@@ -224,9 +222,9 @@ export default {
package: this.package, package: this.package,
signType: this.signType, signType: this.signType,
paySign: this.paySign, paySign: this.paySign,
success: function(res) { success:res=>{
uni.navigateTo({ 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) { fail: function(err) {
...@@ -242,9 +240,9 @@ export default { ...@@ -242,9 +240,9 @@ export default {
uni.requestPayment({ uni.requestPayment({
provider: 'alipay', // 服务提供商 支付宝支付: alipay 微信支付: wxpay provider: 'alipay', // 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo: this.orderInfo, // 支付宝订单号 orderInfo: this.orderInfo, // 支付宝订单号
success: function(res) { success: res=> {
uni.navigateTo({ 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) { fail: function(err) {
......
This diff is collapsed.
...@@ -57,14 +57,22 @@ export default { ...@@ -57,14 +57,22 @@ export default {
let data = { let data = {
orderId: this.orderId orderId: this.orderId
} }
this.$request('order/order/getStatusById', data).then((res) => { this.$request('order/userOrder/getStatusById', data).then((res) => {
if (res.code == '00') { 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') { if (this.status == '2' || this.status == '4' || this.status == '5') {
//1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面) //1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this.title='支付成功!' this.title='支付成功!'
this.loadImg=false this.loadImg=false
uni.redirectTo({ uni.reLaunch({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode 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