pages/m_user/userlogin/userlogin.js
@@ -118,5 +118,28 @@ }) return false } }, gotoAgreement() { wx.showLoading({ title: ' 打开中', mask: true, }) wx.downloadFile({ url: app.globalData.agreement, success: function (res) { wx.hideLoading() const filePath = res.tempFilePath wx.openDocument({ filePath: filePath, success: function (res) { console.log('打开文档成功') }, fail(error) { console.log(error); } }) } }) } })