Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uni-app-ddh-shop
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
zhanhai
uni-app-ddh-shop
Commits
d107982b
Commit
d107982b
authored
Oct 11, 2024
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增首页和我的页面的埋点
parent
041cfa7f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1564 additions
and
1804 deletions
+1564
-1804
App.vue
App.vue
+15
-1
api.js
config/api.js
+8
-9
main.js
main.js
+2
-0
index.js
mixin/index.js
+59
-7
index.css
pages/index/index.css
+0
-339
index.vue
pages/index/index.vue
+351
-391
login.vue
pages/login/login.vue
+1
-1
index.vue
pages/my/index.vue
+55
-0
useFeed.vue
pages/useFeed/useFeed.vue
+34
-34
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+892
-898
app-view.js
unpackage/dist/dev/app-plus/app-view.js
+93
-92
index.js
utils/index.js
+41
-0
request.js
utils/request.js
+12
-29
route.js
utils/route.js
+1
-3
No files found.
App.vue
View file @
d107982b
<
script
>
<
script
>
import
{
switchShowTabbar
,
loadDevice
,
loadLocation
,
loadNetwork
,
loadUuid
}
from
'@/utils/index.js'
import
{
switchShowTabbar
,
loadDevice
,
loadLocation
,
loadNetwork
,
loadUuid
}
from
'@/utils/index.js'
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
// 手机型号
// 手机型号
...
@@ -26,6 +26,20 @@ export default {
...
@@ -26,6 +26,20 @@ export default {
}
}
}
}
// 当前版本号
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
wgtinfo
)
{
let
versionNumber
if
(
wgtinfo
.
version
)
{
versionNumber
=
wgtinfo
.
version
;
}
else
{
versionNumber
=
plus
.
runtime
.
version
;
}
// 存储所有请求的头部信息
uni
.
setStorage
({
key
:
'm-header-version'
,
data
:
versionNumber
});
})
/*** tabbar*/
/*** tabbar*/
switchShowTabbar
()
switchShowTabbar
()
},
},
...
...
config/api.js
View file @
d107982b
...
@@ -6,23 +6,23 @@
...
@@ -6,23 +6,23 @@
const
BASE
=
{
const
BASE
=
{
development
:
{
development
:
{
common
:
"http://portal.cloudsmake.cn"
,
common
:
"http://portal.cloudsmake.cn"
,
event
:
'http://118.31.124.88:21111'
,
h5
:
'http://192.168.0.23:8080/index.html#/loan'
h5
:
'http://192.168.0.23:8080/index.html#/loan'
},
},
stest
:
{
stest
:
{
common
:
"http://portal.cloudsmake.cn"
,
common
:
"http://portal.cloudsmake.cn"
,
event
:
'http://118.31.124.88:21111'
,
h5
:
'http://ddang-h5-s.rockstect.cn/index.html#/'
h5
:
'http://ddang-h5-s.rockstect.cn/index.html#/'
},
},
ltest
:
{
common
:
"https://dell-common-l.meimeiyouxin.com"
,
h5
:
''
},
gray
:
{
gray
:
{
common
:
"https://dell-common.meimeiyouxin.com"
,
common
:
"https://api.yyhock.com"
,
h5
:
'https://mmyx-h5-g.rockstect.com/index.html#/'
event
:
'https://event.jqtianxia.com'
,
h5
:
'https://ddang-h5-g.rockstect.cn/index.html#/'
},
},
prod
:
{
prod
:
{
common
:
"https://api.yyhock.com"
,
common
:
"https://api.yyhock.com"
,
h5
:
'https://mmyx-h5.rockstect.com/index.html#/'
event
:
'https://event.jqtianxia.com'
,
h5
:
'https://ddang.rockstect.com/index.html#/'
}
}
}
}
let
env
=
process
.
env
.
VUE_APP_BASE_NODE_ENV
let
env
=
process
.
env
.
VUE_APP_BASE_NODE_ENV
...
@@ -32,7 +32,6 @@ let env = process.env.VUE_APP_BASE_NODE_ENV
...
@@ -32,7 +32,6 @@ let env = process.env.VUE_APP_BASE_NODE_ENV
* APP打包运行需自定义环境env *
* APP打包运行需自定义环境env *
* development 开发环境 *
* development 开发环境 *
* stest S测试环境 *
* stest S测试环境 *
* ltest L测试环境
* gray 灰度环境 *
* gray 灰度环境 *
* prod 生产环境 *
* prod 生产环境 *
* ==========================
* ==========================
...
@@ -44,7 +43,7 @@ env = "stest";
...
@@ -44,7 +43,7 @@ env = "stest";
const
api
=
{
const
api
=
{
common
:
BASE
[
env
].
common
,
common
:
BASE
[
env
].
common
,
buyer
:
BASE
[
env
].
buyer
,
event
:
BASE
[
env
].
event
,
h5
:
BASE
[
env
].
h5
h5
:
BASE
[
env
].
h5
}
}
...
...
main.js
View file @
d107982b
...
@@ -9,7 +9,9 @@ import Modal from './components/modal/modal'
...
@@ -9,7 +9,9 @@ import Modal from './components/modal/modal'
import
goodsItem
from
'./components/goodsItem/index'
import
goodsItem
from
'./components/goodsItem/index'
import
upgradePopup
from
'./components/showModal/upgradePopup'
import
upgradePopup
from
'./components/showModal/upgradePopup'
import
request
from
'./utils/request.js'
import
request
from
'./utils/request.js'
import
*
as
utils
from
"./utils/index.js"
;
uni
.
$util
=
utils
;
Vue
.
component
(
'view-modal'
,
Modal
);
Vue
.
component
(
'view-modal'
,
Modal
);
Vue
.
component
(
'view-goods'
,
goodsItem
);
Vue
.
component
(
'view-goods'
,
goodsItem
);
Vue
.
component
(
'upgrade-Popup'
,
upgradePopup
);
Vue
.
component
(
'upgrade-Popup'
,
upgradePopup
);
...
...
mixin/index.js
View file @
d107982b
import
{
Jump
}
from
"../utils/route.js"
;
import
{
Jump
}
from
"@/utils/route.js"
;
import
api
from
'@/config/api.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isInitOk
:
false
,
isInitOk
:
false
,
// 如果页面开启了下拉刷新,用来判断关闭下拉刷新的
// 如果页面开启了下拉刷新,用来判断关闭下拉刷新的
isPullDownRefresh
:
false
isPullDownRefresh
:
false
}
}
},
},
onTabItemTap
(
e
)
{
const
{
text
}
=
e
;
switch
(
text
)
{
case
"贷款"
:
this
.
buryingPoint
(
'app:loan_index_tab_click'
)
break
;
case
"首页"
:
this
.
buryingPoint
(
'app:index_tab_click'
)
break
;
case
"分类"
:
this
.
buryingPoint
(
'app:category_tab_click'
)
break
;
case
"我的"
:
this
.
buryingPoint
(
'app:my_tab_click'
)
break
;
}
},
methods
:
{
methods
:
{
/** 埋点 */
buryingPoint
(
des
,
val
)
{
const
mobile
=
uni
.
getStorageSync
(
'd-mobile'
)
const
BaseUrl
=
api
.
event
try
{
const
data
=
{
id
:
mobile
?
mobile
:
val
,
event
:
des
,
type
:
"DDH-APP"
,
};
uni
.
request
({
url
:
`
${
BaseUrl
}
/event`
,
method
:
'POST'
,
data
:
{
...
data
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'埋点返回'
)
},
fail
:
(
err
)
=>
{
console
.
log
(
err
,
'埋点报错'
)
}
})
}
catch
(
err
)
{
console
.
log
(
err
,
"埋点请求报错"
);
}
},
// 检查是否开启了下拉刷新
// 检查是否开启了下拉刷新
checkPullDownRefresh
(){
checkPullDownRefresh
()
{
if
(
this
.
isPullDownRefresh
)
{
if
(
this
.
isPullDownRefresh
)
{
uni
.
stopPullDownRefresh
()
uni
.
stopPullDownRefresh
()
}
}
},
},
...
@@ -32,6 +79,11 @@ export default {
...
@@ -32,6 +79,11 @@ export default {
}
}
return
t
.
split
(
''
).
reverse
().
join
(
''
)
+
'.'
+
r
return
t
.
split
(
''
).
reverse
().
join
(
''
)
+
'.'
+
r
},
},
// 跳转到登录页面
JumpToLogin
()
{
console
.
log
(
'调到登录页面'
)
return
this
.
Go
(
'uni:/pages/login/login'
)
},
// 页面跳转
// 页面跳转
...
@@ -39,7 +91,7 @@ export default {
...
@@ -39,7 +91,7 @@ export default {
Jump
(
url
,
type
)
Jump
(
url
,
type
)
},
},
// 返回
// 返回
Back
(
num
=
1
)
{
Back
(
num
=
1
)
{
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
num
delta
:
num
})
})
...
...
pages/index/index.css
deleted
100644 → 0
View file @
041cfa7f
.i-page
{
width
:
100%
;
height
:
100vh
;
min-height
:
1624
rpx
;
background
:
#F7FAFF
;
}
.i-page
.i-header
{
position
:
sticky
;
top
:
0
;
z-index
:
9988
;
padding-top
:
98
rpx
;
width
:
100%
;
height
:
88
rpx
;
background
:
#FFFFFF
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
36
rpx
;
color
:
#333333
;
line-height
:
88
rpx
;
text-align
:
center
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-banner
{
margin
:
20
rpx
22
rpx
32
rpx
;
width
:
706
rpx
;
height
:
359
rpx
;
}
.i-page
.i-boxs
.i-banner
.swiper-item-i
{
width
:
706
rpx
;
height
:
359
rpx
;
}
.i-page
.i-boxs
.i-banner
.swiper-item-i
.banner-item
{
width
:
706
rpx
;
height
:
359
rpx
;
background-size
:
690
rpx
359
rpx
;
}
.i-page
.i-boxs
.i-list
{
margin
:
0
50
rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
}
.i-page
.i-boxs
.i-list
.mian-item
{
margin-right
:
67
rpx
;
}
.i-page
.i-boxs
.i-list
.mian-item
.item-img
{
margin
:
0
16
rpx
;
width
:
80
rpx
;
height
:
80
rpx
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-list
.mian-item
.item-text
{
height
:
40
rpx
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28
rpx
;
color
:
#333333
;
line-height
:
40
rpx
;
text-align
:
center
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-list
.mian-item
:nth-of-type
(
4n
)
{
margin-right
:
0
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
{
margin
:
50
rpx
36
rpx
16
rpx
;
height
:
86
rpx
;
display
:
flex
;
align-items
:
center
;
font-size
:
28
rpx
;
line-height
:
40
rpx
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-header-text
{
width
:
160
rpx
;
display
:
flex
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
color
:
#999999
;
text-align
:
center
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-header-text
.hot-ative
{
position
:
relative
;
z-index
:
1
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
30
rpx
;
color
:
#333333
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-header-text
.hot-ative
::after
{
content
:
''
;
position
:
absolute
;
top
:
30%
;
left
:
0
;
width
:
100%
;
height
:
6px
;
/* 背景色的高度 */
background-color
:
#CDE0FE
;
/* 背景色 */
z-index
:
-1
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-header-text
.hot-icon-show
{
margin-top
:
10
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active-show.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-header-text
.hot-icon-show-down
{
margin-top
:
10
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active-show-down.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-icon
{
margin-top
:
36
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-tab
.hot-show
{
width
:
160
rpx
;
display
:
flex
;
color
:
#999999
;
line-height
:
90
rpx
;
text-align
:
center
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
{
position
:
sticky
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
99
;
height
:
86
rpx
;
background
:
#FFFFFF
;
font-size
:
28
rpx
;
line-height
:
40
rpx
;
margin-bottom
:
220
rpx
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-text
{
padding-top
:
108
rpx
;
width
:
100%
;
height
:
98
rpx
;
background
:
#FFFFFF
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
36
rpx
;
color
:
#333333
;
line-height
:
50
rpx
;
text-align
:
center
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
{
height
:
86
rpx
;
display
:
flex
;
align-items
:
center
;
background
:
#FFFFFF
;
font-size
:
28
rpx
;
line-height
:
40
rpx
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-text
{
width
:
100%
;
height
:
98
rpx
;
background
:
#FFFFFF
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
36
rpx
;
color
:
#333333
;
line-height
:
50
rpx
;
text-align
:
center
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-header-text
{
margin-left
:
30
rpx
;
width
:
160
rpx
;
display
:
flex
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
color
:
#999999
;
text-align
:
center
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-header-text
.hot-ative
{
position
:
relative
;
z-index
:
1
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
font-size
:
30
rpx
;
color
:
#333333
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-header-text
.hot-ative
::after
{
content
:
''
;
position
:
absolute
;
top
:
30%
;
left
:
0
;
width
:
100%
;
height
:
6px
;
/* 背景色的高度 */
background-color
:
#CDE0FE
;
/* 背景色 */
z-index
:
-1
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-header-text
.hot-icon-show
{
margin-top
:
10
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active-show.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-header-text
.hot-icon-show-down
{
margin-top
:
10
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active-show-down.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-icon
{
margin-top
:
36
rpx
;
margin-left
:
10
rpx
;
width
:
22
rpx
;
height
:
22
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/hot-active.png')
0
0
no-repeat
;
background-size
:
100%
;
}
.i-page
.i-boxs
.i-malll
.hot-fixed-show
.hot-tab-fixed
.hot-show
{
margin-left
:
36
rpx
;
width
:
160
rpx
;
display
:
flex
;
color
:
#999999
;
line-height
:
90
rpx
;
text-align
:
center
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
{
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
margin
:
0
30
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
{
margin-bottom
:
24
rpx
;
width
:
333
rpx
;
height
:
426
rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
0
rpx
10
rpx
0
rpx
rgba
(
232
,
232
,
232
,
0.49
);
border-radius
:
10
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-top
{
display
:
flex
;
width
:
333
rpx
;
height
:
272
rpx
;
position
:
relative
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-top
.top-img
{
width
:
333
rpx
;
height
:
272
rpx
;
background-size
:
333
rpx
272
rpx
;
border-radius
:
10
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-top
.top-icon
{
position
:
absolute
;
top
:
0
;
margin-left
:
215
rpx
;
display
:
inline-block
;
width
:
118
rpx
;
height
:
110
rpx
;
background
:
url('https://ddh.yyhock.com/ddhMall/goods-sale.png')
0
0
no-repeat
;
background-size
:
118
rpx
110
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
{
padding
:
9
rpx
16
rpx
21
rpx
0
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-des
{
width
:
160
rpx
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
26
rpx
;
color
:
#333333
;
line-height
:
37
rpx
;
text-align
:
left
;
font-style
:
normal
;
white-space
:
nowrap
;
/* 确保文本在一行内显示 */
overflow
:
hidden
;
/* 隐藏超出容器的内容 */
text-overflow
:
ellipsis
;
/* 使用省略号表示被截断的文本 */
word-break
:
break-all
;
/* 允许在单词内换行 */
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-box
{
display
:
flex
;
margin
:
9
rpx
0
16
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-box
.box-num
{
display
:
flex
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
28
rpx
;
color
:
#FC4D3E
;
line-height
:
28
rpx
;
text-align
:
left
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-box
.box-num
.num-icon
{
margin-top
:
4
rpx
;
font-size
:
20
rpx
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-line
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-line
.box-btn
{
width
:
76
rpx
;
height
:
38
rpx
;
border-radius
:
5
rpx
;
border
:
1
rpx
solid
#2263E6
;
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
20
rpx
;
color
:
#2263E6
;
line-height
:
38
rpx
;
text-align
:
center
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
.box-item
.item-footer
.footer-line
.box-last
{
font-family
:
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
20
rpx
;
color
:
#999999
;
line-height
:
38
rpx
;
text-align
:
right
;
font-style
:
normal
;
}
.i-page
.i-boxs
.i-malll
.box-at-home
.main-box
:nth-child
(
2n
)
{
margin-left
:
24
rpx
;
}
pages/index/index.vue
View file @
d107982b
<
template
>
<
template
>
<view
class=
"i-page"
>
<view
class=
"i-page"
>
<view
class=
'i-header'
v-show=
'isFixed
!=
true'
>
<view
class=
'i-header'
v-show=
'isFixed
!=
true'
>
多典花
<text>
多典花
</text>
</view>
</view>
<view
class=
'i-boxs'
>
<view
class=
'i-boxs'
>
<!-- Banner 位 -->
<view
class=
'i-banner'
>
<view
class=
'i-banner'
>
<!-- :indicator-dots="true" -->
<swiper
:autoplay=
"true"
:interval=
"3000"
:duration=
"1000"
style=
"height: 359rpx;"
>
<swiper
:autoplay=
"true"
:interval=
"3000"
:duration=
"1000"
style=
"height: 359rpx;"
>
<swiper-item
class=
'swiper-item-i'
v-for=
"(item, index) in bannerList"
:key=
"item.id"
<swiper-item
class=
'swiper-item-i'
v-for=
"item in bannerList"
:key=
"item.id"
@
click=
'jump(item, index, "banner")'
>
@
click=
'bannerItem(item)'
>
<image
:src=
'item.url'
class=
'banner-item'
></image>
<image
:src=
'item.url'
class=
'banner-item'
></image>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
<!-- 金刚位 -->
<view
class=
"i-list"
>
<view
class=
"i-list"
>
<view
class=
'mian-item'
v-for=
"item in list"
:key=
"item.id"
@
click=
"goItem(item)"
>
<view
class=
'mian-item'
v-for=
"(item, index) in list"
:key=
"item.id"
@
click=
"jump(item, index, 'diamond')"
>
<image
class=
'item-img'
:src=
'item.url'
></image>
<image
class=
'item-img'
:src=
'item.url'
></image>
<view
class=
'item-text'
>
{{
item
.
name
}}
</view>
<view
class=
'item-text'
>
{{
item
.
name
}}
</view>
</view>
</view>
</view>
</view>
<view
class=
"i-malll"
>
<view
class=
"i-malll"
>
<view
v-if=
'isFixed!=true'
class=
"hot-tab"
>
<!-- 根据滚动条的高度显示隐藏内容 -->
<view
:class=
"hotIndex==item.id ?'hot-header-text':'hot-show'"
v-for=
"item in hotList"
:key=
'item.id'
>
<view
v-if=
'isFixed != true'
class=
"hot-tab"
>
<view
class=
'hot-ative'
@
click=
"hotShow(item)"
>
{{
item
.
title
}}
</view>
<view
:class=
"hotIndex == item.id ? 'hot-header-text' : 'hot-show'"
v-for=
"item in hotList"
<view
v-show=
"hotIndex!=item.id"
class=
'hot-icon'
></view>
:key=
'item.id'
>
<view
v-show=
'hotIndex==item.id'
:class=
"showUP==false ?'hot-icon-show-down':'hot-icon-show'"
@
click=
"goUP(item.id)"
></view>
<view
class=
'hot-ative'
@
click=
"hotShow(item)"
>
{{
item
.
title
}}
</view>
<view
v-show=
"hotIndex != item.id"
class=
'hot-icon'
></view>
<view
v-show=
'hotIndex == item.id'
:class=
"showUP == false ? 'hot-icon-show-down' : 'hot-icon-show'"
@
click=
"goUP(item.id)"
>
</view>
</view>
</view>
</view>
</view>
<view
v-else
class=
"hot-fixed-show"
>
<view
v-else
class=
"hot-fixed-show"
>
<view
class=
"hot-text"
>
多典花
</view>
<view
class=
"hot-text"
>
多典花
</view>
<view
class=
"hot-tab-fixed"
>
<view
class=
"hot-tab-fixed"
>
<view
:class=
"hotIndex==item.id ?'hot-header-text':'hot-show'"
v-for=
"item in hotList"
:key=
'item.id'
>
<view
:class=
"hotIndex == item.id ? 'hot-header-text' : 'hot-show'"
v-for=
"item in hotList"
<view
class=
'hot-ative'
@
click=
"hotShow(item)"
>
{{
item
.
title
}}
</view>
:key=
'item.id'
>
<view
v-show=
"hotIndex!=item.id"
class=
'hot-icon'
></view>
<view
class=
'hot-ative'
@
click=
"hotShow(item)"
>
{{
item
.
title
}}
</view>
<view
v-show=
'hotIndex==item.id'
:class=
"showUP==false ?'hot-icon-show-down':'hot-icon-show'"
@
click=
"goUP(item.id)"
></view>
<view
v-show=
"hotIndex != item.id"
class=
'hot-icon'
></view>
<view
v-show=
'hotIndex == item.id'
:class=
"showUP == false ? 'hot-icon-show-down' : 'hot-icon-show'"
@
click=
"goUP(item.id)"
>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<scroll-view
class=
'box-at-home'
<!-- 商品列表 -->
scroll-y=
"true"
<scroll-view
class=
'box-at-home'
scroll-y=
"true"
refresher-default-style=
"none"
refresher-default-style=
"none"
@
scrolltoupper=
"toupperTop"
@
scrolltolower=
"lowerMore"
>
@
scrolltoupper=
"toupperTop"
<view
class=
'main-box'
v-show=
"IndexList && IndexList.length > 0"
>
@
scrolltolower=
"lowerMore"
>
<view
class=
'box-item'
v-for=
"item in IndexList"
:key=
"item.id"
@
click=
"goDetail(item)"
>
<view
class=
'main-box'
v-show=
"IndexList && IndexList.length>0"
>
<view
class=
'item-top'
>
<view
class=
'box-item'
v-for=
"item in IndexList"
:key=
"item.id"
@
click=
"goDetail(item)"
>
<image
:src=
"item.goodsImage"
class=
'top-img'
></image>
<view
class=
'item-top'
>
<i
class=
'top-icon'
></i>
<image
:src=
"item.goodsImage"
class=
'top-img'
></image>
</view>
<i
class=
'top-icon'
></i>
<view
class=
'item-footer'
>
</view>
<view
class=
'footer-des'
>
{{
item
.
goodsName
}}
</view>
<view
class=
'item-footer'
>
<view
class=
'footer-box'
>
<view
class=
'footer-des'
>
{{
item
.
goodsName
}}
</view>
<view
class=
'box-num'
>
<view
class=
'footer-box'
>
<view
class=
'num-icon'
>
¥
</view>
<view
class=
'box-num'
>
{{
item
.
goodsMoney
}}
<view
class=
'num-icon'
>
¥
</view>
{{
item
.
goodsMoney
}}
</view>
</view>
<view
class=
'footer-line'
>
<view
class=
'box-btn'
>
可置换
</view>
<view
class=
"box-last"
>
{{
item
.
lookSum
}}
次浏览
</view>
</view>
</view>
</view>
</view>
<view
class=
'footer-line'
>
<view
class=
'box-btn'
>
可置换
</view>
<view
class=
"box-last"
>
{{
item
.
lookSum
}}
次浏览
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
</view>
</view>
<upgrade-Popup
:app-upgeade-obj=
"appUpgeadeObj"
v-if=
"appUpgeadeObj.downloadUrl"
@
pause=
'pauseClick'
></upgrade-Popup>
<!-- 更新 -->
<upgrade-Popup
:app-upgeade-obj=
"appUpgeadeObj"
v-if=
"appUpgeadeObj.downloadUrl"
@
pause=
'pauseClick'
></upgrade-Popup>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
loadDevice
,
loadNetwork
,
loadUuid
,
loadLocation
}
from
'../../utils/deviceInfo.js'
import
{
switchShowTabbar
,
isLogin
}
from
'@/utils/index'
import
silentlyAppUpdate
from
'@/pages/app-update/js-sdk/silentlyAppUpdate'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:[],
hotList
:
[
hotList
:[
{
title
:
'浏览量'
,
id
:
0
},
{
title
:
'浏览量'
,
id
:
0
},
{
title
:
'价格'
,
id
:
1
},
{
title
:
'价格'
,
id
:
1
},
],
],
hotIndex
:
0
,
hotIndex
:
0
,
isFixed
:
false
,
isFixed
:
false
,
showUP
:
false
,
showUP
:
false
,
headerHeight
:
0
,
headerHeight
:
0
,
scrollTop
:
0
,
scrollTop
:
0
,
IndexList
:
[],
IndexList
:[],
bannerList
:
[],
bannerList
:[],
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
50
,
pageSize
:
50
,
total
:
0
,
total
:
0
,
hasNextText
:
'上拉加载更多'
,
hasNextText
:
'上拉加载更多'
,
loadFlag
:
true
,
loadFlag
:
true
,
hasNextPage
:
false
,
hasNextPage
:
false
,
sort
:
'look_sum desc'
,
sort
:
'look_sum desc'
,
token
:
''
,
token
:
''
,
appUpgeadeObj
:{},
appUpgeadeObj
:
{},
isFirstShow
:
true
isFirstShow
:
true
}
},
onPageScroll
(
e
)
{
this
.
scrollTop
=
e
.
scrollTop
;
if
(
e
.
scrollTop
>
220
)
{
this
.
isFixed
=
true
;
}
else
{
this
.
isFixed
=
false
;
}
},
onReady
()
{
const
systemInfo
=
uni
.
getSystemInfoSync
();
if
(
systemInfo
.
platform
===
'ios'
)
{
const
isAgree
=
uni
.
getStorageSync
(
'm-agreement'
)
if
(
!
isAgree
)
{
this
.
Go
(
'uni:/pages/agreement/index'
)
}
}
}
this
.
isFirstShow
=
uni
.
getStorageSync
(
'isFirstShow'
)
},
async
onLoad
()
{
await
this
.
initAjax
();
await
this
.
getAppVersion
()
},
async
onShow
()
{
// 首页流量埋点
this
.
buryingPoint
(
'app:index_page_view'
)
await
this
.
initAjax
();
// 显示隐藏tabBar
switchShowTabbar
()
},
methods
:
{
// 初始化网络请求
async
initAjax
()
{
await
uni
.
$util
.
getNetworkException
([
this
.
init
(),
this
.
searchGood
()
])
},
},
onPageScroll
(
e
)
{
// 跳转
// 页面滚动时设置isFixed和scrollTop
jump
(
item
,
index
,
type
)
{
console
.
log
(
e
.
scrollTop
,
'876'
)
// 埋点开始
this
.
scrollTop
=
e
.
scrollTop
;
switch
(
type
)
{
if
(
e
.
scrollTop
>
220
){
case
"banner"
:
this
.
isFixed
=
true
;
this
.
buryingPoint
(
'app:index_banner_click'
)
}
else
{
break
;
this
.
isFixed
=
false
;
case
'diamond'
:
const
desc
=
`app:index_feature
${
index
+
1
}
_click`
this
.
buryingPoint
(
desc
)
break
;
}
}
// 埋点结束
if
(
!
isLogin
())
this
.
JumpToLogin
()
else
this
.
Go
(
item
.
tager
)
},
// 检查版本更新
getAppVersion
()
{
const
self
=
this
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
console
.
log
(
res
.
appVersion
,
'dddd'
)
const
appVersion
=
res
.
appVersion
let
platform
=
res
.
platform
;
// 获取本机版本号
let
type
;
platform
===
"android"
?
(
type
=
"ANDROID"
)
:
(
type
=
"IOS"
);
self
.
$request
(
`/pawn/setting/other/appVersion/
${
type
}
`
,
'GET'
).
then
(
res
=>
{
if
(
res
.
success
==
true
)
{
const
response
=
res
.
result
.
data
;
if
(
appVersion
<
response
.
versionName
)
{
const
wgtType
=
self
.
containsWGTExtension
(
response
.
downloadUrl
)
if
(
wgtType
==
true
)
{
let
checkStatus
=
uni
.
getStorageSync
(
'checkVersions'
)
console
.
log
(
wgtType
,
'要热更新'
)
if
(
checkStatus
==
response
.
versionName
)
{
console
.
log
(
'热更新过了'
)
return
false
}
else
{
console
.
log
(
'热更新了'
)
self
.
updateWgt
(
response
.
downloadUrl
,
response
.
versionName
)
}
}
else
{
console
.
log
(
'强更了'
)
self
.
appUpgeadeObj
=
response
}
}
console
.
log
(
response
,
'response'
)
}
})
}
})
},
},
onReady
()
{
const
systemInfo
=
uni
.
getSystemInfoSync
();
// 暂停
if
(
systemInfo
.
platform
===
'ios'
){
pauseClick
(
data
)
{
const
isAgree
=
uni
.
getStorageSync
(
'm-agreement'
)
console
.
log
(
data
,
'ssss'
)
if
(
!
isAgree
)
{
this
.
appUpgeadeObj
.
downloadUrl
=
''
console
.
log
(
isAgree
,
'isAgree'
)
},
this
.
Go
(
'uni:/pages/agreement/index'
)
init
()
{
const
self
=
this
self
.
$request
(
'/pawn/index'
,
'GET'
).
then
(
res
=>
{
const
{
shortcutList
,
bannerList
}
=
res
.
result
if
(
shortcutList
)
{
self
.
list
=
JSON
.
parse
(
shortcutList
)
}
}
}
if
(
bannerList
)
{
this
.
isFirstShow
=
uni
.
getStorageSync
(
'isFirstShow'
)
self
.
bannerList
=
JSON
.
parse
(
bannerList
)
console
.
log
(
this
.
isFirstShow
,
'isFirstShow1'
)
}
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
},
onLoad
()
{
goDetail
(
item
)
{
const
token
=
uni
.
getStorageSync
(
'token'
)
this
.
token
=
token
// 首页流量埋点
this
.
init
()
this
.
buryingPoint
(
'app:index_product_click'
)
uni
.
navigateTo
({
url
:
'/pages/productDetails/productDetails?mydata='
+
encodeURIComponent
(
JSON
.
stringify
({
goodId
:
item
.
id
}))
})
},
hotShow
(
item
)
{
console
.
log
(
item
.
id
,
'7766'
)
this
.
hotIndex
=
item
.
id
if
(
item
.
id
==
0
)
{
this
.
sort
=
'look_sum desc'
this
.
showUP
=
!
this
.
showUP
}
else
{
this
.
sort
=
'goods_money desc'
this
.
showUP
=
!
this
.
showUP
}
this
.
pageNum
=
1
this
.
searchGood
()
this
.
searchGood
()
this
.
getAppVersion
()
},
},
methods
:{
switchShowTabbar
(){
goUP
(
val
)
{
const
token
=
uni
.
getStorageSync
(
'token'
)
// 首页流量埋点
if
(
!
token
)
{
this
.
buryingPoint
(
'app:index_price_click'
)
uni
.
setTabBarItem
({
index
:
1
,
visible
:
false
this
.
showUP
=
!
this
.
showUP
})
if
(
val
==
0
)
{
//浏览量
if
(
this
.
showUP
==
false
)
{
this
.
sort
=
'look_sum desc'
}
else
{
}
else
{
const
self
=
this
self
.
$request
(
'/pawn/setting/other/switch/loan'
,
'GET'
).
then
(
res
=>
{
this
.
sort
=
'look_sum asc'
const
{
data
}
=
res
.
result
console
.
log
(
data
,
'yyydata'
)
if
(
res
.
code
==
200
&&
data
==
true
)
{
try
{
console
.
log
(
data
,
'显示'
)
uni
.
setTabBarItem
({
index
:
1
,
text
:
'贷款'
,
visible
:
true
,
})
}
catch
(
error
)
{
console
.
log
(
error
);
}
}
else
{
console
.
log
(
data
,
'隐藏'
)
uni
.
setTabBarItem
({
index
:
1
,
visible
:
false
})
}
})
}
}
},
getAppVersion
(){
}
else
{
const
self
=
this
//价格
uni
.
getSystemInfo
({
if
(
this
.
showUP
==
false
)
{
success
:
(
res
)
=>
{
console
.
log
(
res
.
appVersion
,
'dddd'
)
this
.
sort
=
'goods_money desc'
const
appVersion
=
res
.
appVersion
}
else
{
let
platform
=
res
.
platform
;
// 获取本机版本号
//倒序
let
type
;
this
.
sort
=
'goods_money asc'
platform
===
"android"
?
(
type
=
"ANDROID"
)
:
(
type
=
"IOS"
);
}
self
.
$request
(
`/pawn/setting/other/appVersion/
${
type
}
`
,
'GET'
).
then
(
res
=>
{
}
this
.
pageNum
=
1
if
(
res
.
success
==
true
)
{
this
.
searchGood
()
const
response
=
res
.
result
.
data
;
},
if
(
appVersion
<
response
.
versionName
){
// 查询商品
const
wgtType
=
self
.
containsWGTExtension
(
response
.
downloadUrl
)
searchGood
()
{
if
(
wgtType
==
true
){
const
self
=
this
let
checkStatus
=
uni
.
getStorageSync
(
'checkVersions'
)
const
{
sort
,
pageSize
,
pageNum
}
=
self
console
.
log
(
wgtType
,
'要热更新'
)
const
params
=
{
if
(
checkStatus
==
response
.
versionName
){
"current"
:
pageNum
,
console
.
log
(
'热更新过了'
)
"size"
:
pageSize
,
return
false
"sort"
:
sort
}
else
{
}
console
.
log
(
'热更新了'
)
try
{
self
.
updateWgt
(
response
.
downloadUrl
,
response
.
versionName
)
self
.
$request
(
'/pawn/category/getGoodsPage'
,
'POST'
,
params
).
then
(
res
=>
{
}
const
{
current
,
total
,
size
,
records
}
=
res
.
result
const
hasNextPage
=
total
-
self
.
pageSize
*
self
.
pageNum
>
0
?
true
:
false
//是否有下一页
}
else
{
if
(
self
.
loadFlag
)
{
console
.
log
(
'强更了'
)
self
.
appUpgeadeObj
=
response
self
.
IndexList
=
self
.
IndexList
.
concat
(
records
)
}
}
else
{
self
.
IndexList
=
records
}
console
.
log
(
response
,
'response'
)
}
})
}
})
},
pauseClick
(
data
){
console
.
log
(
data
,
'ssss'
)
this
.
appUpgeadeObj
.
downloadUrl
=
''
},
init
(){
const
self
=
this
self
.
$request
(
'/pawn/index'
,
'GET'
).
then
(
res
=>
{
const
{
goodList
,
shortcutList
,
bannerList
}
=
res
.
result
if
(
shortcutList
){
self
.
list
=
JSON
.
parse
(
shortcutList
)
}
if
(
bannerList
){
self
.
bannerList
=
JSON
.
parse
(
bannerList
)
}
}
}).
catch
(
err
=>
{
self
.
hasNextPage
=
hasNextPage
console
.
log
(
err
,
'请求出错'
)
self
.
loadFlag
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
})
},
goDetail
(
item
){
}
catch
{
// console.log(item,'8766')
console
.
log
(
err
,
'错误信息'
)
const
params
=
{
}
goodId
:
item
.
id
}
},
uni
.
navigateTo
({
toupperTop
:
function
(
e
)
{
url
:
'/pages/productDetails/productDetails?mydata='
+
encodeURIComponent
(
JSON
.
stringify
(
params
))
console
.
log
(
e
,
'到顶了'
);
},
lowerMore
:
function
(
e
)
{
console
.
log
(
e
,
'触底了'
);
if
(
!
this
.
hasNextPage
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'到底了'
,
})
})
return
false
;
},
}
hotShow
(
item
){
if
(
this
.
loadFlag
)
return
;
console
.
log
(
item
.
id
,
'7766'
)
this
.
loadFlag
=
true
,
this
.
hotIndex
=
item
.
id
this
.
pageNum
=
this
.
pageNum
+
1
this
.
searchGood
();
if
(
item
.
id
==
0
){
},
this
.
sort
=
'look_sum desc'
//wgt更新
this
.
showUP
=!
this
.
showUP
updateWgt
(
downloadUrl
,
newVersion
)
{
}
else
{
uni
.
showModal
({
this
.
sort
=
'goods_money desc'
title
:
'已发现新版本'
,
this
.
showUP
=!
this
.
showUP
content
:
'确认更新?'
,
}
showCancel
:
false
,
this
.
pageNum
=
1
success
:
function
(
res
)
{
this
.
searchGood
()
uni
.
setStorageSync
(
'checkVersions'
,
newVersion
)
},
if
(
res
.
confirm
)
{
bannerItem
(
item
){
uni
.
downloadFile
({
if
(
this
.
token
==
''
){
url
:
downloadUrl
,
this
.
Go
(
'uni:/pages/login/login'
)
success
:
(
downloadResult
)
=>
{
}
else
{
plus
.
runtime
.
install
(
downloadResult
.
tempFilePath
,
{
force
:
true
},
function
()
{
//应用热重启,重新启动进入首页
const
{
tager
}
=
item
plus
.
runtime
.
restart
();
this
.
Go
(
tager
)
uni
.
showModal
({
}
title
:
'安装成功!'
,
content
:
'已重新进入应用'
,
},
showCancel
:
false
,
goItem
(
item
){
success
:
function
(
res
)
{
if
(
this
.
token
==
''
){
if
(
res
.
confirm
)
{
this
.
Go
(
'uni:/pages/login/login'
)
}
else
{
const
{
tager
}
=
item
console
.
log
(
tager
)
if
(
tager
.
split
(
','
)[
1
]
==
'tab'
){
console
.
log
(
1
)
this
.
Go
(
'uni:/pages/finance/index'
,
'tab'
)
}
else
{
console
.
log
(
2
)
this
.
Go
(
tager
)
}
}
console
.
log
(
'用户点击确定'
);
},
}
else
if
(
res
.
cancel
)
{
goUP
(
val
){
console
.
log
(
'用户点击确定'
);
console
.
log
(
val
,
'val33'
)
}
this
.
showUP
=!
this
.
showUP
if
(
val
==
0
){
//浏览量
if
(
this
.
showUP
==
false
){
this
.
sort
=
'look_sum desc'
}
else
{
this
.
sort
=
'look_sum asc'
}
}
else
{
//价格
if
(
this
.
showUP
==
false
){
this
.
sort
=
'goods_money desc'
}
else
{
//倒序
this
.
sort
=
'goods_money asc'
}
}
this
.
pageNum
=
1
this
.
searchGood
()
},
// 查询商品
searchGood
(){
const
self
=
this
const
{
sort
,
pageSize
,
pageNum
}
=
self
const
params
=
{
"current"
:
pageNum
,
"size"
:
pageSize
,
"sort"
:
sort
}
console
.
log
(
params
,
'查询商品'
)
try
{
self
.
$request
(
'/pawn/category/getGoodsPage'
,
'POST'
,
params
).
then
(
res
=>
{
const
{
current
,
total
,
size
,
records
}
=
res
.
result
const
hasNextPage
=
total
-
self
.
pageSize
*
self
.
pageNum
>
0
?
true
:
false
//是否有下一页
if
(
self
.
loadFlag
){
self
.
IndexList
=
self
.
IndexList
.
concat
(
records
)
}
else
{
self
.
IndexList
=
records
}
self
.
hasNextPage
=
hasNextPage
self
.
loadFlag
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
}
catch
{
console
.
log
(
err
,
'错误信息'
)
}
},
toupperTop
:
function
(
e
){
console
.
log
(
e
,
'到顶了'
);
},
lowerMore
:
function
(
e
){
console
.
log
(
e
,
'触底了'
);
if
(
!
this
.
hasNextPage
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'到底了'
,
})
return
false
;
}
if
(
this
.
loadFlag
)
return
;
this
.
loadFlag
=
true
,
this
.
pageNum
=
this
.
pageNum
+
1
this
.
searchGood
();
},
//wgt更新
updateWgt
(
downloadUrl
,
newVersion
){
uni
.
showModal
({
title
:
'已发现新版本'
,
content
:
'确认更新?'
,
showCancel
:
false
,
success
:
function
(
res
){
uni
.
setStorageSync
(
'checkVersions'
,
newVersion
)
if
(
res
.
confirm
){
uni
.
downloadFile
({
url
:
downloadUrl
,
success
:
(
downloadResult
)
=>
{
plus
.
runtime
.
install
(
downloadResult
.
tempFilePath
,{
force
:
true
},
function
(){
//应用热重启,重新启动进入首页
plus
.
runtime
.
restart
();
uni
.
showModal
({
title
:
'安装成功!'
,
content
:
'已重新进入应用'
,
showCancel
:
false
,
success
:
function
(
res
){
if
(
res
.
confirm
){
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
){
console
.
log
(
'用户点击确定'
);
}
}
})
},
function
(
e
){
console
.
log
(
e
,
'安装失败'
)
uni
.
showModal
({
title
:
'安装失败'
,
icon
:
'none'
})
})
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'none'
})
}
}
})
})
}
else
if
(
res
.
cancel
){
},
uni
.
showToast
({
function
(
e
)
{
title
:
'已取消'
,
console
.
log
(
e
,
'安装失败'
)
icon
:
'none'
uni
.
showModal
({
title
:
'安装失败'
,
icon
:
'none'
})
})
})
}
},
fail
:
(
err
)
=>
{
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'none'
})
}
}
})
})
},
}
else
if
(
res
.
cancel
)
{
containsWGTExtension
(
url
)
{
uni
.
showToast
({
return
/
\.
wgt$/i
.
test
(
url
);
title
:
'已取消'
,
}
icon
:
'none'
},
})
onShow
()
{
const
token
=
uni
.
getStorageSync
(
'token'
)
const
common
=
uni
.
getStorageSync
(
"m-header-device"
)
if
(
!
common
&&
plus
.
os
.
name
!=
'iOS'
){
let
versionNumber
plus
.
runtime
.
getProperty
(
plus
.
runtime
.
appid
,
function
(
wgtinfo
){
if
(
wgtinfo
.
version
){
versionNumber
=
wgtinfo
.
version
;
}
else
{
versionNumber
=
plus
.
runtime
.
version
;
}
}
console
.
log
(
versionNumber
,
'versionNumber'
)
}
// 存储所有请求的头部信息
})
uni
.
setStorage
({
},
key
:
'm-header-version'
,
containsWGTExtension
(
url
)
{
data
:
versionNumber
,
return
/
\.
wgt$/i
.
test
(
url
);
success
:
function
()
{
console
.
log
(
'm-header-version存储成功4'
);
}
});
})
}
this
.
token
=
token
this
.
init
()
this
.
searchGood
()
this
.
switchShowTabbar
()
}
}
}
},
}
</
script
>
</
script
>
<
style
src=
'./index.less'
lang=
"less"
scoped
></
style
>
<
style
src=
'./index.less'
lang=
"less"
scoped
></
style
>
\ No newline at end of file
pages/login/login.vue
View file @
d107982b
...
@@ -169,13 +169,13 @@ export default {
...
@@ -169,13 +169,13 @@ export default {
"verifyCode"
:
self
.
sendcode
"verifyCode"
:
self
.
sendcode
}
}
self
.
$request
(
'/pawn/client/login'
,
'POST'
,
params
).
then
(
res
=>
{
self
.
$request
(
'/pawn/client/login'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
,
'login'
);
const
{
userInfo
,
token
}
=
res
.
result
const
{
userInfo
,
token
}
=
res
.
result
if
(
userInfo
)
{
if
(
userInfo
)
{
const
{
deviceId
}
=
userInfo
const
{
deviceId
}
=
userInfo
uni
.
setStorageSync
(
'deviceId'
,
deviceId
)
uni
.
setStorageSync
(
'deviceId'
,
deviceId
)
}
}
uni
.
setStorageSync
(
'token'
,
token
)
uni
.
setStorageSync
(
'token'
,
token
)
uni
.
setStorageSync
(
'd-mobile'
,
self
.
mobile
)
self
.
loginNocheck
()
self
.
loginNocheck
()
// 设置
// 设置
...
...
pages/my/index.vue
View file @
d107982b
...
@@ -72,6 +72,16 @@ export default {
...
@@ -72,6 +72,16 @@ export default {
onShow
()
{
onShow
()
{
this
.
init
();
this
.
init
();
},
},
// 页面下拉刷新
async
onPullDownRefresh
()
{
// 初始化设备
await
this
.
init
()
setTimeout
(()
=>
{
uni
.
stopPullDownRefresh
();
},
1000
);
},
methods
:
{
methods
:
{
// 初始化
// 初始化
init
()
{
init
()
{
...
@@ -149,12 +159,41 @@ export default {
...
@@ -149,12 +159,41 @@ export default {
})
})
},
},
goPage
(
item
)
{
goPage
(
item
)
{
switch
(
item
.
title
)
{
case
"我的浏览"
:
this
.
buryingPoint
(
'app:my_browsing_history_click'
)
break
;
case
"我的需求"
:
this
.
buryingPoint
(
'app:my_requests_click'
)
break
;
case
"我的关注"
:
this
.
buryingPoint
(
'app:my_favorites_click'
)
break
;
case
"用户反馈"
:
this
.
buryingPoint
(
'app:my_user_feedback_click'
)
break
;
default
:
break
;
}
this
.
Go
(
item
.
linkUrl
)
this
.
Go
(
item
.
linkUrl
)
},
},
goLogin
()
{
goLogin
()
{
this
.
Go
(
'uni:/pages/login/login'
)
this
.
Go
(
'uni:/pages/login/login'
)
},
},
goBar
(
item
)
{
goBar
(
item
)
{
switch
(
item
.
title
)
{
case
"我的还款"
:
this
.
buryingPoint
(
'app:my_repayment_click'
)
break
;
case
"申请记录"
:
this
.
buryingPoint
(
'app:my_application_record_click'
)
break
;
default
:
break
;
}
const
self
=
this
const
self
=
this
const
token
=
uni
.
getStorageSync
(
'token'
)
const
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
!=
''
)
{
if
(
token
!=
''
)
{
...
@@ -166,11 +205,27 @@ export default {
...
@@ -166,11 +205,27 @@ export default {
}
}
},
},
goTel
()
{
goTel
()
{
this
.
buryingPoint
(
'app:my_contact_us_click'
)
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
this
.
serviceCall
//仅为示例
phoneNumber
:
this
.
serviceCall
//仅为示例
});
});
},
},
goItem
(
item
)
{
goItem
(
item
)
{
switch
(
item
.
title
)
{
case
"设置"
:
this
.
buryingPoint
(
'app:my_settings_click'
)
break
;
case
"帮助中心"
:
this
.
buryingPoint
(
'app:my_help_center_click'
)
break
;
default
:
break
;
}
if
(
item
.
linkUrl
!=
''
)
{
if
(
item
.
linkUrl
!=
''
)
{
console
.
log
(
'66'
,
item
)
console
.
log
(
'66'
,
item
)
this
.
Go
(
item
.
linkUrl
)
this
.
Go
(
item
.
linkUrl
)
...
...
pages/useFeed/useFeed.vue
View file @
d107982b
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
<view
class=
'label-text'
>
描述
</view>
<view
class=
'label-text'
>
描述
</view>
</view>
</view>
<view
class=
'box-tarea'
>
<view
class=
'box-tarea'
>
<textarea
class=
'box-con'
placeholder=
"请详细描述您的问题或建议,我们将及时跟进"
maxlength=
"100"
@
input=
"sufontnum($event)"
></textarea>
<textarea
class=
'box-con'
placeholder=
"请详细描述您的问题或建议,我们将及时跟进"
maxlength=
"100"
<text
class=
'contain-length'
>
{{
fountNum
}}
/
<text
class=
"length-total"
>
100
</text>
字
</text>
@
input=
"sufontnum($event)"
></textarea>
<text
class=
'contain-length'
>
{{
fountNum
}}
/
<text
class=
"length-total"
>
100
</text>
字
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -19,41 +20,40 @@
...
@@ -19,41 +20,40 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
fountNum
:
0
,
fountNum
:
0
,
desQuest
:
''
desQuest
:
''
}
},
methods
:
{
needSubmit
()
{
const
content
=
this
.
desQuest
;
if
(
!
content
)
{
return
this
.
toast
(
'描述不能为空'
)
}
}
},
this
.
$request
(
'/pawn/feed/addFeed'
,
'POST'
,
{
content
}).
then
(
res
=>
{
methods
:
{
if
(
res
.
success
)
{
needSubmit
(){
this
.
toast
(
'提交成功'
,
'success'
)
const
self
=
this
setTimeout
(()
=>
{
if
(
self
.
desQuest
==
''
){
this
.
Back
()
self
.
toast
(
'描述不能为空'
)
},
500
)
return
false
}
const
params
=
{
content
:
self
.
desQuest
}
self
.
$request
(
'/pawn/feed/addFeed'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
result
,
'followGood'
);
self
.
toast
(
'提交成功'
)
self
.
Go
(
'uni:/pages/index/index'
,
'tab'
)
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
sufontnum
(
e
){
if
(
e
.
detail
.
value
.
length
>
100
){
self
.
toast
(
'不可超过100字'
)
return
false
}
}
this
.
desQuest
=
e
.
detail
.
value
}).
catch
(
err
=>
{
this
.
fountNum
=
e
.
detail
.
value
.
length
console
.
log
(
err
,
'请求出错'
)
},
})
}
},
sufontnum
(
e
)
{
if
(
e
.
detail
.
value
.
length
>
100
)
{
self
.
toast
(
'不可超过100字'
)
return
false
}
this
.
desQuest
=
e
.
detail
.
value
this
.
fountNum
=
e
.
detail
.
value
.
length
},
}
}
}
</
script
>
</
script
>
<
style
src=
'./index.less'
lang=
"less"
scoped
></
style
>
<
style
src=
'./index.less'
lang=
"less"
scoped
></
style
>
unpackage/dist/dev/app-plus/app-service.js
View file @
d107982b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
unpackage/dist/dev/app-plus/app-view.js
View file @
d107982b
...
@@ -333,15 +333,16 @@ var render = function () {
...
@@ -333,15 +333,16 @@ var render = function () {
staticClass: _vm._$g(1, "sc"),
staticClass: _vm._$g(1, "sc"),
attrs: { _i: 1 },
attrs: { _i: 1 },
},
},
[_vm._v("多典花")]
[_c("v-uni-text", { attrs: { _i: 2 } }, [_vm._v("多典花")])],
1
),
),
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(
2, "sc"), attrs: { _i: 2
} },
{ staticClass: _vm._$g(
3, "sc"), attrs: { _i: 3
} },
[
[
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(
3, "sc"), attrs: { _i: 3
} },
{ staticClass: _vm._$g(
4, "sc"), attrs: { _i: 4
} },
[
[
_c(
_c(
"v-uni-swiper",
"v-uni-swiper",
...
@@ -351,16 +352,16 @@ var render = function () {
...
@@ -351,16 +352,16 @@ var render = function () {
autoplay: true,
autoplay: true,
interval: 3000,
interval: 3000,
duration: 1000,
duration: 1000,
_i:
4
,
_i:
5
,
},
},
},
},
_vm._l(_vm._$g(
5, "f"), function (item, $10
, $20, $30) {
_vm._l(_vm._$g(
6, "f"), function (item, index
, $20, $30) {
return _c(
return _c(
"v-uni-swiper-item",
"v-uni-swiper-item",
{
{
key: item,
key: item,
staticClass: _vm._$g("
5
-" + $30, "sc"),
staticClass: _vm._$g("
6
-" + $30, "sc"),
attrs: { _i: "
5
-" + $30 },
attrs: { _i: "
6
-" + $30 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -369,10 +370,10 @@ var render = function () {
...
@@ -369,10 +370,10 @@ var render = function () {
},
},
[
[
_c("v-uni-image", {
_c("v-uni-image", {
staticClass: _vm._$g("
6
-" + $30, "sc"),
staticClass: _vm._$g("
7
-" + $30, "sc"),
attrs: {
attrs: {
src: _vm._$g("
6
-" + $30, "a-src"),
src: _vm._$g("
7
-" + $30, "a-src"),
_i: "
6
-" + $30,
_i: "
7
-" + $30,
},
},
}),
}),
],
],
...
@@ -386,14 +387,14 @@ var render = function () {
...
@@ -386,14 +387,14 @@ var render = function () {
),
),
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(
7, "sc"), attrs: { _i: 7
} },
{ staticClass: _vm._$g(
8, "sc"), attrs: { _i: 8
} },
_vm._l(_vm._$g(
8, "f"), function (item, $11
, $21, $31) {
_vm._l(_vm._$g(
9, "f"), function (item, index
, $21, $31) {
return _c(
return _c(
"uni-view",
"uni-view",
{
{
key: item,
key: item,
staticClass: _vm._$g("
8
-" + $31, "sc"),
staticClass: _vm._$g("
9
-" + $31, "sc"),
attrs: { _i: "
8
-" + $31 },
attrs: { _i: "
9
-" + $31 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -402,19 +403,19 @@ var render = function () {
...
@@ -402,19 +403,19 @@ var render = function () {
},
},
[
[
_c("v-uni-image", {
_c("v-uni-image", {
staticClass: _vm._$g("
9
-" + $31, "sc"),
staticClass: _vm._$g("
10
-" + $31, "sc"),
attrs: {
attrs: {
src: _vm._$g("
9
-" + $31, "a-src"),
src: _vm._$g("
10
-" + $31, "a-src"),
_i: "
9
-" + $31,
_i: "
10
-" + $31,
},
},
}),
}),
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("1
0
-" + $31, "sc"),
staticClass: _vm._$g("1
1
-" + $31, "sc"),
attrs: { _i: "1
0
-" + $31 },
attrs: { _i: "1
1
-" + $31 },
},
},
[_vm._v(_vm._$g("1
0
-" + $31, "t0-0"))]
[_vm._v(_vm._$g("1
1
-" + $31, "t0-0"))]
),
),
],
],
1
1
...
@@ -424,57 +425,57 @@ var render = function () {
...
@@ -424,57 +425,57 @@ var render = function () {
),
),
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(1
1, "sc"), attrs: { _i: 11
} },
{ staticClass: _vm._$g(1
2, "sc"), attrs: { _i: 12
} },
[
[
_vm._$g(1
2
, "i")
_vm._$g(1
3
, "i")
? _c(
? _c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(1
2, "sc"), attrs: { _i: 12
} },
{ staticClass: _vm._$g(1
3, "sc"), attrs: { _i: 13
} },
_vm._l(_vm._$g(1
3
, "f"), function (item, $12, $22, $32) {
_vm._l(_vm._$g(1
4
, "f"), function (item, $12, $22, $32) {
return _c(
return _c(
"uni-view",
"uni-view",
{
{
key: item,
key: item,
class: _vm._$g("1
3
-" + $32, "c"),
class: _vm._$g("1
4
-" + $32, "c"),
attrs: { _i: "1
3
-" + $32 },
attrs: { _i: "1
4
-" + $32 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("1
4
-" + $32, "sc"),
staticClass: _vm._$g("1
5
-" + $32, "sc"),
attrs: { _i: "1
4
-" + $32 },
attrs: { _i: "1
5
-" + $32 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
},
},
},
},
},
},
[_vm._v(_vm._$g("1
4
-" + $32, "t0-0"))]
[_vm._v(_vm._$g("1
5
-" + $32, "t0-0"))]
),
),
_c("uni-view", {
_c("uni-view", {
directives: [
directives: [
{
{
name: "show",
name: "show",
rawName: "v-show",
rawName: "v-show",
value: _vm._$g("1
5
-" + $32, "v-show"),
value: _vm._$g("1
6
-" + $32, "v-show"),
expression: "_$g((\"1
5
-\"+$32),'v-show')",
expression: "_$g((\"1
6
-\"+$32),'v-show')",
},
},
],
],
staticClass: _vm._$g("1
5
-" + $32, "sc"),
staticClass: _vm._$g("1
6
-" + $32, "sc"),
attrs: { _i: "1
5
-" + $32 },
attrs: { _i: "1
6
-" + $32 },
}),
}),
_c("uni-view", {
_c("uni-view", {
directives: [
directives: [
{
{
name: "show",
name: "show",
rawName: "v-show",
rawName: "v-show",
value: _vm._$g("1
6
-" + $32, "v-show"),
value: _vm._$g("1
7
-" + $32, "v-show"),
expression: "_$g((\"1
6
-\"+$32),'v-show')",
expression: "_$g((\"1
7
-\"+$32),'v-show')",
},
},
],
],
class: _vm._$g("1
6
-" + $32, "c"),
class: _vm._$g("1
7
-" + $32, "c"),
attrs: { _i: "1
6
-" + $32 },
attrs: { _i: "1
7
-" + $32 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -489,63 +490,63 @@ var render = function () {
...
@@ -489,63 +490,63 @@ var render = function () {
)
)
: _c(
: _c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(1
7, "sc"), attrs: { _i: 17
} },
{ staticClass: _vm._$g(1
8, "sc"), attrs: { _i: 18
} },
[
[
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(1
8, "sc"), attrs: { _i: 18
} },
{ staticClass: _vm._$g(1
9, "sc"), attrs: { _i: 19
} },
[_vm._v("多典花")]
[_vm._v("多典花")]
),
),
_c(
_c(
"uni-view",
"uni-view",
{ staticClass: _vm._$g(
19, "sc"), attrs: { _i: 19
} },
{ staticClass: _vm._$g(
20, "sc"), attrs: { _i: 20
} },
_vm._l(
_vm._l(
_vm._$g(2
0
, "f"),
_vm._$g(2
1
, "f"),
function (item, $13, $23, $33) {
function (item, $13, $23, $33) {
return _c(
return _c(
"uni-view",
"uni-view",
{
{
key: item,
key: item,
class: _vm._$g("2
0
-" + $33, "c"),
class: _vm._$g("2
1
-" + $33, "c"),
attrs: { _i: "2
0
-" + $33 },
attrs: { _i: "2
1
-" + $33 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("2
1
-" + $33, "sc"),
staticClass: _vm._$g("2
2
-" + $33, "sc"),
attrs: { _i: "2
1
-" + $33 },
attrs: { _i: "2
2
-" + $33 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
},
},
},
},
},
},
[_vm._v(_vm._$g("2
1
-" + $33, "t0-0"))]
[_vm._v(_vm._$g("2
2
-" + $33, "t0-0"))]
),
),
_c("uni-view", {
_c("uni-view", {
directives: [
directives: [
{
{
name: "show",
name: "show",
rawName: "v-show",
rawName: "v-show",
value: _vm._$g("2
2
-" + $33, "v-show"),
value: _vm._$g("2
3
-" + $33, "v-show"),
expression: "_$g((\"2
2
-\"+$33),'v-show')",
expression: "_$g((\"2
3
-\"+$33),'v-show')",
},
},
],
],
staticClass: _vm._$g("2
2
-" + $33, "sc"),
staticClass: _vm._$g("2
3
-" + $33, "sc"),
attrs: { _i: "2
2
-" + $33 },
attrs: { _i: "2
3
-" + $33 },
}),
}),
_c("uni-view", {
_c("uni-view", {
directives: [
directives: [
{
{
name: "show",
name: "show",
rawName: "v-show",
rawName: "v-show",
value: _vm._$g("2
3
-" + $33, "v-show"),
value: _vm._$g("2
4
-" + $33, "v-show"),
expression: "_$g((\"2
3
-\"+$33),'v-show')",
expression: "_$g((\"2
4
-\"+$33),'v-show')",
},
},
],
],
class: _vm._$g("2
3
-" + $33, "c"),
class: _vm._$g("2
4
-" + $33, "c"),
attrs: { _i: "2
3
-" + $33 },
attrs: { _i: "2
4
-" + $33 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -565,11 +566,11 @@ var render = function () {
...
@@ -565,11 +566,11 @@ var render = function () {
_c(
_c(
"v-uni-scroll-view",
"v-uni-scroll-view",
{
{
staticClass: _vm._$g(2
4
, "sc"),
staticClass: _vm._$g(2
5
, "sc"),
attrs: {
attrs: {
"scroll-y": "true",
"scroll-y": "true",
"refresher-default-style": "none",
"refresher-default-style": "none",
_i: 2
4
,
_i: 2
5
,
},
},
on: {
on: {
scrolltoupper: function ($event) {
scrolltoupper: function ($event) {
...
@@ -588,20 +589,20 @@ var render = function () {
...
@@ -588,20 +589,20 @@ var render = function () {
{
{
name: "show",
name: "show",
rawName: "v-show",
rawName: "v-show",
value: _vm._$g(2
5
, "v-show"),
value: _vm._$g(2
6
, "v-show"),
expression: "_$g(2
5
,'v-show')",
expression: "_$g(2
6
,'v-show')",
},
},
],
],
staticClass: _vm._$g(2
5
, "sc"),
staticClass: _vm._$g(2
6
, "sc"),
attrs: { _i: 2
5
},
attrs: { _i: 2
6
},
},
},
_vm._l(_vm._$g(2
6
, "f"), function (item, $14, $24, $34) {
_vm._l(_vm._$g(2
7
, "f"), function (item, $14, $24, $34) {
return _c(
return _c(
"uni-view",
"uni-view",
{
{
key: item,
key: item,
staticClass: _vm._$g("2
6
-" + $34, "sc"),
staticClass: _vm._$g("2
7
-" + $34, "sc"),
attrs: { _i: "2
6
-" + $34 },
attrs: { _i: "2
7
-" + $34 },
on: {
on: {
click: function ($event) {
click: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -612,20 +613,20 @@ var render = function () {
...
@@ -612,20 +613,20 @@ var render = function () {
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("2
7
-" + $34, "sc"),
staticClass: _vm._$g("2
8
-" + $34, "sc"),
attrs: { _i: "2
7
-" + $34 },
attrs: { _i: "2
8
-" + $34 },
},
},
[
[
_c("v-uni-image", {
_c("v-uni-image", {
staticClass: _vm._$g("2
8
-" + $34, "sc"),
staticClass: _vm._$g("2
9
-" + $34, "sc"),
attrs: {
attrs: {
src: _vm._$g("2
8
-" + $34, "a-src"),
src: _vm._$g("2
9
-" + $34, "a-src"),
_i: "2
8
-" + $34,
_i: "2
9
-" + $34,
},
},
}),
}),
_c("i", {
_c("i", {
staticClass: _vm._$g("
29
-" + $34, "sc"),
staticClass: _vm._$g("
30
-" + $34, "sc"),
attrs: { _i: "
29
-" + $34 },
attrs: { _i: "
30
-" + $34 },
}),
}),
],
],
1
1
...
@@ -633,44 +634,44 @@ var render = function () {
...
@@ -633,44 +634,44 @@ var render = function () {
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
0
-" + $34, "sc"),
staticClass: _vm._$g("3
1
-" + $34, "sc"),
attrs: { _i: "3
0
-" + $34 },
attrs: { _i: "3
1
-" + $34 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
1
-" + $34, "sc"),
staticClass: _vm._$g("3
2
-" + $34, "sc"),
attrs: { _i: "3
1
-" + $34 },
attrs: { _i: "3
2
-" + $34 },
},
},
[_vm._v(_vm._$g("3
1
-" + $34, "t0-0"))]
[_vm._v(_vm._$g("3
2
-" + $34, "t0-0"))]
),
),
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
2
-" + $34, "sc"),
staticClass: _vm._$g("3
3
-" + $34, "sc"),
attrs: { _i: "3
2
-" + $34 },
attrs: { _i: "3
3
-" + $34 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
3
-" + $34, "sc"),
staticClass: _vm._$g("3
4
-" + $34, "sc"),
attrs: { _i: "3
3
-" + $34 },
attrs: { _i: "3
4
-" + $34 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g(
staticClass: _vm._$g(
"3
4
-" + $34,
"3
5
-" + $34,
"sc"
"sc"
),
),
attrs: { _i: "3
4
-" + $34 },
attrs: { _i: "3
5
-" + $34 },
},
},
[_vm._v("¥")]
[_vm._v("¥")]
),
),
_vm._v(_vm._$g("3
3
-" + $34, "t1-0")),
_vm._v(_vm._$g("3
4
-" + $34, "t1-0")),
],
],
1
1
),
),
...
@@ -680,27 +681,27 @@ var render = function () {
...
@@ -680,27 +681,27 @@ var render = function () {
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
5
-" + $34, "sc"),
staticClass: _vm._$g("3
6
-" + $34, "sc"),
attrs: { _i: "3
5
-" + $34 },
attrs: { _i: "3
6
-" + $34 },
},
},
[
[
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
6
-" + $34, "sc"),
staticClass: _vm._$g("3
7
-" + $34, "sc"),
attrs: { _i: "3
6
-" + $34 },
attrs: { _i: "3
7
-" + $34 },
},
},
[_vm._v("可置换")]
[_vm._v("可置换")]
),
),
_c(
_c(
"uni-view",
"uni-view",
{
{
staticClass: _vm._$g("3
7
-" + $34, "sc"),
staticClass: _vm._$g("3
8
-" + $34, "sc"),
attrs: { _i: "3
7
-" + $34 },
attrs: { _i: "3
8
-" + $34 },
},
},
[
[
_vm._v(
_vm._v(
_vm._$g("3
7
-" + $34, "t0-0") + "次浏览"
_vm._$g("3
8
-" + $34, "t0-0") + "次浏览"
),
),
]
]
),
),
...
@@ -725,9 +726,9 @@ var render = function () {
...
@@ -725,9 +726,9 @@ var render = function () {
],
],
1
1
),
),
_vm._$g(3
8
, "i")
_vm._$g(3
9
, "i")
? _c("upgrade-Popup", {
? _c("upgrade-Popup", {
attrs: { _i: 3
8
},
attrs: { _i: 3
9
},
on: {
on: {
pause: function ($event) {
pause: function ($event) {
return _vm.$handleViewEvent($event)
return _vm.$handleViewEvent($event)
...
@@ -9142,7 +9143,7 @@ if(false) {}
...
@@ -9142,7 +9143,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 10);
exports = ___CSS_LOADER_API_IMPORT___(false);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
// Module
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*每个页面公共css */\n", ""]);
exports.push([module.i, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n
/*每个页面公共css */\n", ""]);
// Exports
// Exports
module.exports = exports;
module.exports = exports;
utils/index.js
View file @
d107982b
...
@@ -4,6 +4,47 @@ import Permission from '@/js_sdk/wa-permission/permission'
...
@@ -4,6 +4,47 @@ import Permission from '@/js_sdk/wa-permission/permission'
import
{
SelectLocation
}
from
"./authPerission"
;
import
{
SelectLocation
}
from
"./authPerission"
;
import
API
from
'@/server/common'
import
API
from
'@/server/common'
// 异步请求
export
function
getNetworkException
(
requestList
)
{
return
Promise
.
all
(
requestList
)
.
then
((
res
)
=>
{
// console.log('getNetworkException-res----------', res)
})
.
catch
((
err
)
=>
{
if
(
err
.
code
!=
"20001"
)
return
;
uni
.
$util
.
showToast
(
"网络有点忙, 请刷新试试~"
);
})
.
finally
(()
=>
{
// uni.hideLoading()
// complete()
});
}
// toast 提示框
export
function
showToast
(
title
=
""
,
duration
=
2000
,
icon
=
"none"
)
{
return
new
Promise
((
resolve
,
reject
)
=>
uni
.
showToast
({
title
,
duration
,
icon
,
success
:
()
=>
setTimeout
(()
=>
resolve
(),
duration
),
fail
:
()
=>
reject
(),
})
);
}
// 切换tabBar的显示和隐藏
export
const
isLogin
=
()
=>
{
let
flag
=
false
const
token
=
uni
.
getStorageSync
(
'token'
)
token
?
flag
=
true
:
flag
=
false
return
flag
}
// 切换tabBar的显示和隐藏
// 切换tabBar的显示和隐藏
export
const
switchShowTabbar
=
async
()
=>
{
export
const
switchShowTabbar
=
async
()
=>
{
const
token
=
uni
.
getStorageSync
(
'token'
)
const
token
=
uni
.
getStorageSync
(
'token'
)
...
...
utils/request.js
View file @
d107982b
...
@@ -39,45 +39,28 @@ const request = async (url, type, data) => {
...
@@ -39,45 +39,28 @@ const request = async (url, type, data) => {
Author
:
token
,
//多典花
Author
:
token
,
//多典花
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
// console.log(res,'333')
// #ifdef APP
const
{
// console.log(res, 'response')
data
,
// #endif
statusCode
const
{
data
,
statusCode
}
=
res
;
}
=
res
;
if
(
statusCode
===
200
)
{
if
(
statusCode
===
200
)
{
if
(
data
.
success
==
true
)
{
if
(
data
.
success
==
true
)
{
return
resolve
(
data
)
return
resolve
(
data
)
}
else
{
}
else
{
if
(
data
.
code
==
'403'
)
{
if
(
data
.
code
==
'403'
)
uni
.
removeStorageSync
(
'token'
)
console
.
log
(
res
,
'402'
);
return
reject
(
data
)
uni
.
showToast
({
title
:
data
.
message
,
icon
:
"none"
,
duration
:
2000
})
uni
.
removeStorageSync
(
'token'
)
}
else
{
uni
.
showToast
({
title
:
data
.
message
,
icon
:
"none"
,
duration
:
2000
})
return
false
}
}
}
}
else
{
}
else
{
console
.
log
(
res
.
errMsg
,
'!200'
);
return
reject
({
...
data
,
message
:
res
.
errMsg
})
return
reject
({
data
,
message
:
res
.
errMsg
})
}
}
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
console
.
log
(
err
,
"AJAX请求报错"
)
uni
.
showToast
({
title
:
err
.
message
?
err
.
message
:
'服务器开小差了~'
,
icon
:
"none"
,
duration
:
2000
})
reject
(
err
)
reject
(
err
)
}
}
});
});
...
...
utils/route.js
View file @
d107982b
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
export
const
Jump
=
function
(
url
,
type
=
'navigate'
)
{
export
const
Jump
=
function
(
url
,
type
=
'navigate'
)
{
console
.
log
(
url
,
type
,
'路径1'
)
if
(
!
url
)
return
;
if
(
!
url
)
return
;
const
index
=
url
.
indexOf
(
":"
);
const
index
=
url
.
indexOf
(
":"
);
...
@@ -28,8 +27,7 @@ export const Jump = function (url, type='navigate') {
...
@@ -28,8 +27,7 @@ export const Jump = function (url, type='navigate') {
console
.
log
(
"跳转到其它APP 或者 小程序 或者其它的内容"
)
console
.
log
(
"跳转到其它APP 或者 小程序 或者其它的内容"
)
break
;
break
;
}
}
console
.
log
(
targetPath
,
'路径'
)
switch
(
type
)
{
switch
(
type
)
{
case
'redirect'
:
case
'redirect'
:
uni
.
redirectTo
({
uni
.
redirectTo
({
...
...
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