Browse Source

修改bug

master
前端-胡立永 4 months ago
parent
commit
4178be2abb
4 changed files with 41 additions and 7 deletions
  1. +14
    -5
      components/popUpWindow/popUpWindow.vue
  2. +2
    -1
      config.js
  3. +21
    -1
      pages/home/home.vue
  4. +4
    -0
      utils/shop.js

+ 14
- 5
components/popUpWindow/popUpWindow.vue View File

@ -8,7 +8,8 @@
<image src="../../static/popUpWindow/bg.png" mode="widthFix"></image> <image src="../../static/popUpWindow/bg.png" mode="widthFix"></image>
</div> </div>
<view class="popup-desc"> <view class="popup-desc">
{{ tip[type[$i18n.locale]] }}
<!-- {{ tip.details }} -->
<u-parse :content="tip.details"></u-parse>
</view> </view>
<view class="popup-btn"> <view class="popup-btn">
<view @click="close" class="">ok</view> <view @click="close" class="">ok</view>
@ -45,13 +46,21 @@
methods: { methods: {
// //
close() { close() {
uni.setStorageSync('clickPopUp', {}); //
uni.setStorageSync('clickPopUp', 'true'); //
this.$emit('close') this.$emit('close')
}, },
// //
getIndexTip() { getIndexTip() {
this.request('getIndexTip').then(res => {
// this.request('getIndexTip').then(res => {
// if (res.code == 200) {
// this.tip = res.result
// }
// })
this.request('getPromptNotice', {}, {
us : this.$i18n.locale
}).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.tip = res.result this.tip = res.result
} }
@ -69,7 +78,7 @@
position: fixed; position: fixed;
height: 100vh; height: 100vh;
width: 750rpx; width: 750rpx;
background: rgba(0, 0, 0, .1);
background: rgba(0, 0, 0, 0.3);
left: 0; left: 0;
top: 0; top: 0;
z-index: 1000; z-index: 1000;
@ -77,7 +86,7 @@
.popup-content { .popup-content {
position: relative; position: relative;
width: 96%;
width: 90%;
margin: 0rpx auto; margin: 0rpx auto;
background: white; background: white;
border-radius: 15rpx; border-radius: 15rpx;


+ 2
- 1
config.js View File

@ -16,7 +16,8 @@ const config = {
}, },
prod : { prod : {
// baseUrl : 'https://uav-api.xzaiyp.top/uav-api', // baseUrl : 'https://uav-api.xzaiyp.top/uav-api',
baseUrl : 'https://api.olxbookbub.top/uav-oxl-api',//国外服务器
// baseUrl : 'https://api.olxbookbub.top/uav-oxl-api',//国外服务器
baseUrl : 'https://api.oxlbook.top/uav-oxl-api',//国外服务器第二版
}, },
} }


+ 21
- 1
pages/home/home.vue View File

@ -34,6 +34,10 @@
<view class="home-title content"> <view class="home-title content">
<view>{{ $t('page.home.aboutUs') }}</view> <view>{{ $t('page.home.aboutUs') }}</view>
</view> </view>
<u-notice-bar
@click="showPopUp = true"
:text="noticeText"></u-notice-bar>
<view class="about-us" <view class="about-us"
:style="{'background-image' : `url(${aboutImage})`}"> :style="{'background-image' : `url(${aboutImage})`}">
@ -57,7 +61,7 @@
<sTabbar select="0" /> <sTabbar select="0" />
<!-- 弹窗 --> <!-- 弹窗 -->
<popUpWindow :show="showPopUp" @close="closePopUp"></popUpWindow>
<popUpWindow :show="showPopUp" @close="showPopUp = false"></popUpWindow>
<!-- 选择语言弹框 --> <!-- 选择语言弹框 -->
<changeLanguage :show.sync="showLanguage" @close="closeLanguage"></changeLanguage> <changeLanguage :show.sync="showLanguage" @close="closeLanguage"></changeLanguage>
@ -87,13 +91,29 @@
shopList : [], // shopList : [], //
scrollList : [], // scrollList : [], //
aboutImage : '', aboutImage : '',
noticeText : '',//
} }
}, },
onShow() { onShow() {
this.getShopList() this.getShopList()
this.getIndexScroll() this.getIndexScroll()
this.getIndexTip()
// if(!uni.getStorageSync('clickPopUp')){
// this.showPopUp = true
// }
}, },
methods: { methods: {
//
getIndexTip() {
this.request('getPromptNotice', {}, {
us : this.$i18n.locale
}).then(res => {
if (res.code == 200) {
this.noticeText = res.result.title
}
})
},
// //
closeLanguage() { closeLanguage() {
this.$play() this.$play()


+ 4
- 0
utils/shop.js View File

@ -81,4 +81,8 @@ export default {
getRandomImage : { url : '/index/getRandomImage' , method : 'GET' }, getRandomImage : { url : '/index/getRandomImage' , method : 'GET' },
//获取平台充值地址 //获取平台充值地址
getPayUrl : { url : '/index/getPayUrl' , method : 'GET' }, getPayUrl : { url : '/index/getPayUrl' , method : 'GET' },
//首页公告弹窗内容
getPromptNotice : { url : '/index/getPromptNotice' , method : 'GET' },
} }

Loading…
Cancel
Save