123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // var app = getApp();
- // var network = require('./network.js')
- function share(Thepath, title, imageUrl, type) {
- var _this = this;
- var params = new Object()
- params.id = uni.getStorageSync('uid')
- //发起请求
- uni.request({
- url: 'https://trade.5dev.cn/dudaowenlv/content/?l=api.share',
- data: params,
- method: 'GET',
- header: {
- 'content-type': 'application/json' // 默认值
- },
- success(res) {
- console.log(777777,res)
- // _this.imageUrl=res.data.data.pic
- }
- })
- // 获取群信息和id
- wx.showShareMenu({
- withShareTicket: true
- })
- var scene = '&scene=' + uni.getStorageSync('uid');
- var datas = {
- // id: uni.getStorageSync('uid'),
- path: Thepath,
- title: title,
- imageUrl:imageUrl,
- type:type
- }
- // if (imageUrl) {
- // datas['imageUrl'] = imageUrl;
- // datas['title'] = title;
- // datas['id'] = newsid;
- // datas['type'] = type;
- // }
- console.log(9999, datas)
- // uni.setStorageSync('share_data', data);
- return datas;
- }
- module.exports = {
- share: share,
- }
|