no message
This commit is contained in:
77
components/popup-pay-again/index.js
Normal file
77
components/popup-pay-again/index.js
Normal file
@@ -0,0 +1,77 @@
|
||||
var e = require("../../common/vendor.js"),
|
||||
u = require("../../enums/index.js"),
|
||||
r = require("../../utils/common.js");
|
||||
require("../../service/index.js"),
|
||||
require("../../utils/request.js"),
|
||||
require("../../hooks/useState.js"),
|
||||
require("../../store/app/index.js"),
|
||||
require("../../data/index.js"),
|
||||
require("../../config/index.js"),
|
||||
require("../../constant/index.js"),
|
||||
require("../../utils/util.js"),
|
||||
require("../../utils/navigate.js"),
|
||||
Array || e.resolveComponent("uni-popup")(),
|
||||
Math;
|
||||
var n = {
|
||||
__name: "index",
|
||||
props: { visible: { type: Boolean, default: !1 } },
|
||||
emits: ["close", "confirm"],
|
||||
setup: function (n, i) {
|
||||
var t = i.emit,
|
||||
o = n,
|
||||
a = e.ref(null),
|
||||
s = e.ref(null);
|
||||
e.watch(
|
||||
function () {
|
||||
return o.visible;
|
||||
},
|
||||
function () {
|
||||
o.visible
|
||||
? (r.isSupportWeChatPay()
|
||||
? (s.value = u.PayMethodEnum.WECHAT_PAY)
|
||||
: r.isSupportAliPay && (s.value = u.PayMethodEnum.ALI_PAY),
|
||||
a.value.open())
|
||||
: a.value.close();
|
||||
}
|
||||
);
|
||||
var l = function (e) {
|
||||
e.show || t("close");
|
||||
},
|
||||
c = function () {
|
||||
t("close");
|
||||
},
|
||||
p = function () {
|
||||
t("confirm", s.value);
|
||||
},
|
||||
f = function (e) {
|
||||
s.value = e.detail.value;
|
||||
};
|
||||
return function (n, i) {
|
||||
return e.e(
|
||||
{ a: e.o(c), b: e.unref(r.isSupportWeChatPay)() },
|
||||
e.unref(r.isSupportWeChatPay)()
|
||||
? {
|
||||
c: e.unref(u.PayMethodEnum).WECHAT_PAY,
|
||||
d: s.value === e.unref(u.PayMethodEnum).WECHAT_PAY,
|
||||
}
|
||||
: {},
|
||||
{ e: e.unref(r.isSupportAliPay)() },
|
||||
e.unref(r.isSupportAliPay)()
|
||||
? {
|
||||
f: e.unref(u.PayMethodEnum).ALI_PAY,
|
||||
g: s.value === e.unref(u.PayMethodEnum).ALI_PAY,
|
||||
}
|
||||
: {},
|
||||
{
|
||||
h: e.o(f),
|
||||
i: e.o(p),
|
||||
j: e.sr(a, "c238c94e-0", { k: "popup" }),
|
||||
k: e.o(l),
|
||||
l: e.p({ type: "center", "is-mask-click": !1, animation: !0 }),
|
||||
}
|
||||
);
|
||||
};
|
||||
},
|
||||
},
|
||||
i = e._export_sfc(n, [["__scopeId", "data-v-c238c94e"]]);
|
||||
wx.createComponent(i);
|
||||
6
components/popup-pay-again/index.json
Normal file
6
components/popup-pay-again/index.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
55
components/popup-pay-again/index.wxml
Normal file
55
components/popup-pay-again/index.wxml
Normal file
@@ -0,0 +1,55 @@
|
||||
<uni-popup
|
||||
bind:__l="__l"
|
||||
bindchange="{{k}}"
|
||||
class="r data-v-c238c94e"
|
||||
uI="c238c94e-0"
|
||||
uP="{{l}}"
|
||||
uR="popup"
|
||||
uS="{{['d']}}"
|
||||
wx:if="{{l}}"
|
||||
>
|
||||
<view class="content data-v-c238c94e">
|
||||
<image
|
||||
bindtap="{{a}}"
|
||||
class="close data-v-c238c94e"
|
||||
src="/static/svgs/icon_close_2.svg"
|
||||
></image>
|
||||
<view class="title data-v-c238c94e">支付订单</view>
|
||||
<radio-group bindchange="{{h}}" class="pay-group data-v-c238c94e">
|
||||
<label class="data-v-c238c94e" wx:if="{{b}}">
|
||||
<image
|
||||
class="data-v-c238c94e"
|
||||
src="/static/images/logo_wechat.png"
|
||||
></image>
|
||||
<text class="pay-name data-v-c238c94e">微信支付</text>
|
||||
<radio
|
||||
checked="{{d}}"
|
||||
class="data-v-c238c94e"
|
||||
color="#FA5E29"
|
||||
value="{{c}}"
|
||||
></radio>
|
||||
</label>
|
||||
<label class="data-v-c238c94e" wx:if="{{e}}">
|
||||
<image
|
||||
class="data-v-c238c94e"
|
||||
src="/static/images/logo_alipay.png"
|
||||
></image>
|
||||
<text class="pay-name data-v-c238c94e">支付宝支付</text>
|
||||
<radio
|
||||
checked="{{g}}"
|
||||
class="data-v-c238c94e"
|
||||
color="#FA5E29"
|
||||
value="{{f}}"
|
||||
></radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view
|
||||
bindtap="{{i}}"
|
||||
class="button data-v-c238c94e"
|
||||
hoverClass="default-ihover-class"
|
||||
hoverStayTime="100"
|
||||
>
|
||||
确认支付
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
69
components/popup-pay-again/index.wxss
Normal file
69
components/popup-pay-again/index.wxss
Normal file
@@ -0,0 +1,69 @@
|
||||
.content.data-v-c238c94e {
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 40rpx;
|
||||
width: 600rpx;
|
||||
}
|
||||
.content .close.data-v-c238c94e {
|
||||
height: 30rpx;
|
||||
padding: 20rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 20rpx;
|
||||
width: 30rpx;
|
||||
}
|
||||
.content .title.data-v-c238c94e {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.content .pay-group.data-v-c238c94e {
|
||||
flex-direction: column;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.content .pay-group label.data-v-c238c94e,
|
||||
.content .pay-group.data-v-c238c94e {
|
||||
align-items: center;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.content .pay-group label.data-v-c238c94e {
|
||||
border-bottom: 2rpx solid #f2f2f2;
|
||||
justify-content: space-between;
|
||||
padding: 25rpx 0;
|
||||
}
|
||||
.content .pay-group label image.data-v-c238c94e {
|
||||
flex-shrink: 0;
|
||||
height: 56rpx;
|
||||
width: 56rpx;
|
||||
}
|
||||
.content .pay-group label text.data-v-c238c94e {
|
||||
flex-grow: 1;
|
||||
font-size: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.content .button.data-v-c238c94e {
|
||||
align-items: center;
|
||||
background-color: #1f68e9;
|
||||
border-radius: 100rpx;
|
||||
color: #fff;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
height: 80rpx;
|
||||
justify-content: center;
|
||||
margin: 50rpx 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
radio.data-v-c238c94e {
|
||||
flex-shrink: 0;
|
||||
transform: scale(0.8);
|
||||
}
|
||||
Reference in New Issue
Block a user