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
a84470b5
Commit
a84470b5
authored
Sep 01, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
into master
# Conflicts: # pages/index/index.vue
parents
d92f40e5
696d32dc
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
123 additions
and
79 deletions
+123
-79
details.vue
pages/coupon/details/details.vue
+12
-8
goodsaction.vue
pages/goods/components/goodsaction.vue
+1
-1
draw.vue
pages/goods/draw.vue
+2
-1
goods.vue
pages/goods/goods.vue
+2
-1
list.vue
pages/goods/list.vue
+9
-2
index.vue
pages/index/index.vue
+65
-19
index.vue
pages/live/index.vue
+5
-5
share.vue
pages/live/share.vue
+22
-38
refunds-detail.vue
pages/order/after-sale/refunds-detail.vue
+1
-1
order-detail.vue
pages/order/order-detail.vue
+1
-1
tuangood.vue
pages/pintuan/tuangood.vue
+2
-1
share-qrcode.vue
pages/share-qrcode/share-qrcode.vue
+1
-1
No files found.
pages/coupon/details/details.vue
View file @
a84470b5
...
...
@@ -59,7 +59,7 @@ export default {
loading
:
false
,
coupon_id
:
0
,
isreceive
:
false
,
type
:
0
type
:
0
,
//type 1是优惠券列表来的 2 是领券中心来的
};
},
...
...
@@ -113,14 +113,18 @@ export default {
);
},
gouseUrl
(
g
){
let
id
if
(
this
.
type
==
1
){
id
=
g
.
ID
}
else
if
(
this
.
type
==
2
){
id
=
g
.
CouponId
let
data
=
[]
if
(
g
.
UseType
==
1
||
g
.
UseType
==
2
){
g
.
ProductList
.
forEach
(
x
=>
{
data
.
push
(
x
.
ProductId
)
})
let
id
=
data
.
toString
()
uni
.
redirectTo
({
url
:
'/pages/goods/list?coupon_id='
+
id
+
'&UseType='
+
g
.
UseType
});
}
else
{
uni
.
redirectTo
({
url
:
'/pages/goods/list'
});
}
uni
.
redirectTo
({
url
:
'/pages/goods/list?coupon_id='
+
id
});
}
},
...
...
pages/goods/components/goodsaction.vue
View file @
a84470b5
...
...
@@ -84,7 +84,7 @@ export default {
let
t
=
getCurrentPages
();
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
this
.
path
=
'/
'
+
t
[
t
.
length
-
1
].
route
+
"?id="
+
this
.
goodId
+
"&user_id="
+
uid
;
this
.
path
=
'/
pages/index/index?id='
+
this
.
goodId
+
"&user_id="
+
uid
+
'&JumpType=1'
;
//console.log(t[t.length - 1]);
this
.
favorStatus
=
this
.
favorite
;
...
...
pages/goods/draw.vue
View file @
a84470b5
...
...
@@ -302,7 +302,8 @@ export default {
url
:
"/api/Mall/GetGoosPoster"
,
data
:
{
goodsId
:
this
.
id
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&user_id="
+
u
.
UserId
,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + u.UserId,
path
:
"/pages/index/index?id="
+
this
.
id
+
"&user_id="
+
u
.
UserId
+
'&JumpType=1'
,
},
},
(
res
)
=>
{
...
...
pages/goods/goods.vue
View file @
a84470b5
...
...
@@ -447,7 +447,8 @@ export default {
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
?
this
.
g
.
app_share_title
:
this
.
g
.
name
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId,
path
:
"/pages/index/index?id="
+
this
.
id
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
'&JumpType=1'
,
imageUrl
:
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
?
this
.
g
.
app_share_pic
...
...
pages/goods/list.vue
View file @
a84470b5
...
...
@@ -93,8 +93,15 @@
onLoad
(
option
)
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
catId
=
option
.
cat_id
;
if
(
option
.
coupon_id
!=
undefined
)
{
this
.
coupon_id
=
option
.
coupon_id
//优惠券带过来的参数
if
(
option
&&
option
.
coupon_id
&&
option
.
UseType
)
{
//优惠券带过来的参数
console
.
log
(
option
.
coupon_id
)
if
(
option
.
UseType
==
1
){
this
.
msg
.
CategoryIds
=
option
.
coupon_id
}
else
if
(
option
.
UseType
==
2
){
this
.
msg
.
GoodsIds
=
option
.
coupon_id
}
}
if
(
option
.
CategoryIds
)
{
this
.
msg
.
CategoryIds
=
option
.
CategoryIds
;
...
...
pages/index/index.vue
View file @
a84470b5
...
...
@@ -129,6 +129,8 @@ export default {
showAuth
:
false
,
U
:
{},
shopData
:
{},
JumpType
:
0
,
GoodsId
:
29
,
};
},
components
:
{
...
...
@@ -217,7 +219,16 @@ export default {
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
if
(
options
&&
options
.
JumpType
)
{
//跳转类型 1为详情2为直播列表
this
.
JumpType
=
options
.
JumpType
;
}
if
(
options
&&
options
.
id
)
{
//商品详情
this
.
GoodsId
=
options
.
id
;
}
else
{
this
.
GoodsId
=
options
.
GoodsId
?
options
.
GoodsId
:
29
;
}
that
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
wx
.
getUserInfo
({
success
:
function
(
res
)
{
...
...
@@ -229,6 +240,18 @@ export default {
Photo
:
res
.
userInfo
.
avatarUrl
,
};
that
.
updateuserinfo
(
msg
);
// 如果登录的情况下直接跳转商品详情或者直播列表
setTimeout
(()
=>
{
if
(
that
.
JumpType
==
1
)
{
//商品详情
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
that
.
GoodsId
,
});
}
else
if
(
that
.
JumpType
==
2
)
{
//直播列表
uni
.
navigateTo
({
url
:
"/pages/live/index"
});
}
},
500
);
}
else
{
//静默登录操作
uni
.
login
({
...
...
@@ -306,8 +329,14 @@ export default {
:
0
;
}
console
.
log
(
uid
);
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
if
(
SmallShopId
!=
0
){
title
=
this
.
shopData
.
Name
}
return
{
title
:
""
,
title
:
title
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
imageUrl
:
""
,
};
...
...
@@ -332,25 +361,19 @@ export default {
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
if
(
SmallShopId
!=
0
)
{
return
{
title
:
this
.
shopData
.
Name
?
this
.
shopData
.
Name
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
imageUrl
:
""
,
};
}
else
{
return
{
title
:
this
.
setting
.
share_title
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
imageUrl
:
this
.
setting
.
share_pic
?
this
.
setting
.
share_pic
:
""
,
};
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
if
(
SmallShopId
!=
0
){
title
=
this
.
shopData
.
Name
}
return
{
title
:
title
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
,
imageUrl
:
""
,
};
},
// #endif
onShow
()
{
...
...
@@ -410,6 +433,19 @@ export default {
that
.
u
=
res
.
data
;
uni
.
removeStorageSync
(
"pid"
);
uni
.
removeStorageSync
(
"SmallShopId"
);
// 如果登录的情况下直接跳转商品详情或者直播列表
setTimeout
(()
=>
{
if
(
that
.
JumpType
==
1
)
{
//商品详情
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
that
.
GoodsId
,
});
}
else
if
(
that
.
JumpType
==
2
)
{
//直播列表
uni
.
navigateTo
({
url
:
"/pages/live/index"
});
}
},
500
);
}
else
{
if
(
!
that
.
u
)
{
that
.
u
=
{
...
...
@@ -699,6 +735,16 @@ export default {
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
$refs
.
son
[
0
].
getSmallShopById
(
2
);
//第一次登陆成功后去调取微店的信息
// 如果登录的情况下直接跳转商品详情或者直播列表
setTimeout
(()
=>
{
if
(
that
.
JumpType
==
1
)
{
//商品详情
uni
.
navigateTo
({
url
:
"/pages/goods/goods?GoodsId="
+
that
.
GoodsId
});
}
else
if
(
that
.
JumpType
==
2
)
{
//直播列表
uni
.
navigateTo
({
url
:
"/pages/live/index"
});
}
},
500
);
},
//关闭登录窗口
gbAuth
()
{
...
...
pages/live/index.vue
View file @
a84470b5
...
...
@@ -23,7 +23,9 @@
<u-row
gutter=
"20"
>
<u-col
span=
"6"
v-for=
"(cx, ci) in g"
:key=
"ci"
>
<view
class=
"good"
@
click=
"clickHandler(cx)"
>
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg)"
>
<!--
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg)"
>
-->
<view
class=
"sharebox"
v-if=
"cx.ExtensionImg&&cx.ExtensionImg!=''"
@
click
.
native
.
stop=
"goshare(cx.ExtensionImg,
cx.LiveQrCodePaddingTop,cx.LiveQrCodePaddingLeft,cx.LiveQrCodeSize,cx.LiveQrCodeType)"
>
<image
src=
"../../static/images/share.png"
mode=
"widthFix"
class=
"share"
/>
</view>
<!--
<view
class=
"good-img"
:style=
"
{ 'background-image': 'url(' + (cx.cover_img ? cx.cover_img : '') + ')', backgroundSize: '100% 100%' }"> -->
...
...
@@ -145,7 +147,6 @@ export default {
};
},
onLoad
(
option
)
{
console
.
log
(
option
,
'option'
)
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
let
c
=
this
.
$uiConfig
.
is_bang
?
80
:
52
;
...
...
@@ -170,9 +171,8 @@ export default {
}
},
methods
:
{
goshare
(
img
){
console
.
log
(
img
)
uni
.
navigateTo
({
url
:
'/pages/live/share?pic='
+
img
});
goshare
(
img
,
top
,
left
,
size
,
type
){
uni
.
navigateTo
({
url
:
'/pages/live/share?pic='
+
img
+
'&top='
+
top
+
'&left='
+
left
+
'&size='
+
size
+
'&type='
+
type
});
},
initPage
()
{
let
currentPages
=
getCurrentPages
();
...
...
pages/live/share.vue
View file @
a84470b5
...
...
@@ -26,7 +26,8 @@ export default {
qrCodeSize
:
126
,
//二维码宽高
qrCodeLeft
:
595
,
//二维码左边距
qrCodeTop
:
1200
,
//二维码上边距
halfCode
:
63
//二维码一半高度
halfCode
:
63
,
//二维码一半高度
type
:
0
,
//二维码形状(0-圆形,1-方形)
};
},
created
()
{
...
...
@@ -36,25 +37,24 @@ export default {
this
.
UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
:
{};
this
.
qrCodeConfig
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
liveConfig
:
{};
if
(
this
.
qrCodeConfig
){
if
(
this
.
qrCodeConfig
.
LiveQrCodePaddingLeft
){
this
.
qrCodeLeft
=
this
.
qrCodeConfig
.
LiveQrCodePaddingLeft
;
}
if
(
this
.
qrCodeConfig
.
LiveQrCodePaddingTop
){
this
.
qrCodeTop
=
this
.
qrCodeConfig
.
LiveQrCodePaddingTop
;
}
if
(
this
.
qrCodeConfig
.
LiveQrCodeSize
){
this
.
qrCodeSize
=
this
.
qrCodeConfig
.
LiveQrCodeSize
;
this
.
halfCode
=
parseInt
(
this
.
qrCodeConfig
.
LiveQrCodeSize
/
2
);
}
}
},
onLoad
(
option
)
{
this
.
bgPic
=
option
.
pic
??
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1597312414000_253.jpg"
;
if
(
option
.
left
){
this
.
qrCodeLeft
=
parseInt
(
option
.
left
);
}
if
(
option
.
top
){
this
.
qrCodeTop
=
parseInt
(
option
.
top
);
}
if
(
option
.
size
){
this
.
qrCodeSize
=
parseInt
(
option
.
size
);
this
.
halfCode
=
parseInt
(
option
.
size
/
2
);
}
if
(
option
.
type
){
this
.
type
=
parseInt
(
option
.
type
);
}
},
onReady
()
{
this
.
init
();
...
...
@@ -66,24 +66,11 @@ export default {
},
methods
:
{
init
()
{
// uni.showNavigationBarLoading();
// this.request2(
// {
// url: "/api/AppletUser/GetFenXiaoPoster",
// data: {},
// },
// (res) => {
// uni.hideNavigationBarLoading();
// this.qrcode = res.data;
// this.getWeiXinQRCode();
// }
// );
this
.
getWeiXinQRCode
();
},
getWeiXinQRCode
()
{
let
that
=
this
;
uni
.
showNavigationBarLoading
();
console
.
log
(
that
.
UserInfo
,
'that.UserInfo'
)
let
SmallShopId
=
that
.
UserInfo
.
SmallShopId
?
that
.
UserInfo
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
SmallShopId
=
that
.
UserInfo
.
UserSmallShopId
?
that
.
UserInfo
.
UserSmallShopId
:
0
;
...
...
@@ -92,14 +79,14 @@ export default {
{
url
:
"/api/AppletUser/GetWeiXinQRCodeForApplet"
,
data
:
{
Path
:
"pages/live/index?user_id="
+
that
.
UserInfo
.
UserId
+
'&SmallShopId='
+
SmallShopId
,
// Path: "pages/live/index?user_id=" + that.UserInfo.UserId+'&SmallShopId='+ SmallShopId,
Path
:
"/pages/index/index?user_id="
+
that
.
UserInfo
.
UserId
+
'&SmallShopId='
+
SmallShopId
+
'&JumpType=2'
,
With
:
that
.
qrcode
.
QrCodeSize
,
},
},
(
res
)
=>
{
uni
.
hideNavigationBarLoading
();
that
.
fenxqrcode
=
that
.
host2
+
res
.
data
;
console
.
log
(
that
.
fenxqrcode
);
let
tmpTimeout
=
setTimeout
(()
=>
{
that
.
drawCtx
();
clearTimeout
(
tmpTimeout
);
...
...
@@ -116,7 +103,6 @@ export default {
uni
.
getImageInfo
({
src
:
that
.
bgPic
,
success
:
function
(
image
)
{
console
.
log
(
"绘制"
);
ctx
.
drawImage
(
image
.
path
,
0
,
0
,
750
,
1344
);
//绘制图
uni
.
getImageInfo
({
//头像
...
...
@@ -124,11 +110,13 @@ export default {
success
:
function
(
image
)
{
ctx
.
save
();
ctx
.
beginPath
();
// ctx.arc(595 + 63, 1200 + 63, 63, 0, Math.PI * 2);
ctx
.
arc
(
that
.
qrCodeLeft
+
that
.
halfCode
,
that
.
qrCodeTop
+
that
.
halfCode
,
that
.
halfCode
,
0
,
Math
.
PI
*
2
);
if
(
that
.
type
==
0
){
ctx
.
arc
(
that
.
qrCodeLeft
+
that
.
halfCode
,
that
.
qrCodeTop
+
that
.
halfCode
,
that
.
halfCode
,
0
,
Math
.
PI
*
2
);
ctx
.
clip
();
}
ctx
.
setFillStyle
(
"#ffffff"
);
ctx
.
fill
();
ctx
.
clip
();
// ctx.drawImage(image.path, 595, 1200, 126, 126); //绘制头像
ctx
.
drawImage
(
image
.
path
,
that
.
qrCodeLeft
,
that
.
qrCodeTop
,
that
.
qrCodeSize
,
that
.
qrCodeSize
);
//绘制头像
that
.
drawQrCode
(
ctx
);
...
...
@@ -213,7 +201,6 @@ export default {
},
drawQrCode
(
ctx
)
{
let
that
=
this
;
console
.
log
(
"生成海报12"
);
setTimeout
(()
=>
{
ctx
.
draw
(
false
,
()
=>
{
uni
.
canvasToTempFilePath
(
...
...
@@ -228,7 +215,6 @@ export default {
success
:
(
res
)
=>
{
uni
.
hideLoading
();
that
.
tempPic
=
res
.
tempFilePath
;
console
.
log
(
res
,
'res'
);
},
fail
(
e
)
{
console
.
log
(
e
);
...
...
@@ -265,7 +251,6 @@ export default {
uni
.
authorize
({
scope
:
"scope.writePhotosAlbum"
,
success
:
(
res
)
=>
{
console
.
log
(
"11111"
);
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
...
...
@@ -277,7 +262,6 @@ export default {
if
(
res
.
confirm
)
{
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
"scope.writePhotosAlbum"
])
{
that
.
preservation
();
}
...
...
pages/order/after-sale/refunds-detail.vue
View file @
a84470b5
...
...
@@ -95,7 +95,7 @@
<button
open-type=
"contact"
:send-message-title=
"d.OrderInfo.GoodsName"
:send-message-path=
"'/pages/
goods/goods?id=' + d.OrderInfo.GoodsId + '&user_id=' + uid
"
:send-message-path=
"'/pages/
index/index?id=' + d.OrderInfo.GoodsId + '&user_id=' + uid+'&JumpType=1'
"
:send-message-img=
"d.OrderInfo.CoverImagePath"
:show-message-card=
"true"
>
...
...
pages/order/order-detail.vue
View file @
a84470b5
...
...
@@ -150,7 +150,7 @@
<button
open-type=
"contact"
:send-message-title=
"x.GoodsName"
:send-message-path=
"'/pages/
goods/goods?id=' + x.GoodsId + '&user_id=' + uid
"
:send-message-path=
"'/pages/
index/index?id=' + x.GoodsId + '&user_id=' + uid+'&JumpType=1'
"
:send-message-img=
" x.CoverImagePath "
:show-message-card=
"true"
>
...
...
pages/pintuan/tuangood.vue
View file @
a84470b5
...
...
@@ -411,7 +411,8 @@ export default {
this
.
g
.
app_share_title
!=
null
&&
this
.
g
.
app_share_title
!=
""
?
this
.
g
.
app_share_title
:
this
.
g
.
name
,
path
:
"/pages/goods/goods?id="
+
this
.
id
+
"&user_id="
+
uid
,
// path: "/pages/goods/goods?id=" + this.id + "&user_id=" + uid,
path
:
"/pages/index/index?id="
+
this
.
id
+
"&user_id="
+
uid
+
'&JumpType=1'
,
imageUrl
:
this
.
g
.
app_share_pic
!=
null
&&
this
.
g
.
app_share_pic
!=
""
?
this
.
g
.
app_share_pic
...
...
pages/share-qrcode/share-qrcode.vue
View file @
a84470b5
...
...
@@ -70,7 +70,7 @@
{
url
:
'/api/AppletUser/GetWeiXinQRCodeForApplet'
,
data
:
{
Path
:
'pages/index/index?user_id='
+
that
.
UserInfo
.
UserId
+
'&SmallShopId='
+
SmallShopId
,
Path
:
'
/
pages/index/index?user_id='
+
that
.
UserInfo
.
UserId
+
'&SmallShopId='
+
SmallShopId
,
With
:
that
.
qrcode
.
QrCodeSize
,
}
},
...
...
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