Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
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
wangxuelai
wechatapp.shangjiadao.com
Commits
c2939f2e
Commit
c2939f2e
authored
Mar 16, 2020
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'帮助中心完结'
parent
6f897c6f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
23 deletions
+145
-23
detail.js
business/pages/helpcenter/detail.js
+35
-2
detail.wxml
business/pages/helpcenter/detail.wxml
+14
-2
detail.wxss
business/pages/helpcenter/detail.wxss
+26
-1
index.js
business/pages/helpcenter/index.js
+44
-5
index.wxml
business/pages/helpcenter/index.wxml
+10
-8
index.wxss
business/pages/helpcenter/index.wxss
+4
-3
index.wxml
business/pages/organizationalmgt/index.wxml
+1
-1
api.js
constants/api.js
+1
-0
common.js
service/common.js
+10
-1
No files found.
business/pages/helpcenter/detail.js
View file @
c2939f2e
// business/pages/helpcenter/detail.js
import
{
helpDetail
}
from
'../../../service/common.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
sid
:
0
,
alias
:
0
,
detail
:
{
title
:
''
,
content
:
[],
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
alias
,
sid
}
=
options
;
this
.
setData
({
alias
,
sid
,
})
this
.
helpDetail
();
},
/**
...
...
@@ -62,5 +75,25 @@ Page({
*/
onShareAppMessage
:
function
()
{
},
helpDetail
()
{
helpDetail
({
alias
:
this
.
data
.
alias
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
let
content
=
[];
try
{
content
=
JSON
.
parse
(
data
.
content
);
}
catch
(
error
)
{
content
=
[];
}
console
.
log
(
content
,
'content'
);
data
.
content
=
content
;
this
.
setData
({
detail
:
data
,
})
}
})
}
})
\ No newline at end of file
business/pages/helpcenter/detail.wxml
View file @
c2939f2e
<!--business/pages/helpcenter/detail.wxml-->
<text>business/pages/helpcenter/detail.wxml</text>
<view class="container">
<view class="questionbox">
<view class="title">
{{detail.title}}
</view>
<view class="detailbox" wx:if="{{detail.content.length > 0}}">
<rich-text
class="rich-text-box"
nodes="{{detail.content[0].value}}"
space="nbsp"
/>
</view>
</view>
</view>
\ No newline at end of file
business/pages/helpcenter/detail.wxss
View file @
c2939f2e
/* business/pages/helpcenter/detail.wxss */
\ No newline at end of file
.container {
min-height: 100vh;
background-color: #EFEFF4;
padding: 20rpx;
}
.questionbox {
background-color: #fff;
border-radius: 12rpx;
border: 1px solid rgba(221,221,221,1);
}
.title {
padding: 32rpx 26rpx;
font-size: 34rpx;
color: #222222;
border-bottom: 1px solid #E8E8E8;
word-break: break-all;
}
.detailbox {
padding: 30rpx 24rpx;
}
/* .rich-text-box {
max-width: 100%;
} */
/* .rich-text-box img{
max-width: 100%;
} */
\ No newline at end of file
business/pages/helpcenter/index.js
View file @
c2939f2e
import
{
helpList
}
from
"../../../service/common.js"
;
import
{
helpList
,
helpAds
}
from
"../../../service/common.js"
;
import
{
imagify
}
from
"../../../utilities/index.js"
;
var
app
=
getApp
();
...
...
@@ -15,7 +15,8 @@ Page({
hasmore
:
true
,
emptyPage
:
false
,
listLoading
:
false
,
curbanner
:
0
curbanner
:
0
,
adsList
:
[],
},
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
...
...
@@ -23,6 +24,7 @@ Page({
sid
});
this
.
getlist
(
"init"
);
this
.
getAds
();
},
onPullDownRefresh
:
function
()
{
this
.
setData
({
...
...
@@ -34,6 +36,32 @@ Page({
onReachBottom
:
function
()
{
this
.
getlist
(
"up"
);
},
bindSwiperchange
(
e
)
{
const
{
current
}
=
e
.
detail
;
this
.
setData
({
curbanner
:
current
})
},
getAds
()
{
helpAds
({
type
:
1
,
page
:
1
,
perPage
:
10
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
// this.adsList = data.list;
this
.
setData
({
adsList
:
data
.
list
})
}
else
{
wx
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
})
}
})
},
getlist
(
type
)
{
if
(
!
this
.
data
.
hasmore
)
{
return
;
...
...
@@ -79,7 +107,6 @@ Page({
hasmore
:
false
});
}
console
.
log
(
this
.
data
.
list
,
"11"
);
break
;
case
"down"
:
// 页面下拉刷新
this
.
setData
({
...
...
@@ -142,14 +169,26 @@ Page({
return
_length
;
},
toHelpdetail
(
e
){
const
{
id
}
=
e
.
currentTarget
.
dataset
;
const
{
alias
}
=
e
.
currentTarget
.
dataset
;
wx
.
navigateTo
({
url
:
`/business/pages/helpcenter/detail?sid=
${
this
.
data
.
sid
}
&
id=
${
id
}
`
url
:
`/business/pages/helpcenter/detail?sid=
${
this
.
data
.
sid
}
&
alias=
${
alias
}
`
})
},
toPostFeedback
()
{
wx
.
navigateTo
({
url
:
`/business/pages/helpcenter/feedbacksubmit?sid=
${
this
.
data
.
sid
}
`
})
},
goLink
(
e
)
{
const
{
ad
}
=
e
.
currentTarget
.
dataset
;
// 1-小程序 2-公众号文章 3-自定义连接 4-无
if
(
ad
.
redirect_type
==
1
)
{
console
.
log
(
ad
.
redirect_type
,
'adsads'
);
}
else
if
(
ad
.
redirect_type
==
2
)
{
console
.
log
(
ad
.
redirect_type
,
'adsads'
);
}
else
if
(
ad
.
redirect_type
==
3
)
{
console
.
log
(
ad
.
redirect_type
,
'adsads'
);
}
else
if
(
ad
.
redirect_type
==
4
)
{
console
.
log
(
ad
.
redirect_type
,
'adsads'
);
}
}
});
business/pages/helpcenter/index.wxml
View file @
c2939f2e
...
...
@@ -3,25 +3,27 @@
<view class="container">
<view class="swiperbox">
<swiper class="swiperbox" autoplay circular bindchange="bindSwiperchange">
<swiper-item class="swiperitembox" wx:for="5" wx:key="index" wx:for-item="item">
<image class="swiperimg"
src="https://dss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/home/img/qrcode/zbios_09b6296.png"
data-url="{{item}}"
bindtap="previewBanner"
mode="aspectFill"
<swiper-item class="swiperitembox" wx:for="{{adsList}}" wx:key="id" wx:for-item="ads">
<image
class="swiperimg"
src="{{filter.imagify(ads.img)}}"
data-url="{{item}}"
bindtap="goLink"
mode="aspectFill"
data-ad="{{ads}}"
>
</image>
</swiper-item>
</swiper>
<view class="swiperdots">
<view
class="dot {{curbanner==index?'active':''}}" wx:for="5" wx:key="index
"></view>
<view
wx:for="{{adsList}}" class="dot {{curbanner==index?'active':''}}" wx:key="id" wx:for-item="ads
"></view>
</view>
</view>
<view class="section">
<view class="section-title">常见问题</view>
<view class="list" wx:if="{{list.length>0}}">
<block wx:for="{{list}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" wx:key="index" data-
id="{{item.id
}}" bindtap="toHelpdetail">
<view class="list-item" wx:for="{{bigitem}}" wx:for-item="item" wx:key="index" data-
alias="{{item.alias
}}" bindtap="toHelpdetail">
<view class="item-title">{{item.title}}</view>
<image class="icon-arr" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
...
...
business/pages/helpcenter/index.wxss
View file @
c2939f2e
...
...
@@ -2,7 +2,7 @@ page {
position: relative;
}
.container {
padding-bottom: 1
0
0rpx;
padding-bottom: 1
4
0rpx;
}
.swiperbox {
width: 100%;
...
...
@@ -73,9 +73,10 @@ page {
color: rgba(34, 34, 34, 1);
line-height: 42rpx;
max-width: 650rpx;
overflow: hidden;
word-wrap: break-word;
/* overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
*/
}
.list .list-item .icon-arr {
width: 12rpx;
...
...
business/pages/organizationalmgt/index.wxml
View file @
c2939f2e
...
...
@@ -55,7 +55,7 @@
</view>
<view class="line" bindtap="goHelpcenter">
<view class="left">
<image class="icon" src="{{imageRoot}}2b/organizationalmgt/
set-icon
.png?{{imageVersion}}" />意见反馈
<image class="icon" src="{{imageRoot}}2b/organizationalmgt/
helpcenter
.png?{{imageVersion}}" />意见反馈
</view>
<image class="right-icon" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
...
...
constants/api.js
View file @
c2939f2e
...
...
@@ -18,6 +18,7 @@ const apis = {
},
// 帮助中心
help
:
{
ads
:
`
${
api
}
common/ads`
,
helpList
:
`
${
api
}
common/helps`
,
//帮助列表
helpDetail
:
`
${
api
}
common/help/show`
,
//帮助详情
},
...
...
service/common.js
View file @
c2939f2e
...
...
@@ -495,6 +495,14 @@ function helpDetail(data) {
errorresolve
:
1
,
})
}
function
helpAds
(
data
)
{
return
wxRequest
({
url
:
`
${
apis
.
help
.
ads
}
`
,
data
,
method
:
'GET'
,
errorresolve
:
1
,
})
}
export
{
cOssAccess
,
getCircleUserShow
,
...
...
@@ -545,5 +553,6 @@ export {
courseGalleryCommentDelete
,
generateClassReviewPiiic
,
helpList
,
helpDetail
helpDetail
,
helpAds
}
\ No newline at end of file
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