Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa-mini-program
比较版本
93a71d4fa7d709e81b7c907a95b54ccc9071535b...bc2fb7c7c10a3f44bf427689a06c9de57fe8e64c
o2oa-mini-program
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa-mini-program
通知
3
Star
5
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa-mini-program
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
bc2fb7c7c10a3f44bf427689a06c9de57fe8e64c
选择Git版本
...
目标分支
93a71d4fa7d709e81b7c907a95b54ccc9071535b
选择Git版本
比较
Commits (2)
https://gitcode.net/O2OA/o2oa-mini-program/-/commit/d4fbcb4a2b795fbd0f9470b9ed8c53f275cf4e3f
热点图片url使用前端拼接
2022-06-18T13:43:28+08:00
fancy
fancylou@outlook.com
https://gitcode.net/O2OA/o2oa-mini-program/-/commit/bc2fb7c7c10a3f44bf427689a06c9de57fe8e64c
工具更新
2022-06-23T10:00:09+08:00
fancy
fancylou@outlook.com
隐藏空白更改
内联
并排
Showing
6 changed file
with
49 addition
and
40 deletion
+49
-40
pages/index/index.js
pages/index/index.js
+15
-1
pages/index/index.wxml
pages/index/index.wxml
+1
-1
project.config.json
project.config.json
+21
-35
project.private.config.json
project.private.config.json
+6
-0
utils/o2Api.js
utils/o2Api.js
+4
-1
utils/o2Request.js
utils/o2Request.js
+2
-2
未找到文件。
pages/index/index.js
浏览文件 @
bc2fb7c7
...
...
@@ -31,16 +31,30 @@ Page({
onShow
:
function
()
{
this
.
loadArticleList
(
true
);
},
// 滚动图片数据请求
loadHotNews
:
function
()
{
api
.
hotPicList
().
then
(
list
=>
{
console
.
log
(
list
);
// url前端拼接
let
newList
=
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
element
=
list
[
i
];
console
.
log
(
element
);
element
.
newUrl
=
this
.
hotPicUrl
(
element
.
picId
);
newList
.
push
(
element
);
}
console
.
log
(
newList
);
this
.
setData
({
bannerList
:
l
ist
bannerList
:
newL
ist
})
}).
catch
(
err
=>
{
api
.
o2Error
(
err
)
})
},
// 滚动图片url拼接
hotPicUrl
:
function
(
picId
)
{
return
api
.
hotPicUrl
(
picId
)
},
loadArticleList
:
function
(
isRefresh
)
{
if
(
this
.
data
.
currentTab
==
'
news
'
)
{
this
.
loadNews
(
isRefresh
);
...
...
pages/index/index.wxml
浏览文件 @
bc2fb7c7
...
...
@@ -9,7 +9,7 @@
<swiper class="banner" autoplay="true" interval="3000" duration="500" bindchange="swiperChange">
<swiper-item wx:for="{{bannerList}}" wx:key="index">
<view class="banner" bindtap="bindTapHotNews" data-index="{{index}}" data-info="{{item.infoId}}" data-application="{{item.application}}">
<image mode="scaleToFill" src="{{item.
u
rl}}"></image>
<image mode="scaleToFill" src="{{item.
newU
rl}}"></image>
<view class="title">{{item.title}}</view>
</view>
</swiper-item>
...
...
project.config.json
浏览文件 @
bc2fb7c7
{
"description"
:
"Project configuration file"
,
"packOptions"
:
{
"ignore"
:
[]
},
"description"
:
"项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"setting"
:
{
"urlCheck"
:
fals
e
,
"es6"
:
tru
e
,
"enhance"
:
fals
e
,
"urlCheck"
:
tru
e
,
"es6"
:
fals
e
,
"enhance"
:
tru
e
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"minified"
:
true
,
...
...
@@ -22,8 +19,6 @@
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
true
,
"useApiHook"
:
true
,
"useApiHostProcess"
:
true
,
"babelSetting"
:
{
"ignore"
:
[],
"disablePlugins"
:
[],
...
...
@@ -36,37 +31,28 @@
"userConfirmedBundleSwitch"
:
false
,
"packNpmManually"
:
false
,
"packNpmRelationList"
:
[],
"minifyWXSS"
:
true
"minifyWXSS"
:
true
,
"showES6CompileOption"
:
false
,
"minifyWXML"
:
true
,
"disableUseStrict"
:
false
,
"useStaticServer"
:
true
,
"useCompilerPlugins"
:
false
,
"lazyloadPlaceholderEnable"
:
false
,
"ignoreUploadUnusedFiles"
:
true
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.12.2"
,
"appid"
:
"wx5e498e66e2dd900b"
,
"projectname"
:
"O2OA-Mini"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
},
"scripts"
:
{},
"isGameTourist"
:
false
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
"condition"
:
{
"search"
:
{
"list"
:
[]
},
"conversation"
:
{
"list"
:
[]
},
"game"
:
{
"list"
:
[]
},
"plugin"
:
{
"list"
:
[]
},
"gamePlugin"
:
{
"list"
:
[]
},
"miniprogram"
:
{
"list"
:
[]
}
"condition"
:
{},
"editorSetting"
:
{
"tabIndent"
:
"insertSpaces"
,
"tabSize"
:
2
},
"libVersion"
:
"2.24.5"
,
"packOptions"
:
{
"ignore"
:
[],
"include"
:
[]
}
}
\ No newline at end of file
project.private.config.json
0 → 100644
浏览文件 @
bc2fb7c7
{
"setting"
:
{
"urlCheck"
:
false
},
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
}
\ No newline at end of file
utils/o2Api.js
浏览文件 @
bc2fb7c7
...
...
@@ -30,12 +30,14 @@ let logout = () => o2Request.delete(o2Request.o2oaOrganizationAuthenticationBase
//热点图片列表 默认取前5条
let
hotPicList
=
()
=>
o2Request
.
put
(
o2Request
.
o2oaHotPicServiceBaseUrl
()
+
'
/jaxrs/user/hotpic/filter/list/page/1/count/5
'
,
{},
false
);
// 热电图片url地址
let
hotPicUrl
=
(
picId
)
=>
o2Request
.
o2oaFileServiceBaseUrl
()
+
'
/jaxrs/file/
'
+
picId
+
'
/download/stream
'
;
//cms 分页获取文档列表
let
cmsDocumentFilterList
=
(
lastId
,
pageSize
,
param
)
=>
o2Request
.
put
(
o2Request
.
o2oaCmsServiceBaseUrl
()
+
'
/jaxrs/document/filter/list/
'
+
lastId
+
'
/next/
'
+
pageSize
,
param
);
//cms 附件下载地址
let
cmsAttachementUrl
=
(
attId
)
=>
o2Request
.
o2oaCmsServiceBaseUrl
()
+
'
/jaxrs/fileinfo/download/document/
'
+
attId
;
/////////////////////流程 //////////////////////////////
// 流程应用
...
...
@@ -110,6 +112,7 @@ module.exports = {
login
,
logout
,
hotPicList
,
hotPicUrl
,
cmsDocumentFilterList
,
taskList
,
taskCompletedList
,
...
...
utils/o2Request.js
浏览文件 @
bc2fb7c7
...
...
@@ -25,7 +25,7 @@ function request(method, url, param, isShowLoading) {
data
:
res
.
header
[
'
Set-Cookie
'
],
})
}
console
.
log
(
'
接口:
'
+
url
,
'
参数:
'
,
param
,
'
\n
返回值:
'
,
res
.
data
)
//
console.log('接口:' + url, ' 参数:', param, '\n返回值:', res.data)
if
(
isShowLoading
)
{
wx
.
hideLoading
();
}
...
...
@@ -61,7 +61,7 @@ function setDistribute(distribute) {
if
(
t
===
'
tokenName
'
)
{
wx
.
setStorageSync
(
t
,
distribute
[
t
]
||
'
x-token
'
);
}
else
{
w
s
.
setStorageSync
(
t
,
distribute
[
t
]
||
{});
w
x
.
setStorageSync
(
t
,
distribute
[
t
]
||
{});
}
});
}
...
...