更换版本

This commit is contained in:
2024-01-22 18:48:00 +08:00
parent 9f65ea8fd9
commit 00e6dcaec0
1158 changed files with 70609 additions and 51780 deletions

143
pages/part/pay/index.js Normal file
View File

@@ -0,0 +1,143 @@
var a;
(a = getApp()),
Page({
data: { order_id: 0, order_line: [], tel: "", name: "", address: "" },
onLoad: function (t) {
var e = this,
d = t.id;
e.setData({ order_id: d }),
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.pay_set",
uid: a.getuid(),
id: d,
},
success: function (a) {
e.setData({ order_line: a.data.data.order }),
a.data.data.address
? e.setData({
tel: a.data.data.address.tel,
name: a.data.data.address.name,
address: a.data.data.address.address,
})
: e._setAddress();
},
});
},
_setAddress: function () {
var t = this;
wx.cadss({
success: function (e) {
var d = e.telNumber,
s = e.userName,
r =
e.provinceName +
" " +
e.cityName +
" " +
e.countyName +
" " +
e.detailInfo;
t.setData({ tel: d, name: s, address: r }),
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.address_save",
uid: a.getuid(),
name: s,
tel: d,
address: r,
},
success: function (a) {},
});
},
fail: function (a) {
wx.showModal({
content: "收货地址必选",
showCancel: !1,
success: function (a) {
wx.openSetting({
success: function () {
t._setAddress();
},
});
},
});
},
});
},
addressSave: function () {
this._setAddress();
},
pay: function (t) {
var e = this,
d = t.detail.formId;
if (!e.data.name || !e.data.tel || !e.data.address)
return (
wx.showModal({
content: "请填写收货地址",
showCancel: !1,
success: function (a) {
this._setAddress();
},
}),
!1
);
a.util.request({
url: "entry/wxapp/payPartOrder",
data: {
m: "monai_market",
id: this.data.order_id,
uid: a.getuid(),
formid: d,
},
success: function (t) {
if (
("OK" == t.data.message &&
wx.redirectTo({ url: "/pages/part/order/index?status=3" }),
t.data.data)
) {
var d = t.data.data.fid;
t.data.data.money,
wx.requestPayment({
timeStamp: t.data.data.timeStamp,
nonceStr: t.data.data.nonceStr,
package: t.data.data.package,
signType: "MD5",
paySign: t.data.data.paySign,
success: function (t) {
console.log(t),
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.pay_callback",
uid: a.getuid(),
oid: e.data.order_id,
fid: d,
},
success: function (a) {
console.log(a);
},
}),
wx.redirectTo({ url: "/pages/part/order/index?status=3" });
},
fail: function (a) {
wx.redirectTo({ url: "/pages/part/order/index?status=2" });
},
});
}
},
fail: function (a) {
wx.showModal({
content: "支付失败",
showCancel: !1,
success: function (a) {},
});
},
});
},
});

View File

@@ -0,0 +1 @@
{ "navigationBarTitleText": "商品下单", "usingComponents": {} }

36
pages/part/pay/index.wxml Normal file
View File

@@ -0,0 +1,36 @@
<view class="top_view">
<view>
<view class="message_border">收货人:{{name}} <text class="message_border_right">{{tel}}</text>
</view>
<view bindtap="addressSave" class="dizhi_border">
<view class="dizhi_border_img_border">
<image class="dizhi_border_img" src="../../image/dingwei_icn.png"></image>
</view>
<view class="dizhi_border_text">收货地址:{{address}}</view>
<view class="dizhi_border_img_border">
<image class="dizhi_border_backimg" src="../../image/jiantou_btn.png"></image>
</view>
</view>
<image class="huatiao" src="../../image/border_line.png"></image>
</view>
<view class="style_view">支付方式 <view style="float:right;color:#b2b2b2">微信支付</view>
</view>
</view>
<view class="modle_border">
<view class="modle">
<image class="modle_img" mode="aspectFill" src="{{order_line.part_img}}"></image>
<view class="modle_title">{{order_line.part_name}}</view>
<view class="modle_title_right">x1</view>
<view class="modle_title_bottom">¥{{order_line.part_price}}</view>
</view>
<view class="heji_modle">
<view style="float:right">小计: <text style="font-weight: bold;font-size:30rpx;">¥{{order_line.part_price}}</text>
</view>
</view>
</view>
<view class="bottom_nav">
<form bindsubmit="pay" reportSubmit="true">
<button class="bottom_nav_btn" formType="submit">付款</button>
</form>
<text style="margin-left:24px;" wx:if="{{kill_status!=1}}">实付款:¥{{order_line.part_price}}</text>
</view>

283
pages/part/pay/index.wxss Normal file
View File

