提交 e2cd4610 编写于 作者: chengxiang.li's avatar chengxiang.li

Merge branch 'release' into dev-stage2-20191125

assets/img/img1.png

146.4 KB | W: | H:

assets/img/img1.png

124.1 KB | W: | H:

assets/img/img1.png
assets/img/img1.png
assets/img/img1.png
assets/img/img1.png
  • 2-up
  • Swipe
  • Onion skin
assets/img/img10.png

54.6 KB | W: | H:

assets/img/img10.png

53.9 KB | W: | H:

assets/img/img10.png
assets/img/img10.png
assets/img/img10.png
assets/img/img10.png
  • 2-up
  • Swipe
  • Onion skin
assets/img/img2.png

268.3 KB | W: | H:

assets/img/img2.png

225.3 KB | W: | H:

assets/img/img2.png
assets/img/img2.png
assets/img/img2.png
assets/img/img2.png
  • 2-up
  • Swipe
  • Onion skin
assets/img/img6.png

189.3 KB | W: | H:

assets/img/img6.png

154.5 KB | W: | H:

assets/img/img6.png
assets/img/img6.png
assets/img/img6.png
assets/img/img6.png
  • 2-up
  • Swipe
  • Onion skin
assets/img/img7.png

141.4 KB | W: | H:

assets/img/img7.png

118.1 KB | W: | H:

assets/img/img7.png
assets/img/img7.png
assets/img/img7.png
assets/img/img7.png
  • 2-up
  • Swipe
  • Onion skin
assets/img/img8.png

114.1 KB | W: | H:

assets/img/img8.png

101.2 KB | W: | H:

