新增房间流水登入

This commit is contained in:
Dragon
2023-07-26 18:03:32 +08:00
parent fda137edd4
commit effa4fc182
10 changed files with 926 additions and 117 deletions

View File

@@ -0,0 +1,214 @@
html,
body {
width: 100%;
}
.back {
position: fixed;
z-index: 9;
width: 0.7466666667rem;
height: 0.7466666667rem;
left: 0.5333333333rem;
top: 0.6666666667rem;
display: none;
}
.header {
width: 100%;
height: 8.88rem;
background: url(../images/login/bg.png) no-repeat;
background-size: 100% 100%;
position: relative;
margin: 0 auto -2rem;
}
.header .logo {
position: absolute;
width: 5.7066666667rem;
height: 5.7066666667rem;
left: 50%;
top: 2.4266666667rem;
transform: translateX(-50%);
}
.box {
width: 10rem;
height: 14.6133333333rem;
border-radius: 0.6666666667rem 0.6666666667rem 0px 0px;
margin: 0 auto;
position: relative;
z-index: 2;
background: #fff;
overflow: hidden;
}
.box input {
background: transparent;
border: none;
outline: none;
box-sizing: border-box;
padding: 0 0.64rem;
}
.box input::placeholder {
font-size: 0.3733333333rem;
color: #8A8CAB;
}
.box .idLogin .id {
width: 8.08rem;
height: 1.3866666667rem;
background: #F3F5FA;
border-radius: 1.3866666667rem;
margin: 1.28rem auto 0.5333333333rem;
display: block;
}
.box .idLogin .password {
width: 8.08rem;
height: 1.3866666667rem;
background: #F3F5FA;
border-radius: 1.3866666667rem;
margin: 0rem auto 1.0666666667rem;
display: block;
}
.box .phone {
display: none;
}
.box .phone .phoneNumberBox {
width: 8.08rem;
height: 1.3866666667rem;
background: #F3F5FA;
border-radius: 1.3866666667rem;
margin: 1.28rem auto 0.5333333333rem;
box-sizing: border-box;
padding-left: 0.64rem;
}
.box .phone .phoneNumberBox .prefix {
float: left;
font-size: 0.4266666667rem;
color: #1F1B4F;
font-weight: bold;
height: 100%;
line-height: 1.3866666667rem;
}
.box .phone .phoneNumberBox .prefix b {
font-size: 0.4266666667rem;
color: #1F1B4F;
font-weight: bold;
margin-right: 0.1066666667rem;
}
.box .phone .phoneNumberBox .prefix img {
display: inline-block;
width: 0.32rem;
height: 0.2133333333rem;
vertical-align: middle;
}
.box .phone .phoneNumberBox .phoneNumber {
float: right;
height: 100%;
padding: 0;
width: 5.5rem;
}
.box .phone .codeBox {
width: 8.08rem;
height: 1.3866666667rem;
background: #F3F5FA;
border-radius: 1.3866666667rem;
margin: 0rem auto 1.0666666667rem;
}
.box .phone .codeBox .code {
float: left;
width: 5rem;
height: 100%;
}
.box .phone .codeBox .codeBut {
text-align: center;
color: #FFFFFF;
font-size: 0.3733333333rem;
border-radius: 1.0133333333rem;
width: 2.72rem;
height: 1.0133333333rem;
line-height: 1.0133333333rem;
float: right;
margin-top: 0.1866666667rem;
margin-right: 0.2133333333rem;
background: #9168FA;
}
.box .phone .codeBox .codeButTime {
background: #DED1FD;
}
.box .but {
width: 8.08rem;
height: 1.28rem;
border-radius: 1.28rem;
line-height: 1.28rem;
text-align: center;
color: #FFFFFF;
font-size: 0.4266666667rem;
margin: 0 auto 0.5333333333rem;
background: linear-gradient(90deg, #EEDCFF 0%, #DEE4FF 50%, #CCF8F9 100%);
}
.box .butok {
background: linear-gradient(90deg, #5AECFA 0%, #9DB4FF 49%, #CF70FF 100%);
}
.box .hone {
width: 8.08rem;
height: 1.28rem;
border-radius: 1.28rem;
line-height: 1.28rem;
text-align: center;
color: #9168FA;
font-size: 0.4266666667rem;
margin: 0 auto 0.5333333333rem;
background: linear-gradient(270deg, #FAEDFF 0%, #E6FDFF 100%);
border: 1px solid #D480FF;
}
.area {
position: fixed;
z-index: 99;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
display: none;
}
.area .box {
width: 100%;
height: 8.88rem;
border-radius: 0.7466666667rem 0.7466666667rem 0 0;
background: #fff;
position: absolute;
bottom: 0;
left: 0;
}
.area .box p {
width: 100%;
text-align: center;
height: 1.8133333333rem;
line-height: 1.8133333333rem;
border-bottom: 0.0133333333rem solid #EBEEF5;
font-size: 0.48rem;
font-weight: bold;
color: #1F1B4F;
}
.area .box .list {
position: absolute;
left: 0;
top: 1.8133333333rem;
overflow-y: scroll;
width: 100%;
height: 7rem;
}
.area .box .list span {
display: block;
width: 100%;
height: 1.36rem;
line-height: 1.36rem;
font-size: 0.4266666667rem;
border-bottom: 0.0133333333rem solid #EBEEF5;
text-align: center;
color: #1F1B4F;
}
.area .box .list .active {
background: #F3F5FA;
}
/*# sourceMappingURL=login.css.map */

View File

@@ -0,0 +1,244 @@
@function px2rem($px, $rem:75) {
@return $px / $rem+rem;
}
html,
body {
width: 100%;
}
.back {
position: fixed;
z-index: 9;
width: px2rem(56, );
height: px2rem(56, );
left: px2rem(40, );
top: px2rem(50, );
display: none;
}
.header {
width: 100%;
height: px2rem(666, );
background: url(../images/login/bg.png) no-repeat;
background-size: 100% 100%;
position: relative;
margin: 0 auto -2rem;
.logo {
position: absolute;
width: px2rem(428, );
height: px2rem(428, );
left: 50%;
top: px2rem(182, );
transform: translateX(-50%);
}
}
.box {
width: px2rem(750, );
height: px2rem(1096, );
border-radius: px2rem(50, ) px2rem(50, ) 0px 0px;
margin: 0 auto;
position: relative;
z-index: 2;
background: #fff;
overflow: hidden;
input {
background: transparent;
border: none;
outline: none;
box-sizing: border-box;
padding: 0 px2rem(48, );
&::placeholder {
font-size: px2rem(28, );
color: #8A8CAB;
}
}
.idLogin {
.id {
width: px2rem(606, );
height: px2rem(104, );
background: #F3F5FA;
border-radius: px2rem(104, );
margin: px2rem(96, ) auto px2rem(40, );
display: block;
}
.password {
width: px2rem(606, );
height: px2rem(104, );
background: #F3F5FA;
border-radius: px2rem(104, );
margin: px2rem(0, ) auto px2rem(80, );
display: block;
}
}
.phone {
display: none;
.phoneNumberBox {
width: px2rem(606, );
height: px2rem(104, );
background: #F3F5FA;
border-radius: px2rem(104, );
margin: px2rem(96, ) auto px2rem(40, );
box-sizing: border-box;
padding-left: px2rem(48, );
.prefix {
float: left;
font-size: px2rem(32, );
color: #1F1B4F;
font-weight: bold;
height: 100%;
line-height: px2rem(104, );
b {
font-size: px2rem(32, );
color: #1F1B4F;
font-weight: bold;
margin-right: px2rem(8, );
}
img {
display: inline-block;
width: px2rem(24, );
height: px2rem(16, );
vertical-align: middle;
}
}
.phoneNumber {
float: right;
height: 100%;
padding: 0;
width: 5.5rem;
}
}
.codeBox {
width: px2rem(606, );
height: px2rem(104, );
background: #F3F5FA;
border-radius: px2rem(104, );
margin: px2rem(0, ) auto px2rem(80, );
.code {
float: left;
width: 5rem;
height: 100%;
}
.codeBut {
text-align: center;
color: #FFFFFF;
font-size: px2rem(28, );
border-radius: px2rem(76, );
width: px2rem(204, );
height: px2rem(76, );
line-height: px2rem(76, );
float: right;
margin-top: px2rem(14, );
margin-right: px2rem(16, );
background: #9168FA;
}
.codeButTime {
background: #DED1FD;
}
}
}
.but {
width: px2rem(606, );
height: px2rem(96, );
border-radius: px2rem(96, );
line-height: px2rem(96, );
text-align: center;
color: #FFFFFF;
font-size: px2rem(32, );
margin: 0 auto px2rem(40, );
background: linear-gradient(90deg, #EEDCFF 0%, #DEE4FF 50%, #CCF8F9 100%);
}
.butok {
background: linear-gradient(90deg, #5AECFA 0%, #9DB4FF 49%, #CF70FF 100%);
}
.hone {
width: px2rem(606, );
height: px2rem(96, );
border-radius: px2rem(96, );
line-height: px2rem(96, );
text-align: center;
color: #9168FA;
font-size: px2rem(32, );
margin: 0 auto px2rem(40, );
background: linear-gradient(270deg, #FAEDFF 0%, #E6FDFF 100%);
border: 1px solid #D480FF;
}
}
.area {
position: fixed;
z-index: 99;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, .6);
display: none;
.box {
width: 100%;
height: px2rem(666, );
border-radius: px2rem(56, ) px2rem(56, ) 0 0;
background: #fff;
position: absolute;
bottom: 0;
left: 0;
p {
width: 100%;
text-align: center;
height: px2rem(136, );
line-height: px2rem(136, );
border-bottom: px2rem(1, ) solid #EBEEF5;
font-size: px2rem(36, );
font-weight: bold;
color: #1F1B4F;
}
.list {
position: absolute;
left: 0;
top: px2rem(136, );
overflow-y: scroll;
width: 100%;
height: 7rem;
span {
display: block;
width: 100%;
height: px2rem(102, );
line-height: px2rem(102, );
font-size: px2rem(32, );
border-bottom: px2rem(1, ) solid #EBEEF5;
text-align: center;
color: #1F1B4F;
}
.active {
background: #F3F5FA;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

View File

@@ -0,0 +1,259 @@
let urlPrefix = getUrlPrefix()
let browser = checkVersion()
var urlData = getQueryString();
let env = EnvCheck();
if (env == 'test') {
new VConsole();
}
// 封裝layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
layer.open({
type: 2,
shadeClose: false,
content,
success (e) {
layerIndex = $(e).attr('index')
}
})
}
const hideLoading = (index) => {
layer.close(index)
}
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
var idOrPhone = true;//判斷id登入或手機號登入
var times = 0;//倒計時計時器
var isClick = true;//判斷是否再次獲取驗證碼
var token;
$(function () {
setTimeout(function () {
getInfoFromClient()
setTimeout(function () {
getAreaInfo();
}, 100)
})
})
// 獲取驗證碼接口
function getCode () {
var mobileDes = encryptDes(`${$('.box .phone .phoneNumberBox .prefix b').text()}${$('.box .phone .phoneNumberBox .phoneNumber').val()}`, '1ea53d260ecf11e7b56e00163e046a26');
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/sms/getCode',
headers: { "pub_uid": "0" },
data: { mobile: mobileDes, phoneAreaCode: $('.box .phone .phoneNumberBox .prefix b').text(), type: 2 },
success (res) {
if (res.code === 200) {
toastMsg(res.message);
$('.box .phone .codeBox .codeBut').addClass('codeButTime')
timerFun()
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// ticket接口
function ticket () {
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/oauth/ticket',
data: { issue_type: "multi", access_token: token },
success (res) {
if (res.code === 200) {
sessionStorage.setItem("uid", res.data.uid);
sessionStorage.setItem("ticket", res.data.tickets[0].ticket);
window.location.href = `./serial.html?codes=${urlData.codes}==`
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 登入接口
function oauthToken () {
if (idOrPhone) {
var phone = encryptDes($('.box .idLogin .id').val(), '1ea53d260ecf11e7b56e00163e046a26');
var password = encryptDes($('.box .idLogin .password').val(), '1ea53d260ecf11e7b56e00163e046a26');
} else {
var phone = $('.box .phone .phoneNumberBox .phoneNumber').val();
var code = $('.box .phone .codeBox .code').val();
var phoneAreaCode = $('.box .phone .phoneNumberBox .prefix b').text();
}
showLoading()
networkRequest({
type: 'POST',
url: urlPrefix + '/oauth/h5/token',
data: idOrPhone ? {
"grant_type": "password", phone, password,
} :
{ grant_type: 'verify_code', phoneAreaCode, phone: `${phoneAreaCode}${phone}`, code, },
success (res) {
if (res.code === 200) {
token = res.data.access_token;
// ticket();
sessionStorage.setItem("uid", res.data.uid);
sessionStorage.setItem("ticket", token);
window.location.href = `./serial.html?codes=${urlData.codes}==`
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 區號接口
function getAreaInfo () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/areaInfo/list',
success (res) {
if (res.code === 200) {
var str = '';
res.data.forEach((res, i) => {
str += `
<span>${res.name} +${res.phoneAreaCode}</span>
`
});
$('.area .box .list').append(str);
$('.area .box .list span').click(function () {
$('.box .phone .phoneNumberBox .prefix b').text($(this).text().replace(/[^0-9]/gi, ''));
$(this).addClass('active').siblings().removeClass('active');
})
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
// 點擊獲取驗證碼
$('.box .phone .codeBox .codeBut').click(function () {
var val = $('.box .phone .phoneNumberBox .phoneNumber').val();
if (val == '') {
toastMsg('請輸入手機號')
return
}
if (isClick) {
getCode()
}
})
// 倒計時
function timerFun () {
isClick = false;
times = 59;
// 開啟定時器
var timer = setInterval(function () {
// 判斷剩余秒數
if (times == 0) {
// 清除定時器和復原按鈕
clearInterval(timer);
$('.box .phone .codeBox .codeBut').text('獲取驗證碼');
$('.box .phone .codeBox .codeBut').removeClass('codeButTime')
isClick = true;
} else {
$('.box .phone .codeBox .codeBut').text(`${times}`);
times--;
}
}, 1000);
}
// 切換登入方式按鈕
$('.box .hone').click(function () {
idOrPhone = !idOrPhone;
$('.box .phone .phoneNumberBox .phoneNumber,.box .phone .codeBox .code,.box .idLogin .id,.box .idLogin .password').val('');
$('.box .but').removeClass('butok');
if (idOrPhone) {
$('.idLogin').show();
$('.phone').hide();
$('.box .hone').text('Peko手機號登錄');
} else {
$('.phone').show();
$('.idLogin').hide();
$('.box .hone').text('Peko賬號登錄');
}
})
// 打開選擇區號
$('.box .phone .phoneNumberBox .prefix').click(function () {
$('.area').show();
return false;
})
// 關閉選擇區號
$('.area').click(function () {
$('.area').hide();
return false;
})
//監聽是否可以登入函數
function phoneFun () {
var num1 = $(".box .idLogin .id").val();
var num2 = $(".box .idLogin .password").val();
var num3 = $(".box .phone .phoneNumberBox .phoneNumber").val();
var num4 = $(".box .phone .codeBox .code").val();
if (num1 != '' && num2 != '' || num3 != '' && num4 != '') {
$('.box .but').addClass('butok');
return true;
} else {
$('.box .but').removeClass('butok');
return false;
}
}
// 監聽賬號輸入
$(".box .idLogin .id").on("keyup", function () {
phoneFun()
});
// 監聽密碼輸入
$(".box .idLogin .password").on("keyup", function () {
phoneFun()
});
// 監聽手機號輸入
$(".box .phone .phoneNumberBox .phoneNumber").on("keyup", function () {
phoneFun()
});
// 監聽驗證碼輸入
$(".box .phone .codeBox .code").on("keyup", function () {
phoneFun()
});
// 登入按鈕
$('.box .but').click(function () {
if (phoneFun()) {
oauthToken();
}
})
//DES加密
const encryptDes = (message, key) => {
var keyHex = CryptoJS.enc.Utf8.parse(key);
var encrypted = CryptoJS.DES.encrypt(message, keyHex, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return encrypted.toString();
}

View File

@@ -6,121 +6,147 @@ let info = {}
let sevenDaysAgo = 0 let sevenDaysAgo = 0
let start = 0, end = 0, urlData = '1', env = EnvCheck() let start = 0, end = 0, urlData = '1', env = EnvCheck()
$(function () { $(function () {
if (env == 'test') { getInfoFromClient()
var vConsole = new VConsole(); if (env == 'test') {
} var vConsole = new VConsole();
//初始化时间插件
//给月份加个0
function dateFormat(date) {
if (date >= 10) return date
return '0' + date
}
//点击弹窗
$('.check1').on('click', function () {
$('.pop1').fadeOut(100)
})
// 获取uid ticket
let main = {
init() {
//获取uid
this.getUid();
//初始化时间插件
this.initTime()
//调用接口,拿到下载链接
this.getUrl()
},
getUid() {
if (browser.app) {
if (browser.ios) {
info.uid = tools.cookieUtils.get('uid');
window.webkit.messageHandlers.getTicket.postMessage(null);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
info.uid = parseInt(window.androidJsObj.getUid());
info.ticket = window.androidJsObj.getTicket();
}
}
}
},
initTime() {
$.selectYY_MM_DD("#select_0", {}, function (data) {
let time = `${data.year}-${data.month}-${data.day}`
$('#select_0').html(time)
start = time
sevenDaysAgo = new Date(time).getTime()
})
$.selectYY_MM_DD("#select_1", {}, function (data) {
let time = `${data.year}-${data.month}-${data.day}`
$('#select_1').html(time)
end = time
now = new Date(time).getTime()
})
},
getUrl() {
$('.button').on('click', function () {
let headers;
if (browser.app) {
headers = {
'pub_ticket': info.ticket,
'pub_uid': info.uid,
}
} else {
headers = {
'h5_token': window.sessionStorage.getItem('ticket'),
'pub_uid': window.sessionStorage.getItem('uid'),
}
}
console.log(headers, 'need login')
let nowTime0 = new Date().getUTCFullYear()
let nowTime1 = dateFormat(new Date().getMonth() + 1)
let nowTime2 = new Date().getDate()
let nowTime = new Date(`${nowTime0}-${nowTime1}-${nowTime2}`).getTime()
if (!sevenDaysAgo || !now) {
return $('.toast').html('请选择时间').stop().fadeIn(0).fadeOut(4000)
}
if (sevenDaysAgo > now) {
return $('.toast').html('起始时间应该小于等于最终时间').stop().fadeIn(0).fadeOut(4000)
} else if (now - sevenDaysAgo > 518400000) {
$('.toast').html('时间间隔在7天之内').stop().fadeIn(0).fadeOut(4000)
} else if (nowTime === now) {
$('.toast').html(`结束时间最晚应该是${nowTime0}-${nowTime1}-${nowTime2 - 1}`).stop().fadeIn(0).fadeOut(4000)
}
else {
$.ajax({
url: queryObj.isSingle ? "/room/revenue/singleroom/exportExcel" : "/room/revenue/exportExcel",
type: 'get',
headers: headers,
data: {
end: end,
start: start,
erbanNo: getQueryString().erbanNo
},
success(res) {
urlData = res.data.url
$('.pop1').fadeIn(100)
$.copy({
text: "复制成功", //分享提示文案
copyUrl: urlData, //自定义复制链接地址
tipTime: 1000, //分享提示消失时间
copyId: "#confirm1" //复制按钮id
});
},
error(err) {
console.log(err)
// $('.pop1').fadeIn(100)
// urlData = '55555'
}
})
}
})
} }
}
main.init() //初始化时间插件
//点击获取下载链接
//给月份加个0
function dateFormat (date) {
if (date >= 10) return date
return '0' + date
}
//点击弹窗
$('.check1').on('click', function () {
$('.pop1').fadeOut(100)
})
// 获取uid ticket
let main = {
init () {
//获取uid
this.getUid();
//初始化时间插件
this.initTime()
//调用接口,拿到下载链接
this.getUrl()
},
getUid () {
if (browser.app) {
if (browser.ios) {
info.uid = tools.cookieUtils.get('uid');
window.webkit.messageHandlers.getTicket.postMessage(null);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
info.uid = parseInt(window.androidJsObj.getUid());
info.ticket = window.androidJsObj.getTicket();
}
}
}
},
initTime () {
$.selectYY_MM_DD("#select_0", {}, function (data) {
let time = `${data.year}-${data.month}-${data.day}`
$('#select_0').html(time)
start = time
sevenDaysAgo = new Date(time).getTime()
})
$.selectYY_MM_DD("#select_1", {}, function (data) {
let time = `${data.year}-${data.month}-${data.day}`
$('#select_1').html(time)
end = time
now = new Date(time).getTime()
})
},
getUrl () {
$('.button').on('click', function () {
let headers;
if (browser.app) {
headers = {
'pub_ticket': info.ticket,
'pub_uid': info.uid,
}
} else {
headers = {
'h5_token': window.sessionStorage.getItem('ticket'),
'pub_uid': window.sessionStorage.getItem('uid'),
}
}
console.log(headers, 'need login')
let nowTime0 = new Date().getUTCFullYear()
let nowTime1 = dateFormat(new Date().getMonth() + 1)
let nowTime2 = new Date().getDate()
let nowTime = new Date(`${nowTime0}-${nowTime1}-${nowTime2}`).getTime()
if (!sevenDaysAgo || !now) {
return $('.toast').html('请选择时间').stop().fadeIn(0).fadeOut(4000)
}
if (sevenDaysAgo > now) {
return $('.toast').html('起始时间应该小于等于最终时间').stop().fadeIn(0).fadeOut(4000)
} else if (now - sevenDaysAgo > 518400000) {
$('.toast').html('时间间隔在7天之内').stop().fadeIn(0).fadeOut(4000)
} else if (nowTime === now) {
$('.toast').html(`结束时间最晚应该是${nowTime0}-${nowTime1}-${nowTime2 - 1}`).stop().fadeIn(0).fadeOut(4000)
}
else {
// $.ajax({
// url: queryObj.isSingle ? "/room/revenue/singleroom/exportExcel" : "/room/revenue/exportExcel",
// type: 'get',
// headers: headers,
// data: {
// end: end,
// start: start,
// erbanNo: getQueryString().erbanNo
// },
// success (res) {
// urlData = res.data.url
// $('.pop1').fadeIn(100)
// $.copy({
// text: "复制成功", //分享提示文案
// copyUrl: urlData, //自定义复制链接地址
// tipTime: 1000, //分享提示消失时间
// copyId: "#confirm1" //复制按钮id
// });
// },
// error (err) {
// console.log(err)
// // $('.pop1').fadeIn(100)
// // urlData = '55555'
// }
// })
networkRequest({
type: 'GET',
url: queryObj.isSingle ? getUrlPrefix() + "/room/revenue/singleroom/exportExcel" : getUrlPrefix() + "/room/revenue/exportExcel",
data: {
end: end,
start: start,
erbanNo: getQueryString().erbanNo
},
success (res) {
if (res.code === 200) {
urlData = res.data.url
$('.pop1').fadeIn(100)
$.copy({
text: "复制成功", //分享提示文案
copyUrl: urlData, //自定义复制链接地址
tipTime: 1000, //分享提示消失时间
copyId: "#confirm1" //复制按钮id
});
} else {
}
},
error (err) {
console.log(err)
}
})
}
})
}
}
main.init()
//点击获取下载链接
}) })
function getMessage(key, value) { function getMessage (key, value) {
info[key] = value; info[key] = value;
} }

View File

@@ -60,7 +60,7 @@ $(function () {
}, },
getDataFromBack: function () { getDataFromBack: function () {
var api = locateJudge(); var api = getUrlPrefix();
setTimeout(function () { setTimeout(function () {
// $.get('https://beta.api.pekolive.com//room/serials?codes=ZjU2ZTQ=', function (res) { // $.get('https://beta.api.pekolive.com//room/serials?codes=ZjU2ZTQ=', function (res) {
$.get(api + '/room/serials', { codes: queryString.codes + '=' }, function (res) { $.get(api + '/room/serials', { codes: queryString.codes + '=' }, function (res) {

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>登入</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/login.css">
</head>
<body>
<!-- 返回 -->
<img src="./images/back.png" alt="" class="back">
<!-- 頭部 -->
<div class="header">
<img src="./images/login/logo.png" alt="" class="logo">
</div>
<!-- 底部登入 -->
<div class="box">
<!-- 賬號登入 -->
<div class="idLogin">
<input type="number" class="id" placeholder="請輸入Peko賬號">
<input type="password" class="password" placeholder="請輸入密碼">
</div>
<!-- 手機號登入 -->
<div class="phone">
<div class="phoneNumberBox">
<div class="prefix">
+<b>852</b><img src="./images/login/more.png" alt="" class="more">
</div>
<input type="number" class="phoneNumber" placeholder="請輸入手機號">
</div>
<div class="codeBox">
<input type="number" class="code" placeholder="請獲取驗證碼">
<div class="codeBut">獲取驗證碼</div>
</div>
</div>
<!-- 登入按鈕 -->
<div class="but">登錄</div>
<div class="hone">Peko手機號登錄</div>
</div>
<!-- 區號選擇 -->
<div class="area">
<div class="box">
<p>請選擇區號</p>
<div class="list">
<!-- <span>123123</span> -->
</div>
</div>
</div>
</body>
</html>
<script src="../../common/js/flexible.js"></script>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="../../common/js/svga.min.js"></script>
<script src="../../common/js/crypto-js.js"></script>
<script src="./js/login.js?v=1.0"></script>

View File

@@ -46,7 +46,7 @@
<!-- <a href="http://image.uat.zhongjialx.com/room_revenue/room_954178_20200515_20200515.xlsx"></a> --> <!-- <a href="http://image.uat.zhongjialx.com/room_revenue/room_954178_20200515_20200515.xlsx"></a> -->
</body> </body>
<script src="../../common/js/jquery-3.2.1.min.js"></script> <script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common.js"></script> <script src="../../common/js/common2.js"></script>
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="./js/mobileSelect.js"></script> <script src="./js/mobileSelect.js"></script>
<script src="./js/selectDate.js"></script> <script src="./js/selectDate.js"></script>