From 53a74cdc93182466ac329279ceab1967625db38c Mon Sep 17 00:00:00 2001 From: Mrxtyyp <1126084777@qq.com> Date: Sat, 17 Feb 2024 13:43:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 7 ++--- common/mixin/share.js | 54 ++++++++++++++++++++++++++++++++++++++ main.js | 4 +++ pages/index/index-home.vue | 39 +++++++++++++++++++++------ 4 files changed, 93 insertions(+), 11 deletions(-) create mode 100644 common/mixin/share.js diff --git a/common/js/request.js b/common/js/request.js index c23b196..7fad1dc 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -1,7 +1,8 @@ import globalData from '@/common/js/globalData.js'; export default { - address: 'https://www.opsoul.com:8881', + // address: 'https://www.opsoul.com:8881', + address: 'https://gmhl.opsoul.com', // 异步接口拦截 addInterceptor() { let _this = this; @@ -13,9 +14,9 @@ export default { }) let userInfo = _this.getCurUserInfo(); // request 触发前拼接 url - args.url = 'https://www.opsoul.com:8881' + args.url; + // args.url = 'https://www.opsoul.com:8881' + args.url; // args.url = 'http://127.0.0.1:80' + args.url; - // args.url = 'http://192.168.10.104:80' + args.url; + args.url = 'https://gmhl.opsoul.com' + args.url; if (!args.data) { args.data = {} diff --git a/common/mixin/share.js b/common/mixin/share.js new file mode 100644 index 0000000..74b7b5f --- /dev/null +++ b/common/mixin/share.js @@ -0,0 +1,54 @@ +export default { + data() { + return { + //设置默认的分享参数 + share: { + title: '工盟互联', + path: '/pages/index/index', + imageUrl: '', + desc: '', + content: '' + } + } + }, + onShareAppMessage(res) { + return { + title: this.share.title, + path: this.share.path, + imageUrl: this.share.imageUrl, + desc: this.share.desc, + content: this.share.content, + success(res) { + uni.showToast({ + title: '分享成功' + }) + }, + fail(res) { + uni.showToast({ + title: '分享失败', + icon: 'none' + }) + } + } + }, + onShareTimeline() { + return { + title: this.share.title, + path: this.share.path, + imageUrl: this.share.imageUrl, + desc: this.share.desc, + content: this.share.content, + success(res) { + uni.showToast({ + title: '分享成功' + }) + }, + fail(res) { + uni.showToast({ + title: '分享失败', + icon: 'none' + }) + } + } + }, +} \ No newline at end of file diff --git a/main.js b/main.js index bf7bdf9..14d6360 100644 --- a/main.js +++ b/main.js @@ -48,6 +48,10 @@ Vue.prototype.$dateUtil = dateUtil; Vue.prototype.$calcUtil = calcUtil; Vue.prototype.$commonFun = commonFun; Vue.prototype.$request = request; + +import share from 'common/mixin/share.js'//我命名为share.js +Vue.mixin(share) + Vue.config.productionTip = false diff --git a/pages/index/index-home.vue b/pages/index/index-home.vue index 69f9ffc..5b77106 100644 --- a/pages/index/index-home.vue +++ b/pages/index/index-home.vue @@ -95,10 +95,16 @@ - {{item.title}} - - + v-for="(item,index) in servModules " :key="index"> + + @@ -266,10 +272,12 @@ }, async clickServModule(pageObj) { if (pageObj && !pageObj.pageUrl) { - uni.showToast({ - icon: 'none', - title: '功能开发中' - }) + if(pageObj.id !== 4) { + uni.showToast({ + icon: 'none', + title: '功能开发中' + }) + } } if (pageObj.checkLogin) { let res = await this.authLogin(); @@ -324,6 +332,21 @@ width: 46%; height: 246rpx; line-height: 195rpx; + } + + .nav-li button{ + padding: 0; + margin: 0; + border: none; + background-color: transparent; + line-height: inherit; + color: inherit; + position: static; + text-align: left; + } + .nav-li button::after { + border: none; + } .nav-li {