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
8016a70e
Commit
8016a70e
authored
May 27, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
f92a566c
a6040332
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1214 additions
and
987 deletions
+1214
-987
App.vue
App.vue
+1
-1
goodsku.vue
components/goods/goodsku.vue
+17
-5
list.vue
components/goods/list.vue
+26
-15
pages.json
pages.json
+7
-4
cart.vue
pages/cart/cart.vue
+721
-592
goods.vue
pages/goods/goods.vue
+12
-6
order-submit.vue
pages/order-submit/order-submit.vue
+1
-1
index.vue
pages/order/index/index.vue
+429
-363
No files found.
App.vue
View file @
8016a70e
...
...
@@ -104,7 +104,7 @@ export default {
font-family
:
"oswald"
;
src
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf")
;
}
*
{
html
,
body
{
font-family
:
"oswald"
!
important
;
}
swiper
{
...
...
components/goods/goodsku.vue
View file @
8016a70e
...
...
@@ -147,6 +147,20 @@ export default {
g
:
{},
skuObj
:
null
,
notStockGood
:
[],
forms
:{
list
:
[
{
mch_id
:
0
,
goods_list
:
[],
distance
:
0
,
remark
:
""
,
order_form
:
[],
use_integral
:
0
,
user_coupon_id
:
0
,
},
],
address_id
:
0
,
}
};
},
mounted
()
{
...
...
@@ -224,7 +238,6 @@ export default {
},
buy
()
{
if
(
this
.
skuObj
&&
this
.
skuObj
.
id
)
{
let
goods
=
[];
let
g
=
{
id
:
this
.
skuObj
.
goods_id
,
num
:
this
.
gc
,
...
...
@@ -238,12 +251,11 @@ export default {
attr_group_id
:
x
.
attr_group_id
,
});
});
goods
.
push
(
g
);
console
.
log
(
goods
);
this
.
forms
.
list
[
0
].
goods_list
.
push
(
g
)
this
.
forms
.
list
[
0
].
mch_id
=
this
.
g
.
mch_id
uni
.
navigateTo
({
url
:
"/pages/order-submit/order-submit?goods="
+
encodeURIComponent
(
JSON
.
stringify
(
goods
)),
"/pages/order-submit/order-submit?formData="
+
encodeURIComponent
(
JSON
.
stringify
(
this
.
forms
)),
complete
(
res
)
{
console
.
log
(
res
);
},
...
...
components/goods/list.vue
View file @
8016a70e
...
...
@@ -10,41 +10,49 @@
style=
"width: 100%; height: 100%;"
/>
</view>
<view
class=
"good-name"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name=='1'"
>
{{
cx
.
name
}}
</view>
<view
class=
"good-info"
>
<view
class=
"price"
:style=
"
{ color: mainColor }">
{{
cx
.
price_content
}}
</view>
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<view
class=
"sell"
v-if=
"setting.is_show_sales_num=='1'"
>
{{
cx
.
sales
}}
</view>
<view
v-if=
"setting.is_show_cart=='1'"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<u-icon
name=
"cart-o"
size=
"40"
:color=
"mainColor"
/>
</view>
</view>
</view>
</u-col>
</u-row>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
<good-sku
v-if=
"showSku"
:option-type=
"2"
borderRadius=
"20"
v-model=
"showSku"
:good=
"sku"
></good-sku>
</view>
</
template
>
<
script
>
import
goodSku
from
'../goods/goodsku'
import
goodSku
from
"../goods/goodsku"
;
export
default
{
components
:{
goodSku
components
:
{
goodSku
,
},
props
:
[
"list"
],
data
()
{
return
{
g
:
[],
showSku
:
false
,
sku
:{},
mainColor
:
""
showSku
:
false
,
sku
:
{},
mainColor
:
""
,
setting
:{}
};
},
mounted
()
{
this
.
g
=
this
.
list
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
initConfig
()
},
watch
:
{
list
:
{
...
...
@@ -52,19 +60,22 @@ export default {
immediate
:
true
,
handler
:
function
(
newVal
,
oldVal
)
{
this
.
g
=
newVal
;
}
}
,
},
},
methods
:
{
initConfig
()
{
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
},
clickHandler
(
url
)
{
uni
.
navigateTo
({
url
:
url
,
});
},
showSkuHandler
(
g
)
{
this
.
sku
=
g
this
.
showSku
=
true
}
showSkuHandler
(
g
)
{
this
.
sku
=
g
;
this
.
showSku
=
true
;
}
,
},
};
</
script
>
...
...
pages.json
View file @
8016a70e
...
...
@@ -3,8 +3,15 @@
"^u-(.*)"
:
"uview-ui/components/u-$1/u-$1.vue"
},
"pages"
:
[{
"path"
:
"pages/order/index/index"
},
{
"path"
:
"pages/index/index"
},
{
"path"
:
"pages/order-submit/order-submit"
},
{
"path"
:
"pages/search/search"
},
...
...
@@ -46,10 +53,6 @@
},
{
"path"
:
"pages/order/index"
},
{
"path"
:
"pages/order/index/index"
}
],
"globalStyle"
:
{
...
...
pages/cart/cart.vue
View file @
8016a70e
This diff is collapsed.
Click to expand it.
pages/goods/goods.vue
View file @
8016a70e
...
...
@@ -11,6 +11,7 @@
:border-radius=
"0"
@
click=
"previewImage"
></u-swiper>
<!-- TODO 分销价格未做 is_share_price -->
</view>
<view
class=
"g-info"
>
<view
class=
"g-name u-skeleton-rect"
>
{{
g
.
name
}}
</view>
...
...
@@ -24,9 +25,11 @@
:
g
.
price_min
+
"-"
+
g
.
price_max
}}
</text>
</view>
<!-- TODO is_common_user_member_price 普通用户会员价 -->
<!-- TODO is_member_user_member_price 会员用户会员价 -->
<view
class=
"sell u-skeleton-rect"
>
<text
class=
"oprice"
>
{{
g
.
original_price
}}
</text>
<text>
已售出
{{
g
.
sales
}}{{
g
.
unit
}}
</text>
<text
class=
"oprice"
v-if=
"setting.is_underline_price=='1'"
>
{{
g
.
original_price
}}
</text>
<text
v-if=
"setting.is_sales=='1'"
>
已售出
{{
g
.
sales
}}{{
g
.
unit
}}
</text>
</view>
</view>
<view
class=
"right u-skeleton-rect"
>
...
...
@@ -91,7 +94,7 @@
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"setting.is_express=='1'"
>
<view
class=
"label"
>
快递
</view>
<view
class=
"content"
>
{{ g.express == "" ? "免运费" : g.express }}
...
...
@@ -120,7 +123,7 @@
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.comments.length == 0"
v-if=
"comments.comments.length == 0
&& setting.is_comment=='1'
"
>
<view
class=
"label"
>
暂无评论信息
</view>
</view>
...
...
@@ -168,7 +171,8 @@
</view>
<u-skeleton
:loading=
"loading"
v-if=
"loading"
:loading=
"true"
:animation=
"true"
bgColor=
"#FFF"
></u-skeleton>
...
...
@@ -211,7 +215,7 @@ export default {
data
()
{
return
{
id
:
0
,
loading
:
fals
e
,
loading
:
tru
e
,
g
:
{},
imgs
:
[],
mc
:
""
,
...
...
@@ -226,6 +230,7 @@ export default {
currentSku
:
{},
isExsitGoods
:
true
,
pageTitle
:
"商品详情"
,
setting
:{}
};
},
components
:
{
...
...
@@ -240,6 +245,7 @@ export default {
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
initPage
();
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
},
methods
:
{
initPage
()
{
...
...
pages/order-submit/order-submit.vue
View file @
8016a70e
...
...
@@ -267,7 +267,7 @@ export default {
if
(
option
.
goods
)
{
this
.
formData
.
list
[
0
].
goods_list
=
JSON
.
parse
(
decodeURIComponent
(
option
.
goods
));
}
else
if
(
option
.
formData
)
{
this
.
formData
=
JSON
.
parse
(
option
.
formData
);
this
.
formData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
)
);
}
else
{
uni
.
redirectTo
({
url
:
'/pages/index/index'
...
...
pages/order/index/index.vue
View file @
8016a70e
This diff is collapsed.
Click to expand it.
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