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