新版小程序打包
This commit is contained in:
		| @@ -4,9 +4,9 @@ | ||||
|       <ai-title slot="title" title="小程序部署发布" isShowBottomBorder/> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <!--          <template #left>--> | ||||
|           <!--            <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">增加</el-button>--> | ||||
|           <!--          </template>--> | ||||
|           <template #left> | ||||
|             <el-button type="primary" @click="handleSyncData">同步数据</el-button> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索项目/系统/appId/上传版本" v-model="search.name" clearable | ||||
|                       @change="page.current=1,getTableData()"/> | ||||
| @@ -17,7 +17,7 @@ | ||||
|           <el-table-column type="expand" slot="expand"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <ai-wrapper> | ||||
|                 <ai-info-item labelWidth="200px" v-for="op in desConfigs" :key="op.prop" :value="row[op.prop]" | ||||
|                 <ai-info-item labelWidth="200px" v-for="op in desConfigs" :key="op.prop" :value="row.dvcpConfig[op.prop]" | ||||
|                               v-bind="op"/> | ||||
|               </ai-wrapper> | ||||
|             </template> | ||||
| @@ -43,10 +43,11 @@ | ||||
|     <ai-dialog :visible.sync="dialog" title="部署设置" width="600px" @close="form={}" @onConfirm="submit"> | ||||
|       <el-form ref="DialogForm" :model="form" size="small" label-width="120px" :rules="rules"> | ||||
|         <el-form-item label="项目/系统" prop="name"> | ||||
|           {{ form.name }}(appid:<b v-text="form.miniapp_appid"/>) | ||||
|           {{ form.name }}(appid:<b v-text="form.appid"/>) | ||||
|         </el-form-item> | ||||
|         <el-form-item label="版本号" prop="version"> | ||||
|           <ai-select v-model="form.version" :instance="instance" action="/node/custom/list?type=mp" :prop="{label:'name'}"/> | ||||
|           <ai-select v-model="form.version" :instance="instance" action="/node/custom/list?type=mp" :prop="{label:'name'}" | ||||
|                      @select="v=>form.versionName=v.name"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="小程序上传私钥" prop="privateKey"> | ||||
|           <el-input v-model="form.privateKey" clearable placeholder="请输入"/> | ||||
| @@ -102,8 +103,8 @@ export default { | ||||
|       colConfigs: [ | ||||
|         {slot: "expand"}, | ||||
|         {label: "项目/系统名称", prop: "name", width: 300}, | ||||
|         {label: "appId", prop: "miniapp_appid", width: 180}, | ||||
|         {label: "管理后台", prop: "web_url"}, | ||||
|         {label: "appId", prop: "appid", width: 180}, | ||||
|         {label: "管理后台", prop: "webUrl"}, | ||||
|         {label: "上传版本", render: (h, {row}) => h('p', row.versionName || row.version)}, | ||||
|         {slot: "process"}, | ||||
|         {slot: "options"} | ||||
| @@ -119,20 +120,26 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     handleSyncData() { | ||||
|       this.instance.post("/node/wxmp/sync").then(this.getTableData) | ||||
|     }, | ||||
|     getTableData() { | ||||
|       this.instance.post("/node/wxmp/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records.map(e => ({...e, count: 0})) | ||||
|           this.tableData = res.data?.records.map(e => { | ||||
|             e.dvcpConfig = JSON.parse(e.dvcpConfig) | ||||
|             return {...e, count: 0} | ||||
|           }) | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleDownload(row) { | ||||
|       let {appid, pid} = row | ||||
|       let {id} = row | ||||
|       this.instance.post("/node/wxmp/download", null, { | ||||
|         params: {appid, pid}, | ||||
|         params: {id}, | ||||
|         responseType: "blob" | ||||
|       }).then(res => { | ||||
|         if (res?.code == 1) { | ||||
| @@ -150,7 +157,7 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|     handleZip(row) { | ||||
|       let {miniapp_appid: appid, version, id} = row | ||||
|       let {appid, version, id} = row | ||||
|       if (!version) return this.$message.error("请先维护要上传的版本!") | ||||
|       appid && this.instance.post("/node/wxmp/getZip", null, { | ||||
|         params: {appid, id} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user