Commit 626c3149 authored by spc's avatar spc

Merge branch 'master' into dev

parents 708dd62a c60e5b6f
......@@ -107,6 +107,26 @@
},
"channelTabListMianTitle": "有声频道",
"swiperList": [
{
"img": "homepage/homeSwiper/V1/5.jpg",
"url": "homepage/homeSwiper/V1/5.jpg",
"type": 1,
"link":{
"type": 1,
"url": "/pages/syWebview/syWebview?p=xmh09",
"extra": {}
}
},
{
"img": "homepage/homeSwiper/V1/4.jpg",
"url": "homepage/homeSwiper/V1/4.jpg",
"type": 1,
"link":{
"type": 3,
"url": "https://ugc.feihe.com/planstarH5/#/consumerAct?essayActivityCode=27416245129183233&channelId=25",
"extra": {}
}
},
{
"videoUrl": "homepage/homeSwiper/V1/2.m4v",
"link": {},
......@@ -609,4 +629,4 @@
"etConUrl3": "homepage/et_con3.png",
"etConUrl1": "homepage/et_con11.png"
}
}
\ No newline at end of file
}
This diff is collapsed.
......@@ -434,11 +434,16 @@
"消化",
"脑发育"
],
"activeInfo": [
],
"activeInfo": [{
"img": "https://course.feihe.com/momclub-picture/my/activeImg2.jpg",
"url": "/pages/syWebview/syWebview?p=xmh09",
"type": 1,
"extra": {
}
}],
"channelOptions": [
"电商(京东/天猫)",
"母婴店"
]
}
}
\ No newline at end of file
}
......@@ -52,7 +52,9 @@ const globalStore = useGlobalStore()
// 登录获取 cuk
const wxAutoLogin = async () => {
await userStore.wxAutoLogin()
await new Promise(resolve => {
userStore.syWxAutoLogin(resolve)
})
}
// 接收webview消息
......
......@@ -27,7 +27,7 @@ export const useUserStore = defineStore("userInfo", {
babyInfo: null,
memberInfo: null,
babyNickCache: [],
cepingjieguoInfo:null,
cepingjieguoInfo: null,
};
},
actions: {
......@@ -71,7 +71,7 @@ export const useUserStore = defineStore("userInfo", {
* @param {Object} data : {encryptedData, iv, code}
* @returns
*/
async phoneCallback(data, onOpenRegisterFn = () => {}) {
async phoneCallback(data, onOpenRegisterFn = () => { }) {
uni.login({
provider: "weixin",
success: async (res) => {
......@@ -247,7 +247,7 @@ export const useUserStore = defineStore("userInfo", {
console.log("autoLoginByCode", data);
// 如果登录成功,获取用户信息和宝宝信息,更新到state中,方便全局使用
if (data && data.cuk) {
globalStore.setCuk(data.cuk,data.openId,data.unionId);
globalStore.setCuk(data.cuk, data.openId, data.unionId);
await this.loadUserInfo();
await this.loadBabyInfo();
......@@ -258,13 +258,42 @@ export const useUserStore = defineStore("userInfo", {
/**
* 用户自动登录
*/
async wxAutoLogin() {
async wxAutoLogin(cb = null) {
uni.login({
provider: "weixin",
success: async (res) => {
console.log("wxAutoLogin", res);
if (res.errMsg === "login:ok") {
await this.autoLoginByCode(res.code);
cb && cb();
} else {
uni.showToast({
title: res.errMsg,
icon: "error",
});
}
md.sensors.init();
},
});
},
/**
*
* @param {sy使用}
* @returns
*/
async syWxAutoLogin(cb = null) {
uni.login({
provider: "weixin",
success: async (res) => {
if (res.errMsg === "login:ok") {
const { data } = await autoLoginByCode(res.code);
// 如果登录成功,获取用户信息和宝宝信息,更新到state中,方便全局使用
if (data && data.cuk) {
globalStore.setCuk(data.cuk, data.openId, data.unionId);
cb && cb();
}
} else {
uni.showToast({
title: res.errMsg,
......
......@@ -58,7 +58,7 @@
<swiper-item v-for="(item, index) in toolList.tools" :key="index"
:class="['swiperItem', { 'active': currentIndex === index }]">
<view class="tool">
<button v-if="homeStore && !homeStore.isLogin" open-type="getPhoneNumber"
<button v-if="homeStore && !homeStore.isLogin && index>0" open-type="getPhoneNumber"
@getphonenumber="onGetPhoneNumber" class="sq_btn"></button>
<image class="tool_bg" :src="$baseUrl + item.icon" @tap="handleToolClick(item)">
</image>
......@@ -212,7 +212,7 @@
更多星妈会权威专家服务团 <view class="desc1"> 点击查看 > </view>
</view> -->
</view>
<view class="channelbox" id="thirdScreen">
<view class="channelbox" id="thirdScreen" v-if="false">
<text class="maintitle">{{ channelTabListMianTitle }}</text>
<view class="subtitle_box">
<text class="subtitle">用声音传递爱与智慧,守护宝贝成长的每一步</text>
......@@ -547,6 +547,7 @@
this.duration = e.target.value
},
jumpBannerHandler(item, index) {
console.log("item====", item)
md.sensorLogTake({
xcxClick: '首页-首屏页面点击',
pageName: '首页-首屏',
......
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