123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <view @click="close" class="mask">
- <view class="wrapper">
- <text class="iconTop"></text>
- <view class="list">
- <view class="li" @click="scan">
- <text class="icon"></text>
- <text class="t1">扫一扫</text>
- </view>
- <view class="li" @click="creatTask">
- <text class="icon"></text>
- <text class="t1">创建任务</text>
- </view>
- <view class="li" @click="goUrl">
- <text class="icon"></text>
- <text class="t1">关注机器人</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var domModule = weex.requireModule('dom');
- domModule.addRule('fontFace', {
- 'fontFamily': "iconfont",
- 'src': "url('/static/iconfont.ttf')"
- })
- export default {
- data(){
- return {
- }
- },
- mounted() {
- },
- methods:{
- close() {
- uni.navigateBack()
- },
- goUrl(){
- this.close()
- uni.navigateTo({
- url:'/pages/native/robot'
- })
- },
- creatTask(){
- this.close()
- uni.navigateTo({
- url:'/pages/webview/popupTask',
- })
- },
- scan() {
- this.close()
- uni.scanCode({
- success: (res) => {
- console.log('条码类型:' + res.scanType);
- console.log('条码内容:' + res.result);
- },
- fail: (e) => {
- console.log(e)
- }
- });
- },
- }
- }
- </script>
- <style>
- page {
- background: transparent;
- }
- </style>
- <style scoped lang="scss">
- .mask {
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center;
- background-color: rgba(0, 0, 0, 0.4);
- }
- .iconTop{
- font-family: iconfont;
- color: #484848;
- text-align: right;
- display: flex;
- font-size: 20px;
- margin-bottom: -22rpx;
- margin-left: 180rpx;
- }
- .icon {
- font-family: iconfont;
- font-size: 22px;
- color: #fff;
- opacity: 0.7;
- }
- .wrapper{
- position: absolute;
- top: 130rpx;
- right: 20rpx;
- .list{
- background: #484848;
- padding: 10rpx 0;
- border-radius: 20rpx;
- .li{
- padding: 15rpx 20rpx;
- margin-top: 14rpx;
- display: flex;
- flex-direction: row;
- align-items: center;
- .t1{
- color: #fff;
- font-size: 28rpx;
- margin-left: 20rpx;
- border-bottom:1px solid #4D4C4C;
- }
- }
- }
- }
- </style>
|