|
@@ -8,7 +8,7 @@
|
|
|
<view class="company">{{ userInfo.company }}</view>
|
|
<view class="company">{{ userInfo.company }}</view>
|
|
|
<image class="arrow" src="../../static/icon_arrow.png"></image>
|
|
<image class="arrow" src="../../static/icon_arrow.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
- <button v-else class="btn" @click.stop="handleOpenLogin">登录</button>
|
|
|
|
|
|
|
+ <button type='primary' class="btn" v-show="!isAuth" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立即登录</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="menu-panel">
|
|
<view class="menu-panel">
|
|
|
<view class="item" v-for="(item, index) in menuList" :key="index" @click="handleMenu(item.value)">
|
|
<view class="item" v-for="(item, index) in menuList" :key="index" @click="handleMenu(item.value)">
|
|
@@ -42,6 +42,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
userInfo: '',
|
|
userInfo: '',
|
|
|
|
|
+ isAuth : false,
|
|
|
menuList: [
|
|
menuList: [
|
|
|
{
|
|
{
|
|
|
label: '我的订单',
|
|
label: '我的订单',
|
|
@@ -146,8 +147,16 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {},
|
|
onLoad() {},
|
|
|
- onShow() {},
|
|
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ this.isAuth = getApp().globalData.globalAuth;
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getPhoneNumber(e){
|
|
|
|
|
+ let res = getApp().getPhoneNumber(e);
|
|
|
|
|
+ if (res){
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
handleOpenLogin() {
|
|
handleOpenLogin() {
|
|
|
// this.userInfo = {
|
|
// this.userInfo = {
|
|
|
// name: 'Caocao',
|
|
// name: 'Caocao',
|