Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ujia
/
uj-admin
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 b5bb0472
authored
Nov 11, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor: 优化购物车和积分会页面,移除不必要的代码,添加即将上线提示
1 parent
9159d039
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
64 additions
and
48 deletions
apps/mp/points/pages/tab/cart/index.js
apps/mp/points/pages/tab/cart/index.json
apps/mp/points/pages/tab/cart/index.scss
apps/mp/points/pages/tab/cart/index.wxml
apps/mp/points/pages/tab/index/index.js
apps/mp/points/pages/tab/index/index.scss
apps/mp/points/pages/tab/index/index.wxml
apps/mp/points/pages/tab/mine/index.js
apps/mp/points/project.config.json
apps/mp/points/project.private.config.json
apps/mp/points/pages/tab/cart/index.js
View file @
b5bb047
...
@@ -129,11 +129,7 @@ Page({
...
@@ -129,11 +129,7 @@ Page({
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
()
{},
let
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
this
.
setData
({
userInfo
})
this
.
getShoppingcartList
()
},
getShoppingcartList
()
{
getShoppingcartList
()
{
wx
.
p
.
wxApi
.
showLoading
()
wx
.
p
.
wxApi
.
showLoading
()
let
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
let
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
...
@@ -189,9 +185,7 @@ Page({
...
@@ -189,9 +185,7 @@ Page({
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{},
this
.
getShoppingcartList
()
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
...
@@ -203,9 +197,7 @@ Page({
...
@@ -203,9 +197,7 @@ Page({
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{},
this
.
getShoppingcartList
()
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
...
@@ -249,4 +241,4 @@ Page({
...
@@ -249,4 +241,4 @@ Page({
[
`goodsList[
${
index
}
].showDel`
]:
result
[
`goodsList[
${
index
}
].showDel`
]:
result
})
})
}
}
})
\ No newline at end of file
\ No newline at end of file
})
apps/mp/points/pages/tab/cart/index.json
View file @
b5bb047
{
{
"navigationBarTitleText"
:
"购物车"
,
"navigationBarTitleText"
:
"购物车"
,
"usingComponents"
:
{
"stepper"
:
"/components/Stepper/Stepper"
},
"onReachBottomDistance"
:
10
,
"backgroundTextStyle"
:
"dark"
,
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
\ No newline at end of file
"backgroundTextStyle"
:
"dark"
}
apps/mp/points/pages/tab/cart/index.scss
View file @
b5bb047
page
{
page
{
background
:
#F7F8FA
;
background
:
#F7F8FA
;
}
}
.coming-soon
{
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
color
:
#7A8299
;
font-size
:
32rpx
;
}
.coming-soon-image
{
width
:
260rpx
;
height
:
260rpx
;
margin-bottom
:
24rpx
;
}
.layout
{
.layout
{
overflow
:
auto
;
overflow
:
auto
;
}
}
...
@@ -187,4 +204,4 @@ page {
...
@@ -187,4 +204,4 @@ page {
.specification
{
.specification
{
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
#B1B1B3
;
color
:
#B1B1B3
;
}
\ No newline at end of file
\ No newline at end of file
}
apps/mp/points/pages/tab/cart/index.wxml
View file @
b5bb047
<view class="coming-soon">
<image class="coming-soon-image" mode="aspectFit" src="https://coresg-normal.trae.ai/api/ide/v1/tool_text_to_image?prompt=Minimal%20modern%203D%20illustration%20of%20a%20warm%20orange%20gift%20box%20with%20a%20small%20clock%20and%20sparkles%2C%20isolated%20on%20a%20pale%20cream%20background%2C%20no%20text%2C%20clean%20mobile%20app%20empty%20state%2C%20soft%20shadows&image_size=square" />
<text>敬请期待</text>
</view>
<block wx:if="{{false}}">
<view class="layout" style="padding-bottom:{{padding_bottom }}px;height: calc(100vh - {{padding_bottom}}px);">
<view class="layout" style="padding-bottom:{{padding_bottom }}px;height: calc(100vh - {{padding_bottom}}px);">
<block wx:if="{{shoppingcartFlag}}">
<block wx:if="{{shoppingcartFlag}}">
<block wx:if="{{!goodsList.length}}">
<block wx:if="{{!goodsList.length}}">
...
@@ -69,4 +74,5 @@
...
@@ -69,4 +74,5 @@
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count || 0}})</button>
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count || 0}})</button>
</view>
</view>
</goods-action>
</goods-action>
</block>
\ No newline at end of file
\ No newline at end of file
</block>
</block>
apps/mp/points/pages/tab/index/index.js
View file @
b5bb047
...
@@ -116,17 +116,7 @@ Page({
...
@@ -116,17 +116,7 @@ Page({
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
()
{},
const
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
this
.
setData
({
userInfo
})
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
this
.
setData
({
loginPageFlag
:
params
?.
loginPageFlag
},
()
=>
{
this
.
getPointsWallet
()
})
}).
catch
(
err
=>
{
console
.
error
(
'参数获取失败:'
,
err
)
})
},
// 获取积分会配置
// 获取积分会配置
getHomeData
()
{
getHomeData
()
{
...
@@ -353,15 +343,7 @@ Page({
...
@@ -353,15 +343,7 @@ Page({
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{},
this
.
getWalletData
()
this
.
getGoodsList
()
this
.
getCategory
()
this
.
getHomeData
()
if
(
this
.
data
.
shouldAnimate
)
{
// 恢复公告动画
this
.
resetAnimation
()
}
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
...
@@ -396,4 +378,4 @@ Page({
...
@@ -396,4 +378,4 @@ Page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{}
onShareAppMessage
:
function
()
{}
})
\ No newline at end of file
\ No newline at end of file
})
apps/mp/points/pages/tab/index/index.scss
View file @
b5bb047
.coming-soon
{
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
color
:
#7A8299
;
font-size
:
32rpx
;
}
.coming-soon-image
{
width
:
260rpx
;
height
:
260rpx
;
margin-bottom
:
24rpx
;
}
/* pages/tab/index/pages/index/index.wxss */
/* pages/tab/index/pages/index/index.wxss */
.page-title
{
.page-title
{
text-align
:
center
;
text-align
:
center
;
...
...
apps/mp/points/pages/tab/index/index.wxml
View file @
b5bb047
<view class="coming-soon">
<image class="coming-soon-image" mode="aspectFit" src="https://coresg-normal.trae.ai/api/ide/v1/tool_text_to_image?prompt=Minimal%20modern%203D%20illustration%20of%20a%20warm%20orange%20gift%20box%20with%20a%20small%20clock%20and%20sparkles%2C%20isolated%20on%20a%20pale%20cream%20background%2C%20no%20text%2C%20clean%20mobile%20app%20empty%20state%2C%20soft%20shadows&image_size=square" />
<text>敬请期待</text>
</view>
<block wx:if="{{false}}">
<navigation-bar page-title="积分会" custom navStyle="{{navStyle}}" bindnavbarReady="navbarReady">
<navigation-bar page-title="积分会" custom navStyle="{{navStyle}}" bindnavbarReady="navbarReady">
<view class="page-title">积分会</view>
<view class="page-title">积分会</view>
</navigation-bar>
</navigation-bar>
...
@@ -77,4 +82,5 @@
...
@@ -77,4 +82,5 @@
<!-- 开通钱包 -->
<!-- 开通钱包 -->
<enable-wallet show="{{showEnableWallet}}" walletObj="{{walletObj}}"></enable-wallet>
<enable-wallet show="{{showEnableWallet}}" walletObj="{{walletObj}}"></enable-wallet>
<sku bind:cancelSku="closeSku" wx:if="{{showSku}}" bind:getCount="getCount" show="{{showSku}}" goods="{{detailInfo}}" clickType="join"></sku>
<sku bind:cancelSku="closeSku" wx:if="{{showSku}}" bind:getCount="getCount" show="{{showSku}}" goods="{{detailInfo}}" clickType="join"></sku>
<glsx-privacy appletName="积分会"></glsx-privacy>
\ No newline at end of file
\ No newline at end of file
<glsx-privacy appletName="积分会"></glsx-privacy>
</block>
apps/mp/points/pages/tab/mine/index.js
View file @
b5bb047
...
@@ -30,12 +30,11 @@ Page({
...
@@ -30,12 +30,11 @@ Page({
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
()
{
let
userInfo
=
wx
.
p
.
storage
.
get
(
"userInfo"
);
let
userInfo
=
wx
.
p
.
storage
.
get
(
"userInfo"
);
this
.
setData
({
this
.
setData
({
userInfo
,
userInfo
,
});
});
this
.
searchScoreSummaryData
();
// this.getMemberCardData();
// this.getMemberCardData();
},
},
searchScoreSummaryData
()
{
searchScoreSummaryData
()
{
...
@@ -56,7 +55,10 @@ Page({
...
@@ -56,7 +55,10 @@ Page({
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
JSON
.
stringify
(
err
))
const
errorCode
=
err
?.
code
||
err
?.
cause
?.
code
||
err
?.
reason
?.
code
;
// 同一接口刷新时会主动取消前一个请求,无需提示用户。
if
(
errorCode
===
"CANCELLED"
||
errorCode
===
"CANCELED"
)
return
;
wx
.
p
.
wxApi
.
showToast
(
err
?.
message
||
err
?.
detail
||
err
?.
errMsg
||
"积分信息获取失败"
);
})
})
},
},
go
(
e
)
{
go
(
e
)
{
...
...
apps/mp/points/project.config.json
View file @
b5bb047
...
@@ -70,6 +70,6 @@
...
@@ -70,6 +70,6 @@
],
],
"include"
:
[]
"include"
:
[]
},
},
"appid"
:
"wx
7ce755e425603084
"
,
"appid"
:
"wx
2dcdc028b44bbebd
"
,
"libVersion"
:
"3.9.0"
"libVersion"
:
"3.9.0"
}
}
\ No newline at end of file
\ No newline at end of file
apps/mp/points/project.private.config.json
View file @
b5bb047
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"libVersion"
:
"3.9.0"
,
"libVersion"
:
"3.9.0"
,
"projectname"
:
"points"
,
"projectname"
:
"points"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
fals
e
,
"urlCheck"
:
tru
e
,
"coverView"
:
true
,
"coverView"
:
true
,
"lazyloadPlaceholderEnable"
:
false
,
"lazyloadPlaceholderEnable"
:
false
,
"skylineRenderEnable"
:
false
,
"skylineRenderEnable"
:
false
,
...
...
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