253 lines
6.3 KiB
Vue
Raw Normal View History

2025-06-06 03:08:19 +08:00
<template>
<view class="page">
2025-06-10 00:51:49 +08:00
<uni-nav-bar @clickLeft="goto(1, 1)" left-icon="back" :border="false" :shadow="false" :fixed="true"
2025-06-10 17:10:40 +08:00
:title="$t('help.title')" backgroundColor="#fff" :statusBar="true"></uni-nav-bar>
2025-06-09 00:34:46 +08:00
<!--<view style="padding: 20px 15px; font-size: 16px; color: #3d3d3d;">
2025-06-08 02:12:24 +08:00
{{$t('help.text1')}}
2025-06-06 03:08:19 +08:00
</view>
2025-06-09 00:34:46 +08:00
<view class="cell_list" @click="open('qq_group')">
2025-06-06 03:08:19 +08:00
<view class="cell_left txt">
2025-06-08 02:12:24 +08:00
<image src="/static/images/h1.png" mode="cover"
style="width: 30px; height: 30px; border-radius: 10px; margin-right: 5px;"></image>
2025-06-06 03:08:19 +08:00
QQ group
</view>
<view class="cell_right arrow"></view>
2025-06-09 00:34:46 +08:00
</view>
2025-06-06 03:08:19 +08:00
<view class="cell_list" @click="open('telegram_group')">
<view class="cell_left txt">
2025-06-08 02:12:24 +08:00
<image src="/static/images/h2.png" mode="cover"
style="width: 30px; height: 30px; border-radius: 10px; margin-right: 5px;"></image>
Telegram
</view>
2025-06-06 03:08:19 +08:00
<view class="cell_right arrow"></view>
</view>
2025-06-09 00:34:46 +08:00
<view class="cell_list" @click="open('sigua_group')">
2025-06-06 03:08:19 +08:00
<view class="cell_left txt">
2025-06-08 02:12:24 +08:00
<image src="/static/images/h3.png" mode="cover"
style="width: 30px; height: 30px; border-radius: 10px; margin-right: 5px;"></image>
Loofah group
</view>
2025-06-06 03:08:19 +08:00
<view class="cell_right arrow"></view>
2025-06-08 02:12:24 +08:00
</view> -->
2025-06-10 00:51:49 +08:00
<view style="padding: 40rpx 30rpx; font-size: 32rpx; color: #3d3d3d;">
2025-06-08 02:12:24 +08:00
{{$t('help.text2')}}
2025-06-06 03:08:19 +08:00
</view>
2025-06-10 00:51:49 +08:00
<view class="cell_list" v-for="(item, index) in aList" :key="index" @click="onPageJump('/pages/about/helpdetail?id='+item.id)">
2025-06-06 03:08:19 +08:00
<view class="cell_left txt">
2025-06-10 00:51:49 +08:00
{{item.title}}
2025-06-06 03:08:19 +08:00
</view>
2025-06-10 00:51:49 +08:00
<view class="cell_right arrow"></view>
2025-06-06 03:08:19 +08:00
</view>
2025-06-10 00:51:49 +08:00
2025-06-08 02:12:24 +08:00
2025-06-06 03:08:19 +08:00
<uni-popup ref="popup" type="dialog" :is-mask-click="true" background-color="#fff" borderRadius="40rpx">
<view class="dialog">
<view class="title">{{dialogTitle}}</view>
2025-06-10 00:51:49 +08:00
<view style="padding-bottom: 40rpx; width: 100%;" v-for="(value, key) in list" :key="key">
<view class="v1" style="margin-left: 20rpx;">{{key}}:</view>
2025-06-06 03:08:19 +08:00
<view class="v1" style="margin-left: 40rpx;">{{value}} </view>
2025-06-08 02:12:24 +08:00
<image style="width: 36rpx; height: 30rpx; float: right; margin-left: 20rpx; margin-top: 10rpx;"
src="/static/images/copy.png" @click="copy(value)" mode="cover"></image>
2025-06-06 03:08:19 +08:00
<view style="clear: both;"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {
mapState,
mapMutations
} from 'vuex';
export default {
data() {
return {
init: {},
dialogTitle: 'Select a network',
list: {},
type: '',
2025-06-10 00:51:49 +08:00
aList: []
2025-06-06 03:08:19 +08:00
};
},
2025-06-08 02:12:24 +08:00
computed: {},
2025-06-06 03:08:19 +08:00
//第一次加载
onLoad(e) {
2025-06-10 00:51:49 +08:00
this.getlist();
2025-06-08 02:12:24 +08:00
this.$http.get('/api/common/init?lang=' + this.$i18n.locale).then(res => {
2025-06-06 03:08:19 +08:00
this.init = res.data;
});
2025-06-10 00:51:49 +08:00
2025-06-06 03:08:19 +08:00
},
//页面显示
onShow() {},
//方法
methods: {
2025-06-08 02:12:24 +08:00
open(type) {
2025-06-06 03:08:19 +08:00
this.type = type;
2025-06-08 02:12:24 +08:00
switch (type) {
2025-06-06 03:08:19 +08:00
case 'qq_group':
this.list = this.init[type];
this.dialogTitle = 'QQ Group';
break;
case 'telegram_group':
this.list = this.init[type];
this.dialogTitle = 'Telegram Group';
break;
case 'sigua_group':
this.list = this.init[type];
this.dialogTitle = 'Loofah Group';
break;
}
this.$refs.popup.open('dialog');
},
2025-06-10 00:51:49 +08:00
getlist(){
this.$http.get('/api/article/list?category_id=9&lang=' + this.$i18n.locale).then(res => {
this.aList = res.data.data;
});
},
goto(url, type) {
if (type == 2) {
return uni.switchTab({ url: url })
}
if (type == 1) {
return uni.navigateBack({ delta: url });
}
uni.navigateTo({
url: url
})
},
2025-06-06 03:08:19 +08:00
onPageJump(url) {
uni.navigateTo({
url: url
});
},
handleClose(done) {
this.dialogVisible = false;
},
2025-06-08 02:12:24 +08:00
openQQChat(number) {
2025-06-06 03:08:19 +08:00
// #ifdef APP-PLUS
if (plus.os.name === "Android") {
2025-06-08 02:12:24 +08:00
var main = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass('android.content.Intent');
var Uri = plus.android.importClass('android.net.Uri');
var intent = new Intent(Intent.ACTION_VIEW, Uri.parse("mqqwpa://im/chat?chat_type=wpa&uin=" +
qqNumber));
main.startActivity(intent);
} else if (plus.os.name === "iOS") {
plus.runtime.launchApplication({
action: "mqq://im/chat?chat_type=wpa&uin=" + qqNumber + "&version=1&src_type=web"
}, function(e) {
if (e.error) {
plus.nativeUI.confirm("检查到您未安装qq请先到App Store搜索下载", function(i) {
if (i.index === 0) {
window.location.href = "https://itunes.apple.com/cn/app/mqq/";
}
});
}
});
}
2025-06-06 03:08:19 +08:00
// #endif
// #ifdef H5
2025-06-08 02:12:24 +08:00
location.href = 'mqqwpa://im/chat?chat_type=wpa&uin=' + number + '&version=1&src_type=web';
2025-06-06 03:08:19 +08:00
// #endif
},
2025-06-08 02:12:24 +08:00
copy(val = '') {
2025-06-15 22:12:30 +08:00
// #ifdef APP-PLUS
uni.setClipboardData({
data: val, // e是你要保存的内容
success: function () {
uni.showToast({
title:this.$t('copySuccess'),
icon:'none'
})
}
})
// #endif
// #ifdef H5
this.$copyText(val).then(res => {
uni.showToast({title: this.$t('copySuccess'), icon: 'none'});
});
// #endif
2025-06-06 03:08:19 +08:00
},
// open1(v){
// switch(this.type){
// case 'qq_group':
// openQQChat(v);
// break;
// case 'telegram_group':
// location.href = 'https://t.me/v'
// //(用户名)
// break;
// case 'sigua_group':
// location.href = 'https://t.me/v'
// break;
// }
// }
},
//页面隐藏
onHide() {},
//页面卸载
onUnload() {},
//页面下来刷新
onPullDownRefresh() {},
//页面上拉触底
onReachBottom() {},
//用户点击分享
onShareAppMessage(e) {
return this.wxShare();
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
2025-06-08 02:12:24 +08:00
body {
background-color: #F8F8F8;
}
.page {
min-height: 100vh;
position: relative;
background-color: #F8F8F8;
}
2025-06-06 03:08:19 +08:00
.cell_list {
padding: 30rpx 30rpx;
margin: 0rpx 30rpx;
2025-06-10 00:51:49 +08:00
border-bottom: 2rpx solid #ddd;
2025-06-06 03:08:19 +08:00
}
2025-06-08 02:12:24 +08:00
.txt {
2025-06-06 03:08:19 +08:00
font-weight: 500;
2025-06-10 00:51:49 +08:00
font-size: 32rpx;
2025-06-06 03:08:19 +08:00
color: #3d3d3d
}
2025-06-08 02:12:24 +08:00
2025-06-06 03:08:19 +08:00
.cell_right image {
width: 140rpx;
height: 140rpx;
border-radius: 50%;
}
2025-06-08 02:12:24 +08:00
.dialog {
width: 80vw;
padding: 20rpx 30rpx;
border-radius: 40rpx;
line-height: 50rpx;
2025-06-06 03:08:19 +08:00
}
2025-06-08 02:12:24 +08:00
.dialog .title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
margin-bottom: 30rpx;
2025-06-06 03:08:19 +08:00
}
2025-06-08 02:12:24 +08:00
.dialog .v1 {
font-weight: 600;
2025-06-10 00:51:49 +08:00
font-size: 32rpx;
2025-06-08 02:12:24 +08:00
color: #1D61E7;
float: left;
2025-06-06 03:08:19 +08:00
}
</style>