换系统
This commit is contained in:
@@ -1,23 +1,110 @@
|
||||
// pages/orderconfirm/orderconfirm.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
||||
// pages/order/order.js
|
||||
import bin from "../../utils/bin"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
list: {}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
bin.getusetid().then((res) => {
|
||||
bin.request({
|
||||
url: "Cart/cart2",
|
||||
urldata: {
|
||||
user_id: res
|
||||
}
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.setData({
|
||||
list: res.data.result
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
sub() {
|
||||
bin.getusetid().then((res) => {
|
||||
bin.request({
|
||||
url: "Cart/cart3",
|
||||
urldata: {
|
||||
act: "",
|
||||
submit_order: "",
|
||||
user_id: res,
|
||||
address_id: this.data.list.addressList.address_id,
|
||||
user_money: 0,
|
||||
pay_points: 0,
|
||||
couponTypeSelect: 1,
|
||||
coupon_id: 0,
|
||||
pay_code: "weixin",
|
||||
couponCode: ""
|
||||
}
|
||||
}).then((r) => {
|
||||
console.log(r)
|
||||
let { timeStamp, nonceStr, signType, sign } = r.data.data.wdata
|
||||
// timeStamp = timeStamp
|
||||
timeStamp = timeStamp.toString()
|
||||
console.log(timeStamp)
|
||||
wx.requestPayment({
|
||||
timeStamp, nonceStr, package:r.data.data.wdata.package, signType, paySign:sign,
|
||||
success(res) {console.log("成功")},
|
||||
fail(res) {console.log(res)}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"shopinfo": "/components/orderconfirm/ordershopinfo/ordershopinfo",
|
||||
"chooseway": "/components/orderconfirm/orderchooseway/orderchooseway",
|
||||
"chooseaddr": "/components/orderconfirm/orderchooseaddr/orderchooseaddr",
|
||||
"orderyf": "/components/orderconfirm/orderyf/orderyf",
|
||||
"agree": "/components/orderconfirm/orderagreement/orderagreement",
|
||||
"bottom": "/components/orderconfirm/orderbottom/orderbottom"
|
||||
}
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"shopinfo": "/components/orderconfirm/ordershopinfo/ordershopinfo",
|
||||
"chooseway": "/components/orderconfirm/orderchooseway/orderchooseway",
|
||||
"chooseaddr": "/components/orderconfirm/orderchooseaddr/orderchooseaddr",
|
||||
"orderyf": "/components/orderconfirm/orderyf/orderyf",
|
||||
"agree": "/components/orderconfirm/orderagreement/orderagreement",
|
||||
"bottom": "/components/orderconfirm/orderbottom/orderbottom"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
.orderconfirm {
|
||||
.bottom {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
.orderconfirm {
|
||||
.bottom {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
<view class="orderconfirm">
|
||||
<shopinfo></shopinfo>
|
||||
<chooseway></chooseway>
|
||||
<chooseaddr></chooseaddr>
|
||||
<orderyf></orderyf>
|
||||
<agree></agree>
|
||||
<view class="bottom">
|
||||
<bottom></bottom>
|
||||
</view>
|
||||
|
||||
<view class="orderconfirm">
|
||||
<shopinfo wx:for="{{list.cartList}}" title="{{item.goods_name}}" price="{{item.goods_price}}" spec="{{item.spec_key_name?item.spec_key_name:'默认规格'}}" img="{{item.image}}"></shopinfo>
|
||||
<!-- <shopinfo></shopinfo> -->
|
||||
<chooseway></chooseway>
|
||||
<chooseaddr></chooseaddr>
|
||||
<orderyf price="{{list.express_price}}"></orderyf>
|
||||
<agree></agree>
|
||||
<view class="bottom">
|
||||
<bottom price="{{list.totalPrice.total_fee}}" bind:sub="sub"></bottom>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -1,5 +1,5 @@
|
||||
.orderconfirm .bottom {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
.orderconfirm .bottom {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user