web update

This commit is contained in:
全栈小学生 2023-06-03 18:27:03 +08:00
parent f00a12f1dd
commit 9d3d754ce1
16 changed files with 40 additions and 77 deletions

View File

@ -1,7 +1,6 @@
<template>
<div class="h-[30px]">
<el-button type="primary" link :disabled="!sendSms.canGetCode.value" @click="handleClick">{{ sendSms.text.value
}}</el-button>
<el-button type="primary" link :disabled="!sendSms.canGetCode.value" @click="handleClick">{{ sendSms.text.value }}</el-button>
</div>
<el-dialog v-model="captchaDialog" :title="t('captchaTitle')" width="350px" :append-to-body="true" :align-center="true">
@ -10,8 +9,7 @@
<el-input v-model="formData.captcha_code" :placeholder="t('captchaPlaceholder')">
<template #suffix>
<div class="py-[5px] leading-none">
<el-image :src="captcha.image.value" class="h-[30px] cursor-pointer"
@click="captcha.refresh()"></el-image>
<el-image :src="captcha.image.value" class="h-[30px] cursor-pointer" @click="captcha.refresh()"></el-image>
</div>
</template>
</el-input>

View File

@ -1,3 +1,2 @@
{
"test": "测试"
}

View File

@ -14,7 +14,7 @@
"privacyAgreement": "隐私协议",
"protocolNotConfigured": "未配置协议",
"siteClose": "站点已关闭",
"siteNonexistence": "站点不存在",
"noSite": "站点不存在",
"request": {
"unknownError": "未知错误",
"400": "错误的请求",

View File

@ -18,7 +18,7 @@
},
"site": {
"close": "站点已关闭",
"nonexistence": "站点不存在"
"nosite": "站点不存在"
}
}
}

View File

@ -1,5 +1,4 @@
<template>
<!-- main-container -->
<div class="flex h-full min-w-[1200px]">
<div class="flex items-center ml-[20px]">
<NuxtLink to="/">

View File

