|
@@ -17,6 +17,7 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
async onLoad(options) {
|
|
|
+ console.log(options)
|
|
|
this.setData({
|
|
|
dataType: options.type,
|
|
|
sat_sharematerialid: options.id
|
|
@@ -31,18 +32,33 @@ Page({
|
|
|
};
|
|
|
const res = isToken ? await _Http.basic(params) : await _Http.base(params);
|
|
|
if (res.msg != '成功') res = await _Http.base(params);
|
|
|
+ if (!res.data.attinfos) {
|
|
|
+ wx.navigateBack()
|
|
|
+ wx.showToast({
|
|
|
+ title: '该素材已被删除',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (res.msg == '成功') {
|
|
|
if (res.data.attinfos.length) res.data.attinfos = MFT.fileList(res.data.attinfos);
|
|
|
this.setData({
|
|
|
detailsData: res.data
|
|
|
});
|
|
|
+ console.log(wx.getLaunchOptionsSync().scene)
|
|
|
//分享进入
|
|
|
- if ([1007, 1008, 1155].includes(wx.getLaunchOptionsSync().scene)) this.setData({
|
|
|
- "shareData.userid": options.userid,
|
|
|
- "shareData.systemclient": "wechatsaletool",
|
|
|
- "shareData.sat_sharematerialid": options.id,
|
|
|
- popupShow: true
|
|
|
- })
|
|
|
+ if ([1007, 1008, 1155].includes(wx.getLaunchOptionsSync().scene)) {
|
|
|
+ wx.setNavigationBarTitle({
|
|
|
+ title: res.data.title
|
|
|
+ })
|
|
|
+ console.log(res.data.title)
|
|
|
+ this.setData({
|
|
|
+ "shareData.userid": options.userid,
|
|
|
+ "shareData.systemclient": "wechatsaletool",
|
|
|
+ "shareData.sat_sharematerialid": options.id
|
|
|
+ })
|
|
|
+ /* popupShow: true */
|
|
|
+ }
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.msg,
|