init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,194 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>条形码</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
background: #fcfcfc;
|
||||
}
|
||||
.all {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-code-banner {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
}
|
||||
.card-code-background {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.card-code-background > img {
|
||||
width: 100%;
|
||||
}
|
||||
.card-code-name {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
padding-left: 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 80px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.card-details {
|
||||
position: absolute;
|
||||
top: 76px;
|
||||
background: white;
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
padding: 50px 0;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-details-up {
|
||||
text-align: center;
|
||||
}
|
||||
.card-code-num {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.card-code {
|
||||
width: 80%;
|
||||
height: 50px;
|
||||
border: 1px solid #FAFAFA;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.card-details-down {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: orangered;
|
||||
font-size: 16px;
|
||||
}
|
||||
.card-details-down-img > img {
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.code-container{
|
||||
/*width: 244px;*/
|
||||
height: 70px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
.gray-code{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(47, 50, 56, 0.35);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
line-height: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div class="card-code-banner">
|
||||
<div class="card-code-background">
|
||||
<img src="__PUBLIC__/paper/images/card_background.png" alt="">
|
||||
</div>
|
||||
<div class="card-code-name">{{card_name}}</div>
|
||||
</div>
|
||||
<div class="card-details">
|
||||
<div class="card-details-up" v-if="use_code">
|
||||
<div v-if="show_tips" class="code-container">
|
||||
<div class="gray-code">请重新刷新</div>
|
||||
</div>
|
||||
<div v-else class="code-container">
|
||||
<img v-barcode="{'value':use_code}"/>
|
||||
</div>
|
||||
<div class="card-code-num">{{use_code}}</div>
|
||||
</div>
|
||||
<div class="card-details-down">
|
||||
<div class="card-details-down-img">
|
||||
<img src="__PUBLIC__/paper/images/push.png" alt="">
|
||||
</div>
|
||||
<div class="card-details-prompt" @click="getUseCode">请点击条形码刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/receipt/JsBarcode.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
Vue.directive('barcode',
|
||||
function (el, binding) {
|
||||
var str = binding.value.value;
|
||||
var options = {
|
||||
format: "CODE128",
|
||||
displayValue: false,
|
||||
height: 50,
|
||||
background: '#fff',
|
||||
lineColor: '#111'
|
||||
};
|
||||
JsBarcode(el, str, options);
|
||||
})
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: function () {
|
||||
return {
|
||||
card_name: '', // 次卡名称
|
||||
use_code: '', // 使用码
|
||||
show_tips: true, // 显示提示
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取使用码
|
||||
getUseCode() {
|
||||
var id = "{:I('get.id')}";
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUseCode')}",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_name = res.card_name;
|
||||
that.use_code = res.use_code;
|
||||
that.show_tips = false;
|
||||
that.$forceUpdate();
|
||||
} else {
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getUseCode();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,195 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>条形码</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
background: #fcfcfc;
|
||||
}
|
||||
.all {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-code-banner {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
}
|
||||
.card-code-background {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card-code-background > img {
|
||||
width: 100%;
|
||||
}
|
||||
.card-code-name {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
padding-left: 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 80px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.card-details {
|
||||
position: absolute;
|
||||
top: 76px;
|
||||
background: white;
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
padding: 50px 0;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-details-up {
|
||||
text-align: center;
|
||||
}
|
||||
.card-code-num {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.card-code {
|
||||
width: 80%;
|
||||
height: 50px;
|
||||
border: 1px solid #FAFAFA;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.card-details-down {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #7BAEFD;
|
||||
font-size: 16px;
|
||||
}
|
||||
.card-details-down-img > img {
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.code-container{
|
||||
/*width: 244px;*/
|
||||
height: 70px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
.gray-code{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(47, 50, 56, 0.35);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
line-height: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div class="card-code-banner">
|
||||
<div class="card-code-background">
|
||||
<img src="__PUBLIC__/paper/images/card_background2.png" alt="">
|
||||
</div>
|
||||
<div class="card-code-name">{{card_name}}</div>
|
||||
</div>
|
||||
<div class="card-details">
|
||||
<div class="card-details-up" v-if="use_code">
|
||||
<div v-if="show_tips" class="code-container">
|
||||
<div class="gray-code">请重新刷新</div>
|
||||
</div>
|
||||
<div v-else class="code-container">
|
||||
<img v-barcode="{'value':use_code}"/>
|
||||
</div>
|
||||
<div class="card-code-num">{{use_code}}</div>
|
||||
</div>
|
||||
<div class="card-details-down">
|
||||
<div class="card-details-down-img">
|
||||
<img src="__PUBLIC__/paper/images/push2.png" alt="">
|
||||
</div>
|
||||
<div class="card-details-prompt" @click="getUseCode">请点击条形码刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/receipt/JsBarcode.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
Vue.directive('barcode',
|
||||
function (el, binding) {
|
||||
var str = binding.value.value;
|
||||
var options = {
|
||||
format: "CODE128",
|
||||
displayValue: false,
|
||||
height: 50,
|
||||
background: '#fff',
|
||||
lineColor: '#111'
|
||||
};
|
||||
JsBarcode(el, str, options);
|
||||
})
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: function () {
|
||||
return {
|
||||
card_name: '', // 次卡名称
|
||||
use_code: '', // 使用码
|
||||
show_tips: true, // 显示提示
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取使用码
|
||||
getUseCode() {
|
||||
var id = "{:I('get.id')}";
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUseCode')}",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_name = res.card_name;
|
||||
that.use_code = res.use_code;
|
||||
that.show_tips = false;
|
||||
that.$forceUpdate();
|
||||
} else {
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getUseCode();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,194 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>条形码</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
background: #fcfcfc;
|
||||
}
|
||||
.all {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-code-banner {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
}
|
||||
.card-code-background {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.card-code-background > img {
|
||||
width: 100%;
|
||||
}
|
||||
.card-code-name {
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
padding-left: 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 80px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.card-details {
|
||||
position: absolute;
|
||||
top: 76px;
|
||||
background: white;
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
padding: 50px 0;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-details-up {
|
||||
text-align: center;
|
||||
}
|
||||
.card-code-num {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.card-code {
|
||||
width: 80%;
|
||||
height: 50px;
|
||||
border: 1px solid #FAFAFA;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.card-details-down {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #F9818B;
|
||||
font-size: 16px;
|
||||
}
|
||||
.card-details-down-img > img {
|
||||
width: 20px;
|
||||
height: 19px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #666666;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.code-container{
|
||||
/*width: 244px;*/
|
||||
height: 70px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
.gray-code{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(47, 50, 56, 0.35);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
line-height: 70px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div class="card-code-banner">
|
||||
<div class="card-code-background">
|
||||
<img src="__PUBLIC__/paper/images/card-background3.png" alt="">
|
||||
</div>
|
||||
<div class="card-code-name">{{card_name}}</div>
|
||||
</div>
|
||||
<div class="card-details">
|
||||
<div class="card-details-up" v-if="use_code">
|
||||
<div v-if="show_tips" class="code-container">
|
||||
<div class="gray-code">请重新刷新</div>
|
||||
</div>
|
||||
<div v-else class="code-container">
|
||||
<img v-barcode="{'value':use_code}"/>
|
||||
</div>
|
||||
<div class="card-code-num">{{use_code}}</div>
|
||||
</div>
|
||||
<div class="card-details-down">
|
||||
<div class="card-details-down-img">
|
||||
<img src="__PUBLIC__/paper/images/push.png" alt="">
|
||||
</div>
|
||||
<div class="card-details-prompt" @click="getUseCode">请点击条形码刷新</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/receipt/JsBarcode.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
Vue.directive('barcode',
|
||||
function (el, binding) {
|
||||
var str = binding.value.value;
|
||||
var options = {
|
||||
format: "CODE128",
|
||||
displayValue: false,
|
||||
height: 50,
|
||||
background: '#fff',
|
||||
lineColor: '#111'
|
||||
};
|
||||
JsBarcode(el, str, options);
|
||||
})
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: function () {
|
||||
return {
|
||||
card_name: '', // 次卡名称
|
||||
use_code: '', // 使用码
|
||||
show_tips: true, // 显示提示
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取使用码
|
||||
getUseCode() {
|
||||
var id = "{:I('get.id')}";
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUseCode')}",
|
||||
type: "post",
|
||||
data: {id: id},
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_name = res.card_name;
|
||||
that.use_code = res.use_code;
|
||||
that.show_tips = false;
|
||||
that.$forceUpdate();
|
||||
} else {
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getUseCode();
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,180 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.68]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡片详情</title>
|
||||
<style>
|
||||
body{
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
.all{
|
||||
width: 100%;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-details-banner{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card-details-banner-img{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.card-details-banner-img>img{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
.card-vip-name{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
color: white;
|
||||
padding: 15px 30px;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.card-go{
|
||||
width: 100%;
|
||||
color: orangered;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #FF867B;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-go-ban{
|
||||
width: 100%;
|
||||
color: #ccc;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-information-list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid rgba(204, 204, 204, 0.29);
|
||||
}
|
||||
.card-information-list-left{
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.card-information-list-right{
|
||||
color: #999999;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span >暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-details-banner">
|
||||
<div class="card-details-banner-img">
|
||||
<img :src="card_info.image_url ? card_info.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-vip-name" :style="{color: card_info.card_name_color}">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-go" v-if="card_info.is_use == 1" @click="CardCode">去刷码</div>
|
||||
<div class="card-go-ban" v-else>去刷码</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">次卡名称</div>
|
||||
<div class="card-information-list-right">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用规则</div>
|
||||
<div class="card-information-list-right">{{card_info.use_rule}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">有效日期</div>
|
||||
<div class="card-information-list-right">{{card_info.effective_time}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用时段</div>
|
||||
<div class="card-information-list-right">{{card_info.time_interval}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">已用次数</div>
|
||||
<div class="card-information-list-right">{{card_info.use_num}}次</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#all',
|
||||
data:{
|
||||
card_info:{
|
||||
image_url:'', // 卡面图片
|
||||
name:'', // 次卡名称
|
||||
use_rule:'', // 使用规则
|
||||
use_time:'', // 可用时段
|
||||
use_num:'', // 已用次数,
|
||||
end_time:'', // 截止日期
|
||||
},
|
||||
show_tips:true, // 显示提示
|
||||
},
|
||||
methods:{
|
||||
// 获取次卡信息
|
||||
getCardInfo(id) {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url:"{:U('getCardInfo')}",
|
||||
type:"post",
|
||||
data:{id:id},
|
||||
success:function (res) {
|
||||
if(res.status == 1){
|
||||
that.card_info = res.user_card;
|
||||
that.show_tips = false;
|
||||
}else{
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
} ,
|
||||
|
||||
// 去刷码
|
||||
CardCode(){
|
||||
var id= "{:I('get.id')}";
|
||||
window.location.href = "{:U('cardCode')}?id=" + id;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
var id= "{:I('get.id')}";
|
||||
this.getCardInfo(id);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,174 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.68]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡片详情</title>
|
||||
<style>
|
||||
body{
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
.all{
|
||||
width: 100%;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-details-banner{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card-details-banner-img{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.card-details-banner-img>img{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
.card-vip-name{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
color: white;
|
||||
padding: 15px 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.card-go{
|
||||
width: 100%;
|
||||
color: #7BAEFD;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #7BAEFD;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-go-ban{
|
||||
width: 100%;
|
||||
color: #ccc;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-information-list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid rgba(204, 204, 204, 0.29);
|
||||
}
|
||||
.card-information-list-left{
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.card-information-list-right{
|
||||
color: #999999;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span >暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-details-banner">
|
||||
<div class="card-details-banner-img">
|
||||
<img :src="card_info.image_url ? card_info.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-vip-name" :style="{color: card_info.card_name_color}">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-go" v-if="card_info.is_use == 1" @click="CardCode">去刷码</div>
|
||||
<div class="card-go-ban" v-else>去刷码</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">次卡名称</div>
|
||||
<div class="card-information-list-right">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用规则</div>
|
||||
<div class="card-information-list-right">{{card_info.use_rule}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">有效日期</div>
|
||||
<div class="card-information-list-right">{{card_info.effective_time}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用时段</div>
|
||||
<div class="card-information-list-right">{{card_info.time_interval}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">已用次数</div>
|
||||
<div class="card-information-list-right">{{card_info.use_num}}次</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#all',
|
||||
data:{
|
||||
card_info:{
|
||||
image_url:'', // 卡面图片
|
||||
name:'', // 次卡名称
|
||||
use_rule:'', // 使用规则
|
||||
use_time:'', // 可用时段
|
||||
use_num:'', // 已用次数,
|
||||
end_time:'', // 截止日期
|
||||
},
|
||||
show_tips:true, // 显示提示
|
||||
},
|
||||
methods:{
|
||||
// 获取次卡信息
|
||||
getCardInfo(id) {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url:"{:U('getCardInfo')}",
|
||||
type:"post",
|
||||
data:{id:id},
|
||||
success:function (res) {
|
||||
if(res.status == 1){
|
||||
that.card_info = res.user_card;
|
||||
that.show_tips = false;
|
||||
}else{
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
} ,
|
||||
|
||||
// 去刷码
|
||||
CardCode(){
|
||||
var id= "{:I('get.id')}";
|
||||
window.location.href = "{:U('cardCode')}?id=" + id;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
var id= "{:I('get.id')}";
|
||||
this.getCardInfo(id);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,174 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.68]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡片详情</title>
|
||||
<style>
|
||||
body{
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
.all{
|
||||
width: 100%;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
.card-details-banner{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card-details-banner-img{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.card-details-banner-img>img{
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
.card-vip-name{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
color: white;
|
||||
padding: 15px 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.card-go{
|
||||
width: 100%;
|
||||
color: #F9818B;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #F9818B;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-go-ban{
|
||||
width: 100%;
|
||||
color: #ccc;
|
||||
font-size: 16px;
|
||||
padding: 8px 0;
|
||||
border: 1px solid #ccc;
|
||||
border-radius:5px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.card-information-list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid rgba(204, 204, 204, 0.29);
|
||||
}
|
||||
.card-information-list-left{
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.card-information-list-right{
|
||||
color: #999999;
|
||||
}
|
||||
.no-card{
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span >暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-details-banner">
|
||||
<div class="card-details-banner-img">
|
||||
<img :src="card_info.image_url ? card_info.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-vip-name" :style="{color: card_info.card_name_color}">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-go" v-if="card_info.is_use == 1" @click="CardCode">去刷码</div>
|
||||
<div class="card-go-ban" v-else>去刷码</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">次卡名称</div>
|
||||
<div class="card-information-list-right">{{card_info.name}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用规则</div>
|
||||
<div class="card-information-list-right">{{card_info.use_rule}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">有效日期</div>
|
||||
<div class="card-information-list-right">{{card_info.effective_time}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">使用时段</div>
|
||||
<div class="card-information-list-right">{{card_info.time_interval}}</div>
|
||||
</div>
|
||||
<div class="card-information-list">
|
||||
<div class="card-information-list-left">已用次数</div>
|
||||
<div class="card-information-list-right">{{card_info.use_num}}次</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el:'#all',
|
||||
data:{
|
||||
card_info:{
|
||||
image_url:'', // 卡面图片
|
||||
name:'', // 次卡名称
|
||||
use_rule:'', // 使用规则
|
||||
use_time:'', // 可用时段
|
||||
use_num:'', // 已用次数,
|
||||
end_time:'', // 截止日期
|
||||
},
|
||||
show_tips:true, // 显示提示
|
||||
},
|
||||
methods:{
|
||||
// 获取次卡信息
|
||||
getCardInfo(id) {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url:"{:U('getCardInfo')}",
|
||||
type:"post",
|
||||
data:{id:id},
|
||||
success:function (res) {
|
||||
if(res.status == 1){
|
||||
that.card_info = res.user_card;
|
||||
that.show_tips = false;
|
||||
}else{
|
||||
that.show_tips = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
} ,
|
||||
|
||||
// 去刷码
|
||||
CardCode(){
|
||||
var id= "{:I('get.id')}";
|
||||
window.location.href = "{:U('cardCode')}?id=" + id;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
var id= "{:I('get.id')}";
|
||||
this.getCardInfo(id);
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
153
Application/Vip/View/CardBag/index.html
可执行文件
153
Application/Vip/View/CardBag/index.html
可执行文件
@@ -0,0 +1,153 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡包</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
|
||||
.all {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-bag-nav {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-nav-left-img > img {
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list-img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.card-bag-list-img > img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-bag-list-txt {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
padding: 10px 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.no-card {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span>暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-bag-nav">
|
||||
<div class="card-nav-left">
|
||||
<div class="card-nav-left-img">
|
||||
<img src="__PUBLIC__/paper/images/card-title.png">
|
||||
</div>
|
||||
<div>卡包</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-bag-lists">
|
||||
<div class="card-bag-list" v-for="(item,index) in card_list" @click="cardDetails(item.id)">
|
||||
<div class="card-bag-list-img">
|
||||
<img :src="item.image_url ? item.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-bag-list-txt" :style="{color: item.card_name_color}">{{item.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: {
|
||||
card_list: [], // 用户所有次卡
|
||||
show_tips: true, // 文字提示(暂无次卡可用)
|
||||
},
|
||||
methods: {
|
||||
// 获取用户次卡
|
||||
getUserCardList: function () {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUserCardList')}",
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_list = res.card_list;
|
||||
that.show_tips = false;
|
||||
} else {
|
||||
that.show_tips = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转(次卡详情)
|
||||
cardDetails: function (id) {
|
||||
window.location.href = "{:U('cardDetails')}?id=" + id;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserCardList();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
153
Application/Vip/View/CardBag/index2.html
可执行文件
153
Application/Vip/View/CardBag/index2.html
可执行文件
@@ -0,0 +1,153 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡包</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
|
||||
.all {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-bag-nav {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-nav-left-img > img {
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list-img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.card-bag-list-img > img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-bag-list-txt {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
padding: 10px 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.no-card {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span>暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-bag-nav">
|
||||
<div class="card-nav-left">
|
||||
<div class="card-nav-left-img">
|
||||
<img src="__PUBLIC__/paper/images/card-bag2.png">
|
||||
</div>
|
||||
<div>卡包</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-bag-lists">
|
||||
<div class="card-bag-list" v-for="(item,index) in card_list" @click="cardDetails(item.id)">
|
||||
<div class="card-bag-list-img">
|
||||
<img :src="item.image_url ? item.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-bag-list-txt" :style="{color: item.card_name_color}">{{item.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: {
|
||||
card_list: [], // 用户所有次卡
|
||||
show_tips: true, // 文字提示(暂无次卡可用)
|
||||
},
|
||||
methods: {
|
||||
// 获取用户次卡
|
||||
getUserCardList: function () {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUserCardList')}",
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_list = res.card_list;
|
||||
that.show_tips = false;
|
||||
} else {
|
||||
that.show_tips = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转(次卡详情)
|
||||
cardDetails: function (id) {
|
||||
window.location.href = "{:U('cardDetails')}?id=" + id;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserCardList();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
153
Application/Vip/View/CardBag/index3.html
可执行文件
153
Application/Vip/View/CardBag/index3.html
可执行文件
@@ -0,0 +1,153 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--[1.8.20]-->
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>卡包</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
padding: 20px 4% 0;
|
||||
}
|
||||
|
||||
.all {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-bag-nav {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.card-nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-nav-left-img > img {
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.card-bag-list-img {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.card-bag-list-img > img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-bag-list-txt {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
padding: 10px 30px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.no-card {
|
||||
width: 100%;
|
||||
color: #999999;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="all" id="all" v-cloak>
|
||||
<div v-if="show_tips" class="no-card">
|
||||
<span>暂无次卡</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-bag-nav">
|
||||
<div class="card-nav-left">
|
||||
<div class="card-nav-left-img">
|
||||
<img src="__PUBLIC__/paper/images/card-title.png">
|
||||
</div>
|
||||
<div>卡包</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-bag-lists">
|
||||
<div class="card-bag-list" v-for="(item,index) in card_list" @click="cardDetails(item.id)">
|
||||
<div class="card-bag-list-img">
|
||||
<img :src="item.image_url ? item.image_url : '__PUBLIC__/paper/images/sub_card.png'">
|
||||
</div>
|
||||
<div class="card-bag-list-txt" :style="{color: item.card_name_color}">{{item.name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#all',
|
||||
data: {
|
||||
card_list: [], // 用户所有次卡
|
||||
show_tips: true, // 文字提示(暂无次卡可用)
|
||||
},
|
||||
methods: {
|
||||
// 获取用户次卡
|
||||
getUserCardList: function () {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
url: "{:U('getUserCardList')}",
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res.status == 1) {
|
||||
that.card_list = res.card_list;
|
||||
that.show_tips = false;
|
||||
} else {
|
||||
that.show_tips = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转(次卡详情)
|
||||
cardDetails: function (id) {
|
||||
window.location.href = "{:U('cardDetails')}?id=" + id;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUserCardList();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
在新工单中引用
屏蔽一个用户