首页修改
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<view :loading="loading">
|
||||
<view class="mine">
|
||||
<view class="mine-header" @click="jump('basic')">
|
||||
<image mode="aspectFill" class="mine-header-head" :src="userInfo.avatar" v-if="userInfo.avatar" />
|
||||
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" v-else />
|
||||
<image mode="aspectFill" class="mine-header-head" :src="userInfo.avatar" v-if="userInfo.avatar"/>
|
||||
<image mode="aspectFill" class="mine-header-head" src="/static/head.png" v-else/>
|
||||
<view class="mine-header-name hide-txt">
|
||||
<view>{{ userInfo.nickname }}</view>
|
||||
<view></view>
|
||||
<view class="tag">{{ roleName }} </view>
|
||||
<view class="tag">{{ roleName }}</view>
|
||||
</view>
|
||||
<image
|
||||
src="/static/erweima.png"
|
||||
@@ -17,7 +17,7 @@
|
||||
<uni-icons type="forward" color="#aaa" size="16"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" v-if="userInfo.authorities === 'tourist'" @click="jump('upgrade')">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png"/>
|
||||
<view class="mine-nav-label">角色升级</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
@@ -37,12 +37,12 @@
|
||||
@click="jump('scan')"
|
||||
v-if="userInfo.authorities === 'app_vip_user' || userInfo.authorities === 'engineering_user'"
|
||||
>
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/scan.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/scan.png"/>
|
||||
<view class="mine-nav-label">扫一扫</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('engineering')">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png"/>
|
||||
<view class="mine-nav-label">工程列表</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
@@ -51,12 +51,12 @@
|
||||
@click="jump('engineering/setting')"
|
||||
v-if="userInfo.authorities === 'engineering_user'"
|
||||
>
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/like.png"/>
|
||||
<view class="mine-nav-label">关注工程配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('project')">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png"/>
|
||||
<view class="mine-nav-label">项目列表</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
@@ -70,12 +70,12 @@
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view> -->
|
||||
<view class="mine-nav" @click="jump('setupMessage')">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/message4.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/message4.png"/>
|
||||
<view class="mine-nav-label">消息配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('setup')" style="border-bottom: none">
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/setup.png"/>
|
||||
<view class="mine-nav-label">设置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
@@ -93,8 +93,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { roleUpdate, autoLogin } from '@/common/api/user'
|
||||
import { transferDevice } from '@/common/api/device'
|
||||
import {roleUpdate, autoLogin} from '@/common/api/user'
|
||||
import {transferDevice,shareDevice} from '@/common/api/device'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -130,7 +130,8 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
init() {
|
||||
},
|
||||
upgrade(code) {
|
||||
console.log(code)
|
||||
roleUpdate({
|
||||
@@ -162,7 +163,11 @@ export default {
|
||||
case 'transferDevice':
|
||||
this.transferDevice(content.id.split(','))
|
||||
break
|
||||
case 'shareDevice':
|
||||
this.shareDevice(content.id.split(','))
|
||||
break
|
||||
default:
|
||||
this.$util.toast('无效二维码')
|
||||
break
|
||||
}
|
||||
},
|
||||
@@ -210,7 +215,12 @@ export default {
|
||||
},
|
||||
transferDevice(id) {
|
||||
transferDevice(id).then((res) => {
|
||||
uni.navigateTo({ url: '/pages/mine/result?type=transferDevice&id=' + id })
|
||||
uni.navigateTo({url: '/pages/mine/result?type=transferDevice&id=' + id})
|
||||
})
|
||||
},
|
||||
shareDevice(id) {
|
||||
shareDevice(id).then((res) => {
|
||||
uni.navigateTo({url: '/pages/mine/result?type=shareDevice&id=' + id})
|
||||
})
|
||||
},
|
||||
},
|
||||
@@ -252,6 +262,7 @@ export default {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #aaa;
|
||||
|
||||
.engineering-button {
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
Reference in New Issue
Block a user