123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <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>
- </template>
- <script>
- var domModule = weex.requireModule('dom');
-
- domModule.addRule('fontFace', {
- 'fontFamily': "iconfont",
- 'src': "url('/static/iconfont.ttf')"
- })
- export default {
- data(){
- return {
-
- }
- },
- mounted() {
-
- },
- methods:{
- close() {
- const fssubNVue = uni.getSubNVueById('BpopLog2')
- console.log(fssubNVue)
- fssubNVue.hide()
- },
- goUrl(){
- this.close()
- uni.navigateTo({
- url:'/pages/native/robot'
- })
- },
- creatTask(){
- this.close()
- uni.navigateTo({
- url:'/pages/webview/popup'
- })
- return
- uni.$emit('xBpopLog2', {
- content: 'comfirm'
- });
- },
- scan() {
- this.close()
- uni.scanCode({
- success: (res) => {
- console.log('条码类型:' + res.scanType);
- console.log('条码内容:' + res.result);
- },
- fail: (e) => {
- console.log(e)
- }
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .iconTop{
- font-family: iconfont;
- color: #484848;
- text-align: right;
- font-size: 20px;
- margin-bottom: -22rpx;
- margin-right: 18rpx;
- }
- .icon {
- font-family: iconfont;
- font-size: 22px;
- color: #fff;
- opacity: 0.7;
- }
- .wrapper{
- position: relative;
- .list{
- background: #484848;
- padding: 10rpx 0;
- border-radius: 20rpx;
- .li{
- padding: 15rpx 20rpx;
- margin-top: 14rpx;
- flex-direction: row;
- align-items: center;
- .t1{
- color: #fff;
- font-size: 28rpx;
- margin-left: 20rpx;
- border-bottom:1px solid #4D4C4C;
- }
- }
- }
- }
- </style>
|