feat: 跳转

feat/meeting
lilin 8 months ago
parent b5ec88ba76
commit b5139d1869
  1. 3
      App.vue
  2. 67
      common/meeting_common.js
  3. 4
      main.js
  4. 105
      meeting/user/about.vue
  5. 33
      meeting/user/txt.vue

@ -2,6 +2,9 @@
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
@import "@/static/css/iconfont.css";
page {
height: 100%;
}
</style>
<script>
export default {

@ -0,0 +1,67 @@
/**
* 页面跳转
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} url 需要跳转的应用内非 tabBar 的页面的路径
* @param {Object} animationType 窗口显示的动画效果
* @param {Object} animationDuration 窗口动画持续时间单位为 ms
*/
export const to = (url, animationType = 'pop-in', animationDuration = 300) => {
on(url);
};
/**
* 打开任意链接
* @author 深圳前海万联科技有限公司 <www.wanlshop.com>
*
* @param {Object} url 页面地址
*/
export const on = (url, replace = false, reLaunch = false) => {
// url = decodeURIComponent(url);
console.log('onnnnn', url);
if (url.indexOf('pages') === 0) {
url = `/${url}`;
}
if (!/^\/?pages/.test(url) && url.indexOf('./') === -1) {
url = `./${url}`;
}
// const in_tabar = PAGES_JSON.tabBar.list.find((v, idx, obj) => {
// return url.replace('/pages', 'pages') == v.pagePath;
// });
// 关闭所有页面,跳转链接
console.log(in_tabar, url);
const in_tabar =false
if (in_tabar) {
uni.switchTab({
url: url,
});
} else {
const animationType = 'pop-in';
const animationDuration = 300;
let param = {
url,
animationType,
animationDuration,
success: function (res) {
// wanlshop_config.debug ? console.log(res) : '';
},
fail: function (e) {
// wanlshop_config.debug ? console.log(e) : '';
},
};
if (replace) {
uni.redirectTo(param);
} else if (reLaunch) {
uni.reLaunch(param);
} else {
uni.navigateTo(param);
}
}
};
export default {
to,
on,
}

@ -18,7 +18,8 @@ import user from '@/config/user.js';
Vue.prototype.$user = user;
import com from '@/config/com.js';
Vue.prototype.$com = com;
import meeting_common from '@/common/meeting_common';
Vue.prototype.$meeting_common = meeting_common;
// #ifdef H5
import wechat from '@/config/wechat.js'
@ -27,6 +28,7 @@ Vue.prototype.$wechat =wechat;
// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'

@ -0,0 +1,105 @@
<template>
<view>
<meet-navbar title="关于我们" :isFixed="false" :iconType="2"></meet-navbar>
<view class="content">
<image
src="/static/image/user/shear.png"
mode="scaleToFill"
class="icon"
/>
<view class="mb-48">
<view class="title">title</view>
<view class="num">版本号:444545</view>
</view>
<view class="menu">
<view class="flex items-center menu-item" @click="toTxt(1)">
<view class="name">隐私政策</view>
<image
src="/static/image/user/right.png"
mode="scaleToFill"
class="right"
/>
</view>
<view class="flex items-center menu-item" @click="toTxt(1)">
<view class="name">用户协议</view>
<image
src="/static/image/user/right.png"
mode="scaleToFill"
class="right"
/>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data(){
return{
}
},
methods: {
toTxt(){
this.$meeting_common.to('/meeting/user/txt')
},
}
};
</script>
<style lang="scss" scoped>
@import "../common.scss";
.num {
font-weight: 400;
font-size: 24rpx;
color: #4b5158;
line-height: 2;
}
.title {
font-weight: 700;
font-size: 32rpx;
color: #23262b;
}
.content {
text-align: center;
padding: 24rpx;
padding-top: 80rpx;
}
.icon {
width: 176rpx;
height: 176rpx;
border-radius: 40rpx;
margin-bottom: 24rpx;
}
.menu {
background-color: #eef7fe;
border: 4rpx solid #fff;
border-radius: 24rpx;
padding: 0 24rpx;
padding-top: 48rpx;
.right {
width: 36rpx;
height: 36rpx;
}
.name {
font-weight: 400;
font-size: 30rpx;
color: #23262b;
flex: 1;
text-align: left;
}
.icon {
width: 36rpx;
height: 36rpx;
margin-right: 24rpx;
}
.menu-item {
margin-bottom: 48rpx;
}
}
</style>

@ -0,0 +1,33 @@
<template>
<view class="container">
<meet-sticky :bg="bg">
<meet-navbar title="title" :isFixed="false"></meet-navbar>
</meet-sticky>
<view class="content"> </view>
</view>
</template>
<script>
export default {
data() {
return {
bg: "",
};
},
};
</script>
<style lang="scss" scoped>
.container{
height: 100%;
display: flex;
flex-direction: column;
}
.content {
padding: 24rpx;
background-color: #fff;
border-radius: 24rpx 24rpx 0 0;
flex: 1;
}
</style>
Loading…
Cancel
Save