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 67472b4e
authored
Sep 06, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
62e87100
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
23 deletions
components/UserInfo/UserInfo.js
components/UserInfo/UserInfo.wxml
project.config.json
project.private.config.json
components/UserInfo/UserInfo.js
View file @
67472b4
// components/UserInfo/UserInfo.js
// components/UserInfo/UserInfo.js
import
{
componentsMixin
}
from
'../../mixins/index'
import
{
componentsMixin
}
from
'../../mixins/index'
Component
({
Component
({
behaviors
:[
componentsMixin
],
behaviors
:
[
componentsMixin
],
/**
/**
* 组件的属性列表
* 组件的属性列表
*/
*/
properties
:
{
properties
:
{},
},
/**
/**
* 组件的初始数据
* 组件的初始数据
*/
*/
...
@@ -27,6 +28,10 @@ Component({
...
@@ -27,6 +28,10 @@ Component({
console
.
log
(
this
.
data
.
showWechant
)
console
.
log
(
this
.
data
.
showWechant
)
},
},
addPhone
()
{
addPhone
()
{
let
_this
=
this
,
{
clickCount
}
=
this
.
data
wx
.
addPhoneContact
({
wx
.
addPhoneContact
({
firstName
:
'石文'
,
firstName
:
'石文'
,
mobilePhoneNumber
:
'13274150220'
,
mobilePhoneNumber
:
'13274150220'
,
...
@@ -35,13 +40,17 @@ Component({
...
@@ -35,13 +40,17 @@ Component({
workAddressCountry
:
'中国'
,
workAddressCountry
:
'中国'
,
workAddressState
:
'广东省'
,
workAddressState
:
'广东省'
,
workAddressCity
:
'深圳市'
,
workAddressCity
:
'深圳市'
,
workAddressStreet
:
'留仙大道3370号'
workAddressStreet
:
'留仙大道3370号'
,
})
fail
({
},
errMsg
/**打开授权设置 */
})
{
authAddress
()
{
if
(
clickCount
)
_this
.
setData
({
this
.
setData
({
showAuth
:
errMsg
==
'addPhoneContact:fail auth deny'
showAuth
:
true
})
else
_this
.
setData
({
clickCount
:
1
})
}
})
})
},
},
/**授权位置成功 */
/**授权位置成功 */
...
...
components/UserInfo/UserInfo.wxml
View file @
67472b4
...
@@ -34,14 +34,9 @@
...
@@ -34,14 +34,9 @@
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png"></image>
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png"></image>
<view class="phone-text">拨打电话</view>
<view class="phone-text">拨打电话</view>
</view>
</view>
<block wx:if="{{unauthorized}}">
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button class="btn-plain btn" bindtap="authAddress">保存名片</button>
</block>
<block wx:else>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
</block>
<button class="btn-primary btn" open-type="share">分享名片</button>
<button class="btn-primary btn" open-type="share">分享名片</button>
</view>
</view>
</view>
</view>
<authorize
scopeType="addPhoneContact" bindsuccess="authSuccess" bindfail="authFail"
show="{{showAuth}}" isShowCheck="{{false}}">
<authorize
buttonType="openSetting"
show="{{showAuth}}" isShowCheck="{{false}}">
</authorize>
</authorize>
\ No newline at end of file
\ No newline at end of file
project.config.json
View file @
67472b4
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
"enhance"
:
true
,
"enhance"
:
true
,
"postcss"
:
true
,
"postcss"
:
true
,
"preloadBackgroundData"
:
false
,
"preloadBackgroundData"
:
false
,
"minified"
:
fals
e
,
"minified"
:
tru
e
,
"newFeature"
:
false
,
"newFeature"
:
false
,
"coverView"
:
true
,
"coverView"
:
true
,
"nodeModules"
:
false
,
"nodeModules"
:
false
,
...
...
project.private.config.json
View file @
67472b4
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"projectname"
:
"ai-card"
,
"projectname"
:
"ai-card"
,
"setting"
:
{
"setting"
:
{
"compileHotReLoad"
:
true
,
"compileHotReLoad"
:
false
,
"urlCheck"
:
false
"urlCheck"
:
false
,
"preloadBackgroundData"
:
false
},
},
"condition"
:
{
"condition"
:
{
"miniprogram"
:
{
"miniprogram"
:
{
...
@@ -47,5 +48,6 @@
...
@@ -47,5 +48,6 @@
}
}
]
]
}
}
}
},
"libVersion"
:
"2.25.4"
}
}
\ 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