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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
86 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
// pages/checkProduct/checkProduct.js
// pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;";
// const navStyle = "background-color: transparent;";
const
navStyle
=
"background-color: #fff"
;
const
navStyle
=
"background-color: #fff"
;
import
{
senceData
}
from
"~/pages/tab/index/constant/data"
;
import
{
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
senceData
}
from
"~/pages/tab/index/constant/data"
;
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
import
Draw
from
"~/utils/Draw.js"
;
import
Draw
from
"~/utils/Draw.js"
;
import
{
createQrCodeApi
,
sceneByIdApi
}
from
"~/api/checkProduct.js"
;
import
{
import
utils
from
'~/utils/util.js'
createQrCodeApi
,
sceneByIdApi
}
from
"~/api/checkProduct.js"
;
import
utils
from
"~/utils/util.js"
;
Page
({
Page
({
/**
/**
...
@@ -19,8 +26,7 @@ Page({
...
@@ -19,8 +26,7 @@ Page({
// 模态框
// 模态框
isShow
:
true
,
isShow
:
true
,
// IMG_URL: `${IMG_URL}index`,
// IMG_URL: `${IMG_URL}index`,
btnList
:
[
btnList
:
[{
{
src
:
`
${
IMG_URL
}
index/wechat.png`
,
src
:
`
${
IMG_URL
}
index/wechat.png`
,
name
:
"微信转发"
,
name
:
"微信转发"
,
},
},
...
@@ -44,6 +50,10 @@ Page({
...
@@ -44,6 +50,10 @@ Page({
noVideoimgList
:
[],
noVideoimgList
:
[],
//分享相关
//分享相关
isShare
:
false
,
isShare
:
false
,
// 是否授权昵称
hasUserInfo
:
false
,
phone
:
''
,
//授权手机号
userInfo
:
''
},
},
observers
:
{
observers
:
{
actNum
:
function
(
actNum
)
{
actNum
:
function
(
actNum
)
{
...
@@ -67,7 +77,10 @@ Page({
...
@@ -67,7 +77,10 @@ Page({
},
},
// navbar高度设置
// navbar高度设置
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
;
let
{
height
,
statusBarHeight
}
=
e
.
detail
;
this
.
setData
({
this
.
setData
({
headerHeight
:
height
/
2
+
statusBarHeight
,
headerHeight
:
height
/
2
+
statusBarHeight
,
// headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight,
...
@@ -91,11 +104,14 @@ Page({
...
@@ -91,11 +104,14 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
onRoute
(
options
)
{
onRoute
(
options
)
{
console
.
log
(
"分享options: "
,
options
);
console
.
log
(
"分享options: "
,
options
);
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
))
return
;
//选中场景的index,和产品的index
//选中场景的index,和产品的index
let
{
actNum
,
activeNavIdx
,
apiData
}
=
options
;
let
{
actNum
,
activeNavIdx
,
apiData
}
=
options
;
// if(actNum&&activeNavIdx)return
// if(actNum&&activeNavIdx)return
this
.
setData
({
this
.
setData
({
actNum
,
actNum
,
...
@@ -103,15 +119,17 @@ Page({
...
@@ -103,15 +119,17 @@ Page({
apiData
,
apiData
,
// isShare
// isShare
});
});
let
apiDataJson
=
JSON
.
stringify
(
apiData
)
let
apiDataJson
=
JSON
.
stringify
(
apiData
)
;
let
item
=
apiData
[
actNum
]?.
productList
[
activeNavIdx
];
let
item
=
apiData
[
actNum
]?.
productList
[
activeNavIdx
];
this
.
shareQuery
=
`sceneCode=
${
apiData
[
actNum
].
sceneCode
}
&productCode=
${
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
apiData
=
$
{
apiDataJson
}
`;
this
.
shareQuery
=
`sceneCode=
${
apiData
[
actNum
].
sceneCode
}
&productCode=
${
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
apiData
=
$
{
apiDataJson
}
`;
this.shareTrackData = {
this.shareTrackData = {
sceneCode: apiData[actNum]?.sceneCode,
sceneCode: apiData[actNum]?.sceneCode,
productCode: item?.productCode,
productCode: item?.productCode,
productName: item?.productName,
productName: item?.productName,
category: item?.category,
category: item?.category,
productDesc:
item?.productName
productDesc:
item?.productName,
// actNum,
// actNum,
// activeNavIdx,
// activeNavIdx,
// apiData,
// apiData,
...
@@ -119,7 +137,9 @@ Page({
...
@@ -119,7 +137,9 @@ Page({
},
},
// 分享按钮
// 分享按钮
handleClick(e) {
handleClick(e) {
let { index } = e.currentTarget.dataset;
let {
index
} = e.currentTarget.dataset;
switch (index) {
switch (index) {
case 0:
case 0:
this.wechatFn();
this.wechatFn();
...
@@ -136,20 +156,24 @@ Page({
...
@@ -136,20 +156,24 @@ Page({
},
},
// 下载海报
// 下载海报
async download() {
async download() {
let { actNum, activeNavIdx, imgHeightArr } = this.data;
let {
let wx_user_info = wx.$storage.get('wx_user_info')
actNum,
activeNavIdx,
imgHeightArr
} = this.data;
let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info.appId);
// console.log('wx_user_info: ', wx_user_info.appId);
let params = {
let params = {
actNum,
actNum,
activeNavIdx,
activeNavIdx,
isShare: true,
isShare: true,
}
}
;
let res = await createQrCodeApi({
let res = await createQrCodeApi({
appId: wx_user_info.appId,
appId:wx_user_info.appId
,
// appId:'wx2c28337db96364d2'
,
path:
'pages/checkProduct/checkProduct'
,
path:
"pages/checkProduct/checkProduct"
,
scene:
JSON.stringify(params)
scene:
JSON.stringify(params),
});
});
// console.log('res: ', res);
// console.log('res: ', res);
...
@@ -167,8 +191,7 @@ Page({
...
@@ -167,8 +191,7 @@ Page({
let _this = this;
let _this = this;
wx.getImageInfo({
wx.getImageInfo({
src: `
https
:
//img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
src: `
https
:
//img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${actNum + 1
actNum
+
1
}.
png
`,
}.
png
`,
success: async () => {
success: async () => {
// // console.log("imgAllHeight: ", imgAllHeight);
// // console.log("imgAllHeight: ", imgAllHeight);
...
@@ -200,14 +223,12 @@ Page({
...
@@ -200,14 +223,12 @@ Page({
// ];
// ];
let
arr
=
[
456
,
222
,
0
,
496
];
let
arr
=
[
456
,
222
,
0
,
496
];
let
imgList
=
[
let
imgList
=
[{
{
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
width
:
_this
.
data
.
imgWidth
,
width
:
_this
.
data
.
imgWidth
,
height
:
_this
.
data
.
imgHeight
,
height
:
_this
.
data
.
imgHeight
,
url
:
`https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic
${
url
:
`https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic
${
actNum
+
1
actNum
+
1
}.
png
`,
}.
png
`,
},
},
{
{
...
@@ -262,39 +283,37 @@ Page({
...
@@ -262,39 +283,37 @@ Page({
// 分享获取懂得用户数
// 分享获取懂得用户数
authorizedFn(e) {
authorizedFn(e) {
let res = e.detail;
let res = e.detail;
this.onLoad(null)
this.onLoad(null)
;
wx.nextTick(()
=>
{
wx.nextTick(()
=>
{
this.setData({
this.setData({
isShare: res.isShare,
isShare: res.isShare,
phone: res.phone,
phone: res.phone,
});
});
})
});
},
},
/**
/**
* 生命周期函数--监听页面加载 (扫码,分享链接)
* 生命周期函数--监听页面加载 (扫码,分享链接)
*/
*/
async onLoad(options) {
async onLoad(options) {
console.log("分享options12255565: ", options);
console.log('分享options12255565: ', options);
// actNum,activeNavIdx isShare
// actNum,activeNavIdx isShare
if
(!options || utils.isEmptyObj(options))return
if
(!options || utils.isEmptyObj(options)) return;
// 解析二维码参数
// 解析二维码参数
if
(options.scene)
{
if
(options.scene)
{
this.setData({
this.setData({
isShare:true
isShare: true,
})
});
let ercodeParams = await this.analysisQRcode(options.scene)
let ercodeParams = await this.analysisQRcode(options.scene);
// console.log('ercodeParams: ', ercodeParams.scene);
options = utils.parseString(ercodeParams.scene);
options = utils.parseString(ercodeParams.scene)
// console.log('ercodeParams: ', options);
}
}
// 扫码进来
// 扫码进来
let { actNum, activeNavIdx, isShare } = options;
let {
if (isShare == 'true') {
actNum,
activeNavIdx,
isShare
} = options;
if (isShare == "true") {
this.setData({
this.setData({
isShow: false,
isShow: false,
});
});
...
@@ -307,69 +326,99 @@ Page({
...
@@ -307,69 +326,99 @@ Page({
this.setData({
this.setData({
actNum,
actNum,
activeNavIdx,
activeNavIdx,
isShare:
true
isShare:
true,
})
})
;
// 发请求
// 发请求
let senceItem = senceData[actNum];
let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx];
let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `
sceneCode
=
$
{
senceItem
?.
sceneCode
}
&
productCode
=
$
{
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
`;
this.shareQuery = `
sceneCode
=
$
{
senceItem
?.
sceneCode
}
&
productCode
=
$
{
item
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
item
?.
productName
}
&
category
=
$
{
item
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
`;
this.shareTrackData = {
this.shareTrackData = {
sceneCode: senceItem?.sceneCode,
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productCode: item?.productCode,
productName: item?.productName,
productName: item?.productName,
category: item?.category,
category: item?.category,
productDesc:item?.productName,
productDesc:
item?.productName,
// actNum,
// actNum,
// activeNavIdx,
// activeNavIdx,
};
};
},
},
// 解析扫码进来参数
// 解析扫码进来参数
async analysisQRcode(str){
async analysisQRcode(str) {
let id = str.split('%3D')[1]
let id = str.split("%3D")[1];
let res = await sceneByIdApi({id})
let res = await sceneByIdApi({
id
});
// console.log('res: ', res);
// console.log('res: ', res);
return res
return res;
},
// 获取用户昵称
getUserProfile(e) {
this.setData({
hasUserInfo: true,
});
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
// console.log('res: ', res.userInfo.nickName);
// userInfo.nickName
this.setData({
userInfo: res.userInfo
})
let wx_user_info = wx.$storage.get('wx_user_info')
// console.log('wx_user_info: ', wx_user_info);
let obj ={
...wx_user_info,
nickName:res.userInfo.nickName,
avatarUrl:res.userInfo.avatarUrl,
}
// console.log('obj',obj)
wx.$storage.set('wx_user_info', obj)
// this.onLoad(null);
},
});
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady() {
onReady() { },
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow(options) {},
onShow(options) {
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide() {},
onHide() {
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload() {},
onUnload() {
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh() {},
onPullDownRefresh() {
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom() {},
onReachBottom() {
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage() {},
onShareAppMessage() {
},
/**
/**
* 浏览埋点
* 浏览埋点
*/
*/
onShareTimeline() {},
onShareTimeline() {
},
onViewTrack: true,
onViewTrack: true,
});
});
\ No newline at end of file
\ No newline at end of file
pages/checkProduct/checkProduct.scss
View file @
be778b8
...
@@ -68,3 +68,14 @@
...
@@ -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 @@
...
@@ -34,3 +34,5 @@
<view class="btom" bindtap="modelcloseFn">取消</view>
<view class="btom" bindtap="modelcloseFn">取消</view>
</view>
</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({
...
@@ -166,16 +166,18 @@ Component({
},
},
// 获取用户信息
// 获取用户信息
getUserInfo
({
detail
})
{
getUserInfo
({
detail
})
{
console
.
log
(
detail
);
//
console.log(detail);
if
(
!
detail
.
code
)
return
;
if
(
!
detail
.
code
)
return
;
// this.setBtnLoading()
// this.setBtnLoading()
USERAPI
.
getUserProfile
(
this
.
loginToken
,
detail
)
USERAPI
.
getUserProfile
(
this
.
loginToken
,
detail
)
.
then
((
result
)
=>
{
.
then
((
result
)
=>
{
// console.log(result)
// console.log(result)
let
userInfo
=
wx
.
$storage
.
get
(
'wx_user_info'
)
// console.log('userInfo: ', userInfo);
let
{
phone
}
=
result
;
let
{
phone
}
=
result
;
//
let {
//
console.log('phone: ', phone);
wx
.
$storage
.
set
(
'wx_user_info'
,
result
);
wx
.
$storage
.
set
(
'wx_user_info'
,
{...
userInfo
,
phone
}
);
// }
// }
this
.
triggerEvent
(
"authorized"
,
{
this
.
triggerEvent
(
"authorized"
,
{
phone
,
phone
,
...
...
pages/tab/index/components/product/product.wxml
View file @
be778b8
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<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 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>
<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>
</text>
</view>
</view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
<view class="share-btn" wx:if="{{!isShare}}" bindtap="onShareFn">
...
...
pages/tab/index/constant/data.js
View file @
be778b8
...
@@ -14,9 +14,9 @@ var senceData = [
...
@@ -14,9 +14,9 @@ var senceData = [
{
{
img
:
'product-img1'
,
img
:
'product-img1'
,
proName
:
'数字无忧权益卡'
,
proName
:
'数字无忧权益卡'
,
price
:
'1
5
00'
,
price
:
'100'
,
// profit: '92.4万',
// profit: '92.4万',
profit
:
'120
万
'
,
profit
:
'120
0000
'
,
type
:
'service'
,
type
:
'service'
,
productType
:
'benefitCard'
,
productType
:
'benefitCard'
,
path
:
'equity'
,
path
:
'equity'
,
...
@@ -63,8 +63,8 @@ var senceData = [
...
@@ -63,8 +63,8 @@ var senceData = [
{
{
img
:
'product-img2'
,
img
:
'product-img2'
,
proName
:
'汽车太阳膜'
,
proName
:
'汽车太阳膜'
,
price
:
'1
5
00'
,
price
:
'100'
,
profit
:
'1008
万
'
,
profit
:
'1008
0000
'
,
type
:
'membrane'
,
type
:
'membrane'
,
productType
:
'sunMembrane'
,
productType
:
'sunMembrane'
,
path
:
'solarFilm'
,
path
:
'solarFilm'
,
...
@@ -96,8 +96,8 @@ var senceData = [
...
@@ -96,8 +96,8 @@ var senceData = [
{
{
img
:
'product-img3'
,
img
:
'product-img3'
,
proName
:
'漆面保护膜'
,
proName
:
'漆面保护膜'
,
price
:
'1
20
00'
,
price
:
'100'
,
profit
:
'216
万
'
,
profit
:
'216
0000
'
,
type
:
'membrane'
,
type
:
'membrane'
,
productType
:
'protectMembrane'
,
productType
:
'protectMembrane'
,
path
:
'paintProtect'
,
path
:
'paintProtect'
,
...
@@ -110,8 +110,8 @@ var senceData = [
...
@@ -110,8 +110,8 @@ var senceData = [
{
{
img
:
'product-img4'
,
img
:
'product-img4'
,
proName
:
'改色膜'
,
proName
:
'改色膜'
,
price
:
'
50
00'
,
price
:
'
1
00'
,
profit
:
'30
万
'
,
profit
:
'30
0000
'
,
type
:
'membrane'
,
type
:
'membrane'
,
productType
:
'colorMembrane'
,
productType
:
'colorMembrane'
,
path
:
'changingFilm'
,
path
:
'changingFilm'
,
...
@@ -136,8 +136,8 @@ var senceData = [
...
@@ -136,8 +136,8 @@ var senceData = [
{
{
img
:
'product-img5'
,
img
:
'product-img5'
,
proName
:
'数字化美容'
,
proName
:
'数字化美容'
,
price
:
'
3
00'
,
price
:
'
1
00'
,
profit
:
'
36万
'
,
profit
:
'
72000
'
,
type
:
'beauty'
,
type
:
'beauty'
,
productType
:
'digitBeauty'
,
productType
:
'digitBeauty'
,
path
:
'carBeauty'
,
path
:
'carBeauty'
,
...
@@ -150,8 +150,8 @@ var senceData = [
...
@@ -150,8 +150,8 @@ var senceData = [
{
{
img
:
'product-img6'
,
img
:
'product-img6'
,
proName
:
'座椅通风'
,
proName
:
'座椅通风'
,
price
:
'1
5
00'
,
price
:
'1
00
00'
,
profit
:
'
1008万
'
,
profit
:
'
232200
'
,
type
:
'light'
,
type
:
'light'
,
productType
:
'chair'
,
productType
:
'chair'
,
path
:
'seatVentilate'
,
path
:
'seatVentilate'
,
...
@@ -164,8 +164,8 @@ var senceData = [
...
@@ -164,8 +164,8 @@ var senceData = [
{
{
img
:
'product-img7'
,
img
:
'product-img7'
,
proName
:
'AR导航'
,
proName
:
'AR导航'
,
price
:
'1
68
0'
,
price
:
'1
000
0'
,
profit
:
'22
.68万
'
,
profit
:
'22
6800
'
,
type
:
'light'
,
type
:
'light'
,
productType
:
'ar'
,
productType
:
'ar'
,
path
:
'arNavigation'
,
path
:
'arNavigation'
,
...
@@ -178,8 +178,8 @@ var senceData = [
...
@@ -178,8 +178,8 @@ var senceData = [
{
{
img
:
'product-img8'
,
img
:
'product-img8'
,
proName
:
'氛围灯'
,
proName
:
'氛围灯'
,
price
:
'
268
0'
,
price
:
'
1000
0'
,
profit
:
'36
.18万
'
,
profit
:
'36
1800
'
,
type
:
'light'
,
type
:
'light'
,
productType
:
'lamp'
,
productType
:
'lamp'
,
path
:
'ambientLighting'
,
path
:
'ambientLighting'
,
...
@@ -192,8 +192,8 @@ var senceData = [
...
@@ -192,8 +192,8 @@ var senceData = [
{
{
img
:
'product-img9'
,
img
:
'product-img9'
,
proName
:
'360全景导航'
,
proName
:
'360全景导航'
,
price
:
'
288
0'
,
price
:
'
1000
0'
,
profit
:
'38
.88万
'
,
profit
:
'38
8800
'
,
type
:
'service'
,
type
:
'service'
,
productType
:
'navigation'
,
productType
:
'navigation'
,
path
:
'navigationArround'
,
path
:
'navigationArround'
,
...
...
pages/tab/index/index.js
View file @
be778b8
...
@@ -350,7 +350,7 @@ Page({
...
@@ -350,7 +350,7 @@ Page({
}
}
console
.
log
(
profit
.
length
);
console
.
log
(
profit
.
length
);
console
.
log
(
productType
,
sales
,
flow
,
profit
);
console
.
log
(
productType
,
sales
,
flow
,
profit
);
if
(
profit
.
length
>
8
)
{
if
(
profit
.
length
>
9
)
{
return
(
profit
/
10000
).
toFixed
(
0
)
+
"万"
;
return
(
profit
/
10000
).
toFixed
(
0
)
+
"万"
;
}
else
{
}
else
{
return
profit
;
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