[商城整个模块,及个人中心相应的模块调整]

This commit is contained in:
2021-10-27 14:18:46 +08:00
parent e6181694d2
commit 2c1f11afd7
77 changed files with 14646 additions and 46 deletions

1054
pages/equity/index.vue Normal file

File diff suppressed because it is too large Load Diff

324
pages/equity/search.vue Normal file
View File

@@ -0,0 +1,324 @@
<template>
<view>
<view class="top">
<view class="search">
<input class="search-input" type="text" focus @input="onInput" :placeholder="nameVal" />
<view class="search-btn" @click="searchClick">搜索</view>
</view>
<view class="tabs">
<view class="tabs-item" @click="onTabs">
{{searchType == 0 ? '价格' : '信用值'}}
<image class="icon" mode="widthFix"
:src="require(marketType == 'asc' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')" />
</view>
<view class="tabs-item" v-if="searchType == 0" @click="pageUrl">全部分类 <image class="tabs-item-arrow"
src="@/static/icons/search_row.png" mode=""></image>
</view>
<view class="tabs-item" v-if="searchType == 1" @click="companyOpne">{{companyName}}
<image class="tabs-item-arrow" src="@/static/icons/search_row.png" mode=""></image>
</view>
</view>
</view>
<view class="lists">
<!-- 优选商品 -->
<goods-list :list="searchArr" priceType="CNY" v-if="searchType == 0" @on-goods="onGoods" />
<!-- 商家 -->
<industry-list :list="searchArr" v-if="searchType == 1" @on-industry="onOpenWechat" />
</view>
<!-- 分页 -->
<uni-load-more :status="pageStatus" :iconSize="16" v-if="searchArr.length > 0" />
<!-- 企业分类弹出 -->
<view class="companyBack" :class="companyShow ? 'active' : ''"></view>
<view class="companyPopup" :class="companyShow ? 'active' : ''">
<view class="nowrap companyPopup-label" :class="{'show': item.industry_id == companyId}"
v-for="(item, index) in categoryArr" :key="index" @click="companyList(item.industry_id, index)">
{{item.title}}
</view>
</view>
</view>
</template>
<script>
import {
searchUrl,
companyCategory,
randgoodsUrl
} from '@/apis/interfaces/goods'
export default {
data() {
return {
nameVal: '',
searchArr: [],
searchType: '0', // 分类 0位商品 1为企业
marketType: 'asc', // 排序
categoryArr: [], // 分类数组--企业
companyId: '', // 分类数组--企业id
companyName: '选择行业',
companyShow: false,
// 分页
pageStatus: '',
page: 1
}
},
onLoad() {
this.searchType = this.$Route.query.type
// 商品分类默认关键字 type=0为商品列表; type=1为企业列表
let wechaUrl = '' // 定义接口来源名称
if (this.searchType == '0') wechaUrl = 'mall/randgoods' //商品关键字
if (this.searchType == '1') wechaUrl = 'companies/rand' //商品关键字
randgoodsUrl(wechaUrl, {
type: 1
}).then(res => {
this.nameVal = res.name
})
// 企业分类数据
if (this.searchType == '1') {
companyCategory().then(res => {
this.categoryArr = res
})
}
},
methods: {
// 商品详情
onGoods(e) {
this.$Router.push({
name: 'goodsDetails',
params: {
id: e.goods_id
}
})
},
// 打开微信小程序
onOpenWechat(e) {
plus.share.getServices(res => {
let sweixin = null;
for (let val of res) {
if (val.id === 'weixin') {
sweixin = val
}
}
/** 以此为例子 显示跳转引导页
* 'index_4'
* index 跳小程序企业首页
* 4 企业id
**/
if (sweixin != null) {
sweixin.launchMiniProgram({
id: e.original_id,
path: 'pages/login/guide?scene=index_' + e.company_id,
})
} else {
uni.showToast({
title: '当前环境不支持打开微信小程序',
icon: 'none'
})
}
})
},
// 列表数据
getList() {
// type=0为商品列表; type=1为企业列表
let wechaUrl = '' // 定义接口来源名称
if (this.searchType == '0') wechaUrl = 'mall/goods' // 商品列表
if (this.searchType == '1') wechaUrl = 'companies/lists' //企业列表
searchUrl(wechaUrl, {
page: this.goodsPage,
order_by: this.marketType,
industry_id: this.companyId,
name: this.nameVal
}).then(res => {
if (res.page.current === 1) {
this.searchArr = []
}
this.searchArr = this.searchArr.concat(res.data)
this.goodsPage = res.page.current
this.pageStatus = res.page.has_more ? 'more' : 'noMore'
})
},
// 输入关键词
onInput(val) {
this.nameVal = val.detail.value
},
// 搜索
searchClick() {
// 获取列表
this.getList();
},
// 筛选产品
onTabs(e) {
this.marketType = this.marketType == 'asc' ? 'desc' : 'asc'
this.getList()
},
// 商品分类跳转
pageUrl() {
this.$Router.push({
name: 'goodsClassify'
})
},
// 查看企业行业
companyOpne() {
this.companyShow = !this.companyShow
},
// 筛选企业列表
companyList(id, index) {
this.companyId = id
this.companyName = this.categoryArr[index].title
this.companyShow = false
// 获取全局列表
this.getList();
}
},
// 下拉加载
onReachBottom() {
if (this.pageStatus == 'more') {
this.pageStatus = 'loading'
this.goodsPage += 1
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.top {
position: fixed;
top: 0;
//#ifdef H5
top: 100rpx;
//#endif
left: 0;
z-index: 9;
width: 100%;
height: 180rpx;
.search {
background: white;
height: 100rpx;
width: 100%;
padding: 20rpx $padding 0;
box-sizing: border-box;
display: flex;
.search-input {
padding: 0 $padding;
box-sizing: border-box;
height: 60rpx;
background-color: #f7f7f7;
font-size: $title-size-m;
border-radius: 80rpx;
flex: 1;
margin-right: $margin;
}
.search-btn {
line-height: 60rpx;
color: #e93340;
}
}
.tabs {
background: white;
display: flex;
justify-content: space-around;
height: 80rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
line-height: 80rpx;
text-align: center;
.tabs-item {
font-size: $title-size-m;
color: $text-gray;
.icon {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
margin-left: $margin / 3;
margin-bottom: 4rpx;
}
&.show {
color: $text-price;
}
.tabs-item-arrow {
width: 24rpx;
height: 24rpx;
margin-left: 10rpx;
}
}
}
}
// 列表
.lists {
padding: 180rpx 0 $padding;
}
// 企业弹出
.companyBack,
.companyPopup {
position: fixed;
top: 200rpx;
left: 0;
width: 100%;
z-index: 99;
}
.companyBack {
height: calc(100% - 200rpx);
background-color: rgba(0, 0, 0, .2);
display: none;
&.active {
display: block;
}
}
.companyPopup {
height: 45%;
overflow: hidden;
overflow-y: scroll;
border-top: 1rpx solid #f1f1f1;
background-color: #FFFFFF;
padding: $padding - 10 $padding;
display: none;
box-sizing: border-box;
.companyPopup-label {
width: calc(25% - 20rpx);
font-size: $title-size-sm - 2;
display: inline-block;
height: 60rpx;
line-height: 58rpx;
border: 1rpx solid #F8F8F8;
background-color: #FFFFFF;
margin: 10rpx;
text-align: center;
&.show {
color: #e93340;
border-color: #efd3d3;
background-color: #fef9f9;
}
}
&.active {
display: block;
}
}
</style>

211
pages/goods/attestation.vue Normal file
View File

@@ -0,0 +1,211 @@
<template>
<view class="GoodsAuthentication">
<view class="authenticationTop">区块链溯源码{{info.token}}</view>
<!-- 商品认证 商品和服务 -->
<view class="authenticationItem">
<view class="authenticationItemTitle">商品认证</view>
<view class="authenticationItemcontent" v-if="info.goods">
<view class="authenticationItemcontentItem">
<view class="title">{{info.goods.type ===1?'商品名称':'项目名称'}}: </view>
<view class="content">{{info.goods.name || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
<view class="title">生产批次</view>
<view class="content">{{info.goods.batch || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===2">
<view class="title">项目分类</view>
<view class="content">{{info.goods.category || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
<view class="title">规格</view>
<view class="content">{{info.goods.skus[0].unit || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">数量</view>
<view class="content">{{info.goods.skus[0].stock || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">售价</view>
<view class="content">{{info.goods.skus[0].price || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
<view class="title">生产日期</view>
<view class="content">{{info.goods.producted_at || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">{{info.goods.type ===1?'保质期':'有效期'}}</view>
<view class="content">{{info.goods.expiried_at || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
<view class="title">生产厂家</view>
<view class="content">{{info.goods.product_name || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
<view class="title">生产地</view>
<view class="content">{{info.goods.product_address || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">供应商</view>
<view class="content">{{info.goods.skus[0].price || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">经营许可证</view>
<view class="content">{{info.goods.lisence || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">实物照片</view>
<image class="img" v-if="info.goods.cover" :src="info.goods.cover"
@click="priveImg(info.goods.cover)" mode="aspectFill" />
<view class="content" v-else>暂无数据</view>
</view>
</view>
</view>
<!-- 企业认证 商品和服务通用 -->
<view class="authenticationItem">
<view class="authenticationItemTitle">企业认证</view>
<view class="authenticationItemcontent" v-if="info.certification">
<view class="authenticationItemcontentItem">
<view class="title">企业名称</view>
<view class="content">{{info.certification.name || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">企业地址</view>
<view class="content">{{info.certification.address || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">统一信用代码</view>
<view class="content">{{info.certification.certification.code || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">行业</view>
<view class="content">{{info.certification.industry.title || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">经营范围</view>
<view class="content">{{info.certification.range || '暂无数据'}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">联系电话</view>
<u-icon name="phone-fill" v-if='info.certification.contack'
@click="call(info.certification.contact)" color="#2979ff" label-color="#2979ff" label-size="26"
:label='info.certification.contact' />
<view class="content" v-else> 暂无数据 </view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">营业执照</view>
<image class="img" v-if='info.certification.certification.license'
:src="info.certification.certification.license"
@click="priveImg(info.certification.certification.license)" mode="aspectFill" />
<view class="content" v-else>暂无数据</view>
</view>
</view>
</view>
<!-- 弹窗提示喽 -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
managesAttestation
} from '@/apis/interfaces/goods'
export default {
data() {
return {
info: ''
}
},
created() {
managesAttestation(this.$Route.query.id).then(res => {
this.info = res
})
},
methods: {
priveImg(img) {
uni.previewImage({
current: img, // 当前显示图片的http链接
urls: [img] // 需要预览的图片http链接列表
})
},
call(phone) {
uni.makePhoneCall({
phoneNumber: phone,
})
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #F7F7F7;
}
.GoodsAuthentication {
padding: 30rpx;
.authenticationTop {
width: 100%;
padding: 20rpx 50rpx;
background-color: $main-color;
font-size: 26rpx;
color: #fff;
border-radius: 60rpx;
word-break: break-all;
text-align: center;
}
// 商品认证
.authenticationItem {
width: 100%;
min-height: 300rpx;
margin-top: 20rpx;
.authenticationItemTitle {
font-size: 30rpx;
color: #333333;
font-weight: 600;
padding: 30rpx 20rpx;
}
.authenticationItemcontent {
width: 100%;
min-height: 500rpx;
background-color: #fff;
border-radius: 20rpx;
border: solid rgba(200, 38, 0, .05) 6rpx;
box-shadow: 2rpx 2rpx 20rpx 0rpx rgba(200, 38, 0, .051);
padding: 10rpx 20rpx;
.authenticationItemcontentItem {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
padding: 20rpx 0;
font-size: 24rpx;
.title {
width: 180rpx;
}
.content {
text-overflow: ellipsis;
width: calc(100% - 180rpx);
}
.img {
width: 340rpx;
height: 200rpx;
}
}
}
}
}
</style>

115
pages/goods/chain.vue Normal file
View File

@@ -0,0 +1,115 @@
<template>
<view class="GoodsChain">
<image src="https://e-chain.cnskl.com/storage/imageresource/chain-bg.png" class='chainBg' />
<view class="chain-content">
<view class="chain-center">
<image src="/static/icons/e-logo.png" mode="aspectFill" class="logo" />
<view class="name">易品新境区块链溯源证书</view>
<view class="no">区块链溯源证书{{info.token}}</view>
<view class="content">
<view class="con-item">兹证明</view>
<view class="con-item" v-if="info.company">
{{info.company.name}}产品符合溯源规范认证内容如下特授权其产品在易品新境区块链溯源商城出售
</view>
<view class="con-item">交易哈希: {{info.hash}}</view>
<view class="con-item">区块链高度: {{info.height}}</view>
</view>
<view class="date" v-if="info.applied_at">授权时间: {{info.applied_at}}</view>
<view class="date">有效期至: {{info.ended_at}}</view>
<view class="companyInfo">易品新境区块链有限公司</view>
</view>
</view>
<!-- 弹窗提示喽 -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import { managesChain } from '@/apis/interfaces/goods'
export default {
data() {
return {
info: ''
}
},
created() {
managesChain(this.$Route.query.id).then(res=>{
this.info = res
})
},
methods: {}
}
</script>
<style lang="scss" scoped>
page {
background-color: #F7F7F7;
}
.GoodsChain {
background-color:fff;
width: 100%;
position: relative;
z-index: 1;
.chainBg{
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
}
.chain-content{
width: 100%;
min-height: 100%;
z-index: 2;
padding: 18vh 10vw 15vh 10vw ;
box-sizing: border-box;
position: relative;
z-index: 3;
.chain-center{
width: 100%;
min-height: 100%;
.logo{
width: 160rpx;
height: 160rpx;
border-radius: 50%;
position: relative;
margin-left: -80rpx;
left: 50%;
margin-bottom: 20rpx;
border: solid rgba($color: #fff, $alpha: .3) 10rpx;
}
.name{
font-size: 40rpx;
font-weight: bold;
text-align: center;
}
.no{
font-size: 26rpx;
font-weight: bold;
text-align: center;
margin-top: 10rpx;
}
.content{
margin-top: 60rpx;
font-size: 28rpx;
padding: 0 20rpx;
.con-item{
margin-bottom: 30rpx;
word-break: break-all;
}
}
.date{
text-align: right;
margin-bottom: 10rpx;
padding-right: 20rpx;
}
.companyInfo{
text-align: right;
margin-bottom: 40rpx;
padding-right: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,666 @@
<template>
<view class="ConfirmOrder">
<view class="goods-info1">
<view class="top">
<view class="company">
<image :src="shop.cover" mode="aspectFill" />
<view class="name">{{shop.name}}</view>
</view>
</view>
<view class="goods-info">
<image class="goods-img" :src="info.cover" mode="aspectFill" />
<view class="goods">
<view class="name">
<view class="name1 ellipsis-2">{{info.title}}</view> <span>{{info.price}}</span>
</view>
<!-- <view class="sku">均码规格/<span>x {{info.qty}}</span> </view> -->
<view class="sku">
<span>数量</span>
<span>
<u-number-box v-model="params.qty" :min='1' :max='1000' @change='numberBoxChange' />
</span>
</view>
</view>
</view>
<!-- <view class="goods-type">支付方式<span>在线支付</span></view> -->
<view class="goods-type" @click="showCouponList = true">优惠券
<span>{{coupon_grant_id!==''?'已优惠 - ¥'+coupon_price:'选择优惠券'}}
<u-icon name="arrow-right" color="#666" size="24" />
</span>
</view>
<!-- <view class="goods-type" style="border-top: solid 20rpx #f7f7f7;">创建时间<span>2021-11-20 13:00:15</span></view> -->
<view class="goods-type">商品总价 <span>{{amount}}</span></view>
<view class="goods-type" v-if="coupon_price>0">优惠<span> - {{coupon_price}}</span></view>
<!-- <view class="goods-type">运费 <span>免邮</span></view> -->
<view class="goods-type">
<u-input class="order-content" type="textarea" v-model="remark" :clearable='false' :border="true"
:auto-height="true" placeholder="请填写订单备注" />
</view>
<view class="pay-select">请选择支付方式</view>
<view class="pay-select-item" @click="selectPay('2')">
<view class="pay-left">
<u-icon class="wx-icon" name="weixin-fill" color="#fff" size="40"></u-icon>
<view class="pay-wx-title">
微信支付
<span>推荐微信用户使用</span>
</view>
</view>
<u-icon v-if="selectTypeId!== '2'" name="checkmark-circle" color="#f7f7f7" size="50"></u-icon>
<u-icon v-else name="checkmark-circle-fill" color="#8b64fd" size="50"></u-icon>
</view>
<!-- <view class="pay-select-item" @click="selectPay('1')">
<view class="pay-left">
<u-icon class="wx-icon" name="integral-fill" color="#fff" size="40"></u-icon>
<view class="pay-wx-title">
E币交易
<span>可用Eb总额{{account.getEBBalance}}</span>
</view>
</view>
<u-icon v-if="selectTypeId!== '1'" name="checkmark-circle" color="#f7f7f7" size="50" />
<u-icon v-else name="checkmark-circle-fill" color="#8b64fd" size="50" />
</view> -->
</view>
<!-- 订单 -->
<view class="actions">
<view class="title">
实付金额<span class="money">{{total}}</span>
</view>
<view @click="order" class="nowPay">提交订单</view>
</view>
<!-- 优惠券弹窗 -->
<u-popup v-model="showCouponList" 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 list" :key="index" v-if="list.length>0">
<u-icon v-if="coupon_grant_id!== item.coupon_grant_id" name="checkmark-circle" color="#cacaca"
size="50">
</u-icon>
<u-icon v-else name="checkmark-circle-fill" color="#8b64fd" size="50"></u-icon>
<couponTemplate style="flex: 1;" :item="{...item}" :showUse='false' />
<!-- 遮挡层用户控制点击事件 -->
<view class="coupon-list-item" @click="selectCoupon(item)"></view>
</view>
<!-- 没有优惠券列表 -->
<no-list v-if="list.length === 0" name='no-counpon' txt="没有任何可用券哦" />
</scroll-view>
</u-popup>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import couponTemplate from "@/components/coupon-template/coupon-template-2"
import {
mallBuyGoods
} from '@/apis/interfaces/goods'
import {
wxPay,
ebPay
} from '@/apis/interfaces/order'
export default {
name: 'OrderInfo',
components: {
couponTemplate
},
data() {
return {
// box: {
// min: 1,
// max: 100
// },
amount: 0,
account: {},
total: 0,
shop: {}, // 店铺信息
info: {}, // 商品详情
showCouponList: false, // 默认false不显示优惠券弹窗列表
coupon_grant_id: '', // 默认没有选择任何一个优惠券
list: [], // 优惠券列表
params: {}, // 上个页面携带过来的参数
remark: '', // 备注
order_no: '', // 下单成功的id
selectTypeId: '2', // 微信支付2 E币支付1
coupon_price: '' // 代驾券显示金额,提货券显示什么呢
};
},
onLoad(e) {
// 获取确认订单页面参数
this.params = e
this.params.qty = Number(e.qty)
this.mallBuyGoods(e, 'get') // 确认订单商品信息get
},
methods: {
// 确认商品详情页get下单页面post
mallBuyGoods(params, method) {
params.coupon_grant_id = this.coupon_grant_id
mallBuyGoods(params, method).then(res => {
if (method === 'get') {
this.amount = res.amount
this.account = res.account
this.total = res.total
this.list = res.coupons
this.shop = res.detail[0].shop
this.info = res.detail[0].items[0]
this.coupon_price = res.coupon_price
} else {
this.order_no = res.order_no
// this.$refs.uToast.show({
// title: '下单成功',
// duration: 1888,
// type: 'primary',
// })
this.nowPay()
}
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 提交订单
order() {
let params = this.params
params.coupon_grant_id = this.coupon_grant_id
params.remark = this.remark
params.channel = 'mini'
this.mallBuyGoods(params, 'post')
},
// 触发支付
nowPay() {
this.canPay = false
let apiUrl = ''
let data = {}
if (this.selectTypeId === '2') {
apiUrl = wxPay
data = {
order_no: this.order_no,
type: 'app'
}
} else {
apiUrl = ebPay
data = {
order_no: this.order_no
}
}
apiUrl(data).then(res => {
if (this.selectTypeId === '2') {
console.log(typeof res)
if (typeof res === 'string') {
let payInfo = JSON.parse(res)
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
// uni.requestPayment({
// provider: "wxpay",
// orderInfo: JSON.stringify(payInfo),
// success: res => {
// this.$refs.uToast.show({
// title: '支付成功',
// type: 'primary',
// duration: 3000
// })
// setTimeout(() => {
// this.canPay = true
// uni.reLaunch({
// url: '/pages/goods/payStatus?success=true'
// })
// }, 3000);
// },
// fail: (err) => {
// this.canPay = true
// this.$refs.uToast.show({
// title: '支付失败',
// type: 'primary',
// duration: 3000
// })
// setTimeout(() => {
// this.canPay = true
// uni.reLaunch({
// url: '/pages/goods/payStatus?success=false'
// })
// }, 3000);
// }
// })
this.$refs.uToast.show({
title: '支付失败',
type: 'primary',
duration: 3000
})
uni.showModal({
title: '温馨提醒',
content: '微信支付当前暂未开通,无法支付。',
success(res) {
this.canPay = true
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/goods/payStatus?success=false'
})
}, 3000);
}
})
// app 支付未完。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
} else {
this.$refs.uToast.show({
title: '创建订单成功',
type: 'primary',
duration: 3000
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
}, 3000);
}
} else {
console.log(res)
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
url: '/pages/goods/payStatus?success=true'
})
}, 3000);
}
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
setTimeout(res => {
this.canPay = true
}, 2000)
})
},
// 选择可用优惠券
selectCoupon(item) {
if (this.coupon_grant_id === item.coupon_grant_id) {
this.coupon_grant_id = ''
// this.coupon_price = ''
} else {
this.coupon_grant_id = item.coupon_grant_id
// this.coupon_price = item.price
}
this.mallBuyGoods(this.params, 'get')
this.showCouponList = false
},
// 增加库存时候触发事件
numberBoxChange(e) {
this.params.qty = e.value
this.mallBuyGoods(this.params, 'get')
},
// 选择支付方式
selectPay(id) {
if (id === '1') {
if (this.info.is_change) {
this.selectTypeId = id
} else {
this.$refs.uToast.show({
title: '当前商品不支持EB支付'
})
}
} else if (id === '2') {
this.selectTypeId = id
}
},
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.pay-select {
padding: 20rpx 30rpx;
border-top: 20rpx #f7f7f7 solid;
}
.pay-select-item {
background-color: #fff;
padding: 30rpx;
border-bottom: solid 1rpx #f7f7f7;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.pay-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.pay-wx-title {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
box-sizing: border-box;
margin-left: 30rpx;
font-size: 28rpx;
span {
font-size: 24rpx;
color: #cacaca;
margin-top: 10rpx;
}
}
}
.wx-icon {
background-color: #8b64fd;
border-radius: 10rpx;
padding: 10rpx;
}
}
.ConfirmOrder {
width: 100%;
min-height: 100vh;
box-sizing: border-box;
background-color: #F7F7F7;
padding-bottom: 80rpx;
.acceptInfo {
margin: 0 30rpx;
// background-color: #fff;
box-shadow: 0 0 14rpx 4rpx rgba($color: $mian-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: 20rpx 40rpx;
font-size: 28rpx;
span {
margin-left: 10rpx;
}
}
}
.goods-info1 {
background-color: #fff;
border-top: solid 20rpx #f7f7f7;
.goods-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 30rpx 40rpx;
color: #666;
border-bottom: solid 1rpx #f7f7f7;
}
.goods-type span {
color: #000;
}
.order-content {
width: 100%;
}
// 顶部信息
.top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 20rpx 40rpx;
border-bottom: solid 1rpx #f7f7f7;
.company {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 20rpx;
}
}
.name {
font-size: 30rpx;
color: #484848;
}
.no {
margin-top: 20rpx;
font-size: $title-size*0.9;
color: #999;
}
.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-bottom: 20rpx;
padding: 30rpx 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: 340rpx;
}
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: 28rpx;
color: #353535;
flex: 1;
text-align: right;
margin-top: 20rpx;
padding-bottom: 30rpx;
}
.total-btn {
// border: solid 1rpx #f7f7f7;
padding: 10rpx 30rpx;
border-radius: 10rpx;
color: red;
}
}
// 操作信息
.actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
flex-wrap: wrap;
flex: 1;
font-size: 30rpx;
color: #666;
width: 100%;
background-color: #Fff;
position: fixed;
bottom: 0;
padding: 20rpx 0;
span {
color: $mian-color;
margin-right: 30rpx;
font-weight: 600;
font-size: 32rpx;
}
.nowPay {
padding: 20rpx 50rpx;
text-align: center;
box-sizing: border-box;
background-color: $mian-color;
color: #fff;
}
}
// 优惠券弹窗
.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;
}
}
}
// 选择收货地址
.add-addr {
width: 100%;
background-color: #fff;
border-bottom: solid rgba($color: $mian-color, $alpha:0.2) 10rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 40rpx;
.selectNew {
flex: 1;
text-align: center;
}
.selectNew2 {
padding: 20rpx 0;
flex: 1;
font-size: 34rpx;
color: #353535;
span {
color: #666;
font-size: 28rpx;
margin-left: 20rpx;
}
.addrs {
font-size: 26rpx;
margin-top: 10rpx;
color: #666;
}
}
}
}
</style>

751
pages/goods/details.vue Normal file
View File

@@ -0,0 +1,751 @@
<template>
<view class="content" v-if="!loding">
<!-- 轮播主图 -->
<view class="goods-covers">
<swiper class="swiper" indicator-dots indicator-active-color="#c82626">
<block v-if="goodsObj.pictures.length > 0">
<swiper-item v-for="(item, index) in goodsObj.pictures" :key="index">
<image class="swiper-item" :src="item" mode="aspectFill"/>
</swiper-item>
</block>
</swiper>
</view>
<!-- 产品详情 -->
<view class="goods-content">
<view class="header">
<view class="flex-box">
<view class="price"><text></text>{{goodsObj.price.show}}</view>
<view class="sales">累计易货{{goodsObj.sales}}</view>
</view>
<view class="coupon" v-if="couponSee.length > 0" @click="couponsOpne">
<view class="coupon-list" v-for="(item, index) in couponSee" :key="index">
<view class="coupon-label">
{{item.title}}
</view>
</view>
<view class="coupon-btn">领券<image class="coupon-btn-img" src="../../static/icons/goods_row.png" mode="aspectFill"></image></view>
</view>
<view class="title"><view class="title-hot">热卖</view>{{goodsObj.name}}</view>
<!-- <view class="sub-title">{{goodsObj.description}}</view> -->
</view>
<!-- 商家信息 -->
<view class="store">
<image class="logo" :src="goodsObj.shop.cover" mode="aspectFill"></image>
<view class="store-cont">
<view class="store-title">{{goodsObj.shop.name}}</view>
<view class="rate">
<uni-rate
:readonly="true"
color="#ddd"
active-color="#c82626"
:value="goodsObj.company.star"
:size="14"
/>
</view>
<view class="openbtn" @click="onOpenWechat">进店<image class="openbtn-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image></view>
</view>
<view class="tooSee">
<view class="tooSee-label" @click="$Router.push({name: 'GoodsChain', params: {id: goodsObj.goods_id}})">
区块链证书
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="tooSee-label" @click="$Router.push({name: 'GoodsAttestation', params: {id: goodsObj.goods_id}})">
商品认证
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
<view class="tooSee-label" @click="$Router.push({name: 'GoodstracedTo', params: {id: goodsObj.goods_id}})">
商品溯源
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 产品规格 -->
<view class="size">
<view class="size-item nowrap">
<label class="title">规格</label>
{{goodsObj.skus[0].goods_name}}
</view>
<view class="size-item nowrap">
<label class="title">说明</label>
特价商品不可与优惠券叠加使用
</view>
<view class="size-item nowrap" v-if="goodsObj.services.length > 0">
<label class="title">服务</label>
<view class="goods-serve" @click="serveOpne">
<image class="goods-serve-img" src="../../static/icons/goods_buy.png" mode="aspectFill"></image>
<view class="nowrap goods-serve-name"><text v-for="(item, index) in goodsObj.services">{{item.name}}</text></view>
<image class="goods-serve-img" src="../../static/icons/goods_spot.png" mode="aspectFill"></image>
</view>
</view>
</view>
<!-- 产品详情 -->
<view class="product">
<block v-for="(item, index) in goodsObj.content" :key="index">
<image :src="item" mode="widthFix"></image>
</block>
</view>
</view>
<!-- footer -->
<view class="footer">
<button class="btn" size="default" @click="buyGoods">立即购买</button>
</view>
<!-- 优惠券弹出 -->
<uni-popup ref="couponsPopup">
<view class="coupons-popup">
<view class="coupons-header">
<view class="title">优惠券</view>
<image @click="couponsClose" class="close" src="../../static/icons/goods_close.png" mode=""></image>
</view>
<view class="coupons-cont">
<view class="coupons-name">
可领取的优惠券
</view>
<view class="coupons-list" v-for="(item , index) in coupons" :key="index">
<view class="coupons-tips" v-if="item.type">
<!-- value == 1服务券 value == 2代金券 value == 3提货券 -->
<text class="coupons-tips-text" v-if="item.type.value == '1'">服务券</text>
<text class="coupons-tips-text" v-else-if="item.type.value == '2'">代金券</text>
<text class="coupons-tips-text" v-else>提货券</text>
</view>
<view class="coupons-left" v-if="item.type.value == '2'">
<view class="coupons-number">
<text></text>{{item.price}}
</view>
<view class="coupons-full">
{{item.full}}可用
</view>
</view>
<view class="coupons-left" v-if="item.type.value == '1' || item.type.value =='3'">
<image :src="item.cover" mode="aspectFill" class="coupon-left-img" />
</view>
<view class="coupons-left" v-else-if="item.type.value == '3'">
<view class="coupons-number coupons-small">
提货券
</view>
</view>
<view class="coupons-center">
<view class="nowrap coupons-title">
{{item.title}}
</view>
<view class="coupons-time" v-if="item.time">
{{item.time.interval}}
</view>
</view>
<view v-if="item.can.get" class="coupons-right" @click="drawCoupons(item.coupon_id, index)">
领取
</view>
<view v-else class="coupons-right coupons-right-active">
已领取
</view>
</view>
</view>
<view class="coupons-true" @click="couponsClose">
确定
</view>
</view>
</uni-popup>
<!-- 服务保障弹出 -->
<uni-popup ref="servePopup">
<view class="coupons-popup">
<view class="coupons-header">
<view class="title">保障</view>
<image @click="serveClose" class="close" src="../../static/icons/goods_close.png" mode=""></image>
</view>
<view class="serve-cont">
<view class="serve-label" v-for="(item, index) in goodsObj.services" :key="index">
<view class="serve-label-name">
{{item.name}}
</view>
<view class="serve-label-text">
{{item.content}}
</view>
</view>
</view>
<view class="coupons-true" @click="serveClose">
确定
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { goods, managesCoupons } from '@/apis/interfaces/goods'
import userAuth from '@/public/userAuth'
export default {
data() {
return {
loding : true,
goodsObj : {},
identity : '',
company : {},
coupons : {},
couponSee : ""
};
},
created() {
goods(this.$Route.query.id).then(res=>{
this.loding = false
this.goodsObj = res
this.identity = res.identity.id || ''
this.company = res.company
this.couponSee= res.coupons.slice(0, 3)
this.coupons = res.coupons
})
},
methods:{
// 提交购买单
buyGoods(){
let token = this.$store.getters.getToken
if(token == ''){
let userLogin = new userAuth()
userLogin.Login()
return
}
// this.$Router.push({
// name: 'Buy',
// params: {
// skuId: this.goodsObj.skus[0].sku_id,
// qty : this.goodsObj.skus[0].number
// }
// })
uni.navigateTo({
url: '/pages/goods/confirmOrder?qty=1&type=2&goods_sku_id=' + this.goodsObj.skus[0].sku_id
})
},
// 打开微信小程序
onOpenWechat(){
plus.share.getServices(res => {
let sweixin = null;
for(let val of res){
if(val.id === 'weixin'){
sweixin = val
}
}
/** 以此为例子 显示跳转引导页
* 'index_4'
* index 跳小程序企业首页
* 4 企业id
**/
if(sweixin != null){
sweixin.launchMiniProgram({
id : this.company.original_id,
path: 'pages/login/guide?scene=index_' + this.company.company_id
})
}else{
uni.showToast({
title: '当前环境不支持打开微信小程序',
icon : 'none'
})
}
})
},
// 领取优惠券
drawCoupons(id){
let token = this.$store.getters.getToken
if(token == ''){
let userLogin = new userAuth()
userLogin.Login()
return
}
managesCoupons(id).then(res=>{
uni.showToast({
title: '领取成功',
type: 'primary',
duration: 3000
})
}).catch(err => {
uni.showToast({
icon : 'none',
title: err.message
})
})
},
// 选择优惠券-显示
couponsOpne(){
this.$refs.couponsPopup.open('bottom')
},
// 选择优惠券-隐藏
couponsClose(){
this.$refs.couponsPopup.close()
},
// 查看保障服务-显示
serveOpne(){
this.$refs.servePopup.open('bottom')
},
// 查看保障服务-隐藏
serveClose() {
this.$refs.servePopup.close()
}
}
}
</script>
<style lang="scss" scoped>
.content{
position: relative;
padding-top: 100%;
}
// 轮播图
.goods-covers{
position: fixed;
top: 0;
left: 0;
z-index: 1;
width: 100%;
padding-top: 100%;
.swiper{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.swiper-item{
width: 100%;
height: 100%;
}
}
}
// 商品详情
.goods-content{
position: relative;
z-index: 2;
background-color: white;
border-radius: $radius $radius 0 0;
padding-bottom: calc((#{$padding} * 2) + (env(safe-area-inset-bottom) / 2) + 90rpx);
padding-bottom: calc((#{$padding} * 2) + (constant(safe-area-inset-bottom) / 2) + 90rpx);
// 详情
.header{
padding: 0 $padding $padding;
.title{
font-size: $title-size;
font-weight: bold;
line-height: 50rpx;
.title-hot {
display: inline-block;
background-color: #fee195;
font-size: 24rpx;
border-radius: 50rpx;
padding: 0 10rpx;
height: 34rpx;
line-height: 36rpx;
margin: 6rpx 10rpx 0 0;
}
}
.sub-title{
line-height: 40rpx;
font-size: $title-size-sm;
color: $text-gray;
padding-bottom: $padding/3;
}
.flex-box{
display: flex;
justify-content: space-between;
line-height: 90rpx;
.price{
font-weight: bold;
color: $text-price;
font-size: $title-size + 14;
text{
font-size: 70%;
}
width: calc(60% - #{$padding});
}
.sales{
font-size: $title-size-sm;
color: $text-gray;
width: 40%;
text-align: right;
}
}
// 新增优惠券
.coupon {
background-color: #fef2f2;
color: #e1293f;
border-radius: 8rpx;
border: 1rpx solid #ffe5e5;
padding: $padding - 15;
box-sizing: border-box;
display: flex;
position: relative;
margin-bottom: $margin - 10;
.coupon-list {
font-size: 22rpx;
.coupon-label {
display: inline-block;
border: 1rpx solid #e998a1;
border-radius: 50rpx;
padding: 0 15rpx;
height: 34rpx;
line-height: 34rpx;
margin-right: $margin - 10;
}
}
.coupon-btn {
position: absolute;
right: $padding - 20;
top: 0;
line-height: 60rpx;
font-size: 24rpx;
display: flex;
font-weight: 700;
.coupon-btn-img {
width: 22rpx;
height: 22rpx;
margin: 20rpx 0 0 4rpx;
}
}
}
}
// 新增服务
.goods-serve {
display: flex;
.goods-serve-img {
width: 36rpx;
height: 36rpx;
margin-top: 26rpx;
}
.goods-serve-name {
margin: 0 30rpx 0 20rpx;
width: calc(100% - 122rpx);
text {
padding-right: $padding;
position: relative;
&:last-child {
padding-right: 0;
}
}
}
}
// 店铺
.store{
position: relative;
margin: 0 $margin;
background: #F8F8F8;
border-radius: $radius/2;
padding: $padding;
min-height: 220rpx;
.logo{
position: absolute;
left: $margin;
top: $margin;
width: 98rpx;
height: 98rpx;
border-radius: $radius/2;
}
.store-cont {
position: absolute;
width: 100%;
left: 0;
top: 0;
padding-left: 150rpx;
padding-top: 20rpx;
box-sizing: border-box;
height: 140rpx;
}
.tooSee {
position: absolute;
top: 150rpx;
left: 0;
font-size: 24rpx;
padding-left: $padding;
box-sizing: border-box;
.tooSee-label {
background-color: #fd683e;
border-radius: 8rpx 4rpx 4rpx 6rpx;
color: #FFFFFF;
height: 48rpx;
line-height: 48rpx;
padding: 0 $padding - 15;
box-sizing: border-box;
display: inline-block;
margin-right: $margin * 2;
position: relative;
&::after, &::before{
content: '';
position: absolute;
}
&::after {
right: -40rpx;
top: 0;
background-color: #f64c37;
width: 40rpx;
height: 100%;
border-radius: 4rpx 8rpx 8rpx 4rpx;
}
&::before {
right: -1rpx;
top: 5%;
border: 1rpx dashed #fb745a;
height: 90%;
z-index: 2;
box-sizing: border-box;
}
&:last-child {
margin: 0;
}
&:first-child {
background-color: #f2d7aa;
color: #362507;
}
&:first-child::after {
background-color: #f1d599;
}
&:first-child::before {
border-color: #fae2b9;
}
.tooSee-label-img {
position: absolute;
right: -34rpx;
top: 12rpx;
width: 28rpx;
height: 28rpx;
z-index: 9;
}
&:first-child .tooSee-label-img {
filter: brightness(.2)
}
}
}
.store-title{
font-size: $title-size-lg;
font-weight: bold;
line-height: 60rpx;
color: $text-color;
margin-bottom: 10rpx;
}
// rate
.openbtn{
position: absolute;
right: $margin - 10;
top: $margin * 3.5;
color: #848484;
height: 60rpx;
line-height: 60rpx;
text-align: center;
font-size: $title-size-m;
margin-top: -30rpx;
display: flex;
.openbtn-img {
width: 32rpx;
height: 32rpx;
filter: brightness(.5);
margin-top: 14rpx;
}
}
}
// 产品规格
.size{
margin-top: $margin;
border-top: solid 20rpx #F8F8F8;
border-bottom: solid 20rpx #F8F8F8;
.size-item{
position: relative;
padding: 0 $padding 0 ($padding + 100);
line-height: 90rpx;
font-size: $title-size-m;
&::after{
position: absolute;
left: $margin;
right: 0;
bottom: 0;
content: " ";
height: 1rpx;
background-color: $border-color;
}
&:last-child::after{
display: none;
}
.title{
position: absolute;
left: $margin;
top: 0;
font-weight: bold;
}
}
}
// 产品详情
.product{
image{
vertical-align: top;
width: 100%;
}
}
}
// 立即购买
.footer{
padding: $padding;
background: white;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 99;
box-sizing: border-box;
.btn[size='default']{
width: 100%;
height: 90rpx;
line-height: 90rpx;
padding: 0;
border-radius: 0;
box-sizing: border-box;
background: $text-price;
color: white;
font-weight: bold;
font-size: $title-size;
margin-bottom: calc(env(safe-area-inset-bottom) / 2);
margin-bottom: calc(constant(safe-area-inset-bottom) / 2);
}
}
// 优惠券弹出样式
.coupons-popup {
background-color: #FFFFFF;
border-radius: 40rpx 40rpx 0 0;
padding: $padding;
box-sizing: border-box;
.coupons-header {
text-align: center;
position: relative;
margin-bottom: $margin*1.5;
.title {
font-weight: 700;
}
.close {
position: absolute;
right: 0;
top: 0;
z-index: 2;
width: 38rpx;
height: 38rpx;
}
}
.coupons-cont {
.coupons-name {
color: #616065;
font-size: 30rpx;
}
.coupons-list {
border: 2rpx solid #d6b9be;
border-radius: 10rpx;
overflow: hidden;
position: relative;
margin-top: $margin;
// background-color: red;
.coupons-tips {
// background-color: #211e17;
background-image: linear-gradient(to right, #f8e5c0, #d6a46a);
color: #8d4928;
position: absolute;
border-radius: 0 0 20rpx 0;
padding: 0 8rpx;
height: 34rpx;
line-height: 34rpx;
left: 0;
top: 0;
z-index: 10;
.coupons-tips-text {
font-size: 24rpx;
transform:scale(.85);
display: block;
}
}
.coupons-left {
background-color: #fdedee;
color: #e1293f;
width: 190rpx;
text-align: center;
padding: $padding - 10 0;
border-right: 2rpx dashed #eccdd4;
.coupon-left-img{
width: 180rpx;
height: 100rpx;
border-radius: 20rpx;
}
.coupons-number {
font-size: 40rpx;
font-weight: 600;
text {
font-size: 24rpx;
}
&.coupons-small {
font-size: 32rpx;
padding: 20rpx 0;
}
}
.coupons-full {
font-size: 24rpx;
}
}
.coupons-center {
position: absolute;
width: 100%;
left: 0;
top: 0;
padding: $padding - 10 130rpx 0 220rpx;
box-sizing: border-box;
font-size: 28rpx;
.coupons-time {
font-size: 24rpx;
margin-top: 10rpx;
color: #514c51;
}
}
.coupons-right {
position: absolute;
right: 20rpx;
top: 36rpx;
width: 110rpx;
text-align: center;
background-color: #e1293f;
color: #FFFFFF;
border-radius: 80rpx;
font-size: 24rpx;
line-height: 52rpx;
&.coupons-right-active {
background-color: #adadad;
color: #FFFFFF;
}
}
}
}
.coupons-true {
background-image: linear-gradient(to right, #e1293f, #fd275d);
color: #FFFFFF;
border-radius: 80rpx;
line-height: 84rpx;
text-align: center;
margin-top: $margin*5;
}
}
// 新增服务保障样式
.serve-label {
margin-top: $margin + 10;
font-size: 28rpx;
.serve-label-name {
font-weight: 700;
margin-bottom: $margin - 10;
}
.serve-label-text {
line-height: 44rpx;
}
}
.serve-cont {
height: 40vh;
overflow-y: scroll;
}
</style>

View File

@@ -0,0 +1,117 @@
<template>
<view class="content-flex" v-if="!loding">
<scroll-view class="stair" scroll-y>
<view class="stair-item" :class="{'show': stairIndex == index}" v-for="(item, index) in category"
:key="index" @click="stairIndex = index">{{item.name}}</view>
<view class="ios-bottom"></view>
</scroll-view>
<scroll-view class="second" scroll-y>
<!-- @click="goList(item.category_id)" -->
<!-- @click="$Router.push({name:'goodsList',query:{id:item.category_id}})" -->
<view class="second-item" v-for="(item, index) in category[stairIndex].children" :key="index" @click="goList(item.category_id)">
{{item.name}}
<uni-icons class="arrow-icon" type="arrowright" color="#999" size="14"></uni-icons>
</view>
<view class="ios-bottom"></view>
</scroll-view>
</view>
</template>
<script>
import {
goodsCategory
} from '@/apis/interfaces/goods'
export default {
data() {
return {
loding: true,
category: [],
stairIndex: 0,
secondIndex: 0
};
},
created() {
goodsCategory().then(res => {
this.loding = false
this.category = res
})
},
methods: {
// 跳转列表页面
goList(id) {
uni.navigateTo({
url: `/pages/goods/lists?id=${id}`
})
}
}
}
</script>
<style lang="scss" scoped>
.content-flex {
background-color: white;
height: 100vh;
display: flex;
font-size: $title-size-m;
.stair {
background: #F5F5F5;
width: 240rpx;
.stair-item {
text-align: center;
padding: 0 $padding;
line-height: 90rpx;
color: $text-gray;
@extend .nowrap;
&.show {
position: relative;
background: white;
color: $text-price;
font-weight: bold;
&::before {
position: absolute;
height: 40rpx;
width: 5rpx;
background: $text-price;
content: " ";
left: 0;
top: 20rpx;
}
}
}
}
.second {
width: calc(100% - 240rpx);
.second-item {
position: relative;
padding: 0 ($padding + 80) 0 $padding;
line-height: 90rpx;
color: $text-gray;
.arrow-icon {
position: absolute;
right: $padding;
}
&::after {
position: absolute;
height: 1rpx;
content: ' ';
background: $border-color;
left: $padding;
right: 0;
top: 0;
}
&:first-child::after {
display: none;
}
}
}
}
</style>

123
pages/goods/lists.vue Normal file
View File

@@ -0,0 +1,123 @@
<template>
<view class="Goods-LISTS">
<view class="tabs">
<view class="tabs-item" :class="{'show': tabIndex == 0}" @click="onTabs" data-index="0">最新</view>
<view class="tabs-item" :class="{'show': tabIndex == 1}" @click="onTabs" data-index="1">
价格
<image class="icon" mode="widthFix"
:src="require(marketType == 'asc' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')" />
</view>
</view>
<view class="lists">
<goods-list :list="goods" priceType="CNY" @on-goods="onGoods" />
</view>
</view>
</template>
<script>
import {
list
} from '@/apis/interfaces/goods'
import goodsList from '@/components/goods-list/goods-list'
export default {
name: 'Goods-LISTS',
data() {
return {
tabIndex: 0,
marketType: 'asc',
goods: [],
page: 1,
has_more: true,
};
},
onReachBottom() {
if (this.has_more) {
this.page = this.page + 1
this.getList()
} else {
uni.showToast({
title: '我是有底线的~',
icon: 'none'
})
}
},
created() {
this.getList()
},
methods: {
onTabs(e) {
let index = e.target.dataset.index
if (index == 0 && index == this.tabIndex) return
if (index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'asc' ? 'desc' : 'asc'
this.tabIndex = index
this.has_more = true
this.page = 1
this.goods = []
this.getList()
},
onGoods(e) {
uni.navigateTo({
url:'/pages/goods/details?id='+e.goods_id
})
// this.$Router.push({
// name: 'goodsDetails',
// params: {
// id: e.goods_id
// }
// })
},
getList() {
list({
category_cid: this.$Route.query.id,
order_by: this.tabIndex == 1 ? this.marketType : '',
page: this.page
}).then(res => {
this.goods = this.goods.concat(res.data)
this.has_more = res.page.has_more
})
}
}
}
</script>
<style lang="scss" scoped>
.tabs {
position: fixed;
top: 0;
//#ifdef H5
top: 90rpx;
//#endif
left: 0;
z-index: 9;
width: 100%;
display: flex;
justify-content: space-around;
background: white;
height: 70rpx;
line-height: 70rpx;
text-align: center;
.tabs-item {
font-size: $title-size-m;
color: $text-gray;
.icon {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
margin-left: $margin / 3;
margin-bottom: 4rpx;
}
&.show {
color: $text-price;
}
}
}
// 列表
.lists {
padding-top: 70rpx;
}
</style>

101
pages/goods/payStatus.vue Normal file
View File

@@ -0,0 +1,101 @@
<template>
<view class="PayStatus">
<image class="payStatusImg" :src="success?'/static/imgs/paySuccess.png':'/static/imgs/payFail.png'" mode="widthFix" />
<view class="payTitle">{{success?'支付成功':'支付失败'}}</view>
<view class="payDes">{{success?'您已支付完成,订单稍后配送':'吼吼,您的支付未完成'}}</view>
<view class="payBackCheck">
<!-- <view class="check" v-if='success' @click="check">查看权证</view> -->
<view class="back" @click="back">返回首页</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
success:false,// 支付失败false 支付成功true
};
},
onLoad(e) {
if(e.success === 'true'){
uni.setNavigationBarTitle({
title:'支付成功'
})
this.success=true
}else{
uni.setNavigationBarTitle({
title:'支付失败'
})
this.success=false
}
},
methods: {
check() {
uni.reLaunch({
url:'/pages/property/order/numberWeight'
})
},
back() {
uni.reLaunch({
url:'/pages/equity/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.PayStatus {
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
.payStatusImg {
width: 300rpx;
padding: 50rpx 0;
margin-top: 100rpx;
}
.payTitle {
font-size: 34rpx;
font-weight: bold;
color: #353535;
}
.payDes {
font-size: 26rpx;
color: #666;
padding: 20rpx;
margin-bottom: 30rpx;
}
.payBackCheck {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
font-size: 28rpx;
width: 100%;
.check {
border: $main-color solid 1rpx;
color: $main-color;
padding: 14rpx 50rpx;
border-radius: 4rpx;
}
.back {
background-color: $main-color;
color: #fff;
padding: 14rpx 50rpx;
border-radius: 4rpx;
}
}
}
</style>

229
pages/goods/tracedTo.vue Normal file
View File

@@ -0,0 +1,229 @@
<template>
<view class="GoodsAuthentication">
<view class="authenticationTop" v-if='list.length>0'>区块链溯源码:{{info.token}}</view>
<!-- 进度条 -->
<view v-if='list.length>0' class='timeAxis'>
<view class="box-top" v-for="(item,index) in list" :key="index">
<view class="left-box-top"><span>商品交易</span>{{item.blockTime}}</view> <!-- 左边 -->
<view class="line" :class="{active:true,none:index==(list.length-1)}">
<!-- 中线 -->
<view class="dot" :class="{active:true}"></view><!-- 圆点 -->
</view>
<!-- 右边 -->
<view class="right-box-top">
<view class="authenticationItem">
<view class="authenticationItemcontent">
<view class="authenticationItemcontentItem" v-if="item.goods">
<view class="title">名称:</view>
<view class="content">{{item.goods.name}}</view>
</view>
<view class="authenticationItemcontentItem" v-if="item.goods">
<view class="title">规格:</view>
<view class="content">{{item.goods.skus[0].unit}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">购买数量:</view>
<view class="content">{{item.amount}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">区块链高度:</view>
<view class="content">{{item.height}}</view>
</view>
<view class="authenticationItemcontentItem">
<view class="title">交易哈希:</view>
<view class="content">{{item.hash}}</view>
</view>
<view class="zhushi">注释:{{item.note}}</view>
</view>
</view>
</view>
</view>
</view>
<no-list v-if="list.length === 0" name='no-chain' txt="没有任何数据哦~" />
<!-- 弹窗提示喽 -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
managesTracedTo
} from '@/apis/interfaces/goods'
export default {
data() {
return {
list: '',
info: ''
}
},
created() {
managesTracedTo(this.$Route.query.id).then(res => {
this.list = res.list
this.info = res
})
},
methods: {
priveImg(img) {
uni.previewImage({
current: img, // 当前显示图片的http链接
urls: [img] // 需要预览的图片http链接列表
})
},
call(phone) {
uni.makePhoneCall({
phoneNumber: phone,
})
}
}
}
</script>
<style lang="scss" scoped>
page {
background-color: #F7F7F7;
}
.GoodsAuthentication {
padding: 30rpx;
.authenticationTop {
width: 100%;
padding: 20rpx 50rpx;
background-color: $main-color;
font-size: 26rpx;
color: #fff;
border-radius: 60rpx;
word-break: break-all;
text-align: center;
margin-bottom: 40rpx;
}
// 商品认证
.authenticationItem {
width: 100%;
min-height: 300rpx;
.authenticationItemTitle {
font-size: 30rpx;
color: #333333;
font-weight: 600;
padding: 30rpx 20rpx;
}
}
.timeAxis {
margin-top: 60rpx;
}
}
.box-top {
width: 100%;
min-height: 120rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
.left-box-top {
width: 124rpx;
text-align: center;
color: #cacaca;
font-size: 22rpx;
padding-top: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-start;
box-sizing: border-box;
span {
font-size: 28rpx;
// font-weight: bold;
color: #333;
padding-bottom: 10rpx;
padding-right: 4rpx;
}
}
.line {
width: 2rpx;
background-color: rgba(228, 231, 237, 1);
margin: 0 20rpx 0 20rpx;
padding-top: 0;
.dot {
width: 20rpx;
height: 20rpx;
background-color: rgba(228, 231, 237, 1);
border-radius: 50%;
position: relative;
left: -10rpx;
}
}
.right-box-top {
flex: 1;
width: calc(100% - 170rpx);
padding: 0 0 20rpx 0;
// 商品认证
.authenticationItem {
width: 100%;
.authenticationItemcontent {
width: 100%;
background-color: #fff;
border-radius: 20rpx;
border: solid rgba(200, 38, 0, .05) 6rpx;
box-shadow: 2rpx 2rpx 20rpx 0rpx rgba(200, 38, 0, .051);
padding: 10rpx 20rpx;
.zhushi {
font-size: 24rpx;
color: #999;
padding: 10rpx 0;
word-wrap: break-word;
}
.authenticationItemcontentItem {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
box-sizing: border-box;
padding: 12rpx 0;
font-size: 26rpx;
.title {
width: 160rpx;
}
.content {
text-overflow: ellipsis;
width: calc(100% - 180rpx);
word-wrap: break-word;
}
.img {
width: 220rpx;
height: 160rpx;
}
}
}
}
}
}
//激活元素
.active {
background-color: #c82626 !important;
}
// 隐藏元素
.none {
background-color: rgba(0, 0, 0, 0) !important;
}
</style>

View File

@@ -0,0 +1,302 @@
<template>
<view class="address-create" v-if="isloaded">
<view class="list-item">
<view class="item">收货人 <input placeholder-class="placeholder-style" maxlength="10" v-model="name"
placeholder="请输入收货人姓名" />
</view>
</view>
<view class="list-item">
<view class="item">联系电话 <input placeholder-class="placeholder-style" v-model="mobile" type="number" maxlength="11"
placeholder="请输入收货人手机号码" /></view>
</view>
<view class="list-item">
<view class="item">所在区域
<span @click="btnClick()">{{addressTxt || '请选择省市区县,乡镇等'}}</span>
</view>
</view>
<view class="list-item">
<view class="item">详细地址 <textarea placeholder-class="placeholder-style" v-model="address" auto-height
placeholder="请完善详细街道,楼牌号等" />
</view>
</view>
<view class="list-item moren">
<view class="item">
<view class="uni-list-cell-db">设置默认地址</view>
<switch @change="switchChange" :checked="is_default" color='#8b64fd' style="transform:scale(0.9)" />
</view>
</view>
<view class="besure" @click="besure">保存</view>
<selectAddress ref='selectAddress' :addressIdList='addressIdList' @selectAddress="successSelectAddress" />
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import selectAddress from '@/components/yixuan-selectAddress/yixuan-selectAddress.vue'
import cityData from '@/static/yixuan-selectAddress/city.json'
import {
addAddresses,
getAddresses,
editAddresses
} from '@/apis/interfaces/address'
export default {
components: {
selectAddress
},
data() {
return {
name: '', //姓名
mobile: '', //电话
address: '', //详细地址
is_default: false, //默认 1=默认
addressTxt: '', // 已选择的地址显示 (页面显示)
addressIdList: [], // 向子组件传递参数数组[3,36,37] 即显示默认值【province_idprovince_iddistrict_id】
addressId: '',
isloaded: false
};
},
onLoad(e) {
if (!!e.id) {
uni.setNavigationBarTitle({
title: '编辑地址'
})
this.addressId = e.id
this.getInfo(e.id)
} else {
this.isloaded = true
}
},
methods: {
// 根据地址id获取地址的详细信息
getInfo(id) {
getAddresses(id).then(res => {
const array = [res.province.region_id, res.city.region_id, res.district.region_id]
this.addressIdList = array
this.name = res.name
this.mobile = res.mobile
this.address = res.address
this.addressTxt = res.province.name + ' ' + res.city.name + ' ' + res.district.name
this.is_default = res.default
this.isloaded = true
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 是否勾选默认
switchChange(e) {
this.is_default = e.target.value
},
// 点击省市区选择
btnClick() {
this.$refs.selectAddress.show()
},
besure() {
let params = {
name: this.name,
mobile: this.mobile,
address: this.address,
is_default: this.is_default ? 1 : 0,
province_id: this.addressIdList[0],
city_id: this.addressIdList[1],
district_id: this.addressIdList[2]
}
console.log(params,'params。。。')
if (params.name.trim() === '') {
uni.showToast({
title: '请重新核对姓名',
icon: 'none'
})
} else if (params.mobile.trim() === '' || params.mobile.trim().length !== 11) {
uni.showToast({
title: '请重新核对手机号码',
icon: 'none'
})
} else if (this.addressIdList[0] === undefined || this.addressIdList[1] === undefined || this.addressIdList[
2] === undefined) {
uni.showToast({
title: '请完善省市区信息',
icon: 'none'
})
} else if (params.address.trim() === '') {
uni.showToast({
title: '请完善详细的收货地址',
icon: 'none'
})
} else {
if (this.addressId) {
editAddresses(this.addressId, params).then(res => {
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
uni.setStorageSync('refresh',true)
uni.navigateBack({})
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
} else {
addAddresses(params).then(res => {
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
uni.navigateBack({})
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
}
}
},
// 选择成功回调
successSelectAddress(address) {
if (address[0].id) {
this.addressIdList = [address[0].id, address[1].id, address[2].id]
this.addressTxt = address[0].name + ' ' + address[1].name + ' ' + address[2].name
}
},
}
}
</script>
<style lang="scss">
.Create-addr {
line-height: 100vh;
background-color: #fff;
}
.list-item {
padding: 0 $padding*1.5;
background-color: #fff;
.item {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: $padding 0;
border-bottom: solid #f8f8f8 1rpx;
font-size: $title-size - 2;
color: #333;
input,
textarea,
span,
.picker {
color: #353535;
font-size: $title-size - 1;
width: 74%;
}
.picker {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
box-sizing: border-box;
.picker-item {
width: 33.33%;
border: solid 1rpx #ccc;
text-align: center;
}
}
.placeholder-style {
color: #ccc;
}
}
}
.moren {
border-top: $padding solid #f7f7f7;
}
.besure {
background-color: $text-price;
color: #fff;
text-align: center;
margin: $margin*1.5;
border-radius: $radius;
padding: $padding*1.3;
}
.popup {
min-height: 500rpx;
.popup-top {
position: relative;
font-size: $title-size - 4;
.title {
text-align: center;
padding: $padding*1.5 $padding*2;
border-bottom: solid 1rpx #f7f7f7;
}
.select {
position: absolute;
top: $padding;
right: $padding;
color: $text-price;
}
}
.addr-show {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
padding: 0 $padding *3;
font-size: $title-size;
.addr-show-item {
padding: $padding*1.5 0;
margin-right: $margin*2;
max-width: 33.33%;
overflow: hidden;
}
.picker-item-selected {
border-bottom: solid $text-price 4rpx;
}
}
.scroll-Y {
height: 60vh;
padding: $padding*2;
box-sizing: border-box;
.scroll-item {
padding: $padding*1.5 0;
border-bottom: solid .25rpx rgba($color: #000000, $alpha: 0.02);
color: #353535;
font-size: $title-size;
.pr20 {
padding-right: 20rpx;
}
}
}
}
</style>

271
pages/user/address/list.vue Normal file
View File

@@ -0,0 +1,271 @@
<template>
<view class="Address-list" v-if="loaded">
<!-- 收货地址列表 -->
<view class="addr-list" v-for="(item,index) in addressLists" v-if="addressLists.length>0" @tap="select(index)"
:key="index">
<view class="addr-name-phone"> <span class="name">{{item.name}}</span> <span class="phone">
{{item.mobile}}</span>
</view>
<view class="addr-des">{{item.full_address}}</view>
<view class="moren-edit-del">
<view class="moren" :style="item.default?'':'color:#cacaca'+'!important;'"
@click.stop="moren(item.default+','+item.address_id)">
<uni-icons class="uni-icons" type="checkbox-filled" size="20"
:color="item.default?'#8b64fd':'#cacaca'">
</uni-icons>
默认
</view>
<view class="edit-del">
<view class="edit" @click.stop="edit(item.address_id)">
<uni-icons class="uni-icons" type="compose" size="16" color="#666"></uni-icons>编辑
</view>
<view class="del" @click.stop="del(item.address_id)" v-if="type != 'selectSite'">
<uni-icons type="trash" size="16" color="#666"></uni-icons> 删除
</view>
</view>
</view>
</view>
<view>
<!-- 底部新增按钮 -->
<uni-fab horizontal="left" vertical="bottom" :pattern='pattern' @fabClick="fabClick" />
</view>
<!-- 没有收货地址 -->
<no-list v-if="addressLists.length === 0" name='no-addr' txt="您还没有收货地址哦~" />
<!-- 请求中... -->
<!-- <view>{{loading?'请求中....':'请求结束'}}</view> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
addresses,
addAddresses,
getAddresses,
delAddresses,
defaultAddresses,
editAddresses
} from '@/apis/interfaces/address'
export default {
data() {
return {
addressLists: [],
type: '', //用于分辨是否从订单页面-选择地址 有值为订单页面来源 === 1 是返回上一页时候处理上一页参数
loaded: false, //默认页面不可渲染,请求接口后可以渲染
pattern: {
buttonColor: '#8b64fd'
}
};
},
onLoad(e) {
console.log(e)
if (e.type !== undefined) {
this.type = e.type
}
},
// 下拉刷新
onPullDownRefresh() {
// this.getAddr()
},
onShow() {
this.getAddr()
},
methods: {
// 新增
fabClick() {
uni.navigateTo({
url: '/pages/user/address/create'
})
},
// 修改
edit(id) {
uni.navigateTo({
url: '/pages/user/address/create?id=' + id
})
},
// 删除
del(id) {
let that = this
uni.showModal({
title: '是否确认删除',
success: (res) => {
if (res.confirm) {
delAddresses(id).then(res => {
that.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
that.getAddr()
}).catch(err => {
that.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
}
}
})
},
// 默认
moren(data) {
let defaultT = data.split(',')[0]
let id = data.split(',')[1]
if (defaultT === 'false') {
defaultAddresses(id).then(res => {
this.$refs.uToast.show({
title: res,
type: 'primary',
duration: 3000
})
setTimeout(res => {
this.getAddr()
}, 500)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
}
},
// 获取列表
getAddr() {
this.loaded = true
addresses().then(res => {
this.addressLists = res
uni.stopPullDownRefresh()
console.log(this.type === '1', this.type)
if (this.type == '1') {
if (this.addressLists.length === 0) {
let pages = getCurrentPages();
let nowPage = pages[pages.length - 1];
let prevPage = pages[pages.length - 2];
prevPage.$vm.address = '';
} else {
let pages = getCurrentPages();
let nowPage = pages[pages.length - 1];
let prevPage = pages[pages.length - 2];
prevPage.$vm.address = res[0];
}
}
uni.setStorageSync('refresh', false)
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
// 选择地址跳转
select(index) {
if (this.type == '1') {
let pages = getCurrentPages();
let nowPage = pages[pages.length - 1];
let prevPage = pages[pages.length - 2];
prevPage.$vm.address = this.addressLists[index];
uni.navigateBack({
delta: 1
})
}
}
}
}
</script>
<style lang="scss" scoped>
.Address-list {
width: 100%;
min-height: 100vh;
padding: $padding;
box-sizing: border-box;
// margin-bottom: 150rpx;
.no-more-addr {
font-size: $title-size*0.9;
color: $text-price;
uni-icons {
padding-right: $padding*0.5;
}
}
// 地址列表
.addr-list {
box-shadow: 0 0 10rpx 0 rgba($color: #000000, $alpha: 0.1);
padding: $padding $padding*1.5;
background-color: #fff;
margin-bottom: $margin;
border-radius: $radius*0.5;
.name {
color: #353535;
font-weight: bold;
font-size: $title-size*1.1;
}
.phone {
margin-left: $margin*2;
}
.addr-des {
padding: $padding*.9 0 $padding*1 0;
font-size: $title-size-m;
border-bottom: solid #f8f8f8 1rpx;
color: $text-color;
}
.moren-edit-del {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding-top: $padding;
.moren,
.edit-del {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
box-sizing: border-box;
font-size: $title-size*0.9;
color: $text-price;
.uni-icons {
padding-right: $padding*0.5;
}
.edit {
padding-right: $padding*1.5;
color: $text-color;
}
.del {
color: $text-color;
}
}
}
}
// 新增地址
.besure {
background-color: $text-price;
color: #fff;
text-align: center;
margin: $margin*1.5;
border-radius: $radius;
padding: $padding*1.3;
position: absolute;
}
}
</style>

View File

@@ -209,6 +209,53 @@
</view>
</view>
</view>
<!-- 我的权证 -->
<!-- <view class="user-group">
<view class="title">
<view class="title-text">我的权证</view>
</view>
<view class="group-flex group-flex-4">
<view class="item" @click="$Router.push({name:'NumberWeight'})">
<view class="item-num">{{count.warrnats}}</view>
<view class="item-title">权证持有</view>
</view>
<view class="item" @click="$Router.push({name: 'marketManag'})">
<view class="item-num">{{count.warrnat_transfer}}</view>
<view class="item-title">权证转让</view>
</view>
<view class="item" @click="$Router.push({name:'ServicesOrder'})">
<view class="item-num">{{count.shipment_fuwu_count}}</view>
<view class="item-title">已使用</view>
</view>
<view class="item" @click="$Router.push({name:'MallShipments'})">
<view class="item-num">{{count.shipment_goods_count}}</view>
<view class="item-title">已提货</view>
</view>
</view>
</view> -->
<!-- 我的权证 -->
<view class="userPartner">
<view class="partner-title">
我的权证
</view>
<view class="tool-list">
<view class="tool-label" @click="$Router.push({name:'NumberWeight'})">
<image class="tool-label-img" src="/static/user/userServe-00.png" mode=""></image>
<view class="tool-label-name">权证持有</view>
</view>
<view class="tool-label" @click="$Router.push({name:'ServicesOrder'})">
<image class="tool-label-img" src="/static/user/userServe-02.png" mode=""></image>
<view class="tool-label-name">已使用</view>
</view>
<view class="tool-label" @click="$Router.push({name:'MallShipments'})">
<image class="tool-label-img" src="/static/user/userServe-03.png" mode=""></image>
<view class="tool-label-name">已提货</view>
</view>
</view>
</view>
<!-- 我的服务 -->
<view class="userPartner">
<view class="partner-title">

View File

@@ -0,0 +1,178 @@
<template>
<view class="LogisticsIndex" v-if="loaded">
<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: [],
loaded:false,
no: '', // 快递单号
express:{},// 地址信息
}
},
onLoad(e) {
// this.no = this.$route.params.no
// this.getLogistic(this.no)
this.no = e.no
this.getLogistic(this.no)
},
methods: {
getLogistic(no) {
mallShipmentsLogistic(no).then(res => {
console.log(res)
this.list = res.logistics
this.express = res.express
this.loaded = true
}).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>

View 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>

View File

@@ -0,0 +1,716 @@
<template>
<view class="OrderInfo" v-if="loaded">
<!-- 订单状态 -->
<view class="order-status">
<view class="info">
{{state.text}}
<span>{{state.remark}}</span>
</view>
<image src="/static/imgs/fire.png" mode="widthFix"></image>
</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/details?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,
state:{},
refund_id: '', // 退货单no
company: '',
number: '',
logs: [],
loaded:false,
showLogs: false // 默认不显示记录信息
};
},
onLoad(e) {
// this.refund_id = this.$route.params.no
// this.getInfo(this.refund_id)
this.refund_id = e.no
this.getInfo(e.no)
},
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
this.state = res.state
this.loaded = true
}).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>

View File

@@ -0,0 +1,499 @@
<template>
<view class="mallShipments">
<!-- 订单分类 -->
<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'
data.channel = 'app'
} 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
// }
// })
uni.navigateTo({
url:'/pages/user/order/mallShipmentsRefund?no='+no
})
},
// 查看物流
nowLogistics(no) {
// this.$Router.push({
// name: 'Orderlogistics',
// params: {
// no: no
// }
// })
uni.navigateTo({
url:'/pages/user/order/logistics?no='+no
})
},
// 查看详情
goDetail(no) {
// this.$Router.push({
// name: 'MallShipmentsInfo',
// query:{
// no:no
// }
// })
uni.navigateTo({
url:'/pages/user/order/mallShipmentsInfo?no='+no
})
},
// 查看退货单详情
// 查看详情
goDetail1(no){
// this.$Router.push({
// name: 'MallRefundsInfo',
// params:{
// no:no
// }
// })
uni.navigateTo({
url:'/pages/user/order/mallRefundsInfo?no='+no
})
}
}
}
</script>
<style lang="scss" scoped>
page {
width: 100%;
height: 100%;
}
.mallShipments {
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>

View File

@@ -0,0 +1,669 @@
<template>
<view class="OrderInfo" v-if="loaded">
<!-- 订单状态 -->
<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/details?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
loaded:false
};
},
onLoad(e) {
this.shipment_no = e.no
this.getInfo(e.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+''
this.loaded = true
}).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>

View File

@@ -0,0 +1,341 @@
<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)
this.shipment_no = e.no
this.getInfo(e.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: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>

View File

@@ -0,0 +1,202 @@
<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 => {
console.log(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
})
},
// 转让权证
navMarkets(symbol) {
this.$Router.push({
name: 'marketTransfer',
params: {
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>

View File

@@ -0,0 +1,800 @@
<template>
<view class="OrderInfo" v-if="loaded">
<!-- 订单状态 -->
<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/user/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/user/address/list?type=1" hover-class="none">
<u-icon name="map-fill" color="#613091" 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/details?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:'',
loaded:false
};
},
onLoad(e) {
this.symbol = e.symbol
this.getInfo(e.symbol)
// this.getInfo('G22S20')
},
// 监听弹窗页面为false时候重新请求当前页面
watch: {
showCode(newVal, oldVal) {
if(!newVal && oldVal){
this.getInfo(this.symbol)
uni.setStorageSync('refresh',true)
}
}
},
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 + ''
this.loaded = true
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'error',icon:false,
duration: 3000
})
setTimeout(res => {
uni.setStorageSync('refresh',true)
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>

View File

@@ -0,0 +1,237 @@
<template>
<view class="NumberWeight">
<!-- 订单分类 -->
<view class="nav" >
<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 ==='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>
<!-- 有订单列表 -->
<block v-if="lists.length > 0">
<!-- 订单列表 -->
<view class="order-list" v-for="(item,index) in lists" :key="index">
<MallShipmentsTemplate :item="item" />
<view class="actions">
<view class="nowPay" @click="goDetail(item.shipment_no)" >查看详情</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 { mallShipmentsPostShop , mallShipmentsSign , mallShipmentsCancel } from '@/apis/interfaces/numberWeight'
export default {
components: {
MallShipmentsTemplate
},
data() {
return {
lists: [],
page:1,
total:0,
navList: [],
type:'',// post 快递单 空为自提单
selectNavId: 'signed',
count:{},// 订单数量
};
},
onLoad(e) {
this.navList = [
{
name: '已使用',
id: 'signed'
},
{
name: '已完成',
id: 'completed'
}
]
this.selectNavId = 'signed'
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: '吼吼吼~我是有底的~',
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:4,
page:this.page,
state:this.selectNavId
}
let apiUrl = ''
apiUrl = 'mall/shipments/service'
data.channel = 'app'
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,
duration: 3000
})
})
},
// 查看详情
goDetail(no){
uni.navigateTo({
url:'/pages/property/order/servicesOrderInfo?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;
}
}
// 订单列表
.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>

View File

@@ -0,0 +1,594 @@
<template>
<view class="OrderInfo" v-if="loaded">
<!-- 订单状态 -->
<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/details?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> x {{info.qty}}</span></view>
<view class="goods-type">使用方式<span>门店使用</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>
<!-- <u-toast ref="uToast" /> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
mallShipmentsInfo
} 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,
loaded: false,
shipment_no: '', // 提货单no
};
},
onLoad(e) {
console.log(e)
this.shipment_no = e.no
this.getInfo(e.no)
console.log(this.shipment_no)
// this.getInfo('2021081817410747800300000004')
},
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 + ''
this.loaded = true
}).catch(err => {
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
},
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>