assets/img/img8.png
assets/img/img8.png
assets/img/img8.png
assets/img/img8.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
img{ img{
padding-top: 15px; padding-top: 15px;
} }
.appoint-time{
margin-top: 5px;
text-align: center;
font-size:12px;
color:rgba(237,90,44,1);
line-height:16.5px;
}
} }
.btn-share{ .btn-share{
height: 166px; height: 166px;
...@@ -99,13 +106,20 @@ ...@@ -99,13 +106,20 @@
background: #FFF6CA; background: #FFF6CA;
} }
.btn-rule{ .btn-rule{
width: 90px; width: 110px;
height: 15px; height: 15px;
font-size:15px; font-size:15px;
color:rgba(255,255,255,1); color:rgba(255,255,255,1);
line-height:15px; line-height:15px;
margin: 0 auto; margin: 0 auto;
padding: 16.5px 0 1.5px 0; padding: 16.5px 0 1.5px 0;
img{
width: 7px;
height: 12px;
display: inline;
vertical-align: middle;
padding-left: 5px;
}
} }
} }
} }
...@@ -115,6 +129,7 @@ ...@@ -115,6 +129,7 @@
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
z-index: 10;
background: #fff; background: #fff;
div{ div{
width: 345px; width: 345px;
...@@ -128,4 +143,18 @@ ...@@ -128,4 +143,18 @@
text-align: center; text-align: center;
} }
} }
.abs-btn{
width: 69px;
height: 25px;
position: absolute;
right: 0;
top: 260px;
img{
width: 69px;
height: 25px;
}
}
}
.padbtm50{
padding-bottom: 50px;
} }
\ No newline at end of file
.remind-success{
width: 300px;
.van-dialog__header{
font-size:18px;
color:rgba(51,51,51,1);
line-height:18px;
padding-top: 30px;
}
.van-dialog__content{
.van-dialog__message{
padding: 14px 24px 30px 24px;
text-align: left;
font-size:14px;
color:rgba(103,104,105,1);
line-height:21px;
span{
font-size:14px;
color:#449284;
line-height:21px;
}
}
}
.van-dialog__footer{
.van-dialog__cancel{
.van-button__text{
font-size:17px;
color:rgba(151,152,153,1);
line-height:24px;
}
}
.van-dialog__confirm{
.van-button__text{
font-size:17px;
color:rgba(68,146,132,1);
line-height:24px;
}
}
}
}
.version-toast{
width: 320px;
.van-dialog__header{
font-size:18px;
color:rgba(51,51,51,1);
line-height:18px;
padding-top: 30px;
}
.van-dialog__content{
.van-dialog__message{
font-size:14px;
color:rgba(103,104,105,1);
line-height:21px;
}
}
.van-dialog__footer{
border: .5px solid rgba(0,0,0,.3);
.van-dialog__cancel{
.van-button__text{
font-size:17px;
color:rgba(151,152,153,1);
line-height:24px;
}
}
.van-dialog__confirm{
.van-button__text{
font-size:17px;
color:rgba(68,146,132,1);
line-height:24px;
}
}
}
}
\ No newline at end of file
header{
width: 375px;
position: fixed;
left: 0;
top: 0;
z-index: 100;
.status{
width: 375px;
}
.head-wrap{
width: 375px;
box-sizing: border-box;
padding: 0 20px 0 16px;
display: flex;
justify-content: space-between;
align-items: center;
img{
width: 25px;
height: 25px;
}
span{
font-size:17px;
font-weight:700;
color:rgba(3,3,3,1);
line-height:24px;
}
}
.bgfff{
background: #fff;
}
}
\ No newline at end of file
<template>
<header>
<div class="status" :class="{'bgfff': isScroll}" :style="{height: statusBarHeight + 'px', background: bgColor}"></div>
<div class="head-wrap" :class="{'bgfff': isScroll}" :style="{height: titleHeight + 'px'}">
<img @click="goBack" :src="leftIcon">
<span v-if="isScroll">{{title}}</span>
<img @click="goShare" :src="rightIcon">
</div>
</header>
</template>
<script>
import leftimg1 from './left-array.png';
import rightimg1 from './share-icon.png';
import leftimg2 from './left-icon.png';
import rightimg2 from './right-icon.png';
export default {
name: 'h5header',
props: {
scrollVal: { // 实际滚动的距离
type: Number,
default: 25
},
title: { // 头部 title
type: String,
default: '云鹊医-赋能基层医生'
},
shareObj: { // 分享的参数
type: Object,
default: {
shareUrl:'',
title1:'',
title2:'',
shareImageUrl:'',
}
},
baseShowHeight: { // 需要进行滚动交互的阈值
type: Number,
default: 25,
} ,
setedScroll: { // 是否使用外部父组件的scroll事件
type: Boolean,
default: false
}
},
data(){
return {
bgColor: '',
leftIcon: leftimg1,
rightIcon: rightimg1,
isScroll: false,
statusBarHeight: 20, // 给一个默认值,20 * 2
titleHeight: 44 // title高度默认是44px
}
},
mounted(){
this.setHeaderHeight();
if(!this.setedScroll){
this.scrollHandleOwn();
}
},
watch: {
scrollVal(val){
this.setScrollHandle(val);
}
},
methods: {
// 从APP获取电池栏高度并设置高度
setHeaderHeight(){
// this.statusBarHeight = 20 * window.devicePixelRatio; // 给一个默认值,20 * 2
// this.titleHeight = 44 * window.devicePixelRatio; // title高度默认是44px
this.$rocNative.getStatusBarHeight().then(res=>{
const dpr = window.devicePixelRatio;
if(this.$rocNative.isIOS){
this.statusBarHeight = res.statusBarHeight * dpr;
this.titleHeight = this.titleHeight * dpr;
}else{
this.bgColor = '#ccc';
this.statusBarHeight = res.statusBarHeight / dpr;
}
})
},
goBack(){
this.$sendBuriedData({
component_tag: `301#301002`
});
this.$rocNative.goBack();
},
goShare(){
this.$sendBuriedData({
component_tag: `301#301001`
});
this.$rocNative.shareWechat(this.shareObj);
},
// 默认滚动事件
scrollHandleOwn(){
let bodyScrollTop = 0, documentScrollTop = 0;
window.onscroll = () => {
if(document.body){
bodyScrollTop = document.body.scrollTop;
}
if(document.documentElement){
documentScrollTop = document.documentElement.scrollTop;
}
const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop;
this.setScrollHandle(scrollVal);
}
},
// 交互事件
setScrollHandle(instval){
if (instval >= this.baseShowHeight) {
this.isScroll = true;
this.leftIcon = leftimg2;
this.rightIcon = rightimg2;
} else {
this.isScroll = false;
this.leftIcon = leftimg1;
this.rightIcon = rightimg1;
}
}
}
}
</script>
<style lang="less">
@import './index.less';
</style>
<template>
<div class="pop-bg">
<div class="pop-box">
<div class="pop-txt">{{popAllObj.popTxt}}</div>
<div class="pop-btn" v-if="popAllObj.isAloneBtn" @click="popFun(popAllObj.index)">
{{popAllObj.aloneBtnTxt}}
</div>
<div class="pop-btn" v-else>
<span class="pop-btn-span cancel-btn" @click="popFun(popAllObj.cancelIndex?popAllObj.cancelIndex:'1')">{{popAllObj.cancelTxt || '退出'}}<i></i></span>
<span class="pop-btn-span sure-btn" @click="popFun(popAllObj.index)">{{popAllObj.sureTxt || '继续填写'}}</span>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {}
},
props: {
title: {
default: '问卷调查',
type: String
},
popAllObj: {
default: ()=>{},
type: Object,
},
},
mounted() {
//console.log(this.popAllObj)
},
computed: {},
methods: {
getIt() {
},
popFun(str) {
this.$emit('setPopFun', str)
}
},
}
</script>
<style>
</style>
<style lang="scss" scoped>
// @import '../assets/style/mixin';
.pop-bg {
background: rgba(0, 0, 0, 0.5);
position: fixed;
z-index: 1000;
width: 100%;
height: 100%;
min-height: 100vh;
left: 0;
top: 0;
}
.pop-box {
background: #fff;
border-radius: 3px;
width: 300px;
//height: px2rem(138px);
position: fixed;
left: 50%;
top: 50%;
margin: -55px 0 0 -150px;
z-index: 1001;
}
.pop-txt {
padding: 30px;
//height: px2rem(70px);
line-height: 21px;
border-bottom: 1PX solid #F0F1F2;
font-size: 14px;
color: #676869;
// text-align: center;
// margin-top:px2rem(18px);
}
.pop-btn {
text-align: center;
height: 50px;
font-size: 17px;
color: #449284;
line-height: 50px;
overflow: hidden;
}
.pop-btn .pop-btn-span {
width: 50%;
float: left;
}
.cancel-btn{
position:relative;
color: #979899;
i{
display: inline-block;
height: 100%;
width: 1PX;
background: #F0F1F2;
position: absolute;
right: 0;
top:0;
}
}
.sure-btn{
color: #449284;
}
.top-title {
height: 45px;
line-height: 25px;
font-size: 18px;
text-align: center;
color: #333;
padding: 10px 0;
border-bottom: 1PX solid #E7E7E7
}
</style>
<template>
<div class="smo-share-mask" @click="close">
<div class="mask-tips" >
<img src="../assets/img/icon-yd.png" @click.stop="">
<div class="tips-txt" @click.stop="">点击右上角分享给其他好友</div>
</div>
</div>
</template>
<script>
export default {
methods: {
close() {
this.$emit('closeShare', false)
}
}
}
</script>
<style lang="less">
.smo-share-mask{
width: 375px;
height: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 1000;
background: rgba(0,0,0,.8);
.mask-tips{
position: absolute;
right: 15px;
top: 13px;
text-align: right;
img{
display: inline;
width: 27px;
height: 32px;
}
.tips-txt{
width: 210px;
height: 35px;
line-height: 35px;
margin-top: 6px;
border-radius:2px;
text-align: center;
color: #FFFFFF;
font-size: 16px;
border:1px dashed rgba(255,255,255,.5);
}
}
}
</style>
\ No newline at end of file
...@@ -4,7 +4,7 @@ module.exports = { ...@@ -4,7 +4,7 @@ module.exports = {
** Headers of the page ** Headers of the page
*/ */
head: { head: {
title: '云鹊医-赋能基层医生', title: '云鹊奖2019',
meta: [ meta: [
{ charset: 'utf-8' }, { charset: 'utf-8' },
// { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui' }, // { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui' },
......
此差异已折叠。
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
"private": true, "private": true,
"scripts": { "scripts": {
"test": "jest", "test": "jest",
"dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=3008 nodemon server/index.js --watch server", "dev": "cross-env NODE_ENV=development NUXT_ENV_APP=dev HOST=0.0.0.0 PORT=3009 nodemon server/index.js --watch server",
"build": "NUXT_ENV_APP=${ENV} nuxt build", "build": "NUXT_ENV_APP=${ENV} nuxt build",
"start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3008 NODE_ENV=production node server/index.js", "start": "cross-env NUXT_ENV_APP=${ENV} HOST=0.0.0.0 PORT=3009 NODE_ENV=production node server/index.js",
"generate": "nuxt generate" "generate": "nuxt generate"
}, },
"dependencies": { "dependencies": {
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
"nuxt": "^2.0.0", "nuxt": "^2.0.0",
"pica-h5-login": "^1.0.63", "pica-h5-login": "^1.0.63",
"pica-jsbridge": "^1.0.1", "pica-jsbridge": "^1.0.1",
"pica-wx-share": "^1.1.3",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"vant": "^2.0.9", "vant": "^2.0.9",
"web-buried-point": "^1.1.27" "vconsole": "^3.3.4",
"web-buried-point": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/axios": "^5.5.4", "@nuxtjs/axios": "^5.5.4",
......
<template>
<section class="index-wrap">
<div id="imgHeight1">
<img src="../assets/img/img1.png" />
<img src="../assets/img/img2.png" />
<img src="../assets/img/img3.png" />
</div>
<div class="wrap-join" id="imgHeight2">
<div class="wrap-count">
<div>
<h1>2394847</h1>
<h5>已参与人数</h5>
</div>
<div>
<h1>23948</h1>
<h5>已参与机构</h5>
</div>
</div>
</div>
<div class="btn-appoint btn-app-share" id="imgHeight3" @click="setRemind"><img src="../assets/img/btn_appoint.png" /></div>
<div>
<img src="../assets/img/img6.png" />
<img src="../assets/img/img7.png" />
<img src="../assets/img/img8.png" />
<img src="../assets/img/img9.png" />
<img src="../assets/img/img10.png" />
</div>
<div class="btn-share btn-app-share"><img src="../assets/img/btn_share.png" /></div>
<div class="rule-show">
<img src="../assets/img/rule_title.png" />
<div class="rule-bg">
<section>
<h1>每日任务,攒勤奋分</h1>
<p><span>比赛时间:</span>2019.12.16 10:00-2019.12.30 00:00</p>
<p><span>医生机构:</span>根据机构内注册医生的勤奋分总额排名,活动结束后机构榜单指定名次可获得云鹊豆,榜单第一可获得云鹊机构奖荣誉。</p>
<p><span>医生个人:</span>完成每日学习任务可积攒勤奋分和云鹊豆,每日个人排行榜前十可获得相应实物奖品,个人累计排行第一获得云鹊勤奋之星荣誉、iphone11(64G)一台及云鹊豆奖品。</p>
</section>
<section class="margin-top-20">
<h1>公布排名</h1>
<p><span>公布时间:</span>2019.12.30 10:00-2020.1.5</p>
<p>公布个人获奖名单和机构获奖名单</p>
</section>
<div class="line"></div>
<div class="btn-rule">查看规则详情</div>
</div>
<img class="bird" src="../assets/img/bird.png">
</div>
<div v-if="showFixed" @click="setRemind" class="fix-btn">
<div>开赛时提醒我</div>
</div>
</section>
</template>
<script>
// import { Toast } from 'vant';
// import { mapMutations } from 'vuex'
// import request from '@/service/api';
import { remind, getRemindStatus, checkHospitalStatus } from '@/service';
// import popAll from '../components/popAll.vue';
// import { getBaseMainUrl, getCookie, delCookie, setCookie } from '../utils/index';
const cookies = require('cookie-universal')();
const token = '3D093CC8931C4F73A938CD8939E1A640';
export default {
head() {
return {
title: '云鹊医-赋能基层医生',
};
},
async asyncData({ query }) {
const { data } = await getRemindStatus(token);
console.log('服务端',data)
const remindStatus = data;
return {
remindStatus
}
},
data() {
return {
showFixed: false,
}
},
created() {
},
mounted() {
console.log('愉悦状态',this.remindStatus)
this.scrollHandle();
},
methods: {
// 处理滚动按钮悬浮事件
scrollHandle(){
const _self = this;
const imgHeight1 = document.getElementById('imgHeight1').offsetHeight;
const imgHeight2 = document.getElementById('imgHeight2').offsetHeight;
const imgHeight3 = document.getElementById('imgHeight3').offsetHeight;
let bodyScrollTop = 0, documentScrollTop = 0;
window.onscroll = () => {
if(document.body){
bodyScrollTop = document.body.scrollTop;
}
if(document.documentElement){
documentScrollTop = document.documentElement.scrollTop;
}
const heightVal = imgHeight1 + imgHeight2 + imgHeight3;
const scrollVal = bodyScrollTop || documentScrollTop;
if(scrollVal>=heightVal){
_self.showFixed = true;
}else{
_self.showFixed = false;
}
}
},
setRemind(){
checkHospitalStatus(token).then(res=>{
console.log(res)
// status : 0无机构 1正常 2机构已关闭 5退出 10移除 15创建机构审核中 20创建机构审核不通过 25创建机构未提交
if(res.data.status==1){
}
if(!res.data.status){ // 0无机构
// native gotoActivityHospital
}else if(res.data.status==15){ // 15创建机构审核中
// native gotoInstitutionalReview
}else{
remind({token}).then(res=>{
console.log('res=>',res)
})
}
})
}
},
}
</script>
<style lang="less">
@import '../assets/style/index.less';
</style>
\ No newline at end of file
此差异已折叠。
import Vue from 'vue' import Vue from 'vue'
import PicaJsBridge from '@/utils/jsbridge' import PicaJsBridge from '@/utils/jsbridge'
// import Vconsole from 'vconsole';
// const vConsole = new Vconsole();
Vue.prototype.$rocNative = new PicaJsBridge(); Vue.prototype.$rocNative = new PicaJsBridge();
import Vue from 'vue' import Vue from 'vue'
import { BASE_URL } from '@/utils/enumerate'; import { BASE_URL } from '@/utils/enumerate';
import PicaWxShare from 'pica-wx-share';
Vue.prototype.$picaWxShare = PicaWxShare;
import PicaH5Login from 'pica-h5-login'; import PicaH5Login from 'pica-h5-login';
import { Dialog, Toast, Checkbox,Popup ,CheckboxGroup ,RadioGroup, Radio, Progress,ImagePreview ,Uploader,Overlay,Loading } from 'vant'; import { Dialog, Toast, Checkbox,Popup ,CheckboxGroup ,RadioGroup, Radio, Progress,ImagePreview ,Uploader,Overlay,Loading } from 'vant';
import WebBuriedPoint, { sendBuriedData } from 'web-buried-point'; import WebBuriedPoint, { sendBuriedData } from 'web-buried-point';
...@@ -13,7 +16,7 @@ Vue.use(Dialog) ...@@ -13,7 +16,7 @@ Vue.use(Dialog)
const { NUXT_ENV_APP } = process.env; const { NUXT_ENV_APP } = process.env;
Vue.use(WebBuriedPoint, { Vue.use(WebBuriedPoint, {
class_name: `questionnaire_v2`, class_name: `year_end_ssr`,
url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1` url: `${BASE_URL[NUXT_ENV_APP]}/file/log/trace1`
}); });
......
// import qs from 'qs';
import request from './api'; import request from './api';
// import { async } from 'q';
// export const check = async (params) => { // 获取机构和个人参与人数
// return request({ export const getCnt = () => {
// url: `/campaign/questionnaire/check`, return request({
// params, url: `campaign/preBook/cnt`,
// // 需要在headers设置token method: 'get',
// // withCredentials: true, })
// headers: { }
// token: params.token
// }
// })
// }
// export const checkLogin = async (params) => {
// return request({
// url: 'campaign/questionnaire/loginAuth',
// params,
// // 需要在headers设置token
// // withCredentials: true,
// // headers: {
// // token: params.token
// // }
// })
// }
// 查看当前token的机构状态 // 查看当前token的机构状态
export const checkHospitalStatus = async (token) => { export const checkHospitalStatus = (token) => {
return request({ return request({
url: `api-ws/doctors/hospital/status`, url: `api-ws/doctors/hospital/status`,
method: 'get', method: 'get',
...@@ -37,9 +19,8 @@ export const checkHospitalStatus = async (token) => { ...@@ -37,9 +19,8 @@ export const checkHospitalStatus = async (token) => {
}) })
} }
// 设置开赛提醒接口 post // 设置开赛提醒接口 post
export const remind = async (params) => { export const remind = (params) => {
return request({ return request({
url: `campaign/preBook/book`, url: `campaign/preBook/book`,
method: 'post', method: 'post',
...@@ -59,4 +40,14 @@ export const getRemindStatus = async (token) => { ...@@ -59,4 +40,14 @@ export const getRemindStatus = async (token) => {
token: token token: token
} }
}) })
}
export const checkToken = async (token) => {
return request({
url: `campaign/admin/task/checkToken?token=${token}`,
method: 'get',
headers: {
token: token
}
})
} }
\ No newline at end of file
...@@ -16,8 +16,26 @@ export const JsBridgeOptions = { ...@@ -16,8 +16,26 @@ export const JsBridgeOptions = {
GLOBAL_NAME: 'rocNative', GLOBAL_NAME: 'rocNative',
NATIVE_IOS_NAME: 'rociOS', NATIVE_IOS_NAME: 'rociOS',
NATIVE_ANDROID_NAME: '__rocAndroid', NATIVE_ANDROID_NAME: '__rocAndroid',
initMethodsWithCallBack: ['getToken', 'getUserInfo','addEnclosure'], // value is string initMethodsWithCallBack: ['getToken', 'getUserInfo','addEnclosure', 'getStatusBarHeight','getAppVersionCode'], // value is string
initMethodsWithoutCallBack: ['appInit', 'goBack','gotoLogin', 'shareWechat', 'showNativeToast', 'dispatchEventByModuleCode', 'appBuryingPointEntrust', 'webLoadSuccess','WfileImageCallBack','selectPhoto','gotoInstitutionalReview', 'gotoActivityHospital'] // value is string initMethodsWithoutCallBack: [
'appInit',
'goBack',
'gotoLogin',
'shareWechat',
'showNativeToast',
'dispatchEventByModuleCode',
'appBuryingPointEntrust',
'webLoadSuccess',
'WfileImageCallBack',
'selectPhoto',
'gotoInstitutionalReview',
'gotoActivityHospital',
'setNeedClearUrl',
'dispatchEventByModuleCode',
'sendBuriedPoint',
'openErrorDebug',
'getLocalData'
] // value is string
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册