Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
voucher-h5
Project
Overview
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
潘琦
voucher-h5
Commits
f850f581
Commit
f850f581
authored
Sep 04, 2019
by
潘琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相关BUG修复
parent
865c2515
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
103 additions
and
60 deletions
+103
-60
index.js
config/index.js
+4
-3
apply.js
src/api/apply/apply.js
+1
-1
permission.js
src/permission.js
+1
-0
request.js
src/router/request.js
+15
-4
comment.vue
src/views/comment/comment.vue
+38
-31
index.vue
src/views/content/index.vue
+2
-3
edit.vue
src/views/member/edit.vue
+1
-1
list.vue
src/views/recommend/list.vue
+1
-1
index.vue
src/views/signing/index.vue
+0
-0
index.vue
src/views/voucherDetail/index.vue
+29
-6
wxpermission.js
src/wxpermission.js
+11
-10
No files found.
config/index.js
View file @
f850f581
...
...
@@ -3,12 +3,13 @@
// see http://vuejs-templates.github.io/webpack for documentation.
const
path
=
require
(
'path'
)
const
url
=
'http://voucher.check.icaremgt.com'
// 开发
//
const url = 'http://voucher.check.icaremgt.com' // 开发
// const url = 'http://voucher.icaremgt.com' // 正式
const
url
=
'http://192.168.1.151:9999'
//
const sjkgurl = 'https://api-wx-service.check.icaremgt.com' // 机构空间(开发)
const
sjkgurl
=
'https://api-wx-service.check.icaremgt.com'
// 机构空间(开发)
// const sjkgurl = 'https://sjkg-wx-service.icaremgt.com' // 机构空间(正式)
const
sjkgurl
=
'http://192.168.1.169:9005'
//
const sjkgurl = 'http://192.168.1.169:9005'
module
.
exports
=
{
dev
:
{
...
...
src/api/apply/apply.js
View file @
f850f581
...
...
@@ -89,6 +89,6 @@ export function evaluationThree (params) {
return
request
({
url
:
'/apply/evaluation/evaluationThree'
,
method
:
'POST'
,
params
:
params
data
:
params
})
}
src/permission.js
View file @
f850f581
...
...
@@ -28,6 +28,7 @@ router.beforeEach((to, from, next) => {
}
else
{
next
()
}
store
.
dispatch
(
'setToken'
,
'490cd9b7-dca7-4cc3-87e9-5eacbb5a5d77'
)
})
let
getWXOauth
=
()
=>
{
...
...
src/router/request.js
View file @
f850f581
...
...
@@ -31,7 +31,7 @@ axios.interceptors.request.use(config => {
// respone拦截器
axios
.
interceptors
.
response
.
use
(
response
=>
{
const
res
=
response
.
data
&&
(
response
.
data
.
code
===
0
||
response
.
data
.
code
===
200
)
?
response
.
data
:
response
const
res
=
response
.
data
&&
(
response
.
data
.
code
===
0
||
response
.
data
.
code
===
200
)
?
response
.
data
:
response
.
data
const
status
=
Number
(
response
.
status
)
||
200
console
.
log
(
'response status:'
+
status
)
if
(
status
!==
200
)
{
...
...
@@ -58,17 +58,28 @@ axios.interceptors.response.use(response => {
// router.push({
// path: '/recommend'
// })
window
.
location
.
href
=
'http://'
+
location
.
host
+
'/#/recommend/list'
window
.
location
.
href
=
'http://'
+
location
.
host
+
'/
voucher/
#/recommend/list'
},
4
*
1000
)
}
}
else
if
(
status
===
404
)
{
Toast
({
message
:
res
.
data
.
error
,
message
:
res
.
error
,
position
:
'center'
,
duration
:
3
*
1000
})
}
else
{
return
Promise
.
reject
(
new
Error
(
res
.
msg
))
let
message
=
'Error:400'
if
(
res
.
code
&&
res
.
code
===
1
)
{
message
=
res
.
msg
}
else
{
message
=
res
.
message
}
Toast
({
message
:
message
,
position
:
'center'
,
duration
:
3
*
1000
})
return
Promise
.
reject
(
new
Error
(
res
.
message
))
}
}
else
if
(
res
.
code
===
1
)
{
if
(
!
res
.
msg
)
{
...
...
src/views/comment/comment.vue
View file @
f850f581
...
...
@@ -18,8 +18,8 @@
</div>
-->
</div>
<div
class=
"form"
>
<
div
class=
"p-title"
><span
class=
"label"
>
评价医生
</span></div
>
<div
class=
"table comment-radio"
>
<
!--
<div
class=
"p-title"
><span
class=
"label"
>
评价医生
</span></div>
--
>
<div
class=
"table comment-radio"
style=
"padding-bottom: 0.5em;"
>
<div
class=
"tr"
>
<div
class=
"td"
>
<div
class=
"item-cell"
>
...
...
@@ -54,9 +54,7 @@
</div>
</div>
</div>
</div>
<div
class=
"p-title"
><span
class=
"label"
>
评价社区
</span></div>
<div
class=
"table comment-radio"
>
<p>
请对本次服务的整体情况进行评价
</p>
<div
class=
"tr"
>
<div
class=
"td"
>
<div
class=
"item-cell"
>
...
...
@@ -91,35 +89,40 @@
</div>
</div>
</div>
<p>
请对为你服务的医护人员态度进行评价
</p>
</div>
<div
class=
"p-title"
><span
class=
"label"
>
评价服务
</span></div>
<div
class=
"stars m-b text-center"
>
<ul
class=
"nav-pills"
>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 1 ? 'checked' : ''"
@
click=
"starHandle(1)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 2 ? 'checked' : ''"
@
click=
"starHandle(2)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 3 ? 'checked' : ''"
@
click=
"starHandle(3)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 4 ? 'checked' : ''"
@
click=
"starHandle(4)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked == 5 ? 'checked' : ''"
@
click=
"starHandle(5)"
></i>
</li>
</ul>
<div
class=
"form"
>
<div
class=
"table"
style=
"padding-bottom: 0.5em;"
>
<div
class=
"p-title text-center"
>
“很满意”
</div>
<div
class=
"stars m-b text-center"
>
<ul
class=
"nav-pills"
>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 1 ? 'checked' : ''"
@
click=
"starHandle(1)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 2 ? 'checked' : ''"
@
click=
"starHandle(2)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 3 ? 'checked' : ''"
@
click=
"starHandle(3)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked >= 4 ? 'checked' : ''"
@
click=
"starHandle(4)"
></i>
</li>
<li>
<i
class=
"glyphicon glyphicon-star"
:class=
"form.starsChecked == 5 ? 'checked' : ''"
@
click=
"starHandle(5)"
></i>
</li>
</ul>
</div>
<div
class=
"textarea-editor"
>
<textarea
class=
"text-area"
v-model=
"form.commentContent"
maxlength=
"50"
placeholder=
"请您对医生的服务进行评价"
@
keyup=
"textareaEditor"
></textarea>
<span
class=
"pagination"
>
{{
pagination
}}
/50
</span>
</div>
<p
class=
"text-danger text-center m-t"
style=
"font-size:0.9em;"
>
温馨提示:本服务评价只针对乡镇卫生院、社区服务中心医生提供的服务做评价反馈,其它二三级医院的服务不做反馈。
</p>
</div>
</div>
</div>
<div
class=
"textarea-editor"
>
<textarea
class=
"text-area"
v-model=
"form.commentContent"
maxlength=
"50"
placeholder=
"请您对医生的服务进行评价"
@
keyup=
"textareaEditor"
></textarea>
<span
class=
"pagination"
>
{{
pagination
}}
/50
</span>
</div>
<p
class=
"text-danger text-center m-t"
>
温馨提示:本服务评价只针对乡镇卫生院、社区服务中心医生提供的服务做评价反馈,其它二三级医院的服务不做反馈。
</p>
<div
class=
"footer"
>
<button
class=
"btn-default btn-block"
:class=
"btnDisabled?'disabled':''"
:disabled=
"btnDisabled"
@
click=
"handleSubmit"
>
立即评价
</button>
</div>
...
...
@@ -254,6 +257,10 @@ export default {
}
</
style
>
<
style
scoped
>
.full-page
{
background-color
:
#f5f6f7
;
color
:
#666
;
}
.sign-page
.head
{
position
:
relative
;
height
:
7em
;
...
...
src/views/content/index.vue
View file @
f850f581
...
...
@@ -25,7 +25,7 @@
import
{
getContentInfo
}
from
'@/api/apply/apply'
import
defaultOrgImg
from
'../../assets/images/org-default-picture.png'
import
{
wxpermission
,
initWXShare
}
from
'@/wxpermission'
import
{
getParamsByUrl
,
removeUrlParam
}
from
'@/util/index'
import
{
removeUrlParam
}
from
'@/util/index'
export
default
{
name
:
'Home'
,
...
...
@@ -68,8 +68,7 @@ export default {
console
.
log
(
'getContentInfo'
)
let
that
=
this
let
newShareLink
=
removeUrlParam
(
'code'
)
let
params
=
getParamsByUrl
(
window
.
location
.
href
)
newShareLink
=
newShareLink
.
split
(
'#'
)[
0
]
+
'#/content?imprId='
+
params
.
imprId
newShareLink
=
newShareLink
.
split
(
'#'
)[
0
]
+
'#/content?imprId='
+
this
.
imprId
const
shareData
=
{
title
:
that
.
data
.
mainTitle
,
imgUrl
:
that
.
data
.
cover
,
...
...
src/views/member/edit.vue
View file @
f850f581
...
...
@@ -345,7 +345,7 @@ export default {
}
let
params
=
{
userId
:
this
.
us
erId
,
userId
:
this
.
memb
erId
,
name
:
this
.
userData
.
name
,
orgId
:
''
,
orgName
:
''
,
...
...
src/views/recommend/list.vue
View file @
f850f581
...
...
@@ -140,7 +140,7 @@ export default {
this
.
$Indicator
.
open
()
console
.
log
(
'getLocation success'
)
let
that
=
this
wxpermission
(()
=>
{
wxpermission
(
0
,
()
=>
{
wx
&&
wx
.
getLocation
({
success
:
function
(
res
)
{
console
.
log
(
'getLocation success'
)
...
...
src/views/signing/index.vue
View file @
f850f581
This diff is collapsed.
Click to expand it.
src/views/voucherDetail/index.vue
View file @
f850f581
...
...
@@ -112,7 +112,7 @@ export default {
name
:
'detail'
,
data
()
{
return
{
vo
cu
herId
:
this
.
$route
.
query
.
voucherId
,
vo
uc
herId
:
this
.
$route
.
query
.
voucherId
,
makeId
:
this
.
$route
.
query
.
makeId
,
voucherType
:
this
.
$route
.
query
.
voucherType
,
voucherData
:
null
,
...
...
@@ -142,8 +142,8 @@ export default {
},
methods
:
{
getVoucherInfoByIdFn
()
{
// 根据voucherId获取该券信息
if
(
this
.
vo
cu
herId
)
{
getVoucherInfoById
(
this
.
vo
cu
herId
).
then
(
res
=>
{
if
(
this
.
vo
uc
herId
)
{
getVoucherInfoById
(
this
.
vo
uc
herId
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
data
=
res
.
data
if
(
data
.
merchantsLogo
&&
data
.
merchantsLogo
!==
''
)
{
...
...
@@ -174,7 +174,7 @@ export default {
},
foreachButtons
()
{
// 按钮配置接口,多个按钮图标转换base64,插入对应对应按钮图标
let
that
=
this
getButtonByVoucherId
(
this
.
vo
cu
herId
).
then
(
res
=>
{
getButtonByVoucherId
(
this
.
vo
uc
herId
).
then
(
res
=>
{
if
(
res
&&
res
.
msg
===
'success'
)
{
that
.
voucherBtnData
=
res
.
data
that
.
voucherBtnData
.
forEach
(
function
(
item
,
index
)
{
...
...
@@ -196,18 +196,25 @@ export default {
})
},
handleClick
(
type
)
{
// 券配置按钮点击
console
.
log
(
type
)
switch
(
type
)
{
case
'popup:code'
:
this
.
qrCodePopup
()
// 核销二维码
break
case
'jump:report'
:
this
.
reportLink
()
break
case
'popup:tips'
:
this
.
tipsPopup
()
// 小贴士
break
case
'jump:appraise'
:
this
.
commentLink
()
break
}
},
qrCodePopup
()
{
// 核销二维码弹窗
document
.
getElementById
(
'qrcode'
).
innerHTML
=
''
getQrCodeByVoucherId
(
this
.
vo
cu
herId
).
then
(
res
=>
{
getQrCodeByVoucherId
(
this
.
vo
uc
herId
).
then
(
res
=>
{
if
(
res
&&
res
.
msg
===
'success'
)
{
this
.
qrCodeVisible
=
true
let
qrcode
=
new
QRCode
(
'qrcode'
,
{
...
...
@@ -237,7 +244,7 @@ export default {
},
tipsPopup
()
{
// 小贴士
this
.
$Indicator
.
open
()
getTipsByVoucherId
(
this
.
vo
cu
herId
).
then
(
res
=>
{
getTipsByVoucherId
(
this
.
vo
uc
herId
).
then
(
res
=>
{
this
.
$Indicator
.
close
()
if
(
res
&&
res
.
msg
===
'success'
)
{
this
.
tipsPopupVisible
=
true
...
...
@@ -259,6 +266,22 @@ export default {
})
})
},
reportLink
()
{
this
.
$toast
({
message
:
'建设中'
,
position
:
'center'
,
duration
:
3000
})
},
commentLink
()
{
// 评价
console
.
log
(
this
.
voucherId
)
this
.
$router
.
push
({
path
:
'/comment/comment'
,
query
:
{
voucherId
:
this
.
voucherId
}
})
},
// showTipsPopup () {
// this.tipsPopupVisible = true
// noscroll()
...
...
src/wxpermission.js
View file @
f850f581
import
{
WXconfirm
}
from
'@/api/wxconfirm'
import
store
from
'@/store'
import
{
removeUrlParam
}
from
'@/util/index'
//
import { removeUrlParam } from '@/util/index'
const
wx
=
require
(
'weixin-js-sdk'
)
export
const
wxpermission
=
(
state
,
fn
)
=>
{
console
.
log
(
'微信鉴权'
)
console
.
log
(
window
.
location
.
href
)
WXconfirm
(
{
let
params
=
{
url
:
window
.
location
.
href
,
auth_id
:
store
.
getters
.
authId
}).
then
(
res
=>
{
}
WXconfirm
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
...
...
@@ -26,13 +27,13 @@ export const wxpermission = (state, fn) => {
menuList
:
[
'menuItem:share:appMessage'
,
'menuItem:share:timeline'
,
'menuItem:copyUrl'
,
'menuItem:share:qq'
,
'menuItem:share:weiboApp'
,
'menuItem:favorite'
,
'menuItem:share:facebook'
,
'menuItem:share:QZone'
,
'menuItem:originPage'
,
'menuItem:openWithQQBrowser'
,
'menuItem:openWithSafari'
,
'menuItem:share:email'
,
'menuItem:share:brand'
,
'menuItem:editTag'
]
// 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
})
}
const
shareData
=
{
title
:
'凯歌健康券'
,
imgUrl
:
'http://www.icaremgt.com/img/logo_03.png'
,
desc
:
'致力于各个服务机构与用户'
,
link
:
removeUrlParam
(
'code'
)
}
initWXShare
(
shareData
)
//
const shareData = {
//
title: '凯歌健康券',
//
imgUrl: 'http://www.icaremgt.com/img/logo_03.png',
//
desc: '致力于各个服务机构与用户',
//
link: removeUrlParam('code')
//
}
//
initWXShare(shareData)
})
})
}
...
...
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