system.js 603 B

12345678910111213141516171819202122232425
  1. import {baseUrl} from "@/common/js/seting.js"
  2. import {dorequest} from "@/common/js/request.js"
  3. /** 添加日志
  4. * {
  5. json: JSON.stringify({ id: this.properties.shareInfoData.infoData.id}),
  6. createPin: wx.getStorageSync('userData').id,
  7. type: '图文分享'
  8. }
  9. */
  10. export function addlog(data,e,callback=null){
  11. let url=baseUrl+"/index.php/index/Logmanger/addlog";
  12. dorequest('post',url,data).then(res=>{
  13. if(callback){
  14. callback(res)
  15. }else{
  16. res = res.data
  17. if(0==res.code){
  18. e.$refs.toast.show({
  19. type: 'error',
  20. message: res.errmsg
  21. })
  22. }
  23. }
  24. });
  25. }