Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
0fb85020
Commit
0fb85020
authored
Oct 12, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
03ae6b51
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
139 deletions
+15
-139
manifest.json
manifest.json
+14
-9
fillOrder.vue
pages/ticketCoupons/fillOrder.vue
+1
-130
No files found.
manifest.json
View file @
0fb85020
...
...
@@ -58,6 +58,9 @@
"appid"
:
"wxbb033190e0ffa5db"
,
"UniversalLinks"
:
""
}
},
"oauth"
:
{
"univerify"
:
{}
}
}
}
...
...
@@ -76,21 +79,23 @@
"scope.userLocation"
:
{
"desc"
:
"你的位置信息将用于小程序位置接口的效果展示"
}
},
"optimization"
:{
"subPackages"
:
true
}
},
"mp-alipay"
:
{
"component2"
:
true
,
"usingComponents"
:
true
,
"appid"
:
"2021002181604459"
,
"plugins"
:
{
"plugins"
:
{}
},
//
使用到的插件
//
"subscribeMsg"
:
{
//
订阅消息插件
//
"version"
:
"*"
,
//
目前只支持设置
*
拉取当前上架最新版本
//
"provider"
:
"2021001155639035"
//
消息订阅插件
appid
//
}
}
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
...
...
pages/ticketCoupons/fillOrder.vue
View file @
0fb85020
...
...
@@ -74,9 +74,6 @@
<!-- #ifdef MP-WEIXIN -->
<view
class=
"btn"
@
click=
"submitOrder"
>
去支付
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
class=
"btn"
@
click=
"submitOrderAli"
>
去支付
</view>
<!-- #endif -->
</view>
</view>
</view>
...
...
@@ -247,132 +244,6 @@ export default {
});
},
// #endif
// #ifdef MP-ALIPAY
submitOrderAli
()
{
if
(
!
this
.
Consignee
)
{
uni
.
showToast
({
title
:
"请输入联系人姓名"
,
icon
:
"none"
,
});
return
;
}
if
(
!
this
.
ConsigneeMobile
)
{
uni
.
showToast
({
title
:
"请输入手机号"
,
icon
:
"none"
,
});
return
;
}
uni
.
showLoading
({
title
:
"支付中..."
,
});
this
.
request2
(
{
url
:
"/api/AppletDining/SetAppletTicketOrderInfo"
,
data
:
{
...
this
.
ticketdData
,
Final_Price
:
this
.
Final_Price
,
Consignee
:
this
.
Consignee
,
ConsigneeMobile
:
this
.
ConsigneeMobile
,
GuestList
:
this
.
GuestList
,
},
},
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
===
1
)
{
let
that
=
this
;
console
.
log
(
res
.
data
.
template_message_list
);
SubscribeMsgAli
(
res
.
data
.
template_message_list
,
()
=>
{
if
(
that
.
Final_Price
===
0
)
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/allorderList"
,
});
return
;
}
that
.
querenAli
(
res
.
data
.
OrderId
);
});
// uni.requestSubscribeMessage({
// tmplIds: res.data.template_message_list,
// success: (res) => {
// console.log("订阅成功", res);
// },
// fail: (err) => {
// console.log("订阅失败", err);
// },
// complete(_res) {
// if (that.Final_Price === 0) {
// uni.redirectTo({
// url: "/pages/jiuzhai/allorderList",
// });
// return;
// }
// that.queren(res.data.OrderId);
// },
// });
}
},
(
err
)
=>
{
uni
.
hideLoading
();
}
);
},
querenAli
(
OrderId
)
{
let
url
=
"/api/WeChatPay/GetDmcPayInfo"
;
let
GoodsName
=
this
.
ticketdData
.
TicketName
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
(
{
url
:
url
,
data
:
{
OrderId
:
OrderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
(
res
)
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
171
,
this
.
orderInfo
);
this
.
Pay
();
}
);
},
PayAli
()
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
"alipay"
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
nonceStr
:
this
.
orderInfo
.
nonceStr
,
package
:
this
.
orderInfo
.
package
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
that
.
Final_Price
,
});
},
100
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/allorderList"
,
});
},
100
);
},
});
},
// #endif
},
};
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment