接口参数调整
This commit is contained in:
		
							parent
							
								
									c5794c24f4
								
							
						
					
					
						commit
						53e5cf6bd3
					
				| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
import Vue from 'vue'
 | 
					import Vue from 'vue'
 | 
				
			||||||
import { axios } from '@/utils/request'
 | 
					import { axios } from '@/utils/request'
 | 
				
			||||||
import signMd5Utils from '@/utils/encryption/signMd5Utils'
 | 
					import signMd5Utils from '@/utils/encryption/signMd5Utils'
 | 
				
			||||||
 | 
					import qs from "qs";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const api = {
 | 
					const api = {
 | 
				
			||||||
  user: '/mock/api/user',
 | 
					  user: '/mock/api/user',
 | 
				
			||||||
| 
						 | 
					@ -60,15 +61,16 @@ export function getAction(url,parameter) {
 | 
				
			||||||
  // update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
 | 
					  // update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
 | 
				
			||||||
  let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
 | 
					  let signHeader = {"X-Sign": sign,"X-TIMESTAMP": signMd5Utils.getTimestamp()};
 | 
				
			||||||
  // update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
 | 
					  // update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
 | 
				
			||||||
 | 
					 | 
				
			||||||
  return axios({
 | 
					  return axios({
 | 
				
			||||||
    url: url,
 | 
					    url: url,
 | 
				
			||||||
    method: 'get',
 | 
					    method: 'get',
 | 
				
			||||||
    params: parameter,
 | 
					    params: parameter,
 | 
				
			||||||
 | 
					    paramsSerializer: function (params) {  
 | 
				
			||||||
 | 
					      return qs.stringify(params, { arrayFormat: "repeat" });  
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    headers: signHeader
 | 
					    headers: signHeader
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
//deleteAction
 | 
					//deleteAction
 | 
				
			||||||
export function deleteAction(url,parameter) {
 | 
					export function deleteAction(url,parameter) {
 | 
				
			||||||
  return axios({
 | 
					  return axios({
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,7 +63,7 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { getAction, putAction } from '@/api/manage'
 | 
					import { getAction } from '@/api/manage'
 | 
				
			||||||
const columns = [
 | 
					const columns = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'NO',
 | 
					    title: 'NO',
 | 
				
			||||||
| 
						 | 
					@ -201,10 +201,10 @@ export default {
 | 
				
			||||||
        nuclideNames: this.targetKeys,
 | 
					        nuclideNames: this.targetKeys,
 | 
				
			||||||
        useType: 2
 | 
					        useType: 2
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      putAction("/sys/defaultNuclide/add",params).then(res => {
 | 
					      getAction("/sys/defaultNuclide/add",params).then(res => {
 | 
				
			||||||
        this.visible = false
 | 
					        this.visible = false
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.$message(res.message)
 | 
					          this.$message.success(res.message)
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$message.warning("This operation fails. Contact your system administrator")
 | 
					          this.$message.warning("This operation fails. Contact your system administrator")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -91,7 +91,7 @@
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import {getAction } from '@/api/manage'
 | 
					import { getAction } from '@/api/manage'
 | 
				
			||||||
const columns = [
 | 
					const columns = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'NO',
 | 
					    title: 'NO',
 | 
				
			||||||
| 
						 | 
					@ -256,10 +256,10 @@ export default {
 | 
				
			||||||
        nuclideType: this.currType,
 | 
					        nuclideType: this.currType,
 | 
				
			||||||
        useType: 1
 | 
					        useType: 1
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      putAction("/sys/defaultNuclide/add",params).then(res => {
 | 
					      getAction("/sys/defaultNuclide/add",params).then(res => {
 | 
				
			||||||
        this.visible = false
 | 
					        this.visible = false
 | 
				
			||||||
        if (res.success) {
 | 
					        if (res.success) {
 | 
				
			||||||
          this.$message(res.message)
 | 
					          this.$message.success(res.message)
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$message.warning("This operation fails. Contact your system administrator")
 | 
					          this.$message.warning("This operation fails. Contact your system administrator")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user