Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 11718ce2
authored
Sep 08, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
获取手机号
1 parent
910a011e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
7 deletions
api/environment.js
components/PhoneNumber/PhoneNumber.js
pages/tab/index/index.js
pages/tab/index/index.wxml
pages/template/cube/cube.wxml
pages/template/menu/menu.wxml
api/environment.js
View file @
11718ce
...
@@ -6,7 +6,7 @@ const target = ["ip", "dev", "uat", "prod"];
...
@@ -6,7 +6,7 @@ const target = ["ip", "dev", "uat", "prod"];
2测试
2测试
3生产
3生产
*/
*/
const
index
=
1
;
const
index
=
2
;
const
secretKey
=
{
const
secretKey
=
{
ip
:
{},
ip
:
{},
dev
:
{
dev
:
{
...
...
components/PhoneNumber/PhoneNumber.js
View file @
11718ce
...
@@ -28,6 +28,7 @@ Component({
...
@@ -28,6 +28,7 @@ Component({
// 获取手机号
// 获取手机号
getPhoneNumber
({
detail
})
{
getPhoneNumber
({
detail
})
{
console
.
log
(
detail
)
console
.
log
(
detail
)
this
.
triggerEvent
(
"getPhoneNumber"
)
getApp
().
login
(
true
).
then
(({
getApp
().
login
(
true
).
then
(({
data
data
})
=>
{
})
=>
{
...
...
pages/tab/index/index.js
View file @
11718ce
...
@@ -44,6 +44,8 @@ Page({
...
@@ -44,6 +44,8 @@ Page({
customerType
:
0
,
customerType
:
0
,
// 是否授权昵称
// 是否授权昵称
hasUserInfo
:
false
,
hasUserInfo
:
false
,
// 是否授权手机号
hasPhoneNumber
:
false
},
},
introduce
(
e
)
{
introduce
(
e
)
{
const
curTabIndex
=
e
.
currentTarget
.
dataset
.
index
;
const
curTabIndex
=
e
.
currentTarget
.
dataset
.
index
;
...
@@ -68,6 +70,14 @@ Page({
...
@@ -68,6 +70,14 @@ Page({
goConsult
()
{
goConsult
()
{
console
.
log
(
"跳转到咨询页面"
);
console
.
log
(
"跳转到咨询页面"
);
},
},
// 设置手机号
getPhoneNumber
()
{
console
.
log
(
11111111
);
this
.
setData
({
hasPhoneNumber
:
true
})
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
...
pages/tab/index/index.wxml
View file @
11718ce
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<import src="../../template/channel/channel.wxml" />
<import src="../../template/channel/channel.wxml" />
<import src="../../template/company/company.wxml" />
<import src="../../template/company/company.wxml" />
<import src="../../template/menu/menu.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/equity/equity" />
<import src="../../template/clue/clue" />
<import src="../../template/clue/clue" />
-->
<view class="main-box">
<view class="main-box">
<user-info></user-info>
<user-info></user-info>
<view class="main-bottom">
<view class="main-bottom">
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
</block>
</block>
<!-- 方案介绍 -->
<!-- 方案介绍 -->
<block wx:if="{{curTabIndex === 1 }}">
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType
, hasPhoneNumber
}}"></template>
<block wx:if="{{curIntroduceIndex === 0}}">
<
!-- <
block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube" data="{{IMGURL}}"></template>
<template is="cube" data="{{IMGURL}}"></template>
</block>
</block>
<block wx:elif="{{curIntroduceIndex === 1}}">
<block wx:elif="{{curIntroduceIndex === 1}}">
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</block>
</block>
<block wx:elif="{{curIntroduceIndex == 2}}">
<block wx:elif="{{curIntroduceIndex == 2}}">
<template is="clue"></template>
<template is="clue"></template>
</block>
</block>
-->
</block>
</block>
</view>
</view>
...
...
pages/template/cube/cube.wxml
View file @
11718ce
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
<view>企微魔方</view>
<view>企微魔方</view>
<image class="m-t-md" src="https://b.zol-img.com.cn/sjbizhi/images/11/320x510/1592967802496.jpg"></image>
<image class="m-t-md" src="https://b.zol-img.com.cn/sjbizhi/images/11/320x510/1592967802496.jpg"></image>
</view>
</view>
<phone-number></phone-number>
<phone-number
bind:getPhoneNumber="getPhoneNumber" wx:if="{{!hasPhoneNumber}}"
></phone-number>
</template>
</template>
\ No newline at end of file
\ No newline at end of file
pages/template/menu/menu.wxml
View file @
11718ce
<import src="../cube/cube" />
<import src="../equity/equity" />
<import src="../clue/clue" />
<template name="menu">
<template name="menu">
<view class="menu-list">
<view class="menu-list">
<block wx:for="{{menuList}}" wx:key="index">
<block wx:for="{{menuList}}" wx:key="index">
...
@@ -6,4 +9,14 @@
...
@@ -6,4 +9,14 @@
</view>
</view>
</block>
</block>
</view>
</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>
</template>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment