Commit 4d1884bb by 胡悦

Merge branch 'kuangyq_v2.10.0' of http://192.168.3.233:8090/saas/mini-program/ai…

…-card into kuangyq_v2.10.0
2 parents 7946f2a8 9d449fec
......@@ -28,6 +28,7 @@ Component({
// 获取手机号
getPhoneNumber ({detail}) {
console.log(detail)
this.triggerEvent("getPhoneNumber")
getApp().login(true).then(({
data
}) => {
......
......@@ -45,7 +45,11 @@ Page({
customerType: 0,
// 是否授权昵称
hasUserInfo: false,
curTab: [trackData.COMPANY, trackData.CUBE]
// 是否授权手机号
hasPhoneNumber: false,
curTab: [trackData.COMPANY, trackData.CUBE],
// 员工名片信息
cardInfo: []
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
......@@ -69,20 +73,34 @@ Page({
goConsult() {
console.log("跳转到咨询页面");
},
// 设置手机号
getPhoneNumber() {
console.log(11111111);
this.setData({
hasPhoneNumber: true
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(this.data.hasUserInfo);
// 获取员工名片信息
const sessionId = util.getSessionId();
let params = {};
params.cardId = 21;
params.sessionId = sessionId;
console.log(params, "+++");
// entmicroApi.getCardDetail(params).then((res) => {
// console.log(res);
// });
getApp().login().then(({data}) => {
console.log(data);
if (data) {
this.setData({
hasUserInfo: true
})
}
if (data.phone) {
this.setData({
hasPhoneNumber: true
})
} else {
this.getCardDetail()
}
})
},
/**
......@@ -279,5 +297,20 @@ Page({
})
}
})
}
},
// 获取员工名片信息
getCardDetail() {
const sessionId = util.getSessionId();
let params = {};
params.cardId = 21;
params.sessionId = sessionId;
console.log(params, "+++");
entmicroApi.getCardDetail(params).then((res) => {
console.log(res);
if (res.data) {
}
});
}
})
......@@ -2,11 +2,11 @@
<import src="../../template/channel/channel.wxml" />
<import src="../../template/company/company.wxml" />
<import src="../../template/menu/menu.wxml" />
<import src="../../template/cube/cube" />
<!-- <import src="../../template/cube/cube" />
<import src="../../template/equity/equity" />
<import src="../../template/clue/clue" />
<import src="../../template/clue/clue" /> -->
<view class="main-box">
<user-info></user-info>
<user-info data="{{cardInfo}}"></user-info>
<view class="main-bottom">
<!-- 面向渠道 -->
<template is="channel"></template>
......@@ -28,8 +28,8 @@
</block>
<!-- 方案介绍 -->
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
<block wx:if="{{curIntroduceIndex === 0}}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType, hasPhoneNumber}}"></template>
<!-- <block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube" data="{{IMGURL}}"></template>
</block>
<block wx:elif="{{curIntroduceIndex === 1}}">
......@@ -37,7 +37,7 @@
</block>
<block wx:elif="{{curIntroduceIndex == 2}}">
<template is="clue"></template>
</block>
</block> -->
</block>
</view>
......
......@@ -3,5 +3,5 @@
<view>企微魔方</view>
<image class="m-t-md" src="https://b.zol-img.com.cn/sjbizhi/images/11/320x510/1592967802496.jpg"></image>
</view>
<phone-number></phone-number>
<phone-number bind:getPhoneNumber="getPhoneNumber" wx:if="{{!hasPhoneNumber}}"></phone-number>
</template>
\ No newline at end of file
<import src="../cube/cube" />
<import src="../equity/equity" />
<import src="../clue/clue" />
<template name="menu">
<view class="menu-list">
<block wx:for="{{menuList}}" wx:key="index">
......@@ -6,4 +9,14 @@
</view>
</block>
</view>
<view>
<block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube" data="{{IMGURL, hasPhoneNumber}}"></template>
</block>
<block wx:if="{{curIntroduceIndex === 1}}">
<template is="equity" data="{{hasPhoneNumber}}"></template>
</block>
<block wx:elif="{{curIntroduceIndex == 2}}">
<template is="clue" data="{{hasPhoneNumber}}"></template>
</block></view>
</template>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!