Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
points-mall
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 97e54007
authored
Aug 25, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
a88b9d43
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
29 additions
and
16 deletions
api/module/home.js
components/GoodsAction/GoodsAction.wxss
components/Sku/index.js
components/Sku/index.scss
components/Sku/index.wxml
packageIndex/pages/SpecialSale/SpecialSale.js
packageIndex/pages/goodsDetail/index.js
packageIndex/pages/goodsDetail/index.wxml
pages/tab/index/index.js
pages/tab/index/index.wxml
api/module/home.js
View file @
97e5400
...
@@ -27,5 +27,12 @@ module.exports = {
...
@@ -27,5 +27,12 @@ module.exports = {
method
:
'scrm.api.shopmall.points.order.create'
,
method
:
'scrm.api.shopmall.points.order.create'
,
...
data
...
data
})
})
},
/**获取积分商城首页配置数据 */
getHomeConfigData
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.shopmall.scrm.mallmini.findByType'
,
...
data
})
}
}
}
}
\ No newline at end of file
\ No newline at end of file
components/GoodsAction/GoodsAction.wxss
View file @
97e5400
...
@@ -97,10 +97,3 @@
...
@@ -97,10 +97,3 @@
width: 588rpx;
width: 588rpx;
background-color: var(--themeColor);
background-color: var(--themeColor);
}
}
.btn-box .pay.disabled{
background-color: #B1B1B3 !important;
}
.btn-box .disabled{
background-color: #B1B1B3 !important;
}
\ No newline at end of file
\ No newline at end of file
components/Sku/index.js
View file @
97e5400
...
@@ -125,7 +125,7 @@ Component({
...
@@ -125,7 +125,7 @@ Component({
if
(
!
[
'pay'
,
'join'
].
includes
(
clickType
))
{
if
(
!
[
'pay'
,
'join'
].
includes
(
clickType
))
{
return
this
.
cancel
()
return
this
.
cancel
()
}
}
if
(
!
detailInfo
.
goodsStock
)
return
wx
.
p
.
wxApi
.
showToast
(
'暂无存货'
)
if
(
!
detailInfo
.
goodsStock
)
return
detailInfo
.
sellQty
=
goodsNumber
||
detailInfo
.
sellQty
detailInfo
.
sellQty
=
goodsNumber
||
detailInfo
.
sellQty
detailInfo
?.
platformGlGoodsSpecifications
?.
forEach
(
val
=>
{
detailInfo
?.
platformGlGoodsSpecifications
?.
forEach
(
val
=>
{
if
(
val
.
active
)
detailInfo
.
specificationData
=
val
.
specificationData
if
(
val
.
active
)
detailInfo
.
specificationData
=
val
.
specificationData
...
...
components/Sku/index.scss
View file @
97e5400
...
@@ -236,11 +236,8 @@
...
@@ -236,11 +236,8 @@
color
:
#FFFFFF
;
color
:
#FFFFFF
;
}
}
.diable_btn
{
.disabled
{
background
:
#999999
;
background
:
#FB8A32
4
C
;
color
:
#FFFFFF
;
border
:
none
;
box-shadow
:
none
;
}
}
}
}
...
...
components/Sku/index.wxml
View file @
97e5400
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</view>
</view>
</view>
</view>
<view class="btn-wrap flex_cc">
<view class="btn-wrap flex_cc">
<view bind:tap="toCreatedOrder" class="btn flex_cc">确认</view>
<view bind:tap="toCreatedOrder" class="btn flex_cc
{{!detailInfo.goodsStock ? 'disabled' : ''}}
">确认</view>
</view>
</view>
<view style="height:290rpx"></view>
<view style="height:290rpx"></view>
</view>
</view>
...
...
packageIndex/pages/SpecialSale/SpecialSale.js
View file @
97e5400
...
@@ -93,6 +93,7 @@ Page({
...
@@ -93,6 +93,7 @@ Page({
scoreSource
:
userInfo
?.
channelSource
,
scoreSource
:
userInfo
?.
channelSource
,
merchantId
:
userInfo
?.
merchantId
merchantId
:
userInfo
?.
merchantId
}
}
if
(
!
value
.
goodsStock
)
return
wx
.
p
.
wxApi
.
showToast
(
'暂无库存'
)
if
(
value
.
goodsSource
==
1
)
{
if
(
value
.
goodsSource
==
1
)
{
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
...
...
packageIndex/pages/goodsDetail/index.js
View file @
97e5400
...
@@ -246,6 +246,7 @@ Page({
...
@@ -246,6 +246,7 @@ Page({
specificationData
:
detailInfo
?.
specificationData
,
specificationData
:
detailInfo
?.
specificationData
,
merchantId
:
userInfo
?.
merchantId
merchantId
:
userInfo
?.
merchantId
}
}
if
(
!
detailInfo
.
goodsStock
)
return
wx
.
p
.
wxApi
.
showToast
(
'暂无库存'
)
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
this
.
joinSuccess
()
this
.
joinSuccess
()
...
...
packageIndex/pages/goodsDetail/index.wxml
View file @
97e5400
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
</view>
</view>
</view>
</view>
<block wx:if="{{navHeight && eventFlag}}">
<block wx:if="{{navHeight && eventFlag}}">
<goods-action platformShop="{{true}}" id="goods-action" bindready="goodsActionReady" pay-disabled="{{false}}" upgradeSet="{{!detailInfo.retailPrice&&detailInfo.exchangeIntegral}}" stock="{{detailInfo.goodsStock==
=
0}}" buyFlag="{{false}}" bindclick="goodsActionClick" hideShop="{{false}}"></goods-action>
<goods-action platformShop="{{true}}" id="goods-action" bindready="goodsActionReady" pay-disabled="{{false}}" upgradeSet="{{!detailInfo.retailPrice&&detailInfo.exchangeIntegral}}" stock="{{detailInfo.goodsStock==0}}" buyFlag="{{false}}" bindclick="goodsActionClick" hideShop="{{false}}"></goods-action>
</block>
</block>
<sku bind:cancelSku="closeSku" bind:getCount="getCount" bind:sameAddress="resetAddress" bind:joinSuccess="joinSuccess" show="{{showSku}}" defaultAds="{{contactAddress}}" goods="{{detailInfo}}" clickType="{{clickType}}" address="{{addressList}}" defaultAddress="{{defaultAddress}}"></sku>
<sku bind:cancelSku="closeSku" bind:getCount="getCount" bind:sameAddress="resetAddress" bind:joinSuccess="joinSuccess" show="{{showSku}}" defaultAds="{{contactAddress}}" goods="{{detailInfo}}" clickType="{{clickType}}" address="{{addressList}}" defaultAddress="{{defaultAddress}}"></sku>
<address address="{{addressList}}" defaultAddress="{{defaultAddress}}" bind:getAddress="getAddress" show="{{showAddress}}"></address>
<address address="{{addressList}}" defaultAddress="{{defaultAddress}}" bind:getAddress="getAddress" show="{{showAddress}}"></address>
\ No newline at end of file
\ No newline at end of file
pages/tab/index/index.js
View file @
97e5400
...
@@ -94,6 +94,7 @@ Page({
...
@@ -94,6 +94,7 @@ Page({
onLoad
(
options
)
{
onLoad
(
options
)
{
const
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
const
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
this
.
setData
({
userInfo
})
this
.
setData
({
userInfo
})
// this.getHomeData()
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
this
.
setData
({
loginPageFlag
:
params
?.
loginPageFlag
},
()
=>
{
this
.
setData
({
loginPageFlag
:
params
?.
loginPageFlag
},
()
=>
{
this
.
getPointsWallet
()
this
.
getPointsWallet
()
...
@@ -105,6 +106,13 @@ Page({
...
@@ -105,6 +106,13 @@ Page({
})
})
},
},
// 获取积分商城配置
getHomeData
()
{
homeApi
.
getHomeConfigData
({}).
then
(
res
=>
{
console
.
log
(
res
)
})
},
// 获取积分钱包数据
// 获取积分钱包数据
getPointsWallet
()
{
getPointsWallet
()
{
let
{
loginPageFlag
}
=
this
.
data
let
{
loginPageFlag
}
=
this
.
data
...
@@ -233,6 +241,11 @@ Page({
...
@@ -233,6 +241,11 @@ Page({
this
.
getGoodsList
()
this
.
getGoodsList
()
})
})
},
},
closeSku
()
{
this
.
setData
({
showSku
:
false
})
},
// 加入购物车
// 加入购物车
handleAddToCart
(
e
)
{
handleAddToCart
(
e
)
{
let
value
=
e
.
detail
let
value
=
e
.
detail
...
@@ -245,6 +258,7 @@ Page({
...
@@ -245,6 +258,7 @@ Page({
merchantId
:
userInfo
?.
merchantId
merchantId
:
userInfo
?.
merchantId
}
}
if
(
value
.
goodsSource
==
1
)
{
if
(
value
.
goodsSource
==
1
)
{
if
(
!
value
.
goodsStock
)
return
wx
.
p
.
wxApi
.
showToast
(
'暂无库存'
)
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
cartApi
.
addToCart
(
PARAMS
).
then
(
res
=>
{
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
wx
.
p
.
wxApi
.
showToast
(
'加入购物车成功'
)
})
})
...
...
pages/tab/index/index.wxml
View file @
97e5400
...
@@ -70,5 +70,5 @@
...
@@ -70,5 +70,5 @@
</block>
</block>
<!-- 开通钱包 -->
<!-- 开通钱包 -->
<enable-wallet show="{{showEnableWallet}}" walletObj="{{walletObj}}"></enable-wallet>
<enable-wallet show="{{showEnableWallet}}" walletObj="{{walletObj}}"></enable-wallet>
<sku bind:cancelSku="closeSku" 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>
<glsx-privacy appletName="积分商城"></glsx-privacy>
\ No newline at end of file
\ No newline at end of file
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