Commit c8cec2df authored by zhaofei's avatar zhaofei

用户取消授权地址列表后无法继续填写地址bug修复

parent 524f2bed
...@@ -6,8 +6,8 @@ cloud.init({ ...@@ -6,8 +6,8 @@ cloud.init({
}); });
App({ App({
requestType: 'yapi', // cloud: 云函数, yapi: yapi 接口, ams: ams接口, requestType: 'cloud', // cloud: 云函数, yapi: yapi 接口, ams: ams接口,
cloudName: 'CommonToC', // 主云函数项目名 cloudName: 'proyaAnswer2c', // 主云函数项目名
cloud, cloud,
tbcc, tbcc,
onLaunch(options) { onLaunch(options) {
...@@ -22,6 +22,6 @@ App({ ...@@ -22,6 +22,6 @@ App({
*/ */
handleQuery(query) { handleQuery(query) {
const { activityId } = query; const { activityId } = query;
this.activityId = activityId || 'testId'; this.activityId = activityId || '5f7069c7086e6573ceebd22f';
} }
}); });
...@@ -80,7 +80,9 @@ Page({ ...@@ -80,7 +80,9 @@ Page({
*/ */
async login() { async login() {
const { nickName, avatar } = app; const { nickName, avatar } = app;
const { success } = await API.login({ userNick: nickName, avatar }).catch(res => { const { success } = await API.login({
userNick: nickName, avatar, isFollow: true,
}).catch(res => {
commonToast(res && res.message); commonToast(res && res.message);
}) || {}; }) || {};
......
...@@ -125,10 +125,13 @@ Page({ ...@@ -125,10 +125,13 @@ Page({
const { activityId } = app; const { activityId } = app;
const { item } = e.target.dataset; const { item } = e.target.dataset;
const userAddress = await getUserAddress().catch(err => { const userAddress = await getUserAddress().catch(err => {
flag = false;
commonToast(err && err.errorMessage); commonToast(err && err.errorMessage);
}); });
my.hideLoading(); my.hideLoading();
if (!userAddress) return if (!userAddress) {
flag = false;
}
const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {}; const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
const params = { const params = {
activityId, activityId,
......
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