| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <template>
- <view class="content">
- <image src="../../static/images/pay.png" />
- <text class="tip">付款成功</text>
- <view class="item" v-show="isShow2">
- <text>南昌交通学院</text>
- <text>{{ realPayAmount }}</text>
- </view>
- <view class="item-show" v-show="isShow1">
- <text>请通知本人查询</text>
- </view>
- <button @click="navigateToIndex">返回首页</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- realPayAmount: "",
- isShow1: false,
- isShow2: true,
- homeUrl: "https://jtishfw.ncjti.edu.cn/jiaofei/backendApi",
- };
- },
- onLoad(options) {},
- methods: {
- //换取详情信息
- getDetailMess() {
- let that = this;
- let cardNumber = localStorage.getItem("cardNumber");
- let url = that.homeUrl + "/tuitionpayment/payableinfo/payableInfo";
- uni.request({
- url: url,
- data: {},
- header: {
- card_number: cardNumber,
- Accept: "application/json",
- "Content-Type": " application/x-www-form-urlencoded;charset=utf-8",
- "X-Requested-With": "XMLHttpRequest",
- },
- method: "GET",
- sslVerify: true,
- success: ({ data, statusCode, header }) => {
- if (!data.success) {
- uni.showToast({
- title: data.message,
- icon: " error",
- mask: true,
- duration: 2000,
- });
- } else {
- if (data.data === null) {
- that.isShow1 = !that.isShow1;
- that.isShow2 = !that.isShow2;
- } else {
- let res = data.data;
- that.realPayAmount = res.realPayAmount;
- }
- }
- },
- fail: (error) => {},
- });
- },
- //获取当前URL指定参数
- getQueryString(name) {
- let url = window.location.href; // 获取URL
- let pattern = new RegExp("[\?\&]" + name + "=([^\&]+)", "i"); // 正则匹配URL
- let matcher = pattern.exec(url);
- if (matcher == null || matcher.length < 1) {
- return false;
- }
- return decodeURIComponent(matcher[1]); // 输出指定的参数值 中文也可以
- },
- // 退出支付成功页面
- navigateToIndex() {
- uni.navigateTo({ url: "/pages/Pay/pay" });
- },
- },
- };
- </script>
- <style lang="scss">
- @import url("./css/paySuccess.min.css");
- </style>
|