放射z工作人员证书
|
|
@ -4107,6 +4107,14 @@
|
|||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true
|
||||
},
|
||||
"cos-js-sdk-v5": {
|
||||
"version": "0.5.27",
|
||||
"resolved": "https://registry.npmjs.org/cos-js-sdk-v5/-/cos-js-sdk-v5-0.5.27.tgz",
|
||||
"integrity": "sha512-kq5363l1TpU26AHRZTcWCibPfM5ykQ2zHsdpnP/Ax8SMuYQDNIP/BVWaA55Ks2r5JsELjqXLF516FeXQz3jEZw==",
|
||||
"requires": {
|
||||
"xmldom": "^0.1.27"
|
||||
}
|
||||
},
|
||||
"cosmiconfig": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npm.taobao.org/cosmiconfig/download/cosmiconfig-5.2.1.tgz?cache=0&sync_timestamp=1572710682964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcosmiconfig%2Fdownload%2Fcosmiconfig-5.2.1.tgz",
|
||||
|
|
@ -9577,6 +9585,11 @@
|
|||
"easy-stack": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"js-sha1": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/js-sha1/-/js-sha1-0.6.0.tgz",
|
||||
"integrity": "sha512-01gwBFreYydzmU9BmZxpVk6svJJHrVxEN3IOiGl6VO93bVKYETJ0sIth6DASI6mIFdt7NmfX9UiByRzsYHGU9w=="
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz",
|
||||
|
|
@ -15363,8 +15376,7 @@
|
|||
"uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1579209051695&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz",
|
||||
"integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=",
|
||||
"dev": true
|
||||
"integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4="
|
||||
},
|
||||
"validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
|
|
@ -15405,6 +15417,38 @@
|
|||
"integrity": "sha1-eGQcSIuObKkadfUR56OzKobl3aA=",
|
||||
"dev": true
|
||||
},
|
||||
"vod-js-sdk-v6": {
|
||||
"version": "1.4.12",
|
||||
"resolved": "https://registry.npmjs.org/vod-js-sdk-v6/-/vod-js-sdk-v6-1.4.12.tgz",
|
||||
"integrity": "sha512-JxUPuKWJI7nh6KZX333Q0rCljOpqi4Gp1NSGiR/vvV/CYGn+DIBuN0SiSvpHraOAdlABvlD+swPZYOeSXbCabA==",
|
||||
"requires": {
|
||||
"axios": "^0.21.1",
|
||||
"cos-js-sdk-v5": "0.5.27",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"js-sha1": "^0.6.0",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": {
|
||||
"version": "0.21.4",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
|
||||
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.14.0"
|
||||
}
|
||||
},
|
||||
"eventemitter3": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
||||
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue": {
|
||||
"version": "2.6.10",
|
||||
"resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz",
|
||||
|
|
@ -16191,6 +16235,11 @@
|
|||
"integrity": "sha1-auc+Bt5NjG5H+fsYH3jWSK1FfGo=",
|
||||
"dev": true
|
||||
},
|
||||
"xmldom": {
|
||||
"version": "0.1.31",
|
||||
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz",
|
||||
"integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ=="
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"vod-js-sdk-v6": "^1.4.12",
|
||||
"vue": "2.6.10",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-router": "3.0.6",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getCourseList(query) {
|
||||
return request({
|
||||
url: '/vod/course/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function createCourse(data) {
|
||||
return request({
|
||||
url: '/vod/course/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateCourse(id, data) {
|
||||
return request({
|
||||
url: `/vod/course/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function deleteCourse(id) {
|
||||
return request({
|
||||
url: `/vod/course/${id}/`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
|
@ -142,6 +142,13 @@ export function exportwTest(id,data) {
|
|||
})
|
||||
}
|
||||
|
||||
export function issue(id) {
|
||||
return request({
|
||||
url: `/examtest/examtest/${id}/issue/`,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteExamtest(id) {
|
||||
return request({
|
||||
url: `/examtest/examtest/${id}/`,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
export function getVideoList(query) {
|
||||
return request({
|
||||
url: '/vod/video/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function createVideo(data) {
|
||||
return request({
|
||||
url: '/vod/video/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateVideo(id, data) {
|
||||
return request({
|
||||
url: `/vod/video/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function deleteVideo(id) {
|
||||
return request({
|
||||
url: `/vod/video/${id}/`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function getSignature() {
|
||||
return request({
|
||||
url: '/vod/signature/',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
@ -97,6 +97,21 @@ export const asyncRoutes = [
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/vod',
|
||||
component: Layout,
|
||||
redirect: '/vod/index',
|
||||
name: 'Vod',
|
||||
meta: { title: '课程视频', icon: 'shopping', perms: ['vod'] },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: 'VodIndex',
|
||||
component: () => import('@/views/vod/index.vue'),
|
||||
meta: { title: '课程视频', icon: '', perms: ['vod'] }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/crm',
|
||||
component: Layout,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleIssue(scope)"
|
||||
>发证</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="primary"
|
||||
|
|
@ -131,7 +137,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getExamTestlist, exportTest, exportwTest, deleteExamtest } from "@/api/examtest";
|
||||
import { getExamTestlist, exportTest, exportwTest, deleteExamtest, issue } from "@/api/examtest";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
|
|
@ -243,6 +249,13 @@ export default {
|
|||
window.open(res.data.path, "_blank");
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
handleIssue(scope) {
|
||||
const loading = this.$loading({text: '正在发证..',});
|
||||
issue(scope.row.id).then(res=>{
|
||||
loading.close()
|
||||
this.$message.success('发证成功')
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
handleDelete(scope){
|
||||
this.$confirm("确认删除该考试记录吗?将丢失数据!", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@
|
|||
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="用户">
|
||||
<template slot-scope="scope">{{ scope.row.consumer_detail.name }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.consumer_detail">{{ scope.row.consumer_detail.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="单位">
|
||||
<template slot-scope="scope">{{ scope.row.consumer_detail.company_name }}</template>
|
||||
<template slot-scope="scope" v-if="scope.row.consumer_detail">{{ scope.row.consumer_detail.company_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="工作类别">
|
||||
<template slot-scope="scope">{{ scope.row.workscope_name }}</template>
|
||||
|
|
@ -81,23 +81,33 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'&&scope.row.candidate_==null"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleIssue(scope)"
|
||||
plain
|
||||
>发证</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleExport(scope)"
|
||||
plain
|
||||
>生成Word</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleExport2(scope)"
|
||||
plain
|
||||
>重新生成</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelete(scope)"
|
||||
plain
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -113,7 +123,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getExamTestlist, exportTest, exportwTest, deleteExamtest } from "@/api/examtest";
|
||||
import { getExamTestlist, exportTest, exportwTest, deleteExamtest, issue } from "@/api/examtest";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
|
|
@ -121,6 +131,7 @@ const listQuery = {
|
|||
page: 1,
|
||||
limit: 20,
|
||||
type:'正式考试',
|
||||
workscope__can_examself: false,
|
||||
search:''
|
||||
};
|
||||
export default {
|
||||
|
|
@ -258,6 +269,14 @@ this.$confirm("确认删除该考试记录吗?将丢失数据!", "警告", {
|
|||
window.open(response.data.path, "_blank");
|
||||
});
|
||||
},
|
||||
handleIssue(scope) {
|
||||
const loading = this.$loading({text: '正在发证..',});
|
||||
issue(scope.row.id).then(res=>{
|
||||
loading.close()
|
||||
this.$message.success('发证成功')
|
||||
scope.row.candidate_ = res.data
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
setTimeRange(){
|
||||
this.listQuery.start = this.value[0],
|
||||
this.listQuery.end = this.value[1],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,289 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div style="margin-top:10px">
|
||||
<el-select
|
||||
v-model="listQuery.is_pass"
|
||||
placeholder="是否通过"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="handleFilter"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in passOptions"
|
||||
:key="item.key"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
<el-input
|
||||
v-model="listQuery.search"
|
||||
placeholder="输入用户名或用户单位名搜索"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="resetFilter"
|
||||
>刷新重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="exportTest" >导出Excel</el-button>
|
||||
<div style="margin-top:10px">
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData.results"
|
||||
style="width: 100%;margin-top:10px;"
|
||||
border
|
||||
stripe
|
||||
fit
|
||||
v-loading="listLoading"
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
@sort-change="changeSort"
|
||||
>
|
||||
<el-table-column type="index" width="50"></el-table-column>
|
||||
<el-table-column align="left" label="类型">
|
||||
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="用户">
|
||||
<template slot-scope="scope" v-if="scope.row.consumer_detail">{{ scope.row.consumer_detail.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="单位">
|
||||
<template slot-scope="scope" v-if="scope.row.consumer_detail">{{ scope.row.consumer_detail.company_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="工作类别">
|
||||
<template slot-scope="scope">{{ scope.row.workscope_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="得分" sortable='custom' prop="score">
|
||||
<template slot-scope="scope">{{ scope.row.score }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="耗时(时分秒)" sortable='custom' prop="took">
|
||||
<template slot-scope="scope">{{ scope.row.took_format }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="答题时间">
|
||||
<template slot-scope="scope">{{ scope.row.start_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleIssue(scope)"
|
||||
>发证</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleExport(scope)"
|
||||
>生成Word</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleExport2(scope)"
|
||||
>重新生成</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type=='正式考试'"
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelete(scope)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="tableData.count>0"
|
||||
:total="tableData.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getExamTestlist, exportTest, exportwTest, deleteExamtest,issue } from "@/api/examtest";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const listQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
type:'正式考试',
|
||||
search:''
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: Object.assign({}, listQuery),
|
||||
tableData: {
|
||||
count:0,
|
||||
results:[],
|
||||
},
|
||||
listLoading: true,
|
||||
typeOptions: [
|
||||
{ key: "自助模考", label: "自助模考", value: "自助模考" },
|
||||
{ key: "押卷模考", label: "押卷模考", value: "押卷模考"},
|
||||
{ key: "正式考试", label: "正式考试", value: "正式考试"},
|
||||
],
|
||||
passOptions: [
|
||||
{ key: true, label: "通过", value: true },
|
||||
{ key: false, label: "未通过", value: false},
|
||||
],
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '最近一天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
value: '',
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch:{
|
||||
value:'setTimeRange',
|
||||
},
|
||||
created() {
|
||||
this.getQuery();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getQuery() {
|
||||
if(this.$route.params.exam){
|
||||
this.listQuery.exam = this.$route.params.exam;
|
||||
this.getList()
|
||||
}else{
|
||||
this.getList()
|
||||
}
|
||||
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
getExamTestlist(this.listQuery).then(response => {
|
||||
this.tableData = response.data;
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.listQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
type:'正式考试',
|
||||
search:'',
|
||||
};
|
||||
this.value = []
|
||||
this.getList();
|
||||
},
|
||||
handleExport(scope) {
|
||||
const loading = this.$loading({text: '正在生成word...',});
|
||||
exportwTest(scope.row.id).then(res=>{
|
||||
loading.close()
|
||||
window.open(res.data.path, "_blank");
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
handleDelete(scope){
|
||||
this.$confirm("确认删除该考试记录吗?将丢失数据!", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error"
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteExamtest(scope.row.id);
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "成功删除!"
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
handleExport2(scope) {
|
||||
const loading = this.$loading({text: '正在重新生成word...',});
|
||||
exportwTest(scope.row.id, {anew:true}).then(res=>{
|
||||
loading.close()
|
||||
window.open(res.data.path, "_blank");
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
exportTest() {
|
||||
const loading = this.$loading();
|
||||
exportTest(this.listQuery).then(response => {
|
||||
loading.close()
|
||||
window.open(response.data.path, "_blank");
|
||||
});
|
||||
},
|
||||
handleIssue(scope) {
|
||||
const loading = this.$loading({text: '正在发证..',});
|
||||
issue(scope.row.id).then(res=>{
|
||||
loading.close()
|
||||
this.$message.success('发证成功')
|
||||
}).catch(e=>{loading.close()})
|
||||
},
|
||||
setTimeRange(){
|
||||
this.listQuery.start = this.value[0],
|
||||
this.listQuery.end = this.value[1],
|
||||
this.getList()
|
||||
},
|
||||
changeSort (val) {
|
||||
if(val.order == 'ascending'){
|
||||
this.listQuery.ordering = val.prop
|
||||
}else{
|
||||
this.listQuery.ordering = '-' + val.prop
|
||||
}
|
||||
|
||||
this.getList()
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -126,6 +126,28 @@
|
|||
<el-form-item label="监考人联系方式" prop="proctor_phone" label-width="120px">
|
||||
<el-input v-model="exam.proctor_phone" placeholder="监考人联系方式" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="培训名称" prop="train_name">
|
||||
<el-input v-model="exam.train_name" placeholder="培训名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="培训开始" prop="train_start_date">
|
||||
<el-date-picker
|
||||
v-model="exam.train_start_date"
|
||||
type="date"
|
||||
placeholder="培训开始"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width:100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训结束" prop="train_end_date">
|
||||
<el-date-picker
|
||||
v-model="exam.train_end_date"
|
||||
type="date"
|
||||
placeholder="培训结束"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width:100%"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align:right;">
|
||||
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,17 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频分类" prop="courses">
|
||||
<el-select
|
||||
v-model="Form.courses" multiple placeholder="请选择视频分类" style="width:400px" >
|
||||
<el-option
|
||||
v-for="item in courseList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体科目" prop="questioncat">
|
||||
<el-select
|
||||
v-model="Form.questioncat" multiple placeholder="请选择题库范围" style="width:400px" >
|
||||
|
|
@ -47,6 +58,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发证年限">
|
||||
<el-input-number v-model="Form.issue_year" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序码">
|
||||
<el-input-number v-model="Form.sortnum" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
|
|
@ -59,6 +73,7 @@
|
|||
<script>
|
||||
import { createWorkScope, getTestRuleAll } from "@/api/examtest";
|
||||
import { getSubjectAll, getQuestioncatAll } from "@/api/question";
|
||||
import { getCourseList } from "@/api/course";
|
||||
import { genTree } from "@/utils";
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -68,10 +83,12 @@ export default {
|
|||
can_exam:false,
|
||||
subject: null,
|
||||
questioncat: [],
|
||||
sortnum:1
|
||||
sortnum:1,
|
||||
issue_year:5,
|
||||
},
|
||||
subjectData:[],
|
||||
questioncatData:[],
|
||||
courseList:[],
|
||||
ruleData:[],
|
||||
submitLoding:false,
|
||||
rules: {
|
||||
|
|
@ -94,6 +111,7 @@ export default {
|
|||
created() {
|
||||
this.getSubjectAll();
|
||||
this.getTestRuleAll();
|
||||
this.getCourseList();
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
|
|
@ -118,6 +136,11 @@ export default {
|
|||
this.subjectData = genTree(response.data) ;
|
||||
});
|
||||
},
|
||||
getCourseList(){
|
||||
getCourseList().then(res=>{
|
||||
this.courseList = res.data
|
||||
})
|
||||
},
|
||||
getQuestioncatAll() {
|
||||
getQuestioncatAll({pid:this.Form.subject}).then(response => {
|
||||
this.questioncatData = genTree(response.data) ;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,17 @@
|
|||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频分类" prop="courses">
|
||||
<el-select
|
||||
v-model="Form.courses" multiple placeholder="请选择视频分类" style="width:400px" >
|
||||
<el-option
|
||||
v-for="item in courseList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体科目" prop="questioncat">
|
||||
<el-select
|
||||
|
|
@ -47,6 +58,9 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发证年限">
|
||||
<el-input-number v-model="Form.issue_year" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序码">
|
||||
<el-input-number v-model="Form.sortnum" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
|
|
@ -60,6 +74,7 @@
|
|||
import { updateTestRule, getTestRuleAll, getWorkScopDetail, updateWorkScope} from "@/api/examtest";
|
||||
import { getSubjectAll, getQuestioncatAll } from "@/api/question";
|
||||
import { genTree } from "@/utils";
|
||||
import { getCourseList } from "@/api/course";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -68,11 +83,13 @@ export default {
|
|||
can_exam:false,
|
||||
subject: null,
|
||||
questioncat: [],
|
||||
issue_year:5
|
||||
},
|
||||
subjectData:[],
|
||||
questioncatData:[],
|
||||
ruleData:[],
|
||||
submitLoding:false,
|
||||
courseList:[],
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" }
|
||||
|
|
@ -95,6 +112,7 @@ export default {
|
|||
this.getWorkScopDetail();
|
||||
this.getSubjectAll();
|
||||
this.getTestRuleAll();
|
||||
this.getCourseList();
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
|
|
@ -113,6 +131,11 @@ export default {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
getCourseList(){
|
||||
getCourseList().then(res=>{
|
||||
this.courseList = res.data
|
||||
})
|
||||
},
|
||||
getSubjectAll() {
|
||||
getSubjectAll().then(response => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,410 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>课程分类</span>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAddCourse"
|
||||
size="small"
|
||||
style="margin-left: 8px"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table :data="courseList" :show-header="false">
|
||||
<el-table-column label="分类名">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
@click="handleUpdateCourse(scope)"
|
||||
icon="el-icon-edit"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="small"
|
||||
@click="handleDeleteCourse(scope)"
|
||||
icon="el-icon-delete"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>视频列表</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleAddVideo" size="small"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-table :data="videoList.results">
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" :href="scope.row.mediaurl" target="_blank">{{ scope.row.name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="描述">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.description
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="观看数">
|
||||
<template slot-scope="scope">{{scope.row.viewsp}}/{{scope.row.views}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.create_time
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="small"
|
||||
@click="handleUpdateVideo(scope)"
|
||||
icon="el-icon-edit"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="small"
|
||||
@click="handleDeleteVideo(scope)"
|
||||
icon="el-icon-delete"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="videoList.count > 0"
|
||||
:total="videoList.count"
|
||||
@pagination="getVideoList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'update' ? '编辑分类' : '新增分类'"
|
||||
>
|
||||
<el-form :model="course" label-width="80px" ref="courseForm">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="course.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmCourse('courseForm')"
|
||||
>确认</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible2"
|
||||
:destory-on-close="true"
|
||||
:title="dialogType2 === 'update' ? '编辑视频' : '新增视频'"
|
||||
v-if="dialogVisible2"
|
||||
>
|
||||
<el-form :model="video" label-width="80px" ref="videoForm">
|
||||
<el-form-item label="分类" prop="course" required>
|
||||
<el-select
|
||||
v-model="video.course"
|
||||
placeholder="请选择课程分类"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in courseList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name" required>
|
||||
<el-input v-model="video.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="video.description"
|
||||
placeholder="描述"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-row v-if="dialogType2=='create'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="封面" prop="coverurl" required>
|
||||
<input
|
||||
type="file"
|
||||
ref="posterInput"
|
||||
accept="image/*"
|
||||
v-if="!uploading && video.coverurl == null"
|
||||
/>
|
||||
<el-progress
|
||||
:percentage="uploaderInfo.coverProgress"
|
||||
v-if="uploading"
|
||||
></el-progress>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频" prop="mediaurl" required>
|
||||
<input
|
||||
type="file"
|
||||
ref="videoInput"
|
||||
accept=".mp4,.m3u8,.avi,.rmvb"
|
||||
v-if="!uploading && video.mediaurl == null"
|
||||
/>
|
||||
<el-progress
|
||||
:percentage="uploaderInfo.progress"
|
||||
v-if="uploading"
|
||||
></el-progress>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div style="text-align: center">
|
||||
<video
|
||||
:src="video.mediaurl"
|
||||
:poster="video.coverurl"
|
||||
controls
|
||||
style="width: 224; height: 140px"
|
||||
v-if="video.mediaurl != null"
|
||||
></video>
|
||||
<el-button type="primary" size="small" @click="startUpload" v-if="showStart"
|
||||
>开始上传封面和视频</el-button
|
||||
>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button type="danger" @click="dialogVisible2 = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="primary" @click="confirmVideo('videoForm')"
|
||||
>确认</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const defaultCourse = { name: "" };
|
||||
const defaultVideo = { name: "", mediaurl: null, coverurl: null };
|
||||
import {
|
||||
getCourseList,
|
||||
createCourse,
|
||||
deleteCourse,
|
||||
updateCourse,
|
||||
} from "@/api/course";
|
||||
import {
|
||||
getVideoList,
|
||||
getSignature,
|
||||
createVideo,
|
||||
deleteVideo,
|
||||
updateVideo,
|
||||
} from "@/api/video";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import TcVod from "vod-js-sdk-v6";
|
||||
import checkPermission from "@/utils/permission";
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
courseList: [],
|
||||
dialogVisible: false,
|
||||
dialogType: "create",
|
||||
course: { name: "" },
|
||||
videoList: { count: 0, results: [] },
|
||||
dialogVisible2: false,
|
||||
dialogType2: "create",
|
||||
video: { name: "" },
|
||||
uploading: false,
|
||||
posterPg: 20,
|
||||
videoPg: 20,
|
||||
showStart:true,
|
||||
uploaderInfo: {
|
||||
isVideoUploadSuccess: false,
|
||||
progress: 0,
|
||||
isCoverUploadSuccess: false,
|
||||
coverProgress: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getCourseList();
|
||||
this.getVideoList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
async getSignature() {
|
||||
const { data } = await getSignature();
|
||||
console.log(data);
|
||||
return data.signature;
|
||||
},
|
||||
startUpload() {
|
||||
var that = this;
|
||||
that.uploading = true;
|
||||
var mediaFile = that.$refs["videoInput"].files[0];
|
||||
var coverFile = that.$refs["posterInput"].files[0];
|
||||
const tcVod = new TcVod({
|
||||
getSignature: that.getSignature, // 前文中所述的获取上传签名的函数
|
||||
});
|
||||
const uploader = tcVod.upload({
|
||||
mediaFile: mediaFile,
|
||||
coverFile: coverFile,
|
||||
});
|
||||
that.showStart = false
|
||||
// 视频上传完成时
|
||||
uploader.on("media_upload", function (info) {
|
||||
that.uploaderInfo.isVideoUploadSuccess = true;
|
||||
});
|
||||
// 视频上传进度
|
||||
uploader.on("media_progress", function (info) {
|
||||
that.uploaderInfo.progress = parseInt(info.percent * 100);
|
||||
});
|
||||
// 封面上传完成时
|
||||
uploader.on("cover_upload", function (info) {
|
||||
that.uploaderInfo.isCoverUploadSuccess = true;
|
||||
});
|
||||
// 封面上传进度
|
||||
uploader.on("cover_progress", function (info) {
|
||||
that.uploaderInfo.coverProgress = parseInt(info.percent * 100);
|
||||
});
|
||||
uploader.done().then(function (doneResult) {
|
||||
// deal with doneResult
|
||||
that.uploading = false;
|
||||
that.video.fileid = doneResult.fileId;
|
||||
that.video.coverurl = doneResult.cover.url;
|
||||
that.video.mediaurl = doneResult.video.url;
|
||||
});
|
||||
},
|
||||
getCourseList() {
|
||||
getCourseList({ pageoff: true }).then((res) => {
|
||||
this.courseList = res.data;
|
||||
});
|
||||
},
|
||||
getVideoList() {
|
||||
getVideoList().then((res) => {
|
||||
this.videoList = res.data;
|
||||
});
|
||||
},
|
||||
handleAddCourse() {
|
||||
this.course = Object.assign({}, defaultCourse);
|
||||
this.dialogType = "create";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["courseForm"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleUpdateCourse(scope) {
|
||||
this.course = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "update";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["courseForm"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDeleteCourse(scope) {
|
||||
this.$confirm("确认删除该分类吗?将丢失数据!", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteCourse(scope.row.id);
|
||||
this.getCourseList();
|
||||
this.$message.success("成功删除");
|
||||
})
|
||||
.catch((err) => {
|
||||
// console.error(err);
|
||||
});
|
||||
},
|
||||
async confirmCourse(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "update";
|
||||
if (isEdit) {
|
||||
updateCourse(this.course.id, this.course).then(res => {
|
||||
this.getCourseList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
});
|
||||
} else {
|
||||
createCourse(this.course).then((res) => {
|
||||
this.getCourseList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleAddVideo() {
|
||||
this.video = Object.assign({}, defaultVideo);
|
||||
this.dialogType2 = "create";
|
||||
this.dialogVisible2 = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["videoForm"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleUpdateVideo(scope) {
|
||||
this.video = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType2 = "update";
|
||||
this.dialogVisible2 = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["videoForm"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDeleteVideo(scope) {
|
||||
this.$confirm("确认删除该视频吗?将丢失数据!", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteCourse(scope.row.id);
|
||||
this.getCourseList();
|
||||
this.$message.success("成功删除");
|
||||
})
|
||||
.catch((err) => {
|
||||
// console.error(err);
|
||||
});
|
||||
},
|
||||
async confirmVideo(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType2 === "update";
|
||||
if (isEdit) {
|
||||
updateVideo(this.video.id, this.video).then(() => {
|
||||
this.getVideoList();
|
||||
this.dialogVisible2 = false;
|
||||
this.$message.success("成功");
|
||||
});
|
||||
} else {
|
||||
createVideo(this.video).then((res) => {
|
||||
this.getVideoList();
|
||||
this.dialogVisible2 = false;
|
||||
this.$message.success("成功");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -19,6 +19,7 @@ App({
|
|||
api.request('/crm/consumer/mplogin/','POST', {code:res.code}).then(res=>{
|
||||
if(res.code==200){
|
||||
this.globalData.token = res.data.token
|
||||
this.globalData.session_key = res.data.session_key
|
||||
this.globalData.userinfo = res.data.userinfo
|
||||
//console.log(res.data.userinfo.perms)
|
||||
// var pages = getCurrentPages() //获取加载的页面
|
||||
|
|
@ -28,7 +29,7 @@ App({
|
|||
if(res.data.userinfo.role_name == '游客' && this.globalData.rlogin){
|
||||
//匿名用户
|
||||
wx.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
url: '/pages/login/login2',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +73,7 @@ App({
|
|||
userinfo: {}, // 服务器传回的消费者信息
|
||||
host: 'https://apitest.ahctc.cn',
|
||||
mediahost: 'https://apitest.ahctc.cn',
|
||||
//host: 'http://127.0.0.1:8000',
|
||||
// host: 'http://127.0.0.1:8000',
|
||||
//mediahost: 'http://127.0.0.1:8000',
|
||||
token : '',
|
||||
rlogin:true
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"pages/index/index",
|
||||
"pages/logs/logs",
|
||||
"pages/login/login",
|
||||
"pages/login/login2",
|
||||
"pages/lianxi/index",
|
||||
"pages/subject/index",
|
||||
"pages/lianxi/main",
|
||||
|
|
@ -35,12 +36,15 @@
|
|||
"pages/admin/index",
|
||||
"pages/admin/login",
|
||||
"pages/admin/exam/add",
|
||||
"pages/admin/exam/add2",
|
||||
"pages/admin/exam/detail",
|
||||
"pages/admin/exam/index",
|
||||
"pages/candidate/show",
|
||||
"pages/admin/candidate/index",
|
||||
"pages/candidate/my",
|
||||
"pages/admin/exam/upimg"
|
||||
"pages/admin/exam/upimg",
|
||||
"pages/video/index",
|
||||
"pages/video/play"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
|
@ -50,7 +54,7 @@
|
|||
},
|
||||
"tabBar": {
|
||||
"color": "#7A7E83",
|
||||
"selectedColor": "#3cc51f",
|
||||
"selectedColor": "#1296db",
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#ffffff",
|
||||
"list": [
|
||||
|
|
@ -90,11 +94,7 @@
|
|||
"kbone": true,
|
||||
"weui": true
|
||||
},
|
||||
"usingComponents": {
|
||||
"l-toast": "/miniprogram_npm/lin-ui/toast/index",
|
||||
"l-message": "/miniprogram_npm/lin-ui/message/index",
|
||||
"l-button": "/miniprogram_npm/lin-ui/button/index"
|
||||
},
|
||||
"usingComponents": {},
|
||||
"plugins": {
|
||||
"tencentvideo": {
|
||||
"version": "1.4.0",
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1596297111502" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2690" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M331.6 522c0.5-5.9 1.5-11.6 2.9-17.1h-0.1c-1.4 5.6-2.4 11.3-2.8 17.1 0 0.1 0 0.1 0 0 0 0.1 0 0 0 0zM443 423.2c0 0.1-0.1 0.3-0.1 0.4 57.4 2.2 103.3 49.2 103.4 107.1v-0.2c0-57.9-45.9-105-103.3-107.3z" fill="#F9D5B4" p-id="2691"></path><path d="M177.7 374.9c-3.6-4.2-7.2-8.5-10.4-13.1v-28.6c0.1-43.3 35.2-78.3 78.4-78.5H483v0.4h126.9v-58.5c-0.2-41.4-33.7-74.8-75.1-75H382.9v-0.4H145.6c-43.3 0.1-78.3 35.2-78.4 78.5v28.6c3.2 4.6 6.8 8.9 10.4 13.1-3.7-4.2-7.2-8.5-10.5-13.1v467.9c-0.1 41.5 33.5 75.2 75 75.4h25.1V361.8c3.3 4.6 6.8 8.9 10.5 13.1z m-54.1-52.1v-3.4c0.1-41.4 33.7-75 75.1-75.1h3.6c-43.4 0-78.6 35.1-78.7 78.5zM510.3 691.8c0 7.3-4.3 13.8-11.1 16.6-6.7 2.8-14.4 1.2-19.6-3.9l-41.1-41.1-41.1 41.1c-1.6 1.6-3.5 2.9-5.7 3.8-2.2 0.9-4.6 1.4-7 1.4-4.8 0-9.3-1.9-12.7-5.2-1.5-1.5-2.6-3.3-3.5-5.2v0.1c0.9 2.1 2.2 4 3.8 5.7 3.3 3.3 7.7 5.1 12.4 5.2 2.4 0 4.8-0.5 7-1.4 2.1-0.9 4-2.2 5.7-3.8l41.2-41 41.1 41.1c5.1 5.1 12.9 6.7 19.6 3.9 6.7-2.8 11.1-9.3 11.1-16.6l0.3-59c-0.1 0.1-0.3 0.2-0.4 0.3v58zM367.3 633.4v0.3c21.5 14.9 46.5 22.4 71.5 22.3-25 0-50-7.5-71.5-22.6zM438.7 638.7c5 0 9.9-0.5 14.8-1.2-4.8 0.7-9.8 1-14.8 1v0.2zM514.9 607c0.4-0.4 0.7-0.9 1.2-1.4-6.4 6.7-13.7 12.5-21.7 17.3 7.4-4.4 14.4-9.7 20.5-15.9zM98.6 110.9c-41.4 0.1-75 33.7-75.1 75.1v3.4c0.1-43.4 35.3-78.4 78.7-78.4h-3.6zM710 330.2v155.7l26.7-113.6v-30.4c0-4 1.8-7.8 5-10.3 1.5-1.2 3.3-2 5.2-2.5l6.8-28.9c9.3-42-16.9-83.8-58.8-93.6l-42.2-10.9c-3.9-0.9-8 0-11.1 2.4-3.1 2.5-5 6.3-5 10.3v46.9c40.6 1.1 73.2 34.1 73.4 74.9zM854.7 406.5c3.7-24.5-8-49.6-31.2-61.6l-25.9-13.4c-3.6-1.9-7.8-2-11.4-0.3-2.4 1.1-4.2 3-5.5 5.3l14.2 3.7c32.8 7.6 55.7 34.7 59.8 66.3zM710 616.5v78.6l26.7-52V509.3z" fill="#F9D5B4" p-id="2692"></path><path d="M198.7 244.4c-41.4 0.1-74.9 33.7-75.1 75.1v3.4c0.1-43.4 35.3-78.4 78.7-78.4h-3.6zM710 485.9V330.2c-0.2-40.8-32.8-73.7-73.3-74.8-0.6 0-1.1-0.2-1.7-0.2H483v6.7c0 96-77.8 173.8-173.9 173.8-47 0-91.3-19.3-123.6-52.4l-0.7-0.7c-2.5-2.6-4.9-5.2-7.2-7.9-3.7-4.2-7.2-8.5-10.5-13.1v467.8c-0.1 41.5 33.5 75.2 75 75.4h392.8c41.4-0.1 75-33.7 75.1-75.1V485.9zM510.4 692.4c0 7.3-4.3 13.8-11.1 16.6-6.7 2.8-14.5 1.2-19.6-3.9L438.6 664l-41.2 41c-1.6 1.6-3.5 2.9-5.7 3.8-2.2 0.9-4.6 1.4-7 1.4-4.6-0.1-9.1-1.9-12.4-5.2-1.6-1.6-2.9-3.6-3.8-5.7v-0.1c-0.9-2.2-1.4-4.5-1.4-6.9v-59c21.5 15 46.5 22.5 71.5 22.6 25 0 50-7.4 71.5-22.3 0.1-0.1 0.3-0.2 0.4-0.3l-0.1 59.1z m35.9-161.6c0 1.2-0.1 2.3-0.2 3.5-0.1 2.5-0.1 5-0.4 7.4-0.1 1.4-0.4 2.7-0.6 4-0.3 2.2-0.6 4.4-1 6.5-0.3 1.5-0.7 2.9-1.1 4.3-0.5 2-0.9 4-1.5 6-0.4 1.3-0.9 2.5-1.4 3.8-0.7 2.1-1.4 4.2-2.3 6.2-0.4 0.9-0.8 1.7-1.2 2.6-1.1 2.4-2.2 4.8-3.4 7-0.1 0.2-0.3 0.5-0.4 0.7-2.2 4-4.7 7.8-7.4 11.5-2.7 3.6-5.6 7.1-8.8 10.5-0.2 0.3-0.4 0.5-0.7 0.8-0.4 0.4-0.7 0.9-1.2 1.4-6.2 6.2-13.1 11.5-20.5 16-0.2 0.1-0.4 0.3-0.7 0.4-12.2 7.3-25.8 12.1-40 14.1h-0.3c-4.9 0.7-9.8 1.2-14.8 1.2v-0.5c-40.7 0-76.1-22.6-94.4-56-0.1-0.2-0.2-0.5-0.4-0.7-1.4-2.5-2.6-5.2-3.8-7.8-0.4-0.9-0.7-1.7-1.1-2.6-0.8-2-1.6-4.1-2.3-6.2-0.5-1.5-1-3-1.4-4.6l-1.2-4.5c-0.5-2.1-1-4.3-1.4-6.5-0.2-0.9-0.3-1.8-0.4-2.8-0.4-2.8-0.7-5.6-0.9-8.4-0.2-2.5-0.4-5-0.4-7.6 0-2.9 0.2-5.7 0.4-8.5 0.5-5.9 1.4-11.6 2.8-17.2 11.5-47 53.8-81.9 104.3-81.9 1.4 0 2.9 0.2 4.3 0.2 57.4 2.3 103.3 49.4 103.3 107.3 0.5 0.2 0.5 0.3 0.5 0.4zM923.6 478.3l-25.9-13.4c-3.6-1.9-7.8-2-11.4-0.3-3.6 1.7-6.3 4.9-7.3 8.8l-96.3 385.9h1.2c6.6-2.8 12.2-7.5 15.9-13.6 2.4-3.2 4.7-6.7 6.6-10.2l142.7-277.3c15-29.1 3.6-64.8-25.5-79.9zM854.7 406.5c-4.1-31.5-27-58.7-59.7-66.4l-14.2-3.7-28-7.2c-2-0.5-4-0.5-5.9 0-1.9 0.4-3.6 1.2-5.2 2.5-3.1 2.5-5 6.3-5 10.3v531h1c3.3-0.9 8.7-3.8 16.5-23.3 1.5-3.8 3.4-8.9 5.2-15l94.3-400.8c2.1-9.4 2.2-18.6 1-27.4z" fill="#FF7E00" p-id="2693"></path><path d="M245.7 254.8c-43.3 0.1-78.3 35.2-78.4 78.5v28.6c3.2 4.6 6.8 8.9 10.4 13.1 2.3 2.7 4.8 5.3 7.2 7.9l0.7 0.7c32.3 33.1 76.6 52.4 123.6 52.4 96 0 173.9-77.8 173.9-173.8V255.1H245.7z" fill="#FD973F" p-id="2694"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646232016809" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5102" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M937.154 984.333c-1.485 0-2.955-0.46-4.192-1.379l-128.85-94.949-129.726 94.786c-1.238 0.897-2.7 1.359-4.171 1.359-1.089 0-2.191-0.254-3.203-0.764-2.368-1.209-3.868-3.642-3.868-6.305v-191.509c0-2.271 1.089-4.405 2.928-5.733 1.223-0.885 2.673-1.337 4.143-1.337 0.743 0 1.498 0.121 2.22 0.361l45.813 15.172c2.977 0.855 5.21 3.579 5.21 6.794v71.362l76.624-55.959c1.244-0.906 2.708-1.359 4.171-1.359 1.471 0 2.948 0.46 4.192 1.379l75.436 55.583v-71.010c0-3.019 1.917-5.698 4.765-6.681l46.188-15.964c0.75-0.26 1.534-0.389 2.305-0.389 1.451 0 2.884 0.447 4.1 1.314 1.867 1.329 2.969 3.472 2.969 5.755v192.395c0 2.665-1.498 5.113-3.881 6.314-0.996 0.51-2.085 0.764-3.173 0.764zM134.749 951.301c-60.178 0-109.137-48.959-109.137-109.147v-694.208c0-60.188 48.959-109.153 109.137-109.153h605.566c60.199 0 109.173 48.966 109.173 109.153v216.558c0 3.902-3.162 7.069-7.069 7.069h-44.993c-3.909 0-7.069-3.168-7.069-7.069v-216.553c0-27.586-22.447-50.034-50.026-50.034h-605.573c-27.586 0-50.034 22.447-50.034 50.034v694.194c0 27.58 22.447 50.026 50.034 50.026h470.241c3.909 0 7.069 3.162 7.069 7.069v44.987c0 3.909-3.162 7.069-7.069 7.069h-470.247zM803.66 800.678c-112.142 0-203.386-91.229-203.386-203.373s91.238-203.38 203.386-203.38c112.151 0 203.401 91.238 203.401 203.38-0.005 112.142-91.252 203.373-203.401 203.373zM803.66 454.259c-78.879 0-143.053 64.173-143.053 143.046 0 78.879 64.173 143.053 143.053 143.053s143.053-64.173 143.053-143.053c0-78.873-64.173-143.046-143.053-143.046zM193.537 760.867c-3.902 0-7.069-3.162-7.069-7.069v-49.213c0-3.909 3.168-7.069 7.069-7.069h356.111c3.909 0 7.069 3.162 7.069 7.069v49.213c0 3.909-3.162 7.069-7.069 7.069h-356.111zM803.691 685.213c-48.471 0-87.913-39.436-87.913-87.907s39.436-87.907 87.913-87.907c48.465 0 87.907 39.436 87.907 87.907s-39.442 87.907-87.907 87.907zM803.691 546.628c-27.94 0-50.669 22.737-50.669 50.677s22.731 50.677 50.669 50.677c27.934 0 50.663-22.737 50.663-50.677s-22.731-50.677-50.663-50.677zM193.537 604.354c-3.902 0-7.069-3.162-7.069-7.069v-49.213c0-3.909 3.168-7.069 7.069-7.069h356.111c3.909 0 7.069 3.162 7.069 7.069v49.213c0 3.909-3.162 7.069-7.069 7.069h-356.111zM193.537 449.099c-3.902 0-7.069-3.168-7.069-7.069v-49.213c0-3.902 3.168-7.069 7.069-7.069h356.111c3.909 0 7.069 3.168 7.069 7.069v49.213c0 3.902-3.162 7.069-7.069 7.069h-356.111zM193.537 292.578c-3.902 0-7.069-3.168-7.069-7.069v-49.206c0-3.902 3.168-7.069 7.069-7.069h488.028c3.909 0 7.069 3.168 7.069 7.069v49.206c0 3.902-3.162 7.069-7.069 7.069h-488.028z" p-id="5103" fill="#1296db"></path></svg>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
|
@ -1 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1615988351221" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4995" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M504.5248 189.7472c-43.7248-25.1904-99.4304-13.1072-128.8192 27.9552l-15.36 21.6064c-31.8464 44.544-72.6016 82.0224-119.808 109.8752l-106.1888 62.7712C97.792 433.5616 79.36 476.16 88.4736 517.5296l106.496 482.304 159.5392-276.2752-5.9392-5.0176c-51.9168-46.7968-66.7648-123.2896-31.6416-184.1152 40.6528-70.3488 132.7104-93.2864 205.6192-51.0976 73.0112 42.0864 99.2256 133.2224 58.5728 203.6736l-4.096 6.5536c-37.888 58.2656-112.64 80.4864-178.4832 55.5008L240.2304 1022.7712 709.632 876.032c40.5504-12.6976 68.3008-49.8688 68.8128-92.3648l1.4336-121.2416c0.7168-54.784 12.9024-108.8512 35.7376-158.6176l11.5712-25.088c21.0944-45.9776 3.7888-100.4544-40.0384-125.8496l-282.624-163.1232zM586.752 10.6496C569.856 0.9216 549.7856-1.7408 530.944 3.2768c-18.8416 5.0176-34.9184 17.408-44.6464 34.304l-2.7648 5.3248c-16.384 34.6112-3.4816 75.9808 29.696 95.1296l312.9344 180.6336c16.896 9.728 36.9664 12.3904 55.808 7.3728 18.8416-5.0176 34.9184-17.408 44.6464-34.304l2.8672-5.3248c16.384-34.6112 3.3792-76.0832-29.7984-95.1296L586.752 10.6496z m0 0" p-id="4996" fill="#d81e06"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646232207512" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6280" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M295.581454 931.441151 92.254451 728.115155l562.02665-562.031684 203.325996 203.325996L295.581454 931.441151 295.581454 931.441151zM295.581454 931.441151M988.661735 143.042181 880.643352 35.02984c-26.31967-26.31967-70.851666-24.461989-99.461973 4.153353L679.701633 140.662939l203.325996 203.325996L984.507375 242.510195C1013.111641 213.893847 1014.976371 169.360844 988.661735 143.042181L988.661735 143.042181zM988.661735 143.042181M73.372554 760.101509 1.485823 1022.19971l262.070009-71.887738L73.372554 760.101509zM73.372554 760.101509" p-id="6281" fill="#1296db"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 956 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 902 B |
|
Before Width: | Height: | Size: 816 B After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 688 B |
|
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646231865619" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4207" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M229.9648 730.2656h568.4736v75.776H229.9648z" fill="#3B9DFF" p-id="4208"></path><path d="M1004.5696 1024H19.4304V76.544h258.4576v75.776H95.2064v795.8528h833.5872V152.32h-182.8864v-75.776h258.6624z" fill="#3B9DFF" p-id="4209"></path><path d="M797.5168 227.3792h-568.32V0h568.32z m-492.6976-75.776h416.8704V75.776H304.9728z" fill="#3B9DFF" p-id="4210"></path><path d="M463.0272 659.4048L267.4944 464.0256l53.6064-53.6064 141.9264 141.8752 242.7392-242.688 53.6576 53.248z" fill="#3B9DFF" p-id="4211"></path></svg>
|
||||
|
After Width: | Height: | Size: 888 B |
|
Before Width: | Height: | Size: 939 B |
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646231833143" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3304" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M688.5376 474.3168l-255.5904-147.456c-25.8048-15.1552-59.392 4.096-59.392 34.4064v295.7312c0 30.3104 32.768 49.5616 59.392 34.4064l255.5904-147.456c25.8048-15.9744 25.8048-54.4768 0-69.632z" fill="#1296db" p-id="3305"></path><path d="M512 1000.6528c-271.1552 0-491.52-220.3648-491.52-491.52s220.3648-491.52 491.52-491.52 491.52 220.3648 491.52 491.52-220.3648 491.52-491.52 491.52z m0-893.7472c-221.5936 0-402.2272 180.224-402.2272 402.2272s180.224 402.2272 402.2272 402.2272 402.2272-180.224 402.2272-402.2272-180.6336-402.2272-402.2272-402.2272z" fill="#1296db" p-id="3306"></path></svg>
|
||||
|
After Width: | Height: | Size: 966 B |
|
|
@ -1 +0,0 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1621915136519" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4543" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M692.949333 838.101333c30.933333 17.408 61.653333 26.197333 92.117334 26.197334 30.464 0 61.184-8.789333 92.117333-26.197334V960l-83.712-44.202667a15.530667 15.530667 0 0 0-14.250667-0.128l-86.4 44.202667v-121.770667h0.128zM810.666667 106.666667a42.666667 42.666667 0 0 1 42.666666 42.666666v298.666667h-128a170.666667 170.666667 0 0 0-170.453333 162.133333l-0.213333 8.533334v298.666666H213.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-725.333334a42.666667 42.666667 0 0 1 42.666666-42.666666h597.333334z m-25.6 426.666666c84.906667 0 153.6 68.138667 153.6 152.405334 0 84.224-68.693333 152.362667-153.6 152.362666s-153.6-68.138667-153.6-152.362666c0-84.266667 68.693333-152.405333 153.6-152.405334z m0 60.885334l-32.554667 47.018666-55.04 16.213334 35.114667 45.226666-1.536 57.002667 54.016-19.029333 54.186666 19.029333-1.536-57.002667 35.114667-45.226666-55.210667-16.213334-32.554666-47.018666zM490.666667 405.333333h-170.666667a21.333333 21.333333 0 0 0-20.992 17.493334L298.666667 426.666667v21.333333a21.333333 21.333333 0 0 0 17.493333 20.992L320 469.333333h170.666667a21.333333 21.333333 0 0 0 20.992-17.493333L512 448V426.666667a21.333333 21.333333 0 0 0-21.333333-21.333334z m128-170.666666h-298.666667a21.333333 21.333333 0 0 0-20.992 17.493333L298.666667 256v21.333333a21.333333 21.333333 0 0 0 17.493333 20.992L320 298.666667h298.666667a21.333333 21.333333 0 0 0 20.992-17.493334L640 277.333333V256a21.333333 21.333333 0 0 0-21.333333-21.333333z" fill="#d81e06" p-id="4544"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1 +0,0 @@
|
|||
import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"} }
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<l-popup show="{{show}}" showMask="{{true}}" contentAlign="bottom" locked="{{locked}}" bind:lintap="handleClickPopUp" z-index="{{zIndex}}">
|
||||
<view class="l-action-sheet">
|
||||
<view class="l-item-button l-class-title l-title-class" wx:if="{{title}}">
|
||||
{{ title }}
|
||||
</view>
|
||||
<view wx:for="{{ itemList }}" wx:key="name" hover-class="{{isHover?'list-hover':''}}">
|
||||
<l-button bind:lintap="handleClickItem" data-index="{{ index }}" data-item="{{ item }}" open-type="{{ item.openType }}" icon="{{ item.icon }}" type="default" size="large" special="{{true}}" long>
|
||||
<view style="{{ item.color ? 'color: ' + item.color : '' }}" class="l-item-button l-class-item l-item-class {{item.image || item.icon ? 'l-image-button':''}}">
|
||||
<image wx:if="{{item.image}}" class="l-button-image" src="{{item.image}}" style="{{item.imageStyle}}"/>
|
||||
<l-icon wx:elif="{{ item.icon }}" name="{{ item.icon }}" l-class="l-item-button" size="{{ item.iconSize }}" color="{{item.iconColor?item.iconColor:item.color}}"></l-icon>
|
||||
<text class="l-button-text">{{ item.name }}</text>
|
||||
</view>
|
||||
</l-button>
|
||||
</view>
|
||||
<view class="l-cancel l-class-cancel l-cancel-class {{isIphoneX ? 'l-cancel-x':''}}" wx:if="{{ showCancel }}" hover-class="{{isHover?'list-hover':''}}">
|
||||
<l-button type="default" size="large" long="true" bind:lintap="handleClickCancel" special="{{true}}">
|
||||
<view class="l-item-button l-cancel-button">{{ cancelText }}</view>
|
||||
</l-button>
|
||||
</view>
|
||||
</view>
|
||||
</l-popup>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"}},data:{newType:!0,shortSideValue:0,row:0,colum:0},lifetimes:{attached(){if(this.data.urls.length>9){const e=this.data.urls.slice(0,9);this.setData({urls:e}),console.warn("超过9张图片!")}this.preview()}},observers:{urls:function(){this.preview()}},methods:{judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,i=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:i*this.data.singleSize/t})}})},preview:function(){const e=this.judgeType();this.setData({newType:e});const t=this.data.urls,i=this.data.key;1===t.length&&this.horizontalOrVertical(e?t[0][i]:t[0])},onPreviewTap(e){const t=e.currentTarget.id,i=this.data.urls;let s="",a=[];const l=this.data.newType,r=this.data.key;if(l){s=i[t][r];for(let e=0;e<i.length;e++)a.push(i[e][r])}else s=i[t],a=i;let n={index:t,current:i[t],all:i};!0===this.data.preview&&wx.previewImage({current:s,urls:a}),this.triggerEvent("lintap",n,{})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{}}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<wxs src="index.wxs" module="album"></wxs>
|
||||
<view class="container l-class" style="{{album.containerStyle(urls, multipleSize, gapRow, gapColumn)}}">
|
||||
<block wx:for="{{urls}}" wx:key="index">
|
||||
<image id="{{index}}" bind:tap="onPreviewTap" class="{{album.blockClass(urls, horizontalScreen)}}" style="{{album.blockStyle(urls, horizontalScreen, shortSideValue, singleSize, multipleSize)}}" src="{{newType?item[key]:item}}" mode="{{urls.length === 1?singleMode:multipleMode}}"/>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
var containerStyle = function (urls, multipleSize, gapRow, gapColumn) {
|
||||
urls.length === 2 || urls.length === 4 ? 'width:' + (2 * multipleSize + gapRow) + 'rpx;' : 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx;'
|
||||
if (urls.length === 2 || urls.length === 4) {
|
||||
return 'width:' + (2 * multipleSize + gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
|
||||
} else {
|
||||
return 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var blockClass = function (urls, horizontalScreen) {
|
||||
if (urls.length === 1) {
|
||||
if (horizontalScreen) {
|
||||
return 'l-single-image-class'
|
||||
} else {
|
||||
return 'vertical l-single-image-class'
|
||||
}
|
||||
} else {
|
||||
return 'l-multi-image-class'
|
||||
}
|
||||
}
|
||||
|
||||
var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) {
|
||||
if (urls.length === 1) {
|
||||
if (horizontalScreen) {
|
||||
return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;'
|
||||
} else {
|
||||
return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;'
|
||||
}
|
||||
} else {
|
||||
return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;'
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
containerStyle: containerStyle,
|
||||
blockClass: blockClass,
|
||||
blockStyle: blockStyle
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container{display:grid}.vertical{height:360rpx}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import validator from"../behaviors/validator";import zIndex from"../behaviors/zIndex";const detail=!0,option={bubbles:!0,composed:!0};Component({behaviors:[zIndex,validator],externalClasses:["l-class","l-panel-class","l-bg-class","l-header-class"],options:{multipleSlots:!0},properties:{show:{type:Boolean,value:!1},maxHeight:{type:Number,value:600},minHeight:{type:Number,value:200},arcRadius:{type:Number,value:18},transition:{type:Boolean,value:!0},locked:{type:Boolean,value:!1},opacity:{type:Number,value:.4},direction:{type:String,options:["top","bottom"],value:"bottom"},headerFixed:{type:Boolean,value:!0}},data:{_arcRadiusTop:12,_ardRadiusBottom:18,arcStyle:""},observers:{show:function(t){t?(this.triggerEvent("linshow",!0,option),this.getArcPopupStyle()):this.triggerEvent("linclose",!0,option)},arcRadius:function(t){"top"===this.properties.direction?this.data._arcRadiusTop=t:this.data._ardRadiusBottom=t,this.getArcPopupStyle()}},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showArcPopup=t=>{const{zIndex:o=99,tranistion:e=!0,direction:i="bottom",locked:a=!1}={...t};this.setData({zIndex:o,tranistion:e,direction:i,locked:a,show:!0})},wx.lin.hideArcPopup=()=>{this.setData({show:!1})}},getArcPopupStyle(){const t=this.properties.direction,o=this.data._arcRadiusTop,e=this.data._ardRadiusBottom,i=`\n border-bottom-left-radius:${"top"===t?o:0}rpx;\n border-bottom-right-radius:${"top"===t?o:0}rpx;\n border-top-left-radius:${"bottom"===t?e:0}rpx;\n border-top-right-radius:${"bottom"===t?e:0}rpx;\n max-height:${this.properties.maxHeight}rpx;\n min-height:${this.properties.minHeight}rpx;\n `;this.setData({arcStyle:i})},onArcPopupTap(){this.data.locked||this.properties.show&&this.setData({show:!1})}},ready(){this.getArcPopupStyle()}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-popup":"../popup/index"}}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<l-popup show="{{show}}" direction="{{direction}}" transition="{{transition}}" opacity="{{opacity}}" locked="{{locked}}" z-index="{{zIndex}}" l-class="l-class" l-bg-class="l-bg-class" bind:lintap="onArcPopupTap">
|
||||
<scroll-view scroll-y="true" class="arc-popup l-panel-class" style="{{arcStyle}}">
|
||||
<view class="header-popup {{headerFixed ? 'fixed' : ''}} l-header-class">
|
||||
<slot name="header"/>
|
||||
</view>
|
||||
<view class="content-arc-popup">
|
||||
<slot/>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</l-popup>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-icon":"../icon/index"} }
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
<view class="l-avatar {{text||_isHaveUserNickName?'l-placement-'+placement:''}}" bindtap="tapAvatar">
|
||||
<view class="l-avatar-image {{shape?'l-'+shape:''}} l-class" wx:if="{{_isHaveUserAvatarUrl||icon||src}}" style="width:{{size}}rpx;height:{{size}}rpx">
|
||||
<open-data class="open-data" wx:if="{{_isHaveUserAvatarUrl}}" type="userAvatarUrl"/>
|
||||
<l-icon wx:elif="{{icon}}" size="{{iconSize || size*0.6}}" color="{{iconColor||'#ffffff'}}" name="{{icon}}"/>
|
||||
<image wx:elif="{{src}}" src="{{src}}" mode="{{mode}}" style="width:{{size}}rpx;height:{{size}}rpx"/>
|
||||
</view>
|
||||
<view class="l-avatar-text l-class-text l-text-class" wx:if="{{text||_isHaveUserNickName}}">
|
||||
<open-data class="open-data" wx:if="{{_isHaveUserNickName}}" type="userNickName"/>
|
||||
<text class="l-avatar-text-text" wx:elif="{{text}}">{{text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{}}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<view class="l-badge" bindtap="handleTap">
|
||||
<slot/>
|
||||
<block wx:if="{{show}}">
|
||||
<view wx:if="{{dot}}" class="l-badge-dot l-class l-class-self l-self-class"></view>
|
||||
<view wx:else class="{{'l-badge-content-'+shape}} l-badge-content l-class l-class-self l-self-class">{{finalCount}}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx}
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({behaviors:[],properties:{},data:{distance:0},attached(){this.offsetMargin()},methods:{offsetMargin(){const{windowHeight:t,screenHeight:e}=wx.getSystemInfoSync();this.setData({distance:e-t})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({behaviors:[],properties:{time:{type:Date,value:(new Date).getTime()+864e5,observer:function(t,e){t&&!e&&this.getLatestTime()}},status:{type:Boolean,value:!0,observer:function(t){t?this.init():t||clearInterval(this.data.timer)}},timeType:{type:String,value:"datetime"},format:{type:String,value:"{%d}天{%h}时{%m}分{%s}秒"},isZeroPadd:{type:Boolean,value:!0},countdownType:{type:String,value:"normal"},isClearInterval:{type:Boolean,value:!0}},data:{initAddTime:0,timer:null,date:[]},ready:function(){this.getLatestTime()},detached:function(){this.data.isClearInterval&&clearInterval(this.data.timer)},pageLifetimes:{hide(){this.data.isClearInterval&&clearInterval(this.data.timer)},show(){this.data.isClearInterval&&this.getLatestTime()}},methods:{zeroPadding:t=>(t=t.toString())[1]?t:"0"+t,init(){clearInterval(this.data.timer);const t=setTimeout(()=>{this.getLatestTime.call(this)},1e3);this.setData({timer:t})},getLatestTime(){let{time:t,status:e,timeType:i,initAddTime:a,countdownType:n}=this.data,s=t;if("normal"===n){if("second"!==i&&(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil((new Date(s).getTime()-(new Date).getTime())/1e3)),s<0&&"second"!==i)return this._getTimeValue(0),void this.CountdownEnd();s-a>0?this.getLatestForCountDown(s):s-a<0?this.getLatestForAddTime(s):s-a==0&&(a<=0&&this._getTimeValue(s),this.CountdownEnd()),e&&s-a!=0&&this.init.call(this)}else"anniversary"===n?"second"===i?console.error(`countdownType为${n}类型时,不可设置timeType值为second`):(s="string"==typeof t?s.replace(/-/g,"/"):s,s=Math.ceil(((new Date).getTime()-new Date(s).getTime())/1e3),s>=0?(this.getLatestForCountDown(s),this.init.call(this)):console.error("time传值错误")):console.error("错误的countdownType类型")},getLatestForAddTime(t){let{initAddTime:e}=this.data;e!==Math.abs(t)&&(e++,this._getTimeValue(e),this.setData({initAddTime:e}))},getLatestForCountDown(t){this._getTimeValue(t),this.setData({time:"second"===this.data.timeType?--t:this.data.time})},_getTimeValue(t){const{format:e}=this.data,i=[],a=e.split(/(\{.*?\})/);let n=t;return[{key:"{%d}",type:"day",count:86400},{key:"{%h}",type:"hour",count:3600},{key:"{%m}",type:"minute",count:60},{key:"{%s}",type:"second",count:1}].forEach(t=>{const e=this._findTimeName(a,t.key);if(-1===e)return;const s=a[e],o={type:t.type,name:s,value:parseInt(n/t.count)};this.data.isZeroPadd&&(o.value=this.zeroPadding(o.value)),n%=t.count,i.push(o)}),this.setData({date:i}),i},_findTimeName(t,e){const i=t.indexOf(e);return-1===i?-1:i+1},CountdownEnd(){this.triggerEvent("linend",{})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({behaviors:[],properties:{isHover:{type:Boolean,value:!0}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
import Schema from"../common/async-validator/index";import validator from"../behaviors/validator";export default Behavior({behaviors:[validator],properties:{rules:{type:[Object,Array],value:[]},tipType:{type:String,value:"toast",options:["toast","message","text"]}},data:{schema:"",tipFun:{message:"showMessage",toast:"showToast"},tipContent:{message:"content",toast:"title"},errorText:"",errors:[]},methods:{initRules(){const{rules:t}=this.data;t&&("[object Object]"===Object.prototype.toString.call(t)&&(this.data.rules=[t]),this.data.rules.forEach(t=>{t.trigger?"string"!=typeof t.trigger||(t.trigger=[t.trigger]):t.trigger=[]}))},getNeedValidateRule(t){const e=this.data.name,{rules:a}=this.data;if(!a)return;const r=t?a.filter(e=>e.trigger.indexOf(t)>-1):a,s=new Schema({[e]:r});return this.setData({schema:s}),r},validatorData(t,e){const{tipType:a,tipFun:r,tipContent:s}=this.data;this.getNeedValidateRule(e)&&(Object.getOwnPropertyNames(t).forEach(e=>{""===t[e]&&(t[e]=void 0)}),this.data.schema.validate(t,t=>{if(this.setData({errors:t||[]}),this.triggerEvent("linvalidate",{errors:t,isError:!!t}),t&&a){const e=r[a],i=s[a];return"text"===a?(this.setData({errorText:t[0].message}),t):wx.lin&&wx.lin[e]?(wx.lin[e]&&wx.lin[e]({[i]:t[0].message,duration:1500,mask:!1}),t):(wx.showToast({icon:"none",title:`请在页面内引入${a}组件`}),t)}!t&&a&&this.setData({errorText:""})}))}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({methods:{getRect(e,t=!1){return new Promise((r,o)=>{const s=wx.createSelectorQuery().in(this);(t?s.selectAll(e):s.select(e)).boundingClientRect(e=>{if(!e)return o("找不到元素");r(e)}).exec()})},queryScrollNode(e,t,r="width"){if(t<0)return;const o=e[t];this.getRect(".l-tabsscroll").then(s=>{if(!s)return console.error("找不到元素");const c=s[r];let n=e.slice(0,t).reduce((e,t)=>e+t[r],0);n+=(o[r]-c)/2,"width"===r?this.setData({transformX:n,transformY:0}):this.setData({transformX:0,transformY:n})}).catch(e=>{console.error(e)})},queryMultipleNodes(){const{placement:e,currentIndex:t}=this.data;this.getRect(".l-tabs-item",!0).then(r=>{-1!==["top","bottom"].indexOf(e)?this.queryScrollNode(r,t):this.queryScrollNode(r,t,"height")}).catch(e=>{console.error(e)})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
const isObj=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},getClassNames=e=>({enter:`l-${e}-enter l-${e}-enter-active l-enter-class l-enter-active-class`,"enter-to":`l-${e}-enter-to l-${e}-enter-active l-enter-to-class l-enter-active-class`,leave:`l-${e}-leave l-${e}-leave-active l-leave-class l-leave-active-class`,"leave-to":`l-${e}-leave-to l-${e}-leave-active l-leave-to-class l-leave-active-class`}),nextTick=()=>new Promise(e=>setTimeout(e,1e3/30));export default e=>Behavior({properties:{customStyle:String,show:{type:Boolean,value:e,observer:"observeShow"},duration:{type:null,value:300,observer:"observeDuration"},name:{type:String,value:"fade"}},data:{type:"",inited:!1,display:!1},attached(){this.data.show&&this.enter()},methods:{observeShow(e){e?this.enter():this.leave()},enter(){const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.enter:e;this.status="enter",this.triggerEvent("linbeforeenter"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("enter"),this.triggerEvent("linenter"),this.setData({inited:!0,display:!0,classes:s.enter,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("enter"),this.transitionEnded=!1,this.setData({classes:s["enter-to"]})}).catch(()=>{})},leave(){if(!this.data.display)return;const{duration:e,name:t}=this.data,s=getClassNames(t),a=isObj(e)?e.leave:e;this.status="leave",this.triggerEvent("linbeforeleave"),Promise.resolve().then(nextTick).then(()=>{this.checkStatus("leave"),this.triggerEvent("linleave"),this.setData({classes:s.leave,currentDuration:a})}).then(nextTick).then(()=>{this.checkStatus("leave"),this.transitionEnded=!1,setTimeout(()=>this.onTransitionEnd(),a),this.setData({classes:s["leave-to"]})}).catch(()=>{})},checkStatus(e){if(e!==this.status)throw new Error("incongruent status: "+e)},onTransitionEnd(){if(this.transitionEnded)return;this.transitionEnded=!0,this.triggerEvent("linafter"+this.status);const{show:e,display:t}=this.data;!e&&t&&this.setData({display:!1})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({definitionFilter(e){const{properties:o}=e;Object.keys(o).forEach(e=>{const{options:t}=o[e];t&&(o[e].observer=function(o){!t.includes(o)&&o&&console.error(`${e}: ${o} must be in the [${t}]`)})})}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({observers:{show:function(t){t&&this.changeStatus(),t||this.setData({status:t})}},methods:{changeStatus(){this.setData({status:!0}),this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(()=>{this.setData({status:!1}),this.data.success&&this.data.success(),this.data.timer=null},this.properties.duration)}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default Behavior({behaviors:[],properties:{zIndex:{type:Number,value:777}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-icon":"../icon/index"}}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<label for="{{name}}" bindtap="handleTap" class="l-label-class">
|
||||
<block wx:if="{{special}}">
|
||||
<view class="special-container l-class">
|
||||
<slot/>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="l-btn {{ 'l-btn-' + size }} {{ 'l-btn-' + type }} {{ 'l-btn-' + shape }} {{plain?'l-btn-plain':''}} {{ disabled ? 'l-btn-disabled' : ''}} l-class" hover-class="{{disabled?'':'btn-hover l-hover-class'}}" hover-stop-propagation="{{hoverStopPropagation}}" hover-start-time="{{hoverStartTime}}" hover-stay-time="{{hoverStayTime}}" style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0;':''}} {{'background-color:'+bgColor}}">
|
||||
<view wx:if="{{loading}}" class="l-btn-loading {{'margin-' + size}} {{ plain ?'l-btn-loading-' + type : '' }}"></view>
|
||||
<l-icon l-class="l-icon-class" class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}"/>
|
||||
<slot/>
|
||||
</view>
|
||||
</block>
|
||||
</label>
|
||||
<button style="position: absolute;top: -999px;left: -999px;" wx:if="{{openType}}" id="{{name}}" lang="{{lang}}" form-type="{{formType}}" open-type="{{openType}}" app-parameter="{{ appParameter }}" hover-stop-propagation="{{ hoverStopPropagation }}" hover-start-time="{{ hoverStartTime }}" hover-stay-time="{{ hoverStayTime }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" bindcontact="openTypeEvent" bindgetuserinfo="openTypeEvent" bindgetphonenumber="openTypeEvent" bindopensetting="openTypeEvent">
|
||||
</button>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.btn-hover::before{opacity:.15;position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;transform:translate(-50%,-50%);content:' ';background-color:#333;border-color:#333}.special-container{display:flex}.l-btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:28rpx;position:relative;color:#fff;padding:0 12rpx;box-sizing:border-box}.l-btn-img-mini{width:30rpx;height:30rpx}.l-btn-img-medium{width:36rpx;height:36rpx}.l-btn-img-large{height:44rpx;width:44rpx}.l-btn-long{border-radius:0;margin:0;height:88rpx;width:100%}.l-btn-medium{height:72rpx;min-width:180rpx}.l-btn-large{height:88rpx;min-width:710rpx}.l-btn-mini{height:60rpx;min-width:140rpx;font-size:24rpx}.l-btn-default{background-color:#3963bc}.l-btn-success{background-color:#34bfa3}.l-btn-warning{background-color:#ffe57f;color:#333}.l-btn-error{background-color:#f4516c}.l-btn-square{border-radius:0}.l-btn-semicircle{border-radius:40rpx}.l-btn-large.l-btn-semicircle{border-radius:48rpx}.l-btn-mini.l-btn-semicircle{border-radius:30rpx}.l-btn-circle{border-radius:8rpx}.l-btn-large.l-btn-circle{border-radius:9.6rpx}.l-btn-mini.l-btn-circle{border-radius:6rpx}.l-btn-plain{background-color:#fff;color:#3963bc;border:2rpx solid #3963bc}.l-btn-success.l-btn-plain{background-color:#fff;color:#34bfa3;border:2rpx solid #34bfa3}.l-btn-error.l-btn-plain{background-color:#fff;color:#f4516c;border:2rpx solid #f4516c}.l-btn-warning.l-btn-plain{background-color:#fff;color:#ffe57f;border:2rpx solid #ffe57f}.l-btn-loading{opacity:.6;display:inline-block;vertical-align:middle;width:24rpx;height:24rpx;background:0 0;border-radius:50%;border:4rpx solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.l-btn-loading-default{border:4rpx solid #3963bc;border-color:#3963bc #3963bc #3963bc transparent}.l-btn-loading-success{border:4rpx solid #34bfa3;border-color:#34bfa3 #34bfa3 #34bfa3 transparent}.l-btn-loading-error{border:4rpx solid #f4516c;border-color:#f4516c #f4516c #f4516c transparent}.l-btn-loading-warning{border:4rpx solid #ffe57f;border-color:#ffe57f #ffe57f #ffe57f transparent}.l-btn-disabled{opacity:.8}.icon{display:flex!important}.margin-mini{margin-right:10rpx}.margin-medium{margin-right:18rpx}.margin-large{margin-right:24rpx}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
|
||||
|
Before Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 434 B |
|
|
@ -1 +0,0 @@
|
|||
import deviceUtil from"../utils/device-util";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({behaviors:[validator],externalClasses:["l-title-class"],properties:{bgColor:{type:String,value:"white"},statusBarColor:{type:String,value:"transparent"},titleBarColor:{type:String,value:"transparent"},titleColor:{type:String,value:"black"},capsuleColor:{type:String,value:"black",options:["white","black"]},disableBack:{type:Boolean,value:!1},disableHome:{type:Boolean,value:!1},hiddenCapsule:{type:Boolean,value:!1},homePage:{type:String,value:""},title:{type:String,value:""},hasPadding:{type:Boolean,value:!0}},data:{titleBarHeight:deviceUtil.getTitleBarHeight(),statusBarHeight:deviceUtil.getStatusBarHeight(),capsuleButtonInfo:null},lifetimes:{ready:function(){this.setData({capsuleButtonInfo:this.getCapsuleButtonInfo()})}},methods:{getCapsuleButtonInfo(){const t=wx.getSystemInfoSync().screenWidth,e=wx.getMenuButtonBoundingClientRect();return e.left=t-e.right,e.right=e.left+e.width,e},onTapLeftButton(){eventUtil.emit(this,"linlefttap"),this.data.disableBack||wx.navigateBack()},onLongPressLeftButton(){eventUtil.emit(this,"linleftlongpress")},async onTapRightButton(){eventUtil.emit(this,"linrighttap");const t=this.data.homePage;this.data.disableHome||wx.switchTab({url:t,fail(){wx.navigateTo({url:t})}})},onLongPressRightButton(){eventUtil.emit(this,"linrightlongpress")}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
|
||||
|
||||
<view class="container" style="padding-top: {{hasPadding?titleBarHeight+statusBarHeight:'0'}}rpx">
|
||||
|
||||
<cover-view class="capsule-bar" style="background-color: {{bgColor}};">
|
||||
|
||||
|
||||
<cover-view class="status-bar" style="height: {{statusBarHeight+4}}rpx;background-color: {{statusBarColor}};"></cover-view>
|
||||
|
||||
|
||||
<cover-view class="title-bar" style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};">
|
||||
<cover-view class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
|
||||
</cover-view>
|
||||
|
||||
|
||||
<cover-view wx:if="{{!hiddenCapsule}}" class="capsule-button" style="border-color: rgba({{capsuleColor==='black'?'0,0,0,0.1':'255,255,255,0.25'}});background-color: rgba({{capsuleColor==='black'?'255,255,255,0.6':'0,0,0,0.15'}});width: {{capsuleButtonInfo.width}}px;height: {{capsuleButtonInfo.height}}px;left: {{capsuleButtonInfo.left}}px;top: {{capsuleButtonInfo.top}}px;">
|
||||
|
||||
<cover-view catch:tap="onTapLeftButton" catch:longpress="onLongPressLeftButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
|
||||
<cover-image class="icon-left" src="icons/capsule-left-{{capsuleColor}}.png"></cover-image>
|
||||
</cover-view>
|
||||
|
||||
|
||||
<cover-view class="line"></cover-view>
|
||||
|
||||
|
||||
<cover-view catch:tap="onTapRightButton" catch:longpress="onLongPressRightButton" hover-class="icon-wrapper-hover-{{capsuleColor}}" class="icon-wrapper" style="width: {{capsuleButtonInfo.width/2}}px;height: {{capsuleButtonInfo.height}}px;">
|
||||
<cover-image class="icon-right" src="icons/capsule-right-{{capsuleColor}}.png"></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
|
||||
<view class="content-container">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container{position:relative}.container .capsule-bar{width:100%;position:fixed;display:flex;flex-direction:column;top:0;left:0;z-index:999}.container .capsule-bar .status-bar{width:100%}.container .capsule-bar .title-bar{width:100%;display:flex;align-items:center;justify-content:center;margin-top:-4rpx;padding-top:4rpx;box-sizing:border-box}.container .capsule-bar .title-bar .title{font-size:36rpx;font-weight:700}.container .capsule-bar .capsule-button{border-radius:99999px;display:flex;align-items:center;border:1px solid rgba(0,0,0,.1);position:fixed}.container .capsule-bar .capsule-button .icon-wrapper-hover-black{background-color:rgba(0,0,0,.36)}.container .capsule-bar .capsule-button .icon-wrapper-hover-white{background-color:rgba(255,255,255,.339)}.container .capsule-bar .capsule-button .icon-wrapper{display:flex;justify-content:center;align-items:center}.container .capsule-bar .capsule-button .icon-wrapper .icon-left{display:block;width:20rpx;height:34rpx}.container .capsule-bar .capsule-button .icon-wrapper .icon-right{display:block;width:38rpx;height:34rpx}.container .capsule-bar .capsule-button .line{height:18px;width:1px;line-height:1;background-color:rgba(255,255,255,.25)}.container .content-container{width:100%;position:absolute;left:0}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-img-class","l-title-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{image:String,title:String,describe:String,plaintext:Boolean,full:Boolean,position:{type:String,value:"left",options:["left","right"]},type:{type:String,value:"primary",options:["primary","avatar","cover"]},imageMode:{type:String,value:"scaleToFill"}},data:{},methods:{}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{}}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<view class="l-class card-container {{'card-container-' + type}} {{'card-container-' + type + '-' + position}} {{full?'card-container-full':'card-container-unfull'}}">
|
||||
<block wx:if="{{type ==='primary' || type ==='cover'}}">
|
||||
<image wx:if="{{!plaintext}}" class="l-img-class {{full?'cover-img-full':'cover-img-unfull'}} {{ 'card-img-' + type }} {{ 'card-img-' + type + '-' + position }}" mode="{{imageMode}}" lazy-load src="{{image}}"></image>
|
||||
<view class="card-content">
|
||||
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
|
||||
<slot/>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{type ==='avatar'}}">
|
||||
<view class="card-avatar-top">
|
||||
<view class="card-avatar-left">
|
||||
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src="{{image}}" mode="{{imageMode}}" lazy-load></image>
|
||||
<view class="card-avatar">
|
||||
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
|
||||
<text class="describe">{{describe}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<slot name="more"/>
|
||||
</view>
|
||||
<slot/>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.card-container{margin:0 auto;padding:30rpx;box-sizing:border-box;background:#fff;display:flex}.card-container-full{width:100%}.card-container-unfull{width:92%;box-shadow:0 4rpx 20rpx 0 rgba(212,217,223,.5);border-radius:4px}.card-container-primary-left{flex-direction:row}.card-container-primary-right{flex-direction:row-reverse}.card-container-avatar{flex-direction:column}.card-container-cover{flex-direction:column}.cover-img-full{width:100%;height:260rpx}.cover-img-unfull{width:100%;height:260rpx}.card-img-primary{height:240rpx;width:240rpx;overflow:hidden}.card-img-primary-left{margin-right:40rpx}.card-img-primary-right{margin-left:40rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-content{position:relative;display:flex;flex-direction:column;flex:1}.card-title{overflow:hidden;text-overflow:ellipsis;color:#333}.card-title-primary{font-size:32rpx;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.card-title-avatar{font-size:28rpx}.card-title-cover{font-size:30rpx;margin-top:10rpx}.card-title-avatar{font-size:28rpx}.card-avatar-top{display:flex;flex-direction:row;height:100rpx;align-items:center;justify-content:space-between}.card-avatar-left{display:flex;flex-direction:row;align-items:center}.card-avatar{display:flex;flex-direction:column}.describe{color:#666;font-size:24rpx}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class"],relations:{"../checkbox/index":{type:"child",linked(e){this.init(e)},linkChanged(){},unlinked(){}}},properties:{placement:{type:String,value:"column"},maxSelected:{type:[Number,null],value:null},minSelected:{type:[Number,null],value:null}},data:{},attached(){let{minSelected:e,maxSelected:t}=this.properties;this.checkMax(e,t)},methods:{init(e){void 0===this._keys&&(this._keys={}),void 0===this._selected&&(this._selected={}),this.checkDefaultItem(e),this.checkedKeyRepeat(e)},checkedKeyRepeat(e){let{key:t}=e.properties;if(this._keys[t])throw new Error("keys有重复元素, checkbox的key属性不能重复:"+t);this._keys[t]=!0},checkDefaultItem(e){const{key:t,checked:l,cell:s}=e.properties;l&&(this._selected[t]={...s,checked:!0,value:t})},checkMax(e,t){if(null!==e&&e<0)throw new Error("最小选择个数必须大于等于0");if(null!==t&&t<0)throw new Error("最多选择个数必须大于0");if(null!==t&&null!==e&&e>=t)throw new Error("最多选择个数必须大于最小选择个数")},onEmitEventHandle(e){e.checked?this.addSelect(e):this.removeSelect(e.key),this.validatorData({[this.data.name]:Object.values(this._selected)}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},onEmitOverflowHandle(e){this.triggerEvent("linout",e,{bubbles:!0,composed:!0})},removeSelect(e){delete this._selected[e]},addSelect(e){let{key:t,...l}=e;this._selected[t]={...l,value:t}},getValues(){return Object.values(this._selected)},reset(){this._selected={};return this.getRelationNodes("../checkbox/index").forEach(e=>e.setData({checked:!1}))}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-checkbox":"../checkbox/index"}}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<view class="l-class checkbox-group checkbox-group-{{placement}}">
|
||||
<slot></slot>
|
||||
</view>
|
||||
<l-error-tip l-error-text-class="l-error-text l-error-text-class" errorText="{{errorText}}" wx:if="{{errorText}}"/>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.checkbox-group{flex-wrap:wrap}.checkbox-group-row{display:flex;flex-direction:row}.checkbox-group-column{display:flex;flex-direction:column}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Component({behaviors:["wx://form-field"],externalClasses:["l-class","l-disabled-class"],relations:{"../checkbox-group/index":{type:"parent"}},options:{multipleSlots:!0},properties:{placement:{type:String,value:"left"},custom:{type:Boolean,value:!1},key:{type:String,value:""},cell:{type:Object,value:{}},size:{type:String,value:"38rpx"},disabled:{type:Boolean,value:!1},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},color:{type:String,value:"#ccc"},checked:{type:Boolean,value:!1}},data:{parentPlacement:""},ready(){const e=this.getRelationNodes("../checkbox-group/index")[0];let{placement:t}=e.properties;this.setData({parentPlacement:t})},methods:{onCheckboxChangeTap(){if(this.properties.disabled||this.data.parentDisabled)return;const e=this.getRelationNodes("../checkbox-group/index")[0];if(this.properties.checked){if(this.isOverflow("minSelected"))return}else if(this.isOverflow("maxSelected"))return;const t={checked:!this.properties.checked,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(t)},isOverflow(e){const t=this.getRelationNodes("../checkbox-group/index")[0],l=t.properties[e];if(!l)return!1;const i=Object.values(t._selected).length;let o="minSelected"===e?i<=l:i>=l;if(o){let i="minSelected"===e?"min_selected":"max_selected";t.onEmitOverflowHandle&&t.onEmitOverflowHandle({key:this.properties.key,limitNumber:l,type:"overflow_"+i})}return o}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-button":"../button/index"}}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<view bind:tap="onCheckboxChangeTap" class="label label-{{placement}} label-placement-{{parentPlacement}} {{disabled ? 'label-disabled l-disabled-class' : 'l-class'}}">
|
||||
<view class="checkbox" style="color:{{checked ? selectColor : (disabled ? disabledColor : color)}};font-size: {{size}}">
|
||||
<slot wx:if="{{custom}}" name="icon"/>
|
||||
<view wx:else class="iconfont {{checked? 'icon-select': 'icon-unselect'}}"></view>
|
||||
</view>
|
||||
<slot/>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%;box-sizing:border-box}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.label-placement-row{padding-right:30rpx}.checkbox{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABxgAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBeIFdATYCJAMMCwgABCAFhG0HQBstBlGUzMkA2c8E020e0uBCKA1ReoTOr2jhX60Fez8evvb7nbu7X40GSTTS8S6aRBOpkCB1plMyIWkJb/+nLTemUXn+tjy1proDbGd+u9OXhuW20ygDQoJwOPhjfw50kxP0dlsW4tKSEtLyKhWqIpT/3MKy5KTZgMvpr8TnWZbTWts2jgmYYEBjDHuKrEQCzjUF2R2BWvJ9Am0LeioHm9MVtBXOskC8RIED7VJMUaRiU6i37C3iHV4zvaZPKG/x5+OfLdoktcxZe/S89mH27bv8VD0phAT5ch5Ih8jYBApx3eq7Uktzm2rahqZu1oO6IqSlklVFLDMN9YP+8RJR55R2wSrNJ775IoLvWEgggzoKDoFYipp4U38JhsVnsZqMDSLDTR9O5v6lxM+emWKnJ0j1WkJfv81PpvtdvqfbrTPuXw1+/Yswbx81bvFu4GNdLq7/WnYQrkR7OT7DTrwSHIOw0QhHGI+BEQb/TCiV/n/7MQFAQ9mO3iwSi9Gz9MCEpIu0tWgZiFkilLN8tRFgA1SnfMgz8o0Kgo9Q+Gcx3f/tTgFfe45JtDoVFO7QvAt/8FflYE8xlY49F13my+xAtjTRk6ASOahCOaGxn+mGGVxKaJrlSBrmkTUtkoWziZqOLdQ1baNtw/Zwx4SoidLCuneCMPSBpO8T2dAXWTjfqJnzi7ph1NB2EdwzO5Yj6oaEHCUf3UeMPM6N59RuUn6m4DZ1pKiMuTckZZTE8WBULW4pJ1liQ3kXTFQNGuEMN+QxSlPGQjgmTwehajEdDk3biwYeZ9C1TxCHIj7keoQiHpYz4XDVrb3/jARupRzS09AQv0FEKRodjQ2MAHKry6GGR2FTuhOYUMpAhmAZtCEekro5hor2WTHiUQPhhExhasgGGVQ32N6Q/UCp1ILzXI4UOYrOQ0he4vKDxXk7twIAAAAA') format('woff2')}.icon-unselect:before{content:"\e727"}.icon-select:before{content:"\e725"}
|
||||
|
|
@ -1 +0,0 @@
|
|||
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-title-class","l-body-class"],relations:{"../collapse/index":{type:"parent"}},options:{multipleSlots:!0,pureDataPattern:/^_/},properties:{itemId:{type:String,value:"default"},title:{type:String,value:"默认标题"},customTitle:{type:Boolean,value:!1},disable:{type:Boolean,value:!1},animationTime:{type:String,value:"0.3"}},data:{bodyHeight:"0",isExpandContent:!1,_idDefault:-1},methods:{async onTapTitle(){if(this.data.disable)return;let t=this.getRelationNodes("../collapse/index");await t[0].onTapCollapseItem(this)},async foldContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.data.isExpandContent?(this.setData({bodyHeight:t.height+"px"}),setTimeout(()=>{this.setData({isExpandContent:!1,bodyHeight:"0px"})},20)):this.setData({isExpandContent:!1,bodyHeight:"0px"})},async expandContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.setData({isExpandContent:!0,bodyHeight:t.height+"px"})},onTransitionend(){this.data.isExpandContent&&this.setData({bodyHeight:"auto"})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{"l-list":"../list/index","l-icon":"../icon/index"}}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<view class="container l-class">
|
||||
<view bind:tap="onTapTitle" class="container-title l-title-class">
|
||||
<view style="{{disable?'color:#DEE2E6':''}}" wx:if="{{!customTitle}}">{{title}}</view>
|
||||
<l-icon class="container-title-icon" wx:if="{{!customTitle}}" style="{{isExpandContent?'transform:rotate(-180deg);':''}}" name="down" size="28" color="{{disable?'#DEE2E6':'#333'}}"></l-icon>
|
||||
<slot name="title"></slot>
|
||||
</view>
|
||||
<view catch:transitionend="onTransitionend" class="container-body" style="height:{{bodyHeight}};transition-duration:{{animationTime}}s">
|
||||
<view class="container-body-wrapper l-body-class">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
.container{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.container-title{display:flex;justify-content:space-between;padding:10rpx;align-items:center;font-size:32rpx;color:#333}.container-title-l-icon{transition:.3s}.container-body{width:100%;color:#888;box-sizing:border-box;font-size:28rpx;transition:height .3s ease-in-out;overflow:hidden}.container-body-wrapper{position:relative;padding:10rpx}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Component({options:{pureDataPattern:/^_/},relations:{"../collapse-item/index":{type:"child",linked:function(){this._setAllItemId()},linkChanged:function(){this._setAllItemId()},unlinked:function(){this._setAllItemId()}}},lifetimes:{ready:function(){this.updateView()}},properties:{type:{type:String,value:"normal"},expandItemId:{type:Array,value:[]}},data:{_expandItems:[]},observers:{expandItemId:function(){this.updateView()}},methods:{async updateView(){let t;t="accordion"===this.data.type?this.data.expandItemId.slice(0,1):this.data.expandItemId;let e=this.getRelationNodes("../collapse-item/index");for(let a=0;a<e.length;a++){let d=e[a],i=d.id?d.id:a;t.indexOf(i)>-1&&!d.isExpandContent?await this.setCollapseItemStatus(d,!0):(d.isExpandContent||"accordion"===this.data.type)&&await this.setCollapseItemStatus(d,!1)}},async onTapCollapseItem(t){"accordion"===this.data.type&&await this.foldAllExpandItem(t),this.setCollapseItemStatus(t,!t.data.isExpandContent),t.data.isExpandContent?this.triggerEvent("linfold",{id:t.data.itemId?t.data.itemId:t.data._idDefault}):this.triggerEvent("linexpand",{id:t.data.itemId?t.data.itemId:t.data._idDefault})},async setCollapseItemStatus(t,e){if(e)t.expandContent(),this.data._expandItems.push(t);else{await t.foldContent();for(let e=0;e<this.data._expandItems.length;e++)this.data._expandItems[e]===t&&this.data._expandItems.splice(e,1)}},foldAllExpandItem(t){for(let e=0;e<this.data._expandItems.length;e++)t!==this.data._expandItems[e]&&this.data._expandItems[e].foldContent();this.data._expandItems=[]},_setAllItemId(){this.getRelationNodes("../collapse-item/index").forEach((t,e)=>{t.data._idDefault=e})}}});
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"component":true,"usingComponents":{}}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<view class="container">
|
||||
<slot></slot>
|
||||
</view>
|
||||
|
|
@ -1 +0,0 @@
|
|||
import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class-header","l-class-active","l-class-inactive","l-class-line","l-class-tabimage","l-header-class","l-active-class","l-inactive-class","l-line-class","l-tabimage-class","l-content-class"],relations:{"../tabpanel/index":{type:"child"},linked(){this.initTabs()}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},aminmated:Boolean,scrollable:Boolean,swipeable:{type:Boolean,value:!0},hasLine:{type:Boolean,value:!0},activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"}},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},ready(){this.initTabs()},methods:{initTabs(){this.initTabList(),this.initActiveIndex()},initActiveIndex(t=this.data.activeKey){let e=t,a=this.data.currentIndex;this.data.tabList.forEach((s,i)=>{e=t||0!==i?e:s.key,a=s.key===e?i:a}),this.setData({activeKey:e,currentIndex:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})},initTabList(){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){const e=[];t.forEach(t=>{const a=e.findIndex(e=>e.tab===t.data.tab);let s={};-1===a&&(s={tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconStyle:t.data.iconStyle,image:t.data.image,subTabs:[]},e.push(s));const i=-1===a?s:e[a];if(t.data.subTab){i.subTabs=i.subTabs||[];const e={tab:t.data.subTab,key:t.data.subKey};i.subTabs.push(e),i.activeSubKey=this.data.subActiveKey||i.subTabs[0].key,i.subCurrentIndex=0}}),this.setData({tabList:e})}},swiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const t=a,e=this.data.tabList[a].key,s=this.data.tabList[t].subCurrentIndex,i=this.data.tabList[t].activeSubKey;this._setChangeData({activeKey:e,currentIndex:t,subCurrentIndex:s,activeSubKey:i})}},subSwiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const{currentIndex:t,activeKey:e}=this.data,s=a,i=this.data.tabList[t].subTabs[s].key,n=this.data.tabList[t];n.activeSubKey=i,n.subCurrentIndex=s,this.setData({[`tabList[${t}]`]:n}),this._setChangeData({activeKey:e,currentIndex:t,activeSubKey:i,subCurrentIndex:s})}},handleChange(t){const e="subTab"===t.currentTarget.dataset.headerType,{currentIndex:a,activeKey:s}=this.data,i=t.currentTarget.dataset.index,n=e?i:this.data.tabList[i].subCurrentIndex,r=e?this.data.tabList[a].subTabs[n].key:this.data.tabList[i].activeSubKey;if(e){const t=this.data.tabList[a];t.activeSubKey=r,t.subCurrentIndex=n,this.setData({[`tabList[${a}]`]:t}),this._setChangeData({activeKey:s,currentIndex:a,activeSubKey:r,subCurrentIndex:n})}else{const e=t.currentTarget.dataset.key;this._setChangeData({activeKey:e,currentIndex:i,subCurrentIndex:n,activeSubKey:r})}},_setChangeData({activeKey:t,currentIndex:e,activeSubKey:a="",subCurrentIndex:s=null}){this.setData({activeKey:t,currentIndex:e},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:t,currentIndex:e,activeSubKey:a,subCurrentIndex:s})},async queryMultipleNodes(){const{placement:t,activeKey:e,tabList:a}=this.data,s=await nodeUtil.getNodeRectFromComponent(this,"#"+e);if(-1!==["top","bottom"].indexOf(t))this.setData({transformX:s.left-a.length/2*s.width,transformY:0});else{const t=await nodeUtil.getNodeRectFromComponent(this,".l-tabs-header"),e=s.top-t.top-t.height/2;this.setData({transformX:0,transformY:e})}}}});
|
||||