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
7b41b5ad
Commit
7b41b5ad
authored
Jun 12, 2020
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复BUG
parent
7beacd5b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
64 deletions
+116
-64
App.vue
App.vue
+28
-24
list.vue
components/goods/list.vue
+3
-3
index.vue
components/tabbar/index.vue
+19
-23
share.vue
pages/goods/components/share/share.vue
+2
-1
draw.vue
pages/goods/draw.vue
+30
-6
goods.vue
pages/goods/goods.vue
+5
-5
api.js
plugin/api.js
+29
-2
No files found.
App.vue
View file @
7b41b5ad
...
...
@@ -13,30 +13,33 @@ export default {
},
onShow
:
function
()
{
//console.log('App Show')
this
.
formatNavigation
();
},
onHide
:
function
()
{
//console.log('App Hide')
},
methods
:
{
init
()
{
if
(
uni
.
getStorageSync
(
"basedata"
))
{
this
.
basedata
=
uni
.
getStorageSync
(
"basedata"
);
this
.
formatTabbar
();
}
else
{
this
.
request2
(
{
url
:
'/api/Mall/GetHome'
,
data
:
{
},
},
(
res
)
=>
{
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
this
.
basedata
=
res
.
data
;
this
.
formatTabbar
();
}
);
}
console
.
log
(
uni
.
getStorageSync
(
"basedata"
));
// if (uni.getStorageSync("basedata")) {
// this.basedata = uni.getStorageSync("basedata");
// this.formatTabbar();
// this.formatNavigation();
// } else {
this
.
request2
(
{
url
:
"/api/Mall/GetHome"
,
data
:
{},
},
(
res
)
=>
{
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
this
.
basedata
=
res
.
data
;
this
.
$uiConfig
.
mainColor
=
this
.
basedata
.
mall
.
setting
.
mallStyle
.
main
this
.
$uiConfig
.
secondary
=
this
.
basedata
.
mall
.
setting
.
mallStyle
.
secondary
this
.
formatTabbar
();
this
.
formatNavigation
();
}
);
//}
},
formatPlat
()
{
let
modelmes
=
uni
.
getSystemInfoSync
().
model
;
...
...
@@ -67,9 +70,9 @@ export default {
timingFunc
:
"easeIn"
,
},
});
uni
.
setNavigationBarTitle
({
title
:
this
.
basedata
.
mall
.
name
,
});
//
uni.setNavigationBarTitle({
//
title: this.basedata.mall.name,
//
});
},
formatTabbar
()
{
let
navs
=
this
.
basedata
.
navbar
.
navs
;
...
...
@@ -102,10 +105,11 @@ export default {
font-family
:
"oswald"
;
src
:
url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf")
;
}
html
,
body
{
html
,
body
{
font-family
:
"oswald"
!
important
;
}
swiper
{
swiper
{
height
:
unset
;
}
</
style
>
\ No newline at end of file
</
style
>
components/goods/list.vue
View file @
7b41b5ad
...
...
@@ -10,13 +10,13 @@
style=
"width: 100%; height: 100%;"
/>
</view>
<view
class=
"good-name"
v-if=
"setting.is_show_goods_name==
'1'
"
>
{{
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
}}
</view>
<!-- v-if="setting.is_show_sales_num=='1'" -->
<view
class=
"sell"
>
{{
cx
.
sales
}}
</view>
<view
v-if=
"setting.is_show_cart==
'1'
"
class=
"cart"
@
click
.
stop=
"showSkuHandler(cx)"
>
<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>
...
...
@@ -65,7 +65,7 @@ export default {
},
methods
:
{
initConfig
()
{
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
setting
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
},
clickHandler
(
item
)
{
console
.
log
(
"GoodsId"
,
item
)
...
...
components/tabbar/index.vue
View file @
7b41b5ad
...
...
@@ -9,7 +9,7 @@
right
:
0
;
z-index
:
99999999
;
border-top
:
1
upx
solid
#ddd
;
background
:
#
FFF
;
background
:
#
fff
;
}
.tabbarMainIphone
{
height
:
156
upx
;
...
...
@@ -50,7 +50,7 @@
.itmMain
{
/* width: 250upx; */
width
:
150
upx
;
flex
:
1
;
flex
:
1
;
justify-content
:
center
;
align-items
:
center
;
display
:
flex
;
...
...
@@ -141,16 +141,10 @@ export default {
leftWidth
:
0
,
flagTypeInfo
:
false
,
navs
:
[],
crtPath
:
""
crtPath
:
""
,
};
},
created
()
{
setTimeout
(()
=>
{
this
.
navs
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
navbar
.
navs
:
[];
},
400
);
},
created
()
{},
mounted
()
{
this
.
flagTypeInfo
=
this
.
$uiConfig
.
is_bang
;
let
tempSystem
=
uni
.
getSystemInfoSync
();
...
...
@@ -164,30 +158,32 @@ export default {
}
// #endif
});
this
.
activeHandler
()
this
.
navs
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
navbar
.
navs
:
[];
this
.
activeHandler
();
},
methods
:
{
activeHandler
()
{
let
t
=
getCurrentPages
()
this
.
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
let
t
=
getCurrentPages
();
this
.
crtPath
=
"/"
+
t
[
t
.
length
-
1
].
route
;
this
.
navs
.
forEach
((
x
,
i
)
=>
{
if
(
x
.
url
==
this
.
crtPath
)
{
if
(
x
.
url
.
split
(
"?"
)[
0
]
==
this
.
crtPath
)
{
this
.
active
=
i
;
}
});
console
.
log
(
this
.
active
)
},
goUrl
(
url
){
if
(
this
.
crtPath
!=
url
)
{
goUrl
(
url
)
{
if
(
this
.
crtPath
!=
url
)
{
uni
.
redirectTo
({
url
:
url
url
:
url
,
});
}
else
{
}
else
{
uni
.
reLaunch
({
url
:
url
})
url
:
url
,
})
;
}
}
}
}
,
}
,
};
</
script
>
pages/goods/components/share/share.vue
View file @
7b41b5ad
...
...
@@ -101,7 +101,7 @@ export default {
genernalHandler
()
{
//this.goodId
uni
.
navigateTo
({
url
:
"/pages/goods/draw
"
,
url
:
"/pages/goods/draw
?id"
+
this
.
goodId
,
});
},
sendQuanHandler
()
{
...
...
@@ -200,6 +200,7 @@ export default {
padding-bottom
:
40
rpx
;
display
:
block
;
border-bottom
:
2
rpx
solid
#f1f1f1
;
overflow-x
:
auto
;
}
.share-box
.img-box
.box
{
white-space
:
nowrap
;
...
...
pages/goods/draw.vue
View file @
7b41b5ad
...
...
@@ -271,15 +271,38 @@ export default {
this
.
generterConfig
.
bgType
=
this
.
types
[
v
].
clsName
==
"fill"
?
1
:
2
;
}
},
// init() {
// let h = this.apiheader();
// this.request(
// {
// url: "",
// header: h,
// data: {
// r: "plugin/quick_share/api/poster/config",
// goods_id: this.id,
// },
// },
// (res) => {
// this.config = res.data.config;
// this.info = res.data.info;
// this.loading = false;
// this.generterConfig.bgColor = this.config.color[0];
// let temp = parseInt(this.config.image_style[0]);
// for (let i = 0; i
<
temp
;
i
++
)
{
// this.generterConfig.images.push(this.info.multi_map[i]);
// }
// this.newInit();
// }
// );
// },
init
()
{
let
h
=
this
.
apiheader
(
);
this
.
request
(
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
request
2
(
{
url
:
""
,
header
:
h
,
url
:
"/api/Mall/GetGoosPoster"
,
data
:
{
r
:
"plugin/quick_share/api/poster/config"
,
goods_id
:
this
.
i
d
,
goodsId
:
this
.
id
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&pid="
+
u
.
UserI
d
,
},
},
(
res
)
=>
{
...
...
@@ -288,6 +311,7 @@ export default {
this
.
loading
=
false
;
this
.
generterConfig
.
bgColor
=
this
.
config
.
color
[
0
];
let
temp
=
parseInt
(
this
.
config
.
image_style
[
0
]);
this
.
info
.
qrcode_url
=
this
.
host2
+
this
.
info
.
qrcode_url
for
(
let
i
=
0
;
i
<
temp
;
i
++
)
{
this
.
generterConfig
.
images
.
push
(
this
.
info
.
multi_map
[
i
]);
}
...
...
pages/goods/goods.vue
View file @
7b41b5ad
...
...
@@ -28,10 +28,10 @@
<!-- TODO is_common_user_member_price 普通用户会员价 -->
<!-- TODO is_member_user_member_price 会员用户会员价 -->
<view
class=
"sell u-skeleton-rect"
>
<text
class=
"oprice"
v-if=
"setting.is_underline_price ==
'1'
"
>
{{
<text
class=
"oprice"
v-if=
"setting.is_underline_price ==
1
"
>
{{
g
.
original_price
}}
</text>
<text
v-if=
"setting.is_sales ==
'1'
"
<text
v-if=
"setting.is_sales ==
1
"
>
已售出
{{
g
.
sales
}}{{
g
.
unit
}}
</text
>
</view>
...
...
@@ -139,7 +139,7 @@
<view
class=
"sku-box u-skeleton-rect"
v-if=
"comments.length == 0 && setting.is_comment ==
'1'
"
v-if=
"comments.length == 0 && setting.is_comment ==
1
"
>
<view
class=
"label"
>
暂无评论信息
</view>
</view>
...
...
@@ -219,7 +219,7 @@
v-if=
"!isExsitGoods"
></u-empty>
<share
:id=
"id"
:
good-
id=
"id"
v-if=
"showShare"
:good-name=
"g.name"
:images=
"g.pic_url"
...
...
@@ -281,7 +281,7 @@ export default {
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
initPage
();
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
setting
;
this
.
setting
=
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
},
onShareAppMessage
(
res
)
{
return
{
...
...
plugin/api.js
View file @
7b41b5ad
export
default
{
install
(
Vue
,
options
)
{
//Vue.prototype.host2 = "http://192.168.0.110:8200"
Vue
.
prototype
.
host2
=
"https://mallApi.oytour.com"
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
//Vue.prototype.host2 = "http://192.168.2.16:8088"
Vue
.
prototype
.
host2
=
"https://mallApi.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
url
:
this
.
host
+
"&r="
+
param
.
data
.
r
,
method
:
param
.
method
||
"GET"
,
header
:
param
.
header
||
{
'content-type'
:
"application/json"
},
data
:
param
.
data
,
success
:
res
=>
{
if
(
res
.
data
.
code
!=
0
&&
res
.
data
.
msg
!=
"商品未上架"
)
{
}
typeof
success
==
"function"
&&
success
(
res
.
data
);
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
errMsg
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
Vue
.
prototype
.
request2
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
...
...
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