Commit d2786fd1 by wangzhihui

解决pdf文件

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