Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
U
uni-app-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tangfh
uni-app-base
Commits
f391fe76
Commit
f391fe76
authored
May 18, 2023
by
tangfh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
0e781c3e
Pipeline
#251
canceled with stages
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
940 additions
and
13 deletions
+940
-13
App.vue
App.vue
+6
-2
manifest.json
manifest.json
+4
-2
base-page.vue
pages/template/base-page.vue
+148
-0
base-tab.vue
pages/template/base-tab.vue
+367
-0
base-tabbar-page.vue
pages/template/base-tabbar-page.vue
+85
-0
common.css
static/common.css
+296
-4
uni.scss
uni.scss
+34
-5
No files found.
App.vue
View file @
f391fe76
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
/*每个页面公共css */
/*每个页面公共css */
@import
'@/static/common.scss'
;
page
{
background-color
:
#fafafc
;
}
</
style
>
</
style
>
\ No newline at end of file
manifest.json
View file @
f391fe76
...
@@ -50,9 +50,11 @@
...
@@ -50,9 +50,11 @@
"quickapp"
:
{},
"quickapp"
:
{},
/*
小程序特有相关
*/
/*
小程序特有相关
*/
"mp-weixin"
:
{
"mp-weixin"
:
{
"appid"
:
""
,
"appid"
:
"
wx4d5084992a8778c0
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
"urlCheck"
:
false
,
"minified"
:
true
,
"postcss"
:
true
},
},
"usingComponents"
:
true
"usingComponents"
:
true
},
},
...
...
pages/template/base-page.vue
0 → 100644
View file @
f391fe76
<
template
>
<view
class=
"content"
>
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<uni-nav-bar
ref=
"navBar"
class=
"uni-navi-bar"
status-bar=
"true"
:border=
"false"
color=
"#333333"
fixed=
"true"
left-icon=
"left"
left-text=
"返回"
:title=
"title"
@
clickLeft=
"onNavBarLeftClick"
>
</uni-nav-bar>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
enable-back-to-top=
"true"
:refresher-enabled=
"refresherEnabled"
@
refresherrefresh=
"onRefresh"
@
scrolltolower=
"onLoadMore"
:refresher-triggered=
"refresherTriggered"
:style=
"
{'height':(scrollViewHeight+'px')}">
<view
class=
"flex-column"
v-if=
"items.length > 0"
:style=
"
{'min-height': (scrollViewHeight + 'px')}">
<repair-order-item
v-for=
"(item, index) in items"
:index=
"index"
:key=
"index"
:item=
"item"
@
onItemClick=
"onItemClick"
></repair-order-item>
</view>
<c-empty
v-if=
"items.length == 0"
@
onEmptyClick=
"onEmptyClick"
></c-empty>
<uni-load-more
:status=
"loadMoreViewStatus"
:icon-size=
"16"
v-if=
"items.length > 0"
:content-text=
"loadMoreViewContentText"
/>
</scroll-view>
<text
class=
"text-bottom-btn"
@
click=
"onBottomBtnClick"
>
我要报修
</text>
</view>
</
template
>
<
script
>
import
repair_constant
from
'./../../utils/repair_constant.js'
import
constant
from
'./../../utils/constant.js'
import
util
from
'./../../utils/util.js'
export
default
{
data
()
{
return
{
title
:
'标题'
,
navBarHeight
:
0
,
scrollViewHeight
:
1000
,
refresherEnabled
:
true
,
refresherTriggered
:
false
,
loadMoreViewContentText
:
{
contentnomore
:
"到底啦~"
},
loadMoreViewStatus
:
'noMore'
,
page
:
1
,
total_page
:
1
,
items
:
[],
channel
:
"ongoning"
}
},
onLoad
()
{
var
systemInfo
=
uni
.
getSystemInfoSync
();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this
.
scrollViewHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
)
-
90
/
getApp
().
globalData
.
pxToRpxScale
;
this
.
init
();
},
methods
:
{
init
()
{
util
.
showRequestLoading
()
this
.
getList
()
},
onNavBarLeftClick
()
{
uni
.
navigateBack
();
},
refreshInit
()
{
this
.
page
=
1
;
this
.
total_pagetotal_page
=
1
;
this
.
status
=
'noMore'
;
},
onEmptyClick
()
{
this
.
onRefresh
();
},
onRefresh
(
e
)
{
this
.
refresherTriggered
=
true
;
this
.
refreshInit
();
this
.
getList
();
},
onLoadMore
(
e
)
{
if
(
'noMore'
==
this
.
status
)
{
return
;
}
this
.
status
=
'loading'
;
this
.
getList
();
},
onBottomBtnClick
()
{
uni
.
navigateTo
({
url
:
"/pages/repair-apply/repair-apply"
})
},
onItemClick
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/repair-detail/repair-detail"
})
},
getList
()
{
this
.
page
=
this
.
page
>
this
.
total_page
?
this
.
total_page
:
this
.
page
;
let
url
=
repair_constant
.
URLS
.
getList
;
let
param
=
{
channel
:
this
.
channel
,
page
:
this
.
page
};
let
option
=
{
isNeedShowLoading
:
false
};
util
.
request
(
url
,
param
,
this
.
requestCallback
,
this
.
requestComplete
,
option
);
},
requestCallback
(
res
)
{
if
(
res
.
statusCode
!=
200
)
{
return
;
}
let
data
=
res
.
data
.
data
;
let
list
=
data
.
list
;
try
{
this
.
page
++
;
this
.
total_page
=
data
.
total_list
;
}
catch
(
e
)
{
this
.
total_page
=
1
;
console
.
log
(
e
);
}
if
(
this
.
refresherTriggered
||
this
.
isOnFilter
||
this
.
items
.
length
==
0
)
{
this
.
items
=
list
;
this
.
status
=
this
.
total_page
==
1
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
}
else
if
(
this
.
status
==
'loading'
)
{
if
(
list
.
length
>
0
)
{
this
.
items
=
this
.
items
.
concat
(
list
);
}
}
},
requestComplete
()
{
if
(
this
.
refresherTriggered
)
{
this
.
refresherTriggered
=
false
;
if
(
this
.
total_page
>
1
)
{
this
.
status
=
constant
.
LOAD_STATUS
.
more
;
}
}
else
if
(
this
.
status
==
constant
.
LOAD_STATUS
.
loading
)
{
if
(
this
.
page
>
this
.
total_page
)
{
this
.
status
=
constant
.
LOAD_STATUS
.
noMore
;
this
.
page
=
this
.
total_page
}
else
{
this
.
status
=
constant
.
LOAD_STATUS
.
more
;
}
}
uni
.
hideLoading
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.image-fashion-logo
{
width
:
136rpx
;
}
</
style
>
\ No newline at end of file
pages/template/base-tab.vue
0 → 100644
View file @
f391fe76
<
template
>
<view
class=
"content"
>
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<uni-nav-bar
ref=
"navBar"
class=
"uni-navi-bar"
status-bar=
"true"
:border=
"false"
color=
"#333333"
fixed=
"true"
left-icon=
"left"
left-text=
"返回"
:title=
"title"
@
clickLeft=
"onNavBarLeftClick"
>
</uni-nav-bar>
<c-tab-bar
:tabBars=
"tabBars"
:tabIndex=
"tabIndex"
:tabWidth=
"tabWidth"
:scrollInto=
"scrollInto"
:marginL=
"tabItemMargin"
:marginR=
"tabItemMargin"
@
onTabItemClick=
"onTabItemClick"
></c-tab-bar>
<swiper
:current=
"tabIndex"
class=
"swiper-box"
:duration=
"300"
@
change=
"onTabChange"
:style=
"
{height: swiperHeight + 'px'}">
<swiper-item
class=
"swiper-item"
v-for=
"(tab,index) in tabList"
:key=
"index"
>
<scroll-view
class=
"scroll-v"
scroll-y
:refresher-enabled=
"true"
@
refresherrefresh=
"onRefresh()"
:enable-back-to-top=
"true"
:lower-threshold=
"75"
:refresher-triggered=
"tab.refreshing"
@
scrolltolower=
"loadMore(index)"
:style=
"
{height: (swiperHeight) + 'px'}">
<view
class=
"flex-column"
v-if=
"tab.data.length > 0"
:style=
"
{'min-height': (svHeight + 'rpx')}">
<view
class=
"view-tmp1 active"
v-for=
"(item2, index2) in tab.data"
:index=
"index2"
:key=
"index2"
:item=
"item2"
@
onItemClick=
"onItemClick"
></repair-order-item>
</view>
<c-empty
v-if=
"tab.data.length == 0"
@
onEmptyClick=
"onEmptyClick"
></c-empty>
<uni-load-more
:status=
"tab.loadStatus"
:icon-size=
"16"
v-if=
"tab.isLoading || tab.data.length > 0"
:content-text=
"loadMoreViewContentText"
/>
</scroll-view>
</swiper-item>
</swiper>
</view>
</
template
>
<
script
>
import
repair_constant
from
'./../../utils/repair_constant.js'
import
constant
from
'./../../utils/constant.js'
import
util
from
'./../../utils/util.js'
// 缓存每页最多
const
MAX_CACHE_DATA
=
100
;
// 缓存页签数量
const
MAX_CACHE_PAGE
=
3
;
const
REPAIR_LIST_TYPE
=
{
wait_alloc
:
{
type
:
1
,
text
:
'alloc'
,
},
alloced
:
{
type
:
2
,
text
:
'alloced'
,
}
};
export
default
{
data
()
{
return
{
title
:
'报修单分配'
,
navBarHeight
:
0
,
scrollViewHeight
:
1000
,
refresherTriggered
:
false
,
loadMoreViewShow
:
false
,
loadMoreViewContentText
:
{
contentnomore
:
"到底啦~"
},
loadMoreViewStatus
:
'noMore'
,
tabList
:
[],
cacheTab
:
[],
tabIndex
:
0
,
tabBars
:
[{
name
:
'待分配(0)'
,
type
:
REPAIR_LIST_TYPE
.
wait_alloc
.
type
},
{
name
:
'已分配(0)'
,
type
:
REPAIR_LIST_TYPE
.
alloced
.
type
}],
tabItemMargin
:
30
,
//tabItem第一个margin-left和最后一个margin-right的margin
tabWidth
:
0
,
scrollInto
:
""
,
swiperHeight
:
1000
,
svHeight
:
1000
,
loadTexts
:
{
contentdown
:
'上拉加载更多'
,
contentrefresh
:
'加载中'
,
contentnomore
:
'没有更多~'
},
seletedItem
:
{
range_name
:
""
},
itemTmp
:
{
title
:
"内部报修"
,
statusAlias
:
"抢单中"
,
order_sn
:
"SN2023050813"
,
date
:
"2023-05-06-08 13:16"
,
item
:
"公共照明"
,
}
}
},
onLoad
()
{
var
systemInfo
=
uni
.
getSystemInfoSync
();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this
.
scrollViewHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
);
this
.
swiperHeight
=
this
.
scrollViewHeight
-
(
80
)
/
getApp
().
globalData
.
pxToRpxScale
;
this
.
svHeight
=
this
.
swiperHeight
;
this
.
tabWidth
=
(
getApp
().
globalData
.
screenWidth
-
this
.
tabItemMargin
*
2
)
/
this
.
tabBars
.
length
;
var
_this
=
this
;
setTimeout
(()
=>
{
_this
.
tabBars
.
forEach
((
tabBar
)
=>
{
var
tab
=
{
data
:
[],
isLoading
:
false
,
refreshing
:
false
,
refreshFlag
:
true
,
loadMoreFlag
:
true
,
loadStatus
:
constant
.
LOAD_STATUS
.
loading
,
page
:
1
,
total_pages
:
1
,
loadingText
:
'加载更多...'
,
isRequestComplete
:
false
,
channel
:
""
};
if
(
tabBar
.
type
==
REPAIR_LIST_TYPE
.
wait_alloc
.
type
)
{
tab
.
limit
=
10
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
total_pages
=
1
;
tab
.
data
.
push
([{},{},{}]);
tab
.
channel
=
REPAIR_LIST_TYPE
.
wait_alloc
.
text
}
else
if
(
tabBar
.
type
==
REPAIR_LIST_TYPE
.
alloced
.
type
)
{
tab
.
limit
=
5
;
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
more
;
tab
.
total_pages
=
1
;
tab
.
data
.
push
([{},{},{},{},{},{}]);
tab
.
channel
=
REPAIR_LIST_TYPE
.
alloced
.
text
}
if
(
tab
.
total_pages
==
1
)
{
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
noMore
;
tab
.
loadingText
=
_this
.
loadTexts
.
contentnomore
;
}
_this
.
tabList
.
push
(
tab
);
});
_this
.
onRefresh
();
},
350
)
//this.loadTexts = this.$constant.LOAD_TEXTS;
},
methods
:
{
onNavBarLeftClick
()
{
uni
.
navigateBack
();
},
onEmptyClick
()
{
this
.
onRefresh
();
},
onRefresh
(
e
)
{
var
tab
=
this
.
tabList
[
this
.
tabIndex
];
if
(
!
tab
.
refreshFlag
)
{
return
;
}
tab
.
page
=
1
;
setTimeout
(
function
()
{
tab
.
refreshing
=
true
;
},
30
);
tab
.
loadStatus
=
tab
.
page
==
tab
.
total_pages
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
this
.
getList
(
this
.
tabIndex
)
},
getList
(
index
)
{
let
url
=
repair_constant
.
URLS
.
allocList
;
let
param
=
{
channel
:
this
.
tabList
[
index
].
channel
,
keywords
:
""
,
search_status
:
""
,
page
:
this
.
tabList
[
index
].
page
};
let
option
=
{
isNeedShowLoading
:
false
};
util
.
request
(
url
,
param
,
this
.
requestCallback
,
null
,
option
);
},
requestCallback
(
res
)
{
var
tab
=
this
.
tabList
[
this
.
tabIndex
];
if
(
res
.
statusCode
!=
200
)
{
tab
.
refreshing
=
false
;
tab
.
isRequestComplete
=
true
;
return
;
}
let
data
=
res
.
data
.
data
;
tab
.
refreshing
=
false
;
tab
.
isRequestComplete
=
true
;
this
.
clearTabData
(
this
.
tabIndex
);
let
tabBars
=
[{
name
:
'待分配('
+
data
.
channel_ct
.
alloc
+
')'
,
type
:
REPAIR_LIST_TYPE
.
wait_alloc
.
type
},
{
name
:
'已分配('
+
data
.
channel_ct
.
alloced
+
')'
,
type
:
REPAIR_LIST_TYPE
.
alloced
.
type
}];
this
.
tabBars
=
tabBars
;
const
dayjs
=
require
(
"dayjs"
);
data
.
list
.
forEach
((
item
,
index
)
=>
{
item
.
addtimeformat
=
dayjs
.
unix
(
item
.
addtime
).
format
(
"YYYY-MM-DD HH:mm"
)
})
this
.
tabList
[
this
.
tabIndex
].
data
=
this
.
tabList
[
this
.
tabIndex
].
data
.
concat
(
data
.
list
);
},
onLoadMore
(
e
)
{
var
_this
=
this
;
_this
.
loadMoreViewShow
=
true
;
setTimeout
(()
=>
{
_this
.
loadMoreViewShow
=
false
;
},
1000
)
},
onTabItemClick
(
index
)
{
this
.
switchTab
(
index
);
},
onTabChange
(
e
)
{
if
(
this
.
tabList
[
this
.
tabIndex
].
data
.
length
>
0
)
{
return
;
}
let
index
=
e
.
target
.
current
||
e
.
detail
.
current
;
this
.
switchTab
(
index
);
this
.
getList
(
index
);
},
switchTab
(
index
)
{
if
(
this
.
tabIndex
===
index
)
{
return
;
}
// 缓存 tabId
if
(
this
.
tabList
[
this
.
tabIndex
].
data
.
length
>
MAX_CACHE_DATA
)
{
let
isExist
=
this
.
cacheTab
.
indexOf
(
this
.
tabIndex
);
if
(
isExist
<
0
)
{
this
.
cacheTab
.
push
(
this
.
tabIndex
);
//console.log("cache index:: " + this.tabIndex);
}
}
this
.
tabIndex
=
index
;
this
.
scrollInto
=
this
.
tabBars
[
index
].
id
;
// 释放 tabId
if
(
this
.
cacheTab
.
length
>
MAX_CACHE_PAGE
)
{
let
cacheIndex
=
this
.
cacheTab
[
0
];
this
.
clearTabData
(
cacheIndex
);
this
.
cacheTab
.
splice
(
0
,
1
);
//console.log("remove cache index:: " + cacheIndex);
}
},
clearTabData
(
cacheIndex
)
{
this
.
tabList
[
cacheIndex
].
data
.
length
=
0
;
this
.
tabList
[
cacheIndex
].
loadingText
=
"加载更多..."
;
},
loadMore
(
e
)
{
var
tab
=
this
.
tabList
[
this
.
tabIndex
];
if
(
!
tab
.
loadMoreFlag
||
tab
.
loadStatus
==
constant
.
LOAD_STATUS
.
noMore
)
{
return
;
}
tab
.
loadStatus
=
constant
.
LOAD_STATUS
.
loading
;
setTimeout
(()
=>
{
//this.getList(this.tabIndex);
tab
.
page
+=
1
;
tab
.
loadStatus
=
tab
.
page
>
tab
.
total_pages
?
constant
.
LOAD_STATUS
.
noMore
:
constant
.
LOAD_STATUS
.
more
;
},
500
)
},
onItemClick
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/repair-detail/repair-detail'
})
},
ensure
()
{
uni
.
$emit
(
"onRepairItemSelected"
,
this
.
seletedItem
)
uni
.
navigateBack
();
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
url('../../static/common.scss')
;
.image-fashion-logo
{
width
:
136rpx
;
}
/* #ifndef APP-PLUS */
page
{
width
:
100%
;
min-height
:
100%
;
display
:
flex
;
}
/* #endif */
.tabs
{
flex
:
1
;
flex-direction
:
column
;
overflow
:
hidden
;
background-color
:
#ffffff
;
/* #ifndef APP-PLUS */
height
:
100vh
;
/* #endif */
}
.scroll-v
{
background
:
#F6F7FB
;
}
.loading-icon
{
width
:
20px
;
height
:
20px
;
margin-right
:
5px
;
color
:
#999999
;
}
.loading-more
{
align-items
:
center
;
justify-content
:
center
;
padding-top
:
10px
;
padding-bottom
:
10px
;
text-align
:
center
;
}
.loading-more-text
{
font-size
:
28rpx
;
color
:
#999
;
}
c-tab-bar
{
background-color
:
#ffffff
;
}
.checkbox
{}
.view-repair-item
{
height
:
80rpx
;
padding-left
:
32rpx
;
padding-right
:
32rpx
;
justify-content
:
center
;
align-items
:
center
;
}
.text-name
{
flex-grow
:
1
;
font-size
:
26rpx
;
color
:
$uni-text-color-grey
;
font-size
:
$uni-font-size-base
;
}
.view-bottom
{
padding-left
:
32rpx
;
width
:
100%
;
height
:
90rpx
;
flex-grow
:
1
;
align-items
:
center
;
}
.view-bottom-left
{
flex-grow
:
1
;
}
.text-bottom-prefix1
{
font-size
:
20rpx
;
color
:
$uni-text-color-grey
;
}
.text-ensure-btn
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
260rpx
;
height
:
100%
;
background-color
:
$main-colro1
;
}
</
style
>
\ No newline at end of file
pages/template/base-tabbar-page.vue
0 → 100644
View file @
f391fe76
<
template
>
<view
class=
"content"
>
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<uni-nav-bar
ref=
"navBar"
class=
"uni-navi-bar"
status-bar=
"true"
border=
"false"
color=
"#333333"
fixed=
"true"
>
<template
v-slot:left
>
<image
class=
"image-fashion-logo"
src=
"../../static/icon_fashion.png"
mode=
"widthFix"
@
click=
"onFashionLogoClick"
></image>
</
template
>
</uni-nav-bar>
<scroll-view
class=
"scroll-view"
scroll-y=
"true"
enable-back-to-top=
"true"
refresher-enabled=
"true"
@
refresherrefresh=
"onRefresh"
@
scrolltolower=
"onLoadMore"
:refresher-triggered=
"refresherTriggered"
:style=
"{'height':(scrollViewHeight+'px')}"
>
<view
class=
"view-tmp1"
v-for=
"(item,index) in items"
:key=
"index"
@
click=
"onItemClick(index)"
></view>
<uni-load-more
:status=
"loadMoreViewStatus"
:icon-size=
"16"
v-if=
"loadMoreViewShow"
:content-text=
"loadMoreViewContentText"
/>
</scroll-view>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
title
:
'首页'
,
navBarHeight
:
0
,
scrollViewHeight
:
1000
,
refresherTriggered
:
false
,
loadMoreViewShow
:
false
,
loadMoreViewContentText
:
{
contentnomore
:
"到底啦~"
},
loadMoreViewStatus
:
'noMore'
,
items
:
[{},{},{},{},{},{}]
}
},
onLoad
()
{
var
systemInfo
=
uni
.
getSystemInfoSync
();
//scroll-view的高度 = 屏幕高度 -(顶部状态栏高度 + 导航栏高度) -(底部tabBar高度 + 底部安全区域高度)
this
.
scrollViewHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
+
44
);
this
.
init
();
},
methods
:
{
init
()
{
uni
.
setTabBarBadge
({
index
:
0
,
text
:
"6"
});
uni
.
showTabBarRedDot
({
index
:
2
})
},
onFashionLogoClick
()
{
uni
.
showToast
({
title
:
"fashion"
})
},
onRefresh
(
e
)
{
console
.
log
(
e
);
var
_this
=
this
;
_this
.
refresherTriggered
=
true
;
setTimeout
(()
=>
{
_this
.
refresherTriggered
=
false
;
},
1000
)
},
onLoadMore
(
e
)
{
var
_this
=
this
;
_this
.
loadMoreViewShow
=
true
;
// setTimeout(() => {
// _this.loadMoreViewShow = false;
// }, 1000)
},
onItemClick
(
index
)
{
uni
.
navigateTo
({
url
:
'/pages/login/login?index='
+
index
})
}
}
}
</
script
>
<
style
>
@import
url('../../static/common.css')
;
.image-fashion-logo
{
width
:
136
rpx
;
}
</
style
>
\ No newline at end of file
static/common.css
View file @
f391fe76
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
/* justify-content: center; */
}
}
.view-status-bar
{
.view-status-bar
{
...
@@ -13,15 +13,56 @@
...
@@ -13,15 +13,56 @@
.uni-navi-bar
{
.uni-navi-bar
{
width
:
100%
;
width
:
100%
;
color
:
#333333
;
color
:
#333333
;
background-color
:
#fafafc
;
}
input
{
flex-grow
:
1
;
height
:
100%
;
font-size
:
$
uni-font-size-base
;
}
.flex-column
{
display
:
flex
;
flex-direction
:
column
;
}
.flex-row
{
display
:
flex
;
flex-direction
:
row
;
}
.flex-column
{
display
:
flex
;
flex-direction
:
column
;
}
.com-lr-padding
{
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
}
.com-lr-padding-marginbottom
{
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
margin-bottom
:
16
rpx
;
}
}
.view-tmp1
{
.view-tmp1
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
background-color
:
#FFCCCC
;
background-color
:
#FFCCCC
;
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
.view-tmp2
{
.view-tmp2
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
background-color
:
#CCFFCC
;
background-color
:
#CCFFCC
;
...
@@ -29,6 +70,9 @@
...
@@ -29,6 +70,9 @@
}
}
.view-tmp3
{
.view-tmp3
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
background-color
:
#99CCFF
;
background-color
:
#99CCFF
;
...
@@ -36,12 +80,260 @@
...
@@ -36,12 +80,260 @@
}
}
.view-tmp4
{
.view-tmp4
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
width
:
100%
;
height
:
300
rpx
;
height
:
300
rpx
;
background-color
:
#
CCCCCC
;
background-color
:
#
EAEAEA
;
margin-bottom
:
10
rpx
;
margin-bottom
:
10
rpx
;
}
}
.scroll-view
{
.scroll-view
{
height
:
1000
rpx
;
height
:
1000
rpx
;
}
}
.line
{
width
:
100%
;
height
:
1
rpx
;
background-color
:
#EBEBEB
;
}
.view-menu-item
{
padding-top
:
32
rpx
;
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
}
.view-menu-item
:active
{
background-color
:
#f5f5f5
;
}
.active
:active
{
background-color
:
#f5f5f5
;
}
.view-menu-item-content
{
align-items
:
center
;
margin-bottom
:
32
rpx
;
}
.view-menu-item-image
{
width
:
50
rpx
;
height
:
50
rpx
;
margin-right
:
$
uni-font-size-sm
;
}
.image-jump
{
width
:
50
rpx
;
height
:
50
rpx
;
}
.view-menu-item-text
{
flex-grow
:
1
;
}
.view-menu-item-line
{
margin-left
:
74
rpx
;
width
:
auto
;
}
.form-item
{
align-items
:
center
;
min-height
:
100
rpx
;
}
/* mishang-wg :start*/
.text-form-prefix
{
color
:
#666666
;
margin-right
:
32
rpx
;
min-width
:
95
rpx
;
display
:
flex
;
flex-shrink
:
0
;
font-size
:
$
uni-font-size-base
;
}
.form-item-padding
{
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
}
.form-item-margin
{}
.line-h
{
width
:
100%
;
height
:
1
rpx
;
background-color
:
#EBEBEB
;
}
.line-v
{
width
:
1
rpx
;
height
:
100%
;
background-color
:
#EBEBEB
;
}
.white-card
{
background-color
:
#FFFFFF
;
}
.swiper-box
{
/* flex: 1;
height: 100%; */
width
:
100%
;
}
.placeholder-class
{
color
:
#d1d1d1
;
/* font-weight: 200; */
}
.text-bottom-btn
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#F8C514
;
border-radius
:
10
rpx
;
margin-left
:
32
rpx
;
margin-right
:
32
rpx
;
height
:
90
rpx
;
width
:
90%
;
font-size
:
$
uni-font-size-base
;
}
.text-tag
{
background-color
:
#F8C514
;
color
:
#FFFFFF
;
font-size
:
20
rpx
;
border-radius
:
30
rpx
;
padding-left
:
16
rpx
;
padding-right
:
16
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
32
rpx
;
padding-bottom
:
0.5px
;
}
.text-tag-j
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#ffe6e6
;
color
:
#f46464
;
font-size
:
20
rpx
;
line-height
:
0
rpx
;
width
:
28
rpx
;
height
:
28
rpx
;
border-radius
:
5
rpx
;
border
:
#f46464
solid
1
rpx
;
flex-shrink
:
0
;
}
.sv-h
{
display
:
flex
;
flex-direction
:
row
;
width
:
auto
;
}
.view-base-info-row
{
align-items
:
center
;
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
margin-bottom
:
16
rpx
;
}
.text-title-prefix
{
display
:
flex
;
font-size
:
$
uni-font-size-base
;
color
:
$
com-text-color-grey
;
flex-shrink
:
0
;
}
.image-grid-pic
{
flex-shrink
:
0
;
display
:
flex
;
width
:
130
rpx
;
height
:
130
rpx
;
margin-right
:
16
rpx
;
margin-bottom
:
16
rpx
;
background-color
:
#ebebeb
;
}
.sv-grid
{
width
:
80%
;
height
:
276
rpx
;
flex-wrap
:
wrap
;
justify-content
:
start
;
margin-bottom
:
32
rpx
;
}
.view-grid-pic
{
padding-left
:
32
rpx
;
padding-right
:
32
rpx
;
flex-wrap
:
wrap
;
width
:
100%
;
height
:
auto
;
}
.text-normal
{
color
:
$
com-text-color-black
;
font-size
:
$
uni-font-size-base
;
flex-shrink
:
0
;
}
.text-normal-grey
{
color
:
$
com-text-color-grey
;
font-size
:
$
uni-font-size-base
;
flex-shrink
:
0
;
}
.text-tip1
{
background-color
:
#ebebeb
;
color
:
$
com-text-color-grey
;
font-size
:
$
uni-font-size-sm
;
display
:
flex
;
justify-content
:
center
;
}
.text-small
{
font-size
:
$
uni-font-size-sm
;
color
:
$
com-text-color-black
;
}
.text-small-666
{
font-size
:
$
uni-font-size-sm
;
color
:
$
com-text-color-666
;
}
.text-small-grey
{
font-size
:
$
uni-font-size-sm
;
color
:
$
com-text-color-grey
;
}
.text-smaller-grey
{
font-size
:
22
rpx
;
color
:
$
com-text-color-grey
;
}
.text-smaller-placeholder
{
font-size
:
$
uni-font-size-sm
;
color
:
$
com-text-color-placeholder
;
}
.text-blue
{
color
:
$
com-text-color-blue
;
}
.view-wrap-h
{
display
:
flex
;
flex-grow
:
1
;
}
.view-tip-small-row
{
display
:
flex
;
flex-direction
:
row
;
font-size
:
$
uni-font-size-sm
;
color
:
$
com-text-color-grey
;
}
.space-avg
{
flex-grow
:
1
;
}
.center-v
{
align-items
:
center
;
}
/* mishang-wg :end*/
uni.scss
View file @
f391fe76
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
/**
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
*
* 如果你的项目同样使用了
scss
预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
* 如果你的项目同样使用了
预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
*/
/* 颜色变量 */
/* 颜色变量 */
...
@@ -24,9 +24,14 @@ $uni-color-error: #dd524d;
...
@@ -24,9 +24,14 @@ $uni-color-error: #dd524d;
$uni-text-color
:
#333
;
//基本色
$uni-text-color
:
#333
;
//基本色
$uni-text-color-inverse
:
#fff
;
//反色
$uni-text-color-inverse
:
#fff
;
//反色
$uni-text-color-grey
:
#999
;
//辅助灰色,如加载更多的提示信息
$uni-text-color-grey
:
#999
;
//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder
:
#
808080
;
$uni-text-color-placeholder
:
#
d1d1d1
;
$uni-text-color-disable
:
#c0c0c0
;
$uni-text-color-disable
:
#c0c0c0
;
$coupon-text-color-tab-grey
:
rgba
(
44
,
37
,
67
,
0
.5
);
/* light/文本/次要、表单标题 */
$coupon-text-color-blue
:
#007AFF
;
/* light/文本/可点击 */
$coupon-text-color-deep-blue
:
#2C2543
;
/* light/主色/深蓝 */
$coupon-text-color-second
:
rgba
(
44
,
37
,
67
,
0
.5
);
/* 背景颜色 */
/* 背景颜色 */
$uni-bg-color
:
#ffffff
;
$uni-bg-color
:
#ffffff
;
$uni-bg-color-grey
:
#f8f8f8
;
$uni-bg-color-grey
:
#f8f8f8
;
...
@@ -39,9 +44,9 @@ $uni-border-color:#c8c7cc;
...
@@ -39,9 +44,9 @@ $uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 文字尺寸 */
$uni-font-size-sm
:
12
px
;
$uni-font-size-sm
:
26r
px
;
$uni-font-size-base
:
14
px
;
$uni-font-size-base
:
28r
px
;
$uni-font-size-lg
:
16
;
$uni-font-size-lg
:
32rpx
;
/* 图片尺寸 */
/* 图片尺寸 */
$uni-img-size-sm
:
20px
;
$uni-img-size-sm
:
20px
;
...
@@ -74,3 +79,27 @@ $uni-color-subtitle: #555555; // 二级标题颜色
...
@@ -74,3 +79,27 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle
:
26px
;
$uni-font-size-subtitle
:
26px
;
$uni-color-paragraph
:
#3F536E
;
// 文章段落颜色
$uni-color-paragraph
:
#3F536E
;
// 文章段落颜色
$uni-font-size-paragraph
:
15px
;
$uni-font-size-paragraph
:
15px
;
//分割线颜色
$com-line-1
:
#EBEBEB
;
//图片默认背景颜色
$com-bg-pic
:
#ebebeb
;
// 小程序主颜色
$main-colro1
:
#F8C514
;
//通用背景颜色
$com-bg-colro1
:
#FFCCCC
;
$com-bg-colro2
:
#CCFFCC
;
$com-bg-colro3
:
#99CCFF
;
$com-bg-colro4
:
#EAEAEA
;
$com-text-color-black
:
#333333
;
$com-text-color-666
:
#666
;
$com-text-color-grey
:
#999999
;
$com-text-color-blue
:
#478dc3
;
$com-text-color-pink
:
#ff8585
;
$com-text-color-placeholder
:
#d1d1d1
;
//边框颜色
$com-border-color-pink
:
#ff8585
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment