Commit f850f581 by 潘琦

相关BUG修复

parent 865c2515
......@@ -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: {
......
......@@ -89,6 +89,6 @@ export function evaluationThree (params) {
return request({
url: '/apply/evaluation/evaluationThree',
method: 'POST',
params: params
data: params
})
}
......@@ -28,6 +28,7 @@ router.beforeEach((to, from, next) => {
} else {
next()
}
store.dispatch('setToken', '490cd9b7-dca7-4cc3-87e9-5eacbb5a5d77')
})
let getWXOauth = () => {
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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,
......
......@@ -345,7 +345,7 @@ export default {
}
let params = {
userId: this.userId,
userId: this.memberId,
name: this.userData.name,
orgId: '',
orgName: '',
......
......@@ -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')
......
......@@ -112,7 +112,7 @@ export default {
name: 'detail',
data () {
return {
vocuherId: this.$route.query.voucherId,
voucherId: 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.vocuherId) {
getVoucherInfoById(this.vocuherId).then(res => {
if (this.voucherId) {
getVoucherInfoById(this.voucherId).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.vocuherId).then(res => {
getButtonByVoucherId(this.voucherId).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.vocuherId).then(res => {
getQrCodeByVoucherId(this.voucherId).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.vocuherId).then(res => {
getTipsByVoucherId(this.voucherId).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()
......
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)
})
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment