const app = getApp();
const share_title = 'sharetitle';
const share_path = 'sharepath';
const share_imageurl = 'shareimageurl';
function ShareSetInfo(){
  app.postRequest('my/other/share', {}, function (res) {
    if (res.code == 201) {
      wx.setStorageSync(share_title, res.data.title);
      wx.setStorageSync(share_path, res.data.path);
      wx.setStorageSync(share_imageurl, res.data.imageUrl);
    }
  })
}

function Shareginfo(){
    return{
      title: wx.getStorageSync(share_title),
      path: wx.getStorageSync(share_path),
      imageurl: wx.getStorageSync(share_imageurl),
    };
}

module.exports = {
  ShareSetInfo,
  Shareginfo
};