Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shop_mobile_uni
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
郑秀明
shop_mobile_uni
Commits
fd519921
Commit
fd519921
authored
Aug 06, 2020
by
郑秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改未登录跳转
parent
eec050df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
39 deletions
+63
-39
manifest.json
manifest.json
+2
-2
home.vue
pages/home/home.vue
+61
-37
No files found.
manifest.json
View file @
fd519921
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"name"
:
"shop_mobile_uni"
,
"name"
:
"shop_mobile_uni"
,
"appid"
:
"__UNI__F904656"
,
"appid"
:
"__UNI__F904656"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.
19
"
,
"versionName"
:
"1.0.
22
"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
"app-plus"
:
{
"app-plus"
:
{
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
"mode"
:
"history"
,
"mode"
:
"history"
,
"base"
:
"/uni"
"base"
:
"/uni"
},
},
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/
prod/1.0.19
/"
,
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/
test/1.0.22
/"
,
"optimization"
:
{
"optimization"
:
{
"treeShaking"
:
{
"treeShaking"
:
{
"enable"
:
true
"enable"
:
true
...
...
pages/home/home.vue
View file @
fd519921
...
@@ -13,6 +13,9 @@
...
@@ -13,6 +13,9 @@
>
>
<view
class=
"homeContent"
style=
"padding: 100rpx 0 110rpx;background-color: #f8f8f8;"
>
<view
class=
"homeContent"
style=
"padding: 100rpx 0 110rpx;background-color: #f8f8f8;"
>
<component
v-for=
"(item, index) in data"
:key=
"index"
:is=
"item.name"
:wrapper_props=
"item.wrapper_props"
:isLogin=
"isLogin"
:ref=
"item.name"
></component>
<component
v-for=
"(item, index) in data"
:key=
"index"
:is=
"item.name"
:wrapper_props=
"item.wrapper_props"
:isLogin=
"isLogin"
:ref=
"item.name"
></component>
<view
class=
"protocol"
>
<text
@
click=
"jumpPhp('app=member&act=register_agree')"
>
《服务协议》
</text>
|
<text
@
click=
"jumpPhp('app=member&act=register_privacy')"
>
《隐私政策》
</text>
</view>
<BottomBar
/>
<BottomBar
/>
<uni-popup
ref=
"popup"
type=
"center"
:maskClick=
"true"
>
<uni-popup
ref=
"popup"
type=
"center"
:maskClick=
"true"
>
<view
class=
'coupon_dialog'
>
<view
class=
'coupon_dialog'
>
...
@@ -38,6 +41,7 @@
...
@@ -38,6 +41,7 @@
import
BottomBar
from
"@/components/BottomBar/BottomBar.vue"
;
import
BottomBar
from
"@/components/BottomBar/BottomBar.vue"
;
import
uniPopup
from
'@/components/uni-popup/uni-popup.vue'
;
import
uniPopup
from
'@/components/uni-popup/uni-popup.vue'
;
import
Skeleton
from
'@/components/J-skeleton/J-skeleton.vue'
;
import
Skeleton
from
'@/components/J-skeleton/J-skeleton.vue'
;
import
{
php
}
from
'../../common/host.js'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -45,6 +49,7 @@
...
@@ -45,6 +49,7 @@
isLogin
:
0
,
isLogin
:
0
,
fixFlag
:
false
,
fixFlag
:
false
,
loading
:
true
,
loading
:
true
,
from_login
:
0
,
skeleton1
:
{
skeleton1
:
{
avatarSize
:
'160rpx'
,
avatarSize
:
'160rpx'
,
row
:
2
,
row
:
2
,
...
@@ -59,7 +64,9 @@
...
@@ -59,7 +64,9 @@
COUPON_ID
:
'185'
//优惠券ID
COUPON_ID
:
'185'
//优惠券ID
}
}
},
},
onLoad
()
{
onLoad
(
option
)
{
const
{
from_login
}
=
option
;
this
.
from_login
=
from_login
;
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
getData
();
this
.
getData
();
// uni.showLoading({
// uni.showLoading({
...
@@ -98,6 +105,10 @@
...
@@ -98,6 +105,10 @@
// 获取是否领取优惠券
// 获取是否领取优惠券
if
(
res
.
data
.
login_flg
===
1
){
if
(
res
.
data
.
login_flg
===
1
){
this
.
get_coupon
(
res
.
data
.
reg_time
);
this
.
get_coupon
(
res
.
data
.
reg_time
);
}
else
{
// if(!this.from_login){
// window.location.href = `${php}app=member&act=login`
// }
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -121,6 +132,9 @@
...
@@ -121,6 +132,9 @@
this
.
$jump
(
`
${
origin
}
/mobile/index.php?app=coupon&act=view&id=
${
this
.
COUPON_ID
}
`
);
this
.
$jump
(
`
${
origin
}
/mobile/index.php?app=coupon&act=view&id=
${
this
.
COUPON_ID
}
`
);
this
.
$refs
.
popup
.
close
();
this
.
$refs
.
popup
.
close
();
},
},
jumpPhp
(
url
){
window
.
location
.
href
=
`
${
php
}${
url
}
`
;
},
// 向小程序发送数据
// 向小程序发送数据
postData
(){
postData
(){
jWeixin
.
miniProgram
.
getEnv
(
function
(
res
)
{
jWeixin
.
miniProgram
.
getEnv
(
function
(
res
)
{
...
@@ -180,6 +194,16 @@
...
@@ -180,6 +194,16 @@
padding
:
100rpx
0
110rpx
;
padding
:
100rpx
0
110rpx
;
background-color
:
#f8f8f8
;
background-color
:
#f8f8f8
;
}
}
.protocol
{
font-size
:
24rpx
;
text-align
:
center
;
height
:
46rpx
;
line-height
:
46rpx
;
text
{
color
:
#B1825A
;
font-size
:
24rpx
;
}
}
.coupon_dialog
{
.coupon_dialog
{
width
:
600rpx
;
width
:
600rpx
;
height
:
786rpx
;
height
:
786rpx
;
...
...
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