@ -28,10 +28,10 @@ import { useRoute } from 'vue-router';
const Route = useRoute(); //
const articleDeatail = ref();
onMounted(() => {
obtainArricleInfo(Route.query.id)
obtainArticleInfo(Route.query.id)
});
const obtainArricleInfo = (id) => {
const obtainArticleInfo = (id) => {
getArticleDetail(id).then(res => {
articleDeatail.value = res.data;
})
@ -71,7 +71,6 @@ const obtainArricleInfo = (id) => {
color: var(--el-color-primary);
}
// .demo-tabs .el-ta
.custom-tabs-label span{
font-size: 20px;
padding: 0px 10px;

View File

@ -16,7 +16,7 @@
<div class="flex mt-[20px] items-start">
<div class="w-[50px]">类目</div>
<el-row>
<el-button class="mb-[10px]" @click="selectedCategory(categoryItem)" v-for="(categoryItem, categoryIndex) in activeCategotyLsit" :key="categoryIndex">{{ categoryItem.name }}</el-button>
<el-button class="mb-[10px]" @click="selectedCategory(categoryItem)" v-for="(categoryItem, categoryIndex) in activeCategoryLsit" :key="categoryIndex">{{ categoryItem.name }}</el-button>
</el-row>
</div>
<div class="article-list mb-[20px] cursor-pointer" v-for="(activeItem, activeIndex) in articleTableData.data" :key="activeIndex" @click="toLink(activeItem.id)">
@ -65,7 +65,7 @@ import type { TabsPaneContext } from 'element-plus'
import { useRouter } from 'vue-router';
const router = useRouter();
const activeCategotyLsit = ref([])
const activeCategoryLsit = ref([])
const selectedCategoryName = ref()
const articleTableData = reactive({
page: 1,
@ -106,7 +106,7 @@ loadArticleList()
const checkArticleCategory = () => {
getArticleCategory().then(res => {
activeCategotyLsit.value = res.data.data;
activeCategoryLsit.value = res.data.data;
})
}
checkArticleCategory()
@ -160,7 +160,6 @@ const toLink = (id) => {
color: var(--el-color-primary);
}
// .demo-tabs .el-ta
.custom-tabs-label span{
font-size: 20px;
padding: 0px 10px;

View File

@ -15,16 +15,14 @@
<el-form-item prop="mobile_code">
<el-input v-model="formData.mobile_code" :placeholder="t('codePlaceholder')">
<template #suffix>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key"
@click="sendSmsCode" ref="smsCodeRef"></sms-code>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key" @click="sendSmsCode" ref="smsCodeRef"></sms-code>
</template>
</el-input>
</el-form-item>
</div>
<el-form-item>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleRegister"
:loading="loading">{{ loading ? t('binding') : t('bind') }}</el-button>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleRegister" :loading="loading">{{ loading ? t('binding') : t('bind') }}</el-button>
</el-form-item>
</el-form>
</div>

View File

@ -7,10 +7,9 @@
<div class="qrcode p-[10px] mt-[30px] border h-[120px] leading-none box-content">
<div class="relative">
<el-image :src="weixinCode.url" class="w-[120px]" />
<div class="flex flex-col justify-center items-center absolute inset-0 bg-gray-50"
v-if="weixinCode.pastDue">
<div class="flex flex-col justify-center items-center absolute inset-0 bg-gray-50" v-if="weixinCode.pastDue">
<span class="text-xs text-gray-600">{{ weixinCode.pastDueContent }}</span>
<span @click="scanloginFn()" class="text-xs cursor-pointer text-color mt-2">点击刷新</span>
<span @click="scanLoginFn()" class="text-xs cursor-pointer text-color mt-2">点击刷新</span>
</div>
</div>
</div>
@ -18,21 +17,16 @@
<div class="bg-white w-[380px] p-[30px]">
<div class="flex items-end my-[30px]">
<div class="mr-[20px] text-base cursor-pointer leading-none" :class="{ 'font-bold': type == item.type }"
v-for="item in loginType" @click="type = item.type">{{
item.title }}
</div>
<div class="mr-[20px] text-base cursor-pointer leading-none" :class="{ 'font-bold': type == item.type }" v-for="item in loginType" @click="type = item.type">{{item.title }}</div>
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" :validate-on-rule-change="false">
<div v-show="type == 'username'">
<el-form-item prop="username">
<el-input v-model="formData.username" :placeholder="t('usernamePlaceholder')" clearable
:inline-message="true">
<el-input v-model="formData.username" :placeholder="t('usernamePlaceholder')" clearable :inline-message="true">
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="formData.password" :placeholder="t('passwordPlaceholder')" type="password"
clearable :show-password="true">
<el-input v-model="formData.password" :placeholder="t('passwordPlaceholder')" type="password" clearable :show-password="true">
</el-input>
</el-form-item>
</div>
@ -44,8 +38,7 @@
<el-form-item prop="mobile_code">
<el-input v-model="formData.mobile_code" :placeholder="t('codePlaceholder')">
<template #suffix>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key"
@click="sendSmsCode" ref="smsCodeRef"></sms-code>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key" @click="sendSmsCode" ref="smsCodeRef"></sms-code>
</template>
</el-input>
</el-form-item>
@ -61,8 +54,7 @@
</div>
<el-form-item>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleLogin"
:loading="loading">{{ loading ? t('logining') : t('login') }}</el-button>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleLogin" :loading="loading">{{ loading ? t('logining') : t('login') }}</el-button>
</el-form-item>
<div class="text-xs py-[50rpx] flex justify-center w-full" v-if="configStore.login.agreement_show">
@ -95,7 +87,7 @@ definePageMeta({
});
//
const checkscanFn = (key) => {
const checkScanFn = (key) => {
let parameter = { key };
checkscan(parameter).then((res) => {
@ -103,7 +95,7 @@ const checkscanFn = (key) => {
switch (data.status) {
case 'wait':
setTimeout(() => {
checkscanFn(weixinCode.value.key);
checkScanFn(weixinCode.value.key);
}, 1000);
break;
@ -135,7 +127,7 @@ const weixinCode = ref({
pastDueContent: '二维码生成失败'
})
const scanloginFn = async () => {
const scanLoginFn = async () => {
let data = await (await scanlogin()).data;
weixinCode.value.key = data.key
QRCode.toDataURL(data.url, { errorCorrectionLevel: 'L', margin: 0, width: 100 }).then(url => {
@ -144,10 +136,10 @@ const scanloginFn = async () => {
weixinCode.value.pastDue = false;
setTimeout(() => {
checkscanFn(weixinCode.value.key);
checkScanFn(weixinCode.value.key);
}, 1000);
}
scanloginFn();
scanLoginFn();
const memberStore = useMemberStore()

View File

@ -5,34 +5,26 @@
<div class="title font-bold text-xl">打开手机微信</div>
<div class="tips text-sm mt-[5px]">点击右上角打开扫一扫</div>
<div class="qrcode mt-[30px] border leading-none">
<el-image
:src="img('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQHU7zwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAySlJSbU1Sb0hiMlQxOEcwSGhBY1AAAgTSfStkAwRYAgAA')"
class="w-[120px]"></el-image>
<el-image :src="img('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQHU7zwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAySlJSbU1Sb0hiMlQxOEcwSGhBY1AAAgTSfStkAwRYAgAA')" class="w-[120px]"></el-image>
</div>
</div>
<div class="bg-white w-[380px] p-[30px]">
<div class="flex items-end my-[30px]">
<div class="mr-[20px] text-base cursor-pointer leading-none" :class="{ 'font-bold': type == item.type }"
v-for="item in registerType" @click="type = item.type">{{
item.title }}
</div>
<div class="mr-[20px] text-base cursor-pointer leading-none" :class="{ 'font-bold': type == item.type }" v-for="item in registerType" @click="type = item.type">{{item.title }}</div>
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" :validate-on-rule-change="false">
<div v-show="type == 'username'">
<el-form-item prop="username">
<el-input v-model="formData.username" :placeholder="t('usernamePlaceholder')" clearable
:inline-message="true">
<el-input v-model="formData.username" :placeholder="t('usernamePlaceholder')" clearable :inline-message="true">
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="formData.password" :placeholder="t('passwordPlaceholder')" type="password"
clearable :show-password="true">
<el-input v-model="formData.password" :placeholder="t('passwordPlaceholder')" type="password" clearable :show-password="true">
</el-input>
</el-form-item>
<el-form-item prop="confirm_password">
<el-input v-model="formData.confirm_password" :placeholder="t('confirmPasswordPlaceholder')"
type="password" clearable :show-password="true">
<el-input v-model="formData.confirm_password" :placeholder="t('confirmPasswordPlaceholder')" type="password" clearable :show-password="true">
</el-input>
</el-form-item>
</div>
@ -44,8 +36,7 @@
<el-form-item prop="mobile_code">
<el-input v-model="formData.mobile_code" :placeholder="t('codePlaceholder')">
<template #suffix>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key"
@click="sendSmsCode" ref="smsCodeRef"></sms-code>
<sms-code :mobile="formData.mobile" type="login" v-model="formData.mobile_key" @click="sendSmsCode" ref="smsCodeRef"></sms-code>
</template>
</el-input>
</el-form-item>
@ -55,8 +46,7 @@
<el-input v-model="formData.captcha_code" :placeholder="t('captchaPlaceholder')">
<template #suffix>
<div class="py-0 leading-none">
<el-image :src="captcha.image.value" class="h-[30px] cursor-pointer"
@click="captcha.refresh()"></el-image>
<el-image :src="captcha.image.value" class="h-[30px] cursor-pointer" @click="captcha.refresh()"></el-image>
</div>
</template>
</el-input>
@ -70,8 +60,7 @@
</div>
<el-form-item>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleRegister"
:loading="loading">{{ loading ? t('registering') : t('register') }}</el-button>
<el-button type="primary" class="mt-[20px] w-full" size="large" @click="handleRegister" :loading="loading">{{ loading ? t('registering') : t('register') }}</el-button>
</el-form-item>
<div class="text-xs py-[50rpx] flex justify-center w-full" v-if="configStore.login.agreement_show">

View File

@ -19,8 +19,7 @@
<p class="text-[14px] w-[280px] h-[100px] text-[#666666] leading-[22px] mt-[30px] mb-[20px]">
详尽细致的逐步官方教程帮助您系统全面的接触NIUCLOUD建议在使用前阅读</p>
<NuxtLink to="https://www.kancloud.cn/cui18734824089/niucloud-admin-develop/3148343" target="_blank">
<div
class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<div class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<span class="block ml-[20px] text-[14px] text-[#333]">前往教程</span>
<span class="block mr-[20px] text-[24px] text-[#333]"></span>
</div>
@ -34,8 +33,7 @@
<p class="text-[14px] w-[280px] h-[100px] text-[#666666] leading-[22px] mt-[30px] mb-[20px]">
您可以通过API文档了解niucloud的正确使用方法也可以更加深入地理解niucloud的运行逻辑</p>
<NuxtLink to="https://www.niucloud.com/apidoc.html" target="_blank">
<div
class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<div class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<span class="block ml-[20px] text-[14px] text-[#333]">前往API文档</span>
<span class="block mr-[20px] text-[24px] text-[#333]"></span>
</div>
@ -49,8 +47,7 @@
<p class="text-[14px] w-[280px] h-[100px] text-[#666666] leading-[22px] mt-[30px] mb-[20px]">
便捷地浏览其它用户关于niucloud的问题并从解答中获取niucloud的使用方法当然您可以进行提问</p>
<NuxtLink>
<div
class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<div class="flex justify-between items-center w-[280px] h-[40px] leading-[40px] rounded-[5px] border-[1px] border-[solid] border-[#508BFE]">
<span class="block ml-[20px] text-[14px] text-[#333]">前往问答社区</span>
<span class="block mr-[20px] text-[24px] text-[#333]"></span>
</div>

View File

@ -17,9 +17,7 @@
<el-table-column prop="create_time" :label="t('occurrenceTime')" />
</el-table>
<div class="mt-[16px] flex justify-end">
<el-pagination v-model:current-page="balanceTableData.page" v-model:page-size="balanceTableData.limit"
layout="total, sizes, prev, pager, next, jumper" :total="balanceTableData.total"
@size-change="loadBalanceList()" @current-change="loadBalanceList" />
<el-pagination v-model:current-page="balanceTableData.page" v-model:page-size="balanceTableData.limit" layout="total, sizes, prev, pager, next, jumper" :total="balanceTableData.total" @size-change="loadBalanceList()" @current-change="loadBalanceList" />
</div>
</div>
</el-card>

View File

@ -12,8 +12,7 @@
<el-form :model="info" class="form-wrap" label-width="120px">
<el-form-item :label="t('memberHeadimg')">
<div class="w-full flex justify-between content-center items-center">
<img v-if="!info.headimg" class="w-[80px] h-[80px]"
src="@/assets/images/default_headimg.png" alt="">
<img v-if="!info.headimg" class="w-[80px] h-[80px]" src="@/assets/images/default_headimg.png" alt="">
<img v-else :src="img(info.headimg)" class="w-[80px] h-[80px]" alt="">
<el-upload class="avatar-uploader" :show-file-list="false" v-bind="upload">
<span class="cursor-pointer text-color">{{ t('edit') }}</span>
@ -23,8 +22,7 @@
<el-form-item :label="t('nickname')">
<div class="w-full flex justify-between content-center">
<span>{{ updateNickname.value }}</span>
<span class="cursor-pointer text-color" @click="updateNickname.modal = true">{{ t('edit')
}}</span>
<span class="cursor-pointer text-color" @click="updateNickname.modal = true">{{ t('edit')}}</span>
</div>
</el-form-item>
</el-form>

View File

@ -17,9 +17,7 @@
<el-table-column prop="create_time" :label="t('occurrenceTime')" />
</el-table>
<div class="mt-[16px] flex justify-end">
<el-pagination v-model:current-page="pointTableData.page" v-model:page-size="pointTableData.limit"
layout="total, sizes, prev, pager, next, jumper" :total="pointTableData.total"
@size-change="loadPointList()" @current-change="loadPointList" />
<el-pagination v-model:current-page="pointTableData.page" v-model:page-size="pointTableData.limit" layout="total, sizes, prev, pager, next, jumper" :total="pointTableData.total" @size-change="loadPointList()" @current-change="loadPointList" />
</div>
</div>
</el-card>

View File

@ -1,7 +1,6 @@
<template>
<div class="w-screen h-screen flex flex-col items-center justify-center">
<el-empty :description="t('siteNonexistence')" :image="img('static/resource/images/site/close.png')"
image-size="300px" />
<el-empty :description="t('noSite')" :image="img('static/resource/images/site/close.png')" image-size="300px" />
</div>
</template>

View File

@ -25,7 +25,7 @@ const useSystemStore = defineStore('system', {
if (this.site.status == 3) navigateTo('/site/close', { replace: true })
})
.catch((err) => {
navigateTo('/site/nonexistence', { replace: true })
navigateTo('/site/nosite', { replace: true })
})
}
}