新增公会动图相关逻辑-英语&阿拉伯

This commit is contained in:
dragon
2024-10-23 14:43:06 +08:00
parent 77402a8e0b
commit f63446e4a2
32 changed files with 365 additions and 75 deletions

View File

@@ -91,8 +91,8 @@ ul li .num {
}
ul li .ts {
width: 1.70667rem;
height: 1.37333rem;
width: 1.54667rem;
height: 1.54667rem;
position: absolute;
z-index: 2;
left: 1.09333rem;
@@ -100,12 +100,12 @@ ul li .ts {
}
ul li .tx {
width: 1.33333rem;
height: 1.33333rem;
width: 1.4rem;
height: 1.45rem;
position: absolute;
left: 1.28rem;
top: 0.52rem;
border-radius: 50%;
left: 1.2rem;
top: 0.46rem;
border-radius: 0.1rem;
}
ul li .user {

View File

@@ -94,8 +94,8 @@ ul {
}
.ts {
width: px2rem(128);
height: px2rem(103);
width: px2rem(116);
height: px2rem(116);
position: absolute;
z-index: 2;
left: px2rem(82);
@@ -103,12 +103,12 @@ ul {
}
.tx {
width: px2rem(100);
height: px2rem(100);
width: 1.4rem;
height: 1.45rem;
position: absolute;
left: px2rem(96);
top: px2rem(39);
border-radius: 50%;
left: 1.2rem;
top: 0.46rem;
border-radius: 0.1rem;
}
.user {

View File

@@ -49,7 +49,7 @@ body {
position: absolute;
left: 0.45333rem;
top: 2.88rem;
border-radius: 50%;
border-radius: 0.21333rem;
border: 0.02667rem solid #FFE8A9;
}
@@ -64,6 +64,23 @@ body {
display: none;
}
.header .audit {
width: 1.41333rem;
height: 0.45333rem;
line-height: 0.45333rem;
text-align: center;
position: absolute;
border-radius: 0.45333rem;
top: 4.74667rem;
left: 0.74667rem;
color: #fff;
font-size: 0.29333rem;
font-weight: 500;
background: #D42E00;
display: none;
white-space: nowrap;
}
.header .nick {
width: 55%;
overflow: hidden;
@@ -112,7 +129,7 @@ body {
color: #fff;
font-size: 0.37333rem;
position: absolute;
top: 3.54667rem;
top: 3.81333rem;
right: 0.42667rem;
z-index: 5;
padding: 0 0.13333rem;
@@ -637,6 +654,12 @@ body {
font-size: 0.29333rem;
}
.arabic .audit {
left: auto;
right: 0.57333rem;
width: 1.86667rem;
}
.arabic .guildList .top b {
float: right;
}

View File

@@ -54,7 +54,7 @@ body {
position: absolute;
left: px2rem(34);
top: px2rem(216);
border-radius: 50%;
border-radius: px2rem(16);
border: px2rem(2) solid #FFE8A9;
}
@@ -69,6 +69,23 @@ body {
display: none;
}
.audit {
width: px2rem(106);
height: px2rem(34);
line-height: px2rem(34);
text-align: center;
position: absolute;
border-radius: px2rem(34);
top: px2rem(356);
left: px2rem(56);
color: #fff;
font-size: px2rem(22);
font-weight: 500;
background: #D42E00;
display: none;
white-space: nowrap;
}
.nick {
width: 55%;
overflow: hidden;
@@ -118,7 +135,7 @@ body {
color: #fff;
font-size: px2rem(28);
position: absolute;
top: px2rem(266);
top: px2rem(286);
right: px2rem(32);
z-index: 5;
padding: 0 px2rem(10);
@@ -647,7 +664,8 @@ body {
right: auto;
left: px2rem(32);
}
.headerBox .headerBox_in div{
.headerBox .headerBox_in div {
text-align: right;
}
@@ -663,6 +681,12 @@ body {
}
}
.audit {
left: auto;
right: px2rem(43);
width: px2rem(140);
}
.guildList .top b {
float: right;
}

View File

@@ -22,9 +22,16 @@
<input disabled="true" type="text" placeholder="">
<span class="textConte2">修改</span>
</div>
<!-- 公会背景图 -->
<!-- 公会头像 -->
<h3 class="text55">公会头像</h3>
<div class="background backgrounds2">
<img src="./images/logo.png" alt="" class="">
<span class="textConte2">修改</span>
<input type="file" id="backImageUpload2" accept="image/*" onchange="fileChangeF2(event)" class="upload"
style="opacity: 0;">
</div>
<h3 class="text5">公会背景图</h3>
<div class="background">
<div class="background backgrounds">
<img src="./images/logo.png" alt="" class="">
<span class="textConte2">修改</span>
<input type="file" id="backImageUpload" accept="image/*" onchange="fileChangeF(event)" class="upload"
@@ -56,9 +63,10 @@
<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="./js/qiniu.min.js"></script>
<!-- <script src="./js/qiniu.min.js"></script> -->
<script src="./js/cos-js-sdk-v5.min.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/guildInfoSet.js?v=1.3"></script>
<script src="./js/guildInfoSet.js"></script>
<script src="../../common/local/langHandler.js"></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -20,6 +20,7 @@
<div class="header">
<img src="./images/header_ts.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<div class="audit"></div>
<!-- 工会长昵称 -->
<div class="nick"></div>
<div class="id"></div>

File diff suppressed because one or more lines are too long

View File

@@ -84,7 +84,7 @@ function listRank() {
var arr = generateUniqueRandomNumbers(6, 0, res.data.length - 1);
var currArr = res.data;
console.log(arr);
arr.forEach((val,i) => {
arr.forEach((val, i) => {
str += `
<li>
<div class="num">${i > 2 ? i + 1 : ''}</div>
@@ -103,7 +103,7 @@ function listRank() {
str += `
<li>
<div class="num">${i > 2 ? i + 1 : ''}</div>
<img src="${i <= 2 ? `./images/ts${i + 1}.png` : './images/txK.png'}" alt="" class="ts">
${i <= 2 ? `<img src="./images/ts${i + 1}.png ` : '<img src="./images/txK.png" alt="" class="ts"></img>'};
<img src="${res.owner.avatar}" alt="" class="tx">
<div class="user">
<p>${res.guildName}</p>

View File

@@ -84,6 +84,7 @@ function translateFun() {
$('.text3').text(langReplace(localLang.guildInfoSet.text3));
$('.text4').attr('placeholder', langReplace(localLang.guildInfoSet.text4));
$('.text5').text(langReplace(localLang.guildInfoSet.text5));
$('.text55').text(langReplace(localLang.guildInfoSet.text55));
$('.text6').text(langReplace(localLang.guildInfoSet.text6));
$('.text7').text(langReplace(localLang.guildInfoSet.text7));
$('.textConte2').text(langReplace(localLang.guildInfoSet.textConte2));
@@ -93,12 +94,64 @@ function translateFun() {
}
// 上傳图片接口
function getToken(file, type) {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/tencent/cos/getToken',
success(res) {
if (res.code === 200) {
let cos = new COS({
SecretId: res.data.secretId,
SecretKey: res.data.secretKey,
SecurityToken: res.data.sessionToken,
StartTime: res.data.startTime,
ExpiredTime: res.data.expireTime,
});
console.log(cos);
var customDomain = res.data.customDomain;
cos.uploadFile({
Bucket: res.data.bucket, /* 填写自己的 bucket必须字段 */
Region: res.data.region, /* 存储桶所在地域,必须字段 */
Key: file.name, /* 存储在桶里的对象键(例如:1.jpga/b/test.txt图片.jpg支持中文必须字段 */
Body: file, // 上传文件对象
SliceSize: 1024 * 1024 * 5, /* 触发分块上传的阈值超过5MB使用分块上传小于5MB使用简单上传。可自行设置非必须 */
onProgress: function (progressData) {
console.log(JSON.stringify(progressData));
}
}).then(res => {
console.log('上传成功');
console.log(res);
if (type == 1) {//背景
setInfo(null, `${customDomain}/${file.name}`, function () { }, null);
$('.backgrounds img').attr('src', `${customDomain}/${file.name}`);
} else {
setInfo(null, null, function () { }, `${customDomain}/${file.name}`);
$('.backgrounds2 img').attr('src', `${customDomain}/${file.name}`);
}
}).catch(err => {
console.log('上传失败', err);
hideLoading(layerIndex)
toastMsg(err.message);
});
} else {
toastMsg(res.message)
}
// hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 上傳图片接口
function getUploadToken() {
const backImage = document.getElementById('backImageUpload').files[0];
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/qiniu/upload/getUploadToken',
url: urlPrefiw,
success(res) {
if (res.code === 200) {
var frontImageKey = res.data.key;
@@ -128,21 +181,43 @@ function getUploadToken() {
}
})
}
function fileChangeF(e) {
var filesList = document.querySelector('#backImageUpload').files;
if (filesList.length == 0) {
// 上传公会头像
function fileChangeF2(e) {
var file = document.querySelector('#backImageUpload2').files[0];
console.log(file);
if (file.length == 0) {
return;
}
getUploadToken(2)
var fileType = file.type;
// 判断是否是动图
if (fileType == 'image/gif' || file.name.includes('.gif')) {
toastMsg(langReplace(localLang.demoModule.toastMsgText1))
} else {
getToken(file, 2)
}
}
// 上传公会背景
function fileChangeF(e) {
var file = document.querySelector('#backImageUpload').files[0];
console.log(file);
if (file.length == 0) {
return;
}
var fileType = file.type;
// 判断是否是动图
if (fileType == 'image/gif' || file.name.includes('.gif')) {
toastMsg(langReplace(localLang.demoModule.toastMsgText1))
} else {
getToken(file, 1)
}
}
// 保存接口
function setInfo(name, backgroundUrl, fun) {
function setInfo(name, backgroundUrl, fun, avatar) {
showLoading()
networkRequest({
type: 'post',
url: urlPrefix + '/guild/setInfo',
data: { name, backgroundUrl },
data: { name, backgroundUrl, avatar },
success(res) {
if (res.code === 200) {
fun();

View File

@@ -90,6 +90,7 @@ function translateFun() {
$('.newtext5').text(langReplace(localLang.demoModule.newtext5));
$('.newtext6').text(langReplace(localLang.demoModule.newtext6));
$('.newtext7').text(langReplace(localLang.demoModule.newtext7));
$('.audit').text(langReplace(localLang.demoModule.audit));
}
// 判断公会身份函数
function guildFun(type) {
@@ -131,6 +132,9 @@ function get() {
if (res.code === 200) {
// 判断身份
roleTypes = res.data.roleType;
if (roleTypes == 1 && res.data.isReview == true) {
$('.audit').show();
}
guildFun(roleTypes);
if (res.data.wageEnable == false) {
$('.hmemberFlow2').hide()
@@ -165,8 +169,8 @@ function get() {
}
})
// 渲染基本信息
$('.header .tx').attr('src', res.data.me.avatar);
$('.header .nick').text(res.data.me.nick);
$('.header .tx').attr('src', res.data.avatar);
$('.header .nick').text(res.data.name);
guildNick = res.data.name;
backgroundUrl = res.data.backgroundUrl;
if (res.data.payAccount) {
@@ -175,7 +179,7 @@ function get() {
payPal = res.data.payAccount.payPal;
}
familyMemberId = res.data.familyMemberId;
$('.header .id').text('ID' + res.data.me.erbanNo);
$('.header .id').text('ID' + res.data.owner.erbanNo);
$('.header').css({ "background": `url(${res.data.backgroundUrl}) no-repeat`, "background-size": "cover" });
$('.header .guildNick').text(langReplace(localLang.demoModule.text11) + res.data.name);
// 处理成员

View File

@@ -34,7 +34,8 @@ langAr = {
newtext6: "المستوى الحالي للنقابة:",
newtext7: "الترقية المطلوبة:",
coins: "عملات",
transfer_salary: "تحويل الراتب:"
transfer_salary: "تحويل الراتب:",
audit: 'قيد المراجعة',
},
adminSet: {
text1: `إعدادات المشرف`,
@@ -82,6 +83,8 @@ langAr = {
textConte2: `تعديل `,
textConte3: `إضافة`,
textConte4: `حساب أستلام الراتب `,
text55: `صورة النقابة`,
toastMsgText1: `الرسوم المتحركة غير مدعومة للتحميل حاليًا`,
},
invitation: {
text1: `البحث`,

View File

@@ -32,7 +32,8 @@ langEn = {
newtext6: "Current Agency Lv:",
newtext7: "Next level need:",
coins: "Coins",
transfer_salary: "Salary Transfer:"
transfer_salary: "Salary Transfer:",
audit:'In Audit',
},
adminSet: {
text1: `Administrator`,
@@ -80,6 +81,8 @@ langEn = {
textConte2: `Edit`,
textConte3: `Add`,
textConte4: `Payment Account`,
text55: `Guild Avatar`,
toastMsgText1: `GIF upload is not supported at the moment`,
},
invitation: {
text1: `Find`,

View File

@@ -35,6 +35,7 @@ langZh = {
newtext7: "升級所需:",
coins: "金幣",
transfer_salary: "薪资转账:",
audit: '審核中',
},
adminSet: {
text1: `管理員設置`,
@@ -82,6 +83,8 @@ langZh = {
textConte2: `修改`,
textConte3: `添加`,
textConte4: `收款賬戶`,
text55: `公会头像`,
toastMsgText1: `暫不支援上傳動圖`,
},
invitation: {
text1: `搜索`,
@@ -312,6 +315,6 @@ langZh = {
p4: `SWIFT 代碼(僅輸入英文)`,
p5: `收款人姓名(僅輸入英文)`,
p6: `地址(僅輸入英文)`,
p7: `收款人賬號(電子郵件格式)`,
p7: `收款人賬號(電子郵件格式)`,
}
}

View File

@@ -91,8 +91,8 @@ ul li .num {
}
ul li .ts {
width: 1.70667rem;
height: 1.37333rem;
width: 1.54667rem;
height: 1.54667rem;
position: absolute;
z-index: 2;
left: 1.09333rem;
@@ -100,12 +100,12 @@ ul li .ts {
}
ul li .tx {
width: 1.33333rem;
height: 1.33333rem;
width: 1.4rem;
height: 1.45rem;
position: absolute;
left: 1.28rem;
top: 0.52rem;
border-radius: 50%;
left: 1.2rem;
top: 0.46rem;
border-radius: 0.1rem;
}
ul li .user {

View File

@@ -94,8 +94,8 @@ ul {
}
.ts {
width: px2rem(128);
height: px2rem(103);
width: px2rem(116);
height: px2rem(116);
position: absolute;
z-index: 2;
left: px2rem(82);
@@ -103,12 +103,12 @@ ul {
}
.tx {
width: px2rem(100);
height: px2rem(100);
width: 1.4rem;
height: 1.45rem;
position: absolute;
left: px2rem(96);
top: px2rem(39);
border-radius: 50%;
left: 1.2rem;
top: 0.46rem;
border-radius: 0.1rem;
}
.user {

View File

@@ -50,6 +50,7 @@ body {
left: 0.45333rem;
top: 2.88rem;
border-radius: 50%;
border-radius: 0.21333rem;
border: 0.02667rem solid #FFE8A9;
}
@@ -64,6 +65,23 @@ body {
display: none;
}
.header .audit {
width: 1.41333rem;
height: 0.45333rem;
line-height: 0.45333rem;
text-align: center;
position: absolute;
border-radius: 0.45333rem;
top: 4.74667rem;
left: 0.74667rem;
color: #fff;
font-size: 0.29333rem;
font-weight: 500;
background: #D42E00;
display: none;
white-space: nowrap;
}
.header .nick {
width: 55%;
overflow: hidden;
@@ -112,7 +130,7 @@ body {
color: #fff;
font-size: 0.37333rem;
position: absolute;
top: 3.54667rem;
top: 3.81333rem;
right: 0.42667rem;
z-index: 5;
padding: 0 0.13333rem;
@@ -642,6 +660,12 @@ body {
font-size: 0.29333rem;
}
.arabic .audit {
left: auto;
right: 0.57333rem;
width: 1.86667rem;
}
.arabic .guildList .top b {
float: right;
}

View File

@@ -55,6 +55,7 @@ body {
left: px2rem(34);
top: px2rem(216);
border-radius: 50%;
border-radius: px2rem(16);
border: px2rem(2) solid #FFE8A9;
}
@@ -69,6 +70,23 @@ body {
display: none;
}
.audit {
width: px2rem(106);
height: px2rem(34);
line-height: px2rem(34);
text-align: center;
position: absolute;
border-radius: px2rem(34);
top: px2rem(356);
left: px2rem(56);
color: #fff;
font-size: px2rem(22);
font-weight: 500;
background: #D42E00;
display: none;
white-space: nowrap;
}
.nick {
width: 55%;
overflow: hidden;
@@ -112,13 +130,13 @@ body {
min-width: px2rem(118);
height: px2rem(54);
border-radius: px2rem(54);
line-height: px2rem(54) ;
line-height: px2rem(54);
text-align: center;
background: linear-gradient(90deg, #7CDD9B, #62D0A8);
color: #fff;
font-size: px2rem(28);
position: absolute;
top: px2rem(266);
top: px2rem(286);
right: px2rem(32);
z-index: 5;
padding: 0 px2rem(10);
@@ -180,7 +198,8 @@ body {
vertical-align: middle;
}
}
.incomeStatistics{
.incomeStatistics {
background: #E3F2FF;
}
@@ -652,7 +671,8 @@ body {
right: auto;
left: px2rem(32);
}
.headerBox .headerBox_in div{
.headerBox .headerBox_in div {
text-align: right;
}
@@ -668,6 +688,12 @@ body {
}
}
.audit {
left: auto;
right: px2rem(43);
width: px2rem(140);
}
.guildList .top b {
float: right;
}

View File

@@ -22,9 +22,16 @@
<input disabled="true" type="text" placeholder="">
<span class="textConte2">修改</span>
</div>
<!-- 公会背景图 -->
<!-- 公会头像 -->
<h3 class="text55">公会头像</h3>
<div class="background backgrounds2">
<img src="./images/logo.png" alt="" class="">
<span class="textConte2">修改</span>
<input type="file" id="backImageUpload2" accept="image/*" onchange="fileChangeF2(event)" class="upload"
style="opacity: 0;">
</div>
<h3 class="text5">公会背景图</h3>
<div class="background">
<div class="background backgrounds">
<img src="./images/logo.png" alt="" class="">
<span class="textConte2">修改</span>
<input type="file" id="backImageUpload" accept="image/*" onchange="fileChangeF(event)" class="upload"
@@ -56,9 +63,10 @@
<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="./js/qiniu.min.js"></script>
<!-- <script src="./js/qiniu.min.js"></script> -->
<script src="./js/cos-js-sdk-v5.min.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/guildInfoSet.js?v=1.3"></script>
<script src="./js/guildInfoSet.js"></script>
<script src="../../common/local/langHandler.js"></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -20,6 +20,7 @@
<div class="header">
<img src="./images/header_ts.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<div class="audit"></div>
<!-- 工会长昵称 -->
<div class="nick"></div>
<div class="id"></div>

File diff suppressed because one or more lines are too long

View File

@@ -84,7 +84,7 @@ function listRank() {
str += `
<li>
<div class="num">${i > 2 ? i + 1 : ''}</div>
<img src="${i <= 2 ? `./images/ts${i + 1}.png` : './images/txK.png'}" alt="" class="ts">
${i <= 2 ? `<img src="./images/ts${i + 1}.png ` : '<img src="./images/txK.png" alt="" class="ts"></img>'};
<img src="${res.owner.avatar}" alt="" class="tx">
<div class="user">
<p>${res.familyName}</p>

View File

@@ -84,6 +84,7 @@ function translateFun() {
$('.text3').text(langReplace(localLang.guildInfoSet.text3));
$('.text4').attr('placeholder', langReplace(localLang.guildInfoSet.text4));
$('.text5').text(langReplace(localLang.guildInfoSet.text5));
$('.text55').text(langReplace(localLang.guildInfoSet.text55));
$('.text6').text(langReplace(localLang.guildInfoSet.text6));
$('.text7').text(langReplace(localLang.guildInfoSet.text7));
$('.textConte2').text(langReplace(localLang.guildInfoSet.textConte2));
@@ -93,12 +94,64 @@ function translateFun() {
}
// 上傳图片接口
function getToken(file, type) {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/tencent/cos/getToken',
success(res) {
if (res.code === 200) {
let cos = new COS({
SecretId: res.data.secretId,
SecretKey: res.data.secretKey,
SecurityToken: res.data.sessionToken,
StartTime: res.data.startTime,
ExpiredTime: res.data.expireTime,
});
console.log(cos);
var customDomain = res.data.customDomain;
cos.uploadFile({
Bucket: res.data.bucket, /* 填写自己的 bucket必须字段 */
Region: res.data.region, /* 存储桶所在地域,必须字段 */
Key: file.name, /* 存储在桶里的对象键(例如:1.jpga/b/test.txt图片.jpg支持中文必须字段 */
Body: file, // 上传文件对象
SliceSize: 1024 * 1024 * 5, /* 触发分块上传的阈值超过5MB使用分块上传小于5MB使用简单上传。可自行设置非必须 */
onProgress: function (progressData) {
console.log(JSON.stringify(progressData));
}
}).then(res => {
console.log('上传成功');
console.log(res);
if (type == 1) {//背景
setInfo(null, `${customDomain}/${file.name}`, function () { }, null);
$('.backgrounds img').attr('src', `${customDomain}/${file.name}`);
} else {
setInfo(null, null, function () { }, `${customDomain}/${file.name}`);
$('.backgrounds2 img').attr('src', `${customDomain}/${file.name}`);
}
}).catch(err => {
console.log('上传失败', err);
hideLoading(layerIndex)
toastMsg(err.message);
});
} else {
toastMsg(res.message)
}
// hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 上傳图片接口
function getUploadToken() {
const backImage = document.getElementById('backImageUpload').files[0];
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/qiniu/upload/getUploadToken',
url: urlPrefiw,
success(res) {
if (res.code === 200) {
var frontImageKey = res.data.key;
@@ -128,21 +181,43 @@ function getUploadToken() {
}
})
}
function fileChangeF(e) {
var filesList = document.querySelector('#backImageUpload').files;
if (filesList.length == 0) {
// 上传公会头像
function fileChangeF2(e) {
var file = document.querySelector('#backImageUpload2').files[0];
console.log(file);
if (file.length == 0) {
return;
}
getUploadToken(2)
var fileType = file.type;
// 判断是否是动图
if (fileType == 'image/gif' || file.name.includes('.gif')) {
toastMsg(langReplace(localLang.demoModule.toastMsgText1))
} else {
getToken(file, 2)
}
}
// 上传公会背景
function fileChangeF(e) {
var file = document.querySelector('#backImageUpload').files[0];
console.log(file);
if (file.length == 0) {
return;
}
var fileType = file.type;
// 判断是否是动图
if (fileType == 'image/gif' || file.name.includes('.gif')) {
toastMsg(langReplace(localLang.demoModule.toastMsgText1))
} else {
getToken(file, 1)
}
}
// 保存接口
function setInfo(name, backgroundUrl, fun) {
function setInfo(name, backgroundUrl, fun, avatar) {
showLoading()
networkRequest({
type: 'post',
url: urlPrefix + '/family/setInfo',
data: { name, backgroundUrl },
url: urlPrefix + '/guild/setInfo',
data: { name, backgroundUrl, avatar },
success(res) {
if (res.code === 200) {
fun();

View File

@@ -86,6 +86,7 @@ function translateFun() {
$('.newText1').text(langReplace(localLang.demoModule.newText1));
$('.newText2').text(langReplace(localLang.demoModule.newText2));
$('.newText3').text(langReplace(localLang.demoModule.newText3));
$('.audit').text(langReplace(localLang.demoModule.audit));
}
// 判断公会身份函数
function guildFun(type) {
@@ -133,8 +134,8 @@ function get() {
}
$('.text2').text(res.data.name)
// 渲染基本信息
$('.header .tx').attr('src', res.data.me.avatar);
$('.header .nick').text(res.data.me.nick);
$('.header .tx').attr('src', res.data.avatar);
$('.header .nick').text(res.data.name);
guildNick = res.data.name;
backgroundUrl = res.data.backgroundUrl;
console.log(res.data);
@@ -144,7 +145,7 @@ function get() {
payPal = res.data.payAccount.payPal;
}
familyMemberId = res.data.familyMemberId;
$('.header .id').text('ID' + res.data.me.erbanNo);
$('.header .id').text('ID' + res.data.owner.erbanNo);
$('.header').css({ "background": `url(${res.data.backgroundUrl}) no-repeat`, "background-size": "100% 100%" });
$('.header .guildNick').text(langReplace(localLang.demoModule.text11) + res.data.name);
// 处理成员

View File

@@ -29,6 +29,7 @@ langAr = {
newText1: `إحصائيات دخل العملة`,
newText2: `الوكالة`,
newText3: `المسؤول`,
audit: 'قيد المراجعة',
},
adminSet: {
text1: `إعدادات المشرف`,
@@ -76,6 +77,8 @@ langAr = {
textConte2: `تعديل `,
textConte3: `إضافة`,
textConte4: `حساب أستلام الراتب `,
text55: `صورة النقابة`,
toastMsgText1: `الرسوم المتحركة غير مدعومة للتحميل حاليًا`,
},
invitation: {
text1: `البحث`,

View File

@@ -27,6 +27,7 @@ langEn = {
newText1: `Coin Income Statistics`,
newText2: `Agency`,
newText3: `Administrator`,
audit:'In Audit',
},
adminSet: {
text1: `Administrator`,
@@ -74,6 +75,8 @@ langEn = {
textConte2: `Edit`,
textConte3: `Add`,
textConte4: `Payment Account`,
text55: `Guild Avatar`,
toastMsgText1: `GIF upload is not supported at the moment`,
},
invitation: {
text1: `Find`,

View File

@@ -29,6 +29,7 @@ langZh = {
newText1: `幣收入統計`,
newText2: `機構`,
newText3: `管理員`,
audit: '審核中',
},
adminSet: {
text1: `管理員設置`,
@@ -76,6 +77,8 @@ langZh = {
textConte2: `修改`,
textConte3: `添加`,
textConte4: `收款賬戶`,
text55: `公会头像`,
toastMsgText1: `暫不支援上傳動圖`,
},
invitation: {
text1: `搜索`,