onGetAuthorize(res) { //button的事件
my.getPhoneNumber({
success: (res) => {
let STUDENT_PHONE = JSON.parse(res.response);
let ponend = {
STUDENT_PHONE:STUDENT_PHONE,
OPENID: "2088922168536949",
};
console.log('!!!!!!!!!!!!!!' + res.response);
console.log('参数' + JSON.stringify(ponend));
my.request({
// url: `http://208tk78580.51mypc.cn/enterprise/API_1099_getDeptId?STUDENT_PHONE=${ponend.STUDENT_PHON}&OPENID=${ponend.OPENID}`,
url: 'http://208tk78580.51mypc.cn/enterprise/API_1099_getDeptId',
method: 'POST',
headers: {
"content-type": "application/x-www-form-urlencoded;charset=utf-8"
},
data:ponend,
success: function (res) {
console.log('*OKOKOKOK*' + JSON.stringify(res));
},
fail: (res) => {
console.log('%%%%%%%%%' + JSON.stringify(res));
},
});
console.log('phone' + JSON.stringify(STUDENT_PHONE));
},
fail: (res) => {
console.log(res);
console.log('getPhoneNumber_fail');
},
});
console.log('-------' + res);
},
html代码
<button a:if="{{canIUseAuthButton}}"
open-type="getAuthorize"
onGetAuthorize="onGetAuthorize"
onError="onAuthError"
scope="phoneNumber">
Button
</button>
1241

被折叠的 条评论
为什么被折叠?



