Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
Sign in / Register
Toggle navigation
S
site-uniapp
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
王柯
site-uniapp
Commits
ebb998fa
提交
ebb998fa
authored
2月 04, 2023
作者:
wk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
域名统一调整
父级
dfc04e75
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
36 行删除
+43
-36
api/http.js
+2
-4
api/request.js
+17
-21
common/config.js
+8
-2
pages/gallery/gallery.vue
+13
-5
pages/index/index.vue
+2
-3
pages/mine/mine.vue
+1
-1
没有找到文件。
api/http.js
View file @
ebb998fa
// let base = "https://test-console-api.hzdingmao.com"
import
config
from
'../common/config.js'
let
base
=
"https://dev-console-api.hzdingmao.com"
// let base="https://console-api.hibuilding.cn"
const
http
=
(
params
)
=>
{
const
http
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
uni
.
request
({
url
:
base
+
params
.
url
,
url
:
config
.
base
+
params
.
url
,
method
:
params
.
method
,
method
:
params
.
method
,
data
:
params
.
data
,
data
:
params
.
data
,
header
:
{
header
:
{
...
...
api/request.js
View file @
ebb998fa
// 公共中心域名
import
config
from
'../common/config.js'
export
const
consoleBaseUrl
=
'https://dev-console-api.hzdingmao.com'
// export const consoleBaseUrl = 'https://test-console-api.hzdingmao.com'
//正式环境
// export const consoleBaseUrl = 'https://console-api.hibuilding.cn'
const
$http
=
{
const
$http
=
{
get
:
function
({
get
:
function
({
url
,
url
,
data
,
data
,
header
header
})
{
})
{
uni
.
showLoading
({
//
uni.showLoading({
title
:
"请求中..."
//
title: "请求中..."
})
//
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"GET"
,
method
:
"GET"
,
header
:
header
,
header
:
header
,
...
@@ -44,7 +40,7 @@ const $http = {
...
@@ -44,7 +40,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
con
soleBaseUrl
+
url
,
url
:
con
fig
.
base
+
url
,
data
:
data
,
data
:
data
,
method
:
"GET"
,
method
:
"GET"
,
header
:
header
,
header
:
header
,
...
@@ -73,7 +69,7 @@ const $http = {
...
@@ -73,7 +69,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"POST"
,
method
:
"POST"
,
header
:
header
,
header
:
header
,
...
@@ -103,7 +99,7 @@ const $http = {
...
@@ -103,7 +99,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
con
soleBaseUrl
+
url
,
url
:
con
fig
.
base
+
url
,
data
:
data
,
data
:
data
,
method
:
"POST"
,
method
:
"POST"
,
header
:
header
,
header
:
header
,
...
@@ -133,7 +129,7 @@ const $http = {
...
@@ -133,7 +129,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"DELETE"
,
method
:
"DELETE"
,
header
:
header
,
header
:
header
,
...
@@ -163,7 +159,7 @@ const $http = {
...
@@ -163,7 +159,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"PUT"
,
method
:
"PUT"
,
header
:
header
,
header
:
header
,
...
@@ -193,7 +189,7 @@ const $http = {
...
@@ -193,7 +189,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
con
soleBaseUrl
+
url
,
url
:
con
fig
.
base
+
url
,
data
:
data
,
data
:
data
,
method
:
"PUT"
,
method
:
"PUT"
,
header
:
header
,
header
:
header
,
...
@@ -223,7 +219,7 @@ const $http = {
...
@@ -223,7 +219,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"DELETE"
,
method
:
"DELETE"
,
header
:
header
,
header
:
header
,
...
@@ -253,7 +249,7 @@ const $http = {
...
@@ -253,7 +249,7 @@ const $http = {
})
})
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}${
url
}
`
,
url
:
`
${
con
fig
.
base
}${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"DELETE"
,
method
:
"DELETE"
,
header
:
header
,
header
:
header
,
...
@@ -280,7 +276,7 @@ const $http = {
...
@@ -280,7 +276,7 @@ const $http = {
})
{
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
`
${
con
soleBaseUrl
}
/plat
${
url
}
`
,
url
:
`
${
con
fig
.
base
}
/plat
${
url
}
`
,
data
:
data
,
data
:
data
,
method
:
"POST"
,
method
:
"POST"
,
header
:
header
,
header
:
header
,
...
@@ -305,7 +301,7 @@ const $http = {
...
@@ -305,7 +301,7 @@ const $http = {
})
{
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
request
({
uni
.
request
({
url
:
con
soleBaseUrl
+
url
,
url
:
con
fig
.
base
+
url
,
data
:
data
,
data
:
data
,
method
:
"POST"
,
method
:
"POST"
,
header
:
header
,
header
:
header
,
...
@@ -329,7 +325,7 @@ const $http = {
...
@@ -329,7 +325,7 @@ const $http = {
})
{
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
uploadFile
({
uni
.
uploadFile
({
url
:
con
soleBaseUrl
+
"/api/v1/base/file/upload_file"
,
url
:
con
fig
.
base
+
"/api/v1/base/file/upload_file"
,
filePath
:
imgUrl
,
filePath
:
imgUrl
,
name
:
'pic_file_apk'
,
name
:
'pic_file_apk'
,
header
:
{
header
:
{
...
@@ -352,7 +348,7 @@ const $http = {
...
@@ -352,7 +348,7 @@ const $http = {
})
{
})
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
uni
.
uploadFile
({
uni
.
uploadFile
({
url
:
con
soleBaseUrl
+
"/api/v1/base/file/upload_file"
,
url
:
con
fig
.
base
+
"/api/v1/base/file/upload_file"
,
filePath
:
fileUrl
,
filePath
:
fileUrl
,
name
:
'pic_file_apk'
,
name
:
'pic_file_apk'
,
header
:
{
header
:
{
...
...
common/config.js
View file @
ebb998fa
...
@@ -2,9 +2,15 @@ const $config = {
...
@@ -2,9 +2,15 @@ const $config = {
pwdTemplateNo
:
"industry-0001"
,
pwdTemplateNo
:
"industry-0001"
,
loginTemplateNo
:
"industry-0001"
,
loginTemplateNo
:
"industry-0001"
,
systemCode
:
"buildingSite"
,
systemCode
:
"buildingSite"
,
authCode
:
"477A0661-EF04-11F7-9D69-0BDD73F06500"
,
//开发CED4DE04-BA74-81DF-E51E-9864E4FD0DCB 测试:494BBE85-A6AD-392F-5628-12B39F649333 正式:D0539533-E169-5338-8ED7-3FAD554F4F62
authCode
:
"477A0661-EF04-11F7-9D69-0BDD73F06500"
,
// 开发:477A0661-EF04-11F7-9D69-0BDD73F06500
// 测试:07EC0FDA-0249-6DB3-7422-0AFFF34E0E90
// 正式:D0539533-E169-5338-8ED7-3FAD554F4F62
pageSize
:
20
,
pageSize
:
20
,
isPage
:
1
,
isPage
:
1
,
smsCfg
:
"industry"
smsCfg
:
"industry"
,
// base: "https://test-console-api.hzdingmao.com"
base
:
"https://dev-console-api.hzdingmao.com"
// base:"https://console-api.hibuilding.cn"
}
}
export
default
$config
export
default
$config
pages/gallery/gallery.vue
View file @
ebb998fa
...
@@ -46,9 +46,9 @@
...
@@ -46,9 +46,9 @@
<uni-grid-item
class=
"grid-item"
v-for=
"(model,modelIndex) in item.data"
:key=
"modelIndex"
>
<uni-grid-item
class=
"grid-item"
v-for=
"(model,modelIndex) in item.data"
:key=
"modelIndex"
>
<view
class=
"item"
@
click=
"toIndex(model)"
>
<view
class=
"item"
@
click=
"toIndex(model)"
>
<image
:src=
"model.ydt_logo"
class=
"image"
/>
<image
:src=
"model.ydt_logo"
class=
"image"
/>
<
view
class=
"name"
style=
"color: #666666;font-size: 28rpx;margin-top: 10rpx;
"
>
<
text
class=
"name
"
>
{{
nameLengthDeal
(
model
.
app_name
)
}}
{{
nameLengthDeal
(
model
.
app_name
)
}}
</
view
>
</
text
>
</view>
</view>
</uni-grid-item>
</uni-grid-item>
</uni-grid>
</uni-grid>
...
@@ -423,7 +423,7 @@
...
@@ -423,7 +423,7 @@
return
dest
return
dest
},
},
nameLengthDeal
(
name
)
{
nameLengthDeal
(
name
)
{
return
StringUtils
.
stringLength
(
name
,
4
)
return
StringUtils
.
stringLength
(
name
,
9
)
}
}
}
}
}
}
...
@@ -432,7 +432,6 @@
...
@@ -432,7 +432,6 @@
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.content
{
.content
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
130
rpx
;
flex-direction
:
column
;
flex-direction
:
column
;
.header-content
{
.header-content
{
...
@@ -593,6 +592,7 @@
...
@@ -593,6 +592,7 @@
.app-content
{
.app-content
{
position
:
absolute
;
position
:
absolute
;
display
:
flex
;
display
:
flex
;
padding-bottom
:
85px
;
flex-direction
:
column
;
flex-direction
:
column
;
.menu-content
{
.menu-content
{
...
@@ -636,11 +636,19 @@
...
@@ -636,11 +636,19 @@
}
}
.name
{
.name
{
width
:
120
rpx
;
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
text-align
:
center
;
font-weight
:
400
;
font-weight
:
400
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
color
:
#333
;
color
:
#333
;
display
:
-webkit-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
word-wrap
:
break-word
;
white-space
:
normal
!important
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
}
}
}
}
}
...
...
pages/index/index.vue
View file @
ebb998fa
...
@@ -538,13 +538,12 @@
...
@@ -538,13 +538,12 @@
if
(
this
.
menus
&&
this
.
menus
.
length
>
0
)
{
if
(
this
.
menus
&&
this
.
menus
.
length
>
0
)
{
//是否有小程序权限
//是否有小程序权限
var
app
=
this
.
menus
.
find
(
item
=>
item
.
object_no
==
'gdydt'
)
var
app
=
this
.
menus
.
find
(
item
=>
item
.
object_no
==
'gdydt'
)
console
.
log
(
"app"
);
if
(
app
)
{
if
(
app
)
{
var
mainAuthMenus
=
app
.
children_list
var
mainAuthMenus
=
app
.
children_list
console
.
log
(
"mainAuthMenus"
,
mainAuthMenus
);
//
console.log("mainAuthMenus", mainAuthMenus);
if
(
mainAuthMenus
&&
mainAuthMenus
.
length
>
0
)
{
if
(
mainAuthMenus
&&
mainAuthMenus
.
length
>
0
)
{
var
mineMenus
=
mainAuthMenus
.
find
(
item
=>
item
.
object_no
==
'ydtsy'
)
var
mineMenus
=
mainAuthMenus
.
find
(
item
=>
item
.
object_no
==
'ydtsy'
)
console
.
log
(
"mineMenus"
,
mineMenus
);
//
console.log("mineMenus", mineMenus);
if
(
mineMenus
)
{
if
(
mineMenus
)
{
var
childMenus
=
mineMenus
.
children_list
var
childMenus
=
mineMenus
.
children_list
console
.
log
(
"childMenus"
,
childMenus
);
console
.
log
(
"childMenus"
,
childMenus
);
...
...
pages/mine/mine.vue
View file @
ebb998fa
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
console
.
log
(
"公司申请列表"
,
result
);
console
.
log
(
"公司申请列表"
,
result
);
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
if
(
result
.
data
.
list
.
length
>
0
)
{
if
(
result
.
data
.
list
)
{
this
.
mDatas
=
this
.
mDatas
.
concat
(
result
.
data
.
list
)
this
.
mDatas
=
this
.
mDatas
.
concat
(
result
.
data
.
list
)
this
.
dealStatus
()
this
.
dealStatus
()
}
}
...
...
Write
Preview
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
Please
register
or
sign in
to comment