mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-18 00:23:50 +08:00
迭代功能需求
1.修改用户信息存储位置 2.修复订单显示的问题 3.修改优惠卷显示文字显示和选择提示 4.修复地址列表排版错位的问题 5.添加搜索链接跳转查询
This commit is contained in:
24
rc-busness/plugins/until/common.js
Normal file
24
rc-busness/plugins/until/common.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 这个是一些全局函数方法
|
||||
*/
|
||||
import { Message } from 'element-ui';
|
||||
|
||||
|
||||
export default ({ app }, inject) => {
|
||||
/**
|
||||
* 消息提示框
|
||||
* msg 提示语
|
||||
* type 提示框状态 success/warning/info/error
|
||||
* duration 默认3秒
|
||||
*/
|
||||
inject('messageToast',(msg,type='success',duration=3000)=>{
|
||||
Message({
|
||||
type : type || 'success',
|
||||
message : msg,
|
||||
duration
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
inject('myInjectedFunction', string => Message('That was easy!', string));
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设置cookie的值
|
||||
* 设置cookie的值(获取的是前端的 nuxt框架不可用 用cookie-universal-nuxt获取存放的token)
|
||||
* @param {String} key cookie的键
|
||||
* @param {String} val cookie的值
|
||||
* @param {String} exdays 过期时间默认的话是7天
|
||||
@@ -16,7 +16,7 @@ const setCookie = (key,val,exdays = 7)=>{
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取cookie的值
|
||||
* 获取cookie的值(获取的是前端的 nuxt框架不可用 用cookie-universal-nuxt获取存放的token)
|
||||
* @param {String} key cookie的键
|
||||
*/
|
||||
const getCookie = (key)=>{
|
||||
@@ -30,8 +30,6 @@ const getCookie = (key)=>{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export {
|
||||
setCookie,
|
||||
getCookie,
|
||||
|
||||
Reference in New Issue
Block a user