更新员工工作台商品详情
83
apis/interfaces/coupon.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Web-zdx
|
||||
* moduleName: 优惠券相关
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 我的优惠券
|
||||
const myCoupon = (data) => {
|
||||
return request({
|
||||
url: 'coupons/user/coupons',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 优惠券分组列表
|
||||
const getCouponsListById = (id,data) => {
|
||||
return request({
|
||||
url: 'coupons/user/coupons/'+id+'/list',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据优惠券id获取优惠券的详情信息
|
||||
const getCouponsInfoById = (id) => {
|
||||
return request({
|
||||
url: 'coupons/user/coupons/'+id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 根据企业id获取企业首页的轮播图列表
|
||||
const couponsByCompanyId = (data) => {
|
||||
return request({
|
||||
url: 'coupons',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 领取优惠券
|
||||
const couponsGrant = (id) => {
|
||||
return request({
|
||||
url: 'coupons/'+id+'/grant',
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
// 获取优惠券可使用商品
|
||||
const getGoodsByGrantId = (data) => {
|
||||
return request({
|
||||
url: 'user/coupons/goods',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 使用提货券兑换商品
|
||||
const exchangeGoods = (data) => {
|
||||
return request({
|
||||
url: 'user/coupons/exchange',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取核销二维码
|
||||
const getQrcodeByGrantId = (data) => {
|
||||
return request({
|
||||
url: 'coupons/user/coupons/qrcode',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
myCoupon,
|
||||
couponsByCompanyId,
|
||||
couponsGrant,
|
||||
getGoodsByGrantId,
|
||||
exchangeGoods,
|
||||
getCouponsListById,
|
||||
getCouponsInfoById,
|
||||
getQrcodeByGrantId
|
||||
}
|
||||
140
apis/interfaces/numberWeight.js
Normal file
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* Web-zdx
|
||||
* moduleName: 我的数权
|
||||
*/
|
||||
|
||||
import request from '../request.js'
|
||||
|
||||
// 我的数权
|
||||
const mallWarrants = (data) => {
|
||||
return request({
|
||||
url: 'mall/warrants',
|
||||
method: 'GET',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 我的数权Id获取数权详情
|
||||
const mallWarrantsList = (symbol) => {
|
||||
return request({
|
||||
url: 'mall/warrants/exchange',
|
||||
method: 'GET',
|
||||
data: {
|
||||
symbol:symbol
|
||||
}
|
||||
})
|
||||
}
|
||||
// 确认提货
|
||||
const mallWarrantsSure = (data) => {
|
||||
return request({
|
||||
url: 'mall/warrants/exchange',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 我的邮寄订单,我的提货单
|
||||
const mallShipmentsPostShop = (apiUrl,data) => {
|
||||
return request({
|
||||
url: apiUrl,
|
||||
method: 'GET',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 根据提货单的no 获取提货单的详情
|
||||
const mallShipmentsInfo = (no) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+no,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
// 取消提货单
|
||||
const mallShipmentsCancel = (shipmentNo) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+ shipmentNo+'/cancel',
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
// 签收提货单
|
||||
const mallShipmentsSign = (shipmentNo) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+ shipmentNo+'/sign',
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
// 退货单申请退货
|
||||
const mallShipmentsRefund = (data) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+ data.shipment_no+'/refund',
|
||||
method: 'POST',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 退货单申请退货前置条件
|
||||
const mallShipmentsRefundInfo = (shipmentNo) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+ shipmentNo+'/refund',
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
// 查看物流接口
|
||||
const mallShipmentsLogistic = (shipmentNo) => {
|
||||
return request({
|
||||
url: 'mall/shipments/'+ shipmentNo+'/logistic',
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
// 我的退货单 mall/refunds
|
||||
const mallRefunds = (data) => {
|
||||
return request({
|
||||
url: 'mall/refunds',
|
||||
method: 'GET',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//退货单详情页
|
||||
const mallRefundsInfo = (no) => {
|
||||
return request({
|
||||
url: 'mall/refunds/'+no,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
// 确认退货mall/refunds/{refund}/deliver
|
||||
const mallRefundsDeliver = (data) => {
|
||||
return request({
|
||||
url: 'mall/refunds/'+data.refund+'/deliver',
|
||||
method: 'POST',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 提货单或者服务单生成提货二维码
|
||||
const mallWarrantsQrcode = (data) => {
|
||||
return request({
|
||||
url: 'mall/warrants/qrcode',
|
||||
method: 'GET',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
mallWarrants,
|
||||
mallWarrantsList,
|
||||
mallWarrantsSure,
|
||||
mallShipmentsPostShop,
|
||||
mallShipmentsInfo,
|
||||
mallShipmentsCancel,
|
||||
mallShipmentsSign,
|
||||
mallShipmentsRefund,
|
||||
mallShipmentsRefundInfo,
|
||||
mallShipmentsLogistic,
|
||||
mallRefunds,
|
||||
mallRefundsInfo,
|
||||
mallRefundsDeliver,
|
||||
mallWarrantsQrcode
|
||||
}
|
||||
240
components/coupon-template/coupon-template-1.vue
Normal file
173
components/goods-template/goods-template.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<view class="GoodTemplate">
|
||||
<view class="goods-item">
|
||||
<image class="goods-img" @click="goDetail(item.goods_id)" hover-class="none" :src="item.cover"
|
||||
mode="aspectFill" />
|
||||
<view class="goods-info" @click="goDetail(item.goods_id)">
|
||||
<view class="goods-title ellipsis-2">{{item.name}}</view>
|
||||
<view class="goods-price">
|
||||
<span>¥</span>{{item.price.price_min}}/权证
|
||||
<span style='color: #ffaa00;'><span>点击量:</span> {{item.clicks}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="exchange" v-if="exchangeShow" @click="exchange(item)">
|
||||
兑换商品
|
||||
</view>
|
||||
</view>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
exchangeGoods
|
||||
} from '@/apis/interfaces/coupon'
|
||||
export default {
|
||||
name: "GoodTemplate",
|
||||
props: {
|
||||
item: Object,
|
||||
exchangeShow: {
|
||||
type: Boolean,
|
||||
default: function() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 只有提货券会把数据传递拖来,其他不会传过来的
|
||||
couponGrantId: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
exchange(item) {
|
||||
console.error('兑换商品')
|
||||
console.log(item, this.couponGrantId)
|
||||
let data = {
|
||||
conpon_grant_id: this.couponGrantId,
|
||||
goods_id: this.item.goods_id,
|
||||
goods_sku_id: this.item.skus[0].sku_id,
|
||||
}
|
||||
console.log(data)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '您是否确认兑换该商品',
|
||||
success: (res) => {
|
||||
exchangeGoods(data).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
wx.setStorageSync('refresh', true)
|
||||
setTimeout(res => {
|
||||
uni.navigateBack({})
|
||||
}, 3000)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'primary',
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
goDetail(id) {
|
||||
this.$Router.push({
|
||||
name: 'GoodsDetail',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 商品列表
|
||||
.goods-item {
|
||||
width: calc(100% - 20rpx);
|
||||
box-shadow: 0 0 20rpx 4rpx rgba($color: $main-color, $alpha: 0.1);
|
||||
border-radius: 16rpx;
|
||||
// margin-left: 20rpx;
|
||||
margin: 40rpx 0 0 20rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.exchange {
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
right: 30rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 20rpx 0 20rpx 0;
|
||||
background-color: $main-color;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
position: relative;
|
||||
top: -20rpx;
|
||||
left: -20rpx;
|
||||
box-shadow: 0 0 10rpx 4rpx rgba($color: $main-color, $alpha: 0.1);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
flex: 1;
|
||||
height: 180rpx;
|
||||
padding: 20rpx 20rpx 20rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
|
||||
.goods-title {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.goods-price {
|
||||
color: $main-color;
|
||||
padding-top: 10rpx;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
|
||||
span {
|
||||
font-size: 26rpx;
|
||||
// padding-right: 10rpx;
|
||||
font-weight: normal;
|
||||
|
||||
&:nth-child(2) {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
175
components/mall-refunds-template/mall-refunds-template.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view class="MallRefundsTemplate">
|
||||
<view class="top">
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="item.shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{item.shop.name}}</view>
|
||||
</view>
|
||||
<view class="no ellipsis">退货单号: {{item.refund_no}}</view>
|
||||
</view>
|
||||
<view class="status" style="color:#ff5500;">{{item.state.text}}</view>
|
||||
</view>
|
||||
<view class="goods-info" @click="goDetail(item.goods_sku.goods_id)">
|
||||
<image class="goods-img" :src="item.goods_sku.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{item.goods_sku.goods_name}}</view>
|
||||
<!-- <span>¥{{item.account.balance}}</span> -->
|
||||
</view>
|
||||
<view class="sku">数权个数 <span>x {{item.qty}}</span> </view>
|
||||
<!-- <view class="sku">提货方式 <span> {{item.type_text}}</span> </view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MallRefundsTemplate",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props: {
|
||||
item: Object
|
||||
},
|
||||
methods: {
|
||||
// 跳转到商品详情页面
|
||||
goDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/detail?id=' + id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.MallRefundsTemplate{
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 460rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 10rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size*.9;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 36rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
// width: 340rpx;
|
||||
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.copy {
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
171
components/mall-shipments-template/mall-shipments-template.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<view class="MallShipmentTemplate" >
|
||||
<view class="top" >
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="item.shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{item.shop.name}}</view>
|
||||
</view>
|
||||
<view class="no ellipsis">发货单号: {{item.shipment_no}}</view>
|
||||
<!-- <view class="no ellipsis">创建时间: {{item.created_at}}</view> -->
|
||||
</view>
|
||||
<view class="status" style="color:#DD524D;">{{item.state_text}}</view>
|
||||
</view>
|
||||
<view class="goods-info" @click="goDetail(item.goods_sku.goods_id)">
|
||||
<image class="goods-img" :src="item.goods_sku.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{item.goods_sku.goods_name}}</view>
|
||||
<!-- <span>¥{{item.account.balance}}</span> -->
|
||||
</view>
|
||||
<view class="sku">数权个数 <span>x {{item.qty}}</span> </view>
|
||||
<view class="sku">提货方式 <span> {{item.type_text}}</span> </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MallShipmentTemplate",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props:{
|
||||
item:Object
|
||||
},
|
||||
methods: {
|
||||
// 跳转到商品详情页面
|
||||
goDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/detail?id='+id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 460rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 10rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
width: 530rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size*.9;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 36rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
// width: 340rpx;
|
||||
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.flexrow{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
.copy{
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
176
components/number-weight-template/number-weight-template.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<view class="OrderTemplate" >
|
||||
<view class="top" >
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="item.shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{item.shop.name}}</view>
|
||||
</view>
|
||||
<view class="flexrow">
|
||||
<view class="no ellipsis">区块链地址: {{item.account.addr}}</view> <span class="copy" @click="copy(item.account.addr)">复制</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info" @click="goDetail(item.goods.goods_id)">
|
||||
<image class="goods-img" :src="item.goods.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{item.goods.goods_name}}</view>
|
||||
<!-- <span>¥{{item.account.balance}}</span> -->
|
||||
</view>
|
||||
<view class="sku">数权个数 <span>x {{item.account.balance}}</span> </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "OrderTemplate",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
props:{
|
||||
item:Object
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.item,'onshow,numtempa')
|
||||
},
|
||||
methods: {
|
||||
// 跳转到商品详情页面
|
||||
goDetail(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/detail?id='+id
|
||||
})
|
||||
},
|
||||
// 复制
|
||||
copy(e){
|
||||
uni.setClipboardData({
|
||||
data: e,
|
||||
success: res=>{
|
||||
console.log('res',res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 600rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 10rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 36rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
// width: 340rpx;
|
||||
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.flexrow{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
.copy{
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
700
pages.json
@@ -1,348 +1,414 @@
|
||||
{
|
||||
"pages": [{
|
||||
"path": "pages/equity/index",
|
||||
"name": "Equity",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/market/index",
|
||||
"name": "Market",
|
||||
"style": {
|
||||
"navigationBarTitleText": "转让市场",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "成交历史",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#555555"
|
||||
}]
|
||||
"path": "pages/equity/index",
|
||||
"name": "Equity",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/index",
|
||||
"name": "Store",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "企业工具",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/index",
|
||||
"name": "Property",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/address/list",
|
||||
"name": "AddressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/address/create",
|
||||
"name": "AddressCreate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址新增",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/details",
|
||||
"name": "goodsDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"type": "transparent",
|
||||
"buttons": [{
|
||||
"text": "分享",
|
||||
"fontSize": "12",
|
||||
"color": "#555555"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/login",
|
||||
"name": "Login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"disableScroll": true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/registered",
|
||||
"name": "Registered",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/prompt",
|
||||
"name": "Prompt",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"disableScroll": true,
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "先逛一逛",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#555555"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/vip/index",
|
||||
"name": "Vip",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员",
|
||||
"navigationBarBackgroundColor": "#1f1b1c",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#fefaef"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/equity/search",
|
||||
"name": "Search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/market/logs",
|
||||
"name": "marketLogs",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成交历史"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/buy",
|
||||
"name": "Buy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/index",
|
||||
"name": "Order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单管理"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/details",
|
||||
"name": "OrderDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/sales",
|
||||
"name": "Sales",
|
||||
"style": {
|
||||
"navigationBarTitleText": "售后"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/lists",
|
||||
"name": "goodsList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/approve",
|
||||
"name": "Approve",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/visitors",
|
||||
"name": "Visitors",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客统计",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/customer",
|
||||
"name": "Customer",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成交客户",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/basics",
|
||||
"name": "Basics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "基础信息",
|
||||
"app-plus": {
|
||||
}, {
|
||||
"path": "pages/market/index",
|
||||
"name": "Market",
|
||||
"style": {
|
||||
"navigationBarTitleText": "转让市场",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "保存",
|
||||
"fontSize": "16",
|
||||
"text": "成交历史",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
"color": "#555555"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/employees/list",
|
||||
"name": "Employees",
|
||||
"style": {
|
||||
"navigationBarTitleText": "员工",
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
}, {
|
||||
"path": "pages/store/index",
|
||||
"name": "Store",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "企业工具",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/index",
|
||||
"name": "Property",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/address/list",
|
||||
"name": "AddressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/address/create",
|
||||
"name": "AddressCreate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址新增",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/numberWeight",
|
||||
"name": "NumberWeight",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的权证",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/property/order/numberWeightInfo",
|
||||
"name": "NumberWeightInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "权证详情",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/mallShipments",
|
||||
"name": "MallShipments",
|
||||
"style": {
|
||||
"navigationBarTitleText": "已经提货",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/logistics",
|
||||
"name": "Orderlogistics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "查看物流",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/mallShipmentsInfo",
|
||||
"name": "MallShipmentsInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提货单详情页面",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/mallRefundsInfo",
|
||||
"name": "MallRefundsInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退货单详情",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/order/mallShipmentsRefund",
|
||||
"name": "MallShipmentsRefund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退货",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/property/coupon/coupon",
|
||||
"name": "CouponList",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340",
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/coupon/couponMore",
|
||||
"name": "CouponMoreList",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340",
|
||||
"navigationBarTitleText": "优惠券列表"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/property/coupon/detail",
|
||||
"name": "CouponDetail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#e93340",
|
||||
"navigationBarTitleText": "优惠券详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/goods/details",
|
||||
"name": "goodsDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"type": "transparent",
|
||||
"buttons": [{
|
||||
"text": "分享",
|
||||
"fontSize": "12",
|
||||
"color": "#555555"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/login/login",
|
||||
"name": "Login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"disableScroll": true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/registered",
|
||||
"name": "Registered",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/prompt",
|
||||
"name": "Prompt",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"disableScroll": true,
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "添加",
|
||||
"text": "先逛一逛",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#555555"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/vip/index",
|
||||
"name": "Vip",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员",
|
||||
"navigationBarBackgroundColor": "#1f1b1c",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#fefaef"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/equity/search",
|
||||
"name": "Search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/market/logs",
|
||||
"name": "marketLogs",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成交历史"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/buy",
|
||||
"name": "Buy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/index",
|
||||
"name": "Order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单管理"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/details",
|
||||
"name": "OrderDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/sales",
|
||||
"name": "Sales",
|
||||
"style": {
|
||||
"navigationBarTitleText": "售后"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/lists",
|
||||
"name": "goodsList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品列表",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/company/approve",
|
||||
"name": "Approve",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/visitors",
|
||||
"name": "Visitors",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客统计",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/customer",
|
||||
"name": "Customer",
|
||||
"style": {
|
||||
"navigationBarTitleText": "成交客户",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/store/basics",
|
||||
"name": "Basics",
|
||||
"style": {
|
||||
"navigationBarTitleText": "基础信息",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "保存",
|
||||
"fontSize": "16",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/employees/list",
|
||||
"name": "Employees",
|
||||
"style": {
|
||||
"navigationBarTitleText": "员工",
|
||||
"app-plus": {
|
||||
"bounce": "none",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "添加",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/employees/add",
|
||||
"name": "addEmployees",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加员工",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/management",
|
||||
"name": "GoodsMag",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品权证",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "发布",
|
||||
"fontSize": "16",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/addClassify",
|
||||
"name": "addClassify",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择权证分类",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/add",
|
||||
"name": "GoodsMagAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布权证",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/index",
|
||||
"name": "Coupons",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/management",
|
||||
"name": "CouponsMag",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券管理",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "发布",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/employees/add",
|
||||
"name": "addEmployees",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加员工",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/management",
|
||||
"name": "GoodsMag",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品权证",
|
||||
"app-plus": {
|
||||
}, {
|
||||
"path": "pages/coupons/add",
|
||||
"name": "couponsAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布优惠券",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/selectGoods",
|
||||
"name": "selectGoods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择产品",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/magDetails",
|
||||
"name": "magDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/verification/index",
|
||||
"name": "Verification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码验证"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/verification/details",
|
||||
"name": "VerificationDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "核销券详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/shop/lists",
|
||||
"name": "shopLists",
|
||||
"style": {
|
||||
"navigationBarTitleText": "部门/门店",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "发布",
|
||||
"fontSize": "16",
|
||||
"text": "创建",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/addClassify",
|
||||
"name": "addClassify",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择权证分类",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/add",
|
||||
"name": "GoodsMagAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布权证",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},{
|
||||
"path": "pages/goods/chain",
|
||||
"name": "GoodsChain",
|
||||
"style": {
|
||||
"navigationBarTitleText": "区块链证书",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},{
|
||||
"path": "pages/goods/attestation",
|
||||
"name": "GoodsAttestation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品认证",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},{
|
||||
"path": "pages/goods/tracedTo",
|
||||
"name": "GoodstracedTo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品溯源",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},{
|
||||
"path": "pages/coupons/index",
|
||||
"name": "Coupons",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/management",
|
||||
"name": "CouponsMag",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券管理",
|
||||
"titleNView": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"buttons": [{
|
||||
"text": "发布",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}, {
|
||||
"path": "pages/shop/create",
|
||||
"name": "shopCreate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "创建门店/部门",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/add",
|
||||
"name": "couponsAdd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布优惠券",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/selectGoods",
|
||||
"name": "selectGoods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择产品",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/coupons/magDetails",
|
||||
"name": "magDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/verification/index",
|
||||
"name": "Verification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码验证"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/verification/details",
|
||||
"name": "VerificationDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "核销券详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/shop/lists",
|
||||
"name": "shopLists",
|
||||
"style": {
|
||||
"navigationBarTitleText": "部门/门店",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"text": "创建",
|
||||
"fontSize": "14",
|
||||
"width": "80",
|
||||
"color": "#e93340"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/shop/create",
|
||||
"name": "shopCreate",
|
||||
"style": {
|
||||
"navigationBarTitleText": "创建门店/部门",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}],
|
||||
],
|
||||
"tabBar": {
|
||||
"color": "#bababa",
|
||||
"selectedColor": "#e93340",
|
||||
|
||||
292
pages/property/coupon/coupon.vue
Normal file
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<view class="Coupon">
|
||||
<!-- 分类 -->
|
||||
<view class="scroll-top">
|
||||
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-into-view='"nav"+selectNavId'
|
||||
scroll-with-animation="true">
|
||||
<view v-for="(item,index) in navList" :key="index" :id="'nav'+item.id" @click="selectNav(item.id)"
|
||||
:class="['scroll-view-item_H',selectNavId === item.id ?'scroll-view-item_H_selected':'']">
|
||||
{{item.name}}
|
||||
<block v-if='index === 0'>({{count.all}})</block>
|
||||
<block v-if='index === 1'>({{count.services}})</block>
|
||||
<block v-if='index === 2'>({{count.reductions}})</block>
|
||||
<block v-if='index === 3'>({{count.exchanges}})</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="scroll-view_H-1" scroll-x="true" :scroll-into-view='"nav"+selectCategoryId'
|
||||
scroll-with-animation="true">
|
||||
<view v-for="(item,index) in categroyList" :key="index" :id="'nav'+item.id"
|
||||
@click="selectCategory(item.id)"
|
||||
:class="['scroll-view-item_H-1',selectCategoryId === item.id ?'scroll-view-item_H_selected-1':'']">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 有优惠券列表 -->
|
||||
<view class="coupon-content">
|
||||
<couponTemplate v-for="(item,index) in lists" :key='index' :item="{...item}" :action="actions" />
|
||||
</view>
|
||||
|
||||
<!-- 没有优惠券列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-counpon' :txt="showTxt" />
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
myCoupon
|
||||
} from '@/apis/interfaces/coupon'
|
||||
import couponTemplate from '@/components/coupon-template/coupon-template-1'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
actions: {
|
||||
name: '去使用',
|
||||
type: 'toUsed'
|
||||
},
|
||||
lists:[],
|
||||
count:{
|
||||
all:0,
|
||||
services:0,
|
||||
reductions:0,
|
||||
exchanges:0,
|
||||
},
|
||||
navList: [{
|
||||
id: '',
|
||||
name: '全部'
|
||||
}, {
|
||||
id: '1',
|
||||
name: '服务券'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '代金券'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: '提货券'
|
||||
}
|
||||
],
|
||||
categroyList: [{
|
||||
id: '4',
|
||||
name: '新到'
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
name: '即将到期'
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '待使用'
|
||||
}, {
|
||||
id: '2',
|
||||
name: '已使用'
|
||||
}, {
|
||||
id: '3',
|
||||
name: '已过期'
|
||||
}
|
||||
],
|
||||
selectCategoryId: '', // 默认选择分类 默认第一个
|
||||
selectNavId: '',
|
||||
showTxt: '没有任何优惠券哦~',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
couponTemplate
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getMyCoupon()
|
||||
},
|
||||
onShow() {
|
||||
if (wx.getStorageSync('refresh')) {
|
||||
this.lists = []
|
||||
this.getMyCoupon()
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.lists = []
|
||||
this.getMyCoupon()
|
||||
},
|
||||
methods: {
|
||||
// 优惠券列表
|
||||
getMyCoupon() {
|
||||
let data = {
|
||||
type: this.selectNavId
|
||||
}
|
||||
if(this.selectCategoryId==='4' || this.selectCategoryId==='5'){
|
||||
data.status = ''
|
||||
if(this.selectCategoryId === '4'){
|
||||
data.time = 'new'
|
||||
}else{
|
||||
data.time = 'expire'
|
||||
}
|
||||
}else{
|
||||
data.status = this.selectCategoryId
|
||||
}
|
||||
console.log(data)
|
||||
myCoupon(data).then(res => {
|
||||
console.log(res)
|
||||
this.lists = res.lists
|
||||
this.count = res.count
|
||||
uni.stopPullDownRefresh()
|
||||
wx.setStorageSync('refresh', false)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 切换商品分类
|
||||
selectNav(id) {
|
||||
console.log(id)
|
||||
this.selectNavId = id
|
||||
this.getMyCoupon()
|
||||
},
|
||||
selectCategory(id) {
|
||||
console.log(id)
|
||||
this.selectCategoryId = id
|
||||
this.getMyCoupon()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Coupon {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #F7F7F7;
|
||||
|
||||
.coupon-nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
padding: 30rpx 60rpx 0 60rpx;
|
||||
color: #cacaca;
|
||||
|
||||
.nav-item {
|
||||
padding: 20rpx 30rpx 30rpx 30rpx;
|
||||
border-bottom: solid 4rpx #fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nav-item-select {
|
||||
border-bottom: solid 6rpx $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-top {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
|
||||
.scroll-view_H {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.scroll-view-item_H {
|
||||
margin-right: 60rpx;
|
||||
padding: 20rpx 0 40rpx 0;
|
||||
// height: 100rpx;
|
||||
display: inline-block;
|
||||
min-width: 120rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: #fff;
|
||||
background-color: #fff;
|
||||
transition: .1s;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-view-item_H_selected {
|
||||
// border-bottom: solid $main-color 4rpx;
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
// font-size: 36rpx;
|
||||
// transition: .3s;
|
||||
text-shadow: 6rpx 8rpx 30rpx rgba($color: $main-color, $alpha: .5);
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// bottom: 10rpx;
|
||||
// left: 0;
|
||||
// height: 8rpx;
|
||||
// width: 100%;
|
||||
// background-color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H-1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
background-color: #fff;
|
||||
// position: sticky;
|
||||
// top: 100rpx;
|
||||
// z-index: 1000;
|
||||
|
||||
.scroll-view-item_H-1 {
|
||||
display: inline-block;
|
||||
min-width: 120rpx;
|
||||
font-size: 24rpx;
|
||||
border-bottom: #fff;
|
||||
background-color: #f7f7f7;
|
||||
margin-left: 20rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.scroll-view-item_H_selected-1 {
|
||||
// border-bottom: solid $main-color 4rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
background-image: linear-gradient(to left, $main-color, $main-color-light);
|
||||
// font-size: 36rpx;
|
||||
// transition: .3s;
|
||||
// text-shadow: 6rpx 8rpx 30rpx rgba($color: $main-color, $alpha: .5);
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// bottom: 10rpx;
|
||||
// left: 0;
|
||||
// height: 8rpx;
|
||||
// width: 100%;
|
||||
// background-color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
253
pages/property/coupon/couponMore.vue
Normal file
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<view class="Coupon">
|
||||
<!-- 有优惠券列表 -->
|
||||
<view class="coupon-content">
|
||||
<couponTemplate v-for="(item,index) in lists" :key='index' :item="{...item}" />
|
||||
</view>
|
||||
|
||||
<!-- 没有优惠券列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-counpon' :txt="showTxt" />
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCouponsListById
|
||||
} from '@/apis/interfaces/coupon'
|
||||
import couponTemplate from '@/components/coupon-template/coupon-template-1'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists:[],
|
||||
id:'',
|
||||
page:1,
|
||||
has_more:true,
|
||||
showTxt: '没有任何优惠券哦~'
|
||||
};
|
||||
},
|
||||
components: {
|
||||
couponTemplate
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.id = this.$route.query.id
|
||||
this.getMyCoupon()
|
||||
},
|
||||
onShow() {
|
||||
if (wx.getStorageSync('refresh')) {
|
||||
this.lists = []
|
||||
this.getMyCoupon()
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1
|
||||
this.lists = []
|
||||
this.has_more = true
|
||||
this.getMyCoupon()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.has_more) {
|
||||
this.page = this.page + 1
|
||||
this.getMyCoupon()
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMyCoupon() {
|
||||
let id = this.id
|
||||
let data={
|
||||
page:this.page,
|
||||
pageSize:4
|
||||
}
|
||||
getCouponsListById(id,data).then(res => {
|
||||
console.log(res)
|
||||
this.lists = this.lists.concat(res.data)
|
||||
if (res.page.has_more) {
|
||||
this.has_more = true
|
||||
} else {
|
||||
this.has_more = false
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
wx.setStorageSync('refresh',false)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
// 选择顶部菜单
|
||||
// selectNav(id) {
|
||||
// console.log(typeof id)
|
||||
// this.showTxt = (id === 1 ? '没有领取到任何优惠券哦~' : id === 2 ? '没有使用过任何优惠券哦~' : '没有任何过期优惠券哦~')
|
||||
// if (id !== this.selectNavId) {
|
||||
// this.selectNavId = id
|
||||
// this.page = 1
|
||||
// this.lists = []
|
||||
// this.has_more = true
|
||||
// this.getMyCoupon()
|
||||
// }
|
||||
// },
|
||||
// 切换商品分类
|
||||
selectNav(id) {
|
||||
console.log(id)
|
||||
this.selectNavId = id
|
||||
this.getMyCoupon()
|
||||
// if (this.selectCategoryId !== id) {
|
||||
// this.goodsList = []
|
||||
// this.has_more = true
|
||||
// this.page = 1
|
||||
// this.getGoodsByCompanyidCaregoryid()
|
||||
// }
|
||||
},
|
||||
selectCategory(id) {
|
||||
console.log(id)
|
||||
this.selectCategoryId = id
|
||||
this.getMyCoupon()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Coupon {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.coupon-nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
padding: 30rpx 60rpx 0 60rpx;
|
||||
color: #cacaca;
|
||||
|
||||
.nav-item {
|
||||
padding: 20rpx 30rpx 30rpx 30rpx;
|
||||
border-bottom: solid 4rpx #fff;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nav-item-select {
|
||||
border-bottom: solid 6rpx $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-top {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
|
||||
.scroll-view_H {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.scroll-view-item_H {
|
||||
margin-right: 60rpx;
|
||||
padding: 20rpx 0 40rpx 0;
|
||||
// height: 100rpx;
|
||||
display: inline-block;
|
||||
min-width: 120rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: #fff;
|
||||
background-color: #fff;
|
||||
transition: .1s;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-view-item_H_selected {
|
||||
// border-bottom: solid $main-color 4rpx;
|
||||
color: $main-color;
|
||||
font-weight: bold;
|
||||
// font-size: 36rpx;
|
||||
// transition: .3s;
|
||||
text-shadow: 6rpx 8rpx 30rpx rgba($color: $main-color, $alpha: .5);
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// bottom: 10rpx;
|
||||
// left: 0;
|
||||
// height: 8rpx;
|
||||
// width: 100%;
|
||||
// background-color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H-1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
background-color: #fff;
|
||||
// position: sticky;
|
||||
// top: 100rpx;
|
||||
// z-index: 1000;
|
||||
|
||||
.scroll-view-item_H-1 {
|
||||
display: inline-block;
|
||||
min-width: 120rpx;
|
||||
font-size: 24rpx;
|
||||
border-bottom: #fff;
|
||||
background-color: #f7f7f7;
|
||||
margin-left: 20rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.scroll-view-item_H_selected-1 {
|
||||
// border-bottom: solid $main-color 4rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
background-image: linear-gradient(to left, $main-color, $main-color-light);
|
||||
// font-size: 36rpx;
|
||||
// transition: .3s;
|
||||
// text-shadow: 6rpx 8rpx 30rpx rgba($color: $main-color, $alpha: .5);
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
// content: '';
|
||||
// position: absolute;
|
||||
// bottom: 10rpx;
|
||||
// left: 0;
|
||||
// height: 8rpx;
|
||||
// width: 100%;
|
||||
// background-color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
370
pages/property/coupon/detail.vue
Normal file
@@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<view class="couponDetail" v-if="loaded">
|
||||
<!-- 优惠券信息 -->
|
||||
<view class="coupon">
|
||||
<view class="coupon-title">{{info.title}}</view>
|
||||
<view class="coupon-des" v-if="info.type.value === 2">{{info.price_text}}</view>
|
||||
<view class="coupon-date">有效期:{{info.time.interval}}</view>
|
||||
<view class="coupon-date">{{info.way}} {{info.whole}} </view>
|
||||
</view>
|
||||
|
||||
<!-- 可用商品 -->
|
||||
<view class="goods-title" v-if="info.goods.length>0">可用商品 <span
|
||||
style='font-size: 24rpx;color:gray;'>(多选一)</span></view>
|
||||
<view class="goods-item" v-if="info.goods.length>0" v-for="(item,index) in info.goods" :key='index'>
|
||||
<image :src="item.cover" mode="aspectFill" class="goods-img" @click="$router.push({name:'goodsDetails',query:{id:item.goods_id}})" />
|
||||
<view class="goods-right">
|
||||
<view class="goods-right-title ellipsis-2" @click="$router.push({name:'goodsDetails',query:{id:item.goods_id}})">{{item.name}}</view>
|
||||
<view class="goods-right-bottom">
|
||||
<span class='money'>¥{{item.price}}</span>
|
||||
<view class="used" v-if='info.use_way.value=== 1' @click="nowBuy(item)">立即购买</view>
|
||||
<!-- <view class="used" v-else @click="clickCode(coupon_grant_id,item.goods_sku_id)">查看兑换码</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 描述 -->
|
||||
<view class="describe" v-if="contentArr.length>0">
|
||||
<view class="goods-title">使用须知</view>
|
||||
<view class="describe-des" v-for="(item,index) in contentArr" :key='index'>
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="clickCodeBtn" v-if='info.use_way.value=== 2' @click="clickCode(coupon_grant_id)">立即兑换</view>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<view class="showCode " v-if="showCode">
|
||||
<view class="showCodeBg" @click="showCode = false"></view>
|
||||
<view :class="['showCodeContent', showCode?'showCodeContentSelect':'showCodeContentSelectNo']">
|
||||
<view class="showCodeTitle">商品兑换码</view>
|
||||
<image :src="code" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCouponsInfoById,
|
||||
getQrcodeByGrantId
|
||||
} from '@/apis/interfaces/coupon'
|
||||
import GoodTemplate from '@/components/goods-template/goods-template'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
coupon_grant_id: '',
|
||||
code: '',
|
||||
showCode: false,
|
||||
loaded:false,
|
||||
info: {},
|
||||
contentArr: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
GoodTemplate
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(this.$route)
|
||||
this.coupon_grant_id = this.$route.query.id
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取列表
|
||||
getList() {
|
||||
getCouponsInfoById(this.coupon_grant_id).then(res => {
|
||||
this.info = res
|
||||
this.contentArr = res.description.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').split('<br/>')
|
||||
this.loaded = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 点击立即购买去商品确认页面
|
||||
nowBuy(items) {
|
||||
console.log(items, 'items....')
|
||||
let data = {
|
||||
skuId: items.goods_sku_id,
|
||||
qty: 1
|
||||
}
|
||||
this.$router.push({
|
||||
name: 'Buy',
|
||||
params: data
|
||||
})
|
||||
console.log(data)
|
||||
},
|
||||
// 点击二维码特效
|
||||
clickCode(grantid) {
|
||||
this.code = ''
|
||||
if (grantid !== '') {
|
||||
let data = {
|
||||
coupon_grant_id: grantid
|
||||
}
|
||||
getQrcodeByGrantId(data).then(res => {
|
||||
console.log(res)
|
||||
this.code = res.code
|
||||
this.showCode = !this.showCode
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 代金券立即购买
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// page{
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// padding-bottom: 120rpx;
|
||||
// }
|
||||
.clickCodeBtn {
|
||||
background-color: $main-color;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
padding: 30rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 30rpx;
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.couponDetail {
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #f7f7f7;
|
||||
min-height: 100vh;
|
||||
padding-top: $margin;
|
||||
position: relative;
|
||||
padding-bottom: 120rpx;
|
||||
|
||||
// 优惠券
|
||||
.coupon {
|
||||
margin: 0 $margin * 2;
|
||||
background-color: #Fff;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: #333;
|
||||
padding: 30rpx 20rpx;
|
||||
box-shadow: 0 10rpx 20rpx 10rpx rgba($color: #000000, $alpha: .1);
|
||||
border-radius: 20rpx;
|
||||
|
||||
.coupon-title {
|
||||
width: 100%;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.coupon-des {
|
||||
color: $main-color;
|
||||
font-size: 32rpx;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
|
||||
.coupon-date {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 可用商品
|
||||
.goods-item {
|
||||
background-color: #fff;
|
||||
margin: $margin*1.5 $margin * 2;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: $padding;
|
||||
box-shadow: 0 10rpx 20rpx 10rpx rgba($color: #000000, $alpha: .1);
|
||||
|
||||
.goods-img {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods-right {
|
||||
margin-left: 30rpx;
|
||||
width: calc(100% - 200rpx);
|
||||
|
||||
.goods-right-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.goods-right-bottom {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.money {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: $main-color;
|
||||
}
|
||||
|
||||
.used {
|
||||
background-image: linear-gradient(to left, $main-color, $main-color-light);
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin: $margin*2;
|
||||
// text-shadow:10rpx 10rpx linear-gradient(to right, #f39e17, #f85b05);
|
||||
text-shadow: 2rpx 2rpx 10rpx $main-color;
|
||||
}
|
||||
|
||||
// 描述
|
||||
.describe {
|
||||
margin: $margin * 2 0;
|
||||
|
||||
.describe-des {
|
||||
color: #999;
|
||||
padding: 10rpx $margin * 2;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 动画效果
|
||||
.showCode {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
z-index: 199999999999999993;
|
||||
|
||||
.showCodeBg {
|
||||
background-color: rgba($color:#000, $alpha: 0.3);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 199999999999999994;
|
||||
}
|
||||
|
||||
.showCodeContentSelect {
|
||||
animation: sk-foldCubeAngle .6s linear both;
|
||||
}
|
||||
|
||||
.showCodeContentSelectNo {
|
||||
animation: sk-foldCubeAngleNo .6s linear both;
|
||||
}
|
||||
|
||||
.showCodeContent {
|
||||
width: 600rpx;
|
||||
height: 500rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
z-index: 199999999999999995;
|
||||
|
||||
image {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.showCodeTitle {
|
||||
font-weight: 600;
|
||||
padding-bottom: 40rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@keyframes sk-foldCubeAngle {
|
||||
0% {
|
||||
-webkit-transform: perspective(140px) rotateX(-180deg);
|
||||
transform: perspective(140px) rotateX(-180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: perspective(140px) rotateX(0deg);
|
||||
transform: perspective(140px) rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-foldCubeAngleNo {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes turn {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
-webkit-transform: rotate(90deg);
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: rotate(180deg);
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
75% {
|
||||
-webkit-transform: rotate(270deg);
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
885
pages/property/coupon/index.vue
Normal file
@@ -58,23 +58,23 @@
|
||||
</view>
|
||||
<!-- 我的权证 -->
|
||||
<view class="user-group">
|
||||
<view class="title">
|
||||
<view class="title" >
|
||||
<view class="title-text">我的权证</view>
|
||||
</view>
|
||||
<view class="group-flex group-flex-4">
|
||||
<view class="item">
|
||||
<view class="item" @click="$Router.push({name:'NumberWeight'})">
|
||||
<view class="item-num">0</view>
|
||||
<view class="item-title">权证持有</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="$Router.push({name:'33'})">
|
||||
<view class="item-num">0</view>
|
||||
<view class="item-title">权证转让</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="$Router.push({name:'334'})">
|
||||
<view class="item-num">0</view>
|
||||
<view class="item-title">已使用</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="$Router.push({name:'MallShipments'})">
|
||||
<view class="item-num">0</view>
|
||||
<view class="item-title">已提货</view>
|
||||
</view>
|
||||
@@ -91,7 +91,7 @@
|
||||
<image class="item-cover" src="@/static/icons/user_icon_02.png" mode="aspectFill" />
|
||||
<view class="item-title">关注企业</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="$Router.push({name:'CouponList'})">
|
||||
<image class="item-cover" src="@/static/icons/user_icon_03.png" mode="aspectFill" />
|
||||
<view class="item-title">我的优惠券</view>
|
||||
</view>
|
||||
|
||||
174
pages/property/order/logistics.vue
Normal file
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<view class="LogisticsIndex">
|
||||
<block v-if="list.length>0">
|
||||
<view class="logistics-top">
|
||||
<view>{{express.express_name}} <span class="copy" @click='copy(express.express_no)'>复制单号</span></view>
|
||||
<view><span>快递编号</span>:{{express.express_no}} </view>
|
||||
</view>
|
||||
<view class="Logistics-content">
|
||||
<view>物流追踪</view>
|
||||
<view class="list">
|
||||
<view class="list-item" v-for="(item,index) in list" :key='index'>
|
||||
<view :class="['dian',index === 0 ?'dian-active':'']"></view>
|
||||
<view :class="['content',index === 0?'content-active':'']">
|
||||
<view class=""><span style='padding-right: 10rpx;'>{{item.status}} - </span>{{item.context}}
|
||||
</view>
|
||||
<view class="date"> {{item.time}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="list.length === 0" name='no-addr' txt="暂无任务物流进度信息~" />
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
mallShipmentsLogistic
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
no: '', // 快递单号
|
||||
express:{},// 地址信息
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.no = this.$route.params.no
|
||||
this.getLogistic(this.no)
|
||||
},
|
||||
methods: {
|
||||
getLogistic(no) {
|
||||
mallShipmentsLogistic(no).then(res => {
|
||||
console.log(res)
|
||||
this.list = res.logistics
|
||||
this.express = res.express
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 复制
|
||||
copy(no) {
|
||||
uni.setClipboardData({
|
||||
data: no,
|
||||
success: res=>{
|
||||
console.log('success');
|
||||
console.log(res)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.LogisticsIndex {
|
||||
font-size: $title-size;
|
||||
color: #333;
|
||||
margin-top: 20rpx;
|
||||
|
||||
// 物流名称
|
||||
.logistics-top {
|
||||
background-color: #fff;
|
||||
padding: 30rpx 50rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
view:nth-child(2) {
|
||||
padding-top: $padding * 0.5;
|
||||
font-size: 0.9*$title-size;
|
||||
}
|
||||
|
||||
.copy {
|
||||
display: inline-block;
|
||||
padding: $padding *0.4 $padding;
|
||||
background-color: $main-color;
|
||||
margin-left: 30rpx;
|
||||
color: #fff;
|
||||
font-size: $title-size *0.8;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 物流进度
|
||||
.Logistics-content {
|
||||
background-color: #fff;
|
||||
padding: 30rpx 50rpx;
|
||||
margin: 50rpx 0;
|
||||
|
||||
.list {
|
||||
margin-top: $margin*2;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
border-left: solid 2rpx #cacaca;
|
||||
padding-bottom: $margin*1.6;
|
||||
|
||||
&:last-child {
|
||||
border-left: solid 2rpx #fff !important;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
color: $main-color !important;
|
||||
}
|
||||
|
||||
.dian {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #cacaca;
|
||||
border: solid 10rpx rgba($color:#cacaca, $alpha: 0.3);
|
||||
position: relative;
|
||||
left: -11rpx;
|
||||
}
|
||||
|
||||
.dian-active {
|
||||
background-color: $main-color;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
left: -16rpx;
|
||||
border: solid 10rpx rgba($color: $main-color, $alpha: 0.3);
|
||||
box-shadow: 0 0 20rpx 4rpx rgba($color: $main-color, $alpha: 0.5);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
margin-left: 60rpx;
|
||||
// padding: 10rpx 0;
|
||||
font-size: $title-size * 0.9;
|
||||
color: #666;
|
||||
position: relative;
|
||||
top: -10rpx;
|
||||
|
||||
.date {
|
||||
margin-top: $margin;
|
||||
}
|
||||
}
|
||||
|
||||
.content-active {
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
326
pages/property/order/mallRefund.vue
Normal file
@@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<view class="NumberWeight">
|
||||
<!-- 订单分类 -->
|
||||
<scroll-view class="nav" scroll-x="true" :scroll-into-view='selectCategoryId' scroll-with-animation="true">
|
||||
<view :class="['nav-item' ,selectNavId === item.id?'nav-item-selected':'']" v-for="(item,index) in navList"
|
||||
:key="index" @click="selectNav(item.id)">
|
||||
{{item.name}}
|
||||
{{item.id ==='apply' && count.apply >0 ? '('+count.apply + ')':''}}
|
||||
{{item.id ==='deliver' && count.deliver >0 ?'('+count.deliver + ')':''}}
|
||||
{{item.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
{{item.id ==='signed' && count.signed >0 ?'('+count.signed + ')':''}}
|
||||
{{item.id ==='process' && count.process >0 ?'('+count.process + ')':''}}
|
||||
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 有订单列表 -->
|
||||
<view class="" v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index">
|
||||
<MallRefundsTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view @click="goDetail(item.refund_id)" class="nowPay">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
MallRefundsTemplate
|
||||
} from '@/components/mall-refunds-template/mall-refunds-template'
|
||||
import { mallRefunds } from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
components: {
|
||||
MallRefundsTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page:1,
|
||||
total:0,
|
||||
navList: [{
|
||||
name: '待审核',
|
||||
id: 'apply'
|
||||
},{
|
||||
name: '待返货',
|
||||
id: 'deliver'
|
||||
},{
|
||||
name: '待签收',
|
||||
id: 'delivered'
|
||||
},{
|
||||
name: '已签收',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '待退数权',
|
||||
id: 'process'
|
||||
},
|
||||
{
|
||||
name: '完成退货',
|
||||
id: 'completed'
|
||||
}
|
||||
],
|
||||
selectNavId: 'apply',
|
||||
count:{}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
onShow(){
|
||||
console.log(uni.getStorageSync('refresh'),'getStorageSync')
|
||||
if(uni.getStorageSync('refresh')){
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.setStorageSync('refresh',false)
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.total>this.lists.length){
|
||||
this.page = this.page + 1
|
||||
this.getList()
|
||||
}else{
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset(){
|
||||
this.page =1
|
||||
this.total = 0
|
||||
this.lists = []
|
||||
this.getList()
|
||||
uni.setStorageSync('refresh',false)
|
||||
},
|
||||
// 选择订单
|
||||
selectNav(id) {
|
||||
if (this.selectNavId !== id) {
|
||||
this.selectNavId = id
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
// 获取订单列表
|
||||
getList(){
|
||||
let data = {
|
||||
pageSize:20,
|
||||
page:this.page,
|
||||
state:this.selectNavId
|
||||
}
|
||||
mallRefunds(data).then(res=>{
|
||||
console.log(res)
|
||||
this.count = res.count
|
||||
this.lists = this.lists.concat(res.lists.data)
|
||||
this.total = res.lists.page.total
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消提货单
|
||||
nowCancel(index,no){
|
||||
console.log(index,no)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
|
||||
success: (res) =>{
|
||||
if (res.confirm) {
|
||||
mallShipmentsCancel(no).then(res=>{
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title:res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
this.lists.splice(index,1)
|
||||
this.total = this.total - 1
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title:'放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 签收提货单
|
||||
nowSign(index,no){
|
||||
console.log(index,no)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认已经收到商品了呀',
|
||||
success: (res) =>{
|
||||
if (res.confirm) {
|
||||
console.log(no)
|
||||
mallShipmentsSign(no).then(res=>{
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title:res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
this.lists.splice(index,1)
|
||||
this.total = this.total - 1
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title:'放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
goDetail(no){
|
||||
this.$router.push({
|
||||
name: 'MallRefundsInfo',
|
||||
params:{
|
||||
no:no
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.NumberWeight {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
|
||||
// 订单nav
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
font-size: $title-size*0.95;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-top: solid 20rpx #f7f7f7;
|
||||
position: sticky;
|
||||
top: 0rpx;
|
||||
z-index: 1;
|
||||
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
border-bottom: solid 4rpx #fff;
|
||||
padding: 30rpx 10rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
border-bottom: solid 4rpx $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 订单列表
|
||||
.order-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
padding:30rpx 30rpx 20rpx 30rpx ;
|
||||
// border-top: solid 4rpx #cacaca;
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-top: solid 1rpx #EFF4F2;
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $main-color;
|
||||
color: #999;
|
||||
border:solid 1rpx #cacaca;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
720
pages/property/order/mallRefundsInfo.vue
Normal file
@@ -0,0 +1,720 @@
|
||||
<template>
|
||||
<view class="OrderInfo">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
{{info.state.text}}
|
||||
<span>{{info.state.remark}}</span>
|
||||
</view>
|
||||
<image src="/static/imgs/fire.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- 收货人 -->
|
||||
<view class="acceptInfo" v-if="type === '2'">
|
||||
<block>
|
||||
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
|
||||
<view class="address">
|
||||
<u-icon name="map" color="red"></u-icon>
|
||||
<span>{{address.full_address}}</span>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="goods-info1">
|
||||
<view class="top">
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="info.shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{info.shop.name}}</view>
|
||||
</view>
|
||||
<view class="flexrow">
|
||||
<view class="no ellipsis">退后单号: {{info.refund_no}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<image class="goods-img" :src="info.goods_sku.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{info.goods_sku.goods_name}}</view>
|
||||
<!-- <span>¥16.80</span> -->
|
||||
</view>
|
||||
<view class="sku">数权个数 <span>x {{info.qty}}</span> </view>
|
||||
</view>
|
||||
</view>
|
||||
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+info.goods_sku.goods_id'>
|
||||
<view class="total-btn">再次购买</view>
|
||||
</navigator>
|
||||
<view class="goods-type">创建退货时间 <span>{{info.created_at}}</span></view>
|
||||
<view class="goods-type">运费 <span>自行承担运费</span></view>
|
||||
<view class="goods-type">退货数量 <span>
|
||||
<u-number-box v-model="info.qty" :disabled="true"></u-number-box>
|
||||
</span></view>
|
||||
<view class="goods-type">退货方式<span>快递退回</span></view>
|
||||
<block v-if="info.can.user_deliver">
|
||||
<view class="goods-type-1">物流公司
|
||||
<u-input v-model="company" placeholder='请输入退货物流公司' />
|
||||
</view>
|
||||
<view class="goods-type-1">物流单号
|
||||
<u-input v-model="number" placeholder='请输入物流单号' />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 操作相关 -->
|
||||
<view class="actions">
|
||||
<view @click="showLogs = true" class="nowPay">查看退货日志</view>
|
||||
<view v-if="info.can.user_deliver" @click="nowRefunds(refund_id)" class="nowPay">确认退货</view>
|
||||
</view>
|
||||
<!-- 显示 -->
|
||||
<u-popup v-model="showLogs" mode="bottom" border-radius="14">
|
||||
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView" v-if="logs.length>0">
|
||||
<view class="coupon-title">退货操作进度 </view>
|
||||
<view class="list">
|
||||
<view class="list-item" v-for="(item,index) in logs" :key='index'>
|
||||
<view :class="['dian',index === 0 ?'dian-active':'']"></view>
|
||||
<view :class="['content',index === 0?'content-active':'']">
|
||||
<view class="title">{{item.state_text?item.state_text:'当前状态不明确,需后台返回'}}</view>
|
||||
<view class="des">退货原因:{{item.title || '无理由'}} ; 退货备注:{{item.remark || '无备注'}}</view>
|
||||
<view class="pictures">
|
||||
<image @click="priveImg(index,idx)" v-for="(it,idx) in item.pictures" :key='idx' :src="it" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="date"> {{item.created_at}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 没有优惠券列表 -->
|
||||
<no-list v-if="logs.length === 0" name='no-news' txt="没有任何退货进度信息哦~" />
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mallRefundsInfo,
|
||||
mallRefundsDeliver
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
name: 'OrderInfo',
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
qty: 1,
|
||||
refund_id: '', // 退货单no
|
||||
company: '',
|
||||
number: '',
|
||||
logs: [],
|
||||
showLogs: false // 默认不显示记录信息
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.refund_id = this.$route.params.no
|
||||
this.getInfo(this.refund_id)
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('refresh')) {
|
||||
this.getInfo(this.refund_id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取退货的基本信息
|
||||
getInfo(refund_id) {
|
||||
mallRefundsInfo(refund_id).then(res => {
|
||||
this.info = res
|
||||
this.logs = res.log
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
priveImg(index,idx){
|
||||
console.log(this.logs[index].pictures);
|
||||
uni.previewImage({
|
||||
current:idx,
|
||||
urls:this.logs[index].pictures
|
||||
})
|
||||
},
|
||||
// 确认退货
|
||||
nowRefunds(no) {
|
||||
let data = {
|
||||
refund: this.refund_id,
|
||||
company: this.company,
|
||||
number: this.number,
|
||||
}
|
||||
if (data.company === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对物流公司名称',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.number === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请核对物流单号',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确退货信息准确无误呀',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
mallRefundsDeliver(data).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
this.getInfo(data.refund)
|
||||
uni.setStorageSync('refresh', true)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title: '放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.OrderInfo {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.order-status {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
|
||||
color: #Fff;
|
||||
font-size: 36rpx;
|
||||
padding: 30rpx 50rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.acceptInfo {
|
||||
margin: 0 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
top: -30rpx;
|
||||
|
||||
.name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
|
||||
span {
|
||||
padding-left: 20rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
padding-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
span {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-info1 {
|
||||
padding: 20rpx 40rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.goods-type {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
.goods-type-1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
|
||||
u-input {
|
||||
flex: 1;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-type-address {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
u-icon {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #EFF4F2;
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 600rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 16rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
// width: 500rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 34rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 合计信息
|
||||
.total {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: $main-color;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.total-btn {
|
||||
border: solid 1rpx $main-color;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
background-color: #fff;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 50rpx 30rpx 50rpx;
|
||||
color: #fff;
|
||||
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $main-color;
|
||||
color: #999;
|
||||
border: solid 1rpx #cacaca;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.copy {
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.no-address {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 优惠券弹窗
|
||||
.scrollView {
|
||||
// padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
// 标题
|
||||
.coupon-title {
|
||||
padding: 40rpx;
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
// 优惠券样式
|
||||
.coupon-list-item {
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 20rpx 50rpx;
|
||||
|
||||
.coupon-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-top1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.94;
|
||||
width: 100%;
|
||||
margin-left: 0 !important;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.shop-info {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.list-top1-img {
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.des {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
font-size: $title-size*0.94;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
width: 600rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
.list-top-left {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
.shop-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 380rpx;
|
||||
font-size: $title-size*1;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.urate {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.des {
|
||||
// padding-top: $padding*0.8;
|
||||
font-size: $title-size * 0.8;
|
||||
color: #999;
|
||||
|
||||
span {
|
||||
color: #666;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-banner {
|
||||
width: 120rpx;
|
||||
margin-right: $margin*1.5;
|
||||
height: 120rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-top-right {
|
||||
border: solid 1rpx $main-color;
|
||||
color: $main-color;
|
||||
display: inline-block;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: $title-size *0.8;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
margin-top: $margin*2;
|
||||
margin-left: 20rpx;
|
||||
padding: 30rpx 50rpx;
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
border-left: solid 2rpx #cacaca;
|
||||
padding-bottom: $margin*1.6;
|
||||
|
||||
&:last-child {
|
||||
border-left: solid 2rpx #fff !important;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
color: $main-color !important;
|
||||
}
|
||||
|
||||
.dian {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #cacaca;
|
||||
border: solid 10rpx rgba($color:#cacaca, $alpha: 0.3);
|
||||
position: relative;
|
||||
left: -11rpx;
|
||||
}
|
||||
|
||||
.dian-active {
|
||||
background-color: $main-color;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
left: -16rpx;
|
||||
border: solid 10rpx rgba($color: $main-color, $alpha: 0.3);
|
||||
box-shadow: 0 0 20rpx 4rpx rgba($color: $main-color, $alpha: 0.5);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
margin-left: 60rpx;
|
||||
// padding: 10rpx 0;
|
||||
font-size: $title-size * 0.9;
|
||||
color: #666;
|
||||
position: relative;
|
||||
top: -10rpx;
|
||||
|
||||
.date {
|
||||
margin-top: $margin;
|
||||
}
|
||||
}
|
||||
|
||||
.content-active {
|
||||
color: $main-color;
|
||||
}
|
||||
|
||||
.pictures{
|
||||
width: 100%;
|
||||
image{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
margin: 8rpx;
|
||||
border-radius: 2rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
486
pages/property/order/mallShipments.vue
Normal file
@@ -0,0 +1,486 @@
|
||||
<template>
|
||||
<view class="NumberWeight">
|
||||
<!-- 订单分类 -->
|
||||
<view class="nav">
|
||||
<view :class="['nav-item' ,selectTypeId === item.id?'nav-item-selected':'']"
|
||||
v-for="(item,index) in typeList" :key="index" @click="selectType(item.id,index)">
|
||||
{{item.name}}
|
||||
{{item.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
|
||||
{{item.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
{{item.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
|
||||
{{item.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 快递点 自提单显示 -->
|
||||
<scroll-view class="nav1" v-if='selectTypeIndex === 0 || selectTypeIndex === 1' scroll-x="true" scroll-with-animation="true">
|
||||
<view :class="['nav-item' ,state === it.id?'nav-item-selected':'']" v-for="(it,idx) in typeList[selectTypeIndex].categrery"
|
||||
:key="idx" @click="selectNav(it.id)">
|
||||
{{it.name}}
|
||||
{{it.id ==='signed' && count.signed >0 ? '('+count.signed + ')':''}}
|
||||
{{it.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
{{it.id ==='init' && count.init >0 ?'('+count.init + ')':''}}
|
||||
{{it.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!--退货单 -->
|
||||
<scroll-view class="nav1" v-else scroll-x="true" scroll-with-animation="true">
|
||||
<view :class="['nav-item' ,state === it.id?'nav-item-selected':'']" v-for="(it,idx) in typeList[selectTypeIndex].categrery"
|
||||
:key="idx" @click="selectNav(it.id)">
|
||||
{{it.name}}
|
||||
{{it.id ==='apply' && count.apply >0 ? '('+count.apply + ')':''}}
|
||||
{{it.id ==='deliver' && count.deliver >0 ?'('+count.deliver + ')':''}}
|
||||
{{it.id ==='delivered' && count.delivered >0 ?'('+count.delivered + ')':''}}
|
||||
{{it.id ==='signed' && count.signed >0 ?'('+count.signed + ')':''}}
|
||||
{{it.id ==='process' && count.process >0 ?'('+count.process + ')':''}}
|
||||
{{it.id ==='completed' && count.completed >0 ?'('+count.completed + ')':''}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 有订单列表 -->
|
||||
<block v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index" v-if='selectTypeIndex === 0 || selectTypeIndex === 1'>
|
||||
<MallShipmentsTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view class="nowPay" @click="goDetail(item.shipment_no)">查看详情</view>
|
||||
<view v-if="item.can.cancel" @click="nowCancel(index,item.shipment_no)" class="nowPay">取消订单</view>
|
||||
<view v-if="item.can.sign" @click="nowSign(index,item.shipment_no)" class="nowPay">确认签收</view>
|
||||
<view v-if="item.can.refund" @click="nowRefund(item.shipment_no)" class="nowPay">申请退货</view>
|
||||
<view v-if="item.can.logistic" @click="nowLogistics(item.shipment_no)" class="nowPay">查看物流</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 有订单列表 -->
|
||||
<view class="" v-if="selectTypeIndex === 2">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index">
|
||||
<MallRefundsTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view @click="goDetail1(item.refund_id)" class="nowPay">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MallShipmentsTemplate from '@/components/mall-shipments-template/mall-shipments-template'
|
||||
import MallRefundsTemplate from '@/components/mall-refunds-template/mall-refunds-template'
|
||||
import {
|
||||
mallShipmentsPostShop,
|
||||
mallShipmentsSign,
|
||||
mallShipmentsCancel
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
components: {
|
||||
MallShipmentsTemplate,MallRefundsTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page: 1,
|
||||
total: 0,
|
||||
navList: [],
|
||||
count: {}, // 订单数量
|
||||
typeList: [{
|
||||
name: '快递单',
|
||||
id: 'post',
|
||||
categrery: [{
|
||||
name: '待发货',
|
||||
id: 'init'
|
||||
},
|
||||
{
|
||||
name: '已发货',
|
||||
id: 'delivered'
|
||||
},
|
||||
{
|
||||
name: '已签收',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '自提单',
|
||||
id: 'take',
|
||||
categrery: [{
|
||||
name: '已提货',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '退货单',
|
||||
id: 'refund',
|
||||
categrery: [{
|
||||
name: '待审核',
|
||||
id: 'apply'
|
||||
}, {
|
||||
name: '待返货',
|
||||
id: 'deliver'
|
||||
}, {
|
||||
name: '待签收',
|
||||
id: 'delivered'
|
||||
}, {
|
||||
name: '已签收',
|
||||
id: 'signed'
|
||||
},
|
||||
{
|
||||
name: '待退数权',
|
||||
id: 'process'
|
||||
},
|
||||
{
|
||||
name: '完成退货',
|
||||
id: 'completed'
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
selectTypeId: 'post',
|
||||
state: 'init',
|
||||
selectTypeIndex: 0
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
console.log(uni.getStorageSync('refresh'), 'getStorageSync')
|
||||
if (uni.getStorageSync('refresh')) {
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.setStorageSync('refresh', false)
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.total > this.lists.length) {
|
||||
this.page = this.page + 1
|
||||
this.getList()
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.page = 1
|
||||
this.total = 0
|
||||
this.lists = []
|
||||
this.getList()
|
||||
uni.setStorageSync('refresh', false)
|
||||
},
|
||||
// 选择状态
|
||||
selectNav(id) {
|
||||
if (this.state !== id) {
|
||||
this.state = id
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
// 快递单post 提货单 take 退货单refund
|
||||
selectType(id,index) {
|
||||
console.log('id:' + id)
|
||||
if (this.selectTypeId !== id) {
|
||||
this.state = this.typeList[index].categrery[0].id
|
||||
this.selectTypeId = id
|
||||
this.selectTypeIndex = index
|
||||
this.reset()
|
||||
}
|
||||
},
|
||||
// 获取订单列表
|
||||
getList() {
|
||||
let data = {
|
||||
pageSize: 4,
|
||||
page: this.page,
|
||||
state: this.state
|
||||
}
|
||||
let apiUrl = ''
|
||||
if (this.selectTypeId === 'post') {
|
||||
apiUrl = 'mall/shipments/post'
|
||||
} else if(this.selectTypeId === 'take') {
|
||||
apiUrl = 'mall/shipments/shop'
|
||||
} else if(this.selectTypeId === 'refund') {
|
||||
apiUrl = 'mall/refunds'
|
||||
}
|
||||
mallShipmentsPostShop(apiUrl, data).then(res => {
|
||||
console.log(res.count)
|
||||
this.count = res.count
|
||||
this.lists = this.lists.concat(res.lists.data)
|
||||
this.total = res.lists.page.total
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消提货单
|
||||
nowCancel(index, no) {
|
||||
console.log(index, no)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
mallShipmentsCancel(no).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
this.lists.splice(index, 1)
|
||||
this.total = this.total - 1
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title: '放弃了~',
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// 签收提货单
|
||||
nowSign(index, no) {
|
||||
console.log(index, no)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认已经收到商品了呀',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
console.log(no)
|
||||
mallShipmentsSign(no).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
this.lists.splice(index, 1)
|
||||
this.total = this.total - 1
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title: '放弃了~',
|
||||
type: 'error',
|
||||
icon: false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 申请退货
|
||||
nowRefund(no) {
|
||||
this.$router.push({
|
||||
name: 'MallShipmentsRefund',
|
||||
params: {
|
||||
no: no
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看物流
|
||||
nowLogistics(no) {
|
||||
this.$router.push({
|
||||
name: 'Orderlogistics',
|
||||
params: {
|
||||
no: no
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看详情
|
||||
goDetail(no) {
|
||||
this.$router.push({
|
||||
name: 'MallShipmentsInfo',
|
||||
params: {
|
||||
no: no
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看退货单详情
|
||||
// 查看详情
|
||||
goDetail1(no){
|
||||
this.$router.push({
|
||||
name: 'MallRefundsInfo',
|
||||
params:{
|
||||
no:no
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.NumberWeight {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
|
||||
// 订单nav
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.95;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-top: solid 20rpx #f7f7f7;
|
||||
position: sticky;
|
||||
top: 0rpx;
|
||||
z-index: 10000;
|
||||
|
||||
.nav-item {
|
||||
border-bottom: solid 4rpx #fff;
|
||||
padding: 30rpx 10rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
border-bottom: solid 4rpx $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
.nav1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
font-size: $title-size*0.95;
|
||||
padding:30rpx 30rpx 20rpx 30rpx;
|
||||
color: #666;
|
||||
position: sticky;
|
||||
top: 120rpx;
|
||||
z-index: 10000;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 订单列表
|
||||
.order-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||
// border-top: solid 4rpx #cacaca;
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-top: solid 1rpx #EFF4F2;
|
||||
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $main-color;
|
||||
color: #999;
|
||||
border: solid 1rpx #cacaca;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
667
pages/property/order/mallShipmentsInfo.vue
Normal file
@@ -0,0 +1,667 @@
|
||||
<template>
|
||||
<view class="OrderInfo">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
{{info.state_text}}
|
||||
<span>您的快递正在坐着火箭朝您飞来</span>
|
||||
</view>
|
||||
<image src="/static/imgs/fire.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<!-- 收货人 -->
|
||||
<view class="acceptInfo" v-if="type === '1'" >
|
||||
<block >
|
||||
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
|
||||
<view class="address">
|
||||
<u-icon name="map" color="red"></u-icon>
|
||||
<span>{{address.full_address}}</span>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="goods-info1">
|
||||
<view class="top" >
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="info.shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{info.shop.name}}</view>
|
||||
</view>
|
||||
<view class="flexrow">
|
||||
<view class="no ellipsis">发货单号: {{info.shipment_no}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<image class="goods-img" :src="info.goods_sku.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{info.goods_sku.goods_name}}</view>
|
||||
<!-- <span>¥16.80</span> -->
|
||||
</view>
|
||||
<view class="sku">数权个数 <span>x {{info.qty}}</span> </view>
|
||||
</view>
|
||||
</view>
|
||||
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+info.goods_sku.goods_id'>
|
||||
<view class="total-btn">再次购买</view>
|
||||
</navigator>
|
||||
<view class="goods-type">创建提货单时间 <span>{{info.created_at}}</span></view>
|
||||
<view class="goods-type" v-if="type === '1'">运费 <span>免邮</span></view>
|
||||
<view class="goods-type">提货数量 <span><u-number-box v-model="info.qty" :disabled="true"></u-number-box></span></view>
|
||||
<view class="goods-type">提货方式
|
||||
<u-radio-group v-model="type">
|
||||
<u-radio
|
||||
v-for="(item, index) in list" :key="index"
|
||||
:name="item.id"
|
||||
:disabled="type !== item.id"
|
||||
>
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<!-- <view class="goods-type" v-if="type === '2'">提货码
|
||||
<span @click='takeCode'>查看提货码</span>
|
||||
</view> -->
|
||||
<view class="goods-type-1" v-if="type === '2'">
|
||||
提货门店
|
||||
<view class="goods-type-address">
|
||||
<view class="list-top1">
|
||||
<image :src="info.store.cover.showpath" @click="map(info.store)" mode="aspectFill" class="list-top1-img" />
|
||||
<view class="shop-info shop-info1">
|
||||
<view class="title ellipsis">{{info.store.name}}</view>
|
||||
<view class="des" style="padding-top: 16rpx;">营业时间:{{info.store.start_time}}</view>
|
||||
<view class="des" style="padding-top: 4rpx;" @click="call(info.store.mobile)">联系电话:{{info.store.mobile}}</view>
|
||||
<view class="des" style="padding-top: 4rpx;" @click="map(info.store)">门店地址:{{info.store.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<view class="actions">
|
||||
<view v-if="info.can.cancel" @click="nowCancel(shipment_no)" class="nowPay">取消订单</view>
|
||||
<view v-if="info.can.sign" @click="nowSign(shipment_no)" class="nowPay">确认签收</view>
|
||||
<view v-if="info.can.refund" @click="nowRefund(shipment_no)" class="nowPay">申请退货</view>
|
||||
<view v-if="info.can.logistic" @click="nowLogistics(shipment_no)" class="nowPay">查看物流</view>
|
||||
</view>
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mallShipmentsInfo,mallShipmentsCancel,mallShipmentsSign } from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
name: 'OrderInfo',
|
||||
data() {
|
||||
return {
|
||||
info:{},
|
||||
list: [
|
||||
{ name: '快递', disabled: true , id:'1'},
|
||||
{ name: '自提', disabled: false , id:'2'}
|
||||
],
|
||||
address:{},
|
||||
type: '1', //提货类型:2 自提 1 邮寄
|
||||
showStoreList: false, // 默认false不显示优惠券弹窗列表
|
||||
store_id: '', // 默认没有选择任何一个优惠券
|
||||
store_Name:'',// 门店名称
|
||||
qty :1,
|
||||
shipment_no:'', // 提货单no
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shipment_no = this.$route.params.no
|
||||
this.getInfo(this.$route.params.no)
|
||||
},
|
||||
onShow() {
|
||||
if(uni.getStorageSync('refresh')){
|
||||
this.getInfo(this.shipment_no)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo(shipment_no){
|
||||
mallShipmentsInfo(shipment_no).then(res=>{
|
||||
this.info = res
|
||||
this.address = res.express
|
||||
this.type = res.type+''
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消提货单
|
||||
nowCancel(no){
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认要取消订单啊,取消后请去我的数权中查看',
|
||||
success: (res) =>{
|
||||
if (res.confirm) {
|
||||
mallShipmentsCancel(no).then(res=>{
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title:res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
this.getInfo(no)
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title:'放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 签收提货单
|
||||
nowSign(no){
|
||||
console.log(no)
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '是否确认已经收到商品了呀',
|
||||
success: (res) =>{
|
||||
if (res.confirm) {
|
||||
console.log(no)
|
||||
mallShipmentsSign(no).then(res=>{
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title:res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
this.getInfo(no)
|
||||
uni.setStorageSync('refresh',true)
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title:'放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查看提货二维码 弹窗
|
||||
takeCode(){
|
||||
console.log(this.info.code)
|
||||
let url = this.info.code,
|
||||
urls = [this.info.code]
|
||||
uni.previewImage({
|
||||
current:url,
|
||||
urls:urls
|
||||
})
|
||||
},
|
||||
// 申请退货
|
||||
nowRefund(no){
|
||||
this.$router.push({
|
||||
name: 'MallShipmentsRefund',
|
||||
params:{
|
||||
no:no
|
||||
}
|
||||
})
|
||||
},
|
||||
call(e){
|
||||
uni.makePhoneCall({
|
||||
phoneNumber:e
|
||||
})
|
||||
},
|
||||
map(info){
|
||||
console.log(info.latitude,info.longitude)
|
||||
uni.openLocation({
|
||||
latitude: Number(info.latitude),
|
||||
longitude: Number(info.longitude),
|
||||
success: function () {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.OrderInfo {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.order-status {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
|
||||
color: #Fff;
|
||||
font-size: 36rpx;
|
||||
padding: 30rpx 50rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.acceptInfo {
|
||||
margin: 0 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
top: -30rpx;
|
||||
|
||||
.name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
|
||||
span {
|
||||
padding-left: 20rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
padding-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
span {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-info1 {
|
||||
padding: 20rpx 40rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.goods-type {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
.goods-type-1{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
.goods-type-address{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
u-icon{
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #EFF4F2;
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 600rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 16rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
// width: 500rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 34rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 合计信息
|
||||
.total {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: $main-color;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.total-btn {
|
||||
border: solid 1rpx $main-color;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
background-color: #fff;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx 50rpx 30rpx 50rpx;
|
||||
color: #fff;
|
||||
.nowPay {
|
||||
padding: 4rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
// background-color: $main-color;
|
||||
color: #999;
|
||||
border:solid 1rpx #cacaca;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.flexrow{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
.copy{
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
.no-address{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
// 优惠券弹窗
|
||||
.scrollView {
|
||||
// padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
// 标题
|
||||
.coupon-title {
|
||||
padding: 40rpx;
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
// 优惠券样式
|
||||
.coupon-list-item {
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.coupon-list-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba($color: #000, $alpha: 0);
|
||||
z-index: 10001;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-top1{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.94;
|
||||
width: 100%;
|
||||
margin-left: 0 !important;
|
||||
margin-top: 30rpx;
|
||||
.shop-info{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.list-top1-img{
|
||||
width:170rpx;
|
||||
height: 170rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.des{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
.list-top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
font-size: $title-size*0.94;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
width: 600rpx;
|
||||
margin-left: 30rpx;
|
||||
.list-top-left {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
.shop-info{
|
||||
flex: 1;
|
||||
}
|
||||
.title {
|
||||
width: 380rpx;
|
||||
font-size: $title-size*1;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.urate {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.des {
|
||||
// padding-top: $padding*0.8;
|
||||
font-size: $title-size * 0.8;
|
||||
color: #999;
|
||||
|
||||
span {
|
||||
color: #666;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-banner {
|
||||
width: 120rpx;
|
||||
margin-right: $margin*1.5;
|
||||
height: 120rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-top-right {
|
||||
border: solid 1rpx $main-color;
|
||||
color: $main-color;
|
||||
display: inline-block;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: $title-size *0.8;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
338
pages/property/order/mallShipmentsRefund.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<view class="MallShipmentRefund">
|
||||
<view class="mes-des">
|
||||
因您信誉良好 尊享:退货包运费·7天无理由退货
|
||||
</view>
|
||||
|
||||
<!-- 申请类型 -->
|
||||
<view class="list">
|
||||
<view class="list-left">申请类型</view>
|
||||
<view class="list-right">申请退货</view>
|
||||
</view>
|
||||
|
||||
<!-- 退货原因 -->
|
||||
<view class="list">
|
||||
<view class="list-left">退货原因</view>
|
||||
<u-select v-model="show" :list="list" mode='single-column' @confirm="confirm"></u-select>
|
||||
<view class="list-right" @click="show = true">{{title?title:'请选择退货'}}
|
||||
<u-icon name="arrow-right" color="#cacaca" size="26" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退货图片 -->
|
||||
<view class="list">
|
||||
<view class="list-left">退货图片</view>
|
||||
<view class="list-right-img">
|
||||
<view class="upImg" v-for="(item,index) in pictures.showpath">
|
||||
<image @click="priviewImg(index)" mode="aspectFill" :src="item" />
|
||||
<u-icon name="close" @click='closeImg(index)' class='closeImg' />
|
||||
</view>
|
||||
<view class="addImg" @click="updImgs">
|
||||
<u-icon name="plus" label='上传图片' label-pos='bottom' size='50' margin-bottom='10' color='#606266'
|
||||
label-size='26' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 申请原因 -->
|
||||
<view class="list1">
|
||||
<view class="list-left">备注原因</view>
|
||||
<u-input class="list-right" v-model="remark" maxlength='300' placeholder='请输入您的退货原因' type="textarea"
|
||||
height='230' :border="true" :clearable='false' />
|
||||
<view class="">
|
||||
{{remark.length+'/'+300}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单 -->
|
||||
<view class="actions">
|
||||
<view class="nowPay" @click="sure">确认退货</view>
|
||||
</view>
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mallShipmentsRefundInfo,
|
||||
mallShipmentsRefund
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
import {
|
||||
uploads
|
||||
} from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
name: 'MallShipmentRefund',
|
||||
data() {
|
||||
return {
|
||||
remark: '',
|
||||
shipment_no: '', // 提货单no
|
||||
title: '',
|
||||
list: [],
|
||||
show: false,
|
||||
pictures: {
|
||||
path: [],
|
||||
showpath: []
|
||||
}, // 退货单图片
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shipment_no = this.$route.params.no
|
||||
this.getInfo(this.shipment_no)
|
||||
},
|
||||
methods: {
|
||||
// 预览上传图片
|
||||
priviewImg(index) {
|
||||
console.log(index, this.pictures.showpath)
|
||||
uni.previewImage({
|
||||
current: index,
|
||||
urls: this.pictures.showpath
|
||||
})
|
||||
},
|
||||
// 上传图片
|
||||
updImgs(type) {
|
||||
uni.chooseImage({
|
||||
success: res => {
|
||||
console.log(res)
|
||||
let path = res.tempFiles.map((val, index) => {
|
||||
return {
|
||||
name: 'uploads' + index,
|
||||
uri: val.path
|
||||
}
|
||||
})
|
||||
uploads(path).then(pathRes => {
|
||||
// console.log(pathRes)
|
||||
this.pictures = {
|
||||
path: [...this.pictures.path, ...pathRes.path],
|
||||
showpath: [...this.pictures.showpath, ...pathRes.url]
|
||||
}
|
||||
console.log(this.pictures)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除图片
|
||||
closeImg(index) {
|
||||
console.log(index)
|
||||
this.pictures.path.splice(index, 1)
|
||||
this.pictures.showpath.splice(index, 1)
|
||||
|
||||
console.log(this.pictures);
|
||||
},
|
||||
// 获取退货的基本信息
|
||||
getInfo(shipment_no) {
|
||||
mallShipmentsRefundInfo(shipment_no).then(res => {
|
||||
let list = res.title
|
||||
let lists = []
|
||||
list.map(item => {
|
||||
let items = {
|
||||
label: item
|
||||
}
|
||||
lists.push(items)
|
||||
})
|
||||
console.log(lists)
|
||||
this.list = lists
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.title = e[0].label
|
||||
},
|
||||
sure() {
|
||||
let data = {
|
||||
title: this.title,
|
||||
shipment_no: this.shipment_no,
|
||||
remark: this.remark,
|
||||
pictures: JSON.stringify(this.pictures.path)
|
||||
}
|
||||
if (data.title === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择退货原因',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.remark === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请填写备注信息',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '哎呦,提醒你',
|
||||
content: '您是否确认申请退货',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
mallShipmentsRefund(data).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
uni.setStorageSync('refresh', true)
|
||||
setTimeout(res => {
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
this.$refs.uToast.show({
|
||||
title: '放弃了~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
//
|
||||
.mes-des {
|
||||
background-color: rgba($color: #ff0000, $alpha: .1);
|
||||
color: #ff0000;
|
||||
text-shadow: 0 0 6rpx rgba($color: #000000, $alpha:.1);
|
||||
padding: 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// 确认退货
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
padding: 30rpx;
|
||||
color: #fff;
|
||||
|
||||
.nowPay {
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
width: 600rpx;
|
||||
font-size: 32rpx;
|
||||
background-color: $main-color;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.list1 {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 40rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
|
||||
u-input {
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.list-right {
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 40rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
|
||||
.list-right {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
flex: 1;
|
||||
margin-left: 50rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.list-right-img {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
flex: 1;
|
||||
margin-left: 50rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
.upImg {
|
||||
width: 159rpx;
|
||||
height: 159rpx;
|
||||
margin: 4rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.closeImg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.addImg {
|
||||
width: 159rpx;
|
||||
height: 159rpx;
|
||||
background-color: #f7f7f7;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
186
pages/property/order/numberWeight.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view class="NumberWeight">
|
||||
<!-- 有订单列表 -->
|
||||
<view class="" v-if="lists.length > 0">
|
||||
<!-- 订单列表 -->
|
||||
<view class="order-list" v-for="(item,index) in lists" :key="index">
|
||||
<NumberWeightTemplate :item="item" />
|
||||
<view class="actions">
|
||||
<view @click="nowTake(item.symbol)" class="nowPay">去提货</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 没有订单列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-order' txt="暂无数据~" />
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NumberWeightTemplate from '@/components/number-weight-template/number-weight-template'
|
||||
import { mallWarrants } from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
components: {
|
||||
NumberWeightTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lists: [],
|
||||
page:1,
|
||||
total:0
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
onShow(){
|
||||
if(uni.getStorageSync('refresh')){
|
||||
this.page =1
|
||||
this.total = 0
|
||||
this.lists = []
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.setStorageSync('refresh',false)
|
||||
},
|
||||
onReachBottom() {
|
||||
if(this.total>this.lists.length){
|
||||
this.page = this.page + 1
|
||||
this.getList()
|
||||
}else{
|
||||
this.$refs.uToast.show({
|
||||
title: '吼吼吼~我是有底的~',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
let data = {
|
||||
perPage:10,
|
||||
page:this.page
|
||||
}
|
||||
mallWarrants(data).then(res=>{
|
||||
this.lists = this.lists.concat(res.data)
|
||||
this.total = res.total
|
||||
}).catch(err=>{
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 立即提货
|
||||
nowTake(symbol){
|
||||
uni.navigateTo({
|
||||
url:'./numberWeightInfo?symbol='+symbol
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.NumberWeight {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
|
||||
// 订单nav
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: $title-size*0.95;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-top: solid 20rpx #f7f7f7;
|
||||
|
||||
.nav-item {
|
||||
border-bottom: solid 4rpx #fff;
|
||||
padding: 30rpx 10rpx;
|
||||
}
|
||||
|
||||
.nav-item-selected {
|
||||
border-bottom: solid 4rpx $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
}
|
||||
|
||||
// 订单列表
|
||||
.order-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
min-height: 300rpx;
|
||||
margin: 30rpx 20rpx 0 20rpx;
|
||||
padding:30rpx 30rpx 20rpx 30rpx ;
|
||||
// border-top: solid 4rpx #cacaca;
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
border-top: solid 1rpx #EFF4F2;
|
||||
.nowPay {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: $main-color;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
788
pages/property/order/numberWeightInfo.vue
Normal file
@@ -0,0 +1,788 @@
|
||||
<template>
|
||||
<view class="OrderInfo">
|
||||
<!-- 订单状态 -->
|
||||
<view class="order-status">
|
||||
<view class="info">
|
||||
待提货
|
||||
<span>确认提货后快递会坐着火箭朝您飞来</span>
|
||||
</view>
|
||||
<image src="/static/imgs/fire.png" mode="widthFix" />
|
||||
</view>
|
||||
<!-- 收货人 -->
|
||||
<view class="acceptInfo" v-if="type === '1'">
|
||||
<navigator v-if='!!address.name' url="/pages/property/address/list?type=1" hover-class="none">
|
||||
<view class="name">{{address.name}} <span>{{address.mobile}}</span> </view>
|
||||
<view class="address">
|
||||
<u-icon name="map" color="red"></u-icon>
|
||||
<span>{{address.full_address}}</span>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator v-else class="no-address selectNew" url="/pages/property/address/list?type=1" hover-class="none">
|
||||
<u-icon name="map-fill" color="#208bff" size="40" label='选择收货地址' />
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="goods-info1">
|
||||
<view class="top">
|
||||
<view class="company">
|
||||
<view class="company-logo">
|
||||
<image :src="shop.cover" mode="aspectFill" />
|
||||
<view class="name ellipsis">{{shop.name}}</view>
|
||||
</view>
|
||||
<view class="flexrow">
|
||||
<view class="no ellipsis">区块链地址: {{account.addr}}</view> <span class="copy"
|
||||
@click='copy(account.addr)'>复制</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<image class="goods-img" :src="goods.cover" mode="aspectFill" />
|
||||
<view class="goods">
|
||||
<view class="name">
|
||||
<view class="name1 ellipsis-2">{{goods.goods_name}}</view>
|
||||
<!-- <span>¥16.80</span> -->
|
||||
</view>
|
||||
<view class="sku">可提个数 <span>x {{account.balance}}</span> </view>
|
||||
</view>
|
||||
</view>
|
||||
<navigator class="total" hover-class="none" :url='"/pages/goods/detail?id="+goods.goods_id'>
|
||||
<view class="total-btn">再次购买</view>
|
||||
</navigator>
|
||||
<view class="goods-type" v-if="type === '1'">运费 <span>免邮</span></view>
|
||||
<view class="goods-type">提货数量 <span>
|
||||
<u-number-box v-model="qty" :min='1' :max='account.balance'></u-number-box>
|
||||
</span></view>
|
||||
<view class="goods-type">提货方式
|
||||
<u-radio-group v-model="type" @change="radioGroupChange">
|
||||
<u-radio v-for="(item, index) in list" :key="index" :name="item.id" :disabled="type !== item.id">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<!-- 不显示了就 -->
|
||||
<view class="goods-type" v-if="type === '100'">
|
||||
提货门店
|
||||
<view class="goods-type-address" @click="showStoreList = true">
|
||||
{{store_Name!==''?store_Name:'选择门店'}}
|
||||
<u-icon name="arrow-right" color="#999" size="20" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<view class="actions">
|
||||
<view class="nowPay" @click="nowTake">{{type === '2'?'生成提货二维码':'确认提货'}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 优惠券弹窗 -->
|
||||
<u-popup v-model="showStoreList" mode="bottom" border-radius="14">
|
||||
<scroll-view scroll-y="true" style="height: 1000rpx;" class="scrollView">
|
||||
<view class="coupon-title">可提货门店</view>
|
||||
<view class="coupon-list-item" v-for="(item,index) in stores" :key="index" v-if="stores.length>0">
|
||||
<u-icon v-if="store_id!== item.store_id" name="checkmark-circle" color="#cacaca" size="50" />
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#2979ff" size="50" />
|
||||
<!-- 遮挡层用户控制点击事件 -->
|
||||
<view class="list-top">
|
||||
<view class="list-top-left">
|
||||
<image :src="item.cover" mode="aspectFill" class="list-banner"></image>
|
||||
<view class="shop-info">
|
||||
<view class="title ellipsis">{{item.name}}</view>
|
||||
<view class="des" style="padding-top: 12rpx;">营业时间:{{item.opening_time}}</view>
|
||||
<view class="des" style="padding-top: 4rpx;">门店地址:{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon-list-item" @click="selectStore(item)"></view>
|
||||
</view>
|
||||
<!-- 没有优惠券列表 -->
|
||||
<no-list v-if="stores.length === 0" name='no-shop' txt="没有任何门店哦~" />
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 二维码展示动画效果 -->
|
||||
<view class="showCode " v-if="showCode">
|
||||
<view class="showCodeBg" @click="showCode = false"></view>
|
||||
<view :class="['showCodeContent', showCode?'showCodeContentSelect':'showCodeContentSelectNo']">
|
||||
<view class="showCodeTitle">提货二维码</view>
|
||||
<image :src="showCodeImg" mode="widthFix"></image>
|
||||
<view class="showCodeDes">此码请小心保管,丢失或被用不退不换</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mallWarrantsList,
|
||||
mallWarrantsSure,
|
||||
mallWarrantsQrcode
|
||||
} from '@/apis/interfaces/numberWeight'
|
||||
export default {
|
||||
name: 'OrderInfo',
|
||||
data() {
|
||||
return {
|
||||
symbol: '',
|
||||
account: {},
|
||||
address: {},
|
||||
addresses: [],
|
||||
goods: {},
|
||||
shop: {},
|
||||
stores: [],
|
||||
list: [{
|
||||
name: '快递',
|
||||
disabled: false,
|
||||
id: '1'
|
||||
},
|
||||
{
|
||||
name: '自提',
|
||||
disabled: false,
|
||||
id: '2'
|
||||
}
|
||||
],
|
||||
type: '', //提货类型:2 自提 1 邮寄
|
||||
showStoreList: false, // 默认false不显示优惠券弹窗列表
|
||||
store_id: '', // 默认没有选择任何一个优惠券
|
||||
store_Name: '', // 门店名称
|
||||
qty: 1,
|
||||
showCode:false,
|
||||
showCodeImg:''
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.symbol = e.symbol
|
||||
this.getInfo(e.symbol)
|
||||
// this.getInfo('G22S20')
|
||||
},
|
||||
methods: {
|
||||
getInfo(symbol) {
|
||||
mallWarrantsList(symbol).then(res => {
|
||||
this.account = res.account
|
||||
this.address = res.address
|
||||
this.addresses = res.addresses
|
||||
this.goods = res.goods
|
||||
this.stores = res.stores
|
||||
this.shop = res.shop
|
||||
this.stores = res.stores
|
||||
this.qty = res.account.balance
|
||||
this.type = res.logistic_type + ''
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.navigateBack({})
|
||||
}, 2000)
|
||||
})
|
||||
},
|
||||
// 选中任一radio时,由radio-group触发
|
||||
radioGroupChange(e) {
|
||||
this.type = e
|
||||
if (e === '2') {
|
||||
this.store_id = ''
|
||||
this.store_Name = ''
|
||||
}
|
||||
},
|
||||
// 选择可用优惠券
|
||||
selectStore(item) {
|
||||
this.store_id = item.store_id
|
||||
this.store_Name = item.name
|
||||
this.showStoreList = false
|
||||
},
|
||||
// 确认提货
|
||||
nowTake() {
|
||||
let data = {
|
||||
symbol: this.symbol,
|
||||
type: this.type,
|
||||
store_id: this.store_id || '',
|
||||
qty: this.qty,
|
||||
address_id: this.address.address_id || '',
|
||||
}
|
||||
if (data.type === '1') {
|
||||
if (data.address_id === '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '请添加收货地址',
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
return;
|
||||
}
|
||||
data.store_id = ''
|
||||
}
|
||||
console.log(data)
|
||||
// 快递单继续沿用之前的信息
|
||||
if (data.type === '1') {
|
||||
mallWarrantsSure(data).then(res => {
|
||||
console.log(res)
|
||||
this.$refs.uToast.show({
|
||||
title: res,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000,
|
||||
})
|
||||
uni.setStorageSync('refresh', true)
|
||||
setTimeout(res => {
|
||||
uni.navigateBack({})
|
||||
}, 3000)
|
||||
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
// 提货或者服务单生成二维码
|
||||
else {
|
||||
mallWarrantsQrcode(data).then(res => {
|
||||
console.log(res)
|
||||
this.showCodeImg = res.code
|
||||
// uni.setStorageSync('refresh', true)
|
||||
this.showCode = true
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
title: err.message,
|
||||
type: 'error',icon:false,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 复制
|
||||
copy(e) {
|
||||
uni.setClipboardData({
|
||||
data: e,
|
||||
success: () => {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.OrderInfo {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background-color: #F7F7F7;
|
||||
padding-bottom: 80rpx;
|
||||
|
||||
.order-status {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
background-image: linear-gradient(to bottom, $main-color, $main-color-light);
|
||||
color: #Fff;
|
||||
font-size: 36rpx;
|
||||
padding: 30rpx 50rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
padding-top: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 200rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.acceptInfo {
|
||||
margin: 0 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 14rpx 4rpx rgba($color: $main-color, $alpha: 0.2);
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
top: -30rpx;
|
||||
|
||||
.name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
|
||||
span {
|
||||
padding-left: 20rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.address {
|
||||
padding-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
span {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-info1 {
|
||||
padding: 20rpx 40rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.goods-type {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
.goods-type-address {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
u-icon {
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 顶部信息
|
||||
.top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #EFF4F2;
|
||||
|
||||
.company-logo {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 600rpx;
|
||||
font-size: 30rpx;
|
||||
color: #484848;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.no {
|
||||
margin-top: 10rpx;
|
||||
font-size: $title-size*0.8;
|
||||
color: #999;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: #999;
|
||||
font-size: $title-size;
|
||||
}
|
||||
}
|
||||
|
||||
// 商品信息
|
||||
.goods-info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 40rpx;
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.goods {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
font-size: 30rpx;
|
||||
// font-weight: bold;
|
||||
|
||||
.name1 {
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 34rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.sku {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 合计信息
|
||||
.total {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
font-size: 26rpx;
|
||||
color: $main-color;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.total-btn {
|
||||
border: solid 1rpx $main-color;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 操作信息
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
padding: 30rpx;
|
||||
color: #fff;
|
||||
|
||||
.nowPay {
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
width: 600rpx;
|
||||
font-size: 32rpx;
|
||||
background-color: $main-color;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cancelOrder {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #DD524D;
|
||||
}
|
||||
|
||||
.logistics {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.sign {
|
||||
background-color: #DD524D;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.evaluate {
|
||||
background-color: $main-color;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.copy {
|
||||
color: $main-color;
|
||||
font-size: $title-size*0.8;
|
||||
font-weight: 400;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.no-address {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 优惠券弹窗
|
||||
.scrollView {
|
||||
// padding: 40rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
// 标题
|
||||
.coupon-title {
|
||||
padding: 40rpx;
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
}
|
||||
|
||||
// 优惠券样式
|
||||
.coupon-list-item {
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.coupon-list-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba($color: #000, $alpha: 0);
|
||||
z-index: 10001;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
font-size: $title-size*0.94;
|
||||
border-bottom: solid 1rpx #f7f7f7;
|
||||
width: 600rpx;
|
||||
margin-left: 30rpx;
|
||||
|
||||
.list-top-left {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
|
||||
.shop-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 380rpx;
|
||||
font-size: $title-size*1;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.urate {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.des {
|
||||
// padding-top: $padding*0.8;
|
||||
font-size: $title-size * 0.8;
|
||||
color: #999;
|
||||
|
||||
span {
|
||||
color: #666;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-banner {
|
||||
width: 120rpx;
|
||||
margin-right: $margin*1.5;
|
||||
height: 120rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-top-right {
|
||||
border: solid 1rpx $main-color;
|
||||
color: $main-color;
|
||||
display: inline-block;
|
||||
padding: 8rpx 16rpx;
|
||||
font-size: $title-size *0.8;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 二维码展示
|
||||
// 动画效果
|
||||
.showCode {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.showCodeBg {
|
||||
background-color: rgba($color:#000, $alpha: 0.3);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.showCodeContentSelect {
|
||||
animation: sk-foldCubeAngle .6s linear both;
|
||||
}
|
||||
|
||||
.showCodeContentSelectNo {
|
||||
animation: sk-foldCubeAngleNo .6s linear both;
|
||||
}
|
||||
|
||||
.showCodeContent {
|
||||
width: 600rpx;
|
||||
minheight: 500rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: relative;
|
||||
z-index: 199;
|
||||
|
||||
image {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.showCodeTitle {
|
||||
font-weight: 600;
|
||||
padding-bottom: 20rpx;
|
||||
font-size: 36rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.showCodeDes{
|
||||
padding: 20rpx 0 20rpx 0;
|
||||
color: gray;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-foldCubeAngle {
|
||||
0% {
|
||||
-webkit-transform: perspective(140px) rotateX(-180deg);
|
||||
transform: perspective(140px) rotateX(-180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: perspective(140px) rotateX(0deg);
|
||||
transform: perspective(140px) rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-foldCubeAngleNo {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes turn {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
25% {
|
||||
-webkit-transform: rotate(90deg);
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: rotate(180deg);
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
75% {
|
||||
-webkit-transform: rotate(270deg);
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -10,6 +10,8 @@ $text-color: #333;
|
||||
$text-gray: #555;
|
||||
$text-gray-m: #999;
|
||||
$text-price: #e93340;
|
||||
$main-color: #e93340;
|
||||
$main-color-light: #e93340;
|
||||
|
||||
// 边框颜色
|
||||
$border-color: #ddd;
|
||||
@@ -71,6 +73,45 @@ $padding: 30rpx;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ellipsis-2 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.ellipsis-3 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
.ellipsis-4 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 4;
|
||||
}
|
||||
|
||||
.ellipsis-5 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 5;
|
||||
}
|
||||
|
||||
|
||||
// 修改nvtab
|
||||
$mainColor: white;
|
||||
|
||||
|
||||
BIN
static/images/coupon-bg-1.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
static/images/coupon-bg-2.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
static/images/coupon-bg.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
static/images/coupon-fu.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
static/images/coupon-img-2.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
static/images/coupon-img-3.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
static/images/coupon-img.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
static/images/coupon-quan.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
static/images/coupon-ti.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
static/images/coupons-banner-bg.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
static/images/has_get.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/images/has_un_used.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
static/images/has_used.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
static/imgs/fire.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
@@ -1,37 +0,0 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const crypto = require('crypto')
|
||||
|
||||
exports.main = async (event) => {
|
||||
const secret = 'Yuzhankeji2021.'
|
||||
const hmac = crypto.createHmac('sha256', secret);
|
||||
|
||||
let params = event.queryStringParameters
|
||||
const sign = params.sign
|
||||
delete params.sign
|
||||
|
||||
const signStr = Object.keys(params).sort().map(key => {
|
||||
return `${key}=${params[key]}`
|
||||
}).join('&')
|
||||
|
||||
hmac.update(signStr);
|
||||
|
||||
if (sign !== hmac.digest('hex')) {
|
||||
throw new Error('非法访问')
|
||||
}
|
||||
|
||||
const {
|
||||
access_token,
|
||||
openid
|
||||
} = params
|
||||
|
||||
return await uniCloud.getPhoneNumber({
|
||||
appid: '__UNI__CD19AAD',
|
||||
provider: 'univerify',
|
||||
apiKey: '16fa20236696596869759d3a81541901',
|
||||
apiSecret: 'fca97287360c2e8f8259d8877a601887',
|
||||
access_token: access_token,
|
||||
openid: openid,
|
||||
})
|
||||
};
|
||||
10053
unpackage/dist/dev/app-plus/app-service.js
vendored
8873
unpackage/dist/dev/app-plus/app-view.js
vendored
BIN
unpackage/dist/dev/app-plus/static/images/coupon-bg-1.png
vendored
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-bg-2.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-bg.png
vendored
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-fu.png
vendored
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-img-2.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-img-3.png
vendored
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-img.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-quan.png
vendored
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupon-ti.png
vendored
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/coupons-banner-bg.png
vendored
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/has_get.png
vendored
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/has_un_used.png
vendored
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
unpackage/dist/dev/app-plus/static/images/has_used.png
vendored
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
unpackage/dist/dev/app-plus/static/imgs/fire.png
vendored
Normal file
|
After Width: | Height: | Size: 2.2 KiB |