Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
bd8e9696
Commit
bd8e9696
authored
Oct 10, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商城修改
parent
6973d102
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
739 additions
and
675 deletions
+739
-675
goodsku.vue
components/goods/goodsku.vue
+1
-1
style2.vue
components/goods/style2.vue
+4
-1
pages.json
pages.json
+10
-1
cart.vue
pages/cart/cart.vue
+724
-672
No files found.
components/goods/goodsku.vue
View file @
bd8e9696
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</view>
</view>
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1 && g.form_id ==1"
>
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1 && g.form_id ==1"
>
<view
style=
"flex: 1;"
>
<view
style=
"flex: 1;"
>
<u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn4"
@
click=
'signup'
>
立即报名
</u-button>
<u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn4"
@
click=
'signup'
>
立即报名
5
</u-button>
</view>
</view>
</view>
</view>
<view
class=
"btn-box"
v-if=
"g.totalStock==0"
>
<view
class=
"btn-box"
v-if=
"g.totalStock==0"
>
...
...
components/goods/style2.vue
View file @
bd8e9696
...
@@ -62,16 +62,19 @@
...
@@ -62,16 +62,19 @@
</u-col>
</u-col>
</u-row>
</u-row>
<good-sku
v-if=
"showSku"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<good-sku
v-if=
"showSku&&!u.TenantId==27"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku>
<good-sku2
v-if=
"showSku&&u.TenantId==27"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
:option-type=
"2"
></good-sku2>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
goodSku
from
'../goods/goodsku'
;
import
goodSku
from
'../goods/goodsku'
;
import
goodSku2
from
'../goods/goodsku2'
;
import
auth
from
'@/components/auth/index.vue'
;
import
auth
from
'@/components/auth/index.vue'
;
export
default
{
export
default
{
components
:
{
components
:
{
goodSku
,
goodSku
,
goodSku2
,
auth
auth
},
},
props
:
[
'goodList'
,
'goodsInfo'
],
props
:
[
'goodList'
,
'goodsInfo'
],
...
...
pages.json
View file @
bd8e9696
...
@@ -30,6 +30,15 @@
...
@@ -30,6 +30,15 @@
{
{
"path"
:
"pages/webbox/webbox2"
"path"
:
"pages/webbox/webbox2"
}
}
,{
"path"
:
"components/goods/goodsku2"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
],
"subPackages"
:
[{
"subPackages"
:
[{
"root"
:
"pages/favorite"
,
"root"
:
"pages/favorite"
,
...
...
pages/cart/cart.vue
View file @
bd8e9696
<
template
>
<
template
>
<div
class=
"cartStyle"
v-if=
"!isloading"
:style=
"
{ height: contentHeight }">
<div
class=
"cartStyle"
v-if=
"!isloading"
:style=
"
{ height: contentHeight }">
<view
<view
style=
"
style=
"
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
padding: 0 15rpx;
padding: 0 15rpx;
"
"
>
>
<Text
class=
"grid-text"
v-if=
'IsEducation!=1'
>
商品库存有限,请尽快下单哦
</Text>
<Text
class=
"grid-text"
v-if=
'IsEducation!=1'
>
商品库存有限,请尽快下单哦
</Text>
<Text
class=
"grid-text"
v-if=
'IsEducation==1'
>
共
{{
list
[
0
].
GoodsList
.
length
?
list
[
0
].
GoodsList
.
length
:
'0'
}}
个课程
</Text>
<Text
class=
"grid-text"
v-if=
'IsEducation==1'
>
共
{{
list
[
0
].
GoodsList
.
length
?
list
[
0
].
GoodsList
.
length
:
'0'
}}
个课程
</Text>
<Text
@
click=
"edit"
v-if=
"editType == false && list[0].GoodsList.length>0"
class=
"grid-text_r"
>
编辑
</Text>
<Text
@
click=
"edit"
v-if=
"editType == false && list[0].GoodsList.length>0"
class=
"grid-text_r"
>
编辑
</Text>
<Text
@
click=
"edit"
v-if=
"editType == true"
class=
"grid-text_r"
>
完成
</Text>
<Text
@
click=
"edit"
v-if=
"editType == true"
class=
"grid-text_r"
>
完成
</Text>
</view>
</view>
<view
style=
"width: 100%; height: 30rpx; background: #f7f7f7; margin: 20rpx 0;"
></view>
<view
style=
"width: 100%; height: 30rpx; background: #f7f7f7; margin: 20rpx 0;"
></view>
<u-empty
v-if=
"emptyshow == true"
text=
"购物车还是空的哦"
mode=
"car"
></u-empty>
<u-empty
v-if=
"emptyshow == true"
text=
"购物车还是空的哦"
mode=
"car"
></u-empty>
<view
v-if=
"list.length > 0"
style=
"height: calc(100vh - 60px-30px-35px-20px);width: calc(100vw);overflow: hidden;padding-top: 10px;"
>
<view
v-if=
"list.length > 0"
style=
"height: calc(100vh - 60px-30px-35px-20px);width: calc(100vw);overflow: hidden;padding-top: 10px;"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:style=
"
{ height: '100%' }">
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:style=
"
{ height: '100%' }">
<template
v-if=
"list.length > 0 && emptyshow==false"
>
<template
v-if=
"list.length > 0 && emptyshow==false"
>
<view
class=
"cartList"
:style=
"
{ 'margin-bottom': listbottom }" v-for="(c, i) in list" :key="i">
<view
class=
"cartList"
:style=
"
{ 'margin-bottom': listbottom }" v-for="(c, i) in list" :key="i">
<view
@
click
.
stop=
"abc()"
<view
@
click
.
stop=
"abc()"
style=
" padding: 0 12px 12px 12px; border-bottom: 1rpx solid #f5f5f5; width: 100%;"
>
style=
" padding: 0 12px 12px 12px; border-bottom: 1rpx solid #f5f5f5; width: 100%;"
>
<u-checkbox-group
@
change=
"mch_SelectAll(c.checked, i)"
>
<u-checkbox-group
@
change=
"mch_SelectAll(c.checked, i)"
>
<u-checkbox
v-model=
"c.checked"
shape=
"circle"
:active-color=
"mc"
>
{{
c
.
MallName
}}
</u-checkbox>
<u-checkbox
v-model=
"c.checked"
shape=
"circle"
:active-color=
"mc"
>
{{
c
.
MallName
}}
</u-checkbox>
</u-checkbox-group>
</u-checkbox-group>
</view>
</view>
<view
class=
"cartList_item"
v-for=
"(item, index) in c.GoodsList"
:key=
"index"
@
click=
"btnclick(item,index,i)"
>
<view
:class=
" u.TenantId!=27?'cartList_item':'cartList_item2'"
v-for=
"(item, index) in c.GoodsList"
:key=
"index"
<view
@
click
.
stop=
"abc()"
style=
"width: 40px;text-align: center;"
v-if=
"(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)"
>
@
click=
"btnclick(item,index,i)"
>
<view
@
click
.
stop=
"abc()"
style=
"width: 40px;text-align: center;"
v-if=
"(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
</u-checkbox-group>
</u-checkbox-group>
</view>
</view>
<view
@
click
.
stop=
"abc()"
style=
"width: 40px;text-align: center;"
v-if=
"(item.GoodsStatus == 1 && IsEducation==1) || (editType == true && IsEducation==1)"
>
<view
@
click
.
stop=
"abc()"
style=
"width: 40px;text-align: center;"
v-if=
"(item.GoodsStatus == 1 && IsEducation==1) || (editType == true && IsEducation==1)"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox-group
@
change=
"clickcheckbox(item.checked, item.Price, index, i)"
>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
<u-checkbox
v-model=
"item.checked"
shape=
"circle"
:active-color=
"mc"
></u-checkbox>
</u-checkbox-group>
</u-checkbox-group>
</view>
</view>
<view
class=
"invalid"
:style=
"
{ background: mc }" v-if="item.GoodsStatus != 1
&&
editType == false">
<view
class=
"invalid"
:style=
"
{ background: mc }"
v-if="item.GoodsStatus != 1
&&
editType == false">
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
失效
</Text>
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
失效
</Text>
</view>
</view>
<view
class=
"invalid"
:style=
"
{ background: mc }" v-if="item.InventoryNum == 0
&&
editType == false
&&
IsEducation!=1">
<view
class=
"invalid"
:style=
"
{ background: mc }"
v-if="item.InventoryNum == 0
&&
editType == false
&&
IsEducation!=1">
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
售馨
</Text>
<Text
style=
"color: #fff; width: 22px;font-size: 20rpx;"
>
售馨
</Text>
</view>
</view>
<image
<image
:src=
"item.CoverImage"
v-if=
'IsEducation!=1'
mode=
"aspectFill"
:src=
"item.CoverImage"
v-if=
'IsEducation!=1'
mode=
"aspectFill"
style=
"width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
style=
"width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
@
click
.
native
.
stop=
"clickHandler(item.GoodsId)"
@
click
.
native
.
stop=
"clickHandler(item.GoodsId)"
/>
/>
<image
:src=
"item.CoverImage"
v-if=
'IsEducation==1'
mode=
"aspectFill"
<image
:src=
"item.CoverImage"
v-if=
'IsEducation==1'
mode=
"aspectFill"
style=
"width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
style=
"width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
@
click
.
native
.
stop=
"clickHandler2(item.GoodsId)"
@
click
.
native
.
stop=
"clickHandler2(item.GoodsId)"
/>
/>
<view
class=
"item-r"
:style=
"
{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1?'150rpx':'65px', }">
<view
:class=
"u.TenantId!=27?'item-r':'item-r2' "
:style=
"
{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1
&&
u.TenantId!=27?'150rpx':u.TenantId==27?'230rpx':'65px', }">
<view
:class=
"IsEducation!=1?'item-r-n':'item-r-n2'"
>
<view
:class=
"IsEducation!=1?'item-r-n':'item-r-n2'"
>
<view
v-if=
"item.MarketingLogo.iswords && item.MarketingLogo.iswords==1&& item.MarketingLogo.words!=''"
class=
"Logo"
:style=
<view
"
{color: item.MarketingLogo.wordsColor,background:item.MarketingLogo.wordsBack ,}">
v-if=
"item.MarketingLogo.iswords && item.MarketingLogo.iswords==1&& item.MarketingLogo.words!=''"
class=
"Logo"
:style=
"
{color: item.MarketingLogo.wordsColor,background:item.MarketingLogo.wordsBack ,}">
{{
item
.
MarketingLogo
.
words
}}
{{
item
.
MarketingLogo
.
words
}}
</view>
</view>
<image
<image
v-if=
"item.MarketingLogo.iswords&&item.MarketingLogo.iswords==2&& item.MarketingLogo.ico!=''"
v-if=
"item.MarketingLogo.iswords&&item.MarketingLogo.iswords==2&& item.MarketingLogo.ico!=''"
mode=
"heightFix"
mode=
"heightFix"
:src=
"item.MarketingLogo.ico"
:src=
"item.MarketingLogo.ico"
style=
" height: 12px;margin-right: 5px"
/>
style=
" height: 12px;margin-right: 5px"
/>
{{
item
.
GoodsName
}}
{{
item
.
GoodsName
}}
</view>
</view>
<view
style=
"width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
v-if=
"IsEducation!=1"
>
<view
style=
"width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
v-if=
"IsEducation!=1"
>
<Text
v-for=
"(attr, inde2x) in item.SpecificationList"
:key=
"inde2x"
<Text
v-for=
"(attr, inde2x) in item.SpecificationList"
:key=
"inde2x"
style=
"color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;"
>
style=
"color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;"
>
{{
attr
}}
{{
attr
}}
</Text>
</Text>
</view>
</view>
<view
style=
"max-width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;margin-top: 2px;"
<view
style=
"max-width: 440rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;margin-top: 2px;"
@
click
.
native
.
stop=
"goUrl(item.FreeShippingUrl)"
@
click
.
native
.
stop=
"goUrl(item.FreeShippingUrl)"
v-if=
"item.FreeShippingName !=null&&IsEducation!=1 && (item.FreeShippingFullMoneyPinkage>0 || item.FreeShippingFullNumPinkage>0)"
>
v-if=
"item.FreeShippingName !=null&&IsEducation!=1 && (item.FreeShippingFullMoneyPinkage>0 || item.FreeShippingFullNumPinkage>0)"
>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;"
>
<view
style=
"color: #FF4048;background: #fdf6ec;padding: 0 5px;display: inline-block;"
>
<Text
style=
"font-size: 20rpx;margin-right: 5rpx;"
>
<Text
style=
"font-size: 20rpx;margin-right: 5rpx;"
>
{{
item
.
FreeShippingName
!=
null
?
item
.
FreeShippingName
+
':'
:
''
}}
{{
item
.
FreeShippingName
!=
null
?
item
.
FreeShippingName
+
':'
:
''
}}
<text
v-if=
"item.FreeShippingFullMoneyPinkage==0 && item.FreeShippingFullNumPinkage>0"
>
{{
item
.
FreeShippingFullNumPinkage
}}
件包邮
</text>
<text
<text
v-if=
"item.FreeShippingFullMoneyPinkage>0 && item.FreeShippingFullNumPinkage==0"
>
满
{{
item
.
FreeShippingFullMoneyPinkage
}}
元包邮
</text>
v-if=
"item.FreeShippingFullMoneyPinkage==0 && item.FreeShippingFullNumPinkage>0"
>
{{
item
.
FreeShippingFullNumPinkage
}}
件包邮
</text>
<text
v-if=
"item.FreeShippingFullMoneyPinkage>0 && item.FreeShippingFullNumPinkage==0"
>
满
{{
item
.
FreeShippingFullMoneyPinkage
}}
元包邮
</text>
</Text>
</Text>
</view>
</view>
</view>
</view>
<view
@
click
.
stop=
"abc()"
style=
"display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
<!-- 新增上课时间 -->
<Text
v-shpw=
'u.TenantId==27'
style=
"color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;"
>
上课时间:
{{
attr
}}
</Text>
<!-- 课程数量 -->
<Text
v-shpw=
'u.TenantId==27'
style=
"color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;"
>
课程数量:
{{
attr
}}
次
</Text>
<view
@
click
.
stop=
"abc()"
style=
"display: flex;flex-direction: row;align-items: center;justify-content: space-between;"
>
<Text
style=
"font-size: 30rpx;"
:style=
"
{ color: pricecolor }">
<Text
style=
"font-size: 30rpx;"
:style=
"
{ color: pricecolor }">
¥
<Text
style=
"40rpx"
>
{{
item
.
Price
}}
</Text>
¥
<Text
style=
"40rpx"
>
{{
item
.
Price
}}
</Text>
</Text>
</Text>
<u-number-box
v-if=
'IsEducation!=1'
v-model=
"item.Number"
<u-number-box
v-if=
'IsEducation!=1&&u.TenantId!=27'
v-model=
"item.Number"
:min=
"1"
:min=
"1"
:max=
"item.InventoryNum"
:max=
"item.InventoryNum"
@
change=
"valChange(i, index, item.Number, item.Price, $event)"
@
change=
"valChange(i, index, item.Number, item.Price, $event)"
></u-number-box>
></u-number-box>
</view>
</view>
<Text
v-if=
"item.GoodsStatus != 1 && editType == false&&IsEducation!=1"
style=
"font-size: 20rpx;color:#a0a09d ;"
>
失效原因:商品下架或者库存不足
</Text>
<!-- 新增绑定物品 -->
<Text
v-if=
"item.GoodsStatus != 1 && editType == false&&IsEducation==1"
style=
"font-size: 20rpx;color:#a0a09d ;"
>
失效原因:课程下架
</Text>
<view>
<Text
v-shpw=
'u.TenantId==27'
style=
"color: #a0a09d;font-size: 20rpx;margin-right: 5rpx;"
>
已选物品:
{{
attr
}}
</Text>
<view
style=
"font-size: 30rpx;"
:style=
"
{ color: pricecolor }">
¥
<Text
style=
"40rpx"
>
{{
item
.
Price
}}
</Text>
</view>
</view>
</view>
</view>
<!-- 新增绑定物品 -->
<Text
v-if=
"item.GoodsStatus != 1 && editType == false&&IsEducation!=1"
style=
"font-size: 20rpx;color:#a0a09d ;"
>
失效原因:商品下架或者库存不足
</Text>
<Text
v-if=
"item.GoodsStatus != 1 && editType == false&&IsEducation==1"
style=
"font-size: 20rpx;color:#a0a09d ;"
>
失效原因:课程下架
</Text>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
</view>
</view>
<view
class=
"box_bottom"
:style=
"{'margin-bottom':bottommargin}"
>
<view
class=
"box_bottom"
:style=
"{'margin-bottom':bottommargin}"
>
<div
style=
"margin-left: 30rpx;"
>
<div
style=
"margin-left: 30rpx;"
>
<u-checkbox-group
@
change=
"SelectAll"
>
<u-checkbox-group
@
change=
"SelectAll"
>
<u-checkbox
v-model=
"allchecked"
shape=
"circle"
:active-color=
"mc"
>
全选
</u-checkbox>
<u-checkbox
v-model=
"allchecked"
shape=
"circle"
:active-color=
"mc"
>
全选
</u-checkbox>
</u-checkbox-group>
</u-checkbox-group>
<Text
style=
"font-size: 30rpx;"
:style=
"{ color: pricecolor }"
v-if=
"editType == false"
>
¥{{ TotalPrice }}
</Text>
<Text
style=
"font-size: 30rpx;"
:style=
"{ color: pricecolor }"
v-if=
"editType == false"
>
¥{{ TotalPrice }}
</Text>
</div>
</div>
<div
class=
"bottom_btn"
v-if=
"!editType"
>
<div
class=
"bottom_btn"
v-if=
"!editType"
>
<u-button
<u-button
size=
"80"
:ripple=
"true"
shape=
"circle"
@
click=
"settlement"
:custom-style=
"{
size=
"80"
:ripple=
"true"
shape=
"circle"
@
click=
"settlement"
:custom-style=
"{
backgroundColor: mc,
backgroundColor: mc,
height: '80rpx',
height: '80rpx',
color: '#FFF',
color: '#FFF',
fontSize: '14px'
fontSize: '14px'
}"
}"
>
>
去结算({{ checkCount }})
去结算({{ checkCount }})
</u-button>
</u-button>
</div>
</div>
<u-button
<u-button
v-if=
"editType"
size=
"80"
:ripple=
"true"
shape=
"circle"
@
click=
"delete_btn"
:custom-style=
"{
v-if=
"editType"
size=
"80"
:ripple=
"true"
shape=
"circle"
@
click=
"delete_btn"
:custom-style=
"{
backgroundColor: mc,
backgroundColor: mc,
height: '80rpx',
height: '80rpx',
color: '#FFF',
color: '#FFF',
fontSize: '14px',
fontSize: '14px',
marginRight: '12px'
marginRight: '12px'
}"
}"
>
>
删除
删除
</u-button>
</u-button>
</view>
</view>
...
@@ -158,12 +172,12 @@
...
@@ -158,12 +172,12 @@
<tabbars></tabbars>
<tabbars></tabbars>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
tabbars
from
'@/components/tabbar/index'
;
import
tabbars
from
'@/components/tabbar/index'
;
import
auth
from
"@/components/auth/index.vue"
;
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isloading
:
false
,
isloading
:
false
,
...
@@ -171,7 +185,7 @@ export default {
...
@@ -171,7 +185,7 @@ export default {
navHeight
:
0
,
navHeight
:
0
,
contentHeight
:
0
,
contentHeight
:
0
,
cstyle
:
{},
cstyle
:
{},
emptyshow
:
false
,
emptyshow
:
false
,
allchecked
:
false
,
allchecked
:
false
,
TotalPrice
:
0
,
//总价格
TotalPrice
:
0
,
//总价格
bottommargin
:
0
,
bottommargin
:
0
,
...
@@ -181,7 +195,7 @@ export default {
...
@@ -181,7 +195,7 @@ export default {
cart_id_list
:
[],
cart_id_list
:
[],
mc
:
''
,
mc
:
''
,
pricecolor
:
''
,
pricecolor
:
''
,
secondary
:
''
,
secondary
:
''
,
checkCount
:
0
,
checkCount
:
0
,
msg
:
{
msg
:
{
...
@@ -189,10 +203,10 @@ export default {
...
@@ -189,10 +203,10 @@ export default {
pageSize
:
50
,
pageSize
:
50
,
Name
:
''
Name
:
''
},
},
u
:
{},
u
:
{},
showAuth
:
false
,
showAuth
:
false
,
IsEducation
:
0
,
//1是0否是网课模式
IsEducation
:
0
,
//1是0否是网课模式
item_r
:
0
,
//课程模式下的宽度
item_r
:
0
,
//课程模式下的宽度
};
};
},
},
created
()
{},
created
()
{},
...
@@ -206,15 +220,15 @@ export default {
...
@@ -206,15 +220,15 @@ export default {
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
this
.
cstyle
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
cat_style
:
[];
this
.
cstyle
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
cat_style
:
[];
this
.
IsEducation
=
uni
.
getStorageSync
(
'basedata'
)
this
.
IsEducation
=
uni
.
getStorageSync
(
'basedata'
)
?
?
(
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
:
0
)
(
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
?
uni
.
getStorageSync
(
'basedata'
).
mall
:
0
;
.
setting
.
mallStyle
.
IsEducation
:
0
)
:
0
;
let
windowWidth
=
this
.
$utils
.
SystemInfo
().
windowWidth
;
let
windowWidth
=
this
.
$utils
.
SystemInfo
().
windowWidth
;
this
.
item_r
=
(
windowWidth
-
5
-
40
-
116
-
15
-
10
)
+
'px'
this
.
item_r
=
(
windowWidth
-
5
-
40
-
116
-
15
-
10
)
+
'px'
if
(
this
.
cstyle
.
cat_style
==
'4'
)
{
if
(
this
.
cstyle
.
cat_style
==
'4'
)
{}
}
},
},
onShow
()
{
onShow
()
{
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
this
.
u
=
uni
.
getStorageSync
(
'mall_UserInfo'
);
if
(
!
this
.
u
)
{
if
(
!
this
.
u
)
{
this
.
u
=
{
this
.
u
=
{
...
@@ -222,10 +236,10 @@ export default {
...
@@ -222,10 +236,10 @@ export default {
avatarUrl
:
''
avatarUrl
:
''
};
};
this
.
showAuth
=
true
;
this
.
showAuth
=
true
;
}
else
{
}
else
{
this
.
init
();
this
.
init
();
this
.
TotalPrice
=
0
;
this
.
TotalPrice
=
0
;
this
.
checkCount
=
0
;
this
.
checkCount
=
0
;
}
}
},
},
...
@@ -255,8 +269,8 @@ export default {
...
@@ -255,8 +269,8 @@ export default {
this
.
init
()
this
.
init
()
},
},
//关闭登录窗口
//关闭登录窗口
gbAuth
()
{
gbAuth
()
{
this
.
showAuth
=
false
;
this
.
showAuth
=
false
;
},
},
goHome
()
{
goHome
()
{
uni
.
redirectTo
({
uni
.
redirectTo
({
...
@@ -265,12 +279,11 @@ export default {
...
@@ -265,12 +279,11 @@ export default {
},
},
init
()
{
init
()
{
uni
.
showNavigationBarLoading
();
uni
.
showNavigationBarLoading
();
this
.
isloading
=
true
;
this
.
isloading
=
true
;
if
(
this
.
IsEducation
==
1
)
{
if
(
this
.
IsEducation
==
1
)
{
this
.
msg
.
GoodsClassify
=
2
this
.
msg
.
GoodsClassify
=
2
}
}
this
.
request2
(
this
.
request2
({
{
url
:
'/api/AppletOrder/GetGoodsShoppingCartPageList'
,
url
:
'/api/AppletOrder/GetGoodsShoppingCartPageList'
,
data
:
this
.
msg
data
:
this
.
msg
},
},
...
@@ -288,10 +301,10 @@ export default {
...
@@ -288,10 +301,10 @@ export default {
j
.
MarketingLogo
=
JSON
.
parse
(
j
.
MarketingLogo
)
j
.
MarketingLogo
=
JSON
.
parse
(
j
.
MarketingLogo
)
j
.
checked
=
false
;
j
.
checked
=
false
;
j
.
id
=
j
.
Id
;
j
.
id
=
j
.
Id
;
});
});
if
(
x
.
GoodsList
.
length
>
0
)
{
if
(
x
.
GoodsList
.
length
>
0
)
{
empty
=
false
empty
=
false
}
}
});
});
this
.
emptyshow
=
empty
this
.
emptyshow
=
empty
...
@@ -307,12 +320,14 @@ export default {
...
@@ -307,12 +320,14 @@ export default {
);
);
},
},
btnclick
(
item
,
index
,
i
){
//点击最外层做的事
btnclick
(
item
,
index
,
i
)
{
//点击最外层做的事
if
((
item
.
GoodsStatus
==
1
&&
item
.
InventoryNum
!=
0
&&
this
.
IsEducation
!=
1
)
||
(
this
.
editType
==
true
&&
this
.
IsEducation
!=
1
)){
if
((
item
.
GoodsStatus
==
1
&&
item
.
InventoryNum
!=
0
&&
this
.
IsEducation
!=
1
)
||
(
this
.
editType
==
this
.
list
[
i
].
GoodsList
[
index
].
checked
=
!
this
.
list
[
i
].
GoodsList
[
index
].
checked
true
&&
this
.
IsEducation
!=
1
))
{
this
.
list
[
i
].
GoodsList
[
index
].
checked
=
!
this
.
list
[
i
].
GoodsList
[
index
].
checked
this
.
clickcheckbox
(
item
.
checked
,
item
.
Price
,
index
,
i
)
this
.
clickcheckbox
(
item
.
checked
,
item
.
Price
,
index
,
i
)
}
else
if
((
item
.
GoodsStatus
==
1
&&
this
.
IsEducation
==
1
)
||
(
this
.
editType
==
true
&&
this
.
IsEducation
==
1
)){
}
else
if
((
item
.
GoodsStatus
==
1
&&
this
.
IsEducation
==
1
)
||
(
this
.
editType
==
true
&&
this
this
.
list
[
i
].
GoodsList
[
index
].
checked
=
!
this
.
list
[
i
].
GoodsList
[
index
].
checked
.
IsEducation
==
1
))
{
this
.
list
[
i
].
GoodsList
[
index
].
checked
=
!
this
.
list
[
i
].
GoodsList
[
index
].
checked
this
.
clickcheckbox
(
item
.
checked
,
item
.
Price
,
index
,
i
)
this
.
clickcheckbox
(
item
.
checked
,
item
.
Price
,
index
,
i
)
}
}
},
},
...
@@ -381,14 +396,14 @@ export default {
...
@@ -381,14 +396,14 @@ export default {
this
.
TotalPrice
=
parseFloat
(
this
.
TotalPrice
.
toFixed
(
2
));
this
.
TotalPrice
=
parseFloat
(
this
.
TotalPrice
.
toFixed
(
2
));
},
},
mch_SelectAll
(
checked
,
i
)
{
mch_SelectAll
(
checked
,
i
)
{
console
.
log
(
checked
,
'checked'
)
console
.
log
(
checked
,
'checked'
)
if
(
checked
==
true
)
{
if
(
checked
==
true
)
{
let
add_cartlist
=
[];
let
add_cartlist
=
[];
let
new_statusnum
=
0
;
let
new_statusnum
=
0
;
this
.
list
[
i
].
GoodsList
.
forEach
(
x
=>
{
this
.
list
[
i
].
GoodsList
.
forEach
(
x
=>
{
if
(
x
.
GoodsStatus
==
1
&&
x
.
InventoryNum
>
0
)
{
if
(
x
.
GoodsStatus
==
1
&&
x
.
InventoryNum
>
0
)
{
if
(
x
.
checked
==
false
)
{
if
(
x
.
checked
==
false
)
{
this
.
TotalPrice
+=
parseFloat
((
x
.
Price
*
x
.
Number
).
toFixed
(
2
));
this
.
TotalPrice
+=
parseFloat
((
x
.
Price
*
x
.
Number
).
toFixed
(
2
));
x
.
checked
=
true
;
x
.
checked
=
true
;
...
@@ -432,7 +447,7 @@ export default {
...
@@ -432,7 +447,7 @@ export default {
let
new_statusnum
=
0
;
let
new_statusnum
=
0
;
this
.
list
[
i
].
GoodsList
.
forEach
(
x
=>
{
this
.
list
[
i
].
GoodsList
.
forEach
(
x
=>
{
if
(
x
.
GoodsStatus
==
1
)
{
if
(
x
.
GoodsStatus
==
1
)
{
if
(
x
.
checked
==
true
)
{
if
(
x
.
checked
==
true
)
{
this
.
TotalPrice
-=
parseFloat
((
x
.
Price
*
x
.
Number
).
toFixed
(
2
));
this
.
TotalPrice
-=
parseFloat
((
x
.
Price
*
x
.
Number
).
toFixed
(
2
));
new_statusnum
++
;
new_statusnum
++
;
x
.
checked
=
false
;
x
.
checked
=
false
;
...
@@ -459,7 +474,7 @@ export default {
...
@@ -459,7 +474,7 @@ export default {
list
.
forEach
(
x
=>
{
list
.
forEach
(
x
=>
{
x
.
checked
=
true
;
x
.
checked
=
true
;
x
.
GoodsList
.
forEach
(
j
=>
{
x
.
GoodsList
.
forEach
(
j
=>
{
if
(
j
.
GoodsStatus
==
1
&&
j
.
InventoryNum
>
0
)
{
if
(
j
.
GoodsStatus
==
1
&&
j
.
InventoryNum
>
0
)
{
j
.
checked
=
true
;
j
.
checked
=
true
;
this
.
checkCount
++
;
this
.
checkCount
++
;
this
.
TotalPrice
+=
parseFloat
((
j
.
Price
*
j
.
Number
).
toFixed
(
2
));
this
.
TotalPrice
+=
parseFloat
((
j
.
Price
*
j
.
Number
).
toFixed
(
2
));
...
@@ -522,17 +537,18 @@ export default {
...
@@ -522,17 +537,18 @@ export default {
delete_btn
()
{
delete_btn
()
{
if
(
this
.
cart_id_list
.
length
>
0
)
{
if
(
this
.
cart_id_list
.
length
>
0
)
{
uni
.
showNavigationBarLoading
();
uni
.
showNavigationBarLoading
();
let
arr
=
[];
let
arr
=
[];
this
.
cart_id_list
.
forEach
(
item
=>
{
this
.
cart_id_list
.
forEach
(
item
=>
{
arr
.
push
(
item
.
id
);
arr
.
push
(
item
.
id
);
})
})
this
.
request2
(
this
.
request2
({
{
url
:
'/api/AppletOrder/DelGoodsShoppingCartInfo'
,
url
:
'/api/AppletOrder/DelGoodsShoppingCartInfo'
,
data
:
{
ShoppingCartIdList
:
arr
}
data
:
{
ShoppingCartIdList
:
arr
}
},
},
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
init
();
this
.
init
();
this
.
TotalPrice
=
0
;
this
.
TotalPrice
=
0
;
this
.
editType
=
false
;
this
.
editType
=
false
;
...
@@ -555,7 +571,7 @@ export default {
...
@@ -555,7 +571,7 @@ export default {
}
}
},
},
settlement
()
{
settlement
()
{
let
ShoppingCartIdList
=
[];
let
ShoppingCartIdList
=
[];
if
(
this
.
checkCount
>
0
)
{
if
(
this
.
checkCount
>
0
)
{
let
forms
=
{};
let
forms
=
{};
this
.
list
.
forEach
(
y
=>
{
this
.
list
.
forEach
(
y
=>
{
...
@@ -564,12 +580,12 @@ export default {
...
@@ -564,12 +580,12 @@ export default {
DetailList
:
[],
DetailList
:
[],
Use_Integral
:
0
,
Use_Integral
:
0
,
User_Coupon_Id
:
0
,
User_Coupon_Id
:
0
,
DeliveryMethod
:
0
,
DeliveryMethod
:
0
,
AddressId
:
0
,
AddressId
:
0
,
};
};
y
.
GoodsList
.
forEach
(
x
=>
{
y
.
GoodsList
.
forEach
(
x
=>
{
if
(
x
.
checked
)
{
if
(
x
.
checked
)
{
console
.
log
(
"x"
,
x
)
console
.
log
(
"x"
,
x
)
ShoppingCartIdList
.
push
(
x
.
Id
)
ShoppingCartIdList
.
push
(
x
.
Id
)
let
g
=
{
let
g
=
{
GoodsId
:
x
.
GoodsId
,
GoodsId
:
x
.
GoodsId
,
...
@@ -581,16 +597,20 @@ export default {
...
@@ -581,16 +597,20 @@ export default {
}
}
});
});
forms
=
good
;
forms
=
good
;
console
.
log
(
"forms"
,
forms
)
console
.
log
(
"forms"
,
forms
)
});
});
if
(
this
.
IsEducation
!=
1
)
{
if
(
this
.
IsEducation
!=
1
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/order-submit/order-submit?formData='
+
encodeURIComponent
(
JSON
.
stringify
(
forms
))
+
'&IsFormShoppingCart=1&ShoppingCartIdList='
+
JSON
.
stringify
(
ShoppingCartIdList
)
url
:
'/pages/order-submit/order-submit?formData='
+
encodeURIComponent
(
JSON
.
stringify
(
forms
))
+
'&IsFormShoppingCart=1&ShoppingCartIdList='
+
JSON
.
stringify
(
ShoppingCartIdList
)
});
});
}
else
if
(
this
.
IsEducation
==
1
)
{
}
else
if
(
this
.
IsEducation
==
1
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/school/course-submit?DetailList='
+
encodeURIComponent
(
JSON
.
stringify
(
forms
.
DetailList
))
+
'&IsFormShoppingCart=1&ShoppingCartIdList='
+
JSON
.
stringify
(
ShoppingCartIdList
)
url
:
'/pages/school/course-submit?DetailList='
+
encodeURIComponent
(
JSON
.
stringify
(
forms
.
DetailList
))
+
'&IsFormShoppingCart=1&ShoppingCartIdList='
+
JSON
.
stringify
(
ShoppingCartIdList
)
});
});
}
}
...
@@ -608,8 +628,10 @@ export default {
...
@@ -608,8 +628,10 @@ export default {
url
:
'/pages/goods/goods?id='
+
id
url
:
'/pages/goods/goods?id='
+
id
});
});
},
},
clickHandler2
(
id
){
//购物车跳到课程详情
clickHandler2
(
id
)
{
//购物车跳到课程详情
uni
.
navigateTo
({
url
:
"/pages/school/courseInfo?GoodsId="
+
id
});
uni
.
navigateTo
({
url
:
"/pages/school/courseInfo?GoodsId="
+
id
});
},
},
goUrl
(
url
)
{
goUrl
(
url
)
{
console
.
log
(
url
)
console
.
log
(
url
)
...
@@ -617,54 +639,61 @@ export default {
...
@@ -617,54 +639,61 @@ export default {
url
:
url
url
:
url
});
});
},
},
abc
(){
//阻止change的事件冒泡
abc
()
{
//阻止change的事件冒泡
},
},
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
.cartStyle
{
.cartStyle
{
height
:
100%
;
height
:
100%
;
position
:
relative
;
position
:
relative
;
font-family
:
'oswald'
;
font-family
:
'oswald'
;
}
}
.cartStyle
.u-checkbox__label
{
.cartStyle
.u-checkbox__label
{
margin-left
:
12px
;
margin-left
:
12px
;
}
}
.cartStyle
.grid-text
{
.cartStyle
.grid-text
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
margin-top
:
4
rpx
;
margin-top
:
4
rpx
;
color
:
#939393
;
color
:
#939393
;
}
}
.cartStyle
.grid-text_r
{
.cartStyle
.grid-text_r
{
margin-top
:
4
rpx
;
margin-top
:
4
rpx
;
margin-right
:
10
rpx
;
margin-right
:
10
rpx
;
}
}
.cartStyle
.cartList
{
.cartStyle
.cartList
{
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
overflow-y
:
hidden
;
overflow-y
:
hidden
;
}
}
.cartStyle
.cartList
.cartList_item
{
.cartStyle
.cartList
.cartList_item
{
width
:
100%
;
width
:
100%
;
padding
:
30
rpx
30
rpx
30
rpx
10
rpx
;
padding
:
30
rpx
30
rpx
30
rpx
10
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
border-bottom
:
1
rpx
solid
#f5f5f5
;
border-bottom
:
1
rpx
solid
#f5f5f5
;
}
.cartList_item2
{
width
:
100%
;
padding
:
30
rpx
30
rpx
30
rpx
10
rpx
;
display
:
flex
;
flex-direction
:
row
;
/* align-items: center; */
border-bottom
:
1
rpx
solid
#f5f5f5
;
}
}
.cartList
.cartList_item
.item_input
{
.cartList
.cartList_item
.item_input
{
width
:
200
rpx
;
width
:
200
rpx
;
height
:
60
rpx
;
height
:
60
rpx
;
background
:
#f7f7f7
;
background
:
#f7f7f7
;
...
@@ -672,26 +701,26 @@ export default {
...
@@ -672,26 +701,26 @@ export default {
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.cartList
.item_input
.item_input_l
,
.cartList
.item_input
.item_input_l
,
.item_input_r
{
.item_input_r
{
width
:
50
rpx
;
width
:
50
rpx
;
height
:
60
rpx
;
height
:
60
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.cartStyle
.item_input
.item_input_c
{
.cartStyle
.item_input
.item_input_c
{
text-align
:
center
;
text-align
:
center
;
width
:
50
rpx
;
width
:
50
rpx
;
height
:
60
rpx
;
height
:
60
rpx
;
font-size
:
20
rpx
;
font-size
:
20
rpx
;
}
}
.cartStyle
.box_bottom
{
.cartStyle
.box_bottom
{
width
:
100%
;
width
:
100%
;
height
:
50px
;
height
:
50px
;
position
:
fixed
;
position
:
fixed
;
...
@@ -704,47 +733,70 @@ export default {
...
@@ -704,47 +733,70 @@ export default {
justify-content
:
space-between
;
justify-content
:
space-between
;
border-top
:
1
rpx
solid
#f5f5f5
;
border-top
:
1
rpx
solid
#f5f5f5
;
z-index
:
999
;
z-index
:
999
;
}
}
.cartStyle
.bottom_btn
{
.cartStyle
.bottom_btn
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
width
:
250
rpx
;
width
:
250
rpx
;
height
:
50px
;
height
:
50px
;
}
}
.cartStyle
.Deletestyle
{
.cartStyle
.Deletestyle
{
margin-right
:
40
rpx
;
margin-right
:
40
rpx
;
}
}
.cartStyle
.invalid
{
.cartStyle
.invalid
{
text-align
:
center
;
text-align
:
center
;
width
:
40px
;
width
:
40px
;
height
:
20px
;
height
:
20px
;
line-height
:
18px
;
line-height
:
18px
;
border-radius
:
10px
;
border-radius
:
10px
;
}
}
.cartStyle
.Logo
{
.cartStyle
.Logo
{
padding
:
1px
5px
;
padding
:
1px
5px
;
display
:
inline-block
;
display
:
inline-block
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
margin-right
:
5
rpx
;
margin-right
:
5
rpx
;
border-radius
:
4px
;
border-radius
:
4px
;
}
}
.cartStyle
.item-r
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
width
:
440
rpx
;
height
:
150
rpx
;
margin-left
:
20
rpx
;
}
.cartStyle
.item-r-n
{
font-size
:
26
rpx
;
width
:
440
rpx
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.cartStyle
.item-r
{
.cartStyle
.item-r-n2
{
display
:
flex
;
font-size
:
26
rpx
;
width
:
100%
;
flex-direction
:
column
;
justify-content
:
space-between
;
width
:
440
rpx
;
height
:
150
rpx
;
margin-left
:
20
rpx
;
}
.cartStyle
.item-r-n
{
font-size
:
26
rpx
;
width
:
440
rpx
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.item-r2
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-end
;
width
:
440
rpx
;
height
:
150
rpx
;
margin-left
:
20
rpx
;
}
.cartStyle
.item-r-n2
{
font-size
:
26
rpx
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
-webkit-box-orient
:
vertical
;
}
}
</
style
>
</
style
>
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