创建版本

This commit is contained in:
2021-02-22 12:17:00 +08:00
commit af555f49c3
2332 changed files with 369202 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
<template>
<view class="content">
<view style="padding-top:20px;">
<img alt="暂无数据" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxlbGxpcHNlIGZpbGw9IiNGNUY1RjUiIGN4PSIzMiIgY3k9IjMzIiByeD0iMzIiIHJ5PSI3Ii8+CiAgICA8ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgIDxwYXRoIGQ9Ik01NSAxMi43Nkw0NC44NTQgMS4yNThDNDQuMzY3LjQ3NCA0My42NTYgMCA0Mi45MDcgMEgyMS4wOTNjLS43NDkgMC0xLjQ2LjQ3NC0xLjk0NyAxLjI1N0w5IDEyLjc2MVYyMmg0NnYtOS4yNHoiLz4KICAgICAgPHBhdGggZD0iTTQxLjYxMyAxNS45MzFjMC0xLjYwNS45OTQtMi45MyAyLjIyNy0yLjkzMUg1NXYxOC4xMzdDNTUgMzMuMjYgNTMuNjggMzUgNTIuMDUgMzVoLTQwLjFDMTAuMzIgMzUgOSAzMy4yNTkgOSAzMS4xMzdWMTNoMTEuMTZjMS4yMzMgMCAyLjIyNyAxLjMyMyAyLjIyNyAyLjkyOHYuMDIyYzAgMS42MDUgMS4wMDUgMi45MDEgMi4yMzcgMi45MDFoMTQuNzUyYzEuMjMyIDAgMi4yMzctMS4zMDggMi4yMzctMi45MTN2LS4wMDd6IiBmaWxsPSIjRkFGQUZBIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K">
<view style="padding-top:5px;color:#999;">暂无数据</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
text-align: center;
padding-top: 200upx;
}
</style>
+69
View File
@@ -0,0 +1,69 @@
<template>
<view class="content">
<uni-list>
<uni-list-item title="头像" />
<uni-list-item title="姓名" :rightText="name" />
<uni-list-item title="帐号" :rightText="username" />
<!--
<uni-list-item title="我的订单" />
<uni-list-item title="我的发货" />
-->
</uni-list>
<view class="btns">
<button @click="logout" type="warn" class="text">{{logout_text}}</button>
</view>
</view>
</template>
<script>
import uniSection from '@/components/uni-section/uni-section.vue'
import uniList from '@/components/uni-list/uni-list.vue'
import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
export default {
components: {
uniSection,
uniList,
uniListItem
},
data() {
return {
name: '',
username: '',
logout_text: '帐号注销'
}
},
onLoad() {
let me = this;
let user = uni.getStorageSync('user');
me.name = user.name;
me.username = user.username;
},
methods: {
logout() {
this.$api.logout();
},
openurl() {
uni.navigateTo({
url: '/pages/webview'
});
}
}
}
</script>
<style>
page {
height: auto;
min-height: 100%;
background-color: #f5f6f8;
font-size: 14px;
}
.content {
}
.uni-section {
margin-top: 0;
}
.btns {
padding: 30rpx;
}
</style>
+254
View File
@@ -0,0 +1,254 @@
<template>
<view>
<view class="header" id="header">
<view class="search-controller">
<uni-search-bar radius="50" placeholder="搜索单号" @confirm="search" />
</view>
<view class="line-h"></view>
</view>
<view v-if="rows.length > 0">
<view class="uni-list uni-list-controller" :style="'margin-top:' + listTop + 'px;'">
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(row, key) in rows" :key="key" @click="goDetail(row)">
<view class="uni-media-list">
<view class="uni-media-list-body">
<view class="uni-media-list-text-top">
<text>{{ row.sn }}</text>
<text>{{ row.name }}</text>
</view>
<view class="uni-media-list-text-bottom">
<text>{{ row.run_name }}</text>
<text>{{ formatDate(row.created_at) }}</text>
</view>
</view>
</view>
</view>
</view>
<!--
<uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
-->
</view>
<view v-else style="padding-top:300rpx;">
<img alt="暂无数据" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxlbGxpcHNlIGZpbGw9IiNGNUY1RjUiIGN4PSIzMiIgY3k9IjMzIiByeD0iMzIiIHJ5PSI3Ii8+CiAgICA8ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgIDxwYXRoIGQ9Ik01NSAxMi43Nkw0NC44NTQgMS4yNThDNDQuMzY3LjQ3NCA0My42NTYgMCA0Mi45MDcgMEgyMS4wOTNjLS43NDkgMC0xLjQ2LjQ3NC0xLjk0NyAxLjI1N0w5IDEyLjc2MVYyMmg0NnYtOS4yNHoiLz4KICAgICAgPHBhdGggZD0iTTQxLjYxMyAxNS45MzFjMC0xLjYwNS45OTQtMi45MyAyLjIyNy0yLjkzMUg1NXYxOC4xMzdDNTUgMzMuMjYgNTMuNjggMzUgNTIuMDUgMzVoLTQwLjFDMTAuMzIgMzUgOSAzMy4yNTkgOSAzMS4xMzdWMTNoMTEuMTZjMS4yMzMgMCAyLjIyNyAxLjMyMyAyLjIyNyAyLjkyOHYuMDIyYzAgMS42MDUgMS4wMDUgMi45MDEgMi4yMzcgMi45MDFoMTQuNzUyYzEuMjMyIDAgMi4yMzctMS4zMDggMi4yMzctMi45MTN2LS4wMDd6IiBmaWxsPSIjRkFGQUZBIi8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K">
<view style="padding-top:5px;color:#999;">暂无数据</view>
</view>
</view>
</template>
<script>
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
import {dateUtils} from '@/util.js';
export default {
components: {
uniLoadMore
},
data() {
return {
page: 1,
rows: [],
listTop: 0,
status: 'more',
reload: false,
contentText: {
contentdown: '上拉加载更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
}
};
},
onLoad() {
var me = this;
me.getList();
},
mounted() {
let me = this;
uni.createSelectorQuery().in(this).select('#header').boundingClientRect(function(e) {
me.listTop = e.height - 1;
}).exec();
},
onPullDownRefresh() {
let me = this;
me.reload = true;
me.page = 1;
me.status = 'more';
me.getList();
},
onReachBottom() {
let me = this;
if (me.status == 'noMore') {
return;
}
me.status = 'more';
this.getList();
},
methods: {
formatDate(value) {
return dateUtils.formatDate(value);
},
getList() {
var me = this;
if (me.status == 'noMore') {
if (me.reload) {
me.reload = false;
uni.stopPullDownRefresh();
}
return;
}
me.$api.post('index/todo/index', {page: me.page}).then(res => {
if (me.reload) {
me.rows = [];
me.reload = false;
uni.stopPullDownRefresh();
}
me.rows = me.rows.concat(res.data);
if (res.current_page >= res.last_page) {
me.status = 'noMore';
} else {
me.page = res.current_page + 1;
}
if (me.rows.length > 0) {
uni.setTabBarBadge({
index: 0,
text: me.rows.length + ''
});
} else {
uni.removeTabBarBadge({index: 0});
}
}).catch(error => {
});
},
goDetail: function(row) {
uni.navigateTo({
url: '/pages/webview?title=' + row.name + '&url=' + encodeURIComponent(row.url + '?id=' + row.data_id),
});
}
}
};
</script>
<style>
page {
width: 100%;
height: 100%;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: center;
background: rgba(249, 249, 249, 1);
}
.header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 100;
background: #fff;
width: 100vw;
}
.uni-list-controller {
margin-top: 63px;
width: 100vw;
}
.uni-media-list-logo {
width: 140rpx;
height: 140rpx;
}
.uni-media-list-body {
height: auto;
justify-content: space-around;
}
.uni-media-list-text-top {
font-size: 28rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.uni-media-list-text-bottom {
display: flex;
flex-direction: row;
justify-content: space-between;
padding-top: 15rpx;
}
.tabs {
flex: 1;
flex-direction: column;
overflow: hidden;
background-color: #ffffff;
height: 100vh;
}
.scroll-h {
width: 750rpx;
height: 80rpx;
flex-direction: row;
white-space: nowrap;
align-items: center;
border-bottom: 1px solid #c8c7cc;
}
.line-h {
height: 1rpx;
background-color: #cccccc;
}
.uni-tab-item {
display: inline-block;
/*
padding-left: 70rpx;
padding-right: 70rpx;
*/
text-align: center;
width: 33.33333%;
}
.uni-tab-item-title {
color: #555;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
white-space: nowrap;
}
.uni-tab-item-title-active {
color: #007AFF;
}
.swiper-box {
flex: 1;
height: 50vh;
}
.swiper-item {
flex: 1;
flex-direction: row;
}
.scroll-v {
flex: 1;
width: 750rpx;
}
.search-controller {
padding: 10rpx;
}
.search-result {
margin-top: 10px;
margin-bottom: 20px;
text-align: center;
}
.search-result-text {
text-align: center;
font-size: 14px;
}
</style>
+139
View File
@@ -0,0 +1,139 @@
<template>
<view class="content" :class="{'active':active}">
<image class="logo" :class="{'active':active}" src="../../static/logo.png" mode="aspectFit"></image>
<view class="tabbar-box-wrap">
<view class="tabbar-box">
<view class="tabbar-box-item" @click="goToPage('/pages/tabbar-3-detial/tabbar-3-release/tabbar-3-release')">
<image class="box-image" src="../../static/img/release.png" mode="aspectFit"></image>
<text class="explain">发图文</text>
</view>
<view class="tabbar-box-item" @click="goToPage('/pages/tabbar-3-detial/tabbar-3-video/tabbar-3-video')">
<image class="box-image" src="../../static/img/video.png" mode="aspectFit"></image>
<text class="explain">发视频</text>
</view>
<view class="tabbar-box-item" @click="goToPage('/pages/tabbar-3-detial/tabbar-3-qa/tabbar-3-qa')">
<image class="box-image" src="../../static/img/qa.png" mode="aspectFit"></image>
<text class="explain">提问</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
active: false
};
},
onLoad() {},
onShow() {
// setTimeout(() => {
this.active = true;
// }, 500);
},
onHide() {
this.active = false;
},
methods: {
goToPage(url) {
if (!url) return;
uni.navigateTo({
url
});
}
}
};
</script>
<style lang="scss" scoped>
.content {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
/* #ifdef H5 */
height: calc(100vh - var(--window-bottom) - var(--window-top));
/* #endif */
/* #ifndef H5 */
height: 100vh;
/* #endif */
transition: opacity 0.3s;
background: #999;
opacity: 0;
&.active {
opacity: 1;
}
.logo {
position: relative;
margin-top: -400upx;
width: 200upx;
height: 200upx;
// z-index: -1;
opacity: 0;
transition: opacity 0.3s;
&.active {
opacity: 1;
}
}
}
.tabbar-box-wrap {
position: absolute;
width: 100%;
padding: 50upx;
box-sizing: border-box;
bottom: 0;
left: 0;
.tabbar-box {
position: relative;
display: flex;
width: 100%;
background: #fff;
border-radius: 20upx;
padding: 15upx 20upx;
box-sizing: border-box;
z-index: 2;
box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.1);
&:after {
content: '';
position: absolute;
bottom: -16upx;
left: 0;
right: 0;
margin: auto;
width: 50upx;
height: 50upx;
transform: rotate(45deg);
background: #fff;
z-index: 1;
box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.1);
border-radius: 2px;
}
&:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #ffffff;
border-radius: 20upx;
z-index: 2;
}
.tabbar-box-item {
// position: relative;
width: 100%;
z-index: 3;
margin: 10upx;
color: $uni-color-subtitle;
text-align: center;
font-size: $uni-font-size-base;
.box-image {
width: 100%;
height: $uni-img-size-lg;
}
}
}
}
</style>
+160
View File
@@ -0,0 +1,160 @@
<template>
<view class="content">
<!-- 一般用法 -->
<view class="example-body">
<uni-grid :column="3">
<uni-grid-item v-for="(item, index) in list" :index="index" :key="index">
<view class="grid-item-box" @click="openURL(item)">
<span :class="'iconfont ' + item.icon" :style="'color:' + item.icon_color"></span>
<text class="text">{{ item.text }}</text>
<view v-if="item.badge" class="grid-dot">
<uni-badge :text="item.badge" :type="item.type" />
</view>
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
</template>
<script>
import uniGrid from "@/components/uni-grid/uni-grid.vue"
import uniGridItem from "@/components/uni-grid-item/uni-grid-item.vue"
import uniBadge from '@/components/uni-badge/uni-badge.vue'
export default {
components: {uniGrid,uniGridItem,uniBadge},
data() {
return {
list: [{
url: '/pages/app/saleOrder/index',
icon: 'icon-icon_dispose',
text: '销售订单',
icon_color: '#007aff',
access: 1,
// badge: '0',
type: "primary"
},{
url: '/pages/app/article/index',
icon: 'icon-icon_notice',
icon_color: '#22ac38',
text: '新闻公告',
access: 1,
// badge: '0',
type: "success"
},
{
url: '/pages/app/delivery/index',
icon: 'icon-icon_send',
icon_color: '#ff9900',
text: '发货列表',
access: 1,
// badge: '0',
type: "warning"
},{
url: '/pages/app/promotion/index',
icon: 'icon-icon_nomemo',
icon_color: '#22ac38',
text: '促销列表',
access: 1,
// badge: '0',
type: "warning"
},{
url: '/pages/app/approach/index',
icon: 'icon-icon_synergy',
icon_color: '#007aff',
text: '进店列表',
access: 1,
// badge: '0',
type: "warning"
},{
url: '/pages/app/workflow/index',
icon: 'icon-icon_subordinate',
icon_color: '#9370DB',
access: 1,
text: '工作流程',
//badge: '0',
type: "warning"
},{
url: '/pages/app/workflow/index',
icon: 'icon-icon_task_done',
icon_color: '#007aff',
access: 1,
text: '工作任务',
// badge: '0',
type: "warning"
},{
url: '/pages/app/workflow/index',
icon: 'icon-icon_calendar',
icon_color: '#ff9900',
access: 1,
text: '个人日程',
// badge: '0',
type: "warning"
},{
url: '/pages/app/workflow/index',
icon: 'icon-icon_group',
icon_color: '#22ac38',
access: 1,
text: '客户列表',
// badge: '0',
type: "warning"
}
]
}
},
onLoad() {
},
methods: {
openURL(item) {
uni.navigateTo({
url: item.url
});
}
}
}
</script>
<style>
view {
font-size: 14px;
line-height: inherit;
}
.content {
text-align: center;
padding: 15rpx;
}
.image {
width: 50rpx;
height: 50rpx;
}
.text {
font-size: 26rpx;
margin-top: 10rpx;
color: #666;
}
.grid-dynamic-box {
margin-bottom: 15px;
}
.grid-item-box {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px 0;
}
.grid-item-box .iconfont {
font-size: 80rpx;
}
.grid-dot {
position: absolute;
top: 5px;
right: 15px;
}
</style>