- import moment from "moment";
- //格式化日期函数
- export const formtDate = (date, v) => {
- return moment(date).format(v)
- }
- /* 是否在小程序内 */
- export const isWxprogram = () => {
- const userAgent = navigator.userAgent;
- return /miniProgram/i.test(userAgent) && /micromessenger/i.test(userAgent);
- }
|