提交 350cb4b1 编写于 作者: 小刘28's avatar 小刘28 💬

Merge branch 'develop'

......@@ -22,18 +22,18 @@
/*全局css*/
/* CDN 服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
@font-face {
src: url("//at.alicdn.com/wf/webfont/aXB2ZFAWvyPD/hJJfts5L2YJFOx7YyH3OJ.woff2") format("woff2"),
url("//at.alicdn.com/wf/webfont/aXB2ZFAWvyPD/5-PszYxf_h5WEDLYDDHHG.woff") format("woff");
font-family: "思源黑体 Light";
font-weight: 300;
font-display: swap;
}
// @font-face {
// src: url("//at.alicdn.com/wf/webfont/aXB2ZFAWvyPD/hJJfts5L2YJFOx7YyH3OJ.woff2") format("woff2"),
// url("//at.alicdn.com/wf/webfont/aXB2ZFAWvyPD/5-PszYxf_h5WEDLYDDHHG.woff") format("woff");
// font-family: "思源黑体 Light";
// font-weight: 300;
// font-display: swap;
// }
body{
font-family: '思源黑体 Light';
word-break: break-all;
line-height: 48rpx;
}
// body{
// font-family: '思源黑体 Light';
// word-break: break-all;
// line-height: 48rpx;
// }
</style>
{
"name": "xz-uniapp",
"version": "1.0.0",
"lockfileVersion": 1
}
{
"pages": [
// {
// "path" : "pages/login/login",
// "style" : {
// "navigationBarTitleText": "登录页面",
// "enablePullDownRefresh": false
// }
// },
{
"path": "pages/template/template-2-web",
"style": {
"navigationBarTitleText": "template-2-web"
}
},
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/tabbar-a/tabbar-a",
......@@ -55,12 +54,12 @@
"navigationBarTitleText": "template-1"
}
},
{
"path": "pages/template/template-2-web",
"style": {
"navigationBarTitleText": "template-2-web"
}
},
// {
// "path": "pages/template/template-2-web",
// "style": {
// "navigationBarTitleText": "template-2-web"
// }
// },
{
"path": "pages/template/template-3-list",
"style": {
......
......@@ -26,7 +26,10 @@
}
},
onLoad( options ) {
this.webSrc = options.src|| 'http://www.baidu.com';
// this.webSrc = options.src|| 'http://www.baidu.com';
this.webSrc = options.src|| 'https://yongling8808.github.io/test/video_demo/video_fullscreen_event.html';
},
methods:{
......
......@@ -9,7 +9,8 @@
<template>
<view class="">
<!-- #ifdef APP-PLUS || MP-WEIXIN -->
<video src="https://gcalic.v.myalicdn.com/gc/ztd_1/index.m3u8?contentid=2820180516001" :controls="false"></video>
<!-- <video src="http://39.134.115.163:8080/PLTV/88888910/224/3221225732/index.m3u8" :controls="false"></video> -->
<video style="width: 100%;" src="https://gccncc.v.wscdns.com/gc/yxlcyt_1/index.m3u8?contentid=2820180516001"></video>
<!-- #endif -->
</view>
</template>
......
......@@ -8,7 +8,10 @@ Vue.use(Vuex);
const store = new Vuex.Store({
state: { //存放状态
user: uni.getStorageSync('user') || {},
token: uni.getStorageSync('token') || ''
token: uni.getStorageSync('token') || '',
isLogin: uni.getStorageSync('isLogin') || false,
roles:uni.getStorageSync('roles') || {},
premiss:uni.getStorageSync('premiss') || [],
},
mutations: {
M_updateUser(state, payload) {
......@@ -22,6 +25,18 @@ const store = new Vuex.Store({
M_updateToken(state, payload) {
state.token = payload;
uni.setStorageSync('token', state.token);
},
M_updateIsLogin(state, payload) {
state.isLogin = payload;
uni.setStorageSync('isLogin', state.isLogin);
},
M_updateRoles(state, payload) {
state.roles = payload;
uni.setStorageSync('roles', state.roles);
},
M_updatePremiss(state, payload) {
state.premiss = payload;
uni.setStorageSync('premiss', state.premiss);
}
},
actions: {
......@@ -30,6 +45,15 @@ const store = new Vuex.Store({
},
A_updateToken(context, payload) {
context.commit('M_updateToken', payload);
},
A_updateIsLogin(context, payload) {
context.commit('M_updateIsLogin', payload);
},
A_updateRoles(context, payload) {
context.commit('M_updateRoles', payload);
},
A_updatePremiss(context, payload) {
context.commit('M_updatePremiss', payload);
}
},
getters: {
......@@ -38,6 +62,15 @@ const store = new Vuex.Store({
},
getToken(state) {
return state.token;
},
getIsLogin(state) {
return state.isLogin;
},
getRoles(state) {
return state.roles;
},
getPremiss(state) {
return state.premiss;
}
},
modules: {
......
/**
* @Author: xiaozuo28
* @Date: 2022年5月13日08:05:20
* @LastEditors: xiaozuo28
* @LastEditTime: 2022年7月17日08:42:42
* @Description: 正则表达式处理
**/
* @Author: xiaozuo28
* @Date: 2022年5月13日08:05:20
* @LastEditors: xiaozuo28
* @LastEditTime: 2022年7月17日08:42:42
* @Description: 正则表达式处理
**/
export default {
/**
* @Description 校验字符串是否为空
* @Date 2022年5月19日10:45:51
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:为空,false:不为空
**/
isStringEmpty(string = ''){
if(string === undefined || string === null){
return true;
}
if(string.trim().length === 0){
return true;
} else {
return false;
}
},
/**
* @Description 校验字符串是否为身份证号
* @Date 2022年5月19日10:56:51
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isIDCard(string = ''){
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
return reg.test(string);
},
/**
* @Description 校验字符串是否为手机号码
* @Date 2022年5月19日11:17:23
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isPhone(string = ''){
let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
return reg.test(string);
},
/**
* @Description 校验字符串是否为Email
* @Date 2022年5月19日11:17:23
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isEmail(string = ''){
let reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
return reg.test(string);
/**
* @Description 校验字符串是否为空
* @Date 2022年5月19日10:45:51
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:为空,false:不为空
**/
isStringEmpty( string = '' ) {
if ( string === undefined || string === null ) {
return true;
}
if ( string.trim( ).length === 0 ) {
return true;
} else {
return false;
}
},
/**
* @Description 校验字符串是否为身份证号
* @Date 2022年5月19日10:56:51
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isIDCard( string = '' ) {
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
return reg.test( string );
},
/**
* @Description 校验字符串是否为手机号码
* @Date 2022年5月19日11:17:23
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isPhone( string = '' ) {
let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
return reg.test( string );
},
/**
* @Description 校验字符串是否为Email
* @Date 2022年5月19日11:17:23
* @Param {String} sting 待校验字符串
* @Return {Boolean} true:是,false:不是
**/
isEmail( string = '' ) {
let reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
return reg.test( string );
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册