fix: 配置调整

This commit is contained in:
Mrxtyyp 2024-02-17 13:43:43 +08:00
parent 9aa6dcfd2f
commit 53a74cdc93
4 changed files with 93 additions and 11 deletions

View File

@ -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 = {}

54
common/mixin/share.js Normal file
View File

@ -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'
})
}
}
},
}

View File

@ -49,6 +49,10 @@ 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
App.mpType = 'app'

View File

@ -96,9 +96,15 @@
<view hover-class="none" class="nav-li serv-module" @click="clickServModule(item)"
:class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
v-for="(item,index) in servModules " :key="index">
<view :class="index === 0 ? 'text-xxl' : 'text-xl'">{{item.title}}</view>
<!-- <view class="nav-name">{{item.name}}</view> -->
<text :class="'cuIcon-' + item.cuIcon"></text>
<template v-if="item.id !== 4">
<view :class="index === 0 ? 'text-xxl' : 'text-xl'">{{item.title}}</view>
<!-- <view class="nav-name">{{item.name}}</view> -->
<text :class="'cuIcon-' + item.cuIcon"></text>
</template>
<button data-name="shareBtn" open-type="share" hover-class="none" v-else>
<view :class="index === 0 ? 'text-xxl' : 'text-xl'">{{item.title}}</view>
<text :class="'cuIcon-' + item.cuIcon"></text>
</button>
</view>
</view>
</view>
@ -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();
@ -326,6 +334,21 @@
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 {
padding: 30rpx;
border-radius: 12rpx;