| | |
| | | import { |
| | | getPublicImage |
| | | } from '../../../assets/js/middleGround/tool'; |
| | | import drawQrcode from './js/weapp.qrcode' |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | isPaySuccess: false, |
| | | isPayComplete: false, |
| | | type: '', |
| | | onNorderSaleMethod: '' |
| | | onNorderSaleMethod: '', |
| | | ImmediatelyReceive: '' |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: '提交订单' |
| | | }); |
| | | |
| | | |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | fields: { |
| | | content: [], |
| | | subtitle: [], |
| | | |
| | | |
| | | } |
| | | } |
| | | app.MG.store.getOrderByOrderNum(query).then(res => { |
| | |
| | | |
| | | console.log(res.payPrice); |
| | | this.setData({ |
| | | payPrice: res.payPrice.toFixed(2) |
| | | payPrice: res.payPrice.toFixed(2), |
| | | ImmediatelyReceive: res.payPrice |
| | | }) |
| | | console.log(this.data.ImmediatelyReceive); |
| | | res.saleMethodLinks.forEach(item => { |
| | | console.log(item.type, 'item.type'); |
| | | // console.log(item.type, 'item.type'); |
| | | |
| | | const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | |
| | | // 返回 |
| | | wx.navigateBack() |
| | | }, |
| | | onReceive() { |
| | | let query = { |
| | | orderNum: this.data.orderGoods |
| | | } |
| | | app.MG.store.confirmOrder(query).then(res => { |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: '领取成功', |
| | | theme: 'success', |
| | | direction: 'column', |
| | | }); |
| | | wx.navigateBack() |
| | | }) |
| | | } |
| | | }) |