Commit 359b76ec authored by 潘永坪's avatar 潘永坪

支付bug处理

parent 8055bf48
......@@ -6,6 +6,7 @@ if(process.env.NODE_ENV === 'development'){//开发环境
}
const request = (url = '', data = {}, type = 'POST') => {
uni.showLoading({title: '加载中',mask:true})
data.reqId = new Date().getTime() //获取时间戳
return new Promise((resolve, reject) => {
uni.request({
......@@ -14,9 +15,11 @@ const request = (url = '', data = {}, type = 'POST') => {
data:data,
dataType: 'json',
}).then((response) => {
uni.hideLoading()
let [error, res] = response;
resolve(res.data);
}).catch(error => {
uni.hideLoading()
let [err, res] = error;
reject(err)
})
......
<template>
<view >
<!-- <view >
<view class="top">
<view class="top-search">
......@@ -66,7 +66,7 @@
</view>
</view>
</view> -->
<!-- <button @click="getUserInfo()"> 授权获取头像昵称 </button> -->
<view class="bottom" v-show="showBottom">
<!--#ifdef MP-WEIXIN -->
......
......@@ -15,9 +15,6 @@
},
onLoad(){
uni.showLoading({
title: '加载中...'
})
let _this=this
uni.getProvider({
service: 'oauth',
......@@ -31,7 +28,6 @@
source:3
}
_this.$request('wechat/wx/getUserInfoByCode',data).then(res => {
uni.hideLoading()
if(res.code=='00'){
let openid=res.data.openid
uni.setStorageSync('openid',openid)
......
......@@ -12,8 +12,8 @@
<text>
<text style="font-size:24rpx;">¥</text>{{item.unitPrice}}
<text>x</text>
{{item.orderNum}}<br />
<text style="margin-top:15rpx;font-size:22rpx;display: inline-block;color:#f45803;" v-if="item.depositReceived">押金:{{item.depositReceived}}</text>
{{item.orderNum}}
<text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;" v-if="item.depositReceived">押金:{{item.depositReceived}}</text>
</text>
</view>
<view class="coupon" v-if="item.pdDiscountMoney">
......@@ -35,8 +35,8 @@
<text style="text-align: right;">
<small style="font-size:24rpx;">¥</small>{{unitPrice}}
<text>x</text>
{{orderNum}}<br />
<text style="margin-top:15rpx;font-size:22rpx;display: inline-block;color:#f45803;" v-if="depositReceived">押金:{{depositReceived}}</text>
{{orderNum}}
<text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;" v-if="depositReceived">押金:{{depositReceived}}</text>
</text>
</view>
......
......@@ -85,7 +85,7 @@
<view class="rightOne" @click="clickEnter()" ref="enter">
<text class="iconfont icon-im_huige" style="font-size:70rpx;"></text>
</view>
<view class="rightTwo" ref="pay" @click="clickPay()">
<view class="rightTwo" ref="pay" @click="clickPay()" :style="{'background':payBackground}">
<view>立即</view>
<view>支付</view>
</view>
......@@ -119,11 +119,14 @@
chooseCouponObj: "", //默认选中最优价格优惠券
ableConpon: "", //没有可用优惠券时,达到一定条件可用,显示达到的条件
orderSource:8,//1公众号平台、2公众号组合页面1、3公众号组合页面2、4胖丁伙伴app、5第三方自助机、6第三方票房窗口、7平台快捷买单、8扫码支付
background:"",//普通按钮背景颜色
payBackground:"#1dce2e",//支付背景颜色
}
},
onLoad(option) {
this.companyId=option.companyId
this.merchantId=option.merchantId
this.option=decodeURIComponent(option.q)
// this.companyId=option.companyId
// this.merchantId=option.merchantId
if (this.merchantId) { //大商家的有merchantId
this.init()
} else { //小商家没有merchantId
......@@ -169,9 +172,7 @@
"merchantId": this.merchantId,
"companyId": this.companyId,
}
uni.showLoading({title: '加载中',mask:true})
this.$request("scenic/order/findCodePayInfo",data).then((res) => {
uni.hideLoading()
if (res.code =="00") {
this.name = res.data.name
} else {
......@@ -186,9 +187,7 @@
let data = {
"id": this.companyId,
}
uni.showLoading({title: '加载中',mask:true})
this.$request("user/company/detail", data).then((res) => {
uni.hideLoading()
if (res.code=="00"){
this.name = res.data.companyVo.companyName
} else {
......@@ -238,7 +237,11 @@
},
clickPay(){//---------------------------------------------------------------点击立即支付,获取支付需要的参数
if (!parseFloat(this.buyMoney)) {
return
uni.showToast({
title:"请输入正确金额",
icon:"none"
})
return
}
let couponList = []
if (this.chooseCouponObj != '') {
......@@ -261,11 +264,11 @@
orderSource:this.orderSource,//订单来源 8扫码支付
couponList,//券列表
}
// this.$refs.pay.$el.style.cssText="background:#cccccc;"
this.payBackground="#cccccc"
this.$request("orderc/order/codePay", data).then((res) => {
// setTimeout(() => {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
// },1000)
setTimeout(() => {
this.payBackground="#1dce2e"
},1000)
if(res.code=="00") {
if (res.data.errorMessage) {
uni.showToast({
......@@ -288,7 +291,7 @@
})
}
}).catch((err) => {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
this.payBackground="#1dce2e"
})
},
goPay(){//------------------------------------------------------------------------------去支付
......@@ -334,11 +337,11 @@
if (y > 2 && x > 0) {
this.buyMoney = oldVal
}
// if (parseFloat(this.buyMoney)) {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
// } else {
// this.$refs.pay.$el.style.cssText="background:#cccccc;"
// }
if (parseFloat(this.buyMoney)) {
this.payBackground="#1dce2e"
} else {
this.payBackground="#cccccc"
}
}
}
}
......@@ -372,7 +375,7 @@
.botLeft view:last-child text{flex:initial;}
.botRight{width:25%;}
.rightOne{height: 25%;display: flex;align-items:center;justify-content: center;border-bottom:1px solid #dddddd;}
.rightTwo{height: 75%;border:none;color: #FFFFFF;background: #1dce2e;display: flex;flex-direction:column;align-items:center;justify-content: center;}
.rightTwo{height: 75%;border:none;color: #FFFFFF;display: flex;flex-direction:column;align-items:center;justify-content: center;}
@keyframes dis{
from{
opacity: 0;
......
......@@ -29,6 +29,5 @@
"uniStatistics": {
"enable": true
},
"usingComponents": {},
"sitemapLocation": "sitemap.json"
"usingComponents": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"065f":function(n,t,e){"use strict";e.r(t);var o=e("737f"),u=e.n(o);for(var c in o)"default"!==c&&function(n){e.d(t,n,(function(){return o[n]}))}(c);t["default"]=u.a},"2bba":function(n,t,e){"use strict";(function(n){e("6909"),e("921b");o(e("66fd"));var t=o(e("c545"));function o(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,e("543d")["createPage"])},"737f":function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={data:function(){return{showBottom:!1}},onLoad:function(){n.getStorageSync("openid")&&(this.showBottom=!0)},onReady:function(){},methods:{getUserInfo:function(){n.getUserProfile({lang:"zh_CN",desc:"登录",success:function(n){console.log(n)},fail:function(n){}})}}};t.default=e}).call(this,e("543d")["default"])},"7f92":function(n,t,e){"use strict";var o;e.d(t,"b",(function(){return u})),e.d(t,"c",(function(){return c})),e.d(t,"a",(function(){return o}));var u=function(){var n=this,t=n.$createElement;n._self._c},c=[]},c545:function(n,t,e){"use strict";e.r(t);var o=e("7f92"),u=e("065f");for(var c in u)"default"!==c&&function(n){e.d(t,n,(function(){return u[n]}))}(c);e("d9b5");var f,a=e("f0c5"),r=Object(a["a"])(u["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],f);t["default"]=r.exports},d9b5:function(n,t,e){"use strict";var o=e("e90d"),u=e.n(o);u.a},e90d:function(n,t,e){}},[["2bba","common/runtime","common/vendor"]]]);
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"065f":function(n,t,e){"use strict";e.r(t);var o=e("737f"),u=e.n(o);for(var c in o)"default"!==c&&function(n){e.d(t,n,(function(){return o[n]}))}(c);t["default"]=u.a},"2bba":function(n,t,e){"use strict";(function(n){e("6909"),e("921b");o(e("66fd"));var t=o(e("c545"));function o(n){return n&&n.__esModule?n:{default:n}}n(t.default)}).call(this,e("543d")["createPage"])},"737f":function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={data:function(){return{showBottom:!1}},onLoad:function(){n.getStorageSync("openid")&&(this.showBottom=!0)},onReady:function(){},methods:{getUserInfo:function(){n.getUserProfile({lang:"zh_CN",desc:"登录",success:function(n){console.log(n)},fail:function(n){}})}}};t.default=e}).call(this,e("543d")["default"])},c545:function(n,t,e){"use strict";e.r(t);var o=e("c69a"),u=e("065f");for(var c in u)"default"!==c&&function(n){e.d(t,n,(function(){return u[n]}))}(c);e("d9b5");var a,f=e("f0c5"),r=Object(f["a"])(u["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=r.exports},c69a:function(n,t,e){"use strict";var o;e.d(t,"b",(function(){return u})),e.d(t,"c",(function(){return c})),e.d(t,"a",(function(){return o}));var u=function(){var n=this,t=n.$createElement;n._self._c},c=[]},d9b5:function(n,t,e){"use strict";var o=e("e90d"),u=e.n(o);u.a},e90d:function(n,t,e){}},[["2bba","common/runtime","common/vendor"]]]);
\ No newline at end of file
<view><view class="top"><view class="top-search"></view><view class="top-content"><view><navigator url="../scenic/scenic"><image src="../../static/img/index/classify1.png"></image><view>景区门票</view></navigator></view><view><navigator url="../hotel/hotel"><image src="../../static/img/index/classify2.png"></image><view>酒店民宿</view></navigator></view><view><navigator url="../restaurant/restaurant"><image src="../../static/img/index/classify3.png"></image><view>特色美食</view></navigator></view><view><navigator url="../nearby/nearby"><image src="../../static/img/index/classify4.png"></image><view>周边游</view></navigator></view><view><navigator url="../travelOne/travelOne"><image src="../../static/img/index/classify5.png"></image><view>跟团游</view></navigator></view><view><navigator url="../travelTwo/travelTwo"><image src="../../static/img/index/classify6.png"></image><view>亲子游</view></navigator></view><view><navigator url="../dingzhi/dingzhi"><image src="../../static/img/index/classify7.png"></image><view>行程订制</view></navigator></view><view><navigator url="../special/special"><image src="../../static/img/index/classify8.png"></image><view>特产好礼</view></navigator></view></view><view class="top-img"></view></view><view hidden="{{!(showBottom)}}" class="bottom"></view></view>
\ No newline at end of file
<view hidden="{{!(showBottom)}}" class="bottom"><web-view src="https://wx.pangdly.com"></web-view></view>
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"638a":function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return o}));var a=function(){var e=this,n=e.$createElement;e._self._c},c=[]},"9fb8":function(e,n,t){"use strict";t.r(n);var o=t("638a"),a=t("a824");for(var c in a)"default"!==c&&function(e){t.d(n,e,(function(){return a[e]}))}(c);var r,u=t("f0c5"),i=Object(u["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);n["default"]=i.exports},a824:function(e,n,t){"use strict";t.r(n);var o=t("bae4"),a=t.n(o);for(var c in o)"default"!==c&&function(e){t.d(n,e,(function(){return o[e]}))}(c);n["default"]=a.a},bae4:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{}},methods:{},onLoad:function(){e.showLoading({title:"加载中..."});var n=this;e.getProvider({service:"oauth",success:function(t){e.login({provider:t.provider[0],success:function(t){if(t.code){var o={code:t.code,source:3};n.$request("wechat/wx/getUserInfoByCode",o).then((function(n){if(e.hideLoading(),"00"==n.code){var t=n.data.openid;e.setStorageSync("openid",t),e.navigateBack({delta:1})}else e.removeStorageSync("openid"),e.showToast({title:n.message,icon:"none"})})).catch((function(n){e.removeStorageSync("openid")}))}}})}})}};n.default=t}).call(this,t("543d")["default"])},d263:function(e,n,t){"use strict";(function(e){t("6909"),t("921b");o(t("66fd"));var n=o(t("9fb8"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("543d")["createPage"])}},[["d263","common/runtime","common/vendor"]]]);
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"125b":function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return o}));var a=function(){var e=this,n=e.$createElement;e._self._c},c=[]},"9fb8":function(e,n,t){"use strict";t.r(n);var o=t("125b"),a=t("a824");for(var c in a)"default"!==c&&function(e){t.d(n,e,(function(){return a[e]}))}(c);var r,u=t("f0c5"),i=Object(u["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);n["default"]=i.exports},a824:function(e,n,t){"use strict";t.r(n);var o=t("bae4"),a=t.n(o);for(var c in o)"default"!==c&&function(e){t.d(n,e,(function(){return o[e]}))}(c);n["default"]=a.a},bae4:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{}},methods:{},onLoad:function(){var n=this;e.getProvider({service:"oauth",success:function(t){e.login({provider:t.provider[0],success:function(t){if(t.code){var o={code:t.code,source:3};n.$request("wechat/wx/getUserInfoByCode",o).then((function(n){if("00"==n.code){var t=n.data.openid;e.setStorageSync("openid",t),e.navigateBack({delta:1})}else e.removeStorageSync("openid"),e.showToast({title:n.message,icon:"none"})})).catch((function(n){e.removeStorageSync("openid")}))}}})}})}};n.default=t}).call(this,t("543d")["default"])},d263:function(e,n,t){"use strict";(function(e){t("6909"),t("921b");o(t("66fd"));var n=o(t("9fb8"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("543d")["createPage"])}},[["d263","common/runtime","common/vendor"]]]);
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/orderPayment/orderPayment"],{"0d8a":function(e,t,n){"use strict";(function(e){n("6909"),n("921b");a(n("66fd"));var t=a(n("8611"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"223d":function(e,t,n){"use strict";n.r(t);var a=n("4917"),r=n.n(a);for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=r.a},"27f6":function(e,t,n){"use strict";var a=n("74b1"),r=n.n(a);r.a},4917:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{merchantName:"",productName:"",orderList:"",unitPrice:"",depositReceived:0,pdDiscountMoney:"",orderNum:"",pdOrderMoney:"",totalMoney:"",errorMessage:"",bodyShow:!1,timeStamp:"",nonceStr:"",package:"",signType:"",paySign:"",background:""}},onLoad:function(t){var n=this,a={orderId:t.orderId,userId:e.getStorageSync("openid"),payType:42};this.$request("orderc/order/findOrderInfo",a).then((function(t){"00"==t.code?(n.bodyShow=!0,n.timeStamp=t.data.timestamp,n.nonceStr=t.data.noncestr,n.package=t.data.package,n.signType=t.data.signType,n.paySign=t.data.sign,n.pdOrderMoney=t.data.pdOrderMoney,n.errorMessage=t.data.errorMessage,n.totalMoney=t.data.totalMoney,n.orderList=t.data.orderList,"undefined"==typeof n.orderList&&(n.orderList="",n.merchantName=t.data.merchantName,n.productName=t.data.productName,n.unitPrice=t.data.unitPrice,n.orderNum=t.data.orderNum,n.depositReceived=t.data.depositReceived,n.pdDiscountMoney=t.data.pdDiscountMoney)):e.showToast({title:t.message,icon:"none"})}))},methods:{goPay:function(){var t=this;this.errorMessage?e.showToast({title:this.errorMessage,icon:"none"}):(this.background="#E6E6E6",setTimeout((function(){t.background="f9690e"}),1e3),e.requestPayment({provider:"wxpay",timeStamp:this.timeStamp,nonceStr:this.nonceStr,package:this.package,signType:this.signType,paySign:this.paySign,success:function(t){e.redirectTo({url:"../paySuccess/paySuccess"})},fail:function(t){e.showToast({title:t.errMsg,icon:"none"})}}))}}};t.default=n}).call(this,n("543d")["default"])},"74b1":function(e,t,n){},7530:function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=function(){var e=this,t=e.$createElement;e._self._c},o=[]},8611:function(e,t,n){"use strict";n.r(t);var a=n("7530"),r=n("223d");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("27f6");var i,d=n("f0c5"),c=Object(d["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);t["default"]=c.exports}},[["0d8a","common/runtime","common/vendor"]]]);
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/orderPayment/orderPayment"],{"0d8a":function(e,t,n){"use strict";(function(e){n("6909"),n("921b");a(n("66fd"));var t=a(n("8611"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"223d":function(e,t,n){"use strict";n.r(t);var a=n("4917"),r=n.n(a);for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=r.a},"27f6":function(e,t,n){"use strict";var a=n("74b1"),r=n.n(a);r.a},4917:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{merchantName:"",productName:"",orderList:"",unitPrice:"",depositReceived:0,pdDiscountMoney:"",orderNum:"",pdOrderMoney:"",totalMoney:"",errorMessage:"",bodyShow:!1,timeStamp:"",nonceStr:"",package:"",signType:"",paySign:"",background:""}},onLoad:function(t){var n=this,a={orderId:t.orderId,userId:e.getStorageSync("openid"),payType:42};this.$request("orderc/order/findOrderInfo",a).then((function(t){"00"==t.code?(n.bodyShow=!0,n.timeStamp=t.data.timestamp,n.nonceStr=t.data.noncestr,n.package=t.data.package,n.signType=t.data.signType,n.paySign=t.data.sign,n.pdOrderMoney=t.data.pdOrderMoney,n.errorMessage=t.data.errorMessage,n.totalMoney=t.data.totalMoney,n.orderList=t.data.orderList,"undefined"==typeof n.orderList&&(n.orderList="",n.merchantName=t.data.merchantName,n.productName=t.data.productName,n.unitPrice=t.data.unitPrice,n.orderNum=t.data.orderNum,n.depositReceived=t.data.depositReceived,n.pdDiscountMoney=t.data.pdDiscountMoney)):e.showToast({title:t.message,icon:"none"})}))},methods:{goPay:function(){var t=this;this.errorMessage?e.showToast({title:this.errorMessage,icon:"none"}):(this.background="#E6E6E6",setTimeout((function(){t.background="f9690e"}),1e3),e.requestPayment({provider:"wxpay",timeStamp:this.timeStamp,nonceStr:this.nonceStr,package:this.package,signType:this.signType,paySign:this.paySign,success:function(t){e.redirectTo({url:"../paySuccess/paySuccess"})},fail:function(t){e.showToast({title:t.errMsg,icon:"none"})}}))}}};t.default=n}).call(this,n("543d")["default"])},"74b1":function(e,t,n){},8611:function(e,t,n){"use strict";n.r(t);var a=n("9fe7"),r=n("223d");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("27f6");var i,d=n("f0c5"),c=Object(d["a"])(r["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);t["default"]=c.exports},"9fe7":function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=function(){var e=this,t=e.$createElement;e._self._c},o=[]}},[["0d8a","common/runtime","common/vendor"]]]);
\ No newline at end of file
<view><view hidden="{{!(bodyShow)}}" class="middle"><view class="main"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><block wx: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 wx:if="{{item.depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+item.depositReceived}}</text></block></text></view><block wx:if="{{item.pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{item.pdDiscountMoney+''}}</text></view></block></view></block></block><block wx: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 wx:if="{{depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+depositReceived}}</text></block></text></view><block wx: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/orderPayment/weixin.png"></image><view>微信支付</view><image style="width:32rpx;height:32rpx;" src="/static/img/orderPayment/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']]]]}}" style="{{'background:'+(background)+';'}}" bindtap="__e">去支付</text></view></view></view>
\ No newline at end of file
<view><view hidden="{{!(bodyShow)}}" class="middle"><view class="main"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><block wx: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+''}}<block wx:if="{{item.depositReceived}}"><text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;">{{"押金:"+item.depositReceived}}</text></block></text></view><block wx:if="{{item.pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{item.pdDiscountMoney+''}}</text></view></block></view></block></block><block wx: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+''}}<block wx:if="{{depositReceived}}"><text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;">{{"押金:"+depositReceived}}</text></block></text></view><block wx: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/orderPayment/weixin.png"></image><view>微信支付</view><image style="width:32rpx;height:32rpx;" src="/static/img/orderPayment/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']]]]}}" style="{{'background:'+(background)+';'}}" bindtap="__e">去支付</text></view></view></view>
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/ourPayment/ourPayment"],{2296:function(o,n,t){"use strict";t.r(n);var e=t("db83"),a=t("6a16");for(var i in a)"default"!==i&&function(o){t.d(n,o,(function(){return a[o]}))}(i);t("9dd6");var s,u=t("f0c5"),c=Object(u["a"])(a["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],s);n["default"]=c.exports},3778:function(o,n,t){"use strict";(function(o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=function(){t.e("components/orderCoupon").then(function(){return resolve(t("5503"))}.bind(null,t)).catch(t.oe)},a={components:{orderCoupon:e},data:function(){return{buyMoney:"",companyId:"",merchantId:"",name:"",paySign:"",signType:"",timeStamp:"",nonceStr:"",package:"",flag:"",couponData:"",chooseCouponObj:"",ableConpon:"",orderSource:8}},onLoad:function(o){this.companyId=o.companyId,this.merchantId=o.merchantId,this.merchantId?this.init():this.initTwo(),this.initCoupon()},methods:{clickNum:function(o){var n=this;this.buyMoney+=o,clearTimeout(this.flag),this.flag=setTimeout((function(){n.initCoupon()}),1500)},clickEnter:function(){var o=this;this.buyMoney=this.buyMoney.substr(0,this.buyMoney.length-1),clearTimeout(this.flag),this.flag=setTimeout((function(){o.initCoupon()}),1500)},couponChoose:function(o){this.chooseCouponObj=o},showCoupon:function(){this.$refs.orderCoupon.showCoupon()},init:function(){var n=this,t={merchantId:this.merchantId,companyId:this.companyId};o.showLoading({title:"加载中",mask:!0}),this.$request("scenic/order/findCodePayInfo",t).then((function(t){o.hideLoading(),"00"==t.code?n.name=t.data.name:o.showToast({title:t.message,icon:"none"})}))},initTwo:function(){var n=this,t={id:this.companyId};o.showLoading({title:"加载中",mask:!0}),this.$request("user/company/detail",t).then((function(t){o.hideLoading(),"00"==t.code?n.name=t.data.companyVo.companyName:o.showToast({title:t.message,icon:"none"})}))},initCoupon:function(){var n=this,t=[];this.chooseCouponObj="",this.ableConpon="";var e={money:parseFloat(this.buyMoney)||0,merchantId:this.merchantId,companyId:this.companyId,orderSource:this.orderSource,openid:o.getStorageSync("openid")};this.$request("wechatUser/myPage/usableCouponList",e).then((function(o){if("00"==o.code)if(n.couponData=o.data,o.data.usableCouponList.length>0){o.data.usableCouponList.forEach((function(o){t.push(o.savedMoney)}));var e=Math.max.apply(null,t),a=o.data.usableCouponList.findIndex((function(o){return e==o.savedMoney}));a>-1&&(n.chooseCouponObj=o.data.usableCouponList[a])}else o.data.unusableCouponList.length>0&&o.data.unusableCouponList.forEach((function(o,t){1==o.isProduct&&(n.ableConpon=o)}))}))},clickPay:function(){var n=this;if(parseFloat(this.buyMoney)){var t=[];""!=this.chooseCouponObj&&(t=[{couponId:this.chooseCouponObj.couponId,couponPrice:this.chooseCouponObj.savedMoney,isMerchant:this.chooseCouponObj.createSource,myCouponId:this.chooseCouponObj.id,couponType:this.chooseCouponObj.couponType}]);var e={companyId:this.companyId,merchantId:this.merchantId,userId:o.getStorageSync("openid"),orderMoney:parseFloat(this.buyMoney),payType:this.payType,orderSource:this.orderSource,couponList:t};this.$request("orderc/order/codePay",e).then((function(t){if("00"==t.code){if(t.data.errorMessage)return void o.showToast({title:t.data.errorMessage,icon:"none"});n.signType=t.data.signType,n.paySign=t.data.sign,n.timeStamp=t.data.timestamp,n.nonceStr=t.data.noncestr,n.package=t.data.package,n.goPay()}else o.showToast({title:t.message,icon:"none"})})).catch((function(o){}))}},goPay:function(){o.requestPayment({provider:"wxpay",timeStamp:this.timeStamp,nonceStr:this.nonceStr,package:this.package,signType:this.signType,paySign:this.paySign,success:function(n){o.redirectTo({url:"../paySuccess/paySuccess"})},fail:function(n){o.showToast({title:n.errMsg,icon:"none"})}})}},watch:{buyMoney:function(o,n){"."==o&&""==n&&(this.buyMoney="0."),"0"==o&&""==n&&(this.buyMoney="0."),2==o.length&&0==o.substr(0,1)&&"."!=o.substr(1,2)&&(this.buyMoney=o.substr(1,2)),isNaN(o)&&"."!=o&&(this.buyMoney=n);var t=String(this.buyMoney).indexOf(".")+1,e=String(this.buyMoney).length-t;e>2&&t>0&&(this.buyMoney=n)}}};n.default=a}).call(this,t("543d")["default"])},"6a16":function(o,n,t){"use strict";t.r(n);var e=t("3778"),a=t.n(e);for(var i in e)"default"!==i&&function(o){t.d(n,o,(function(){return e[o]}))}(i);n["default"]=a.a},"7f8b":function(o,n,t){},"9dd6":function(o,n,t){"use strict";var e=t("7f8b"),a=t.n(e);a.a},d410:function(o,n,t){"use strict";(function(o){t("6909"),t("921b");e(t("66fd"));var n=e(t("2296"));function e(o){return o&&o.__esModule?o:{default:o}}o(n.default)}).call(this,t("543d")["createPage"])},db83:function(o,n,t){"use strict";var e;t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return e}));var a=function(){var o=this,n=o.$createElement,t=(o._self._c,""!=o.chooseCouponObj?o.chooseCouponObj.savedMoney.toFixed(2):null);o.$mp.data=Object.assign({},{$root:{g0:t}})},i=[]}},[["d410","common/runtime","common/vendor"]]]);
\ No newline at end of file
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/ourPayment/ourPayment"],{2296:function(o,n,t){"use strict";t.r(n);var e=t("3db3"),a=t("6a16");for(var i in a)"default"!==i&&function(o){t.d(n,o,(function(){return a[o]}))}(i);t("9dd6");var s,u=t("f0c5"),c=Object(u["a"])(a["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],s);n["default"]=c.exports},3778:function(o,n,t){"use strict";(function(o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=function(){t.e("components/orderCoupon").then(function(){return resolve(t("5503"))}.bind(null,t)).catch(t.oe)},a={components:{orderCoupon:e},data:function(){return{buyMoney:"",companyId:"",merchantId:"",name:"",paySign:"",signType:"",timeStamp:"",nonceStr:"",package:"",flag:"",couponData:"",chooseCouponObj:"",ableConpon:"",orderSource:8}},onLoad:function(o){this.option=decodeURIComponent(o.q),this.merchantId?this.init():this.initTwo(),this.initCoupon()},methods:{clickNum:function(o){var n=this;this.buyMoney+=o,clearTimeout(this.flag),this.flag=setTimeout((function(){n.initCoupon()}),1500)},clickEnter:function(){var o=this;this.buyMoney=this.buyMoney.substr(0,this.buyMoney.length-1),clearTimeout(this.flag),this.flag=setTimeout((function(){o.initCoupon()}),1500)},couponChoose:function(o){this.chooseCouponObj=o},showCoupon:function(){this.$refs.orderCoupon.showCoupon()},init:function(){var n=this,t={merchantId:this.merchantId,companyId:this.companyId};this.$request("scenic/order/findCodePayInfo",t).then((function(t){"00"==t.code?n.name=t.data.name:o.showToast({title:t.message,icon:"none"})}))},initTwo:function(){var n=this,t={id:this.companyId};this.$request("user/company/detail",t).then((function(t){"00"==t.code?n.name=t.data.companyVo.companyName:o.showToast({title:t.message,icon:"none"})}))},initCoupon:function(){var n=this,t=[];this.chooseCouponObj="",this.ableConpon="";var e={money:parseFloat(this.buyMoney)||0,merchantId:this.merchantId,companyId:this.companyId,orderSource:this.orderSource,openid:o.getStorageSync("openid")};this.$request("wechatUser/myPage/usableCouponList",e).then((function(o){if("00"==o.code)if(n.couponData=o.data,o.data.usableCouponList.length>0){o.data.usableCouponList.forEach((function(o){t.push(o.savedMoney)}));var e=Math.max.apply(null,t),a=o.data.usableCouponList.findIndex((function(o){return e==o.savedMoney}));a>-1&&(n.chooseCouponObj=o.data.usableCouponList[a])}else o.data.unusableCouponList.length>0&&o.data.unusableCouponList.forEach((function(o,t){1==o.isProduct&&(n.ableConpon=o)}))}))},clickPay:function(){var n=this;if(parseFloat(this.buyMoney)){var t=[];""!=this.chooseCouponObj&&(t=[{couponId:this.chooseCouponObj.couponId,couponPrice:this.chooseCouponObj.savedMoney,isMerchant:this.chooseCouponObj.createSource,myCouponId:this.chooseCouponObj.id,couponType:this.chooseCouponObj.couponType}]);var e={companyId:this.companyId,merchantId:this.merchantId,userId:o.getStorageSync("openid"),orderMoney:parseFloat(this.buyMoney),payType:this.payType,orderSource:this.orderSource,couponList:t};this.$request("orderc/order/codePay",e).then((function(t){if("00"==t.code){if(t.data.errorMessage)return void o.showToast({title:t.data.errorMessage,icon:"none"});n.signType=t.data.signType,n.paySign=t.data.sign,n.timeStamp=t.data.timestamp,n.nonceStr=t.data.noncestr,n.package=t.data.package,n.goPay()}else o.showToast({title:t.message,icon:"none"})})).catch((function(o){}))}},goPay:function(){o.requestPayment({provider:"wxpay",timeStamp:this.timeStamp,nonceStr:this.nonceStr,package:this.package,signType:this.signType,paySign:this.paySign,success:function(n){o.redirectTo({url:"../paySuccess/paySuccess"})},fail:function(n){o.showToast({title:n.errMsg,icon:"none"})}})}},watch:{buyMoney:function(o,n){"."==o&&""==n&&(this.buyMoney="0."),"0"==o&&""==n&&(this.buyMoney="0."),2==o.length&&0==o.substr(0,1)&&"."!=o.substr(1,2)&&(this.buyMoney=o.substr(1,2)),isNaN(o)&&"."!=o&&(this.buyMoney=n);var t=String(this.buyMoney).indexOf(".")+1,e=String(this.buyMoney).length-t;e>2&&t>0&&(this.buyMoney=n)}}};n.default=a}).call(this,t("543d")["default"])},"3db3":function(o,n,t){"use strict";var e;t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return e}));var a=function(){var o=this,n=o.$createElement,t=(o._self._c,""!=o.chooseCouponObj?o.chooseCouponObj.savedMoney.toFixed(2):null);o.$mp.data=Object.assign({},{$root:{g0:t}})},i=[]},"6a16":function(o,n,t){"use strict";t.r(n);var e=t("3778"),a=t.n(e);for(var i in e)"default"!==i&&function(o){t.d(n,o,(function(){return e[o]}))}(i);n["default"]=a.a},"7f8b":function(o,n,t){},"9dd6":function(o,n,t){"use strict";var e=t("7f8b"),a=t.n(e);a.a},d410:function(o,n,t){"use strict";(function(o){t("6909"),t("921b");e(t("66fd"));var n=e(t("2296"));function e(o){return o&&o.__esModule?o:{default:o}}o(n.default)}).call(this,t("543d")["createPage"])}},[["d410","common/runtime","common/vendor"]]]);
\ No newline at end of file
......@@ -6,37 +6,8 @@
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
"minified": true
},
"compileType": "miniprogram",
"libVersion": "",
......@@ -44,15 +15,19 @@
"projectname": "uni-pdtravel",
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
......
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
{"version":3,"sources":["uni-app:///main.js"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA,wCAAmB;AACnB;AACA,0M;AACAA,UAAU,CAACC,YAAD,CAAV,C","file":"pages/aaa/abc/abc.js","sourcesContent":["import 'uni-pages';import '@dcloudio/uni-stat';\nimport Vue from 'vue'\nimport Page from './pages/aaa/abc/abc.vue'\ncreatePage(Page)"],"sourceRoot":""}
\ No newline at end of file
......@@ -872,7 +872,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
}
}
......@@ -7446,7 +7446,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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 + ']');
......@@ -7467,14 +7467,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","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({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
......@@ -7560,7 +7560,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) {
if (Object({"NODE_ENV":"development","VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_NAME":"uni-pdtravel","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新',
JSON.stringify(diffData));
......@@ -11622,6 +11622,7 @@ if (true) {//开发环境
} else {}
var request = function request() {var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'POST';
uni.showLoading({ title: '加载中', mask: true });
data.reqId = new Date().getTime(); //获取时间戳
return new Promise(function (resolve, reject) {
uni.request({
......@@ -11629,10 +11630,12 @@ var request = function request() {var url = arguments.length > 0 && arguments[0]
url: baseUrl + url + '?token=' + uni.getStorageSync("openid"),
data: data,
dataType: 'json' }).
then(function (response) {var _response = _slicedToArray(
then(function (response) {
uni.hideLoading();var _response = _slicedToArray(
response, 2),error = _response[0],res = _response[1];
resolve(res.data);
}).catch(function (error) {var _error = _slicedToArray(
}).catch(function (error) {
uni.hideLoading();var _error = _slicedToArray(
error, 2),err = _error[0],res = _error[1];
reject(err);
});
......
<view><view class="top"><view class="top-search"></view><view class="top-content"><view><navigator url="../scenic/scenic"><image src="../../static/img/index/classify1.png"></image><view>景区门票</view></navigator></view><view><navigator url="../hotel/hotel"><image src="../../static/img/index/classify2.png"></image><view>酒店民宿</view></navigator></view><view><navigator url="../restaurant/restaurant"><image src="../../static/img/index/classify3.png"></image><view>特色美食</view></navigator></view><view><navigator url="../nearby/nearby"><image src="../../static/img/index/classify4.png"></image><view>周边游</view></navigator></view><view><navigator url="../travelOne/travelOne"><image src="../../static/img/index/classify5.png"></image><view>跟团游</view></navigator></view><view><navigator url="../travelTwo/travelTwo"><image src="../../static/img/index/classify6.png"></image><view>亲子游</view></navigator></view><view><navigator url="../dingzhi/dingzhi"><image src="../../static/img/index/classify7.png"></image><view>行程订制</view></navigator></view><view><navigator url="../special/special"><image src="../../static/img/index/classify8.png"></image><view>特产好礼</view></navigator></view></view><view class="top-img"></view></view><view hidden="{{!(showBottom)}}" class="bottom"><web-view src="https://wx.pangdly.com"></web-view></view></view>
\ No newline at end of file
<view hidden="{{!(showBottom)}}" class="bottom"><web-view src="https://wx.pangdly.com"></web-view></view>
\ No newline at end of file
......@@ -145,9 +145,6 @@ var _default =
onLoad: function onLoad() {
uni.showLoading({
title: '加载中...' });
var _this = this;
uni.getProvider({
service: 'oauth',
......@@ -161,7 +158,6 @@ var _default =
source: 3 };
_this.$request('wechat/wx/getUserInfoByCode', data).then(function (res) {
uni.hideLoading();
if (res.code == '00') {
var openid = res.data.openid;
uni.setStorageSync('openid', openid);
......
<view><view hidden="{{!(bodyShow)}}" class="middle"><view class="main"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><block wx: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 wx:if="{{item.depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+item.depositReceived}}</text></block></text></view><block wx:if="{{item.pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{item.pdDiscountMoney+''}}</text></view></block></view></block></block><block wx: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 wx:if="{{depositReceived}}"><text style="margin-top:15rpx;font-size:22rpx;display:inline-block;color:#f45803;">{{"押金:"+depositReceived}}</text></block></text></view><block wx: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/orderPayment/weixin.png"></image><view>微信支付</view><image style="width:32rpx;height:32rpx;" src="/static/img/orderPayment/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']]]]}}" style="{{'background:'+(background)+';'}}" bindtap="__e">去支付</text></view></view></view>
\ No newline at end of file
<view><view hidden="{{!(bodyShow)}}" class="middle"><view class="main"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="__i0__" wx:key="id"><block wx: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+''}}<block wx:if="{{item.depositReceived}}"><text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;">{{"押金:"+item.depositReceived}}</text></block></text></view><block wx:if="{{item.pdDiscountMoney}}"><view class="coupon"><text>券</text><text><text style="font-size:24rpx;">-¥</text>{{item.pdDiscountMoney+''}}</text></view></block></view></block></block><block wx: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+''}}<block wx:if="{{depositReceived}}"><text style="margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;">{{"押金:"+depositReceived}}</text></block></text></view><block wx: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/orderPayment/weixin.png"></image><view>微信支付</view><image style="width:32rpx;height:32rpx;" src="/static/img/orderPayment/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']]]]}}" style="{{'background:'+(background)+';'}}" bindtap="__e">去支付</text></view></view></view>
\ No newline at end of file
......@@ -260,12 +260,15 @@ __webpack_require__.r(__webpack_exports__);
couponData: "", //所有劵数据
chooseCouponObj: "", //默认选中最优价格优惠券
ableConpon: "", //没有可用优惠券时,达到一定条件可用,显示达到的条件
orderSource: 8 //1公众号平台、2公众号组合页面1、3公众号组合页面2、4胖丁伙伴app、5第三方自助机、6第三方票房窗口、7平台快捷买单、8扫码支付
orderSource: 8, //1公众号平台、2公众号组合页面1、3公众号组合页面2、4胖丁伙伴app、5第三方自助机、6第三方票房窗口、7平台快捷买单、8扫码支付
background: "", //普通按钮背景颜色
payBackground: "#1dce2e" //支付背景颜色
};
},
onLoad: function onLoad(option) {
this.companyId = option.companyId;
this.merchantId = option.merchantId;
this.option = decodeURIComponent(option.q);
// this.companyId=option.companyId
// this.merchantId=option.merchantId
if (this.merchantId) {//大商家的有merchantId
this.init();
} else {//小商家没有merchantId
......@@ -311,9 +314,7 @@ __webpack_require__.r(__webpack_exports__);
"merchantId": this.merchantId,
"companyId": this.companyId };
uni.showLoading({ title: '加载中', mask: true });
this.$request("scenic/order/findCodePayInfo", data).then(function (res) {
uni.hideLoading();
if (res.code == "00") {
_this3.name = res.data.name;
} else {
......@@ -328,9 +329,7 @@ __webpack_require__.r(__webpack_exports__);
var data = {
"id": this.companyId };
uni.showLoading({ title: '加载中', mask: true });
this.$request("user/company/detail", data).then(function (res) {
uni.hideLoading();
if (res.code == "00") {
_this4.name = res.data.companyVo.companyName;
} else {
......@@ -380,6 +379,10 @@ __webpack_require__.r(__webpack_exports__);
},
clickPay: function clickPay() {var _this6 = this; //---------------------------------------------------------------点击立即支付,获取支付需要的参数
if (!parseFloat(this.buyMoney)) {
uni.showToast({
title: "请输入正确金额",
icon: "none" });
return;
}
var couponList = [];
......@@ -403,11 +406,11 @@ __webpack_require__.r(__webpack_exports__);
orderSource: this.orderSource, //订单来源 8扫码支付
couponList: couponList //券列表
};
// this.$refs.pay.$el.style.cssText="background:#cccccc;"
this.payBackground = "#cccccc";
this.$request("orderc/order/codePay", data).then(function (res) {
// setTimeout(() => {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
// },1000)
setTimeout(function () {
_this6.payBackground = "#1dce2e";
}, 1000);
if (res.code == "00") {
if (res.data.errorMessage) {
uni.showToast({
......@@ -430,7 +433,7 @@ __webpack_require__.r(__webpack_exports__);
}
}).catch(function (err) {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
_this6.payBackground = "#1dce2e";
});
},
goPay: function goPay() {//------------------------------------------------------------------------------去支付
......@@ -476,11 +479,11 @@ __webpack_require__.r(__webpack_exports__);
if (y > 2 && x > 0) {
this.buyMoney = oldVal;
}
// if (parseFloat(this.buyMoney)) {
// this.$refs.pay.$el.style.cssText="background:#1dce2e;"
// } else {
// this.$refs.pay.$el.style.cssText="background:#cccccc;"
// }
if (parseFloat(this.buyMoney)) {
this.payBackground = "#1dce2e";
} else {
this.payBackground = "#cccccc";
}
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
......
<view class="bigBox"><view class="top"><view class="topName"><text class="topIcon"><text class="iconfont icon-tubiaolunkuo-"></text></text><text>{{name}}</text></view><view class="topMoney"><text class="moneyText">支付金额</text><view class="moneyNumber"><text class="iconfont icon-fl-renminbi" style="font-size:56rpx;"></text><text>{{buyMoney}}</text><text></text></view></view><block wx:if="{{couponData.usableCouponList&&couponData.usableCouponList.length>0&&chooseCouponObj==''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{couponData.usableCouponList[0].couponName}}</text></view><view class="couponRight"><text>未选优惠券</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block><block wx:if="{{chooseCouponObj!=''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{chooseCouponObj.couponName}}</text></view><view class="couponRight"><text>-</text><text>{{$root.g0}}</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block><block wx:if="{{ableConpon!=''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{ableConpon.couponName}}</text></view><view class="couponRight"><text>{{ableConpon.couponRule}}</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block></view><view class="middle">友情提示:请核对以上付款金额、付款商户等信息与交易一致。经您确认支付的金额,商家不会退回亦无赔偿义务。</view><view class="bottom"><view class="botLeft"><view><text data-ref="1" data-event-opts="{{[['tap',[['clickNum',[1]]]]]}}" class="vue-ref" bindtap="__e">1</text><text data-ref="2" data-event-opts="{{[['tap',[['clickNum',[2]]]]]}}" class="vue-ref" bindtap="__e">2</text><text data-ref="3" data-event-opts="{{[['tap',[['clickNum',[3]]]]]}}" class="vue-ref" bindtap="__e">3</text></view><view><text data-ref="4" data-event-opts="{{[['tap',[['clickNum',[4]]]]]}}" class="vue-ref" bindtap="__e">4</text><text data-ref="5" data-event-opts="{{[['tap',[['clickNum',[5]]]]]}}" class="vue-ref" bindtap="__e">5</text><text data-ref="6" data-event-opts="{{[['tap',[['clickNum',[6]]]]]}}" class="vue-ref" bindtap="__e">6</text></view><view><text data-ref="7" data-event-opts="{{[['tap',[['clickNum',[7]]]]]}}" class="vue-ref" bindtap="__e">7</text><text data-ref="8" data-event-opts="{{[['tap',[['clickNum',[8]]]]]}}" class="vue-ref" bindtap="__e">8</text><text data-ref="9" data-event-opts="{{[['tap',[['clickNum',[9]]]]]}}" class="vue-ref" bindtap="__e">9</text></view><view><text data-ref="0" data-event-opts="{{[['tap',[['clickNum',[0]]]]]}}" class="vue-ref" style="width:66.7%;" bindtap="__e">0</text><text data-ref="." data-event-opts="{{[['tap',[['clickNum',['.']]]]]}}" class="vue-ref" style="width:33.3%;" bindtap="__e">.</text></view></view><view class="botRight"><view data-ref="enter" data-event-opts="{{[['tap',[['clickEnter']]]]}}" class="rightOne vue-ref" bindtap="__e"><text class="iconfont icon-im_huige" style="font-size:70rpx;"></text></view><view data-ref="pay" data-event-opts="{{[['tap',[['clickPay']]]]}}" class="rightTwo vue-ref" bindtap="__e"><view>立即</view><view>支付</view></view></view></view><order-coupon class="vue-ref" vue-id="ed07b280-1" couponData="{{couponData}}" chooseCouponObj="{{chooseCouponObj}}" data-ref="orderCoupon" data-event-opts="{{[['^couponChoose',[['couponChoose']]]]}}" bind:couponChoose="__e" bind:__l="__l"></order-coupon></view>
\ No newline at end of file
<view class="bigBox"><view class="top"><view class="topName"><text class="topIcon"><text class="iconfont icon-tubiaolunkuo-"></text></text><text>{{name}}</text></view><view class="topMoney"><text class="moneyText">支付金额</text><view class="moneyNumber"><text class="iconfont icon-fl-renminbi" style="font-size:56rpx;"></text><text>{{buyMoney}}</text><text></text></view></view><block wx:if="{{couponData.usableCouponList&&couponData.usableCouponList.length>0&&chooseCouponObj==''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{couponData.usableCouponList[0].couponName}}</text></view><view class="couponRight"><text>未选优惠券</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block><block wx:if="{{chooseCouponObj!=''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{chooseCouponObj.couponName}}</text></view><view class="couponRight"><text>-</text><text>{{$root.g0}}</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block><block wx:if="{{ableConpon!=''}}"><view data-event-opts="{{[['tap',[['showCoupon']]]]}}" class="topCoupon" bindtap="__e"><view class="couponLeft"><text>券</text><text>{{ableConpon.couponName}}</text></view><view class="couponRight"><text>{{ableConpon.couponRule}}</text><text class="iconfont icon-you" style="font-size:32rpx;"></text></view></view></block></view><view class="middle">友情提示:请核对以上付款金额、付款商户等信息与交易一致。经您确认支付的金额,商家不会退回亦无赔偿义务。</view><view class="bottom"><view class="botLeft"><view><text data-ref="1" data-event-opts="{{[['tap',[['clickNum',[1]]]]]}}" class="vue-ref" bindtap="__e">1</text><text data-ref="2" data-event-opts="{{[['tap',[['clickNum',[2]]]]]}}" class="vue-ref" bindtap="__e">2</text><text data-ref="3" data-event-opts="{{[['tap',[['clickNum',[3]]]]]}}" class="vue-ref" bindtap="__e">3</text></view><view><text data-ref="4" data-event-opts="{{[['tap',[['clickNum',[4]]]]]}}" class="vue-ref" bindtap="__e">4</text><text data-ref="5" data-event-opts="{{[['tap',[['clickNum',[5]]]]]}}" class="vue-ref" bindtap="__e">5</text><text data-ref="6" data-event-opts="{{[['tap',[['clickNum',[6]]]]]}}" class="vue-ref" bindtap="__e">6</text></view><view><text data-ref="7" data-event-opts="{{[['tap',[['clickNum',[7]]]]]}}" class="vue-ref" bindtap="__e">7</text><text data-ref="8" data-event-opts="{{[['tap',[['clickNum',[8]]]]]}}" class="vue-ref" bindtap="__e">8</text><text data-ref="9" data-event-opts="{{[['tap',[['clickNum',[9]]]]]}}" class="vue-ref" bindtap="__e">9</text></view><view><text data-ref="0" data-event-opts="{{[['tap',[['clickNum',[0]]]]]}}" class="vue-ref" style="width:66.7%;" bindtap="__e">0</text><text data-ref="." data-event-opts="{{[['tap',[['clickNum',['.']]]]]}}" class="vue-ref" style="width:33.3%;" bindtap="__e">.</text></view></view><view class="botRight"><view data-ref="enter" data-event-opts="{{[['tap',[['clickEnter']]]]}}" class="rightOne vue-ref" bindtap="__e"><text class="iconfont icon-im_huige" style="font-size:70rpx;"></text></view><view data-ref="pay" data-event-opts="{{[['tap',[['clickPay']]]]}}" class="rightTwo vue-ref" style="{{'background:'+(payBackground)+';'}}" bindtap="__e"><view>立即</view><view>支付</view></view></view></view><order-coupon class="vue-ref" vue-id="ed07b280-1" couponData="{{couponData}}" chooseCouponObj="{{chooseCouponObj}}" data-ref="orderCoupon" data-event-opts="{{[['^couponChoose',[['couponChoose']]]]}}" bind:couponChoose="__e" bind:__l="__l"></order-coupon></view>
\ No newline at end of file
......@@ -219,7 +219,6 @@
height: 75%;
border: none;
color: #FFFFFF;
background: #1dce2e;
display: -webkit-box;
display: -webkit-flex;
display: flex;
......
......@@ -23,6 +23,12 @@
"pathName": "pages/ourPayment/ourPayment",
"query": "",
"scene": null
},
{
"name": "pages/orderPayment/orderPayment",
"pathName": "pages/orderPayment/orderPayment",
"query": "",
"scene": null
}
]
}
......
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