|
@@ -1,7 +1,9 @@
|
|
|
const mixins = require('@/mixins/index.js')
|
|
const mixins = require('@/mixins/index.js')
|
|
|
const util = require('@/utils/util.js')
|
|
const util = require('@/utils/util.js')
|
|
|
const Constants = require('@/utils/Constants.js');
|
|
const Constants = require('@/utils/Constants.js');
|
|
|
|
|
+
|
|
|
const api = require('@/utils/api.js');
|
|
const api = require('@/utils/api.js');
|
|
|
|
|
+const config = require('@/config/config.js');
|
|
|
|
|
|
|
|
const app = getApp()
|
|
const app = getApp()
|
|
|
|
|
|
|
@@ -333,6 +335,88 @@ Page({
|
|
|
return true
|
|
return true
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @desc : 用户协议
|
|
|
|
|
+ * @date : 2024/7/12 13:48
|
|
|
|
|
+ * @author : 刘尧
|
|
|
|
|
+ */
|
|
|
|
|
+ openUserAgreement() {
|
|
|
|
|
+ let url = config.image_url + '/agreement/userAgreement.pdf'
|
|
|
|
|
+ let toUrl = null;
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ // 看下是否包括http,http就跳转到product页面
|
|
|
|
|
+ if (url.indexOf('http') >= 0) {
|
|
|
|
|
+ // toUrl = '/pages/product/product'
|
|
|
|
|
+ wx.downloadFile({
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ success(e) {
|
|
|
|
|
+ wx.openDocument({
|
|
|
|
|
+ filePath: e.tempFilePath,
|
|
|
|
|
+ showMenu: true,
|
|
|
|
|
+ fileType: 'pdf',
|
|
|
|
|
+ success(e) {
|
|
|
|
|
+ console.log('success', e);
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(e) {
|
|
|
|
|
+ console.log('fail', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 说明是跳本产品
|
|
|
|
|
+ toUrl = url;
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: toUrl,
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ res.eventChannel.emit('url', url);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 隐私协议
|
|
|
|
|
+ * @date : 2024/7/11 13:49
|
|
|
|
|
+ * @author : 周兴
|
|
|
|
|
+ */
|
|
|
|
|
+ openPrivacyAgreement() {
|
|
|
|
|
+ let url = config.image_url + '/agreement/privacyAgreement.pdf'
|
|
|
|
|
+
|
|
|
|
|
+ let toUrl = null;
|
|
|
|
|
+ if (url) {
|
|
|
|
|
+ // 看下是否包括http,http就跳转到product页面
|
|
|
|
|
+ if (url.indexOf('http') >= 0) {
|
|
|
|
|
+ // toUrl = '/pages/product/product'
|
|
|
|
|
+ wx.downloadFile({
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ success(e) {
|
|
|
|
|
+ wx.openDocument({
|
|
|
|
|
+ filePath: e.tempFilePath,
|
|
|
|
|
+ showMenu: true,
|
|
|
|
|
+ fileType: 'pdf',
|
|
|
|
|
+ success(e) {
|
|
|
|
|
+ console.success('openFile', e);
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(e) {
|
|
|
|
|
+ console.fail('openFile', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 说明是跳本产品
|
|
|
|
|
+ toUrl = url;
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: toUrl,
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ res.eventChannel.emit('url', url);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* @desc : 初始化加载
|
|
* @desc : 初始化加载
|
|
|
* @date : 2024/5/30 15:49
|
|
* @date : 2024/5/30 15:49
|
|
|
* @author : 周兴
|
|
* @author : 周兴
|