Browse Source

修改bug

master
前端-胡立永 5 months ago
parent
commit
5910687c95
5 changed files with 117 additions and 2 deletions
  1. +6
    -2
      components/serviceList/serviceList.vue
  2. +6
    -0
      pages.json
  3. +37
    -0
      pages/customer-service/customer-service.vue
  4. +67
    -0
      static/html/local.html
  5. +1
    -0
      static/html/uni.webview.1.5.3.js

+ 6
- 2
components/serviceList/serviceList.vue View File

@ -4,6 +4,7 @@
<u-popup :show="show" mode="bottom" round="20rpx" @close="$emit('close');$play()">
<view class="list">
<view @click="toServer(item.url)" v-for="(item,index) in serverList" :key="index" class="server">{{ item.name }}</view>
<view @click="toKF" class="server">Mei Cha</view>
</view>
<view @click="$emit('close');$play()" class="cancel">{{ $t('page.serviceList.cancel') }}</view>
</u-popup>
@ -33,14 +34,12 @@
this.forgetPass()
},
methods : {
//
toServer(url){
this.$play()
window.open(url)
this.$emit('close')
},
//
forgetPass() {
this.request('forgetPass').then(res => {
@ -49,6 +48,11 @@
}
})
},
toKF(){
uni.navigateTo({
url: '/pages/customer-service/customer-service'
})
},
}
}
</script>


+ 6
- 0
pages.json View File

@ -9,6 +9,12 @@
"navigationBarTitleText": ""
}
},
{
"path": "pages/customer-service/customer-service",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/login/login",
"style": {


+ 37
- 0
pages/customer-service/customer-service.vue View File

@ -0,0 +1,37 @@
<template>
<view>
<web-view
:src="'/static/html/local.html?loca=' + getLoca()"></web-view>
<!-- <web-view src="http://btc-h5.shop996.top"></web-view> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
},
methods: {
getLoca(){
let arr = {
cn : 'tw',
jp : 'ja',
'zh-Hans' : 'zh-CN',
}
let a = uni.getStorageSync('language')
return arr[a] || a || 'tw'
}
}
}
</script>
<style>
</style>

+ 67
- 0
static/html/local.html View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="./uni.webview.1.5.3.js">
</script>
<!-- 这是你的代码 -->
<script type='text/javascript'>
function handleBeforeCloseWindow() {
uni.navigateBack(-1)
}
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
</script>
<script type='text/javascript'>
(function(a, b, c, d, e, j, s) {
a[d] = a[d] || function() {
(a[d].a = a[d].a || []).push(arguments)
};
j = b.createElement(c),
s = b.getElementsByTagName(c)[0];
j.async = true;
j.charset = 'UTF-8';
j.src = 'https://static.meiqia.com/widget/loader.js';
s.parentNode.insertBefore(j, s);
})(window, document, 'script', '_MEIQIA');
_MEIQIA('entId', '474768e6253865b24f810f64857bc3f7');
_MEIQIA('withoutBtn');
_MEIQIA('beforeCloseWindow', handleBeforeCloseWindow);
// _MEIQIA('metadata', {
// name: '智子', // 美洽默认字段
// address: '半人马座阿尔法星', // 美洽默认字段
// aaa: 'bla bla bla', // 自定义字段
// xyz: 'lalala' // 自定义字段
// });
let loca = getQueryVariable('loca')
console.log(loca);
_MEIQIA('language', loca)
_MEIQIA('allSet', function(){
_MEIQIA('showPanel');
});
</script>
</head>
<body>
</body>
</html>

+ 1
- 0
static/html/uni.webview.1.5.3.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save