Commit 8eb122a9 authored by 秦海涛's avatar 秦海涛

update

parent f55978bb
......@@ -14,10 +14,10 @@ module.exports = async (context) => {
let { openId, accessToken, appKey, userNick, appOwnerOpenId } = context;
let ActivitySeller = new ActivitySellerService(context);
try {
let userNickArr = userNick.split(":");
let isPrimaryAccount = userNickArr.length === 1;
let isPrimaryAccount = userNick.indexOf(':') === -1;
console.log(userNick, isPrimaryAccount, "userNick------");
if (!isPrimaryAccount) {
let userNickArr = userNick.split(":");
let sellerInfo = await ActivitySeller.getSellerInfoByUserNick(
userNickArr[0]
);
......
......@@ -58,27 +58,7 @@ class ActivityTopService {
let result = await this.activitySellerDao.find({
openId,
});
if (result[0]) {
let shopId = result[0].shopId;
let sellResult = await this.activitySellerDao.find(
{
shopId,
},
{
sort: {
createTime: 1,
},
}
);
if (sellResult[0]) {
let { accessToken } = sellResult[0];
return {
session: accessToken,
};
}
} else {
return { session: this.context.accessToken };
}
return { session: result.accessToken || this.context.accessToken };
}
//淘宝top接口获取商品列表
......
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