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
1eb2dead
Commit
1eb2dead
authored
Jul 20, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
甲鹤活动列表和详情的分享处理
parent
a5bba7ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
23 deletions
+94
-23
JIaheactivitydetails.vue
pages/school/JIaheactivitydetails.vue
+34
-8
Jiaheactivity.vue
pages/school/Jiaheactivity.vue
+60
-15
No files found.
pages/school/JIaheactivitydetails.vue
View file @
1eb2dead
...
...
@@ -304,7 +304,7 @@
</
style
>
<
template
>
<view
class=
"Jiaheactivitydetails"
>
<view
class=
"Jiaheactivitydetails"
v-if=
"!loading"
>
<view
style=
"width: 100%;height: 450rpx;"
@
click=
"previewImage(detial.CoverImg)"
>
<image
:src=
"detial.CoverImg"
style=
"width: 100%;height: 100%;"
mode=
"aspectFill"
></image>
</view>
...
...
@@ -507,15 +507,21 @@
</view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</template>
<
script
>
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
auth
},
data
(){
return
{
loading
:
true
,
pageTitle
:
"活动详情"
,
showAuth
:
false
,
mainColor
:
''
,
pricecolor
:
''
,
Id
:
0
,
...
...
@@ -542,11 +548,10 @@
}
let
title
=
this
.
detial
.
ActivityName
?
this
.
detial
.
ActivityName
:
'活动详情'
;
let
imageUrl
=
this
.
detial
.
CoverImg
?
this
.
detial
.
CoverImg
:
''
;
let
id
=
this
.
Id
;
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
title
,
query
:
"
id="
+
this
.
i
d
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
,
query
:
"
Id="
+
this
.
I
d
+
"&user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
,
imageUrl
:
imageUrl
,
};
},
...
...
@@ -591,11 +596,13 @@
})
},
GetActivityDetial
(){
console
.
log
(
this
.
Id
)
this
.
request2
({
url
:
'/api/AppletEducation/GetActivityDetial'
,
data
:
{
Id
:
this
.
Id
}
},
res
=>
{
this
.
loading
=
false
;
this
.
detial
=
res
.
data
;
let
tempRichtext
=
""
tempRichtext
=
this
.
detial
.
ActivityInfo
.
replace
(
/<img
[^
>
]
*>/gi
,
function
(
match
,
capture
)
{
...
...
@@ -621,10 +628,20 @@
});
},
gosignUp
(){
let
dataList
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
detial
))
uni
.
navigateTo
({
url
:
'/pages/school/jieheactivityBM?details='
+
dataList
})
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
u
)
{
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
let
dataList
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
detial
))
uni
.
navigateTo
({
url
:
'/pages/school/jieheactivityBM?details='
+
dataList
})
}
},
previewImage
(
x
){
uni
.
previewImage
({
...
...
@@ -645,6 +662,15 @@
},
});
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
GetActivityDetial
()
},
//关闭登录窗口
gbAuth
(){
this
.
showAuth
=
false
},
}
}
</
script
>
...
...
pages/school/Jiaheactivity.vue
View file @
1eb2dead
...
...
@@ -156,14 +156,19 @@
</view>
<view
class=
"details-box"
v-for=
"(x,y) in item.list"
:key=
'y'
@
click=
"gourl(x)"
>
<view
v-if=
"x.IsJoinActivity == 0"
>
<view
class=
"details-box-top-z"
v-if=
"(x.TotalMan-x.JoinNum)>0"
:style=
"
{background:mainColor}">
</view>
<view
class=
"details-box-t-positions"
v-if=
"(x.TotalMan-x.JoinNum)>0"
:style=
"
{background:mainColor}">
<view
class=
"details-box-top-z"
v-if=
"(x.TotalMan-x.JoinNum)>0
&& current==1
"
:style=
"
{background:mainColor}">
</view>
<view
class=
"details-box-t-positions"
v-if=
"(x.TotalMan-x.JoinNum)>0
&& current==1
"
:style=
"
{background:mainColor}">
<text>
{{
(
x
.
TotalMan
-
x
.
JoinNum
)
>=
6
?
'可预约'
:(
x
.
TotalMan
-
x
.
JoinNum
)
<
6
?
'剩余'
+
(
x
.
TotalMan
-
x
.
JoinNum
)
+
'个空位'
:
''
}}
</text>
</view>
<view
class=
"details-box-top-f"
v-if=
"(x.TotalMan-x.JoinNum)
<1
"
></view>
<view
class=
"details-box-t-positions"
v-if=
"(x.TotalMan-x.JoinNum)
<1
"
style=
"background:#e2e2e2;color: #999999;"
>
爆满
</view>
<view
class=
"details-box-top-f"
v-if=
"(x.TotalMan-x.JoinNum)>0 && current==3"
></view>
<view
v-if=
"current==3 && (x.TotalMan-x.JoinNum)>0"
class=
"details-box-t-positions"
style=
"background:#e2e2e2;color: #999999;"
>
已结束
</view>
</view>
<view
v-if=
"x.IsJoinActivity == 1"
>
<view
class=
"details-box-top-f"
style=
"background: #40766E;"
></view>
...
...
@@ -172,6 +177,7 @@
</view>
</view>
<!-- 内容 -->
<view
class=
"details-b-center"
>
<view
class=
"details-b-center-l"
>
...
...
@@ -291,6 +297,45 @@
tabbarH
:
0
,
};
},
onShareTimeline
()
{
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
id
=
this
.
Id
;
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
'甲鹤活动'
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/ActivitySharing.png'
,
};
},
onShareAppMessage
(
res
)
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
u
.
SmallShopId
?
u
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
u
.
UserSmallShopId
?
u
.
UserSmallShopId
:
0
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
'甲鹤活动'
,
path
:
"/pages/school/Jiaheactivity?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
imageUrl
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/ActivitySharing.png'
};
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
pricecolor
=
this
.
$uiConfig
.
pricecolor
;
...
...
@@ -306,16 +351,16 @@
},
onLoad
:
function
(
option
)
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
//
this.u = uni.getStorageSync("mall_UserInfo");
//
if (!this.u) {
//
this.u = {
//
nickName: "未登录",
//
avatarUrl: ""
//
};
//
this.showAuth = true;
//
} else {
this
.
GetActivityTypeList
()
}
//
}
},
...
...
@@ -415,6 +460,9 @@
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
GetActivityTypeList
()
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
children
)
{
//判断
this
.
$refs
.
children
.
getfzuj
()
}
},
//关闭登录窗口
gbAuth
()
{
...
...
@@ -426,10 +474,7 @@
this
.
msg
.
SelectIsEnd
=
1
this
.
msg
.
pageIndex
=
1
;
this
.
init
()
}
else
{
this
.
msg
.
SelectIsEnd
=
0
}
if
(
type
==
1
){
//TODO 暂时不知道接口
}
else
if
(
type
==
1
){
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
SelectIsEnd
=
0
this
.
init
()
...
...
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