Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
d9745249
Commit
d9745249
authored
Mar 20, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1cebb90f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
218 deletions
+27
-218
userHeader.vue
pages/user-center/components/userHeader.vue
+1
-2
vipUserHeader.vue
pages/user-center/components/vipUserHeader.vue
+1
-2
costSavingStatistics.vue
pages/user-center/costSavingStatistics.vue
+22
-0
happinessPassbook.vue
pages/user-center/happinessPassbook.vue
+3
-1
visa_SureOrder.vue
pages/visa/visa_SureOrder.vue
+0
-213
No files found.
pages/user-center/components/userHeader.vue
View file @
d9745249
...
...
@@ -6,7 +6,6 @@
<view
class=
"userHeadPicL"
>
<u-avatar
v-if=
"b2b_user_info.photo||statistics.image"
:src=
"b2b_user_info.photo?b2b_user_info.photo:statistics.image"
size=
"97"
shape=
"circle"
></u-avatar>
<u-avatar
v-else
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638748795455095258.png"
size=
"97"
shape=
"circle"
></u-avatar>
<!--
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638748795455095258.png"
mode=
"widthFix"
></image>
-->
</view>
<view
class=
"col column"
>
<text
v-if=
"b2b_user_info&&b2b_user_info.name"
...
...
@@ -22,7 +21,7 @@
</text>
<text
class=
"userHeadPicR_text"
v-if=
"statistics.saleList&&statistics.saleList.length>0"
>
<!-- #ifdef MP-DI -->
销售:
{{
b2b_user_info
.
salesBaseInfo
.
emName
}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
销售:
{{
statistics
.
saleList
[
0
].
saleName
}}
<template
v-if=
"statistics.saleList.length>
0
"
>
等
{{
statistics
.
saleList
.
length
}}
位
</
template
>
<!-- #endif -->
<!-- #ifdef MP-AG -->
销售:
{{
statistics
.
saleList
[
0
].
saleName
}}
<template
v-if=
"statistics.saleList.length>
1
"
>
等
{{
statistics
.
saleList
.
length
}}
位
</
template
>
<!-- #endif -->
</text>
</view>
</view>
...
...
pages/user-center/components/vipUserHeader.vue
View file @
d9745249
...
...
@@ -6,7 +6,6 @@
<view
class=
"userHeadPicL"
>
<u-avatar
v-if=
"b2b_user_info.photo||statistics.image"
:src=
"b2b_user_info.photo?b2b_user_info.photo:statistics.image"
size=
"70"
shape=
"circle"
></u-avatar>
<u-avatar
v-else
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638748864186439447.png"
size=
"70"
shape=
"circle"
></u-avatar>
<!--
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638748864186439447.png"
mode=
"widthFix"
></image>
-->
</view>
<view
class=
"col column"
>
<text
v-if=
"b2b_user_info&&b2b_user_info.name"
...
...
@@ -33,7 +32,7 @@
</view>
<view
class=
"userHeadInfo_text"
v-if=
"statistics.saleList&&statistics.saleList.length>0"
>
<!-- #ifdef MP-DI -->
销售:{{ b2b_user_info.salesBaseInfo.emName }}
<!-- #endif -->
<!-- #ifdef MP-AG -->
销售:{{ statistics.saleList[0].saleName }}
<
template
v-if=
"statistics.saleList.length>
0
"
>
等
{{
statistics
.
saleList
.
length
}}
位
</
template
>
<!-- #endif -->
<!-- #ifdef MP-AG -->
销售:{{ statistics.saleList[0].saleName }}
<
template
v-if=
"statistics.saleList.length>
1
"
>
等
{{
statistics
.
saleList
.
length
}}
位
</
template
>
<!-- #endif -->
</view>
<image
class=
"userHeadInfo_vip"
mode=
"aspectFit"
style=
"width: 385rpx;height: 49rpx;"
...
...
pages/user-center/costSavingStatistics.vue
View file @
d9745249
...
...
@@ -302,6 +302,25 @@
},
methods
:
{
formatNumberWithUnit
(
num
)
{
if
(
num
===
0
)
return
'0.00'
;
const
units
=
[
''
,
'K'
,
'M'
,
'B'
,
'T'
];
// 单位数组:千(k)、百万(M)、十亿(B)、万亿(T)
const
exponent
=
Math
.
floor
(
Math
.
log10
(
num
));
const
unitIndex
=
Math
.
max
(
0
,
Math
.
floor
(
exponent
/
3
))
-
1
;
// 计算单位索引
// 缩放数值并保留三位有效数字
const
scaledNum
=
num
/
(
10
**
(
unitIndex
*
3
));
const
formatted
=
scaledNum
.
toLocaleString
(
'en-US'
,
{
precision
:
5
,
// 保留三位有效数字
rounding
:
'round-trip'
// 四舍五入
});
// 处理科学计数法(如 1.23e3 → 1230)
if
(
formatted
.
includes
(
'e'
))
{
const
[
significand
,
exp
]
=
formatted
.
split
(
'e'
);
return
significand
+
'0'
.
repeat
(
parseInt
(
exp
))
+
units
[
unitIndex
+
1
];
}
if
(
formatted
.
substring
(
3
,
4
)
==
','
)
return
formatted
.
substring
(
0
,
3
)
+
units
[
unitIndex
+
1
];
return
formatted
.
substring
(
0
,
4
)
+
units
[
unitIndex
+
1
];
},
InitialDate
(
ID
){
if
(
ID
!=-
1
){
if
(
ID
==
this
.
msg
.
Type
)
return
...
...
@@ -393,6 +412,9 @@
(
res
)
=>
{
this
.
CustomerData
=
res
.
data
this
.
options
.
subtitle
.
name
=
"¥"
+
res
.
data
.
totalMoney
if
(
res
.
data
.
totalMoney
>
99999
){
this
.
options
.
subtitle
.
name
=
"¥"
+
this
.
formatNumberWithUnit
(
res
.
data
.
totalMoney
)
}
let
list
=
[]
res
.
data
.
list
.
forEach
(
item
=>
{
if
(
item
.
money
>
0
){
...
...
pages/user-center/happinessPassbook.vue
View file @
d9745249
...
...
@@ -115,7 +115,7 @@
</view>
</view>
<view
class=
"userHeadPListR"
>
¥{{item.type==1?'+':''}}{{ item.money }}
¥{{item.type==1?'+':'
-
'}}{{ item.money }}
</view>
</view>
</view>
...
...
@@ -209,6 +209,8 @@
now
.
setMonth
(
now
.
getMonth
()
+
1
,
0
);
this
.
msg
.
EndTime
=
this
.
year
+
'-'
+
this
.
month
+
'-'
+
now
.
getDate
()
this
.
times
=
this
.
year
+
'-'
+
this
.
month
this
.
msg
.
pageIndex
=
1
this
.
dataList
=
[]
this
.
getList
();
this
.
GetCustomerBalance
()
},
...
...
pages/visa/visa_SureOrder.vue
View file @
d9745249
...
...
@@ -545,30 +545,7 @@
:disabled=
"submitCancel"
:loading=
"submitCancel"
>
取消
<!-- <text v-if="!submitCancel"></text>
<u-loading v-if="submitCancel" size="32" color="#111"></u-loading> -->
</button>
<!-- #endif -->
<!-- 返回上一页 -->
<!-- <view
class="jz_OrderReNow"
@click="goback"
style="background: #fff; color: #111; border: 1px solid #111"
v-if="!showPayBtn"
>关闭
</view> -->
</view>
<view
style=
"display: flex; margin-left: 30rpx"
>
<!-- #ifdef MP-WEIXIN -->
<!-- <button class="jz_OrderReNow" @click="goFukuan" v-if="showPayBtn" :disabled="submit">
立即支付
</button> -->
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<!-- <button class="jz_OrderReNow" @click="goZhifuAli" v-if="showPayBtn" :disabled="submit">
立即支付
</button> -->
<!-- #endif -->
</view>
</view>
<!-- #ifdef MP-ALIPAY -->
...
...
@@ -906,197 +883,7 @@
}
// #endif
},
// #ifdef MP-WEIXIN
goFukuan
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
var
that
=
this
;
var
tempData
=
uni
.
getStorageSync
(
"basedata"
);
var
tempObj
=
[];
if
(
tempData
&&
tempData
.
mall
&&
tempData
.
mall
.
wechatmessage
)
{
tempObj
=
tempData
.
mall
.
wechatmessage
;
}
var
tmplIds
=
[];
if
(
tempObj
&&
tempObj
.
length
>
0
)
{
tempObj
.
forEach
((
x
)
=>
{
if
(
x
.
Name
==
"下单成功提醒"
||
x
.
Name
==
"订单取消提醒"
)
{
tmplIds
.
push
(
x
.
MessageId
);
}
});
}
uni
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
complete
(
res
)
{
that
.
goZhifu
();
},
});
},
//支付
goZhifu
()
{
this
.
submit
=
true
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
orderData
.
OrderModel
.
Title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
({
url
:
url
,
data
:
{
OrderId
:
this
.
orderData
.
OrderModel
.
Id
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
(
res
)
=>
{
try
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
orderInfo
);
this
.
goPay
(
orderInfo
);
}
catch
(
e
)
{
uni
.
showToast
({
title
:
'无法正常拉取微信支付,你可以稍后重试或联系销售人员线下转款'
,
icon
:
'none'
})
setTimeout
(()
=>
{
this
.
submit
=
false
;
},
2000
);
}
}
);
},
goPay
(
orderInfo
)
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
timeStamp
:
orderInfo
.
timeStamp
,
nonceStr
:
orderInfo
.
nonceStr
,
package
:
orderInfo
.
package
,
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
OrderModel
.
Id
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
that
.
initOrderInfo
(
that
.
orderData
.
OrderModel
.
Id
);
},
});
},
// #endif
// #ifdef MP-ALIPAY
//支付宝支付
goZhifuAli
()
{
this
.
submit
=
true
;
let
that
=
this
;
uni
.
showLoading
({
title
:
"支付中"
,
});
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
orderData
.
OrderModel
.
Title
;
this
.
request2
({
url
:
url
,
data
:
{
OrderId
:
this
.
orderData
.
OrderModel
.
Id
,
GoodsName
:
GoodsName
,
OrderPayType
:
2
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
(
res
)
=>
{
if
(
res
.
data
)
{
this
.
$utils
.
SubscribeMsgAli
(()
=>
{
that
.
goPayAli
(
res
.
data
);
});
}
else
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"获取交易号失败"
,
duration
:
2000
,
});
}
}
);
},
goPayAli
(
tradeNO
)
{
let
that
=
this
;
my
.
tradePay
({
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
const
list
=
[
"9000"
];
if
(
list
.
includes
(
res
.
resultCode
))
{
let
obj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
that
.
orderData
.
OrderModel
.
OrderNo
,
OrderId
:
that
.
orderData
.
OrderModel
.
Id
,
preferPrice
:
that
.
orderData
.
OrderModel
.
PreferPrice
,
};
that
.
payAliCallback
(
obj
);
}
else
{
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
}
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
OrderModel
.
Id
);
},
});
},
payAliCallback
(
obj
)
{
let
that
=
this
;
this
.
request2
({
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
data
:
{
OrderNo
:
obj
.
OrderNo
,
OrderId
:
obj
.
OrderId
,
UserId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
TradeNo
:
obj
.
TradeNo
,
ProjectType
:
2
,
PreferPrice
:
obj
.
preferPrice
,
},
},
(
res
)
=>
{
that
.
submit
=
false
;
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
obj
.
preferPrice
+
"&isFrom=1"
,
});
uni
.
hideLoading
();
},
(
err
)
=>
{
console
.
log
(
"err"
,
err
);
that
.
submit
=
false
;
uni
.
hideLoading
();
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
that
.
initOrderInfo
(
that
.
orderData
.
OrderModel
.
Id
);
}
);
},
// #endif
},
};
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment