细化产品库
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
<ai-result v-if="result.tips" v-bind="result"/>
|
||||
<input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/>
|
||||
<div class="codeBtn" @click="handleLogin">去登录</div>
|
||||
<u-radio-group v-model="currentLib" @change="getApps">
|
||||
<u-radio v-for="(op,i) in libs" :key="i" :name="op.dir">{{ op.label }}</u-radio>
|
||||
</u-radio-group>
|
||||
<input class="codeText" v-model="search" placeholder="搜索要查找的应用"/>
|
||||
<div flex class="appsPane wrap">
|
||||
<b v-for="app in appsList" :key="app.key" @tap="handleGotoApp(app)">{{ app.name }}</b>
|
||||
@@ -16,10 +19,11 @@
|
||||
<script>
|
||||
import {mapActions, mapState} from 'vuex'
|
||||
import AiResult from "../components/AiResult";
|
||||
import AiSelect from "../components/AiSelect";
|
||||
|
||||
export default {
|
||||
name: 'loading',
|
||||
components: {AiResult},
|
||||
components: {AiSelect, AiResult},
|
||||
inject: ['root'],
|
||||
computed: {
|
||||
...mapState(['token', 'openUser', 'user']),
|
||||
@@ -35,6 +39,11 @@ export default {
|
||||
return {
|
||||
result: {},
|
||||
apps: [],
|
||||
libs: [
|
||||
{label: "通用版", dir: "apps"},
|
||||
{label: "上架版", dir: "sass"},
|
||||
],
|
||||
currentLib: "apps",
|
||||
search: ""
|
||||
}
|
||||
},
|
||||
@@ -60,8 +69,8 @@ export default {
|
||||
},
|
||||
getApps() {
|
||||
this.apps = []
|
||||
let applications = require.context('../apps', true, /\.(\/.+)\/App[^\/]+\.vue$/)
|
||||
console.log(applications.keys())
|
||||
let applications = this.currentLib == "apps" ? require.context('../apps', true, /\.(\/.+)\/App[^\/]+\.vue$/) :
|
||||
this.currentLib == "sass" ? require.context('../sass', true, /\.(\/.+)\/App[^\/]+\.vue$/) : null
|
||||
applications.keys().map(path => {
|
||||
if (applications(path).default) {
|
||||
let {name: key, appName: name} = applications(path).default
|
||||
|
||||
Reference in New Issue
Block a user