Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
						commit
						d5f81fe5d8
					
				|  | @ -5,17 +5,10 @@ | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import {v4 as uuidv4} from 'uuid'; | 
 | ||||||
| import storage from '@/plugins/storage'; |  | ||||||
| export default { | export default { | ||||||
|   name: 'App', |   name: 'App', | ||||||
|   mounted () { | 
 | ||||||
|     let uuid = storage.getItem('uuid'); |  | ||||||
|     if (!uuid) { |  | ||||||
|       uuid = uuidv4(); |  | ||||||
|       storage.setItem('uuid', uuid); |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| <style lang="scss"> | <style lang="scss"> | ||||||
|  |  | ||||||
|  | @ -5,6 +5,8 @@ import Storage from './storage'; | ||||||
| import router from '../router/index.js'; | import router from '../router/index.js'; | ||||||
| import store from '../vuex/store'; | import store from '../vuex/store'; | ||||||
| import { handleRefreshToken } from '@/api/index'; | import { handleRefreshToken } from '@/api/index'; | ||||||
|  | import {v4 as uuidv4} from 'uuid'; | ||||||
|  | 
 | ||||||
| const qs = require('qs'); | const qs = require('qs'); | ||||||
| // api地址
 | // api地址
 | ||||||
| export const buyerUrl = | export const buyerUrl = | ||||||
|  | @ -59,7 +61,11 @@ service.interceptors.request.use( | ||||||
|       config.loading = Spin.show(); |       config.loading = Spin.show(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const uuid = Storage.getItem('uuid'); |     let uuid = Storage.getItem('uuid'); | ||||||
|  |     if (!uuid) { | ||||||
|  |       uuid = uuidv4(); | ||||||
|  |       Storage.setItem('uuid', uuid); | ||||||
|  |     } | ||||||
|     config.headers['uuid'] = uuid; |     config.headers['uuid'] = uuid; | ||||||
| 
 | 
 | ||||||
|     // 获取访问Token
 |     // 获取访问Token
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import {v4 as uuidv4} from 'uuid'; |  | ||||||
| import {getCategoryTree} from '@/api/goods.js' | import {getCategoryTree} from '@/api/goods.js' | ||||||
| export default { | export default { | ||||||
|   updated() { |   updated() { | ||||||
|  | @ -17,13 +16,7 @@ export default { | ||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted() { | 
 | ||||||
|     let uuid = this.getStore('uuid'); |  | ||||||
|     if (!uuid) { |  | ||||||
|       uuid = uuidv4(); |  | ||||||
|       this.setStore('uuid', uuid); |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ import { router } from "../router/index"; | ||||||
| import { Message } from "view-design"; | import { Message } from "view-design"; | ||||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||||
| import { handleRefreshToken } from "../api/index"; | import { handleRefreshToken } from "../api/index"; | ||||||
|  | import {v4 as uuidv4} from 'uuid'; | ||||||
| 
 | 
 | ||||||
| // 统一请求路径前缀
 | // 统一请求路径前缀
 | ||||||
| export const commonUrl = | export const commonUrl = | ||||||
|  | @ -29,7 +30,11 @@ service.interceptors.request.use( | ||||||
|         ...config.params |         ...config.params | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|     const uuid = getStore("uuid"); |     let uuid = getStore("uuid"); | ||||||
|  |     if (!uuid) { | ||||||
|  |       uuid = uuidv4(); | ||||||
|  |       setStore('uuid', uuid); | ||||||
|  |     } | ||||||
|     config.headers["uuid"] = uuid; |     config.headers["uuid"] = uuid; | ||||||
|     return config; |     return config; | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
|  | @ -5,15 +5,8 @@ | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import {v4 as uuidv4} from 'uuid'; |  | ||||||
| export default { | export default { | ||||||
|   mounted() { | 
 | ||||||
|     let uuid = this.getStore('uuid'); |  | ||||||
|     if (!uuid) { |  | ||||||
|       uuid = uuidv4(); |  | ||||||
|       this.setStore('uuid', uuid); |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ import { router } from "../router/index"; | ||||||
| import { Message } from "view-design"; | import { Message } from "view-design"; | ||||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||||
| import { handleRefreshToken } from "@/api/index"; | import { handleRefreshToken } from "@/api/index"; | ||||||
|  | import {v4 as uuidv4} from 'uuid'; | ||||||
| 
 | 
 | ||||||
| // 统一请求路径前缀
 | // 统一请求路径前缀
 | ||||||
| export const baseUrl = | export const baseUrl = | ||||||
|  | @ -30,7 +31,12 @@ service.interceptors.request.use( | ||||||
|         ...config.params |         ...config.params | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|     const uuid = getStore("uuid"); |     let uuid = getStore("uuid"); | ||||||
|  |     if (!uuid) { | ||||||
|  |       uuid = uuidv4(); | ||||||
|  |       setStore('uuid', uuid); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     config.headers["uuid"] = uuid; |     config.headers["uuid"] = uuid; | ||||||
|     return config; |     return config; | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ | ||||||
|       </Table> |       </Table> | ||||||
|       <Row type="flex" justify="end" class="page operation"> |       <Row type="flex" justify="end" class="page operation"> | ||||||
|         <Page |         <Page | ||||||
|           :current="searchForm.pageNumber + 1" |           :current="searchForm.pageNumber" | ||||||
|           :total="total" |           :total="total" | ||||||
|           :page-size="searchForm.pageSize" |           :page-size="searchForm.pageSize" | ||||||
|           @on-change="changePage" |           @on-change="changePage" | ||||||
|  | @ -91,7 +91,7 @@ export default { | ||||||
|       loading: false, // 表单加载状态 |       loading: false, // 表单加载状态 | ||||||
|       searchForm: { |       searchForm: { | ||||||
|         // 搜索框初始化对象 |         // 搜索框初始化对象 | ||||||
|         pageNumber: 0, // 当前页数 |         pageNumber: 1, // 当前页数 | ||||||
|         pageSize: 10, // 页面大小 |         pageSize: 10, // 页面大小 | ||||||
|       }, |       }, | ||||||
| 
 | 
 | ||||||
|  | @ -219,7 +219,7 @@ export default { | ||||||
| 
 | 
 | ||||||
|     changePage(v) { |     changePage(v) { | ||||||
|       // 分页 改变页数 |       // 分页 改变页数 | ||||||
|       this.searchForm.pageNumber = v - 1; |       this.searchForm.pageNumber = v; | ||||||
|       this.getDataList(); |       this.getDataList(); | ||||||
|       this.clearSelectAll(); |       this.clearSelectAll(); | ||||||
|     }, |     }, | ||||||
|  | @ -232,14 +232,14 @@ export default { | ||||||
| 
 | 
 | ||||||
|     handleSearch() { |     handleSearch() { | ||||||
|       // 搜索 |       // 搜索 | ||||||
|       this.searchForm.pageNumber = 0; |       this.searchForm.pageNumber = 1; | ||||||
|       this.searchForm.pageSize = 10; |       this.searchForm.pageSize = 10; | ||||||
|       this.getDataList(); |       this.getDataList(); | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     handleReset() { |     handleReset() { | ||||||
|       // 重置 |       // 重置 | ||||||
|       this.searchForm.pageNumber = 0; |       this.searchForm.pageNumber = 1; | ||||||
|       this.searchForm.promotionName = ""; |       this.searchForm.promotionName = ""; | ||||||
|       this.selectDate = null; |       this.selectDate = null; | ||||||
|       this.getDataList(); |       this.getDataList(); | ||||||
|  |  | ||||||
|  | @ -62,31 +62,31 @@ | ||||||
|               v-if="row.promotionStatus == 'NEW'" |               v-if="row.promotionStatus == 'NEW'" | ||||||
|               @click="edit(row)" |               @click="edit(row)" | ||||||
|               >编辑</Button |               >编辑</Button | ||||||
|             >  |             > | ||||||
|             <Button |             <Button | ||||||
|               type="info" |               type="info" | ||||||
|               v-if="row.promotionStatus == 'NEW'" |               v-if="row.promotionStatus == 'NEW'" | ||||||
|               size="small" |               size="small" | ||||||
|               @click="manage(row, 'manager')" |               @click="manage(row, 'manager')" | ||||||
|               >管理</Button |               >管理</Button | ||||||
|             >  |             > | ||||||
|             <Button |             <Button | ||||||
|               type="info" |               type="info" | ||||||
|               v-if="row.promotionStatus !== 'NEW'" |               v-if="row.promotionStatus !== 'NEW' && row.promotionStatus !== 'CLOSE'" | ||||||
|               size="small" |               size="small" | ||||||
|               @click="manage(row, 'view')" |               @click="manage(row, 'view')" | ||||||
|               >查看</Button |               >查看</Button | ||||||
|             >  |             > | ||||||
|             <Button |             <Button | ||||||
|               type="error" |               type="error" | ||||||
|               size="small" |               size="small" | ||||||
|               v-if="row.promotionStatus != 'START'" |               v-if="row.promotionStatus != 'START'" | ||||||
|               @click="remove(row)" |               @click="remove(row)" | ||||||
|               >删除</Button |               >删除</Button | ||||||
|             >  |             > | ||||||
|             <Button |             <Button | ||||||
|               type="success" |               type="success" | ||||||
|               v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'CLOSE'" |               v-if="row.promotionStatus == 'CLOSE'" | ||||||
|               size="small" |               size="small" | ||||||
|               @click="open(row)" |               @click="open(row)" | ||||||
|               >开启</Button |               >开启</Button | ||||||
|  | @ -345,4 +345,8 @@ export default { | ||||||
| </script> | </script> | ||||||
| <style lang="scss"> | <style lang="scss"> | ||||||
| @import "@/styles/table-common.scss"; | @import "@/styles/table-common.scss"; | ||||||
|  | .row Button { | ||||||
|  |   margin-right: 4px; | ||||||
|  | 
 | ||||||
|  | } | ||||||
| </style> | </style> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue