Commit 11718ce2 by 匡雅琴

获取手机号

1 parent 910a011e
......@@ -6,7 +6,7 @@ const target = ["ip", "dev", "uat", "prod"];
2测试
3生产
*/
const index = 1;
const index = 2;
const secretKey = {
ip: {},
dev: {
......
......@@ -28,6 +28,7 @@ Component({
// 获取手机号
getPhoneNumber ({detail}) {
console.log(detail)
this.triggerEvent("getPhoneNumber")
getApp().login(true).then(({
data
}) => {
......
......@@ -44,6 +44,8 @@ Page({
customerType: 0,
// 是否授权昵称
hasUserInfo: false,
// 是否授权手机号
hasPhoneNumber: false
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
......@@ -68,6 +70,14 @@ Page({
goConsult() {
console.log("跳转到咨询页面");
},
// 设置手机号
getPhoneNumber() {
console.log(11111111);
this.setData({
hasPhoneNumber: true
})
},
/**
* 生命周期函数--监听页面加载
*/
......
......@@ -2,9 +2,9 @@
<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>
<view class="main-bottom">
......@@ -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!