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

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

...@@ -132,15 +132,21 @@ ...@@ -132,15 +132,21 @@
}, },
// 交互事件 // 交互事件
setScrollHandle(instval){ setScrollHandle(instval){
if (instval >= this.baseShowHeight) { if(this.isOpacity){
this.isScroll = true; if (instval >= this.baseShowHeight) {
this.leftIcon = leftimg2; this.isScroll = true;
this.rightIcon = rightimg2; this.leftIcon = leftimg2;
} else { this.rightIcon = rightimg2;
this.isScroll = false; } else {
this.leftIcon = leftimg1; this.isScroll = false;
this.rightIcon = rightimg1; this.leftIcon = leftimg1;
} this.rightIcon = rightimg1;
}
}else{
this.isScroll = true;
this.leftIcon = leftimg2;
this.rightIcon = rightimg2;
}
} }
} }
} }
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<div <div
class="btn left" class="btn left"
:class="{'active-btn':activeBtnType}" :class="{'active-btn':activeBtnType}"
@click="headBtnClick"> @click="headBtnClick(true)">
{{headBtn.leftName}} {{headBtn.leftName}}
</div> </div>
<div class="line"></div> <div class="line"></div>
<div <div
class="btn right" class="btn right"
:class="{'active-btn':!activeBtnType}" :class="{'active-btn':!activeBtnType}"
@click="headBtnClick"> @click="headBtnClick(false)">
{{headBtn.rightName}} {{headBtn.rightName}}
</div> </div>
</div> </div>
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
this.$rocNative.goBack() this.$rocNative.goBack()
} }
}, },
headBtnClick() { headBtnClick(val) {
this.$emit('handleBtn') this.$emit('handleBtn', val)
}, },
rightBtnClick() { rightBtnClick() {
this.$emit('handleRightBtn') 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 @@ ...@@ -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 @@ ...@@ -49,7 +49,7 @@
</div> </div>
</div> </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-h" v-if="activeBtnType"><span>{{dealRankName(hospitalRanking.hospitalType)}}</span>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div> <div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="ranking-title"> <div class="ranking-title">
...@@ -74,11 +74,19 @@ ...@@ -74,11 +74,19 @@
<p class="num">{{itemD.score}}</p> <p class="num">{{itemD.score}}</p>
</div> </div>
</div> </div>
<footer-button
:btnText="btnText"
:btnType="btnType">
</footer-button>
</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>
</section> </section>
</template> </template>
...@@ -105,7 +113,8 @@ ...@@ -105,7 +113,8 @@
hospitalRanking: {}, hospitalRanking: {},
contributionRanking: {}, contributionRanking: {},
btnText: '助力机构 创造佳绩', btnText: '助力机构 创造佳绩',
btnType: true btnType: true,
noContributionRanking: false //是否有人员贡献榜单数据
}; };
}, },
computed: { computed: {
...@@ -115,8 +124,11 @@ ...@@ -115,8 +124,11 @@
this.getRankData(); this.getRankData();
}, },
methods: { methods: {
changeRanking() { goInActivity() {
this.activeBtnType = !this.activeBtnType; this.$router.push('/in-activity')
},
changeRanking(val) {
this.activeBtnType = val;
this.getRankData() this.getRankData()
}, },
dealRankName(hospitalType) { dealRankName(hospitalType) {
...@@ -140,6 +152,7 @@ ...@@ -140,6 +152,7 @@
} }
}, },
getHospitalRanking() { getHospitalRanking() {
this.noContributionRanking = false;
getHospitalRanking().then(res => { getHospitalRanking().then(res => {
if(res.code == '000000') { if(res.code == '000000') {
this.hospitalRanking = res.data; this.hospitalRanking = res.data;
...@@ -150,6 +163,11 @@ ...@@ -150,6 +163,11 @@
getContributionRanking().then(res => { getContributionRanking().then(res => {
if(res.code == '000000') { if(res.code == '000000') {
this.contributionRanking = res.data; this.contributionRanking = res.data;
if(this.contributionRanking.topRankList.length) {
this.noContributionRanking = false;
} else {
this.noContributionRanking = true;
}
} }
}) })
......
此差异已折叠。
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
} }
}, },
methods: { methods: {
changeRanking() { changeRanking(val) {
this.activeBtnType = !this.activeBtnType this.activeBtnType = val;
this.getData(); this.getData();
}, },
handleRightBtn() { handleRightBtn() {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<section> <section>
<div class="invite-info"> <div class="invite-info">
<img :src="avatarImageUrl" /> <img :src="avatarImageUrl" />
<p class="title1">{{ name }}邀请您助力 为他赢大奖</p> <p class="title1">{{ name }}邀请您领取医学课程</p>
<p class="title2">领取课程即可助他一臂之力</p> <p class="title2">参与云鹊奖活动,学习课程赢iphone11等奖品</p>
</div> </div>
<div class="page-info"> <div class="page-info">
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<script> <script>
import { getInviteInfo, getCourseById, getCaptchaGet, getAuthCode } from '@/service'; import { getInviteInfo, getCourseById, getCaptchaGet, getAuthCode } from '@/service';
import { wxShare } from '@/configs/wxShare';
const TIMEALL = 60000; // 倒计时常量 60 秒 const TIMEALL = 60000; // 倒计时常量 60 秒
export default { export default {
data(){ data(){
...@@ -68,7 +69,8 @@ ...@@ -68,7 +69,8 @@
captchaAnswer: '', // 输入的图形验证码 captchaAnswer: '', // 输入的图形验证码
time: TIMEALL, time: TIMEALL,
btnMsg: '点击获取', btnMsg: '点击获取',
isReq: false isReq: false,
shareObj: wxShare,
} }
}, },
async asyncData({ query }){ async asyncData({ query }){
...@@ -93,17 +95,13 @@ ...@@ -93,17 +95,13 @@
document.querySelector('body').setAttribute('style', 'background: #FE9A51;'); document.querySelector('body').setAttribute('style', 'background: #FE9A51;');
this.checkCache(); this.checkCache();
// 微信分享 // 微信分享
this.shareObj = { this.shareObj.shareUrl = window.location.href;
shareUrl: window.location.href, window.localStorage.setItem('shareUrl', this.shareObj.shareUrl);
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.$picaWxShare({ this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP], // baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com', baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15, type: 15,
authUrl: window.location.href, authUrl: this.shareObj.shareUrl,
isDebug: false, isDebug: false,
jsApiList: [ jsApiList: [
'onMenuShareTimeline', 'onMenuShareTimeline',
...@@ -112,7 +110,7 @@ ...@@ -112,7 +110,7 @@
},(wx)=>{ },(wx)=>{
const title = this.shareObj.title1; const title = this.shareObj.title1;
const desc = this.shareObj.title2; const desc = this.shareObj.title2;
const link = window.location.href; const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl; const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友 // 分享给朋友
wx.onMenuShareAppMessage({ wx.onMenuShareAppMessage({
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
</template> </template>
<script> <script>
import { wxShare } from '@/configs/wxShare';
export default { export default {
asyncData({ query }){ asyncData({ query }){
const { status } = query; // 上个页面传递过来领取结果, false 为已领取, true 为领取成功 const { status } = query; // 上个页面传递过来领取结果, false 为已领取, true 为领取成功
...@@ -61,20 +62,20 @@ ...@@ -61,20 +62,20 @@
statusTxt statusTxt
} }
}, },
data(){
return {
shareObj: wxShare,
}
},
mounted(){ mounted(){
document.querySelector('body').setAttribute('style', 'background: "";'); document.querySelector('body').setAttribute('style', 'background: "";');
// 微信分享 // 微信分享
this.shareObj = { this.shareObj.shareUrl = window.localStorage.getItem('shareUrl') || window.location.href;
shareUrl: window.location.href,
title1: '分享title分享title',
title2: '分享desc分享desc',
shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
}
this.$picaWxShare({ this.$picaWxShare({
// baseUrl: BASE_URL[process.env.NUXT_ENV_APP], // baseUrl: BASE_URL[process.env.NUXT_ENV_APP],
baseUrl: 'https://test1-sc.yunqueyi.com', baseUrl: 'https://test1-sc.yunqueyi.com',
type: 15, type: 15,
authUrl: window.location.href, authUrl: this.shareObj.shareUrl,
isDebug: false, isDebug: false,
jsApiList: [ jsApiList: [
'onMenuShareTimeline', 'onMenuShareTimeline',
...@@ -83,7 +84,7 @@ ...@@ -83,7 +84,7 @@
},(wx)=>{ },(wx)=>{
const title = this.shareObj.title1; const title = this.shareObj.title1;
const desc = this.shareObj.title2; const desc = this.shareObj.title2;
const link = window.location.href; const link = this.shareObj.shareUrl;
const imgUrl = this.shareObj.shareImageUrl; const imgUrl = this.shareObj.shareImageUrl;
// 分享给朋友 // 分享给朋友
wx.onMenuShareAppMessage({ wx.onMenuShareAppMessage({
......
...@@ -9,10 +9,20 @@ export const getUserScoreInfo = () => { ...@@ -9,10 +9,20 @@ export const getUserScoreInfo = () => {
return request({ return request({
url: `campaign/ranking/user_info`, url: `campaign/ranking/user_info`,
method: 'post', method: 'post',
// withCredentials: true,
headers: {
token: 'D3FFA515261C48478773C0BA17C11F52'
}
})
}
// 获取服务器时间
//
export const getBEServerTime = () => {
return request({
url: `campaign/tims/getTodayDate`,
method: 'get',
withCredentials: true, withCredentials: true,
// headers: {
// token: '8F685DEFFEAC45C393AA55A4DD9E9048'
// }
}) })
} }
...@@ -47,5 +57,65 @@ export const goToUpdateClock = (params) => { ...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册