|
|
|
@ -2,18 +2,18 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-03-20 14:14:53
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-03-25 15:39:28
|
|
|
|
|
* @LastEditTime: 2022-03-30 18:56:51
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<u-cell class="address" :title="addres.title" :label="addres.label"
|
|
|
|
|
:border="false" isLink @click="$Router.push('/pages/account/address/list')">
|
|
|
|
|
:border="false" isLink @click="$Router.push('/addressList')">
|
|
|
|
|
<image class="address--icon" slot="icon" src="@/static/common/dz.png" />
|
|
|
|
|
</u-cell>
|
|
|
|
|
|
|
|
|
|
<view class="goods-group">
|
|
|
|
|
<view class="goods-group--item">
|
|
|
|
|
<view class="goods-group--item" v-for="item in goodsData" :key="item.productId">
|
|
|
|
|
<image class="goods-group--item-image" mode="widthFix" src="http://static.yoshop.xany6.com/2018071717370507f183424.jpg" />
|
|
|
|
|
<view >
|
|
|
|
|
<view class="goods-group--item-con">
|
|
|
|
@ -26,26 +26,14 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="goods-group--item">
|
|
|
|
|
<image class="goods-group--item-image" mode="widthFix" src="http://static.yoshop.xany6.com/2018071717370507f183424.jpg" />
|
|
|
|
|
<view >
|
|
|
|
|
<view class="goods-group--item-con">
|
|
|
|
|
<text class="goods-group--item-title">商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题商品标题</text>
|
|
|
|
|
<text class="goods-group--item-pirce">¥1922.00</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="goods-group--item-desc">
|
|
|
|
|
<text>多线程与高并发内部教材+试听课</text>
|
|
|
|
|
<text class="goods-group--item-num">x1</text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="service">
|
|
|
|
|
<u-cell title="配送方式" value="快递配送"></u-cell>
|
|
|
|
|
<u-cell title="买家留言" :border="false">
|
|
|
|
|
<textarea slot="value" class="service--remark" auto-height maxlength="50" placeholder="填写您想要备注的信息,50字以内" />
|
|
|
|
|
</u-cell>
|
|
|
|
|
<UiCell class="service--cell" title="配送方式" value="快递配送" :rightIcon="false"></UiCell>
|
|
|
|
|
<UiCell class="service--cell service--cell__last" title="买家留言" value="快递配送" :rightIcon="false">
|
|
|
|
|
<textarea slot="value" class="service--remark" auto-height v-model="userMessage"
|
|
|
|
|
maxlength="50" placeholder="填写您想要备注的信息,50字以内" />
|
|
|
|
|
</UiCell>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="play">
|
|
|
|
@ -74,7 +62,7 @@
|
|
|
|
|
<text>合计:</text>
|
|
|
|
|
<text class="footer--amount">¥19923.00</text>
|
|
|
|
|
</view>
|
|
|
|
|
<button class="footer--btn">去支付</button>
|
|
|
|
|
<UiButton class="footer--btn" type="solid" @click="submit">去支付</UiButton>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
@ -82,18 +70,67 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default{
|
|
|
|
|
import UiCell from '@/components/UiCell';
|
|
|
|
|
import {ApiPostSubmitOrder, ApiPostWxPay} from '@/common/api/order';
|
|
|
|
|
import UiButton from '@/components/UiButton.vue';
|
|
|
|
|
export default {
|
|
|
|
|
components : {UiCell, UiButton },
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
addres : {
|
|
|
|
|
title : '选择收货地址',
|
|
|
|
|
label : '陈先生 189****6782'
|
|
|
|
|
},
|
|
|
|
|
userMessage : '',
|
|
|
|
|
goodsData : [
|
|
|
|
|
{
|
|
|
|
|
productId : 1,
|
|
|
|
|
productSkuId : 1,
|
|
|
|
|
quantity : 1
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
productId : 2,
|
|
|
|
|
productSkuId : 2,
|
|
|
|
|
quantity : 2
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
/**
|
|
|
|
|
* 获取预订单信息,将要提交的订单信息
|
|
|
|
|
*/
|
|
|
|
|
getBeforeOrder(){
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 提交订单
|
|
|
|
|
*/
|
|
|
|
|
async submit(){
|
|
|
|
|
const {error, result} = await ApiPostSubmitOrder({
|
|
|
|
|
orderSource : 2,
|
|
|
|
|
recipientAddressId : 1,
|
|
|
|
|
products : this.goodsData.map(i => ({
|
|
|
|
|
productId : i.productId,
|
|
|
|
|
productSkuId : i.productSkuId,
|
|
|
|
|
quantity : i.quantity
|
|
|
|
|
})),
|
|
|
|
|
userMessage : this.userMessage
|
|
|
|
|
});
|
|
|
|
|
if(error){
|
|
|
|
|
uni.$u.totas(error.message);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
this.wxpay(result.orderId);
|
|
|
|
|
},
|
|
|
|
|
async wxpay(orderId){
|
|
|
|
|
const {error, result} = await ApiPostWxPay({orderId});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
page{
|
|
|
|
|
background: #f8f8f8;
|
|
|
|
@ -158,6 +195,13 @@ page{
|
|
|
|
|
|
|
|
|
|
.service{
|
|
|
|
|
background: #fff;
|
|
|
|
|
margin: 20rpx 0;
|
|
|
|
|
&--cell{
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
&__last{
|
|
|
|
|
border: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&--remark{
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
width: 500rpx;
|
|
|
|
@ -209,14 +253,7 @@ page{
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
&--btn{
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
line-height: 70rpx;
|
|
|
|
|
border-radius: 35rpx;
|
|
|
|
|
padding: 0 58rpx;
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
background: #FF512B;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|