同步代码

This commit is contained in:
2022-01-14 11:34:21 +08:00
312 changed files with 44902 additions and 654 deletions

View File

View File

@@ -0,0 +1,132 @@
<template>
<view class="">
<view class="logistics--header">
<image class="logo" :src="info.logo" mode="aspectFill"></image>
<view class="info">
<view class="info--company">快递公司{{info.company}}</view>
<view class="info--no" @click="copyNo">{{info.no}}<text>复制</text></view>
</view>
</view>
<view class="logistics--logs">
<block v-for="(log, logIndex) in logs" :key="logIndex">
<view class="item">
<view class="">{{log.status}}</view>
<view class="">{{log.time}}</view>
<view class="">{{log.context}}</view>
</view>
</block>
</view>
</view>
</template>
<script>
export default{
props: {
logs: {
type: Array,
default: () => {
return []
}
},
info: {
type: Object,
default: () => {
return {
logo : "",
no : "",
company : ""
}
}
}
},
methods:{
copyNo(){
uni.setClipboardData({
data: this.info.no,
success: res => {
uni.showToast({
title: "单号已复制",
icon : "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
$margin: 30rpx;
$radius: 10rpx;
.logistics--header{
position: relative;
background: linear-gradient(to right, #34ce98, #22aa98);
color: white;
padding: $margin $margin $margin*2;
min-height: 88rpx;
.logo{
width: 88rpx;
height: 88rpx;
background: white;
vertical-align: top;
}
.info{
position: absolute;
left: $margin * 2 + 88rpx;
top: $margin;
font-size: 28rpx;
&--no{
line-height: 44rpx;
font-weight: normal;
text{
margin-left: $margin/2;
}
}
&--company{
height: 44rpx;
line-height: 40rpx;
font-weight: normal;
}
}
}
.logistics--logs{
position: relative;
margin-top: -$margin;
background: white;
border-radius: $radius $radius 0 0;
z-index: 9;
padding: $margin;
overflow: hidden;
.item{
position: relative;
margin-top: $margin;
padding-left: 50rpx;
font-size: 28rpx;
color: #444;
&::after,
&::before{
position: absolute;
content: " ";
}
&::before{
top: 10rpx;
left: 10rpx;
background-color: #ddd;
height: 200%;
width: 2rpx;
}
&::after{
width: 22rpx;
height: 22rpx;
background-color: #ddd;
left: 0;
top: 10rpx;
border-radius: 50%;
}
&:first-child{
margin-top: 0;
&::after{
background-color: #34CE98;
}
}
}
}
</style>

View File

@@ -0,0 +1,80 @@
{
"id": "oct-logistics",
"displayName": "oct-logistics",
"version": "1.0.0",
"description": "oct-logistics",
"keywords": [
"oct-logistics"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

View File

@@ -0,0 +1 @@
# oct-logistics

View File

@@ -12,7 +12,15 @@
{{ item.name }}
</view>
<view class="nowrap menu--text">
{{ isType ? item.weight + '克' : item.sub_title }}
<block v-if="isType == 'rank'">
{{ item.heat }}
</block>
<block v-else-if="isType == 'det'">
{{ item.weight }}
</block>
<block v-else>
{{ item.sub_title }}
</block>
</view>
</view>
</view>
@@ -41,14 +49,16 @@
default: false
},
// 是否是详情
// det是详情 rank为排行
isType: {
type: Boolean,
default: false
type:'',
default : () => {
return {}
}
}
},
mounted() {
// console.log(this.$props)
}
}
</script>

View File

@@ -40,11 +40,16 @@
</view>
</view>
</block>
<slot name="btns">
<slot name="btns" v-if="orderInfo.cans">
<view class="order--btns">
<block v-for="(btnItem, btnIndex) in orderBtns" :key="btnIndex">
<!-- <block v-for="(btnItem, btnIndex) in orderBtns" :key="btnIndex">
<view class="item" @click="$emit('onBtn', {type: btnItem.type, order: orderInfo})" :style="btnItem.style">{{btnItem.text}}</view>
</block>
</block> -->
<view v-show="orderInfo.cans.cancel" class="item item--cancel" @click="$emit('onBtn', {type: 'cancel', order: orderInfo})">取消订单</view>
<view v-show="orderInfo.cans.delete" class="item item--delete" @click="$emit('onBtn', {type: 'delete', order: orderInfo})">删除订单</view>
<view v-show="orderInfo.cans.logistic_show" class="item item--logistic" @click="$emit('onBtn', {type: 'logistic', order: orderInfo})">查看物流</view>
<view v-show="orderInfo.cans.pay" class="item item--pay" @click="$emit('onBtn', {type: 'pay', order: orderInfo})">立即支付</view>
<view v-show="orderInfo.cans.sign" class="item item--sign" @click="$emit('onBtn', {type: 'sign', order: orderInfo})">确认签收</view>
</view>
</slot>
</view>
@@ -137,6 +142,7 @@
font-size: 28rpx;
line-height: 40rpx;
color: #555;
@extend .text-nowrap;
}
&> .stateText{
font-size: 26rpx;
@@ -219,6 +225,16 @@
border: solid 1rpx #ddd;
padding: 0 ($margin - 10);
border-radius: 28rpx;
&--cancel,
&--delete,
&--logistic{
color: #666;
}
&--pay,
&--sign{
color: #34CE98;
border-color: #34CE98;
}
}
}
}

View File

@@ -1,11 +1,11 @@
<template>
<view>
<view class="new-item" v-for="(item, index) in lists" :key="index" @click="$emit('onTopic', item)">
<image class="new-cover" :src="item.cover" mode="aspectFill"></image>
<view class="new-title">{{ item.title }}</view>
<image class="new-cover" :src="item.cover ? item.cover : '/static/find/default_img.png'" mode="aspectFill"></image>
<view class="new-title">{{ item.name }}</view>
<view class="new-tool">
<text>阅读{{ item.read }}</text>
<text>{{ item.praise }}</text>
<text>阅读 {{ item.clicks }}</text>
<text> {{ item.favorites }}</text>
</view>
</view>
</view>