Commit 70f7492f authored by Edwise's avatar Edwise 🍷

1

parent 644643d9
......@@ -9,7 +9,7 @@ cloud.init({
App({
env,
requestType: 'cloud', // yapi,cloud: 云函数
requestType: 'local', // yapi,cloud: 云函数
// requestType: 'local', // yapi,cloud: 云函数
cloudName: 'jn', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud,
......@@ -31,7 +31,7 @@ App({
*/
handleQuery(query) {
const { activityId } = query;
this.activityId = activityId || '5f8022919da671f3b6d5fb14';
this.activityId = activityId || '5f8550a3964f97be3647a635';
}
});
......@@ -49,7 +49,7 @@ Component({
let str1 = '';
if(isWin){
str = '恭喜您PK成功';
str1 = '体感温度高达'+warms+'℃,是最高温队伍'
str1 = '体感温度高达'+app.curGameWars+'℃,是最高温队伍'
}else{
str = '很遗憾PK失败'
}
......
......@@ -29,6 +29,7 @@ const checkSystem = async () => {
}
Page({
favoredStatus:false,
data: {
indexPrize: [{
id:1,
......@@ -189,18 +190,30 @@ Page({
} = userInfo;
app.nickName = nickName;
app.avatar = avatar;
const favoredStatus = await checkShopFavoredStatus(3035493001).catch(err => {
console.log('查询关注店铺状态失败', err);
});
// const favoredStatus = await checkShopFavoredStatus(3035493001).catch(err => {
// console.log('查询关注店铺状态失败', err);
// });
my.tb.checkShopFavoredStatus({
id: 702037595,
success: (res) => {
if(res.isFavor){
this.favoredStatus = true
}else{
this.favoredStatus = false;
}
}
})
// this.judgeDoHelp();
this.login(favoredStatus);
console.log("关注店铺",this.favoredStatus)
this.login();
}
},
/**
* 登录接口
*/
async login(isFollow) {
async login() {
my.showLoading();
const {
nickName,
......@@ -212,7 +225,7 @@ Page({
} = await API.login({
userNick: nickName,
avatar,
isFollow:isFollow,
isFollow:this.favoredStatus,
inviteId:app.inviteId,
inviteStep:app.step
}).catch(res => {
......
......@@ -124,7 +124,7 @@ export const checkShopFavoredStatus = async sellerId => {
}
return new Promise((resolve, reject) => {
my.tb.checkShopFavoredStatus({
id: +sellerId,
id: sellerId,
success: res => {
resolve(res.isFavor);
},
......
This diff is collapsed.
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