1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- // pages/login/modules/agreement.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- isAgree: {
- type: Boolean
- },
- callBack: {
- type: Function
- }
- },
- /**
- * 组件的方法列表
- */
- methods: {
- /* 修改授权 */
- isAgreeChange() {
- let isAgree = !this.data.isAgree
- this.setData({
- isAgree
- })
- this.triggerEvent("callBack", isAgree)
- wx.setStorageSync('isAgree', isAgree);
- },
- checkTheAgreement() {
- wx.showLoading({
- title: '加载中...',
- })
- wx.downloadFile({
- url: 'https://ccyosg20230413.obs.cn-east-3.myhuaweicloud.com/system/%E6%A5%9A%E6%A5%9A%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.docx',
- success: (res) => {
- wx.openDocument({
- filePath: res.tempFilePath,
- success: (s) => {
- wx.hideLoading();
- },
- fail: (err) => {
- wx.hideLoading();
- wx.showToast({
- title: '读取失败,请稍后再试',
- icon: "none"
- })
- }
- })
- },
- fail: (err) => {
- wx.hideLoading();
- wx.showToast({
- title: '读取失败,请稍后再试',
- icon: "none"
- })
- }
- })
- }
- }
- })
|