Commit 15f62537 authored by 华国豪's avatar 华国豪 🙄

新增抽奖活动,私人订制(未绑定数据),实名认证

parent a622d114
This diff is collapsed.
......@@ -37,7 +37,7 @@ export default {
},null)
}
document.body.style.minWidth=(screen.availWidth-50)+'px';
this.$refs.wrap.wrap.addEventListener('scroll', this.handleScroll);
this.$refs.wrap.wrap.addEventListener('scroll', this.handleScroll);
let userInfo = this.getLocalStorage();
if(userInfo&&userInfo.account){
this.$store.commit('changeLogin',1);
......@@ -59,7 +59,7 @@ export default {
<style>
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_863923_lhegred4hm.css';
@import '//at.alicdn.com/t/font_863923_l5hnd05afw.css';
@import './assets/global/global.css';
body,html{
padding: 0px;
......
.PsSystem{padding-top: 20px;}
.PsSystem{padding-top: 20px; background-color: #F5F5F5;}
.PsSystem ._left{
min-height: 600px;
background-color: #F2F2F2;
background-color: #ffffff;
}
.PsSystem ._left ul{padding: 0;}
.PsSystem ._left ul li{list-style: none;}
......@@ -14,7 +14,7 @@
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
align-items: center;
padding:15px 20px;
justify-content: space-between;
}
......@@ -69,4 +69,148 @@
width: 100% !important;
}
.PsSystem .el-tag {margin-right: 10px;}
.PsSystem ._input_style ._tags{margin-right: 10px;}
\ No newline at end of file
.PsSystem ._input_style ._tags{margin-right: 10px;}
.PsSystem .Authentication ._real_name {
height: 70px;
}
.PsSystem .Authentication ._real_name ._rn_tit{
height: 58px;
font-size: 18px;
color: #5079ED;
background-color: white;
border:1px solid rgba(80,121,237,1);
text-align: center;
line-height: 58px;
cursor: pointer;
}
.PsSystem .Authentication ._real_name ._rn_tit._active{
background-color: #5079ED;
color: white;
font-weight: bold;
}
.kailong{
width:0;
height:0;
border-right: 10px solid transparent;
border-left: 10px solid transparent;
border-top: 10px solid #5079ed;
margin: 0 auto;
}
.Authentication ._at_tips{
height: 100px;
padding: 20px 100px;
background-color: white;
margin:20px 0px;
}
.Authentication ._at_tips p{
font-size: 12px;
color: #666666;
margin: 0;
}
.Authentication ._at_tips p._at_tips_tit{
font-size: 16px;
font-weight: bold;
color: #333333;
margin-bottom: 5px;
}
._up_box{
padding: 20px 100px 20px 100px;
background-color: white;
border-bottom: 1px solid #E6E6E6
}
.upload-demo{
height: 360px;
}
.upload-demo .el-upload-dragger{
height: 360px;
width: 260px;
}
.upload-demo_img{
height: 358px;
width: 258px;
}
._up_box_left,._up_box_right{
text-align: center;
}
._up_box_right img{
height: 358px;
width: 258px;
}
._up_box_left_tips,._up_box_right_tips{
font-size: 18px;
color: #666666;
margin: 10px;
}
._up_box_left_tips span,._up_box_right_tips span{
font-size: 18px;
color: #5079ED;
font-weight: bold
}
._up_box_right_tips span{
color: #666666;
}
._op_btn{
display: inline-block;
width: 100px;
height: 100px;
border-radius: 50%;
background-color: #5079ED;
color: white;
font-size: 54px;
font-weight: bolder;
line-height: 90px;
text-align: center;
position: absolute;
top: 130px;
left: 80px;
}
._op_btn:hover{
background-color: #2853CC;
}
.w215{
width: 215px;
}
.text_a_center{
text-align: center;
}
.upload-demo2 .el-upload-dragger{
width: 243px;
height: 152px;
}
.upload-demo_img2{
height: 150px;
}
._op_btn2{
left: 95px;
top: 45px;
width: 60px;
height: 60px;
line-height: 52px;
}
._up_box2{
padding-bottom: 0;
border: none;
}
._id_card .text_a_center{
background-color: white;
padding: 10px;
}
._link{
color: blue;
}
.Authentication_tips{
background-color: white;
text-align: center;
padding: 0px 0;
color: #999;
font-size: 14px;
padding: 40px;
}
.Authentication_tips p{
font-size: 18px;
padding:20px;
}
.Authentication_tips i.iconfont {
font-size: 120px;
color: #ccc;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -148,6 +148,62 @@
font-size: 12px;
color: white;
}
.pointer{
cursor: pointer;
}
.page_TurnaroundDraw .tips{
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.6);
position: fixed;
left: 0;
top: 0;
/* display: none; */
z-index: 2019;
}
.page_TurnaroundDraw .tips .bg{
width: 298px;
height: 353px;
margin: 0 auto;
background-image: url(../../assets/img/active/box_bg.png);
background-size: 100% 100%;
background-repeat: no-repeat;
margin-top: 10rem;
text-align: center;
position: relative;
}
.page_TurnaroundDraw .tips .bg p:nth-child(1){
color: #5F121A;
font-size: 22px;
width: 93%;
}
.page_TurnaroundDraw .tips .bg p:nth-child(2) {
color: #B43B48;
font-size: 16px;
width: 93%;
}
.page_TurnaroundDraw .tips .bg p:nth-child(3) {
position: absolute;
bottom: 2rem;
font-size: 1.5rem;
color: #FFFFFF;
width: 93%;
}
.page_TurnaroundDraw .tips ._close{
width: 3rem;
height: 3rem;
margin: 0 auto;
margin-top: 2rem;
color: #fff;
}
.page_TurnaroundDraw ._close img{
width: 100%;
}
.bg_box{
position: absolute;
top: 80px;
width: 100%;
}
</style>
<template>
......@@ -157,13 +213,13 @@
<div class="info_left">
<div class="turnplate">
<canvas class="item" id="wheelcanvas" ref="wheelcanvas" width="422px" height="422px"></canvas>
<img class="pointer" @click="startUp" src="../../assets/img/active/jt_2.png">
<img class="pointer" @click="turnplate.noBegun===true ? '' : startUp()" src="../../assets/img/active/jt_2.png">
</div>
<div class="Cushion">
<div class="trapezoid">
</div>
<p class="">抽奖次数: <span>02</span></p>
<p class="">抽奖次数: <span>{{remainingCount}}</span></p>
</div>
<div class="_scushion">
......@@ -244,6 +300,18 @@
</div>
</div>
</div>
<div class="tips" v-if="showTips">
<div class="bg">
<div class="bg_box">
<p class="status">{{text1}}</p>
<p class="your" v-if="text1 === '很遗憾'">{{text2}}</p>
<p v-else>获得奖品 <span class="reward">{{text2}}</span></p>
</div>
</div>
<div class="_close" @click="showTips = false">
<img src="../../assets/img/active/close.png" alt="">
</div>
</div>
</el-col>
</el-row>
</template>
......@@ -262,11 +330,12 @@ export default {
time: 2000,
noBegun: false
},
LotteryAward: [
{
name: "一等奖"
}
]
LotteryAward: [],
lotteryId: 0,
remainingCount: 0,
showTips: false,
text1: '很遗憾',
text2: '未中奖',
};
},
mounted() {
......@@ -290,25 +359,129 @@ export default {
"#FFFFFF",
"#5fcbd5"
];
this.drawRouletteWheel();
this.startmarquee('30', 20, 0, 'RollBox')
this.getChouJiang();
},
methods: {
getChouJiang: function () {
this.apiJavaPost('/api/sell/lottery/getB2bTaskLottery', {}, res=>{
let nowTime = this.getNowDate()
let LotteryAward = [];
let colors = [];
if(res.data.resultCode==1){
let data = res.data.data.lotteryAwardItem
if (data.length > 0) {
data.forEach((x, index) => {
LotteryAward.push({
name: x.awardName,
id: x.awardType
})
colors.push((index % 2 == 0) ? "#ffeebe" : "#ffbe04")
this.turnplate.noBegun = false
});
} else {
for (let i = 0; i < 6; i++) {
LotteryAward.push({
name: '暂无奖项',
id: 0
})
colors.push((i % 2 == 0) ? "#ffeebe" : "#ffbe04")
this.turnplate.noBegun = true
}
}
this.turnplate.restaraunts = LotteryAward;
this.turnplate.colors = colors;
this.lotteryId = res.data.data.id
this.LotteryAward = LotteryAward
this.getCishu()
}else{
this.Error(res.data.message);
for (let i = 0; i < 6; i++) {
LotteryAward.push({
name: '暂无奖项',
id: 0
})
colors.push((i % 2 == 0) ? "#ffeebe" : "#ffbe04")
this.turnplate.noBegun = true
}
this.turnplate.restaraunts = LotteryAward;
this.turnplate.colors = colors;
this.LotteryAward = LotteryAward
}
this.drawRouletteWheel();
this.startmarquee('30', 20, 0, 'RollBox')
},null)
},
getCishu: function () {
this.apiJavaPost('/api/sell/lottery/getLotteryRemainingCount',{lotteryId: this.lotteryId},res=>{
let nowTime = this.getNowDate()
if(res.data.resultCode==1){
this.remainingCount = res.data.data.remainingCount
}else{
this.Error(res.data.message);
}
},null)
},
startUp: function() {
var item = this.rnd(1, this.turnplate.restaraunts.length);
var angles = item * (360 / this.turnplate.restaraunts.length) - (360 / (this.turnplate.restaraunts.length*2));
if(angles<270){
angles = 270 - angles;
}else{
if (this.turnplate.bRotate || this.turnplate.noBegun) return;
if (this.remainingCount === 0 || !this.remainingCount) return this.$message.error("抽奖次数已用完")
this.apiJavaPost('/api/sell/lottery/getLotteryAward', {lotteryId: this.lotteryId}, res=>{
if (res.data.resultCode === 1) {
this.remainingCount = this.remainingCount - 1
if (res.data.data.winningType === 2) {
console.log('if',1111)
let _this = this;
this.LotteryAward.forEach((x, index) => {
if (x.id === 1) {
console.log('if',2222)
this.rotateFn(index + 1, res.data.awardName);
this.turnplate.bRotate = !this.turnplate.bRotate;
setTimeout(() => {
_this.text1= '很遗憾';
_this.text2= '未中奖';
this.showTips = true;
}, this.turnplate.time)
}
})
} else {
console.log('else',1111,res.data.data)
this.LotteryAward.forEach((x, index) => {
if (x.name === res.data.data.awardName) {
console.log('else',2222)
let _this = this;
this.rotateFn(index + 1, res.data.awardName);
this.turnplate.bRotate = !this.turnplate.bRotate;
setTimeout(() => {
if (res.data.data.winningType === 0) {
_this.text1= '很遗憾';
_this.text2= '未中奖';
} else if (res.data.data.winningType === 1) {
_this.text1= '恭喜你';
_this.text2= res.data.data.awardName;
}
_this.showTips = true;
}, this.turnplate.time)
}
})
}
}
}, null)
},
rotateFn: function (item, txt) {
console.log(item)
let _this = this
var angles = item * (360 / this.turnplate.restaraunts.length) - (360 / (this.turnplate.restaraunts.length * 2));
if (angles < 270) {
angles = 270 - angles;
} else {
angles = 360 - angles + 270;
}
$('#wheelcanvas').stopRotate();
$('#wheelcanvas').rotate({
angle:0,
animateTo:angles+1800,
duration:8000,
callback:function (){ //回调
alert('恭喜中奖了');
$('#wheelcanvas').rotate({
angle: 0,
animateTo: angles + 1800,
duration: _this.turnplate.time,
callback: function () { //回调
_this.turnplate.bRotate = false
}
});
},
......@@ -387,9 +560,8 @@ export default {
} else {
ctx.fillStyle = "#E5302F";
}
//----绘制奖品开始----
var text = _this.turnplate.restaraunts[i];
var text = _this.turnplate.restaraunts[i].name;
var line_height = 17;
//translate方法重新映射画布上的 (0,0) 位置
ctx.translate(
......
This diff is collapsed.
This diff is collapsed.
......@@ -82,13 +82,13 @@ color:rgba(51,51,51,1);
</el-col>
<el-col :span="14" :offset="1">
<el-menu :default-active='defaultKey' class="el-menu-demo small" mode="horizontal" background-color="rgba(0,0,0,0)" active-text-color="#EF4455" @select='handleSelect'>
<el-submenu index="1">
<!-- <el-submenu index="1">
<template slot="title">旅游</template>
<el-menu-item index="2-1">跟团游</el-menu-item>
<el-menu-item index="2-2">一日游</el-menu-item>
<!-- <el-menu-item index="2-3">单团</el-menu-item>
<el-menu-item index="2-4">私人订制</el-menu-item> -->
</el-submenu>
</el-submenu> -->
<el-menu-item index="2-1" @click="handleSelect('2-1',false)"><a href="javascript:void(0);">跟团游</a></el-menu-item>
<el-menu-item index="2-2" @click="handleSelect('2-2',true)"><a href="javascript:void(0);">当地游</a></el-menu-item>
<el-menu-item index="3" @click="goUrl('TicketHome',true)"><a href="javascript:void(0);">机票</a></el-menu-item>
<el-menu-item index="4" @click="goUrl('VisaHomePage',true)"><a href="javascript:void(0);">签证</a></el-menu-item>
<el-menu-item index="5" @click="goUrl('IndependentTravel',true)"><a href="javascript:void(0);">自由行</a></el-menu-item>
......
......@@ -65,6 +65,10 @@
._coupon_box ._coupon_item.blue._active{
background-color: #6776D2;
}
._coupon_box ._coupon_item.disab,._coupon_box ._coupon_item.blue.disab ._repeat,._coupon_box ._coupon_item.blue.disab ._info_time{
background-color: #C3C3C3 !important;
color: #777777 !important
}
._coupon_box ._coupon_item ._time{
color: #A7711C !important;
}
......@@ -138,6 +142,14 @@
margin: 0 !important;
color: gray !important;
}
._trip_xiangqing_tips{
color: red !important;
font-size: 14px !important;
}
._trip_xiangqing_tips span{
color: #3965B0;
cursor: pointer;
}
</style>
<template>
<div class="trade" v-loading="loadingDataList">
......@@ -274,8 +286,9 @@
</el-col>
<el-col class="_trip_xiangqing _coupon_box">
<p style="width:100%">优惠券</p>
<p v-if="Verification[0].ApplyState !== 2" class="_trip_xiangqing_tips">您还为进行 <span @click="goShenqing">实名认证</span>,认证后可使用优惠券哦~如果已提认证申请,申请审核通过后即可使用优惠券!</p>
<div v-if="UserCanUseCouponList.length>0" class="_coupon_box">
<div class="_coupon_item" v-for="(item, index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active}" @click="clickCoupon(item)">
<div class="_coupon_item" v-for="(item, index) in UserCanUseCouponList" :class="{'blue':item.couponsType===1,'_active':item.active,'disab': Verification[0].ApplyState !== 2}" @click="Verification[0].ApplyState !== 2 ? '' : clickCoupon(item)">
<div class="_left_raduis">
<span></span>
<span></span>
......@@ -325,6 +338,7 @@
需要你登录以后才能预定哦!登录后还能享受更加优惠的价格,<span class="link" @click="goLogin">立即登录吧</span>
</div>
</div>
<a :href='blankUrl' id='blankLink' target="_blank" style="display:none">1</a>
<!-- <div class="_invoice">
<p>发票信息</p>
<div class="_is_invoice">
......@@ -495,6 +509,7 @@ export default {
UserCanUseCouponList: [],
CouponList: [],
CouponIds: '',
Verification: '',
}
},
watch: {
......@@ -526,8 +541,22 @@ export default {
this.chosenObj.startDate = this.numPeople.startDate
this.Remarks = this.numPeople.remark
this.getList(this.numPeople.startDate)
let userInfo = this.getLocalStorage();
this.apipost("app_customer_GetCertificationModel", { CustomerID: userInfo.customerId }, res => {
if (res.data.resultCode == 1) {
this.Verification = res.data.data
} else {
this.$message.error(res.data.message);
}
},err => {});
},
methods: {
goShenqing: function () {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}`
//console.log(that.$refs.blankLink.click())
dom.click()
},
clickCoupon: function (item) {
let list = [];
if (!item.active) { // 是否选中
......
......@@ -13,6 +13,7 @@ import VueLazyload from 'vue-lazyload'
import htmlToPdf from './assets/utils/htmlToPdf'
import commonUtils from './assets/utils/commonUtils'
import moment from 'moment'
import co from 'co'
// 使用Vue.use()方法就会调用工具方法中的install方法
Vue.use(htmlToPdf)
......@@ -114,7 +115,41 @@ Vue.filter("YMD", function (date) {
return moment(date).format("YYYY-MM-DD");
})
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
var pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
})
}
}).catch(function (err) {
console.log("上传文件出错" + err);
});
}
}
new Vue({
router,
store,
......
......@@ -16,8 +16,8 @@ export default {
// var domainUrl = "http://192.168.2.16:8083"//主域名
// let domainUrl = "https://reborn.oytour.com"; //刘东主域名
// let domainUrl = "https://reborn.oytour.com";
var domainUrl = "http://test.viitto.com"
let domainUrl = "https://reborn.oytour.com";
// var domainUrl = "http://test.viitto.com"
domainUrl = "http://192.168.2.214:8082"
let locationName = window.location.hostname;
if (this.isOnline()) {
......@@ -31,7 +31,7 @@ export default {
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://47.96.12.235:9000" : "http://192.168.2.215:9000",
javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000",
ViittoFileUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://imgfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
......
......@@ -150,6 +150,15 @@ export default new Router({
title: "系统管理"
}
},
{
path: "/PsSystem/:type",
name: "PsSystem",
component: resolve =>
require(["@/components/PersonalCenter/PsSystem"], resolve),
meta: {
title: "系统管理"
}
},
{
path: "/PsAccBalance",
name: "PsAccBalance",
......@@ -308,6 +317,15 @@ export default new Router({
title: "自由行"
}
},
{
path: "/PersonalTailor",
name: "PersonalTailor",
component: resolve =>
require(["@/components/DependentTravel/PersonalTailor"], resolve),
meta: {
title: "私人定制"
}
},
]
},
......
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