Commit d2786fd1 by wangzhihui

解决pdf文件

1 parent e0b49374
...@@ -55,26 +55,23 @@ Component({ ...@@ -55,26 +55,23 @@ Component({
this.triggerEvent('choose', this.data.agree) this.triggerEvent('choose', this.data.agree)
}, },
jump(e) { jump(e) {
console.log(e)
// let { url } = e.currentTarget.dataset
// const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${this.data.url}` const path = `${this.data.url}`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) { wx.downloadFile({
// console.log(res); // 示例 url,并非真实存在
// if (res.returnCode == '0') { url:path,
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}` success: function (res) {
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
// wx.navigateTo({ // wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}` // url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// }) // })
}, },
noScroll() {} noScroll() {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!