Compare commits
3 Commits
c63d50bdf8
...
3e1542cc93
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3e1542cc93 | ||
![]() |
a5ac523309 | ||
![]() |
a7d35738b9 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,5 +2,3 @@
|
|||||||
unpackage/*
|
unpackage/*
|
||||||
unpackage
|
unpackage
|
||||||
.idea
|
.idea
|
||||||
node_modules
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="navigationBarBackExtra">
|
<view class="navigationBarBackExtra">
|
||||||
<slot name="extra">
|
<slot name="extra">
|
||||||
</slot>
|
</slot?>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -109,4 +109,4 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
15
package-lock.json
generated
15
package-lock.json
generated
@ -5,13 +5,12 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rich-text-parser": "^1.0.2",
|
|
||||||
"uview-ui": "^2.0.36",
|
"uview-ui": "^2.0.36",
|
||||||
"weapp-qrcode": "^1.0.0"
|
"weapp-qrcode": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"sass": "^1.79.3",
|
"sass": "^1.69.5",
|
||||||
"sass-loader": "^10.5.2"
|
"sass-loader": "^10.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
@ -732,11 +731,6 @@
|
|||||||
"url": "https://paulmillr.com/funding/"
|
"url": "https://paulmillr.com/funding/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rich-text-parser": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmmirror.com/rich-text-parser/-/rich-text-parser-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-fv6Piuikqf0PCuFGfFMtfOdc9fWE/HoSxi4gkDawco/NDKHfR6W5t1/t7Lh0pySf3GkV/rVcgAp/LKx8ZMwjuw=="
|
|
||||||
},
|
|
||||||
"node_modules/safe-buffer": {
|
"node_modules/safe-buffer": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
@ -1688,11 +1682,6 @@
|
|||||||
"integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==",
|
"integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"rich-text-parser": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmmirror.com/rich-text-parser/-/rich-text-parser-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-fv6Piuikqf0PCuFGfFMtfOdc9fWE/HoSxi4gkDawco/NDKHfR6W5t1/t7Lh0pySf3GkV/rVcgAp/LKx8ZMwjuw=="
|
|
||||||
},
|
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rich-text-parser": "^1.0.2",
|
|
||||||
"uview-ui": "^2.0.36",
|
"uview-ui": "^2.0.36",
|
||||||
"weapp-qrcode": "^1.0.0"
|
"weapp-qrcode": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"sass": "^1.79.3",
|
"sass": "^1.79.3",
|
||||||
"sass-loader": "^10.5.2",
|
"sass-loader": "^10.5.2"
|
||||||
"rich-text-parser": "^1.0.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,39 +2,21 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<VNavigationBar titleColor="rgba(0,0,0,0.9)" backgroundColor="#fff" title="活动内容"></VNavigationBar>
|
<web-view :src="richTextHtml"></web-view>
|
||||||
<!-- <!– #ifdef MP-WEIXIN –>-->
|
|
||||||
<!-- <v-navigation-bar background-color="rgba(255,255,255,1)" title-color="rgba(0,0,0,0)" title="活动内容"></v-navigation-bar>-->
|
|
||||||
<!-- <!– #endif –>-->
|
|
||||||
<!-- <web-view :src="richTextHtml"></web-view>-->
|
|
||||||
<div class="body">
|
|
||||||
<rich-text style="width: 100%" :nodes="richTextHtml | formatRichText" />
|
|
||||||
</div>
|
|
||||||
<view class="fixed-button" @click="toActivity">参与<br/>活动</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from "../../utils/request";
|
import request from "../../utils/request";
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import parser from 'rich-text-parser'
|
|
||||||
import VNavigationBar from "../../components/VNavigationBar.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "content",
|
name: "content",
|
||||||
components: {VNavigationBar},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
richTextHtml: ''
|
richTextHtml: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
|
||||||
formatRichText(html) { // 控制小程序中图片大小
|
|
||||||
console.log(html)
|
|
||||||
const nodes = parser.getRichTextJson(html)
|
|
||||||
return nodes.children
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
const id = data.id;
|
const id = data.id;
|
||||||
this.getRichTextHtml(id)
|
this.getRichTextHtml(id)
|
||||||
@ -47,58 +29,19 @@ export default {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
const data = res.data
|
const data = res.data
|
||||||
this.richTextHtml = data.content
|
this.richTextHtml = data.content.replace(/(<img[^>]+src=")([^":]*?)(")/g, (match, p1, p2, p3) => {
|
||||||
// this.richTextHtml = data.content.replace(/(<img[^>]+src=")([^":]*?)(")/g, (match, p1, p2, p3) => {
|
return `${p1}${config.baseImageUrl}/${p2}${p3}`;
|
||||||
// return `${p1}${config.baseImageUrl}/${p2}${p3}`;
|
});
|
||||||
// });
|
this.richTextHtml = `data:text/html;charset=utf-8,${encodeURIComponent(this.richTextHtml)}`
|
||||||
// this.richTextHtml = `data:text/html;charset=utf-8,${encodeURIComponent(this.richTextHtml)}`
|
|
||||||
}catch {}
|
}catch {}
|
||||||
},
|
|
||||||
// TODO 参与活动
|
|
||||||
toActivity(){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
.body{
|
|
||||||
flex: 1;
|
|
||||||
height: 0;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
img{
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.fixed-button {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 3rem; /* 距离底部的距离 */
|
|
||||||
right: 2rem; /* 距离右边的距离 */
|
|
||||||
z-index: 1000; /* 确保按钮在其他元素之上 */
|
|
||||||
width: 80px; /* 按钮直径 */
|
|
||||||
height: 80px; /* 按钮直径 */
|
|
||||||
background-color: #f00; /* 按钮背景颜色 */
|
|
||||||
color: #fff; /* 文字颜色 */
|
|
||||||
border-radius: 50%; /* 圆形 */
|
|
||||||
display: flex; /* 使用弹性盒子布局 */
|
|
||||||
justify-content: center; /* 水平居中文本 */
|
|
||||||
align-items: center; /* 垂直居中文本 */
|
|
||||||
font-size: 18px; /* 字体大小 */
|
|
||||||
text-align: center; /* 文字水平居中 */
|
|
||||||
line-height: normal; /* 使用默认行高 */
|
|
||||||
font-family: 'Arial', sans-serif; /* 选择字体 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 为了确保文本垂直居中并且分行 */
|
|
||||||
.fixed-button br {
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -4,19 +4,7 @@
|
|||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="body-top-banner">
|
<view class="body-top-banner">
|
||||||
<!-- <image class="banner" src="@/static/images/banner.jpg" mode="aspectFit" />-->
|
<!-- <image class="banner" src="@/static/images/banner.jpg" mode="aspectFit" />-->
|
||||||
<!-- <image class="banner" v-for="banner in bannerList" :key="banner.id" :src="banner.url" @click="toContent(banner.id)" mode="scaleToFill" />-->
|
<image class="banner" v-for="banner in bannerList" :key="banner.id" :src="banner.url" @click="toContent(banner.id)" mode="scaleToFill" />
|
||||||
<swiper class="swiper" circular indicator-dots="true" autoplay="true" interval="2000"
|
|
||||||
duration="500">
|
|
||||||
<swiper-item v-for="banner in bannerList" :key="banner.id" @click="toContent(banner.id)">
|
|
||||||
<image class="banner" :src="banner.url" mode="scaleToFill" />
|
|
||||||
</swiper-item>
|
|
||||||
<!-- <swiper-item>-->
|
|
||||||
<!-- <view class="swiper-item uni-bg-green">B</view>-->
|
|
||||||
<!-- </swiper-item>-->
|
|
||||||
<!-- <swiper-item>-->
|
|
||||||
<!-- <view class="swiper-item uni-bg-blue">C</view>-->
|
|
||||||
<!-- </swiper-item>-->
|
|
||||||
</swiper>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="menus">
|
<view class="menus">
|
||||||
<view @click="gotoPage(menu)" v-for="(menu, index) in menus" :key="index" class="menu-item">
|
<view @click="gotoPage(menu)" v-for="(menu, index) in menus" :key="index" class="menu-item">
|
||||||
@ -35,7 +23,7 @@
|
|||||||
<image class="more-icon" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>
|
<image class="more-icon" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="repairShop">
|
<view class="repairShop">
|
||||||
<view class="title">推荐修理厂</view>
|
<view class="title">附近修理厂</view>
|
||||||
<view class="shopList">
|
<view class="shopList">
|
||||||
<view v-for="(item, index) in shopList" :key="index" class="shopItem" @click="gotoShopDetail(item)">
|
<view v-for="(item, index) in shopList" :key="index" class="shopItem" @click="gotoShopDetail(item)">
|
||||||
<image class="shopImg" :src="item.image" mode="aspectFill"></image>
|
<image class="shopImg" :src="item.image" mode="aspectFill"></image>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
||||||
<view class="kuang">
|
<view class="kuang">
|
||||||
<view class="land">您好,</view>
|
<view class="land">您好,</view>
|
||||||
<view class="land">欢迎登录智修小助手</view>
|
<view class="land">欢迎登录智修小助手</view>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
color="#0D2E8D" @click="shibai()" ></u-button>
|
color="#0D2E8D" @click="shibai()" ></u-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="dbottom">
|
<view class="dbottom">
|
||||||
|
|
||||||
<view class="axquan" v-if="privacyPolicyChecked == false" @click="privacyPolicyChecked = true"></view>
|
<view class="axquan" v-if="privacyPolicyChecked == false" @click="privacyPolicyChecked = true"></view>
|
||||||
<view class="axquanl" v-if="privacyPolicyChecked == true" @click="privacyPolicyChecked = false">
|
<view class="axquanl" v-if="privacyPolicyChecked == true" @click="privacyPolicyChecked = false">
|
||||||
<uni-icons type="checkmarkempty" color="#ffffff" size="14"></uni-icons>
|
<uni-icons type="checkmarkempty" color="#ffffff" size="14"></uni-icons>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
return "获取验证码";
|
return "获取验证码";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async getsxshenfen(){
|
async getsxshenfen(){
|
||||||
let data = {
|
let data = {
|
||||||
@ -83,12 +83,12 @@
|
|||||||
},
|
},
|
||||||
getshenfen(text){
|
getshenfen(text){
|
||||||
this.shenfen = text
|
this.shenfen = text
|
||||||
|
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
// console.log('open');
|
// console.log('open');
|
||||||
},
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
// this.show = false
|
// this.show = false
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
@ -136,81 +136,72 @@
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getPhone(e) {
|
getPhone(e) {
|
||||||
console.log('执行了');
|
console.log('执行了');
|
||||||
if (this.privacyPolicyChecked == false) {
|
if (this.privacyPolicyChecked == false) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "请阅读并勾选用户协议",
|
title: "请阅读并勾选用户协议",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
uni.checkSession({
|
||||||
|
success: () => {
|
||||||
uni.checkSession({
|
uni.request({
|
||||||
success: () => {
|
url: this.baseUrl + "/userClient/repair/wxLogin",
|
||||||
uni.request({
|
method: "POST",
|
||||||
url: this.baseUrl + "/userClient/repair/wxLogin",
|
data: {
|
||||||
method: "POST",
|
code: uni.getStorageSync('c1'),
|
||||||
data: {
|
encryptedIv: e.detail.iv,
|
||||||
code: uni.getStorageSync('c1'),
|
encryptedData: e.detail.encryptedData,
|
||||||
encryptedIv: e.detail.iv,
|
inviteId: uni.getStorageSync('inviteId') ? uni.getStorageSync('inviteId') : null
|
||||||
encryptedData: e.detail.encryptedData,
|
},
|
||||||
inviteId: uni.getStorageSync('inviteId')?uni.getStorageSync('inviteId'):null
|
success: (rex) => {
|
||||||
},
|
if (rex.data.code == 0) {
|
||||||
success: (rex) => {
|
//设置token
|
||||||
|
setToken(rex.data.data.token)
|
||||||
if (rex.data.code == 0) {
|
if (rex.data.data.ifNeedFill) {
|
||||||
if (this.loginStatus) {
|
uni.reLaunch({
|
||||||
clearInterval(this.loginStatus)
|
url: '/pages/my/register'
|
||||||
}
|
})
|
||||||
uni.setStorageSync('App-Token', rex.data.data.token);
|
} else {
|
||||||
if (this.returnUrl) {
|
uni.reLaunch({
|
||||||
|
url: '/pages/home/home'
|
||||||
uni.navigateBack()
|
})
|
||||||
} else {
|
}
|
||||||
//this.userinfo()
|
} else {
|
||||||
console.log('跳转');
|
uni.showToast({
|
||||||
uni.reLaunch({
|
icon: 'none',
|
||||||
url: '/pages/home/home'
|
title: '登录失败,请联系管理人员'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
uni.showToast({
|
fail: (res) => {
|
||||||
icon: 'none',
|
console.log("fail", res);
|
||||||
title: '登录失败,请联系管理人员'
|
uni.showToast({
|
||||||
})
|
icon: "error",
|
||||||
}
|
title: "登录失败,请重新点击并授权!",
|
||||||
},
|
duration: 2000
|
||||||
fail: (res) => {
|
})
|
||||||
console.log("fail", res);
|
}
|
||||||
uni.showToast({
|
})
|
||||||
icon: "error",
|
},
|
||||||
title: "登录失败,请重新点击并授权!",
|
fail: () => {
|
||||||
duration: 2000
|
uni.showToast({
|
||||||
})
|
icon: 'error',
|
||||||
}
|
duration: 2000,
|
||||||
})
|
title: "登录状态过期,重新登录"
|
||||||
},
|
});
|
||||||
fail: () => {
|
}
|
||||||
uni.showToast({
|
})
|
||||||
icon: 'error',
|
},
|
||||||
duration: 2000,
|
|
||||||
title: "登录状态过期,重新登录"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
userinfo(){
|
userinfo(){
|
||||||
console.log('执行了');
|
console.log('执行了');
|
||||||
request({
|
request({
|
||||||
url: '/getAppInfo',
|
url: '/getAppInfo',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
let userJson = {}
|
let userJson = {}
|
||||||
userJson.userId = res.user.userId
|
userJson.userId = res.user.userId
|
||||||
@ -224,21 +215,10 @@
|
|||||||
url: '/pages/detection/my'
|
url: '/pages/detection/my'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// let roles=[];
|
|
||||||
// let jcshopRole = false;
|
|
||||||
// let jcgfRole = false;
|
|
||||||
// roles.forEach(it->{
|
|
||||||
// if(it=='jcshop'){
|
|
||||||
// jcshopRole = true
|
|
||||||
// }
|
|
||||||
// if(it=='jcgf'){
|
|
||||||
// jcgfRole = true
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
getxz(index){
|
getxz(index){
|
||||||
this.activeid = index
|
this.activeid = index
|
||||||
},
|
},
|
||||||
@ -294,10 +274,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.disableButton(); // 禁用按钮
|
this.disableButton(); // 禁用按钮
|
||||||
this.startCountdown(); // 启动倒计时
|
this.startCountdown(); // 启动倒计时
|
||||||
|
|
||||||
},
|
},
|
||||||
disableButton() {
|
disableButton() {
|
||||||
this.isButtonDisabled = true;
|
this.isButtonDisabled = true;
|
||||||
@ -316,7 +296,7 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@ -396,7 +376,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
background-image: url('http://www.nuoyunr.com/lananRsc/jdc-bj.png');
|
background-image: url('http://www.nuoyunr.com/lananRsc/jdc-bj.png');
|
||||||
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
@ -405,10 +385,10 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0px 27px;
|
padding: 0px 27px;
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
|
|
||||||
|
|
||||||
// background-color:lightseagreen;
|
// background-color:lightseagreen;
|
||||||
|
|
||||||
background-position: center;
|
background-position: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 385px;
|
// height: 385px;
|
||||||
@ -458,7 +438,7 @@
|
|||||||
color: #0078FF;
|
color: #0078FF;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.dl{
|
.dl{
|
||||||
width: 90%;
|
width: 90%;
|
||||||
@ -520,12 +500,12 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lan{
|
.lan{
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
}
|
}
|
||||||
.land{
|
.land{
|
||||||
|
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #0D2E8D;
|
color: #0D2E8D;
|
||||||
@ -551,4 +531,4 @@
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
background-color: #0D2E8D;
|
background-color: #0D2E8D;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -65,16 +65,22 @@
|
|||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import {getToken} from '@/utils/auth.js'
|
import {getUserInfoRequest} from "@/utils/common.js";
|
||||||
|
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
tabBarVue,
|
tabBarVue,
|
||||||
VNavigationBar
|
VNavigationBar
|
||||||
},
|
},
|
||||||
onShow(data) {
|
onShow(data) {
|
||||||
if(getToken()){
|
if(!getToken()){
|
||||||
this.getServer()
|
uni.reLaunch({
|
||||||
}
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
console.log("已登录")
|
||||||
|
this.getServer()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -105,22 +111,9 @@
|
|||||||
},
|
},
|
||||||
//获取当前登录用户信息
|
//获取当前登录用户信息
|
||||||
async getServer() {
|
async getServer() {
|
||||||
const res = await request({
|
console.log("获取用户信息")
|
||||||
url: "/userClient/customer/getUserCustomer",
|
this.customInfo = getUserInfoRequest()
|
||||||
method: 'get',
|
}
|
||||||
params:{}
|
|
||||||
})
|
|
||||||
if(!res.data){
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/my/register'
|
|
||||||
})
|
|
||||||
|
|
||||||
}else{
|
|
||||||
this.customInfo = res.data
|
|
||||||
uni.setStorageSync('customerInfo', JSON.stringify(this.customInfo))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<view class="top_Bar">
|
<view class="top_Bar">
|
||||||
<uni-icons @click="goHome()" size="24" type="left"
|
<uni-icons @click="goHome()" size="24" type="left"
|
||||||
color="#000" style="margin-left: 10px;" ></uni-icons>
|
color="#000" style="margin-left: 10px;" ></uni-icons>
|
||||||
<view class="title_top">注册会员</view>
|
<view class="title_top">完善会员信息</view>
|
||||||
<view style="width: 24px;height: 24px;"></view>
|
<view style="width: 24px;height: 24px;"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
@ -39,12 +39,12 @@
|
|||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="formItem">
|
<!-- <view class="formItem">-->
|
||||||
<view class="formLabel">手机号</view>
|
<!-- <view class="formLabel">手机号</view>-->
|
||||||
<view class="formContainer">
|
<!-- <view class="formContainer">-->
|
||||||
<input placeholder="请填写你的手机号" v-model="formData.phoneNumber" type="text"/>
|
<!-- <input placeholder="请填写你的手机号" v-model="formData.phoneNumber" type="text"/>-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
<view class="formItem">
|
<view class="formItem">
|
||||||
<view class="formLabel">联系地址</view>
|
<view class="formLabel">联系地址</view>
|
||||||
<view class="formContainer">
|
<view class="formContainer">
|
||||||
@ -52,7 +52,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dl" @click="getlogin()">
|
<view class="dl" @click="getlogin()">
|
||||||
<text>注册</text>
|
<text>保存</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -61,7 +61,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import request from "../../utils/request";
|
import request from "../../utils/request";
|
||||||
import {getUserInfoRequest} from "@/utils/common.js";
|
|
||||||
import {
|
import {
|
||||||
setToken,
|
setToken,
|
||||||
} from '@/utils/auth.js'
|
} from '@/utils/auth.js'
|
||||||
@ -78,7 +77,7 @@ export default {
|
|||||||
sex: "",
|
sex: "",
|
||||||
idCard:"",
|
idCard:"",
|
||||||
birthday:"请选择你的生日",
|
birthday:"请选择你的生日",
|
||||||
phoneNumber:"",
|
// phoneNumber:"",
|
||||||
address:"",
|
address:"",
|
||||||
},
|
},
|
||||||
//性别
|
//性别
|
||||||
@ -104,7 +103,7 @@ export default {
|
|||||||
goHome(){
|
goHome(){
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/pages/home/home'
|
url:'/pages/home/home'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 注册
|
* 注册
|
||||||
@ -120,10 +119,9 @@ export default {
|
|||||||
data: this.formData
|
data: this.formData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code==200) {
|
if (res.code==200) {
|
||||||
getUserInfoRequest()
|
uni.reLaunch({
|
||||||
uni.reLaunch({
|
url: '/pages/home/home'
|
||||||
url: '/pages/home/home'
|
})
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@ -155,13 +153,13 @@ export default {
|
|||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(""==this.formData.phoneNumber || !this.isValidPhoneNumber(this.formData.phoneNumber)){
|
// if(""==this.formData.phoneNumber || !this.isValidPhoneNumber(this.formData.phoneNumber)){
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '请填写手机号',
|
// title: '请填写手机号',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if(""==this.formData.address){
|
if(""==this.formData.address){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请填写联系地址',
|
title: '请填写联系地址',
|
||||||
@ -329,12 +327,12 @@ export default {
|
|||||||
.top_Bar{
|
.top_Bar{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
|
|
||||||
padding-top: 44px;
|
padding-top: 44px;
|
||||||
}
|
}
|
||||||
.title_top{
|
.title_top{
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
import VNavigationBar from '@/components/VNavigationBar.vue';
|
import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||||
import request from "../../utils/request";
|
import request from "../../utils/request";
|
||||||
import config from "config";
|
import config from "config";
|
||||||
|
import {getUserInfoRequest} from "@/utils/common.js";
|
||||||
|
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
@ -54,11 +56,23 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
if(!getToken()){
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
console.log("已登录")
|
||||||
|
this.getUserInfos()
|
||||||
|
}
|
||||||
// 页面显示时执行初始化操作
|
// 页面显示时执行初始化操作
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取当前登录用户信息
|
||||||
|
async getUserInfos() {
|
||||||
|
console.log("获取用户信息")
|
||||||
|
getUserInfoRequest()
|
||||||
|
},
|
||||||
getList(){
|
getList(){
|
||||||
request({
|
request({
|
||||||
url: '/userClient/base/myCar/get',
|
url: '/userClient/base/myCar/get',
|
||||||
|
@ -102,6 +102,8 @@
|
|||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
|
import {getUserInfoRequest} from "@/utils/common.js";
|
||||||
|
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -186,10 +188,23 @@
|
|||||||
this.getServer(this.info.id)
|
this.getServer(this.info.id)
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
if(!getToken()){
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
console.log("已登录")
|
||||||
|
this.getUserInfos()
|
||||||
|
}
|
||||||
this.initCarList()
|
this.initCarList()
|
||||||
this.initDateList()
|
this.initDateList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取当前登录用户信息
|
||||||
|
async getUserInfos() {
|
||||||
|
console.log("获取用户信息")
|
||||||
|
getUserInfo()
|
||||||
|
},
|
||||||
initDateList(){
|
initDateList(){
|
||||||
const daysOfWeek = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
const daysOfWeek = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
import reservationOrderVue from '../../components/reservationOrder/reservationOrder.vue'
|
import reservationOrderVue from '../../components/reservationOrder/reservationOrder.vue'
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
import {getUserInfoRequest} from "@/utils/common.js";
|
||||||
|
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -46,9 +48,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
if(!getToken()){
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
console.log("已登录")
|
||||||
|
this.getUserInfos()
|
||||||
|
}
|
||||||
this.getBookingPage()
|
this.getBookingPage()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取当前登录用户信息
|
||||||
|
async getUserInfos() {
|
||||||
|
getUserInfoRequest()
|
||||||
|
},
|
||||||
async getBookingPage(){
|
async getBookingPage(){
|
||||||
const res = await request({
|
const res = await request({
|
||||||
url: "/userClient/repair/booking/page",
|
url: "/userClient/repair/booking/page",
|
||||||
|
@ -1,3 +1,29 @@
|
|||||||
|
## 2.0.10(2024-06-07)
|
||||||
|
- 优化 uni-app x 中,size 属性的类型
|
||||||
|
## 2.0.9(2024-01-12)
|
||||||
|
fix: 修复图标大小默认值错误的问题
|
||||||
|
## 2.0.8(2023-12-14)
|
||||||
|
- 修复 项目未使用 ts 情况下,打包报错的bug
|
||||||
|
## 2.0.7(2023-12-14)
|
||||||
|
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
|
||||||
|
## 2.0.6(2023-12-11)
|
||||||
|
- 优化 兼容老版本icon类型,如 top ,bottom 等
|
||||||
|
## 2.0.5(2023-12-11)
|
||||||
|
- 优化 兼容老版本icon类型,如 top ,bottom 等
|
||||||
|
## 2.0.4(2023-12-06)
|
||||||
|
- 优化 uni-app x 下示例项目图标排序
|
||||||
|
## 2.0.3(2023-12-06)
|
||||||
|
- 修复 nvue下引入组件报错的bug
|
||||||
|
## 2.0.2(2023-12-05)
|
||||||
|
-优化 size 属性支持单位
|
||||||
|
## 2.0.1(2023-12-05)
|
||||||
|
- 新增 uni-app x 支持定义图标
|
||||||
|
## 1.3.5(2022-01-24)
|
||||||
|
- 优化 size 属性可以传入不带单位的字符串数值
|
||||||
|
## 1.3.4(2022-01-24)
|
||||||
|
- 优化 size 支持其他单位
|
||||||
|
## 1.3.3(2022-01-17)
|
||||||
|
- 修复 nvue 有些图标不显示的bug,兼容老版本图标
|
||||||
## 1.3.2(2021-12-01)
|
## 1.3.2(2021-12-01)
|
||||||
- 优化 示例可复制图标名称
|
- 优化 示例可复制图标名称
|
||||||
## 1.3.1(2021-11-23)
|
## 1.3.1(2021-11-23)
|
||||||
|
@ -1,20 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- #ifdef APP-NVUE -->
|
<!-- #ifdef APP-NVUE -->
|
||||||
<text :style="{ color: color, 'font-size': size + 'px' }" class="uni-icons" @click="_onClick">{{unicode}}</text>
|
<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifndef APP-NVUE -->
|
<!-- #ifndef APP-NVUE -->
|
||||||
<text :style="{ color: color, 'font-size': size + 'px' }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
|
<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
|
||||||
|
<slot></slot>
|
||||||
|
</text>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import icons from './icons.js';
|
import { fontData } from './uniicons_file_vue.js';
|
||||||
|
|
||||||
|
const getVal = (val) => {
|
||||||
|
const reg = /^[0-9]*$/g
|
||||||
|
return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
|
||||||
|
}
|
||||||
|
|
||||||
// #ifdef APP-NVUE
|
// #ifdef APP-NVUE
|
||||||
var domModule = weex.requireModule('dom');
|
var domModule = weex.requireModule('dom');
|
||||||
import iconUrl from './uniicons.ttf'
|
import iconUrl from './uniicons.ttf'
|
||||||
domModule.addRule('fontFace', {
|
domModule.addRule('fontFace', {
|
||||||
'fontFamily': "uniicons",
|
'fontFamily': "uniicons",
|
||||||
'src': "url('"+iconUrl+"')"
|
'src': "url('" + iconUrl + "')"
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
@ -30,7 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
name: 'UniIcons',
|
name: 'UniIcons',
|
||||||
emits:['click'],
|
emits: ['click'],
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -44,23 +52,36 @@
|
|||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 16
|
default: 16
|
||||||
},
|
},
|
||||||
customPrefix:{
|
customPrefix: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
icons: icons.glyphs
|
icons: fontData
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
unicode(){
|
unicode() {
|
||||||
let code = this.icons.find(v=>v.font_class === this.type)
|
let code = this.icons.find(v => v.font_class === this.type)
|
||||||
if(code){
|
if (code) {
|
||||||
return unescape(`%u${code.unicode}`)
|
return code.unicode
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
},
|
||||||
|
iconSize() {
|
||||||
|
return getVal(this.size)
|
||||||
|
},
|
||||||
|
styleObj() {
|
||||||
|
if (this.fontFamily !== '') {
|
||||||
|
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
|
||||||
|
}
|
||||||
|
return `color: ${this.color}; font-size: ${this.iconSize};`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -74,9 +95,10 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
@import './uniicons.css';
|
@import './uniicons.css';
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: uniicons;
|
font-family: uniicons;
|
||||||
src: url('./uniicons.ttf') format('truetype');
|
src: url('./uniicons.ttf');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
@ -85,5 +107,4 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
|
||||||
|
.uniui-cart-filled:before {
|
||||||
|
content: "\e6d0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gift-filled:before {
|
||||||
|
content: "\e6c4";
|
||||||
|
}
|
||||||
|
|
||||||
.uniui-color:before {
|
.uniui-color:before {
|
||||||
content: "\e6cf";
|
content: "\e6cf";
|
||||||
}
|
}
|
||||||
@ -58,10 +67,6 @@
|
|||||||
content: "\e6c3";
|
content: "\e6c3";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-gift-filled:before {
|
|
||||||
content: "\e6c4";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-fire-filled:before {
|
.uniui-fire-filled:before {
|
||||||
content: "\e6c5";
|
content: "\e6c5";
|
||||||
}
|
}
|
||||||
@ -82,6 +87,18 @@
|
|||||||
content: "\e698";
|
content: "\e698";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinleft:before {
|
||||||
|
content: "\e6d2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinup:before {
|
||||||
|
content: "\e6d3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthindown:before {
|
||||||
|
content: "\e6d4";
|
||||||
|
}
|
||||||
|
|
||||||
.uniui-back:before {
|
.uniui-back:before {
|
||||||
content: "\e6b9";
|
content: "\e6b9";
|
||||||
}
|
}
|
||||||
@ -94,55 +111,43 @@
|
|||||||
content: "\e6bb";
|
content: "\e6bb";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowthinright:before {
|
|
||||||
content: "\e6bb";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-arrow-left:before {
|
.uniui-arrow-left:before {
|
||||||
content: "\e6bc";
|
content: "\e6bc";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowthinleft:before {
|
|
||||||
content: "\e6bc";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-arrow-up:before {
|
.uniui-arrow-up:before {
|
||||||
content: "\e6bd";
|
content: "\e6bd";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowthinup:before {
|
|
||||||
content: "\e6bd";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-arrow-down:before {
|
.uniui-arrow-down:before {
|
||||||
content: "\e6be";
|
content: "\e6be";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowthindown:before {
|
.uniui-arrowthinright:before {
|
||||||
content: "\e6be";
|
content: "\e6d1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-down:before {
|
||||||
|
content: "\e6b8";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-bottom:before {
|
.uniui-bottom:before {
|
||||||
content: "\e6b8";
|
content: "\e6b8";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowdown:before {
|
.uniui-arrowright:before {
|
||||||
content: "\e6b8";
|
content: "\e6d5";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-right:before {
|
.uniui-right:before {
|
||||||
content: "\e6b5";
|
content: "\e6b5";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowright:before {
|
.uniui-up:before {
|
||||||
content: "\e6b5";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-top:before {
|
|
||||||
content: "\e6b6";
|
content: "\e6b6";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowup:before {
|
.uniui-top:before {
|
||||||
content: "\e6b6";
|
content: "\e6b6";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,8 +155,8 @@
|
|||||||
content: "\e6b7";
|
content: "\e6b7";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-arrowleft:before {
|
.uniui-arrowup:before {
|
||||||
content: "\e6b7";
|
content: "\e6d6";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-eye:before {
|
.uniui-eye:before {
|
||||||
@ -638,10 +643,6 @@
|
|||||||
content: "\e627";
|
content: "\e627";
|
||||||
}
|
}
|
||||||
|
|
||||||
.uniui-cart-filled:before {
|
|
||||||
content: "\e629";
|
|
||||||
}
|
|
||||||
|
|
||||||
.uniui-checkbox:before {
|
.uniui-checkbox:before {
|
||||||
content: "\e62b";
|
content: "\e62b";
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "uni-icons",
|
"id": "uni-icons",
|
||||||
"displayName": "uni-icons 图标",
|
"displayName": "uni-icons 图标",
|
||||||
"version": "1.3.2",
|
"version": "2.0.10",
|
||||||
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-ui",
|
"uni-ui",
|
||||||
@ -16,11 +16,7 @@
|
|||||||
"directories": {
|
"directories": {
|
||||||
"example": "../../temps/example_temps"
|
"example": "../../temps/example_temps"
|
||||||
},
|
},
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"category": [
|
|
||||||
"前端组件",
|
|
||||||
"通用组件"
|
|
||||||
],
|
|
||||||
"sale": {
|
"sale": {
|
||||||
"regular": {
|
"regular": {
|
||||||
"price": "0.00"
|
"price": "0.00"
|
||||||
@ -37,7 +33,8 @@
|
|||||||
"data": "无",
|
"data": "无",
|
||||||
"permissions": "无"
|
"permissions": "无"
|
||||||
},
|
},
|
||||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
|
"type": "component-vue"
|
||||||
},
|
},
|
||||||
"uni_modules": {
|
"uni_modules": {
|
||||||
"dependencies": ["uni-scss"],
|
"dependencies": ["uni-scss"],
|
||||||
@ -45,12 +42,14 @@
|
|||||||
"platforms": {
|
"platforms": {
|
||||||
"cloud": {
|
"cloud": {
|
||||||
"tcb": "y",
|
"tcb": "y",
|
||||||
"aliyun": "y"
|
"aliyun": "y",
|
||||||
|
"alipay": "n"
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"App": {
|
"App": {
|
||||||
"app-vue": "y",
|
"app-vue": "y",
|
||||||
"app-nvue": "y"
|
"app-nvue": "y",
|
||||||
|
"app-uvue": "y"
|
||||||
},
|
},
|
||||||
"H5-mobile": {
|
"H5-mobile": {
|
||||||
"Safari": "y",
|
"Safari": "y",
|
||||||
@ -70,11 +69,15 @@
|
|||||||
"阿里": "y",
|
"阿里": "y",
|
||||||
"百度": "y",
|
"百度": "y",
|
||||||
"字节跳动": "y",
|
"字节跳动": "y",
|
||||||
"QQ": "y"
|
"QQ": "y",
|
||||||
|
"钉钉": "y",
|
||||||
|
"快手": "y",
|
||||||
|
"飞书": "y",
|
||||||
|
"京东": "y"
|
||||||
},
|
},
|
||||||
"快应用": {
|
"快应用": {
|
||||||
"华为": "u",
|
"华为": "y",
|
||||||
"联盟": "u"
|
"联盟": "y"
|
||||||
},
|
},
|
||||||
"Vue": {
|
"Vue": {
|
||||||
"vue2": "y",
|
"vue2": "y",
|
||||||
@ -83,4 +86,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
## 1.9.2(2024-09-21)
|
||||||
|
- 修复 uni-popup在android上的重复点击弹出位置不正确的bug
|
||||||
|
## 1.9.1(2024-04-02)
|
||||||
|
- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
|
||||||
|
## 1.9.0(2024-03-28)
|
||||||
|
- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
|
||||||
|
## 1.8.9(2024-03-20)
|
||||||
|
- 修复 uni-popup-dialog 数据输入时修正为双向绑定
|
||||||
|
## 1.8.8(2024-02-20)
|
||||||
|
- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
|
||||||
|
## 1.8.7(2024-02-02)
|
||||||
|
- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
|
||||||
|
## 1.8.6(2024-01-30)
|
||||||
|
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
|
||||||
|
## 1.8.5(2024-01-26)
|
||||||
|
- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
|
||||||
|
## 1.8.4(2023-11-15)
|
||||||
|
- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
|
||||||
|
## 1.8.3(2023-04-17)
|
||||||
|
- 修复 uni-popup 重复打开时的 bug
|
||||||
|
## 1.8.2(2023-02-02)
|
||||||
|
- uni-popup-dialog 组件新增 inputType 属性
|
||||||
## 1.8.1(2022-12-01)
|
## 1.8.1(2022-12-01)
|
||||||
- 修复 nvue 下 v-show 报错
|
- 修复 nvue 下 v-show 报错
|
||||||
## 1.8.0(2022-11-29)
|
## 1.8.0(2022-11-29)
|
||||||
|
@ -10,14 +10,15 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else class="uni-dialog-content">
|
<view v-else class="uni-dialog-content">
|
||||||
<slot>
|
<slot>
|
||||||
<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
|
<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
|
||||||
|
:placeholder="placeholderText" :focus="focus">
|
||||||
</slot>
|
</slot>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-dialog-button-group">
|
<view class="uni-dialog-button-group">
|
||||||
<view class="uni-dialog-button" @click="closeDialog">
|
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
|
||||||
<text class="uni-dialog-button-text">{{closeText}}</text>
|
<text class="uni-dialog-button-text">{{closeText}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-dialog-button uni-border-left" @click="onOk">
|
<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
|
||||||
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
|
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -28,16 +29,19 @@
|
|||||||
<script>
|
<script>
|
||||||
import popup from '../uni-popup/popup.js'
|
import popup from '../uni-popup/popup.js'
|
||||||
import {
|
import {
|
||||||
initVueI18n
|
initVueI18n
|
||||||
} from '@dcloudio/uni-i18n'
|
} from '@dcloudio/uni-i18n'
|
||||||
import messages from '../uni-popup/i18n/index.js'
|
import messages from '../uni-popup/i18n/index.js'
|
||||||
const { t } = initVueI18n(messages)
|
const {
|
||||||
|
t
|
||||||
|
} = initVueI18n(messages)
|
||||||
/**
|
/**
|
||||||
* PopUp 弹出层-对话框样式
|
* PopUp 弹出层-对话框样式
|
||||||
* @description 弹出层-对话框样式
|
* @description 弹出层-对话框样式
|
||||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
|
||||||
* @property {String} value input 模式下的默认值
|
* @property {String} value input 模式下的默认值
|
||||||
* @property {String} placeholder input 模式下输入提示
|
* @property {String} placeholder input 模式下输入提示
|
||||||
|
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
|
||||||
* @property {String} type = [success|warning|info|error] 主题样式
|
* @property {String} type = [success|warning|info|error] 主题样式
|
||||||
* @value success 成功
|
* @value success 成功
|
||||||
* @value warning 提示
|
* @value warning 提示
|
||||||
@ -46,8 +50,10 @@
|
|||||||
* @property {String} mode = [base|input] 模式、
|
* @property {String} mode = [base|input] 模式、
|
||||||
* @value base 基础对话框
|
* @value base 基础对话框
|
||||||
* @value input 可输入对话框
|
* @value input 可输入对话框
|
||||||
|
* @showClose {Boolean} 是否显示关闭按钮
|
||||||
* @property {String} content 对话框内容
|
* @property {String} content 对话框内容
|
||||||
* @property {Boolean} beforeClose 是否拦截取消事件
|
* @property {Boolean} beforeClose 是否拦截取消事件
|
||||||
|
* @property {Number} maxlength 输入
|
||||||
* @event {Function} confirm 点击确认按钮触发
|
* @event {Function} confirm 点击确认按钮触发
|
||||||
* @event {Function} close 点击取消按钮触发
|
* @event {Function} close 点击取消按钮触发
|
||||||
*/
|
*/
|
||||||
@ -55,12 +61,30 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "uniPopupDialog",
|
name: "uniPopupDialog",
|
||||||
mixins: [popup],
|
mixins: [popup],
|
||||||
emits:['confirm','close'],
|
emits: ['confirm', 'close', 'update:modelValue', 'input'],
|
||||||
props: {
|
props: {
|
||||||
|
inputType: {
|
||||||
|
type: String,
|
||||||
|
default: 'text'
|
||||||
|
},
|
||||||
|
showClose: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
// #ifdef VUE2
|
||||||
value: {
|
value: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
modelValue: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: ''
|
default: ''
|
||||||
@ -85,19 +109,26 @@
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
cancelText:{
|
cancelText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
confirmText:{
|
confirmText: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
maxlength: {
|
||||||
|
type: Number,
|
||||||
|
default: -1,
|
||||||
|
},
|
||||||
|
focus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogType: 'error',
|
dialogType: 'error',
|
||||||
focus: false,
|
|
||||||
val: ""
|
val: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -125,7 +156,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
value(val) {
|
value(val) {
|
||||||
this.val = val
|
if (this.maxlength != -1 && this.mode === 'input') {
|
||||||
|
this.val = val.slice(0, this.maxlength);
|
||||||
|
} else {
|
||||||
|
this.val = val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
val(val) {
|
||||||
|
// #ifdef VUE2
|
||||||
|
// TODO 兼容 vue2
|
||||||
|
this.$emit('input', val);
|
||||||
|
// #endif
|
||||||
|
// #ifdef VUE3
|
||||||
|
// TODO 兼容 vue3
|
||||||
|
this.$emit('update:modelValue', val);
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -134,25 +179,25 @@
|
|||||||
// this.popup.closeMask()
|
// this.popup.closeMask()
|
||||||
if (this.mode === 'input') {
|
if (this.mode === 'input') {
|
||||||
this.dialogType = 'info'
|
this.dialogType = 'info'
|
||||||
this.val = this.value
|
this.val = this.value;
|
||||||
|
// #ifdef VUE3
|
||||||
|
this.val = this.modelValue;
|
||||||
|
// #endif
|
||||||
} else {
|
} else {
|
||||||
this.dialogType = this.type
|
this.dialogType = this.type
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.focus = true
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 点击确认按钮
|
* 点击确认按钮
|
||||||
*/
|
*/
|
||||||
onOk() {
|
onOk() {
|
||||||
if (this.mode === 'input'){
|
if (this.mode === 'input') {
|
||||||
this.$emit('confirm', this.val)
|
this.$emit('confirm', this.val)
|
||||||
}else{
|
} else {
|
||||||
this.$emit('confirm')
|
this.$emit('confirm')
|
||||||
}
|
}
|
||||||
if(this.beforeClose) return
|
if (this.beforeClose) return
|
||||||
this.popup.close()
|
this.popup.close()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -160,22 +205,17 @@
|
|||||||
*/
|
*/
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
if(this.beforeClose) return
|
if (this.beforeClose) return
|
||||||
this.popup.close()
|
this.popup.close()
|
||||||
},
|
},
|
||||||
close(){
|
close() {
|
||||||
this.popup.close()
|
this.popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" >
|
<style lang="scss">
|
||||||
$uni-primary: #007aff !default;
|
|
||||||
$uni-success: #4cd964 !default;
|
|
||||||
$uni-warning: #f0ad4e !default;
|
|
||||||
$uni-error: #dd524d !default;
|
|
||||||
|
|
||||||
.uni-popup-dialog {
|
.uni-popup-dialog {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border-radius: 11px;
|
border-radius: 11px;
|
||||||
@ -245,7 +285,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uni-button-color {
|
.uni-button-color {
|
||||||
color: $uni-primary;
|
color: #007aff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-dialog-input {
|
.uni-dialog-input {
|
||||||
@ -259,15 +299,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uni-popup__success {
|
.uni-popup__success {
|
||||||
color: $uni-success;
|
color: #4cd964;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-popup__warn {
|
.uni-popup__warn {
|
||||||
color: $uni-warning;
|
color: #f0ad4e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-popup__error {
|
.uni-popup__error {
|
||||||
color: $uni-error;
|
color: #dd524d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-popup__info {
|
.uni-popup__info {
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
{
|
{
|
||||||
text: '支付宝',
|
text: '支付宝',
|
||||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
|
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
|
||||||
name: 'wx'
|
name: 'ali'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'QQ',
|
text: 'QQ',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:duration="duration" :show="showTrans" @click="onTap" />
|
:duration="duration" :show="showTrans" @click="onTap" />
|
||||||
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
|
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
|
||||||
:show="showTrans" @click="onTap">
|
:show="showTrans" @click="onTap">
|
||||||
<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
|
<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
|
||||||
<slot />
|
<slot />
|
||||||
</view>
|
</view>
|
||||||
</uni-transition>
|
</uni-transition>
|
||||||
@ -39,6 +39,7 @@
|
|||||||
* @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
|
* @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
|
||||||
* @property {String} backgroundColor 主窗口背景色
|
* @property {String} backgroundColor 主窗口背景色
|
||||||
* @property {String} maskBackgroundColor 蒙版颜色
|
* @property {String} maskBackgroundColor 蒙版颜色
|
||||||
|
* @property {String} borderRadius 设置圆角(左上、右上、右下和左下) 示例:"10px 10px 10px 10px"
|
||||||
* @property {Boolean} safeArea 是否适配底部安全区
|
* @property {Boolean} safeArea 是否适配底部安全区
|
||||||
* @event {Function} change 打开关闭弹窗触发,e={show: false}
|
* @event {Function} change 打开关闭弹窗触发,e={show: false}
|
||||||
* @event {Function} maskClick 点击遮罩触发
|
* @event {Function} maskClick 点击遮罩触发
|
||||||
@ -86,6 +87,9 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'rgba(0, 0, 0, 0.4)'
|
default: 'rgba(0, 0, 0, 0.4)'
|
||||||
},
|
},
|
||||||
|
borderRadius:{
|
||||||
|
type: String,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
@ -157,16 +161,25 @@
|
|||||||
backgroundColor: 'rgba(0, 0, 0, 0.4)'
|
backgroundColor: 'rgba(0, 0, 0, 0.4)'
|
||||||
},
|
},
|
||||||
transClass: {
|
transClass: {
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
borderRadius: this.borderRadius || "0",
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0
|
right: 0
|
||||||
},
|
},
|
||||||
maskShow: true,
|
maskShow: true,
|
||||||
mkclick: true,
|
mkclick: true,
|
||||||
popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
|
popupstyle: 'top'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
getStyles() {
|
||||||
|
let res = { backgroundColor: this.bg };
|
||||||
|
if (this.borderRadius || "0") {
|
||||||
|
res = Object.assign(res, { borderRadius: this.borderRadius })
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
},
|
||||||
isDesktop() {
|
isDesktop() {
|
||||||
return this.popupWidth >= 500 && this.popupHeight >= 500
|
return this.popupWidth >= 500 && this.popupHeight >= 500
|
||||||
},
|
},
|
||||||
@ -221,6 +234,12 @@
|
|||||||
this.setH5Visible()
|
this.setH5Visible()
|
||||||
},
|
},
|
||||||
// #endif
|
// #endif
|
||||||
|
activated() {
|
||||||
|
this.setH5Visible(!this.showPopup);
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.setH5Visible(true);
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.mkclick = this.isMaskClick || this.maskClick
|
// this.mkclick = this.isMaskClick || this.maskClick
|
||||||
if (this.isMaskClick === null && this.maskClick === null) {
|
if (this.isMaskClick === null && this.maskClick === null) {
|
||||||
@ -240,10 +259,10 @@
|
|||||||
this.maskClass.backgroundColor = this.maskBackgroundColor
|
this.maskClass.backgroundColor = this.maskBackgroundColor
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setH5Visible() {
|
setH5Visible(visible = true) {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// fix by mehaotian 处理 h5 滚动穿透的问题
|
// fix by mehaotian 处理 h5 滚动穿透的问题
|
||||||
document.getElementsByTagName('body')[0].style.overflow = 'visible'
|
document.getElementsByTagName('body')[0].style.overflow = visible ? "visible" : "hidden";
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -269,8 +288,7 @@
|
|||||||
open(direction) {
|
open(direction) {
|
||||||
// fix by mehaotian 处理快速打开关闭的情况
|
// fix by mehaotian 处理快速打开关闭的情况
|
||||||
if (this.showPopup) {
|
if (this.showPopup) {
|
||||||
clearTimeout(this.timer)
|
return
|
||||||
this.showPopup = false
|
|
||||||
}
|
}
|
||||||
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
|
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
|
||||||
if (!(direction && innerType.indexOf(direction) !== -1)) {
|
if (!(direction && innerType.indexOf(direction) !== -1)) {
|
||||||
@ -324,13 +342,15 @@
|
|||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
backgroundColor: this.bg
|
backgroundColor: this.bg,
|
||||||
|
borderRadius:this.borderRadius || "0"
|
||||||
}
|
}
|
||||||
// TODO 兼容 type 属性 ,后续会废弃
|
// TODO 兼容 type 属性 ,后续会废弃
|
||||||
if (type) return
|
if (type) return
|
||||||
this.showPopup = true
|
this.showPopup = true
|
||||||
this.showTrans = true
|
this.showTrans = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.showPoptrans()
|
||||||
if (this.messageChild && this.type === 'message') {
|
if (this.messageChild && this.type === 'message') {
|
||||||
this.messageChild.timerClose()
|
this.messageChild.timerClose()
|
||||||
}
|
}
|
||||||
@ -348,19 +368,25 @@
|
|||||||
right: 0,
|
right: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
paddingBottom: this.safeAreaInsets + 'px',
|
paddingBottom: this.safeAreaInsets + 'px',
|
||||||
backgroundColor: this.bg
|
backgroundColor: this.bg,
|
||||||
|
borderRadius:this.borderRadius || "0",
|
||||||
}
|
}
|
||||||
// TODO 兼容 type 属性 ,后续会废弃
|
// TODO 兼容 type 属性 ,后续会废弃
|
||||||
if (type) return
|
if (type) return
|
||||||
this.showPopup = true
|
this.showPoptrans()
|
||||||
this.showTrans = true
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 中间弹出样式处理
|
* 中间弹出样式处理
|
||||||
*/
|
*/
|
||||||
center(type) {
|
center(type) {
|
||||||
this.popupstyle = 'center'
|
this.popupstyle = 'center'
|
||||||
this.ani = ['zoom-out', 'fade']
|
//微信小程序下,组合动画会出现文字向上闪动问题,再此做特殊处理
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
this.ani = ['fade']
|
||||||
|
// #endif
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
this.ani = ['zoom-out', 'fade']
|
||||||
|
// #endif
|
||||||
this.transClass = {
|
this.transClass = {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
@ -372,12 +398,12 @@
|
|||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center'
|
alignItems: 'center',
|
||||||
|
borderRadius:this.borderRadius || "0"
|
||||||
}
|
}
|
||||||
// TODO 兼容 type 属性 ,后续会废弃
|
// TODO 兼容 type 属性 ,后续会废弃
|
||||||
if (type) return
|
if (type) return
|
||||||
this.showPopup = true
|
this.showPoptrans()
|
||||||
this.showTrans = true
|
|
||||||
},
|
},
|
||||||
left(type) {
|
left(type) {
|
||||||
this.popupstyle = 'left'
|
this.popupstyle = 'left'
|
||||||
@ -388,6 +414,7 @@
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
backgroundColor: this.bg,
|
backgroundColor: this.bg,
|
||||||
|
borderRadius:this.borderRadius || "0",
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column'
|
flexDirection: 'column'
|
||||||
@ -395,8 +422,7 @@
|
|||||||
}
|
}
|
||||||
// TODO 兼容 type 属性 ,后续会废弃
|
// TODO 兼容 type 属性 ,后续会废弃
|
||||||
if (type) return
|
if (type) return
|
||||||
this.showPopup = true
|
this.showPoptrans()
|
||||||
this.showTrans = true
|
|
||||||
},
|
},
|
||||||
right(type) {
|
right(type) {
|
||||||
this.popupstyle = 'right'
|
this.popupstyle = 'right'
|
||||||
@ -407,6 +433,7 @@
|
|||||||
right: 0,
|
right: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
backgroundColor: this.bg,
|
backgroundColor: this.bg,
|
||||||
|
borderRadius:this.borderRadius || "0",
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column'
|
flexDirection: 'column'
|
||||||
@ -414,8 +441,13 @@
|
|||||||
}
|
}
|
||||||
// TODO 兼容 type 属性 ,后续会废弃
|
// TODO 兼容 type 属性 ,后续会废弃
|
||||||
if (type) return
|
if (type) return
|
||||||
this.showPopup = true
|
this.showPoptrans()
|
||||||
this.showTrans = true
|
},
|
||||||
|
showPoptrans(){
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.showPopup = true
|
||||||
|
this.showTrans = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "uni-popup",
|
"id": "uni-popup",
|
||||||
"displayName": "uni-popup 弹出层",
|
"displayName": "uni-popup 弹出层",
|
||||||
"version": "1.8.1",
|
"version": "1.9.2",
|
||||||
"description": " Popup 组件,提供常用的弹层",
|
"description": " Popup 组件,提供常用的弹层",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-ui",
|
"uni-ui",
|
||||||
@ -46,7 +46,8 @@
|
|||||||
"platforms": {
|
"platforms": {
|
||||||
"cloud": {
|
"cloud": {
|
||||||
"tcb": "y",
|
"tcb": "y",
|
||||||
"aliyun": "y"
|
"aliyun": "y",
|
||||||
|
"alipay": "n"
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"App": {
|
"App": {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const TokenKey = 'App-Token'
|
const TokenKey = 'App-Token'
|
||||||
|
const UserInfo = 'customerInfo'
|
||||||
const TenantIdKey = 'TENANT_ID'
|
const TenantIdKey = 'TENANT_ID'
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return uni.getStorageSync(TokenKey)
|
return uni.getStorageSync(TokenKey)
|
||||||
@ -29,3 +30,11 @@ export function hasRole(roleCode) {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getUserInfo() {
|
||||||
|
return uni.getStorageSync(UserInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setUserInfo(userInfo) {
|
||||||
|
return uni.setStorageSync(UserInfo, userInfo)
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import {setUserInfo,getUserInfo} from '@/utils/auth.js'
|
import {setUserInfo} from '@/utils/auth.js'
|
||||||
/**
|
/**
|
||||||
* 显示消息提示框
|
* 显示消息提示框
|
||||||
* @param content 提示的标题
|
* @param content 提示的标题
|
||||||
|
@ -13,8 +13,6 @@ const request = config => {
|
|||||||
config.header = config.header || {}
|
config.header = config.header || {}
|
||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.header['Authorization'] = 'Bearer ' + getToken()
|
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||||
}else{
|
|
||||||
config.header['Authorization'] = 'Bearer ' +'6e753c0a509e4d01bde4f315f6a39ceb'
|
|
||||||
}
|
}
|
||||||
// get请求映射params参数
|
// get请求映射params参数
|
||||||
if (config.params) {
|
if (config.params) {
|
||||||
@ -45,8 +43,8 @@ console.log(config.header,424242);
|
|||||||
const code = res.data.code || 200
|
const code = res.data.code || 200
|
||||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||||
if (code === 401) {
|
if (code === 401) {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
uni.reLaunch({ url: '/pages/login/login' })
|
uni.reLaunch({ url: '/pages/login/login' })
|
||||||
// store.dispatch('LogOut').then(res => {
|
// store.dispatch('LogOut').then(res => {
|
||||||
// uni.reLaunch({ url: '/pages/login/login' })
|
// uni.reLaunch({ url: '/pages/login/login' })
|
||||||
// })
|
// })
|
||||||
|
Loading…
Reference in New Issue
Block a user