41 lines
1.4 KiB
JavaScript
41 lines
1.4 KiB
JavaScript
import {message, Modal} from "ant-design-vue";
|
|
import {CreateWatcher} from "@/api/watcher.js";
|
|
|
|
export const OneClickWatch = (pid, name)=>{
|
|
Modal.confirm({
|
|
title: '确定要蹲该商品',
|
|
content: name,
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
onOk() {
|
|
CreateWatcher({
|
|
pid: pid,
|
|
remark:'',
|
|
pushers:[
|
|
{
|
|
id:2,
|
|
createdAt:1716303672,
|
|
type:2,
|
|
name:"email",
|
|
remark:"",
|
|
option:"{\"from\":\"zhhgzhhgzhhg@163.com\",\"username\":\"zhhgzhhgzhhg@163.com\",\"password\":\"SRGWLNQRNNOTSGSV\",\"host\":\"smtp.163.com\",\"port\":25,\"to\":\"zhangergou0628@163.com\"}"
|
|
},
|
|
{
|
|
id:1,
|
|
createdAt:1716303548,
|
|
type:1,
|
|
name:"anpush",
|
|
remark:"",
|
|
option:"{\"token\":\"LHS13BO3FGBLGBP9MFBM53R8WV32P1\",\"channel\":\"78317\"}"
|
|
}
|
|
]
|
|
}).then(res=>{
|
|
message.success("添加成功")
|
|
}).catch(err => {
|
|
message.error("添加失败")
|
|
console.log(err)
|
|
})
|
|
},
|
|
});
|
|
} |