Commit 696bcb40 by 李伟康

Merge branch 'v1.0.1' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.1

2 parents e4d87c18 1c55c877
<template>
<uni-popup ref="tips" type="center" :is-mask-click="false" :animation="false">
<view class="tips-wrapper">
<view class="tips-content">
<view class="tips-title"
>{{ title }}
<view class="icon-close" @click="close">×</view>
</view>
<view class="tips-text">{{ content }}</view>
</view>
<view class="tips-footer">
<view class="tips-btn close" @click="close()">{{ cancelBtnText }}</view>
<view class="tips-btn preview" @click="confirm()">{{
confirmBtnText
}}</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: "MessageBox",
data() {
return {};
},
props: {
title: {
type: String,
default: "提示",
},
content: {
type: String,
default: "提示",
},
confirmBtnText: {
type: String,
default: "确定",
},
cancelBtnText: {
type: String,
default: "取消",
},
},
mounted() {
this.$refs.tips.open("center");
},
methods: {
close() {
this.$refs.tips.close();
this.$emit("cancel");
},
confirm() {
this.$refs.tips.close();
this.$emit("confirm");
},
},
};
</script>
<style scoped lang="scss">
.tips-wrapper {
width: 704rpx;
height: 372rpx;
background: #ffffff;
border-radius: 20rpx;
.tips-content {
padding: 48rpx;
border-bottom: 1px solid #e8e8e8;
.tips-title {
position: relative;
width: 100%;
font-weight: 500;
font-size: 32rpx;
color: #292d33;
text-align: center;
.icon-close {
position: absolute;
right: 0;
top: -24rpx;
width: 160rpx;
font-size: 50rpx;
text-align: right;
padding-right: 20rpx;
line-height: 96rpx;
}
}
}
.tips-text {
font-size: 30rpx;
color: #5a5e66;
letter-spacing: 1rpx;
text-align: center;
line-height: 40rpx;
margin-top: 48rpx;
}
.tips-footer {
display: flex;
align-items: center;
justify-content: center;
height: 100rpx;
.close {
color: #6c6c70;
}
.preview {
color: #2c66f7;
}
}
.tips-btn {
width: 50%;
text-align: center;
font-size: 32rpx;
text-align: center;
line-height: 44rpx;
}
}
</style>
...@@ -5,9 +5,11 @@ import store from "@/store"; ...@@ -5,9 +5,11 @@ import store from "@/store";
import api from "./api/index"; import api from "./api/index";
import { Storage } from "./utils/cache/index"; import { Storage } from "./utils/cache/index";
import GlsxImage from "./components/GlsxImage"; import GlsxImage from "./components/GlsxImage";
import wnCanvas from './components/Canvas/wn-canvas' import MessageBox from "./components/MessageBox/index";
Vue.component("GlsxImage", GlsxImage); Vue.component("GlsxImage", GlsxImage);
Vue.component('wnCanvas', wnCanvas) Vue.component("MessageBox", MessageBox);
import wnCanvas from "./components/Canvas/wn-canvas";
Vue.component("wnCanvas", wnCanvas);
uni.$api = api; uni.$api = api;
uni.$storage = new Storage(); uni.$storage = new Storage();
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 首页 * @Description: 首页
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 19:37:16 * @LastEditTime: 2024-04-09 14:37:11
--> -->
<template> <template>
<view class="container"> <view class="container">
...@@ -61,28 +61,13 @@ ...@@ -61,28 +61,13 @@
</view> </view>
</view> </view>
<!-- 未点击开始接待,弹窗 --> <!-- 未点击开始接待,弹窗 -->
<uni-popup <MessageBox
ref="tips" v-if="messageBoxVisible"
type="center" @cancel="cancel"
:is-mask-click="false" @confirm="preview"
:animation="false" content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
> confirmBtnText="预览"
<view class="tips-wrapper"> ></MessageBox>
<view class="tips-content">
<view class="tips-title"
>提示
<view class="icon-close" @click="close">×</view>
</view>
<view class="tips-text"
>直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」</view
>
</view>
<view class="tips-footer">
<view class="tips-btn close" @click="close()">取消</view>
<view class="tips-btn preview" @click="preview()">预览素材</view>
</view>
</view>
</uni-popup>
</view> </view>
</view> </view>
</template> </template>
...@@ -92,6 +77,7 @@ export default { ...@@ -92,6 +77,7 @@ export default {
mixins: [myClick], mixins: [myClick],
data() { data() {
return { return {
messageBoxVisible: false,
moduleList: [ moduleList: [
// { // {
// id: 1, // id: 1,
...@@ -103,7 +89,7 @@ export default { ...@@ -103,7 +89,7 @@ export default {
// }, // },
], ],
userInfo: {}, userInfo: {},
id:'' id: "",
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -123,8 +109,8 @@ export default { ...@@ -123,8 +109,8 @@ export default {
}, },
// 退出 // 退出
logout() { logout() {
uni.$storage.rm('userInfo') uni.$storage.rm("userInfo");
uni.$storage.rm('sessionId') uni.$storage.rm("sessionId");
this.stopAudio(); this.stopAudio();
uni.reLaunch({ uni.reLaunch({
url: "/pages/common/login", url: "/pages/common/login",
...@@ -136,19 +122,19 @@ export default { ...@@ -136,19 +122,19 @@ export default {
url: `../detail/detail?id=${item.id}&type=edit`, url: `../detail/detail?id=${item.id}&type=edit`,
}); });
} else { } else {
this.id = item.id this.id = item.id;
this.$refs.tips.open("center"); this.messageBoxVisible = true;
} }
}, },
close() { cancel() {
this.$refs.tips.close(); this.messageBoxVisible = false;
}, },
preview() { preview() {
let {id} = this let { id } = this;
uni.navigateTo({ uni.navigateTo({
url: `../detail/detail?type=preview&id=${id}`, url: `../detail/detail?type=preview&id=${id}`,
}); });
this.close() this.messageBoxVisible = false;
}, },
}, },
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!