提交 61b547c4 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-stage2-20191125' into dev-copy-stage2

......@@ -132,6 +132,7 @@
},
// 交互事件
setScrollHandle(instval){
if(this.isOpacity){
if (instval >= this.baseShowHeight) {
this.isScroll = true;
this.leftIcon = leftimg2;
......@@ -141,6 +142,11 @@
this.leftIcon = leftimg1;
this.rightIcon = rightimg1;
}
}else{
this.isScroll = true;
this.leftIcon = leftimg2;
this.rightIcon = rightimg2;
}
}
}
}
......
......@@ -7,14 +7,14 @@
<div
class="btn left"
:class="{'active-btn':activeBtnType}"
@click="headBtnClick">
@click="headBtnClick(true)">
{{headBtn.leftName}}
</div>
<div class="line"></div>
<div
class="btn right"
:class="{'active-btn':!activeBtnType}"
@click="headBtnClick">
@click="headBtnClick(false)">
{{headBtn.rightName}}
</div>
</div>
......@@ -74,8 +74,8 @@
this.$rocNative.goBack()
}
},
headBtnClick() {
this.$emit('handleBtn')
headBtnClick(val) {
this.$emit('handleBtn', val)
},
rightBtnClick() {
this.$emit('handleRightBtn')
......
export const wxShare = {
shareUrl: '',
title1: '您的好友邀请您领取医学课程',
title2: '参与云鹊奖活动,领取免费课程,赢取iphone11等丰厚奖品',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share2.png'
}
\ No newline at end of file
......@@ -160,4 +160,33 @@
}
}
}
.no-data {
margin-top: 112px;
img {
width: 150px;
height: 150px;
display: block;
margin: 0 auto;
}
p {
color: #999999;
font-size: 15px;
line-height: 21px;
margin-top: 5px;
margin-bottom: 30px;
text-align: center;
}
.button {
color: #fff;
font-size: 15px;
font-weight: 700;
width: 180px;
height: 45px;
line-height: 45px;
text-align: center;
background: linear-gradient(270deg,rgba(255,88,36,1) 0%,rgba(254,163,86,1) 100%);
border-radius: 22.5px;
margin: 0 auto;
}
}
}
\ No newline at end of file
......@@ -49,7 +49,7 @@
</div>
</div>
</div>
<div class="main-content">
<div class="main-content" v-if="!noContributionRanking">
<div class="description description-h" v-if="activeBtnType"><span>{{dealRankName(hospitalRanking.hospitalType)}}</span>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="ranking-title">
......@@ -74,11 +74,19 @@
<p class="num">{{itemD.score}}</p>
</div>
</div>
</div>
<div class="main-content" v-if="noContributionRanking">
<div class="no-data">
<img src="~/assets/img/icon-nodata.png" alt="">
<p>暂无记录,您还没有参加活动</p>
<div class="button" @click="goInActivity">立即参加</div>
</div>
</div>
<footer-button
v-if="!noContributionRanking"
:btnText="btnText"
:btnType="btnType">
</footer-button>
</div>
</section>
</template>
......@@ -105,7 +113,8 @@
hospitalRanking: {},
contributionRanking: {},
btnText: '助力机构 创造佳绩',
btnType: true
btnType: true,
noContributionRanking: false //是否有人员贡献榜单数据
};
},
computed: {
......@@ -115,8 +124,11 @@
this.getRankData();
},
methods: {
changeRanking() {
this.activeBtnType = !this.activeBtnType;
goInActivity() {
this.$router.push('/in-activity')
},
changeRanking(val) {
this.activeBtnType = val;
this.getRankData()
},
dealRankName(hospitalType) {
......@@ -140,6 +152,7 @@
}
},
getHospitalRanking() {
this.noContributionRanking = false;
getHospitalRanking().then(res => {
if(res.code == '000000') {
this.hospitalRanking = res.data;
......@@ -150,6 +163,11 @@
getContributionRanking().then(res => {
if(res.code == '000000') {
this.contributionRanking = res.data;
if(this.contributionRanking.topRankList.length) {
this.noContributionRanking = false;
} else {
this.noContributionRanking = true;
}
}
})
......
此差异已折叠。
......@@ -99,8 +99,8 @@
}
},
methods: {
changeRanking() {
this.activeBtnType = !this.activeBtnType
changeRanking(val) {
this.activeBtnType = val;
this.getData();
},
handleRightBtn() {
......
......@@ -3,8 +3,8 @@
<section>
<div class="invite-info">
<img :src="avatarImageUrl" />
<p class="title1">{{ name }}邀请您助力 为他赢大奖</p>
<p class="title2">领取课程即可助他一臂之力</p>
<p class="title1">{{ name }}邀请您领取医学课程</p>
<p class="title2">参与云鹊奖活动,学习课程赢iphone11等奖品</p>
</div>
<div class="page-info">
......@@ -54,6 +54,7 @@
<script>
import { getInviteInfo, getCourseById, getCaptchaGet, getAuthCode } from '@/service';
import { wxShare } from '@/configs/wxShare';
const TIMEALL = 60000; // 倒计时常量 60 秒
export default {
data(){
......@@ -68,7 +69,8 @@
captchaAnswer: '', // 输入的图形验证码
time: TIMEALL,
btnMsg: '点击获取',
isReq: false
isReq: false,
shareObj: wxShare,
}
},
async asyncData({ query }){
......@@ -93,17 +95,13 @@
document.querySelector('body').setAttribute('style', 'background: #FE9A51;');
this.checkCache();
// 微信分享
this.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.shareObj.shareUrl = window.location.href;
window.localStorage.setItem('shareUrl', this.shareObj.shareUrl);
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
authUrl: this.shareObj.shareUrl,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
......@@ -112,7 +110,7 @@
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
......
......@@ -53,6 +53,7 @@
</template>
<script>
import { wxShare } from '@/configs/wxShare';
export default {
asyncData({ query }){
const { status } = query; // 上个页面传递过来领取结果, false 为已领取, true 为领取成功
......@@ -61,20 +62,20 @@
statusTxt
}
},
data(){
return {
shareObj: wxShare,
}
},
mounted(){
document.querySelector('body').setAttribute('style', 'background: "";');
// 微信分享
this.shareObj = {
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.shareObj.shareUrl = window.localStorage.getItem('shareUrl') || window.location.href;
this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15,
authUrl: window.location.href,
authUrl: this.shareObj.shareUrl,
isDebug: false,
jsApiList: [
'onMenuShareTimeline',
......@@ -83,7 +84,7 @@
},(wx)=>{
const title = this.shareObj.title1;
const desc = this.shareObj.title2;
const link = window.location.href;
const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友
wx.onMenuShareAppMessage({
......
......@@ -9,10 +9,20 @@ export const getUserScoreInfo = () => {
return request({
url: `campaign/ranking/user_info`,
method: 'post',
// withCredentials: true,
headers: {
token: 'D3FFA515261C48478773C0BA17C11F52'
}
})
}
// 获取服务器时间
//
export const getBEServerTime = () => {
return request({
url: `campaign/tims/getTodayDate`,
method: 'get',
withCredentials: true,
// headers: {
// token: '8F685DEFFEAC45C393AA55A4DD9E9048'
// }
})
}
......@@ -47,5 +57,65 @@ export const goToUpdateClock = (params) => {
})
}
// 获取activityId
export const getActivityId = () => {
return request({
url: `contents/commonComstant/selectByTypeCode?code=C015`,
method: 'get',
// withCredentials: true,
})
}
// 获取任务列表
export const getTimsActivityInfo = (id) => {
return request({
url: `campaign/tims/timsActivityInfo?activityId=${id}`,
method: 'get',
withCredentials: true,
})
}
export const selectAppModuleParam = async ({id, token }) => {
return request({
url: `/contents/contentAppModule/selectAppModuleParam?id=${id}&token=${token}&setEntry=true`,
withCredentials: true
});
}
export const checkToken = async({token}) => {
return request({
url: `campaign/admin/task/checkToken?token=${token}`,
withCredentials: true
})
}
export const getRole = async ({ token }) => {
return request({
url: `/contents/template/getRole?token=${token}`,
headers: {
token
}
// withCredentials: true
});
}
export const sayHello = async ({ token }) => {
return request({
method: 'POST',
// withCredentials: true,
headers: {
token
},
data: { token },
url: `/diplomat/oauth/sayhello?app_id=pica-crrs`
});
}
// 获取加密过后的id
export const getEncryptId = () => {
return request({
url: `campaign/inviteDetail/vinci`,
method: 'get',
withCredentials: true,
})
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册