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
b481d6df
Commit
b481d6df
authored
May 13, 2020
by
郑秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券弹窗修改
parent
14f4ecf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
84 deletions
+139
-84
manifest.json
manifest.json
+93
-70
home.vue
pages/home/home.vue
+46
-14
No files found.
manifest.json
View file @
b481d6df
{
{
"name"
:
"shop_mobile_uni"
,
"name"
:
"shop_mobile_uni"
,
"appid"
:
"__UNI__F904656"
,
"appid"
:
"__UNI__F904656"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.10"
,
"versionName"
:
"1.0.11"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
"app-plus"
:
{
"app-plus"
:
{
"usingComponents"
:
true
,
"usingComponents"
:
true
,
"nvueCompiler"
:
"uni-app"
,
"nvueCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
"delay"
:
0
},
"modules"
:
{},
"distribute"
:
{
"android"
:
{
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECORD_AUDIO
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CALL_PHONE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_COARSE_LOCATION
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_FINE_LOCATION
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
},
"ios"
:
{},
"sdkConfigs"
:
{}
}
},
},
"modules"
:
{},
"quickapp"
:
{},
"distribute"
:
{
"mp-weixin"
:
{
"android"
:
{
"appid"
:
""
,
"permissions"
:
[
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera.autofocus
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECORD_AUDIO
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CALL_PHONE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_COARSE_LOCATION
\"
/>"
,
"<uses-feature android:name=
\"
android.hardware.camera
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.ACCESS_FINE_LOCATION
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
]
"setting"
:
{
},
"urlCheck"
:
false
,
"ios"
:
{},
"es6"
:
true
,
"sdkConfigs"
:
{}
"postcss"
:
true
,
}
"minified"
:
true
},
},
"quickapp"
:
{},
"usingComponents"
:
true
,
"mp-weixin"
:
{
"permission"
:
{}
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
true
,
"postcss"
:
true
,
"minified"
:
true
},
},
"usingComponents"
:
true
,
"mp-alipay"
:
{
"permission"
:
{}
"usingComponents"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"h5"
:
{
"title"
:
"谛宝多多商城"
,
"router"
:
{
"mode"
:
"history"
,
"base"
:
"/uni"
},
},
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/prod/1.0.10/"
,
"mp-baidu"
:
{
"optimization"
:
{
"usingComponents"
:
true
"treeShaking"
:
{
"enable"
:
true
}
},
},
"devServer"
:
{
"mp-toutiao"
:
{
"port"
:
8080
,
"usingComponents"
:
true
"disableHostCheck"
:
true
,
"proxy"
:
{
"/uni/api"
:
{
"target"
:
"http://39.96.85.45:9093/"
,
"changeOrigin"
:
true
,
"secure"
:
false
,
"pathRewrite"
:
{
"^/uni/api"
:
"api"
}
}
}
},
},
"template"
:
"index.html"
"h5"
:
{
}
"title"
:
"谛宝多多商城"
,
}
"router"
:
{
\ No newline at end of file
"mode"
:
"history"
,
"base"
:
"/uni"
},
"publicPath"
:
"https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.11/"
,
"optimization"
:
{
"treeShaking"
:
{
"enable"
:
true
}
},
"devServer"
:
{
"port"
:
8080
,
"disableHostCheck"
:
true
,
"proxy"
:
{
"/uni/api"
:
{
"target"
:
"http://39.96.85.45:9093/"
,
"changeOrigin"
:
true
,
"secure"
:
false
,
"pathRewrite"
:
{
"^/uni/api"
:
"api"
}
}
}
},
"template"
:
"index.html"
}
}
pages/home/home.vue
View file @
b481d6df
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
<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>
<BottomBar
/>
<BottomBar
/>
<uni-popup
ref=
"popup"
type=
"center"
:maskClick=
"false"
>
<uni-popup
ref=
"popup"
type=
"center"
:maskClick=
"false"
>
<
img
<
view
class=
'coupon_dialog'
>
src=
"https://dbc-static.oss-cn-beijing.aliyuncs.com/credit_shop/20200311/3cfb41a8-e0e6-4bf2-8e30-24623a93351a.gif"
<img
class=
'coupon_dialog_img'
src=
"https://dbc-static.oss-cn-beijing.aliyuncs.com/credit_shop/global/coupon_dialog.png"
>
width=
'200'
<view
class=
"coupon_dialog_btn"
@
click=
"receive_coupon"
>
立即领取
</view>
height=
'200'
>
</view
>
</uni-popup>
</uni-popup>
</view>
</view>
</skeleton>
</skeleton>
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
categorySize
:
'110rpx'
,
categorySize
:
'110rpx'
,
avatarShape
:
'square'
,
avatarShape
:
'square'
,
titleWidth
:
'100%'
titleWidth
:
'100%'
}
},
COUPON_ID
:
'423'
//优惠券ID
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -94,18 +95,20 @@
...
@@ -94,18 +95,20 @@
// uni.hideLoading();
// uni.hideLoading();
this
.
loading
=
false
;
this
.
loading
=
false
;
// 打开广告弹窗
// 打开广告弹窗
const
timestamp
=
new
Date
(
'2020/05/18 00:00:00'
).
getTime
()
/
1000
;
const
timestamp
=
new
Date
(
'2020/05/01 00:00:00'
).
getTime
()
/
1000
;
// console.log(timestamp);
const
end_timestamp
=
new
Date
(
'2020/05/30 23:59:59'
).
getTime
()
/
1000
;
if
(
res
.
data
.
login_flg
===
1
&&
res
.
data
.
reg_time
>
timestamp
){
const
is_receive
=
uni
.
getStorageSync
(
'is_receive'
);
if
(
res
.
data
.
login_flg
===
1
&&
(
res
.
data
.
reg_time
>
timestamp
||
res
.
data
.
reg_time
<
end_timestamp
)
&&
is_receive
!=
this
.
COUPON_ID
){
setTimeout
(()
=>
{
setTimeout
(()
=>
{
//
this.$refs.popup.open();
this
.
$refs
.
popup
.
open
();
},
6
00
);
},
8
00
);
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'获取数据失败,请重试~'
,
title
:
'获取数据失败,请重试~'
,
duration
:
2000
,
duration
:
2000
,
icon
:
'none'
icon
:
'none'
});
});
}
}
},
},
...
@@ -117,6 +120,11 @@
...
@@ -117,6 +120,11 @@
});
});
}
}
});
});
},
receive_coupon
(){
const
{
origin
}
=
location
;
this
.
$jump
(
`
${
origin
}
/mobile/index.php?app=coupon&act=view&id=
${
this
.
COUPON_ID
}
`
);
this
.
$refs
.
popup
.
close
();
}
}
},
},
components
:
{
components
:
{
...
@@ -137,9 +145,33 @@
...
@@ -137,9 +145,33 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.homeContent
{
.homeContent
{
padding
:
100rpx
0
110rpx
;
padding
:
100rpx
0
110rpx
;
background-color
:
#f8f8f8
;
background-color
:
#f8f8f8
;
}
.coupon_dialog
{
width
:
600rpx
;
height
:
786rpx
;
position
:
relative
;
.coupon_dialog_img
{
width
:
100%
;
}
.coupon_dialog_btn
{
position
:
absolute
;
bottom
:
125rpx
;
left
:
50%
;
width
:
520rpx
;
height
:
84rpx
;
line-height
:
84rpx
;
margin-left
:
-260rpx
;
background-color
:
#3E322B
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
rgba
(
255
,
255
,
255
,
1
);
text-align
:
center
;
border-radius
:
84rpx
;
}
}
}
</
style
>
</
style
>
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