Commit 244711c4 by 程默

init

parent 0dcab989
<template>
<div class="domain">获取微信地址{{address}}----{{openid}}</div>
<div class="domain">获取微信地址</div>
<!-- {{address}}----{{openid}} -->
</template>
<script>
......@@ -43,7 +44,7 @@ export default {
this.init();
},
onShow() {
console.log("onshow",this.openSetting);
console.log("onshow", this.openSetting);
if (this.openSetting) {
this.init();
}
......@@ -55,6 +56,21 @@ export default {
});
let that = this;
wx.chooseAddress({
success: function(res) {
console.log(4);
that.disposeAddress(res);
},
fail: function(res) {
//用户取消
console.log(5);
// wx.navigateBack();
that.getSett();
}
});
},
getSett() {
let that = this;
wx.getSetting({
success(res) {
if (!res.authSetting["scope.address"]) {
......
......@@ -7,10 +7,10 @@
<button class="btn" lang="zh_CN" open-type="getUserInfo" @getuserinfo="getUserInfo">微信一键登录</button>
</div>
<div>{{testd}}</div>
<!-- <div>{{testd}}</div>
<div>{{test_sessionId}}</div>--sessionId
<div>{{unionId}}</div>--unionId
<div>{{test_isHaveUnion}}</div>--isHaveUnion
<div>{{test_isHaveUnion}}</div>--isHaveUnion -->
<!-- <div class="enterpriseLogin" @click="eLogin">账号登录</div> -->
</div>
<div class="toCLogin1" v-if="isShowPhone">
......@@ -93,7 +93,7 @@ export default {
login
.miniLogin({ code: res.code })
.then(res => {
wx.showToast({ title: res.data.code, icon: "none" });
// wx.showToast({ title: res.data.code, icon: "none" });
if (res.data.code == 200) {
this.testd = JSON.stringify(res.data);
this.test_isHaveUnion = res.data.data.isHaveUnion;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment