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 27496ca4
authored
Sep 09, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加骨架屏
1 parent
f752a9df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
214 additions
and
10 deletions
app.js
pages/tab/index/index.js
pages/tab/index/index.skeleton.wxml
pages/tab/index/index.skeleton.wxss
pages/tab/index/index.wxml
pages/tab/index/index.wxss
app.js
View file @
27496ca
...
...
@@ -66,7 +66,7 @@ App({
console
.
log
(
'scene'
,
wx
.
$trackData
.
scene
)
wx
.
$trackData
.
merchant
=
res
.
merchantId
wx
.
$trackData
.
cardId
=
res
.
cardId
const
systemInfo
=
wx
.
getStorageSync
(
'srcm_shopmall_system_info'
)
const
systemInfo
=
JSON
.
parse
(
wx
.
getStorageSync
(
'srcm_shopmall_system_info'
)
)
wx
.
$trackData
.
type
=
systemInfo
.
environment
?
2
:
1
wx
.
$Track
.
sendTrack
(
trackData
.
COMPANY
)
})
...
...
pages/tab/index/index.js
View file @
27496ca
...
...
@@ -49,7 +49,14 @@ Page({
hasPhoneNumber
:
false
,
curTab
:
[
trackData
.
COMPANY
,
trackData
.
CUBE
],
// 员工名片信息
cardInfo
:
{},
cardInfo
:
null
,
defaultInfo
:
{
staffName
:
'虚拟员工'
,
operation
:
'虚拟职位'
,
staffPhone
:
'xxxxxxxx'
,
image
:
'https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg'
,
qrCode
:
'https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg'
}
},
introduce
(
e
)
{
const
curTabIndex
=
e
.
currentTarget
.
dataset
.
index
;
...
...
@@ -306,11 +313,18 @@ Page({
const
sessionId
=
util
.
getSessionId
();
let
params
=
{};
params
.
cardId
=
wx
.
$trackData
.
cardId
entmicroApi
.
getCardDetail
(
params
).
then
(({
data
})
=>
{
entmicroApi
.
getCardDetail
(
params
).
then
(({
data
,
code
,
message
})
=>
{
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
,
icon
:
'none'
,
duration
:
2000
})
}
this
.
setData
({
cardInfo
:
data
cardInfo
:
data
||
this
.
data
.
defaultInfo
})
this
.
setShareInfo
(
data
);
this
.
setShareInfo
(
this
.
data
.
cardInfo
);
});
},
});
pages/tab/index/index.skeleton.wxml
0 → 100644
View file @
27496ca
<!--
此文件为开发者工具生成,生成时间: 2022/9/9下午3:55:54
使用方法:
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxml 引入模板
```
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{loading}}" />
```
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
-->
<template name="skeleton">
<view class="sk-container">
<view class="main-box">
<view is="components/UserInfo/UserInfo">
<view class="UserInfo--user-wrapper">
<view class="UserInfo--user-box">
<view class="UserInfo--user-info" data-item="[object Object]">
<view class="UserInfo--user-company">
<image class="UserInfo--company-logo sk-image"></image>
</view>
<view class="UserInfo--user-name">
<view class="UserInfo--name sk-transparent sk-text-16-6667-707 sk-text">李崇源</view>
<view class="UserInfo--position sk-transparent sk-text-14-2857-250 sk-text">啦啦啦</view>
</view>
<view class="UserInfo--user-phone">
<image webp="true" class="UserInfo--user-icon sk-image"></image>
<view class="sk-transparent sk-text-12-5000-755 sk-text">15778727124</view>
</view>
<view class="UserInfo--user-address">
<image webp="true" class="UserInfo--user-icon sk-image"></image>
<view class="UserInfo--address sk-transparent sk-text-12-5000-970 sk-text">深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层</view>
</view>
<image lazy-load="true" class="UserInfo--user-avatar sk-image"></image>
<image webp="true" class="UserInfo--add-wechat sk-image"></image>
</view>
<image webp="true" class="UserInfo--user-bg sk-image"></image>
</view>
<view class="UserInfo--btn-group">
<view class="UserInfo--phone-btn">
<image webp="true" class="UserInfo--icon-dial sk-image"></image>
<view class="UserInfo--phone-text sk-transparent sk-text-14-2857-35 sk-text" style="background-position-x: 50%;">拨打电话</view>
</view>
<button class="UserInfo--btn-plain UserInfo--btn sk-transparent sk-button sk-pseudo sk-pseudo-circle">保存名片</button>
<button class="UserInfo--btn-primary UserInfo--btn sk-transparent sk-button sk-pseudo sk-pseudo-circle" open-type="share">分享名片</button>
</view>
</view>
<view is="components/Authorize/Authorize"></view>
</view>
<view class="main-bottom">
<view class="channel-bg">
<image webp="true" class="channel-img sk-image" data-name="logo" mode="widthFix" style="height: 71.7949px;"></image>
<view class="channel-word">
<view class="channel-title sk-transparent sk-text-17-8571-311 sk-text">面向渠道</view>
<view class="channel-text sk-transparent sk-text-16-6667-334 sk-text">助力数字化转型,实现获客增值</view>
</view>
</view>
<view class="tab-list">
<view class="tab-item tab-item-active sk-image" data-index="0" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-558 sk-text" style="background-position-x: 50%;">公司介绍</view>
</view>
<view class="tab-item" data-index="1" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-567 sk-text" style="background-position-x: 50%;">方案介绍</view>
</view>
<view class="tab-item" data-index="2" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-682 sk-text" style="background-position-x: 50%;">视频直播</view>
</view>
</view>
<view class="box-wrapper">
<view class="sk-transparent sk-text-14-2857-396 sk-text" style="background-position-x: 50%;">广联数科</view>
<image class="m-t-md sk-image"></image>
</view>
</view>
</view>
</view>
</template>
\ No newline at end of file
pages/tab/index/index.skeleton.wxss
0 → 100644
View file @
27496ca
/*
此文件为开发者工具生成,生成时间: 2022/9/9下午3:55:54
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
*/
.sk-transparent {
color: transparent !important;
}
.sk-text-16-6667-707 {
background-image: linear-gradient(transparent 16.6667%, #EEEEEE 0%, #EEEEEE 83.3333%, transparent 0%) !important;
background-size: 100% 72.0000rpx;
position: relative !important;
}
.sk-text {
background-origin: content-box !important;
background-clip: content-box !important;
background-color: transparent !important;
color: transparent !important;
background-repeat: repeat-y !important;
}
.sk-text-14-2857-250 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 39.2000rpx;
position: relative !important;
}
.sk-text-12-5000-755 {
background-image: linear-gradient(transparent 12.5000%, #EEEEEE 0%, #EEEEEE 87.5000%, transparent 0%) !important;
background-size: 100% 32.0000rpx;
position: relative !important;
}
.sk-text-12-5000-970 {
background-image: linear-gradient(transparent 12.5000%, #EEEEEE 0%, #EEEEEE 87.5000%, transparent 0%) !important;
background-size: 100% 32.0000rpx;
position: relative !important;
}
.sk-text-14-2857-35 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 28.0000rpx;
position: relative !important;
}
.sk-text-17-8571-311 {
background-image: linear-gradient(transparent 17.8571%, #EEEEEE 0%, #EEEEEE 82.1429%, transparent 0%) !important;
background-size: 100% 56.0000rpx;
position: relative !important;
}
.sk-text-16-6667-334 {
background-image: linear-gradient(transparent 16.6667%, #EEEEEE 0%, #EEEEEE 83.3333%, transparent 0%) !important;
background-size: 100% 36.0000rpx;
position: relative !important;
}
.sk-text-14-2857-558 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-text-14-2857-567 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-text-14-2857-682 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-text-14-2857-396 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 44.8000rpx;
position: relative !important;
}
.sk-button {
color: #EFEFEF !important;
background: #EFEFEF !important;
border: none !important;
box-shadow: none !important;
}
.sk-image {
background: #EFEFEF !important;
}
.sk-pseudo::before, .sk-pseudo::after {
background: #EFEFEF !important;
background-image: none !important;
color: transparent !important;
border-color: transparent !important;
}
.sk-pseudo-rect::before, .sk-pseudo-rect::after {
border-radius: 0 !important;
}
.sk-pseudo-circle::before, .sk-pseudo-circle::after {
border-radius: 50% !important;
}
.sk-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: transparent;
}
pages/tab/index/index.wxml
View file @
27496ca
...
...
@@ -2,11 +2,10 @@
<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/equity/equity" />
<import src="../../template/clue/clue" /> -->
<view class="main-box">
<user-info cardInfo="{{cardInfo}}"></user-info>
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{!cardInfo}}" />
<view class="main-box" wx:if="{{cardInfo}}" >
<user-info data-skeleton-hide="cardInfo" cardInfo="{{cardInfo}}"></user-info>
<view class="main-bottom">
<!-- 面向渠道 -->
<template is="channel"></template>
...
...
pages/tab/index/index.wxss
View file @
27496ca
...
...
@@ -5,6 +5,7 @@
@import '../../template/cube/cube.wxss';
@import '../../template/equity/equity.wxss';
@import '../../template/clue/clue.wxss';
@import "./index.skeleton.wxss";
page {
background-color: #F5F5F7;
...
...
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