|
@ -16,16 +16,44 @@ function toLogin(){ |
|
|
routeTo('/subpackage/authorize/pages/index'); |
|
|
routeTo('/subpackage/authorize/pages/index'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleError(e) { |
|
|
|
|
|
console.warn(e) |
|
|
|
|
|
console.log(`${e.detail.errNo}: ${e.detail.errMsg}`); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function login() { |
|
|
|
|
|
tt.login({ |
|
|
|
|
|
success() { |
|
|
|
|
|
tt.showToast({ |
|
|
|
|
|
title: '登录成功', |
|
|
|
|
|
icon: 'success', |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
fail() { |
|
|
|
|
|
tt.showToast({ |
|
|
|
|
|
title: '登录失败', |
|
|
|
|
|
icon: 'fail', |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<view class="member-index"> |
|
|
<view class="member-index"> |
|
|
|
|
|
<button type="default" size="default" @click="login">login</button> |
|
|
<view class="mi-header"> |
|
|
<view class="mi-header"> |
|
|
|
|
|
<open-data type="userNickName"></open-data> |
|
|
|
|
|
<open-data type="userAvatarUrl"></open-data> |
|
|
<view class="mh-user" v-if="tkStr"> |
|
|
<view class="mh-user" v-if="tkStr"> |
|
|
<image class="mh-avatar"></image> |
|
|
|
|
|
|
|
|
<!-- <image class="mh-avatar"></image> --> |
|
|
|
|
|
<open-data type="userAvatarUrl" use-empty-value @error="handleError" /> |
|
|
<view class="mh-info"> |
|
|
<view class="mh-info"> |
|
|
<view class="mi-name">抖音用户</view> |
|
|
|
|
|
|
|
|
<!-- <view class="mi-name">抖音用户</view> --> |
|
|
|
|
|
<open-data type="userNickName" default-text="empty" @error="handleError" /> |
|
|
<view class="mi-num">17688184874</view> |
|
|
<view class="mi-num">17688184874</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="mh-unlogin" v-else> |
|
|
<view class="mh-unlogin" v-else> |
|
|