init
This commit is contained in:
562
fuintUniapp/pages/order/comment/index.vue
Normal file
562
fuintUniapp/pages/order/comment/index.vue
Normal file
@@ -0,0 +1,562 @@
|
||||
<template>
|
||||
<view v-if="!isLoading" class="container">
|
||||
<view class="goods-list">
|
||||
<view class="goods-item" v-for="(item, index) in goodsList" :key="index">
|
||||
<!-- 商品详情 -->
|
||||
<view class="goods-main">
|
||||
<!-- 商品图片 -->
|
||||
<view class="goods-image">
|
||||
<image class="image" :src="item.goods_image" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods-content">
|
||||
<view class="goods-title twolist-hidden"><text>{{ item.name }}</text></view>
|
||||
<view class="goods-props clearfix">
|
||||
<view class="goods-props-item" v-for="(props, idx) in item.goods_props" :key="idx">
|
||||
<text>{{ props.value.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易信息 -->
|
||||
<view class="goods-trade">
|
||||
<view class="goods-price">
|
||||
<text class="unit">¥</text>
|
||||
<text class="value">{{ item.goods_price }}</text>
|
||||
</view>
|
||||
<view class="goods-num">
|
||||
<text>×{{ item.total_num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选择评价 -->
|
||||
<view class="score-row">
|
||||
<view class="score-item score-praise" :class="{ active: formData[index].score == 10 }" @click="setScore(index, 10)">
|
||||
<view class="score">
|
||||
<text class="score-icon iconfont icon-haoping"></text>
|
||||
<text class="score-text">好评</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="score-item score-review" :class="{ active: formData[index].score == 20 }" @click="setScore(index, 20)">
|
||||
<view class="score">
|
||||
<text class="score-icon iconfont icon-zhongping"></text>
|
||||
<text class="score-text">中评</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="score-item score-negative" :class="{ active: formData[index].score == 30 }" @click="setScore(index, 30)">
|
||||
<view class="score">
|
||||
<text class="score-icon iconfont icon-chaping"></text>
|
||||
<text class="score-text">差评</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 评价内容 -->
|
||||
<view class="form-content">
|
||||
<textarea class="textarea" v-model="formData[index].content" maxlength="500" placeholder="请输入评价内容 (留空则不评价)"></textarea>
|
||||
</view>
|
||||
|
||||
<!-- 图片列表 -->
|
||||
<view class="image-list">
|
||||
<view class="image-preview" v-for="(image, imageIndex) in formData[index].imageList" :key="imageIndex">
|
||||
<text class="image-delete iconfont icon-shanchu" @click="deleteImage(index, imageIndex)"></text>
|
||||
<image class="image" mode="aspectFill" :src="image.path"></image>
|
||||
</view>
|
||||
<view v-if="!formData[index].imageList || formData[index].imageList.length < maxImageLength" class="image-picker"
|
||||
@click="chooseImage(index)">
|
||||
<text class="choose-icon iconfont icon-tubiao_xiangji"></text>
|
||||
<text class="choose-text">上传图片</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="footer-fixed">
|
||||
<view class="btn-wrapper">
|
||||
<view class="btn-item btn-item-main" :class="{ disabled }" @click="handleSubmit()">确认提交</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as UploadApi from '@/api/upload'
|
||||
import * as OrderCommentApi from '@/api/order/comment'
|
||||
|
||||
const maxImageLength = 6
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 当前订单ID
|
||||
orderId: null,
|
||||
// 待评价商品列表
|
||||
goodsList: [],
|
||||
// 表单数据
|
||||
formData: [],
|
||||
// 最大图片数量
|
||||
maxImageLength,
|
||||
// 按钮禁用
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad({ orderId }) {
|
||||
this.orderId = orderId
|
||||
// 获取待评价商品列表
|
||||
this.getGoodsList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取待评价商品列表
|
||||
getGoodsList() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
OrderCommentApi.list(app.orderId)
|
||||
.then(result => {
|
||||
app.goodsList = result.data.goodsList
|
||||
app.initFormData()
|
||||
app.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 初始化form数据
|
||||
initFormData() {
|
||||
const { goodsList } = this
|
||||
const formData = goodsList.map(item => {
|
||||
return {
|
||||
goods_id: item.goods_id,
|
||||
order_goods_id: item.order_goods_id,
|
||||
score: 10,
|
||||
content: '',
|
||||
imageList: [],
|
||||
uploaded: []
|
||||
}
|
||||
})
|
||||
this.formData = formData
|
||||
},
|
||||
|
||||
// 设置评分
|
||||
setScore(index, score) {
|
||||
this.formData[index].score = score
|
||||
},
|
||||
|
||||
// 选择图片
|
||||
chooseImage(index) {
|
||||
const app = this
|
||||
const oldImageList = app.formData[index].imageList
|
||||
// 选择图片
|
||||
uni.chooseImage({
|
||||
count: maxImageLength - oldImageList.length,
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success({ tempFiles }) {
|
||||
// tempFiles = [{path:'xxx', size:100}]
|
||||
app.formData[index].imageList = oldImageList.concat(tempFiles)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 删除图片
|
||||
deleteImage(index, imageIndex) {
|
||||
this.formData[index].imageList.splice(imageIndex, 1)
|
||||
},
|
||||
|
||||
// 表单提交
|
||||
handleSubmit() {
|
||||
const app = this
|
||||
// 判断是否重复提交
|
||||
if (app.disabled === true) return false
|
||||
// 按钮禁用
|
||||
app.disabled = true
|
||||
// 判断是否需要上传图片
|
||||
const imagesLength = app.getImagesLength()
|
||||
if (imagesLength > 0) {
|
||||
app.uploadFile()
|
||||
.then(() => {
|
||||
console.log('then')
|
||||
app.onSubmit()
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('catch')
|
||||
app.disabled = false
|
||||
if (err.statusCode !== 0) {
|
||||
app.$toast(err.errMsg)
|
||||
}
|
||||
console.log('err', err)
|
||||
})
|
||||
} else {
|
||||
app.onSubmit()
|
||||
}
|
||||
},
|
||||
|
||||
// 统计图片数量
|
||||
getImagesLength() {
|
||||
const { formData } = this
|
||||
let imagesLength = 0
|
||||
formData.forEach(item => {
|
||||
if (item.content.trim()) {
|
||||
imagesLength += item.imageList.length
|
||||
}
|
||||
})
|
||||
return imagesLength
|
||||
},
|
||||
|
||||
// 提交到后端
|
||||
onSubmit() {
|
||||
const app = this
|
||||
OrderCommentApi.submit(app.orderId, app.formData)
|
||||
.then(result => {
|
||||
app.$toast(result.message)
|
||||
setTimeout(() => {
|
||||
app.disabled = false
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
})
|
||||
.catch(err => app.disabled = false)
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
uploadFile() {
|
||||
const app = this
|
||||
const { formData } = app
|
||||
// 整理上传文件路径
|
||||
const files = []
|
||||
formData.forEach((item, index) => {
|
||||
if (item.content.trim() && item.imageList.length) {
|
||||
const images = item.imageList.map(image => image)
|
||||
files.push({ formDataIndex: index, images })
|
||||
}
|
||||
})
|
||||
// 批量上传
|
||||
return new Promise((resolve, reject) => {
|
||||
Promise.all(files.map((file, index) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
UploadApi.image(file.images)
|
||||
.then(fileIds => {
|
||||
app.formData[index].uploaded = fileIds
|
||||
resolve(fileIds)
|
||||
})
|
||||
.catch(err => reject(err))
|
||||
})
|
||||
}))
|
||||
.then(resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding-bottom: 100rpx;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
font-size: 28rpx;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
width: 94%;
|
||||
background: #fff;
|
||||
padding: 24rpx 24rpx;
|
||||
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||
margin: 0 auto 30rpx auto;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.goods-detail {
|
||||
padding: 24rpx 20rpx;
|
||||
|
||||
.left {
|
||||
.goods-image {
|
||||
display: block;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.score-row {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 24rpx 20rpx;
|
||||
|
||||
.score-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&.score-praise {
|
||||
color: #ff4544;
|
||||
|
||||
.score-icon {
|
||||
background: #ff4544;
|
||||
}
|
||||
}
|
||||
|
||||
&.score-review {
|
||||
color: #fcb500;
|
||||
|
||||
.score-icon {
|
||||
background: #fcb500;
|
||||
}
|
||||
}
|
||||
|
||||
&.score-negative {
|
||||
color: #9b9b9b;
|
||||
|
||||
.score-icon {
|
||||
background: #9b9b9b;
|
||||
}
|
||||
}
|
||||
|
||||
.score {
|
||||
padding: 10rpx 20rpx 10rpx 10rpx;
|
||||
border-radius: 30rpx;
|
||||
|
||||
.score-icon {
|
||||
margin-right: 10rpx;
|
||||
padding: 10rpx;
|
||||
border-radius: 50%;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
.score {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&.score-praise {
|
||||
.score {
|
||||
background: #ff4544;
|
||||
}
|
||||
}
|
||||
|
||||
&.score-review {
|
||||
.score {
|
||||
background: #fcb500;
|
||||
}
|
||||
}
|
||||
|
||||
&.score-negative {
|
||||
.score {
|
||||
background: #9b9b9b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 评价内容
|
||||
.form-content {
|
||||
padding: 14rpx 10rpx;
|
||||
|
||||
.textarea {
|
||||
width: 100%;
|
||||
height: 220rpx;
|
||||
padding: 12rpx;
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 5rpx;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-list {
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: -20rpx;
|
||||
|
||||
&:after {
|
||||
clear: both;
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.image-picker,
|
||||
.image-preview {
|
||||
width: 184rpx;
|
||||
height: 184rpx;
|
||||
margin-right: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
float: left;
|
||||
|
||||
&:nth-child(3n+0) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.image-picker {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1rpx dashed #ccc;
|
||||
color: #ccc;
|
||||
|
||||
.choose-icon {
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.choose-text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
position: relative;
|
||||
|
||||
.image-delete {
|
||||
position: absolute;
|
||||
top: -15rpx;
|
||||
right: -15rpx;
|
||||
height: 42rpx;
|
||||
width: 42rpx;
|
||||
line-height: 42rpx;
|
||||
background: rgba(0, 0, 0, 0.64);
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-weight: bolder;
|
||||
font-size: 22rpx;
|
||||
z-index: 10;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 商品项
|
||||
.goods-main {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
// 商品图片
|
||||
.goods-image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
|
||||
.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品内容
|
||||
.goods-content {
|
||||
flex: 1;
|
||||
padding-left: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
|
||||
.goods-title {
|
||||
font-size: 26rpx;
|
||||
max-height: 76rpx;
|
||||
}
|
||||
|
||||
.goods-props {
|
||||
margin-top: 14rpx;
|
||||
height: 40rpx;
|
||||
color: #ababab;
|
||||
font-size: 24rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.goods-props-item {
|
||||
display: inline-block;
|
||||
margin-right: 14rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F5F5F5;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 交易信息
|
||||
.goods-trade {
|
||||
padding-top: 16rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
color: $uni-text-color-grey;
|
||||
font-size: 26rpx;
|
||||
|
||||
.goods-price {
|
||||
vertical-align: bottom;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.unit {
|
||||
margin-right: -2rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 底部操作栏
|
||||
.footer-fixed {
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 180rpx;
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 11;
|
||||
box-shadow: 0 -4rpx 40rpx 0 rgba(144, 52, 52, 0.1);
|
||||
background: #fff;
|
||||
|
||||
.btn-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.btn-item-main {
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
|
||||
// 禁用按钮
|
||||
&.disabled {
|
||||
background: #ff9779;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
886
fuintUniapp/pages/order/detail.vue
Normal file
886
fuintUniapp/pages/order/detail.vue
Normal file
@@ -0,0 +1,886 @@
|
||||
<template>
|
||||
<view v-if="!isLoading" class="container">
|
||||
|
||||
<view class="header">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="status-icon">
|
||||
<!-- 进行中的订单 -->
|
||||
<block>
|
||||
<!-- 待支付 -->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.CREATED.value" class="image" src="/static/order/status/wait_pay.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 已支付 -->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.PAID.value" class="image" src="/static/order/status/received.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 待发货 -->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.DELIVERY.value" class="image" src="/static/order/status/wait_deliver.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 已发货 -->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.DELIVERED.value" class="image" src="/static/order/status/wait_receipt.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 已收货-->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.RECEIVED.value" class="image" src="/static/order/status/received.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 已取消-->
|
||||
<block>
|
||||
<image v-if="order.status == OrderStatusEnum.CANCEL.value || order.status == OrderStatusEnum.REFUND.value" class="image" src="/static/order/status/close.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
<view class="status-text">
|
||||
<text v-if="order.status == OrderStatusEnum.CREATED.value">{{OrderStatusEnum.CREATED.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.PAID.value">{{OrderStatusEnum.PAID.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.DELIVERY.value">{{OrderStatusEnum.DELIVERY.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.DELIVERED.value">{{OrderStatusEnum.DELIVERED.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.RECEIVED.value">{{OrderStatusEnum.RECEIVED.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.CANCEL.value">{{OrderStatusEnum.CANCEL.name}}</text>
|
||||
<text v-else-if="order.status == OrderStatusEnum.REFUND.value">{{OrderStatusEnum.REFUND.name}}</text>
|
||||
</view>
|
||||
<view class="verify-code" v-if="order.orderMode == 'oneself' && order.type == 'goods' && order.verifyCode && order.payStatus == 'B' && ( !['C', 'H', 'G'].includes(order.status))">
|
||||
<view>提取码:</view>
|
||||
<view class="code">{{ order.verifyCode }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!--订单类型-->
|
||||
<view class="order-type">
|
||||
<text class="type">{{ order.typeName }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 快递配送:配送地址 -->
|
||||
<view v-if="order.address" class="delivery-address i-card">
|
||||
<view class="link-man">
|
||||
<text class="name">{{ order.address.name }}</text>
|
||||
<text class="phone">{{ order.address.mobile }}</text>
|
||||
</view>
|
||||
<view class="address">
|
||||
<text class="region">{{ order.address.provinceName }}{{ order.address.cityName }}{{ order.address.regionName }}</text>
|
||||
<text class="detail">{{ order.address.detail }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 门店自提:自提地址 -->
|
||||
<view v-if="order.orderMode == 'oneself'" class="delivery-address i-card">
|
||||
<view class="link-man">
|
||||
<text class="type">[门店自提]</text>
|
||||
</view>
|
||||
<view class="link-man">
|
||||
<text class="name">{{ order.storeInfo.name }}</text>
|
||||
<text class="phone">{{ order.storeInfo.phone }}</text>
|
||||
</view>
|
||||
<view class="address">
|
||||
<text class="region">{{ order.storeInfo.address }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list i-card" v-if="order.goods.length > 0">
|
||||
<view class="goods-item" v-for="(goods, idx) in order.goods" :key="idx">
|
||||
<view class="goods-main" v-if="goods.num > 0" @click="handleTargetGoods(goods.goodsId, goods.type)">
|
||||
<!-- 商品图片 -->
|
||||
<view class="goods-image">
|
||||
<image class="image" :src="goods.image" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods-content">
|
||||
<view class="goods-title twolist-hidden"><text>{{goods.name}}</text></view>
|
||||
<view class="goods-props clearfix">
|
||||
<view class="goods-props-item" v-for="(props, idx) in goods.specList" :key="idx">
|
||||
<text>{{ props.specValue }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易信息 -->
|
||||
<view class="goods-trade">
|
||||
<view class="goods-price">
|
||||
<text class="unit">¥</text>
|
||||
<text class="value">{{ goods.price }}</text>
|
||||
</view>
|
||||
<view class="goods-num">
|
||||
<text>×{{goods.num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="order-info i-card">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">订单编号</view>
|
||||
<view class="item-content">
|
||||
<text>{{order.orderSn}}</text>
|
||||
<view class="act-copy" @click="handleCopy(order.orderSn)">
|
||||
<text>复制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">下单时间</view>
|
||||
<view class="item-content">
|
||||
<text>{{order.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">支付时间</view>
|
||||
<view class="item-content">
|
||||
<text>{{order.payTime ? order.payTime : '--'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">备注信息</view>
|
||||
<view class="item-content">
|
||||
<text>{{order.remark ? order.remark : '--'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结算信息 -->
|
||||
<view class="trade-info i-card">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">订单金额</view>
|
||||
<view class="item-content">
|
||||
<text>¥{{(order.amount.toFixed(2))}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.discount > 0" class="info-item">
|
||||
<view class="item-lable">优惠金额</view>
|
||||
<view class="item-content">
|
||||
<text>-¥{{ order.discount.toFixed(2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.deliveryFee > 0" class="info-item">
|
||||
<view class="item-lable">配送费用</view>
|
||||
<view class="item-content">
|
||||
<text>+¥{{ order.deliveryFee.toFixed(2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.pointAmount > 0" class="info-item">
|
||||
<view class="item-lable">积分抵扣</view>
|
||||
<view class="item-content">
|
||||
<text>-¥{{ order.pointAmount.toFixed(2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">支付方式</view>
|
||||
<view class="item-content">
|
||||
<text>{{ PayTypeEnum.getNameByValue(order.payType) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="divider"></view>
|
||||
<view class="trade-total">
|
||||
<text class="lable">实付款</text>
|
||||
<view class="goods-price">
|
||||
<text class="unit">¥</text>
|
||||
<text class="value">{{order.payAmount ? order.payAmount.toFixed(2) : '0.00'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="footer-fixed" v-if="order.status == OrderStatusEnum.CREATED.value">
|
||||
<view class="btn-wrapper">
|
||||
<block>
|
||||
<view class="btn-item" @click="onCancel(order.id)">取消订单</view>
|
||||
</block>
|
||||
<block>
|
||||
<view class="btn-item active" @click="onPay(order.id)">去支付</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已支付的订单 -->
|
||||
<view class="footer-fixed" v-if="(order.payStatus == OrderStatusEnum.PAID.value)">
|
||||
<view class="btn-wrapper">
|
||||
<block v-if="!order.refundInfo">
|
||||
<view class="btn-item active" @click="handleApplyRefund(order.id)">申请售后</view>
|
||||
</block>
|
||||
<block v-if="order.refundInfo">
|
||||
<view class="btn-item common" @click="handleRefundDetail(order.refundInfo.id)">售后详情</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-fixed" v-if="order.status == OrderStatusEnum.DELIVERED.value">
|
||||
<view class="btn-wrapper">
|
||||
<block>
|
||||
<view class="btn-item active" @click="onReceipt(order.id)">确认收货</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式弹窗 -->
|
||||
<u-popup v-model="showPayPopup" mode="bottom" :closeable="true">
|
||||
<view class="pay-popup">
|
||||
<view class="title">请选择支付方式</view>
|
||||
<view class="pop-content">
|
||||
<!-- 微信支付 -->
|
||||
<view class="pay-item dis-flex flex-x-between" @click="onSelectPayType(PayTypeEnum.WECHAT.value)">
|
||||
<view class="item-left dis-flex flex-y-center">
|
||||
<view class="item-left_icon wechat">
|
||||
<text class="iconfont icon-weixinzhifu"></text>
|
||||
</view>
|
||||
<view class="item-left_text">
|
||||
<text>{{ PayTypeEnum.WECHAT.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 余额支付 -->
|
||||
<view v-if="order.type != 'recharge' && order.type != 'prestore'" class="pay-item dis-flex flex-x-between" @click="onSelectPayType(PayTypeEnum.BALANCE.value)">
|
||||
<view class="item-left dis-flex flex-y-center">
|
||||
<view class="item-left_icon balance">
|
||||
<text class="iconfont icon-qiandai"></text>
|
||||
</view>
|
||||
<view class="item-left_text">
|
||||
<text>{{ PayTypeEnum.BALANCE.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<shortcut/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
PayTypeEnum,
|
||||
ReceiptStatusEnum
|
||||
} from '@/common/enum/order'
|
||||
import * as OrderApi from '@/api/order'
|
||||
import { wxPayment } from '@/utils/app'
|
||||
import Shortcut from '@/components/shortcut'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Shortcut
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 枚举类
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
PayTypeEnum,
|
||||
ReceiptStatusEnum,
|
||||
// 当前订单ID
|
||||
orderId: null,
|
||||
// 加载中
|
||||
isLoading: true,
|
||||
// 当前订单详情
|
||||
order: {},
|
||||
// 当前设置
|
||||
setting: {},
|
||||
// 支付方式弹窗
|
||||
showPayPopup: false,
|
||||
// 刷新页面
|
||||
reflash: false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad({ orderId }) {
|
||||
// 当前订单ID
|
||||
this.orderId = orderId;
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// 获取当前订单信息
|
||||
this.getOrderDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取当前订单信息
|
||||
getOrderDetail() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
OrderApi.detail(app.orderId)
|
||||
.then(result => {
|
||||
app.order = result.data
|
||||
app.setting = result.data
|
||||
app.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 复制指定内容
|
||||
handleCopy(value) {
|
||||
const app = this
|
||||
uni.setClipboardData({
|
||||
data: value,
|
||||
success() {
|
||||
app.$toast('复制成功')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转到商品详情页面
|
||||
handleTargetGoods(goodsId, type) {
|
||||
if (goodsId && parseInt(goodsId) > 0) {
|
||||
this.$navTo('pages/goods/detail', { goodsId })
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转到申请售后页面
|
||||
handleApplyRefund(orderId) {
|
||||
this.$navTo('pages/refund/apply', { orderId })
|
||||
},
|
||||
|
||||
// 售后详情
|
||||
handleRefundDetail(refundId) {
|
||||
this.$navTo('pages/refund/detail', { refundId })
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
onCancel() {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '确认要取消该订单吗?',
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
OrderApi.cancel(app.orderId)
|
||||
.then(result => {
|
||||
// 显示成功信息
|
||||
app.$success(result.message);
|
||||
// 刷新当前订单数据
|
||||
app.getOrderDetail();
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 点击去支付
|
||||
onPay() {
|
||||
// 显示支付方式弹窗
|
||||
this.showPayPopup = true;
|
||||
},
|
||||
|
||||
// 确认收货
|
||||
onReceipt(orderId) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '确认收到商品了吗?',
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
OrderApi.receipt(orderId)
|
||||
.then(result => {
|
||||
// 显示成功信息
|
||||
app.$success(result.message)
|
||||
// 刷新当前订单数据
|
||||
app.getOrderDetail()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 选择支付方式
|
||||
onSelectPayType(payType) {
|
||||
const app = this
|
||||
// 隐藏支付方式弹窗
|
||||
this.showPayPopup = false
|
||||
// 发起支付请求
|
||||
OrderApi.pay(app.orderId, payType)
|
||||
.then(result => app.onSubmitCallback(result))
|
||||
.catch(err => err)
|
||||
},
|
||||
|
||||
// 订单提交成功后回调
|
||||
onSubmitCallback(result) {
|
||||
const app = this;
|
||||
if (!result.data) {
|
||||
if (result.message) {
|
||||
app.$error(result.message);
|
||||
} else {
|
||||
app.$error('支付失败');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 发起微信支付
|
||||
if (result.data.payType == PayTypeEnum.WECHAT.value) {
|
||||
wxPayment(result.data.payment)
|
||||
.then(() => {
|
||||
app.$success('支付成功');
|
||||
setTimeout(() => {
|
||||
app.getOrderDetail();
|
||||
}, 1500)
|
||||
})
|
||||
.catch(err => {
|
||||
app.$error('订单未支付');
|
||||
})
|
||||
.finally(() => {
|
||||
app.disabled = false;
|
||||
})
|
||||
}
|
||||
// 余额支付
|
||||
if (result.data.payType == PayTypeEnum.BALANCE.value) {
|
||||
if (result.data.orderInfo.payStatus == 'B') {
|
||||
app.$success('支付成功');
|
||||
app.disabled = false;
|
||||
setTimeout(() => {
|
||||
// 刷新当前订单数据
|
||||
app.getOrderDetail();
|
||||
}, 1500)
|
||||
} else {
|
||||
app.$error('支付失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
|
||||
// 页面顶部
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: $fuint-theme;
|
||||
height: 280rpx;
|
||||
padding: 56rpx 30rpx 0 30rpx;
|
||||
|
||||
.order-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 128rpx;
|
||||
.status-icon {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.status-text {
|
||||
padding-left: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.verify-code {
|
||||
color: #ffffff;
|
||||
margin-left: 60rpx;
|
||||
font-size: 30rpx;
|
||||
.code {
|
||||
font-size: 50rpx;
|
||||
color: #ffd700;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.next-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 128rpx;
|
||||
|
||||
.action-btn {
|
||||
min-width: 150rpx;
|
||||
height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
border-radius: 30rpx;
|
||||
border-color: #ffffff;
|
||||
color: #ffffff;
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 通栏卡片
|
||||
.i-card {
|
||||
background: #fff;
|
||||
padding: 24rpx 24rpx;
|
||||
width: 94%;
|
||||
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||
margin: 0 auto 20rpx auto;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
// 订单类型
|
||||
.order-type {
|
||||
font-weight: bold;
|
||||
margin: 25rpx;
|
||||
}
|
||||
|
||||
// 收货地址
|
||||
.delivery-address {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.link-man {
|
||||
line-height: 46rpx;
|
||||
color: #333;
|
||||
.type {
|
||||
margin-right: 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.name {
|
||||
margin-right: 10rpx;
|
||||
color: #999;
|
||||
}
|
||||
.phone {
|
||||
margin-right: 10rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
margin-top: 12rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
|
||||
.detail {
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 物流公司
|
||||
.express {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
|
||||
.act-copy {
|
||||
margin-left: 20rpx;
|
||||
padding: 2rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
border: 1rpx solid #c1c1c1;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 右侧箭头
|
||||
.right-arrow {
|
||||
margin-left: 16rpx;
|
||||
// color: #777;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
.goods-list {
|
||||
// 商品项
|
||||
.goods-item {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-main {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
// 商品图片
|
||||
.goods-image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
|
||||
.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品内容
|
||||
.goods-content {
|
||||
flex: 1;
|
||||
padding-left: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
|
||||
.goods-title {
|
||||
font-size: 26rpx;
|
||||
max-height: 76rpx;
|
||||
}
|
||||
|
||||
.goods-props {
|
||||
margin-top: 14rpx;
|
||||
height: 40rpx;
|
||||
color: #ababab;
|
||||
font-size: 24rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.goods-props-item {
|
||||
display: inline-block;
|
||||
margin-right: 14rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F5F5F5;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 交易信息
|
||||
.goods-trade {
|
||||
padding-top: 16rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
color: $uni-text-color-grey;
|
||||
font-size: 26rpx;
|
||||
|
||||
.goods-price {
|
||||
vertical-align: bottom;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.unit {
|
||||
margin-right: -2rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 商品售后
|
||||
.goods-refund {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.stata-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
border-radius: 28rpx;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 24rpx;
|
||||
color: #383838;
|
||||
border: 1rpx solid #a8a8a8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 订单信息
|
||||
.order-info {
|
||||
.info-item {
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
|
||||
.act-copy {
|
||||
margin-left: 20rpx;
|
||||
padding: 2rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
border: 1rpx solid #c1c1c1;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 交易信息
|
||||
.trade-info {
|
||||
margin-bottom: 80rpx;
|
||||
.info-item {
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.item-lable {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1rpx;
|
||||
background: #f1f1f1;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.trade-total {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.goods-price {
|
||||
margin-left: 12rpx;
|
||||
vertical-align: bottom;
|
||||
color: $uni-text-color-active;
|
||||
|
||||
.unit {
|
||||
margin-right: -2rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部操作栏 */
|
||||
.footer-fixed {
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 180rpx;
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 11;
|
||||
box-shadow: 0 -4rpx 40rpx 0 rgba(97, 97, 97, 0.1);
|
||||
background: #fff;
|
||||
|
||||
.btn-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.btn-item {
|
||||
min-width: 164rpx;
|
||||
border-radius: 8rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #383838;
|
||||
text-align: center;
|
||||
border: 1rpx solid #a8a8a8;
|
||||
margin-left: 10rpx;
|
||||
&.common {
|
||||
color: #fff;
|
||||
border: none;
|
||||
background: linear-gradient(to right, $fuint-theme, $fuint-theme);
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #fff;
|
||||
border: none;
|
||||
background: linear-gradient(to right, #f9211c, #ff6335);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 弹出层-支付方式
|
||||
.pay-popup {
|
||||
padding: 25rpx 25rpx 70rpx 25rpx;
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 50rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pop-content {
|
||||
min-height: 120rpx;
|
||||
padding: 0 20rpx;
|
||||
|
||||
.pay-item {
|
||||
padding: 30rpx;
|
||||
font-size: 30rpx;
|
||||
background: #fff;
|
||||
border: 1rpx solid $fuint-theme;
|
||||
border-radius: 8rpx;
|
||||
color: #888;
|
||||
margin-bottom: 12rpx;
|
||||
text-align: center;
|
||||
|
||||
.item-left_icon {
|
||||
margin-right: 20rpx;
|
||||
font-size: 48rpx;
|
||||
|
||||
&.wechat {
|
||||
color: #00c800;
|
||||
}
|
||||
|
||||
&.balance {
|
||||
color: $fuint-theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
202
fuintUniapp/pages/order/express/index.vue
Normal file
202
fuintUniapp/pages/order/express/index.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view v-if="!isLoading" class="container">
|
||||
<!-- 物流信息 -->
|
||||
<view class="express i-card">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">物流公司</view>
|
||||
<view class="item-content">
|
||||
<text>{{ express.express_name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">物流单号</view>
|
||||
<view class="item-content">
|
||||
<text>{{ express.express_no }}</text>
|
||||
<view class="act-copy" @click.stop="handleCopy(express.express_no)">
|
||||
<text>复制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 物流动态 -->
|
||||
<view class="logis-detail">
|
||||
<view class="logis-item" :class="{ first: index === 0 }" v-for="(item, index) in express.list" :key="index">
|
||||
<view class="logis-item-content">
|
||||
<view class="logis-item-content__describe">
|
||||
<text class="f-26">{{ item.context }}</text>
|
||||
</view>
|
||||
<view class="logis-item-content__time">
|
||||
<text class="f-22">{{ item.ftime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as OrderApi from '@/api/order'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 正在加载
|
||||
isLoading: true,
|
||||
// 当前订单ID
|
||||
orderId: null,
|
||||
// 物流信息
|
||||
express: {}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad({ orderId }) {
|
||||
this.orderId = orderId
|
||||
// 获取当前订单的物流信息
|
||||
this.getExpress()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取当前订单的物流信息
|
||||
getExpress() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
OrderApi.express(app.orderId)
|
||||
.then(result => {
|
||||
app.express = result.data.express
|
||||
app.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 复制指定内容
|
||||
handleCopy(value) {
|
||||
const app = this
|
||||
uni.setClipboardData({
|
||||
data: value,
|
||||
success() {
|
||||
app.$toast('复制成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 通栏卡片
|
||||
.i-card {
|
||||
background: #fff;
|
||||
padding: 24rpx 24rpx;
|
||||
// width: 94%;
|
||||
box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||
// margin: 0 auto 20rpx auto;
|
||||
// border-radius: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
// 物流公司
|
||||
.express {
|
||||
|
||||
// margin-top: 24rpx;
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.item-lable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
|
||||
.act-copy {
|
||||
margin-left: 20rpx;
|
||||
padding: 2rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
border: 1rpx solid #c1c1c1;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.logis-detail {
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.logis-item {
|
||||
position: relative;
|
||||
padding: 10px 0 10px 25px;
|
||||
box-sizing: border-box;
|
||||
border-left: 2px solid #ccc;
|
||||
|
||||
&.first {
|
||||
border-left: 2px solid #f40;
|
||||
|
||||
&:after {
|
||||
background: #f40;
|
||||
}
|
||||
|
||||
.logis-item-content {
|
||||
background: #ff6e39;
|
||||
color: #fff;
|
||||
|
||||
&:after {
|
||||
border-bottom-color: #ff6e39;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: ' ';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: -6px;
|
||||
top: 30px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 10px;
|
||||
background: #bdbdbd;
|
||||
border: 2px solid #fff;
|
||||
}
|
||||
|
||||
.logis-item-content {
|
||||
position: relative;
|
||||
background: #f9f9f9;
|
||||
padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
color: #666;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
top: 18px;
|
||||
border-left: 10px solid #fff;
|
||||
border-bottom: 10px solid #f3f3f3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
400
fuintUniapp/pages/order/index.vue
Normal file
400
fuintUniapp/pages/order/index.vue
Normal file
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" @down="downCallback"
|
||||
:up="upOption" @up="upCallback">
|
||||
|
||||
<!-- tab栏 -->
|
||||
<u-tabs :list="tabs" :is-scroll="false" :current="curTab" active-color="#FA2209" :duration="0.2" @change="onChangeTab" />
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list">
|
||||
<view class="order-item" v-for="(item, index) in list.content" :key="index">
|
||||
<view class="item-top" @click="handleTargetDetail(item.id)">
|
||||
<view class="item-top-left">
|
||||
<text class="order-type">{{ item.typeName }}</text>
|
||||
</view>
|
||||
<view class="item-top-right">
|
||||
<text :class="item.status">{{ item.statusText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list" v-if="item.goods" @click="handleTargetDetail(item.id)">
|
||||
<view class="goods-item" v-for="(goods, idx) in item.goods" :key="idx">
|
||||
<!-- 商品图片 -->
|
||||
<view class="goods-image">
|
||||
<image class="image" :src="goods.image"></image>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods-content">
|
||||
<view class="goods-title twolist-hidden"><text>{{ goods.name }}</text></view>
|
||||
<view class="goods-props clearfix">
|
||||
<view class="goods-props-item" v-for="(props, idx) in goods.specList" :key="idx">
|
||||
<text>{{ props.specValue }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易信息 -->
|
||||
<view class="goods-trade">
|
||||
<view class="goods-price">
|
||||
<text class="unit">¥</text>
|
||||
<text class="value">{{ goods.price }}</text>
|
||||
</view>
|
||||
<view class="goods-num">
|
||||
<text>×{{ goods.num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 备注信息 -->
|
||||
<view v-if="item.remark" class="remark" @click="handleTargetDetail(item.id)">
|
||||
<text>备注:</text>
|
||||
<text>{{ item.remark ? item.remark : '--'}}</text>
|
||||
</view>
|
||||
<!-- 订单合计 -->
|
||||
<view class="order-total" @click="handleTargetDetail(item.id)">
|
||||
<text>总金额</text>
|
||||
<text class="unit">¥</text>
|
||||
<text class="money">{{ item.amount.toFixed(2) }}</text>
|
||||
</view>
|
||||
<!-- 订单操作 -->
|
||||
<view class="order-handle">
|
||||
<view class="order-time">
|
||||
<text class="time">{{ item.createTime }}</text>
|
||||
</view>
|
||||
<view class="btn-group">
|
||||
<view class="btn-item" @click="handleTargetDetail(item.id)">详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
PayTypeEnum,
|
||||
ReceiptStatusEnum
|
||||
} from '@/common/enum/order'
|
||||
import MescrollBody from '@/components/mescroll-uni/mescroll-body.vue'
|
||||
import MescrollMixin from '@/components/mescroll-uni/mescroll-mixins'
|
||||
import { getEmptyPaginateObj, getMoreListData } from '@/utils/app'
|
||||
import * as OrderApi from '@/api/order'
|
||||
import { wxPayment } from '@/utils/app'
|
||||
|
||||
// 每页记录数量
|
||||
const pageSize = 15
|
||||
|
||||
// tab栏数据
|
||||
const tabs = [{
|
||||
name: `全部`,
|
||||
value: 'all'
|
||||
}, {
|
||||
name: `待支付`,
|
||||
value: 'toPay'
|
||||
}, {
|
||||
name: `已支付`,
|
||||
value: 'paid'
|
||||
}, {
|
||||
name: `已取消`,
|
||||
value: 'cancel'
|
||||
}]
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MescrollBody
|
||||
},
|
||||
mixins: [MescrollMixin],
|
||||
data() {
|
||||
return {
|
||||
// 枚举类
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
PayTypeEnum,
|
||||
ReceiptStatusEnum,
|
||||
|
||||
// 当前页面参数
|
||||
options: { dataType: 'all' },
|
||||
// tab栏数据
|
||||
tabs,
|
||||
// 当前标签索引
|
||||
curTab: 0,
|
||||
// 订单列表数据
|
||||
list: getEmptyPaginateObj(),
|
||||
// 正在加载
|
||||
isLoading: false,
|
||||
// 上拉加载配置
|
||||
upOption: {
|
||||
// 首次自动执行
|
||||
auto: true,
|
||||
// 每页数据的数量; 默认10
|
||||
page: { size: pageSize },
|
||||
// 数量要大于12条才显示无更多数据
|
||||
noMoreSize: 12,
|
||||
// 空布局
|
||||
empty: {
|
||||
tip: '亲,暂无订单记录'
|
||||
}
|
||||
},
|
||||
// 支付方式弹窗
|
||||
showPayPopup: false,
|
||||
statusText: "payStatus"
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
// 初始化当前选中的标签
|
||||
this.initCurTab(options)
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.onRefreshList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
// 初始化当前选中的标签
|
||||
initCurTab(options) {
|
||||
const app = this
|
||||
if (options.dataType) {
|
||||
console.log("options === ", options);
|
||||
const index = app.tabs.findIndex(item => item.value == options.dataType)
|
||||
app.curTab = index > -1 ? index : 0
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 上拉加载的回调 (页面初始化时也会执行一次)
|
||||
* 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10
|
||||
* @param {Object} page
|
||||
*/
|
||||
upCallback(page) {
|
||||
const app = this
|
||||
// 设置列表数据
|
||||
app.getOrderList(page.num)
|
||||
.then(list => {
|
||||
const curPageLen = list.content.length;
|
||||
const totalSize = list.totalElements;
|
||||
app.mescroll.endBySize(curPageLen, totalSize);
|
||||
})
|
||||
.catch(() => app.mescroll.endErr())
|
||||
},
|
||||
|
||||
// 获取订单列表
|
||||
getOrderList(pageNo = 1) {
|
||||
const app = this
|
||||
return new Promise((resolve, reject) => {
|
||||
OrderApi.list({ dataType: app.getTabValue(), page: pageNo }, { load: false })
|
||||
.then(result => {
|
||||
// 合并新数据
|
||||
const newList = result.data;
|
||||
app.list.content = getMoreListData(newList, app.list, pageNo);
|
||||
resolve(newList);
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 点击跳转到首页
|
||||
onTargetIndex() {
|
||||
this.$navTo('pages/index/index')
|
||||
},
|
||||
|
||||
// 获取当前标签项的值
|
||||
getTabValue() {
|
||||
return this.tabs[this.curTab].value
|
||||
},
|
||||
|
||||
// 切换标签项
|
||||
onChangeTab(index) {
|
||||
const app = this
|
||||
// 设置当前选中的标签
|
||||
app.curTab = index
|
||||
// 刷新订单列表
|
||||
app.onRefreshList()
|
||||
},
|
||||
|
||||
// 刷新订单列表
|
||||
onRefreshList() {
|
||||
this.list = getEmptyPaginateObj()
|
||||
setTimeout(() => {
|
||||
this.mescroll.resetUpScroll()
|
||||
}, 120)
|
||||
},
|
||||
|
||||
// 跳转到订单详情页
|
||||
handleTargetDetail(orderId) {
|
||||
this.$navTo('pages/order/detail', { orderId })
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 项目内容
|
||||
.order-item {
|
||||
margin: 10rpx auto 10rpx auto;
|
||||
padding: 20rpx 20rpx;
|
||||
width: 94%;
|
||||
border: 3rpx solid #e8e8e8;
|
||||
box-shadow: 5rpx 5rpx 5rpx 5rpx rgba(0.05, 0.05, 0.05, 0.05);
|
||||
border-radius: 16rpx;
|
||||
background: #fff;
|
||||
.A{
|
||||
color:$uni-text-color-active;
|
||||
}
|
||||
.B{
|
||||
color:$uni-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 项目顶部
|
||||
.item-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.order-type {
|
||||
font-weight: bold;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.state-text {
|
||||
color: $uni-text-color-active;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
.goods-list {
|
||||
// 商品项
|
||||
.goods-item {
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
border-bottom: 3rpx solid #e8e8e8;
|
||||
padding: 20rpx;
|
||||
|
||||
// 商品图片
|
||||
.goods-image {
|
||||
width: 180rpx;
|
||||
height: 143rpx;
|
||||
|
||||
.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品内容
|
||||
.goods-content {
|
||||
flex: 1;
|
||||
padding-left: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
|
||||
.goods-title {
|
||||
font-size: 26rpx;
|
||||
max-height: 76rpx;
|
||||
}
|
||||
|
||||
.goods-props {
|
||||
margin-top: 14rpx;
|
||||
height: 40rpx;
|
||||
color: #ababab;
|
||||
font-size: 24rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.goods-props-item {
|
||||
display: inline-block;
|
||||
margin-right: 14rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: #F5F5F5;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 交易信息
|
||||
.goods-trade {
|
||||
padding-top: 16rpx;
|
||||
width: 150rpx;
|
||||
text-align: right;
|
||||
color: $uni-text-color-grey;
|
||||
font-size: 26rpx;
|
||||
|
||||
.goods-price {
|
||||
vertical-align: bottom;
|
||||
margin-bottom: 16rpx;
|
||||
.unit {
|
||||
margin-right: -2rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 备注信息
|
||||
.remark {
|
||||
padding: 12rpx 0 12rpx 20rpx;
|
||||
border-radius: 5rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
// 订单合计
|
||||
.order-total {
|
||||
font-size: 26rpx;
|
||||
vertical-align: bottom;
|
||||
text-align: right;
|
||||
height: 40rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.unit {
|
||||
margin-left: 8rpx;
|
||||
margin-right: -2rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 订单操作
|
||||
.order-handle {
|
||||
height: 50rpx;
|
||||
.order-time {
|
||||
color: #777;
|
||||
float: left;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.btn-group {
|
||||
.btn-item {
|
||||
border-radius: 10rpx;
|
||||
padding: 8rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
float: right;
|
||||
color: #ffffff;
|
||||
background: #f9211c;
|
||||
border: 1rpx solid #f9211c;
|
||||
margin-left: 25rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
190
fuintUniapp/pages/order/result.vue
Normal file
190
fuintUniapp/pages/order/result.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="success">
|
||||
<view v-if="isSuccess" class="result">
|
||||
<image class="icon" src='/static/pay/success.png'></image>
|
||||
<text class="text">恭喜,支付成功!</text>
|
||||
</view>
|
||||
<view v-if="!isSuccess" class="result">
|
||||
<image class="icon" src='/static/pay/fail.png'></image>
|
||||
<text class="text" v-if="message && message != undefined" style="color:#888888;">支付失败:{{ message }}</text>
|
||||
<text class="text" v-if="!message || message == undefined" style="color:#888888;">哎呀,支付失败啦~</text>
|
||||
</view>
|
||||
<view class="options">
|
||||
<view class="to-home" @click="toHome()"><text class="iconfont icon-home"></text>返回首页</view>
|
||||
<view class="to-order" @click="toOrderInfo()"><text class="iconfont icon-form"></text>查看订单</view>
|
||||
</view>
|
||||
</view>
|
||||
<block>
|
||||
<Goods ref="mescrollItem" :itemStyle="goodsStyle" :params="goodsParams"/>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Goods from '@/components/page/goods'
|
||||
import * as Api from '@/api/page'
|
||||
import * as OrderApi from '@/api/order'
|
||||
import * as MessageApi from '@/api/message'
|
||||
import MescrollCompMixin from "@/components/mescroll-uni/mixins/mescroll-comp.js"
|
||||
export default {
|
||||
mixins: [MescrollCompMixin],
|
||||
components: {
|
||||
Goods
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
orderId: 0,
|
||||
orderInfo: null,
|
||||
isLoading: true,
|
||||
isSuccess: false,
|
||||
message: '',
|
||||
goodsStyle: {
|
||||
"background": "#F6F6F6",
|
||||
"display": "list",
|
||||
"column": 1,
|
||||
"show": ["goodsName", "goodsPrice", "linePrice", "sellingPoint", "goodsSales"]
|
||||
},
|
||||
goodsParams: {
|
||||
"source": "auto",
|
||||
"auto": {
|
||||
"category": 0,
|
||||
"goodsSort": "all",
|
||||
"showNum": 40
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
// 当前页面参数
|
||||
this.orderId = options.orderId ? options.orderId : 0
|
||||
this.message = options.message ? options.message : ''
|
||||
this.getOrderDetail();
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 去首页
|
||||
* */
|
||||
toHome() {
|
||||
const app = this
|
||||
// #ifdef MP-WEIXIN
|
||||
MessageApi.getSubTemplate({keys: "orderCreated,deliverGoods"}).then(result => {
|
||||
const templateIds = result.data
|
||||
wx.requestSubscribeMessage({tmplIds: templateIds,
|
||||
success(res) {
|
||||
console.log("调用成功!")
|
||||
}, fail(res) {
|
||||
console.log("调用失败:", res)
|
||||
}, complete() {
|
||||
app.$navTo('pages/index/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
app.$navTo('pages/index/index')
|
||||
// #endif
|
||||
},
|
||||
|
||||
/**
|
||||
* 去订单详情
|
||||
* */
|
||||
toOrderInfo() {
|
||||
const app = this
|
||||
// #ifdef MP-WEIXIN
|
||||
MessageApi.getSubTemplate({keys: "orderCreated,deliverGoods"}).then(result => {
|
||||
const templateIds = result.data
|
||||
wx.requestSubscribeMessage({tmplIds: templateIds,
|
||||
success(res) {
|
||||
console.log("调用成功!")
|
||||
}, fail(res) {
|
||||
console.log("调用失败:", res)
|
||||
}, complete() {
|
||||
app.$navTo('pages/order/detail?orderId=' + app.orderId)
|
||||
}
|
||||
})
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
app.$navTo('pages/order/detail?orderId=' + app.orderId)
|
||||
// #endif
|
||||
},
|
||||
getOrderDetail() {
|
||||
const app = this
|
||||
app.isLoading = true
|
||||
OrderApi.detail(app.orderId)
|
||||
.then(result => {
|
||||
app.isSuccess = result.data.payStatus === 'B' ? true : false;
|
||||
app.isLoading = false;
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.success {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 60rpx;
|
||||
margin-bottom: 80rpx;
|
||||
.result {
|
||||
font-size: 35rpx;
|
||||
text-align: center;
|
||||
padding: 10rpx;
|
||||
height: 70rpx;
|
||||
.icon {
|
||||
width: 55rpx;
|
||||
height: 55rpx;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.text {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
color: #00B83F;
|
||||
margin-left: 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.options {
|
||||
margin-top: 0rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction:row;
|
||||
padding: 50rpx 100rpx 60rpx 100rpx;
|
||||
.to-home,.to-order {
|
||||
margin: 0 auto;
|
||||
font-size: 28rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
border-radius: 72rpx;
|
||||
width: 240rpx;
|
||||
background: #fff;
|
||||
border: solid 1rpx #888;
|
||||
float: left;
|
||||
}
|
||||
.iconfont {
|
||||
font-weight: bold;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.attention {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user