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
47b144a0
Commit
47b144a0
authored
May 18, 2023
by
tangfh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
f391fe76
Pipeline
#252
failed with stages
Changes
5
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
488 additions
and
9 deletions
+488
-9
base-page.vue
pages/template/base-page.vue
+4
-6
base-tab.vue
pages/template/base-tab.vue
+2
-3
common.scss
static/common.scss
+0
-0
constant.js
utils/constant.js
+54
-0
util.js
utils/util.js
+428
-0
No files found.
pages/template/base-page.vue
View file @
47b144a0
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
@
refresherrefresh=
"onRefresh"
@
scrolltolower=
"onLoadMore"
:refresher-triggered=
"refresherTriggered"
@
refresherrefresh=
"onRefresh"
@
scrolltolower=
"onLoadMore"
:refresher-triggered=
"refresherTriggered"
:style=
"
{'height':(scrollViewHeight+'px')}">
:style=
"
{'height':(scrollViewHeight+'px')}">
<view
class=
"flex-column"
v-if=
"items.length > 0"
:style=
"
{'min-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
"
<
view
class=
"view-tmp1 active"
v-for=
"(item, index) in tab.data"
:index=
"index"
:key=
"index
"
@
onItemClick=
"onItemClick"
></repair-order-item
>
:item=
"item"
@
onItemClick=
"onItemClick"
></view
>
</view>
</view>
<c-empty
v-if=
"items.length == 0"
@
onEmptyClick=
"onEmptyClick"
></c-empty>
<c-empty
v-if=
"items.length == 0"
@
onEmptyClick=
"onEmptyClick"
></c-empty>
<uni-load-more
:status=
"loadMoreViewStatus"
:icon-size=
"16"
v-if=
"items.length > 0"
<uni-load-more
:status=
"loadMoreViewStatus"
:icon-size=
"16"
v-if=
"items.length > 0"
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
repair_constant
from
'./../../utils/repair_constant.js'
import
constant
from
'./../../utils/constant.js'
import
constant
from
'./../../utils/constant.js'
import
util
from
'./../../utils/util.js'
import
util
from
'./../../utils/util.js'
export
default
{
export
default
{
...
@@ -51,8 +50,7 @@
...
@@ -51,8 +50,7 @@
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
util
.
showRequestLoading
()
this
.
onRefresh
()
this
.
getList
()
},
},
onNavBarLeftClick
()
{
onNavBarLeftClick
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
...
@@ -89,7 +87,7 @@
...
@@ -89,7 +87,7 @@
},
},
getList
()
{
getList
()
{
this
.
page
=
this
.
page
>
this
.
total_page
?
this
.
total_page
:
this
.
page
;
this
.
page
=
this
.
page
>
this
.
total_page
?
this
.
total_page
:
this
.
page
;
let
url
=
repair_constant
.
URLS
.
getList
;
let
url
=
""
;
let
param
=
{
let
param
=
{
channel
:
this
.
channel
,
channel
:
this
.
channel
,
page
:
this
.
page
page
:
this
.
page
...
...
pages/template/base-tab.vue
View file @
47b144a0
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
@
scrolltolower=
"loadMore(index)"
:style=
"
{height: (swiperHeight) + 'px'}">
@
scrolltolower=
"loadMore(index)"
:style=
"
{height: (swiperHeight) + 'px'}">
<view
class=
"flex-column"
v-if=
"tab.data.length > 0"
:style=
"
{'min-height': (svHeight + 'rpx')}">
<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"
<view
class=
"view-tmp1 active"
v-for=
"(item2, index2) in tab.data"
:index=
"index2"
:key=
"index2"
:item=
"item2"
@
onItemClick=
"onItemClick"
></
repair-order-item
>
:item=
"item2"
@
onItemClick=
"onItemClick"
></
view
>
</view>
</view>
<c-empty
v-if=
"tab.data.length == 0"
@
onEmptyClick=
"onEmptyClick"
></c-empty>
<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"
<uni-load-more
:status=
"tab.loadStatus"
:icon-size=
"16"
v-if=
"tab.isLoading || tab.data.length > 0"
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
repair_constant
from
'./../../utils/repair_constant.js'
import
constant
from
'./../../utils/constant.js'
import
constant
from
'./../../utils/constant.js'
import
util
from
'./../../utils/util.js'
import
util
from
'./../../utils/util.js'
// 缓存每页最多
// 缓存每页最多
...
@@ -158,7 +157,7 @@
...
@@ -158,7 +157,7 @@
this
.
getList
(
this
.
tabIndex
)
this
.
getList
(
this
.
tabIndex
)
},
},
getList
(
index
)
{
getList
(
index
)
{
let
url
=
repair_constant
.
URLS
.
allocList
;
let
url
=
""
;
let
param
=
{
let
param
=
{
channel
:
this
.
tabList
[
index
].
channel
,
channel
:
this
.
tabList
[
index
].
channel
,
keywords
:
""
,
keywords
:
""
,
...
...
static/common.css
→
static/common.
s
css
View file @
47b144a0
File moved
utils/constant.js
0 → 100644
View file @
47b144a0
// Environment
const
IS_RELEASE
=
false
;
const
BASR_URL_TEST
=
"https://wxmishang-test-api.guoguodz.com"
;
const
BASR_URL_RELEASE
=
"https://ticketapi.guoguodz.com"
;
const
BASE_URL_DEV_TEST
=
BASR_URL_TEST
+
"/v1"
;
// Test Develop
// const BASE_URL_DEV_TEST = "http://ticket-test-api.guoguodz.com/v2/api/" // Test Develop
const
BASE_URL_RELEASE
=
BASR_URL_RELEASE
+
"/v1"
;
// Release
const
SECRET_KEY_DEV_TEST
=
"xJLj0sb71w78sdf045"
;
const
SECRET_KEY_RELEASE
=
"xJLj0sb71w78sdf045"
;
const
LOOP
=
true
;
const
IFTRUE
=
!
IS_RELEASE
;
const
BASE_URL
=
IS_RELEASE
?
BASE_URL_RELEASE
:
BASE_URL_DEV_TEST
;
const
SECRET_KEY
=
IS_RELEASE
?
SECRET_KEY_RELEASE
:
SECRET_KEY_DEV_TEST
;
const
KEY_USER
=
'USER'
;
const
KEY_SECRET
=
'SECRET'
;
const
KEY_SESSION_ID
=
'SESSION_ID'
;
const
LOAD_STATUS
=
{
more
:
'more'
,
loading
:
'loading'
,
noMore
:
'noMore'
};
const
LOAD_TEXTS
=
{
contentdown
:
'上拉加载更多'
,
contentrefresh
:
'加载中'
,
contentnomore
:
'没有更多~'
};
const
IS_VERIFY
=
{
};
//弹窗显示的位置
const
C_POP_DIRECTIONS
=
{
center
:
"center"
,
//正中间
centerTop
:
"centerTop"
,
//中间往上一点的位置
bottom
:
"bottom"
,
//最底部
}
export
default
{
// KEY
KEY_USER
,
KEY_SECRET
,
KEY_SESSION_ID
,
SECRET_KEY
,
BASE_URL
,
LOAD_STATUS
,
LOAD_TEXTS
,
LOOP
,
IS_VERIFY
,
C_POP_DIRECTIONS
,
}
\ No newline at end of file
utils/util.js
0 → 100644
View file @
47b144a0
This diff is collapsed.
Click to expand it.
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