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

支付成功页面新增

parent 691fedf1
......@@ -99,6 +99,34 @@
}
})
//#endif
//#ifdef MP-ALIPAY
let _this=this
uni.login({
provider: 'alipay',
success: function(res){
if(res.code){
let data={
code:res.code,
source:3
}
_this.$request('wechat/wx/getUserInfoByCode',data).then(res => {
if(res.code=='00'){
let openid=res.data.openid
uni.setStorageSync('openid',openid)
}else{
uni.removeStorageSync('openid')
uni.showToast({
title:res.message,
icon:"none"
})
}
}).catch((err)=>{
uni.removeStorageSync('openid')
})
}
}
})
//#endif
},
methods: {
getUserInfo() { // 获取用户信息
......
......@@ -3,3 +3,5 @@ require('./config$');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/payment/payment?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/login/login?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/paySuccess/paySuccess?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
......@@ -37,6 +37,8 @@ function success() {
require('../../app');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/payment/payment?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/login/login?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/paySuccess/paySuccess?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
}
self.bootstrapApp ? self.bootstrapApp({ success }) : success();
}
\ No newline at end of file
......@@ -3,3 +3,5 @@ require('./config$');
require('../../pages/index/index?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/payment/payment?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/login/login?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
require('../../pages/paySuccess/paySuccess?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68');
{
"pages": [
"pages/index/index",
"pages/payment/payment"
"pages/payment/payment",
"pages/login/login",
"pages/paySuccess/paySuccess"
],
"subPackages": [],
"window": {
......
......@@ -1488,7 +1488,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
}
}
......@@ -8322,7 +8322,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
......@@ -8343,14 +8343,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick');
}
return nextTick(cb, vm)
}else{
if(Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
......@@ -8436,7 +8436,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-alipay","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新',
JSON.stringify(diffData));
......@@ -9025,7 +9025,6 @@ function normalizeComponent (
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}var baseUrl = '';
var token = "oh2UV1lFq2CjxbBw0y7DOohhBFBM";
if (true) {//开发环境
baseUrl = "http://pay.tuyoyoo.com/";
} else {}
......@@ -9035,7 +9034,7 @@ var request = function request() {var url = arguments.length > 0 && arguments[0]
return new Promise(function (resolve, reject) {
uni.request({
method: type,
url: baseUrl + url + '?token=' + token,
url: baseUrl + url + '?token=' + uni.getStorageSync("openid"),
data: data,
dataType: 'json' }).
then(function (response) {var _response = _slicedToArray(
......
<view class="bottom"><button data-event-opts="{{[['tap',[['aaa']]]]}}" onTap="__e">456</button></view>
\ No newline at end of file
<view class="bottom"><web-view src="https://wx.pangdly.com"></web-view></view>
\ No newline at end of file
......@@ -207,9 +207,6 @@ var _default =
return {
title: '胖丁首页' };
},
onLoad: function onLoad() {
},
onReady: function onReady() {
......@@ -238,6 +235,34 @@ var _default =
var _this = this;
uni.login({
provider: 'alipay',
success: function success(res) {
if (res.code) {
var data = {
code: res.code,
source: 3 };
_this.$request('wechat/wx/getUserInfoByCode', data).then(function (res) {
if (res.code == '00') {
var openid = res.data.openid;
uni.setStorageSync('openid', openid);
} else {
uni.removeStorageSync('openid');
uni.showToast({
title: res.message,
icon: "none" });
}
}).catch(function (err) {
uni.removeStorageSync('openid');
});
}
} });
},
......@@ -253,11 +278,6 @@ var _default =
console.log(res);
} });
},
aaa: function aaa() {
uni.navigateTo({
url: '../payment/payment' });
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
......
/* required by usingComponents */
\ No newline at end of file
<view></view>
\ No newline at end of file
This diff is collapsed.
{
"defaultTitle": "",
"pullRefresh": false,
"usingComponents": {}
}
\ No newline at end of file
/* required by usingComponents */
\ No newline at end of file
<view><web-view src="https://wx.pangdly.com/#/paySuccess"></web-view></view>
\ No newline at end of file
This diff is collapsed.
{
"defaultTitle": "",
"pullRefresh": false,
"usingComponents": {}
}
\ No newline at end of file
/* required by usingComponents */
\ No newline at end of file
.bigBox{height: 100%;background: #fafafc;}
.middle{padding: 30rpx 24rpx 0 24rpx;}
.main{padding: 10rpx 24rpx 20rpx 24rpx;background: #FFFFFF;border-radius: 20rpx;box-shadow: 0 0 15rpx #e6e6e8;}
.product{border-bottom: 1px solid #e5e5e5;padding: 25rpx 0;}
.product view{color: #000000;padding-left:10rpx;display: -webkit-box;display: -webkit-flex;display: flex;-webkit-box-align: center;-webkit-align-items: center;align-items: center;box-sizing: border-box;}
.product view text:first-child{-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;}
.product view text:nth-child(2){color:#666666;font-size:28rpx;text-align: right;}
.product view.coupon{color: #F9690E;margin-top:10rpx;}
.product view.coupon text{font-size:30rpx;}
.mainP3{height:120rpx;color: #000000;border-bottom: 1px solid #e5e5e5;padding:25rpx 0 25rpx 10rpx;display: -webkit-box;display: -webkit-flex;display: flex;-webkit-box-align: center;-webkit-align-items: center;align-items: center;box-sizing: border-box;-webkit-box-pack: justify;-webkit-justify-content: space-between;justify-content: space-between;}
.mainP3 text:nth-child(2){font-size: 24rpx;color: #666666;}
.mainP3 text:nth-child(2) text:nth-child(1){font-size:36rpx;color:#F9690E;margin-left: 20rpx;font-weight: bold;}
.mainview{margin-top:50rpx;display: -webkit-box;display: -webkit-flex;display: flex;-webkit-box-align: center;-webkit-align-items: center;align-items: center;}
.mainview>image:first-child{margin:0 20rpx 0 10rpx;}
.mainview>view{-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;}
.bottom{position: fixed;bottom: 0;height: 100rpx;background: #FFFFFF;border-top:1px solid #e5e5e5;width: 100%;display: -webkit-box;display: -webkit-flex;display: flex;-webkit-box-align: center;-webkit-align-items: center;align-items: center;}
.bottomFirst{border-right: 1px solid #cccccc;padding-left:40rpx;width: 40%;box-sizing: border-box;}
.bottomFirst text:nth-child(2){font-size:40rpx;color: #f9690e;margin-left:10rpx;font-weight: bold;}
.bottomFirst text:nth-child(2) text{font-size:28rpx;}
.bottomLast{padding-left:20rpx;display: -webkit-box;display: -webkit-flex;display: flex;width: 60%;padding-right:20rpx;box-sizing: border-box;-webkit-box-align: center;-webkit-align-items: center;align-items: center;}
.bottomLast text:first-child{display: block;text-align: center;width:60rpx;}
.bottomLast text:first-child text{margin-top:10rpx;display: inline-block;font-size:24rpx;color: #666666;}
.bottomLast text:nth-child(2){-webkit-box-flex: 1;-webkit-flex: 1;flex: 1;height:70rpx;display: inline-block;text-align: center;line-height:70rpx;background: #f9690e;color: #FFFFFF;margin-left:30rpx;border-radius: 20rpx;font-size:32rpx;}
<view><view hidden="{{!(bodyShow)}}" class="middle _div"><view class="main _div"><block a:for="{{orderList}}" a:for-item="item" a:for-index="__i0__" a:key="id"><block a:if="{{orderList!=''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+item.merchantName+"("+item.productName+')'}}</label><label class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{item.unitPrice+''}}<view class="_i">x</view>{{''+item.orderNum}}<view class="_br"></view><block a:if="{{item.depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+item.depositReceived}}</view></block></label></view><block a:if="{{item.pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{item.pdDiscountMoney+''}}</view></view></block></view></block></block><block a:if="{{orderList==''}}"><view class="product _div"><view class="_p"><label class="_span">{{''+merchantName+"("+productName+')'}}</label><label style="text-align:right;" class="_span"><view style="font-size:0.24rem;" class="_small">¥</view>{{unitPrice+''}}<view class="_i">x</view>{{''+orderNum}}<view class="_br"></view><block a:if="{{depositReceived}}"><view style="margin-top:0.15rem;font-size:0.22rem;display:inline-block;color:#f45803;" class="_small">{{"押金:"+depositReceived}}</view></block></label></view><block a:if="{{pdDiscountMoney}}"><view class="coupon _p"><label class="_span">券</label><view class="_i"><view style="font-size:0.24rem;" class="_small">-¥</view>{{pdDiscountMoney+''}}</view></view></block></view></block><view class="mainP3 _p"><label class="_span">实际支付</label><label class="_span"><view class="_i"><view style="font-size:0.28rem;" class="_small">¥</view>{{pdOrderMoney+''}}</view></label></view><view class="mainDiv _div"><label class="_span"><image style="width:0.7rem;" src="{{$root.m0}}" class="_img"></image></label><view class="_div"><view class="_p">微信支付</view></view><label class="_span"><image style="width:0.32rem;" src="{{$root.m1}}" class="_img"></image></label></view></view></view><view hidden="{{!(bodyShow)}}" class="bottom _div"><view class="_p"><label class="_span">实付款</label><label class="_span"><view class="_i">¥</view>{{pdOrderMoney+''}}</label></view><view class="_p"><navigator href="tel:400-072-0368" class="_a"><image style="width:0.31rem;" src="{{$root.m2}}" class="_img"></image></navigator><navigator data-event-opts="{{[['tap',[['weChatPay']]]]}}" onTap="__e" class="_a">去支付</navigator></view></view></view>
\ No newline at end of file
<view><view hidden="{{!(bodyShow)}}" class="middle"><view class="main"><block a:for="{{orderList}}" a:for-item="item" a:for-index="__i0__" a:key="id"><block a:if="{{orderList!=''}}"><view class="product"><view><text>{{''+item.merchantName+"("+item.productName+')'}}</text><text><text style="font-size:24rpx;">¥</text>{{item.unitPrice+''}}<text>x</text>{{''+item.orderNum}}<view class="_br"></view><block a:if="{{item.depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+item.depositReceived}}</text></block></text></view><block a:if="{{item.pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{item.pdDiscountMoney+''}}</text></view></block></view></block></block><block a:if="{{orderList==''}}"><view class="product"><view><text>{{''+merchantName+"("+productName+')'}}</text><text style="text-align:right;"><view style="font-size:24rpx;" class="_small">¥</view>{{unitPrice+''}}<text>x</text>{{''+orderNum}}<view class="_br"></view><block a:if="{{depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+depositReceived}}</text></block></text></view><block a:if="{{pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{pdDiscountMoney+''}}</text></view></block></view></block><view class="mainP3"><text>实际支付</text><text><text><text style="font-size:28rpx;">¥</text>{{pdOrderMoney+''}}</text></text></view><view class="mainview"><image style="width:70rpx;height:62rpx;" src="../../static/img/payment/weixin.png"></image><view>微信支付</view><image style="width:32rpx;height:32rpx;" src="../../static/img/payment/input.png"></image></view></view></view><view hidden="{{!(bodyShow)}}" class="bottom"><view class="bottomFirst"><text>实付款</text><text><text>¥</text>{{pdOrderMoney+''}}</text></view><view class="bottomLast"><text href="tel:400-072-0368"></text><text data-event-opts="{{[['tap',[['goPay']]]]}}" onTap="__e">去支付</text></view></view></view>
\ No newline at end of file
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