更换版本

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

171
pages/part/apply/index.js Normal file
View File

@@ -0,0 +1,171 @@
var t;
(t = getApp()),
Page({
data: {
buttscan: !1,
isShow: !1,
carTypeId: 0,
carTypeName: "请选择车型",
carTypeList: [],
partTypeId: 0,
partTypeName: "请选择配件类型",
partTypeList: [
{ id: 1, name: "原厂全新" },
{ id: 2, name: "副厂全新" },
{ id: 3, name: "原车拆件" },
],
tel: "",
partImg: "",
imgPath: "",
},
onLoad: function (a) {
var e = this;
console.log(e.data.partTypeList),
t.util.getUserInfo(function (t) {
t.memberInfo || e.setData({ isShow: !0 });
}),
t.util.request({
url: "entry/wxapp/Api",
data: { m: "monai_market", r: "part.index.get_car_type" },
success: function (t) {
e.setData({ carTypeList: t.data.data });
},
});
},
hideDialog: function () {
this.setData({ isShow: !this.data.isShow });
},
updateUserInfo: function (a) {
var e = this;
t.util.getUserInfo(function (t) {
wx.setStorageSync("uid", t.memberInfo.uid), e.hideDialog();
}, a.detail);
},
selectCarType: function (t) {
console.log(t), console.log(t.detail.value);
var a = this.data.carTypeList[t.detail.value];
a && this.setData({ carTypeId: a.id, carTypeName: a.name });
},
selectPartType: function (t) {
var a = this.data.partTypeList[t.detail.value];
a && this.setData({ partTypeId: a.id, partTypeName: a.name });
},
getPhoneNumber: function (a) {
console.log(a);
var e = this;
t.util.request({
url: "entry/wxapp/Api",
data: {
r: "part.index.get_tel",
m: "monai_market",
iv: a.detail.iv,
encryptedData: a.detail.encryptedData,
},
success: function (t) {
e.setData({ tel: t.data.data });
},
});
},
release: function (a) {
var e = this;
if (e.data.buttscan) return !1;
e.setData({ buttscan: !0 });
var r = e.data.imgPath;
if (!r)
return (
t.util.message({ title: "请上传配件图片", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var i = a.detail.value.part_name;
if (!i)
return (
t.util.message({ title: "请输入配件名称", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var s = e.data.carTypeId;
if (s <= 0)
return (
t.util.message({ title: "请选择车型", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var n = a.detail.value.car_year;
if (!n)
return (
t.util.message({ title: "请输入年份", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var u = e.data.partTypeId;
if (u <= 0)
return (
t.util.message({ title: "请选择配件类型", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var p = a.detail.value.user_tel;
if (!n)
return (
t.util.message({ title: "请输入手机号码", type: "error" }),
e.setData({ buttscan: !1 }),
!1
);
var c = {
r: "part.index.order_add",
m: "monai_market",
uid: t.getuid(),
part_img: r,
part_name: i,
car_type: s,
car_year: n,
part_type: u,
user_tel: p,
};
t.util.request({
url: "entry/wxapp/Api",
data: c,
success: function (t) {
wx.showModal({
content: "提交成功",
showCancel: !1,
success: function (t) {
e.setData({ buttscan: !1 }), wx.navigateBack();
},
});
},
fail: function (t) {
e.setData({ buttscan: !1 });
},
});
},
upcarsimgs: function () {
var a = this;
t.upimgs({
scannums: 1,
filename: "parts",
success: function (t) {
console.log(t), a.setData({ partImg: t[0].all, imgPath: t[0].short });
},
});
},
showimg: function (t) {
wx.previewImage({
current: this.data.partImg,
urls: [this.data.partImg],
});
},
delImg: function (a) {
t.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
uid: t.getuid(),
imgurl: this.data.partImg,
r: "Upimg.delImg",
},
}),
this.setData({ partImg: "", imgPath: "" });
},
});

View File

@@ -0,0 +1 @@
{ "navigationBarTitleText": "汽配订购", "usingComponents": {} }

View File

@@ -0,0 +1,35 @@
<form bindsubmit="release" reportSubmit="true">
<view class="modle" style="border-bottom:0"> 配件图片 <text class="must_red">*</text>
</view>
<view class="shangchuan_view" wx:if="{{partImg!=''}}">
<image bindtap="delImg" class="shangchuan_Img_close" src="/pages/image/tupiangb_btn.png"></image>
<image bindtap="showimg" class="shangchuan_Img" src="{{partImg}}"></image>
</view>
<view class="shangchuan_view" wx:if="{{partImg==''}}">
<image bindtap="upcarsimgs" class="shangchuan_Img" src="/pages/image/tianjiantp_btn.png"></image>
</view>
<view class="modle"> 配件名称 <text class="must_red">*</text>
<input class="modle_right" name="part_name" placeholder="请输入配件名称" placeholderStyle="color: #9295A8;" type="text" value=""></input>
</view>
<view class="modle"> 车辆类型 <text class="must_red">*</text>
<picker bindchange="selectCarType" class="modle_right" range="{{carTypeList}}" rangeKey="name" value="{{index}}">
<view> {{carTypeName}} </view>
</picker>
</view>
<view class="modle"> 年份 <text class="must_red">*</text>
<input class="modle_right" name="car_year" placeholder="请输入年份" placeholderStyle="color: #9295A8;" style="width:350rpx;" type="digit" value="{{defult_value}}"></input>
</view>
<view class="modle"> 配件类型 <text class="must_red">*</text>
<picker bindchange="selectPartType" class="modle_right" range="{{partTypeList}}" rangeKey="name" value="{{index}}">
<view> {{partTypeName}} </view>
</picker>
</view>
<view class="modle">
<input class="modle_right btm_input" name="user_tel" placeholder="" placeholderStyle="color: #9295A8;" type="number" value="{{tel}}"></input> 联系电话 <text class="must_red">*</text>
<button bindgetphonenumber="getPhoneNumber" class="modle_btn" openType="getPhoneNumber">电话授权</button>
</view>
<button class="bufa_btn" formType="submit">提交</button>
<view class="jinggao">提交后,后台客服会根据提交信息进行报价。</view>
</form>
<import src="/pages/alert/index.wxml"></import>
<template is="alert" data="{{isShow:isShow}}"></template>

219
pages/part/apply/index.wxss Normal file
View File

@@ -0,0 +1,219 @@
@import "/pages/alert/index.wxss";
.xiaoxi {
background: #3d61f0;
border-bottom: 20rpx solid #f9f9f9;
height: 88rpx;
padding-top: 1rpx;
width: 100%;
}
.text_area,
.xiaoxi {
display: block;
margin: 0 auto;
}
.text_area {
background: #f0f0f0;
border-radius: 10rpx;
color: #555;
font-size: 24rpx;
height: 288rpx;
padding: 20rpx;
width: 650rpx;
}
.xiaoxi_leftImg {
float: left;
height: 40rpx;
margin-top: 24rpx;
padding-left: 30rpx;
padding-right: 15rpx;
width: 40rpx;
}
.xiaoxi_right_btn {
border: 1px solid #fff;
border-radius: 5rpx;
color: #fff;
font-size: 24rpx;
height: 45rpx;
line-height: 45rpx;
margin-left: 30rpx;
margin-top: 21.5rpx;
position: absolute;
right: 20rpx;
text-align: center;
width: 100rpx;
}
.show_diandian,
.update_scroll_modle {
overflow: hidden;
white-space: nowrap;
word-break: keep-all;
}
.update_scroll_modle {
color: #fff;
float: left;
padding-right: 150rpx;
position: relative;
text-overflow: ellipsis;
width: 505rpx;
z-index: 15;
}
.modle,
.update_scroll_modle {
font-size: 28rpx;
height: 88rpx;
line-height: 88rpx;
}
.modle {
border-bottom: 1rpx solid #f0f0f0;
color: #333;
margin-left: 5%;
width: 90%;
}
.modle_right {
color: #9295a8;
display: block;
height: 88rpx;
margin: 0;
text-align: right;
}
.modle_btn,
.modle_right {
float: right;
font-size: 24rpx;
padding: 0;
}
.modle_btn {
background: #fff;
border: 1px solid #3d61f0;
border-radius: 8rpx;
color: #3d61f0;
height: 48rpx;
line-height: 46rpx;
margin: 21.5rpx 0 0 30rpx;
text-align: center;
width: 120rpx;
}
.shangchuan_view {
display: inline-block;
height: 165rpx;
margin-left: 19rpx;
margin-top: 20rpx;
width: 165rpx;
}
.shangchuan_Img {
height: 165rpx;
position: absolute;
width: 165rpx;
}
.shangchuan_Img_close {
float: right;
height: 38rpx;
position: relative;
width: 38rpx;
z-index: 5;
}
.bufa_btn {
background: #3d61f0;
border-radius: 15rpx;
color: #fff;
display: block;
font-size: 28rpx;
height: 72rpx;
line-height: 72rpx;
margin: 40rpx auto 0;
text-align: center;
width: 690rpx;
}
.jinggao {
color: #9295a8;
font-size: 24rpx;
line-height: 80rpx;
text-align: center;
width: 100%;
}
.must_red {
color: red;
}
.textarea_text {
color: #888;
font-size: 24rpx;
height: 310rpx;
margin: -310rpx auto 0;
padding-left: 20rpx;
padding-right: 20rpx;
position: relative;
width: 650rpx;
z-index: 1000;
}
.textarea_text_active {
color: #333;
}
.dizhi_area {
color: #9295a8;
display: inline-block;
font-size: 24rpx;
height: 110rpx;
line-height: 50rpx;
margin-left: 20rpx;
margin-top: 18rpx;
width: 385rpx;
}
.car_messageView {
border-bottom: 1rpx solid #f0f0f0;
height: 88rpx;
margin: 0 auto;
width: 690rpx;
}
.car_messageView_input {
color: #333;
float: left;
font-size: 24rpx;
height: 88rpx;
width: 600rpx;
}
.car_messageView_sc {
color: #f75f5f;
float: left;
font-size: 24rpx;
height: 88rpx;
line-height: 88rpx;
text-align: right;
width: 90rpx;
}
.shangchuan_view_border {
margin-top: -15rpx;
width: 100%;
}
.kefu_modle {
background: #fff;
margin: 0;
padding: 0;
position: fixed;
right: 10rpx;
top: 70rpx;
width: 150rpx;
z-index: 999;
}
.kefu_modle_img {
background: #fff;
border-radius: 100%;
display: block;
height: 100rpx;
margin: 0 auto;
width: 100rpx;
}
.kefu_modle_title {
color: #666;
font-size: 27rpx;
line-height: 80rpx;
text-align: center;
width: 100%;
}
button::after {
border: none;
}
.btm_input {
position: absolute;
right: 180rpx;
width: 340rpx;
}

94
pages/part/order/index.js Normal file
View File

@@ -0,0 +1,94 @@
var t;
(t = getApp()),
Page({
data: {
table: {
1: "待报价",
2: "待付款",
3: "待发货",
4: "待收货",
5: "已完成",
},
activeIndex: 1,
orderList: [],
nav_width: "",
page: 1,
isLast: !1,
isLoad: !1,
},
onLoad: function (t) {
var a = t.status,
e = Object.keys(this.data.table).length;
this.setData({ nav_width: 100 / e, activeIndex: a > 0 ? a : 1 });
},
getList: function () {
var a = this;
if (a.data.isLast) return !1;
t.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.order_list",
uid: t.getuid(),
page: a.data.page,
status: a.data.activeIndex,
},
success: function (t) {
if (a.data.page > 1)
if (t.data.data.length > 0) {
var e = a.data.orderList;
e.push.apply(
e,
(function (t) {
if (Array.isArray(t)) {
for (var a = 0, e = Array(t.length); a < t.length; a++)
e[a] = t[a];
return e;
}
return Array.from(t);
})(t.data.data)
),
a.setData({ orderList: e });
} else a.setData({ isLast: !0 });
else
a.setData({ orderList: t.data.data }),
t.data.data.length < 1 && a.setData({ isLast: !0 });
a.setData({ page: a.data.page + 1 });
},
});
},
ActiveClick: function (t) {
this.setData({
activeIndex: t.currentTarget.dataset.index,
page: 1,
isLast: !1,
}),
this.getList();
},
onReachBottom: function () {
this.getList();
},
goPay: function (a) {
var e = t.getAttr(a, "id");
wx.navigateTo({ url: "/pages/part/pay/index?id=" + e });
},
onShow: function () {
this.setData({ page: 1, isLast: !1 }), this.getList();
},
confirmOrder: function (a) {
var e = this,
i = t.getAttr(a, "id");
t.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "part.order.confirm_order",
uid: t.getuid(),
id: i,
},
success: function (t) {
e.setData({ activeIndex: 5, page: 1, isLast: !1 }), e.getList();
},
});
},
});

View File

@@ -0,0 +1 @@
{ "usingComponents": {} }

View File

@@ -0,0 +1,92 @@
<view class="modle_1_nav">
<view bindtap="ActiveClick" class="modle_1_nav_modle {{activeIndex==index?'modle_1_nav_active':''}}" data-index="{{index}}" style="width:{{nav_width}}%" wx:for="{{table}}">{{item}} <view class="modle_1_nav_modle_border" wx:if="{{activeIndex==index}}"></view>
</view>
</view>
<view class="nav"></view>
<view class="shop_border" wx:if="{{activeIndex==1}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待报价</text>
<view class="shop_modle_orderTime">订购时间:{{item.create_time}}</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==2}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待付款</text>
<view class="shop_modle_orderNumber">订单号:{{item.order_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
<button bindtap="goPay" class="shop_modle_btn" data-id="{{item.id}}">去付款</button>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==3}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待发货</text>
<view class="shop_modle_orderNumber">订单号:{{item.order_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==4}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia">待发货</text>
<view class="shop_modle_orderNumber">运单号:{{item.express_name}} / {{item.waybill_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
<button bindtap="confirmOrder" class="shop_modle_btn" data-id="{{item.id}}">确认收货</button>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="shop_border" wx:if="{{activeIndex==5}}" wx:for="{{orderList}}">
<view class="shop_modle">
<image class="shop_modle_img" src="{{item.part_img}}"></image>
<view class="shop_modle_name">{{item.part_name}}</view>
<text class="shop_modle_daibaojia shop_modle_wancheng">已完成</text>
<view class="shop_modle_orderNumber">订单号:{{item.express_name}} / {{item.waybill_sn}}</view>
<view class="shop_modle_orderTime">报价: <text class="shop_modle_orderbaojia">¥{{item.part_price}}</text>
</view>
</view>
<view class="shop_modle_btmNav" style="margin-top:30rpx;">
<view class="shop_modle_btmNav_img"></view> 类型:{{item.part_type}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 年份:{{item.car_year}} </view>
<view class="shop_modle_btmNav">
<view class="shop_modle_btmNav_img"></view> 车型:{{item.car_type}} </view>
</view>
<view class="end_none" wx:if="{{orderList.length>0&&isLast}}">没有更多了...</view>
<block wx:if="{{orderList.length<=0}}">
<import src="/pages/data_null/index.wxml"></import>
<view>
<template is="title" data="{{title:'暂无查看数据'}}"></template>
</view>
</block>

136
pages/part/order/index.wxss Normal file
View File

@@ -0,0 +1,136 @@
page {
background: #f4f4f4;
}
.modle_1_nav {
background: #fff;
border-bottom: 1rpx solid #f4f4f4;
font-size: 0;
height: 80rpx;
line-height: 80rpx;
position: fixed;
top: 0rpx;
width: 100%;
z-index: 10;
}
.modle_1_nav_modle {
color: #333;
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: #3d61f0;
line-height: 72rpx;
}
.modle_1_nav_modle_border {
background: #3d61f0;
height: 5rpx;
margin: 0 auto;
width: 30rpx;
}
.nav {
height: 80rpx;
width: 100%;
}
.shop_border {
background: #fff;
border-bottom: 20rpx solid #f4f4f4;
padding: 30rpx;
}
.shop_modle {
border-bottom: 1rpx solid #f4f4f4;
height: 180rpx;
}
.shop_modle_img {
border-radius: 10rpx;
height: 150rpx;
position: absolute;
width: 150rpx;
}
.shop_modle_name {
color: #333;
font-size: 32rpx;
margin-left: 170rpx;
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
width: 400rpx;
word-break: keep-all;
}
.shop_modle_daibaojia {
color: #f75f5f;
font-size: 28rpx;
margin-left: 606rpx;
position: absolute;
}
.shop_modle_orderTime {
margin-top: 117rpx;
}
.shop_modle_orderNumber,
.shop_modle_orderTime {
color: #7a7a7a;
font-size: 24rpx;
margin-left: 170rpx;
position: absolute;
width: 400rpx;
}
.shop_modle_orderNumber {
margin-top: 60rpx;
}
.shop_modle_orderbaojia {
color: #f75f5f;
font-size: 28rpx;
}
.shop_modle_wancheng {
color: #7a7a7a;
}
.shop_modle_btn {
background: #fff;
border: 1rpx solid #f75f5f;
border-radius: 6rpx;
color: #f75f5f;
font-size: 24rpx;
height: 50rpx;
line-height: 48rpx;
margin-left: 560rpx;
margin-top: 100rpx;
padding: 0;
position: absolute;
text-align: center;
width: 130rpx;
}
button::after {
border: none;
}
.shop_modle_btmNav {
color: #333;
font-size: 24rpx;
margin-top: 15rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: keep-all;
}
.shop_modle_btmNav_img {
background: #3d61f0;
border-radius: 100%;
display: inline-block;
height: 6rpx;
margin-right: 15rpx;
margin-top: -5rpx;
vertical-align: middle;
width: 6rpx;
}
.end_none {
color: #8a8a8a;
font-size: 28rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
width: 100%;
}

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;
}