Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 be778b81
authored
Oct 21, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix;授权名称,local本地数据合并
1 parent
9097b7ba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
23 deletions
pages/checkProduct/checkProduct.js
pages/checkProduct/checkProduct.scss
pages/checkProduct/checkProduct.wxml
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.wxml
pages/tab/index/constant/data.js
pages/tab/index/index.js
pages/checkProduct/checkProduct.js
View file @
be778b8
This diff is collapsed.
Click to expand it.
pages/checkProduct/checkProduct.scss
View file @
be778b8
...
...
@@ -68,3 +68,14 @@
}
}
}
/* 用户授权 */
.user-profile
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
2
;
background-color
:
transparent
;
}
pages/checkProduct/checkProduct.wxml
View file @
be778b8
...
...
@@ -34,3 +34,5 @@
<view class="btom" bindtap="modelcloseFn">取消</view>
</view>
</view>
<!-- 授权昵称 -->
<view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view>
pages/tab/index/components/product/product.js
View file @
be778b8
...
...
@@ -166,16 +166,18 @@ Component({
},
// 获取用户信息
getUserInfo
({
detail
})
{
console
.
log
(
detail
);
//
console.log(detail);
if
(
!
detail
.
code
)
return
;
// this.setBtnLoading()
USERAPI
.
getUserProfile
(
this
.
loginToken
,
detail
)
.
then
((
result
)
=>
{
// console.log(result)
let
userInfo
=
wx
.
$storage
.
get
(
'wx_user_info'
)
// console.log('userInfo: ', userInfo);
let
{
phone
}
=
result
;
//
let {
wx
.
$storage
.
set
(
'wx_user_info'
,
result
);
//
console.log('phone: ', phone);
wx
.
$storage
.
set
(
'wx_user_info'
,
{...
userInfo
,
phone
}
);
// }
this
.
triggerEvent
(
"authorized"
,
{
phone
,
...
...
pages/tab/index/components/product/product.wxml
View file @
be778b8
...
...
@@ -17,7 +17,7 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}} <text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text>
<text class="earnings" decode="{{true}}">
{{stickyTop}}
预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
<text class="earnings" decode="{{true}}">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
...
...
pages/tab/index/constant/data.js
View file @
be778b8
...
...
@@ -14,9 +14,9 @@ var senceData = [
{
img
:
'product-img1'
,
proName
:
'数字无忧权益卡'
,
price
:
'1
5
00'
,
price
:
'100'
,
// profit: '92.4万',
profit
:
'120
万
'
,
profit
:
'120
0000
'
,
type
:
'service'
,
productType
:
'benefitCard'
,
path
:
'equity'
,
...
...
@@ -63,8 +63,8 @@ var senceData = [
{
img
:
'product-img2'
,
proName
:
'汽车太阳膜'
,
price
:
'1
5
00'
,
profit
:
'1008
万
'
,
price
:
'100'
,
profit
:
'1008
0000
'
,
type
:
'membrane'
,
productType
:
'sunMembrane'
,
path
:
'solarFilm'
,
...
...
@@ -96,8 +96,8 @@ var senceData = [
{
img
:
'product-img3'
,
proName
:
'漆面保护膜'
,
price
:
'1
20
00'
,
profit
:
'216
万
'
,
price
:
'100'
,
profit
:
'216
0000
'
,
type
:
'membrane'
,
productType
:
'protectMembrane'
,
path
:
'paintProtect'
,
...
...
@@ -110,8 +110,8 @@ var senceData = [
{
img
:
'product-img4'
,
proName
:
'改色膜'
,
price
:
'
50
00'
,
profit
:
'30
万
'
,
price
:
'
1
00'
,
profit
:
'30
0000
'
,
type
:
'membrane'
,
productType
:
'colorMembrane'
,
path
:
'changingFilm'
,
...
...
@@ -136,8 +136,8 @@ var senceData = [
{
img
:
'product-img5'
,
proName
:
'数字化美容'
,
price
:
'
3
00'
,
profit
:
'
36万
'
,
price
:
'
1
00'
,
profit
:
'
72000
'
,
type
:
'beauty'
,
productType
:
'digitBeauty'
,
path
:
'carBeauty'
,
...
...
@@ -150,8 +150,8 @@ var senceData = [
{
img
:
'product-img6'
,
proName
:
'座椅通风'
,
price
:
'1
5
00'
,
profit
:
'
1008万
'
,
price
:
'1
00
00'
,
profit
:
'
232200
'
,
type
:
'light'
,
productType
:
'chair'
,
path
:
'seatVentilate'
,
...
...
@@ -164,8 +164,8 @@ var senceData = [
{
img
:
'product-img7'
,
proName
:
'AR导航'
,
price
:
'1
68
0'
,
profit
:
'22
.68万
'
,
price
:
'1
000
0'
,
profit
:
'22
6800
'
,
type
:
'light'
,
productType
:
'ar'
,
path
:
'arNavigation'
,
...
...
@@ -178,8 +178,8 @@ var senceData = [
{
img
:
'product-img8'
,
proName
:
'氛围灯'
,
price
:
'
268
0'
,
profit
:
'36
.18万
'
,
price
:
'
1000
0'
,
profit
:
'36
1800
'
,
type
:
'light'
,
productType
:
'lamp'
,
path
:
'ambientLighting'
,
...
...
@@ -192,8 +192,8 @@ var senceData = [
{
img
:
'product-img9'
,
proName
:
'360全景导航'
,
price
:
'
288
0'
,
profit
:
'38
.88万
'
,
price
:
'
1000
0'
,
profit
:
'38
8800
'
,
type
:
'service'
,
productType
:
'navigation'
,
path
:
'navigationArround'
,
...
...
pages/tab/index/index.js
View file @
be778b8
...
...
@@ -350,7 +350,7 @@ Page({
}
console
.
log
(
profit
.
length
);
console
.
log
(
productType
,
sales
,
flow
,
profit
);
if
(
profit
.
length
>
8
)
{
if
(
profit
.
length
>
9
)
{
return
(
profit
/
10000
).
toFixed
(
0
)
+
"万"
;
}
else
{
return
profit
;
...
...
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