整合上架版进入标准流程

This commit is contained in:
aixianling
2022-07-04 15:48:17 +08:00
parent 993b90857d
commit 16bbd9080f
311 changed files with 15 additions and 34 deletions

View File

@@ -5,23 +5,19 @@
<!-- <div class="iconfont iconfont-iconLogo"/>-->
<ai-result v-if="result.tips" v-bind="result"/>
<input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/>
<u-radio-group v-model="currentLib" @change="handleSwitchSystem">
<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">
<div class="item" flex v-for="app in appsList" :key="app.id" @tap="handleGotoApp(app)">
<b v-text="app.label"/>
<u-tag v-if="app.project" :text="app.project" mode="dark" shape="circle" size="mini"/>
<div class="appName fill" v-text="app.name"/>
</div>
</div>
</section>
</template>
<script>
import {mapActions, mapMutations, mapState} from 'vuex'
import {mapActions, mapState} from 'vuex'
import AiResult from "../components/AiResult";
import AiSelect from "../components/AiSelect";
@@ -30,14 +26,14 @@ export default {
components: {AiSelect, AiResult},
inject: ['root'],
computed: {
...mapState(['token', 'openUser', 'user', 'apps']),
...mapState(['apps']),
appsList() {
let {search, currentLib} = this
let {search} = this
return this.apps.filter(e => {
if (/\/project\//.test(e.libPath)) {
e.project = e.libPath.replace(/.*project\/([^\/]+)\/.+/, '$1')
}
return (currentLib == "apps" && e.libPath.indexOf("project") > -1) || e.libPath.indexOf(currentLib) > -1
return e
}).filter(e => !!search ? e.label?.indexOf(search) > -1 : true) || []
},
currentApp() {
@@ -47,27 +43,16 @@ export default {
data() {
return {
result: {},
libs: [
{label: "通用版", dir: "apps"},
{label: "上架版", dir: "saas"},
],
currentLib: "apps",
search: ""
}
},
methods: {
...mapMutations(['logout', 'setApps']),
...mapActions(['agentSign']),
handleGotoApp(app) {
uni.navigateTo({url: `${app.libPath}`})
},
handleSwitchSystem() {
sessionStorage.setItem("prj", this.currentLib)
this.logout()
},
},
onLoad() {
this.currentLib = sessionStorage.getItem("prj") || "apps"
this.agentSign(this.$route.query)
},
onShow() {