@@ -0,0 +1,283 @@
page {
background: #f0f0f0;
height: 100%;
}
.top_view {
background: #fff;
}
.message_border {
color: #000;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
padding-left: 5%;
padding-right: 5%;
width: 90%;
}
.message_border_right {
color: #333;
float: right;
font-size: 24rpx;
}
.dizhi_border {
padding-top: 20rpx;
width: 100%;
}
.dizhi_border_img_border {
float: left;
text-align: center;
width: 10%;
}
.dizhi_border_img {
height: 30rpx;
padding-top: 5rpx;
vertical-align: top;
width: 30rpx;
}
.dizhi_border_backimg {
height: 35rpx;
padding-top: 5rpx;
vertical-align: top;
width: 35rpx;
}
.dizhi_border_text {
color: #555;
float: left;
font-size: 24rpx;
width: 80%;
}
.huatiao {
border-bottom: 15rpx solid #f0f0f0;
height: 6rpx;
width: 100%;
}
.style_view {
border-bottom: 1rpx solid #f0f0f0;
color: #333;
font-size: 28rpx;
height: 88rpx;
line-height: 88rpx;
padding-left: 5%;
padding-right: 5%;
width: 90%;
}
.style_view:last-child {
border-bottom: 15rpx solid #f0f0f0;
}
.style_view_img {
float: right;
height: 22rpx;
margin-top: 33rpx;
width: 12rpx;
}
.modle_border {
background: #fff;
width: 100%;
}
.modle {
border-bottom: 1rpx solid #f0f0f0;
height: 132rpx;
margin-left: 5%;
padding-bottom: 15rpx;
padding-top: 15rpx;
position: relative;
width: 90%;
}
.modle_img {
float: left;
height: 132rpx;
width: 132rpx;
}
.modle_title {
color: #333;
float: left;
font-size: 30rpx;
line-height: 30rpx;
margin-top: 5rpx;
padding-left: 3%;
width: 70%;
}
.modle_title_right {
float: right;
font-size: 24rpx;
}
.modle_title_bottom {
color: #555;
float: left;
font-size: 28rpx;
line-height: 30rpx;
margin-top: 60rpx;
padding-left: 3%;
width: 70%;
}
.heji_modle {
color: #333;
font-size: 24rpx;
height: 100rpx;
line-height: 100rpx;
margin-left: 5%;
width: 90%;
}
.nav {
height: 95rpx;
width: 100%;
}
.bottom_nav {
background: #fff;
bottom: -1rpx;
box-shadow: 0-1px 0 0 rgba(0, 0, 0, 0.1);
color: #333;
font-size: 30rpx;
height: 89rpx;
line-height: 89rpx;
position: fixed;
width: 100%;
}
.bottom_nav_btn {
background: #3d61f0;
border-radius: 0rpx;
color: #fff;
float: right;
font-size: 30rpx;
height: 88rpx;
line-height: 88rpx;
margin: 0;
padding: 0;
text-align: center;
width: 180rpx;
}
.mengceng_view {
background: rgba(0, 0, 0, 0.2);
height: 100%;
position: fixed;
top: 0rpx;
width: 100%;
}
.mengceng_view_top {
height: 50%;
width: 100%;
}
.mengceng_view_bottom {
background: #fff;
height: 50%;
width: 100%;
}
.mengceng_view_peisong {
color: #333;
font-size: 30rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
}
.mengceng_view_modle,
.mengceng_view_peisong {
border-bottom: 1rpx solid #f0f0f0;
margin-left: 5%;
width: 90%;
}
.mengceng_view_modle {
color: #555;
font-size: 28rpx;
height: 88rpx;
line-height: 88rpx;
}
.mengceng_view_modle_img {
float: right;
height: 35rpx;
margin-top: 25rpx;
width: 35rpx;
}
.mengceng_view_btn {
background: #b2b2b2;
bottom: 30rpx;
color: #fff;
font-size: 30rpx;
margin-left: 5%;
position: absolute;
width: 90%;
}
.mengceng_view_btn_active {
background: #333;
}
.tag_s {
color: #fff;
font-size: 18rpx;
left: 90rpx;
position: absolute;
top: 0rpx;
}
.tag_s image {
height: 31rpx;
width: 67rpx;
}
.modle_1_nav {
background: #fff;
border-bottom: 1rpx solid #f9f9f9;
font-size: 0;
height: 60rpx;
line-height: 60rpx;
position: fixed;
top: 0rpx;
width: 100%;
z-index: 10;
}
.modle_1_nav_modle {
color: #989898;
display: inline-block;
font-size: 28rpx;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
word-break: keep-all;
}
.modle_1_nav_active {
color: #333;
line-height: 52rpx;
}
.modle_1_nav_modle_border {
background: #333;
height: 5rpx;
margin: 0 auto;
width: 30rpx;
}
.modle_1nav {
height: 63rpx;
width: 100%;
}
.shuru {
border-bottom: 1rpx solid #f0f0f0;
color: #333;
font-size: 28rpx;
height: 88rpx;
line-height: 88rpx;
overflow: hidden;
padding-left: 5%;
padding-right: 5%;
text-overflow: ellipsis;
white-space: nowrap;
width: 90%;
word-break: keep-all;
}
.shuru_nav {
background: #f0f0f0;
height: 15rpx;
width: 100%;
}
.shuru_input {
height: 88rpx;
}
.shuru_input,
.shuru_text {
display: inline-block;
font-size: 28rpx;
line-height: 88rpx;
}
.shuru_text {
color: #333;
vertical-align: top;
}
.kill {
color: #ec6d6e;
font-size: 20rpx;
}