乡村相册登录适应
This commit is contained in:
		
							
								
								
									
										15
									
								
								bin/serve.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								bin/serve.js
									
									
									
									
									
								
							| @@ -14,14 +14,23 @@ const getFileInfo = (app, file) => { | ||||
|   if (/^App/.test(app.name)) { | ||||
|     let {name, label} = app, | ||||
|         path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`) | ||||
|     apps.list.push({id: file.replace(/\.\/?(vue)?/g, '')?.replace(/[\\\/]/g,'_'), name, label, path, libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'), type: 'wxwork'}) | ||||
|     apps.list.push({ | ||||
|       id: file.replace(/\.\/?(vue)?/g, '')?.replace(/[\\\/]/g, '_'), | ||||
|       name, | ||||
|       label, | ||||
|       path, | ||||
|       libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'), | ||||
|       type: 'wxwork' | ||||
|     }) | ||||
|   } | ||||
| } | ||||
| const saveApps = app => { | ||||
|   if (app.list.length > 0) { | ||||
|     axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app).then(res => { | ||||
|     axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => { | ||||
|       if (res.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") | ||||
|     }).catch(() => 0) | ||||
|     }).catch(err => { | ||||
|       console.log(err) | ||||
|     }) | ||||
|   } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user