Skip to content

Commit

Permalink
update@company
Browse files Browse the repository at this point in the history
  • Loading branch information
GAtomis committed Jun 21, 2022
1 parent 5a739d6 commit e709ecc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/lottery/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ a {

.element .company {
position: absolute;
top: 1.2vh;
top: 27%;
right: 0;
width: 100%;
font-size: 2vh;
color: rgba(127, 255, 255, 0.75);
font-size: 25px;
color: #d6eea1;
}

.element .name {
margin: 0 10px;
position: absolute;
top: 30%;
top: 52%;
left: 0;
right: 0;
font-size: 2.2vh;
font-size: 26px;
font-weight: bold;
color: #f9c05e;
text-shadow: 0 0 .2vh rgba(249, 192, 94, 0.95);
text-shadow: 0 0 1px rgba(249, 192, 94, 0.95);
}

.element .details {
Expand Down
9 changes: 5 additions & 4 deletions src/lottery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ function createCard(user, isBold, id, showTable) {

}
//添加公司标识
// element.appendChild(createElement("company", COMPANY));
COMPANY && element.appendChild(createElement("company", COMPANY));

element.appendChild(createElement("name", user[1]));

Expand Down Expand Up @@ -1031,9 +1031,10 @@ function random(num) {
// }
function changeCard(cardIndex, user) {
let card = threeDCards[cardIndex].element;

card.innerHTML = `<div class="name">${user[1]
}</div>`;
const nameDom = `<div class="name">${user[1]
}</div>`
const companyDom = `<div class="company">${COMPANY}</div>`
card.innerHTML = nameDom + (COMPANY ? companyDom : '');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/lottery/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Description: 请输入....
* @Author: Gavin
* @Date: 2022-01-11 15:24:49
* @LastEditTime: 2022-06-21 17:42:35
* @LastEditTime: 2022-06-21 18:34:34
* @LastEditors: Gavin
*/
const test = [
Expand Down Expand Up @@ -38,7 +38,7 @@ const user = test.sort(randomsort)
/**
* 卡片公司名称标识
*/
const COMPANY = "baidu";
const COMPANY = "Github";
/**
* 奖品设置
* type: 唯一标识,0是默认特别奖的占位符,其它奖品不可使用
Expand Down

0 comments on commit e709ecc

Please sign in to comment.