fcf6d777 by joe

1

1 parent ba206416
......@@ -11,7 +11,7 @@ as.defineAvatar = "http://cdn.aiwanpai.com/s/d.jpg";
as.shareLink = as.domains + "/index.html";
as.shareImgUrl = as.domains + "/share.jpg";
as.shareTitle = "我C位出道,需要你的一票";
as.shareDesc = "C位出道需要你的一票。你也想成为C位主角吗?不要犹豫了,赶紧来报名吧!"
as.shareDesc = "你也想成为C位主角吗?立乐家“小戏骨选拔赛“,让你C位出道,赶紧来报名吧!"
as.success = function () { };
as.appSuccess = function () { };
......
......@@ -19,6 +19,23 @@
</div>
</div>
<div class="model" v-if="data.index == 'subcribe'">
<div class="model-close" @click="modelCloseHandler"></div>
<div class="model-content">
<div class="model-head-line"></div>
<div class="model-title">微信提示</div>
<div class="successModel">
<div class="model-data">扫码关注<br>及时了解最新赛况及结果哦!</div>
<div class="qrcode">
<img src="../../assets/imgs/walfare-qrcode.png" />
</div>
<div class="model-bottom-line"></div>
</div>
</div>
</div>
<div class="model rule-model" v-if="data.index == 'rule'">
<div class="model-close" @click="modelCloseHandler"></div>
<!-- 规则-->
......@@ -127,7 +144,7 @@ export default {
background-color: transparent;
}
.model-bottom-line {
height: 50px;
height: 80px;
background-color: transparent;
}
......@@ -172,6 +189,22 @@ export default {
text-align: center;
}
.qrcode {
width: 187px;
height: 195px;
line-height: 195px;
background: url(../../assets/imgs/qrcode-bg.png) no-repeat;
background-size: 100%;
margin: auto;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
img {
width: 170px;
}
}
.rule-model {
width: 600px !important;
......
......@@ -26,15 +26,39 @@
<div class="name">更多福利</div>
</div>
</div>
<biz-model v-model="model"></biz-model>
</div>
</template>
<script>
let urls = {
index: "/jiajiaCHApi/app/index"
};
import { httpGet } from "@/api/fetch-api";
import BizModel from "@/components/biz-model/biz-model";
export default {
props: ["value"],
data() {
return {
activityIndex: this.value
activityIndex: this.value,
model: {
show: false,
title: "",
content: "",
index: "subcribe",
btnShow: false,
btnText: "",
confirmHandler: null,
labelBtnShow: false,
labelBtnText: "",
labelBtnHandler: null
},
indexData: {
isSubcribe: 0
}
};
},
methods: {
......@@ -45,16 +69,20 @@ export default {
this.activityIndex = index;
switch (this.activityIndex) {
case 1:
this.$router.push("/");
this.$router.push("/");
break;
case 2:
if (this.indexData.isSubcribe == 1) {
this.$router.push("/sign");
} else {
this.model.show = true;
}
break;
case 3:
this.$router.push("/list");
this.$router.push("/list");
break;
case 4:
this.$router.push("/welfare");
this.$router.push("/welfare");
break;
}
this.$emit("selectChange", this.activityIndex);
......@@ -64,6 +92,13 @@ export default {
if (!this.activityIndex) {
this.activityIndex = 1;
}
httpGet({ url: urls.index }).then(res => {
this.indexData = res;
});
},
components: {
BizModel
}
};
</script>
......
......@@ -330,7 +330,7 @@ export default {
position: fixed;
left: 0;
top: 30px;
z-index: 8000;
z-index: 2000;
}
.btn-prize-list{
width: 166px;
......@@ -340,6 +340,6 @@ export default {
position: fixed;
right: 0;
top: 30px;
z-index: 8000;
z-index: 2000;
}
</style>
......
......@@ -8,27 +8,66 @@
<div class="leap-02"></div>
<div class="leap-03"></div>
<div class="remain"></div>
<biz-model v-model="model"></biz-model>
<bottom-tool v-model="activityIndex"></bottom-tool>
</div>
</template>
<script>
let urls = {
index: "/jiajiaCHApi/app/index"
};
import { httpGet } from "@/api/fetch-api";
import BottomTool from "@/components/bottom-tools/bottom-tools";
import BizModel from "@/components/biz-model/biz-model";
import Vue from "vue";
import { Toast } from "vant";
Vue.use(Toast);
export default {
name: "home",
data() {
return {
activityIndex: 1
activityIndex: 1,
model: {
show: false,
title: "",
content: "",
index: "subcribe",
btnShow: false,
btnText: "",
confirmHandler: null,
labelBtnShow: false,
labelBtnText: "",
labelBtnHandler: null
}
};
},
methods: {
toSign() {
this.$router.push("/sign");
Toast.loading({
mask: true,
message: "请稍等..."
});
httpGet({ url: urls.index }).then(res => {
Toast.clear();
if (res.isSubcribe == 1) {
this.$router.push("/sign");
} else {
this.model.show = true;
}
});
}
},
components: {
BottomTool
BottomTool,
BizModel
}
};
</script>
......
......@@ -7,13 +7,13 @@
<div class="search-btn" @click="searchWorksHandler('searchBtn')"></div>
</div>
<van-row>
<van-list v-model="isLoading" :finished="!hasMore" finished-text="" @load="refreshMore">
<van-list v-model="isLoading" :finished="!hasMore" finished-text @load="refreshMore">
<van-cell v-for="(itemList,index1) in worksList" :key="index1">
<van-col span="12" v-for="(item,index2) in itemList" :key="index2">
<div class="worksItem" @click="toWorksViewHandler(item.worksCode)">
<div
class="worksThumb"
v-bind:style="{backgroundImage:'url(' + item.worksList && item.worksList[0] && item.worksList[0].worksUrl + ')'}"
v-bind:style="{backgroundImage:'url(' + (item.worksList && item.worksList[0] ? item.worksList[0].worksUrl : '') + ')'}"
></div>
<div class="worksDescription">
<div class="worksNo">{{item.worksNo}}</div>
......@@ -49,7 +49,9 @@ import Vue from "vue";
import { Row, Col } from "vant";
import { Icon } from "vant";
import { List, Cell } from "vant";
import { Toast } from "vant";
Vue.use(Toast);
Vue.use(List).use(Cell);
Vue.use(Icon);
Vue.use(Row).use(Col);
......@@ -65,15 +67,15 @@ export default {
lastQuery: "",
listForm: {
query: "",
page: 1,
page: 0,
size: 20
}
};
},
methods: {
initActvity() {
this.searchWorksHandler();
},
// initActvity() {
// this.searchWorksHandler();
// },
toWorksViewHandler(code) {
this.$emit("worksDetail", { worksCode: code });
},
......@@ -84,8 +86,14 @@ export default {
}
this.lastQuery = this.listForm.query;
this.listForm.page = 1;
Toast.loading({
mask: true,
message: "加载中..."
});
}
console.log("this.listForm === ", this.listForm);
httpGet({ url: urls.list, data: this.listForm }).then(res => {
Toast.clear();
let list = [];
if (this.listForm.page != 1) {
list = this.worksList;
......@@ -107,6 +115,8 @@ export default {
// 加载更多
this.hasMore = res.list.length == this.listForm.size;
this.isLoading = false;
}).catch(e=>{
Toast.clear();
});
},
refreshMore() {
......@@ -116,7 +126,7 @@ export default {
}
},
created() {
this.initActvity();
// this.initActvity();
}
};
</script>
......@@ -165,12 +175,12 @@ export default {
}
}
.van-row {
margin-top: 30px;
min-height: 400px;
}
.van-cell{
.van-cell {
padding: 0;
}
......@@ -181,6 +191,7 @@ export default {
border: solid 1px #d1d0d0;
box-shadow: 2px 2px 2px #d1d0d0;
border-radius: 20px;
overflow: hidden;
.worksThumb {
width: 300px;
......@@ -193,12 +204,13 @@ export default {
padding-left: 10px;
div {
font-size: 26px;
font-size: 22px;
height: 60px;
line-height: 60px;
text-align: left;
text-overflow: ellipsis;
overflow: hidden;
font-weight: 600;
}
.worksNo {
......@@ -221,7 +233,7 @@ export default {
}
}
.empty {
padding-top: 100px;
padding-top: 30px;
height: 300px;
.empty-icon {
......
......@@ -2,7 +2,9 @@
<div class="viewClass" v-if="formData">
<div class="btn-back" @click="backHandler"></div>
<div class="sys-container-panel content">
<div class="container-title">小选手:{{formData.name}}</div>
<div class="container-title">
<div>小选手:{{formData.name}}</div>
</div>
<div class="head-line"></div>
<div class="swipe">
<van-swipe :autoplay="5000">
......@@ -43,20 +45,24 @@
</div>
<div class="view-btn-group">
<div class="sys-btn-02" @click="selfPraiseHandler">投TA一票</div>
<div class="sys-btn-02" @click="praiseHandler">投TA一票</div>
<div class="sys-btn-02" @click="showShareHandler">呼叫亲友团</div>
</div>
<div class="btn-tips">*每用户每天仅能投票一次</div>
<biz-model v-model="model"></biz-model>
</div>
</template>
<script>
let urls = {
index: "/jiajiaCHApi/app/index",
praise: "/jiajiaCHApi/app/works/praise"
};
import { request } from "@/api/fetch-api";
import { request, httpGet } from "@/api/fetch-api";
import BizModel from "@/components/biz-model/biz-model";
import Vue from "vue";
import { Toast } from "vant";
......@@ -70,33 +76,43 @@ export default {
data() {
return {
formData: this.value.data,
isMy: this.value.isMy
isMy: this.value.isMy,
model: {
show: false,
title: "",
content: "",
index: "subcribe",
btnShow: false,
btnText: "",
confirmHandler: null,
labelBtnShow: false,
labelBtnText: "",
labelBtnHandler: null
}
};
},
methods: {
formEditHandler() {
this.$emit("edit");
},
selfPraiseHandler() {
// 自己点赞
let data = {
worksCode: this.formData.worksCode
};
praiseHandler() {
Toast.loading({
mask: true,
message: "数据提交..."
message: "请稍等..."
});
request
.post(urls.praise, data)
.then(res => {
httpGet({ url: urls.index }).then(res => {
if (res.isSubcribe == 1) {
let data = {
worksCode: this.formData.worksCode
};
request.post(urls.praise, data).then(res => {
Toast.clear();
this.$emit("praiseSuccess");
});
} else {
Toast.clear();
this.$emit("praiseSuccess");
})
.catch(res => {
let msg = res.data.errMsg;
Toast(msg);
});
this.model.show = true;
}
});
},
showShareHandler() {
// 出现分享层
this.$emit("showShare");
......@@ -104,6 +120,9 @@ export default {
backHandler() {
this.$emit("back");
}
},
components: {
BizModel
}
};
</script>
......@@ -234,8 +253,11 @@ export default {
}
}
.container-title {
.container-title div {
width: 350px;
margin: auto;
font-size: 28px;
font-weight: bold;
text-overflow: ellipsis;
overflow: hidden;
}
......@@ -268,6 +290,6 @@ export default {
position: fixed;
left: 0;
top: 30px;
z-index: 8000;
z-index: 1000;
}
</style>
......
......@@ -278,6 +278,6 @@ export default {
position: fixed;
left: 0;
top: 30px;
z-index: 8000;
z-index: 1000;
}
</style>
......
......@@ -3,21 +3,21 @@
<head-view></head-view>
<bottom-tool v-model="activityIndex"></bottom-tool>
<works-list-view
v-model="formData"
v-if="init"
v-show="listVisiabled"
v-on:showRule="showRuleHandler"
v-on:worksDetail="showWorksDetail"
></works-list-view>
<member-works-view
v-model="memberWorks"
v-if="init && !listVisiabled"
v-on:back="showWorksList"
v-on:praiseSuccess="praiseSuccessHandler"
v-on:showShare="shareModelVisiable=true"
></member-works-view>
<works-list-view
v-model="formData"
v-if="init"
v-show="listVisiabled"
v-on:showRule="showRuleHandler"
v-on:worksDetail="showWorksDetail"
></works-list-view>
<member-works-view
v-model="memberWorks"
v-if="init && !listVisiabled"
v-on:back="showWorksList"
v-on:praiseSuccess="praiseSuccessHandler"
v-on:showShare="shareModelVisiable=true"
></member-works-view>
<biz-model v-model="model"></biz-model>
......@@ -135,7 +135,19 @@ export default {
showWorksList() {
this.listVisiabled = true;
},
praiseSuccessHandler() {},
praiseSuccessHandler() {
this.model.show = true;
this.model.title = "点赞成功";
this.model.content = "您已获得一次抽奖机会";
this.model.btnShow = true;
this.model.btnText = "前往抽奖";
let that = this;
this.model.confirmHandler = function() {
that.$router.push("/draw");
};
this.model.labelBtnShow = false;
}
},
created() {
this.initActivity();
......
<template>
<div class="home">
<head-view></head-view>
<ViewModel
v-model="formData"
v-if="init && !formEdit"
v-on:edit="formEdit=true"
v-on:praiseSuccess="showPraiseSuccessModel"
v-on:showShare="shareModelVisiable=true"
></ViewModel>
<EditModel v-model="formData" v-if="init && formEdit" v-on:submit="showSuccessModel"></EditModel>
<div class="bottom-line"></div>
<bottom-tool v-model="activityIndex"></bottom-tool>
<biz-model v-model="model"></biz-model>
<!-- 分享蒙层 -->
<div class="shareModel" v-if="shareModelVisiable" @click="shareModelVisiable = false">
<div class="shareModelContainer">
<div class="shareModelMask"></div>
<div class="shareIcon"></div>
<div class="home">
<head-view></head-view>
<ViewModel
v-model="formData"
v-if="init && !formEdit"
v-on:edit="formEdit=true"
v-on:praiseSuccess="showPraiseSuccessModel"
v-on:showShare="shareModelVisiable=true"
></ViewModel>
<EditModel v-model="formData" v-if="init && formEdit" v-on:submit="showSuccessModel"></EditModel>
<div class="bottom-line"></div>
<bottom-tool v-model="activityIndex"></bottom-tool>
<biz-model v-model="model"></biz-model>
<!-- 分享蒙层 -->
<div class="shareModel" v-if="shareModelVisiable" @click="shareModelVisiable = false">
<div class="shareModelContainer">
<div class="shareModelMask"></div>
<div class="shareIcon"></div>
</div>
</div>
</div>
</div>
</template>
<script>
......@@ -134,6 +134,8 @@ export default {
let link = location.origin + location.pathname;
if (this.formData.worksCode) {
link += "?worksCode=" + this.formData.worksCode;
} else {
return;
}
let desc = this.formData.profile || null;
let imgurl =
......