Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
Details
Activity
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
Administrator
jd-vx-app
Commits
f0fe0ab6
Commit
f0fe0ab6
authored
May 27, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式修改
parent
ca9b2b6e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
170 additions
and
93 deletions
+170
-93
home.vue
pages/home.vue
+35
-19
config.js
pages/login/config.js
+13
-13
personal.vue
pages/personal.vue
+15
-1
shop.vue
pages/shop.vue
+25
-5
getCoupon.vue
pagesA/pages/index/getCoupon.vue
+82
-55
No files found.
pages/home.vue
View file @
f0fe0ab6
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
<
script
>
<
script
>
import
util
from
'@/pages/login/util.js'
import
util
from
'@/pages/login/util.js'
let
plugin
=
requirePlugin
(
"loginPlugin"
);
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -87,7 +88,8 @@
...
@@ -87,7 +88,8 @@
freeCode
:
{},
freeCode
:
{},
carList
:[],
// 爱车列表
carList
:[],
// 爱车列表
pooupCoupon
:
false
,
pooupCoupon
:
false
,
timerNum
:
3
timerNum
:
3
,
timer
:
null
};
};
},
},
methods
:
{
methods
:
{
...
@@ -134,7 +136,12 @@
...
@@ -134,7 +136,12 @@
// }
// }
// });
// });
this
.
pooupCoupon
=
true
this
.
pooupCoupon
=
true
let
timer
=
setInterval
(()
=>
{
// util.h5Init(); //
plugin
.
getLoginToken
().
then
((
res
=
{})
=>
{
//res.err_code 0 res.token_key
//tokenB
if
(
res
.
token_key
){
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
timerNum
>
0
){
if
(
this
.
timerNum
>
0
){
this
.
timerNum
--
this
.
timerNum
--
}
else
{
}
else
{
...
@@ -150,9 +157,11 @@
...
@@ -150,9 +157,11 @@
// 打开成功
// 打开成功
}
}
})
})
clearInterval
(
timer
)
clearInterval
(
this
.
timer
)
}
}
},
1000
)
},
1000
)
}
})
}
else
{
}
else
{
//跳转到领取优惠卷页面
//跳转到领取优惠卷页面
// uni.navigateTo({
// uni.navigateTo({
...
@@ -174,9 +183,16 @@
...
@@ -174,9 +183,16 @@
extraData
:
{
// 需要携带的参数
extraData
:
{
// 需要携带的参数
},
},
success
(
res
)
{
success
:(
res
)
=>
{
// 打开成功
// 打开成功
this
.
pooupCoupon
=
false
this
.
pooupCoupon
=
false
this
.
timerNum
=
3
clearInterval
(
this
.
timer
)
},
fail
:()
=>
{
this
.
pooupCoupon
=
false
this
.
timerNum
=
3
clearInterval
(
this
.
timer
)
}
}
})
})
},
},
...
...
pages/login/config.js
View file @
f0fe0ab6
...
@@ -20,19 +20,19 @@ export let config = {
...
@@ -20,19 +20,19 @@ export let config = {
author
:
true
,
author
:
true
,
hiddenLoginType
:
'2'
,
hiddenLoginType
:
'2'
,
//隐藏按钮 1为 帐密方式;2为微信手机号快捷登录
//隐藏按钮 1为 帐密方式;2为微信手机号快捷登录
loginConfig
:
{
//
loginConfig: {
jdLoginBtnStyle
:
'color:red'
,
//
jdLoginBtnStyle: 'color:red',
// 登录/注册按钮样式
//
// 登录/注册按钮样式
wxBtnStyle
:
'color:red'
,
//
wxBtnStyle: 'color:red',
// 微信快捷登录按钮样式
//
// 微信快捷登录按钮样式
userPlaceholder
:
''
,
//
userPlaceholder: '',
// 帐密登录的 placeholder
//
// 帐密登录的 placeholder
loginBtnStyle
:
'color:#fff'
,
//
loginBtnStyle: 'color:#fff',
// 帐密登录界面登录按钮样式
//
// 帐密登录界面登录按钮样式
tabStyle
:
'color:green'
,
//
tabStyle: 'color:green',
//帐密和手机号登录tab样式
//
//帐密和手机号登录tab样式
currentTabStyle
:
'border-color:green'
//帐密和手机号登录tab选中
//
currentTabStyle: 'border-color:green' //帐密和手机号登录tab选中
}
// selfTips: [{ //无特殊需求不需要配置
//
} // selfTips: [{ //无特殊需求不需要配置
// tip:'我是测试1',
// tip:'我是测试1',
// url: 'm.jd.com'
// url: 'm.jd.com'
// }, {
// }, {
...
...
pages/personal.vue
View file @
f0fe0ab6
...
@@ -71,7 +71,8 @@ export default {
...
@@ -71,7 +71,8 @@ export default {
menu
:
[{
menu
:
[{
icon
:
require
(
"@/static/my/my01.png"
),
icon
:
require
(
"@/static/my/my01.png"
),
title
:
"我的订单"
,
title
:
"我的订单"
,
url
:
"/pagesD/pages/personal/myJdOrder"
url
:
""
,
type
:
"jd"
},
},
// {
// {
// icon: require("@/static/my/my12.png"),
// icon: require("@/static/my/my12.png"),
...
@@ -171,6 +172,19 @@ export default {
...
@@ -171,6 +172,19 @@ export default {
})
})
return
;
return
;
}
}
if
(
vo
.
type
==
"jd"
){
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
''
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
})
return
;
}
if
(
vo
.
title
!=
'微信通知设置'
)
{
if
(
vo
.
title
!=
'微信通知设置'
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
vo
.
url
url
:
vo
.
url
...
...
pages/shop.vue
View file @
f0fe0ab6
...
@@ -155,15 +155,35 @@ export default {
...
@@ -155,15 +155,35 @@ export default {
})
})
},
},
goDetail
(
id
,
link
)
{
goDetail
(
id
,
link
)
{
if
(
link
){
let
token
=
uni
.
getStorageSync
(
'userToken'
);
if
(
!
token
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/
webview/webview?url='
+
link
url
:
'/pages/
login/index/index'
})
})
return
return
;
}
if
(
link
){
// uni.navigateTo({
// url: '/pages/webview/webview?url=' + link
// })
uni
.
navigateToMiniProgram
({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
path
:
''
,
// 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
},
success
(
res
)
{
// 打开成功
}
}
uni
.
navigateTo
({
url
:
'/pagesC/pages/shop/detail?id='
+
id
})
})
return
}
uni
.
showToast
({
title
:
"该商品再无链接!"
,
icon
:
'none'
,
duration
:
1500
,
});
// uni.navigateTo({
// url: '/pagesC/pages/shop/detail?id=' + id
// })
},
},
getMallList
()
{
getMallList
()
{
let
opts
=
{
let
opts
=
{
...
...
pagesA/pages/index/getCoupon.vue
View file @
f0fe0ab6
...
@@ -41,11 +41,13 @@
...
@@ -41,11 +41,13 @@
</
template
>
</
template
>
<
script
>
<
script
>
let
plugin
=
requirePlugin
(
"loginPlugin"
);
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
pooupSuccess
:
false
,
pooupSuccess
:
false
,
timerNum
:
3
timerNum
:
3
,
timer
:
null
}
}
},
},
methods
:
{
methods
:
{
...
@@ -54,14 +56,14 @@
...
@@ -54,14 +56,14 @@
url
:
'/app/user/send/coupon'
,
url
:
'/app/user/send/coupon'
,
method
:
'post'
method
:
'post'
};
};
//
this.http.httpTokenRequest(opts, {}).then(res => {
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
//
console.log(res.data, 1111111)
console
.
log
(
res
.
data
,
1111111
)
//
if (res.data.code == 200) {
if
(
res
.
data
.
code
==
200
)
{
//
uni.showToast({
uni
.
showToast
({
//
title: "领取成功!",
title
:
"领取成功!"
,
//
icon: 'none',
icon
:
'none'
,
//
});
});
//
this.pooupSuccess = true
this
.
pooupSuccess
=
true
// let timer = setInterval(() => {
// let timer = setInterval(() => {
// if (this.timerNum > 0) {
// if (this.timerNum > 0) {
// this.timerNum--
// this.timerNum--
...
@@ -81,32 +83,50 @@
...
@@ -81,32 +83,50 @@
// clearInterval(timer)
// clearInterval(timer)
// }
// }
// }, 1000)
// }, 1000)
}
else
{
// uni.showToast({
// title: "您已领取优惠券!",
// icon: 'none',
// duration:1500,
// success() {
// uni.navigateToMiniProgram({
// appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
// path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
// extraData: { // 需要携带的参数
// },
// success(res) {
// // 打开成功
// }
// }
// })
// })
// }
// });
}
})
// uni.showToast({
// uni.showToast({
// title: "领取成功!",
// title: "领取成功!",
// icon: 'none',
// icon: 'none',
// });
// });
this
.
pooupSuccess
=
true
//
this.pooupSuccess = true
let
timer
=
setInterval
(()
=>
{
// let timer = setInterval(()=>
{
if
(
this
.
timerNum
>
0
)
{
// if(this.timerNum > 0)
{
this
.
timerNum
--
// this.timerNum
--
}
else
{
// }else
{
this
.
pooupSuccess
=
false
//
this.pooupSuccess = false
this
.
timerNum
=
3
//
this.timerNum = 3
uni
.
navigateToMiniProgram
({
//
uni.navigateToMiniProgram({
appId
:
'wx91d27dbf599dff74'
,
// 跳转目标小程序的id
//
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path
:
'pages/item/detail/detail?sku=100023585323'
,
// 目标小程序的页面路径
//
path: 'pages/item/detail/detail?sku=100023585323', // 目标小程序的页面路径
extraData
:
{
// 需要携带的参数
//
extraData: { // 需要携带的参数
},
//
},
success
(
res
)
{
//
success(res) {
// 打开成功
//
// 打开成功
}
//
}
})
//
})
clearInterval
(
timer
)
//
clearInterval(timer)
}
//
}
},
1000
)
// },
1000)
},
},
goUseCoupon
()
{
goUseCoupon
()
{
uni
.
navigateToMiniProgram
({
uni
.
navigateToMiniProgram
({
...
@@ -115,9 +135,16 @@
...
@@ -115,9 +135,16 @@
extraData
:
{
// 需要携带的参数
extraData
:
{
// 需要携带的参数
},
},
success
(
res
)
{
success
:(
res
)
=>
{
// 打开成功
// 打开成功
this
.
pooupSuccess
=
false
this
.
pooupSuccess
=
false
;
this
.
timerNum
=
3
;
clearInterval
(
this
.
timer
);
},
fail
:()
=>
{
this
.
pooupSuccess
=
false
;
this
.
timerNum
=
3
;
clearInterval
(
this
.
timer
);
}
}
})
})
}
}
...
...
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