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
ecc9b6b8
Commit
ecc9b6b8
authored
Apr 26, 2022
by
fwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加微信消息设置
parent
8ad76083
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
156 additions
and
52 deletions
+156
-52
active-form.vue
common/active-form/active-form.vue
+16
-7
binding.vue
pages/binding/binding.vue
+1
-1
index.vue
pages/binding/index.vue
+1
-1
getCarCode.vue
pagesA/pages/index/getCarCode.vue
+4
-4
getPrice.vue
pagesA/pages/index/getPrice.vue
+1
-1
myRecord.vue
pagesB/pages/move-car/myRecord.vue
+1
-1
oneMoveCar.vue
pagesB/pages/move-car/oneMoveCar.vue
+8
-8
scan.vue
pagesB/pages/move-car/scan.vue
+2
-2
pay.vue
pagesC/pages/shop/pay.vue
+3
-3
addAddress.vue
pagesD/pages/personal/addAddress.vue
+6
-6
editAddress.vue
pagesD/pages/personal/editAddress.vue
+8
-8
help.vue
pagesD/pages/personal/help.vue
+2
-2
index.vue
pagesD/pages/personal/index.vue
+99
-4
myOrder.vue
pagesD/pages/personal/myOrder.vue
+1
-1
userInfo.vue
pagesD/pages/personal/userInfo.vue
+3
-3
No files found.
common/active-form/active-form.vue
View file @
ecc9b6b8
...
...
@@ -429,7 +429,21 @@ export default {
var
that
=
this
;
var
setTime
=
0
;
if
(
!
that
.
isSend
)
{
let
phoneNumber
;
this
.
formDate2
.
forEach
(
e
=>
{
if
(
e
.
rules
.
name
==
'phone'
){
phoneNumber
=
e
.
rules
.
value
}
})
if
(
phoneNumber
){
let
opts
=
{
url
:
'/app/smsCode/binding/'
+
phoneNumber
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
that
.
isSend
=
true
;
}
})
}
setTime
=
setInterval
(
function
()
{
that
.
wait
--
;
that
.
sendColor
=
"color:#999"
;
...
...
@@ -444,12 +458,7 @@ export default {
},
1000
);
}
else
{
///app/smsCode/binding/{{phone}}
let
opts
=
{
url
:
'/app/smsCode/binding/'
+
this
.
phone
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
model1
.
carInfo
=
res
.
data
.
data
}
})
}
},
},
...
...
pages/binding/binding.vue
View file @
ecc9b6b8
...
...
@@ -73,7 +73,7 @@ export default {
// this.$vervify(this.formData); //表单校验 成功会继续往下走 失败抛出异常
// const res = this.$submitForm(this.formData); //校验成功 获取表单值
console
.
log
(
'表单对象 :>> '
,
this
.
formData
);
//
console.log('表单对象 :>> ', this.formData);
// uni.showToast({
// title: "验证码过期",
// icon: 'error',
...
...
pages/binding/index.vue
View file @
ecc9b6b8
...
...
@@ -120,7 +120,7 @@ export default {
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:ok"
)
{
that
.
decodePhoneLogin
(
e
.
detail
)
}
else
{
console
.
log
(
"用户点击了拒绝"
)
//
console.log("用户点击了拒绝")
}
},
//解密手机号码
...
...
pagesA/pages/index/getCarCode.vue
View file @
ecc9b6b8
...
...
@@ -166,8 +166,8 @@ export default {
uni
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
console
.
log
(
'当前位置的经度:'
+
res
.
longitude
);
console
.
log
(
'当前位置的纬度:'
+
res
.
latitude
);
//
console.log('当前位置的经度:' + res.longitude);
//
console.log('当前位置的纬度:' + res.latitude);
}
});
},
...
...
@@ -214,7 +214,7 @@ export default {
})
},
fail
:
function
(
err
)
{
console
.
log
(
'支付失败'
,
err
);
//
console.log('支付失败',err);
},
});
}
else
{
...
...
@@ -300,7 +300,7 @@ export default {
this
.
mallSelectMap
[
vo
.
id
]
+=
1
}
this
.
countMoney
+=
vo
.
currentPrice
console
.
log
(
this
.
mallSelectMap
)
//
console.log(this.mallSelectMap)
},
minusMall
(
vo
){
...
...
pagesA/pages/index/getPrice.vue
View file @
ecc9b6b8
...
...
@@ -108,7 +108,7 @@ export default {
},
watch
:
{
carNumber
(
num
)
{
console
.
log
(
num
);
//
console.log(num);
},
},
methods
:
{
...
...
pagesB/pages/move-car/myRecord.vue
View file @
ecc9b6b8
...
...
@@ -72,7 +72,7 @@ export default {
},
this
.
$u
.
random
(
100
,
1000
));
},
goDetail
(
id
){
console
.
log
(
id
)
//
console.log(id)
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/recordDetail?id='
+
id
})
...
...
pagesB/pages/move-car/oneMoveCar.vue
View file @
ecc9b6b8
...
...
@@ -190,17 +190,17 @@ export default {
content
:
'无法获取当前位置,请手动开启授权'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
//
console.log('用户点击确定')
uni
.
openSetting
({
success
(
res
)
{
if
(
res
.
authSetting
[
'scope.userLocation'
])
{
console
.
log
(
'打开授权设置定位'
)
//
console.log('打开授权设置定位')
_this
.
getLocation
()
}
},
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
//
console.log('用户点击取消')
}
},
})
...
...
@@ -218,7 +218,7 @@ export default {
_this
.
loadCity
(
res
.
longitude
,
res
.
latitude
)
},
fail
()
{
console
.
log
(
'拒绝获取地理位置'
)
//
console.log('拒绝获取地理位置')
}
})
},
...
...
@@ -239,7 +239,7 @@ export default {
latitude
+
'&key=1bba2ab2de600f8b5fafe167e09cd2af&radius=1000&extensions=all'
,
success
(
res
)
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
data
.
status
===
'1'
)
{
let
addressInfo
=
res
.
data
...
...
@@ -256,10 +256,10 @@ export default {
//区
that
.
appBo
.
countyName
=
addressInfo
.
regeocode
.
addressComponent
.
district
console
.
log
(
"当前位置: "
+
that
.
appBo
.
detailInfo
+
" "
+
that
.
appBo
.
provinceName
+
" "
+
" "
+
that
.
appBo
.
cityName
+
" "
+
that
.
appBo
.
countyName
)
//
console.log("当前位置: " + that.appBo.detailInfo + " " + that.appBo.provinceName + " " + " " + that.appBo.cityName + " " + that.appBo.countyName)
}
}
else
{
console
.
log
(
'获取信息失败,请重试!'
)
//
console.log('获取信息失败,请重试!')
}
},
})
...
...
@@ -278,7 +278,7 @@ export default {
// scene: e.scene
// }
this
.
moveCode
=
scene
console
.
log
(
'scene: '
+
scene
);
//
console.log('scene: ' + scene);
}
},
onShow
()
{
...
...
pagesB/pages/move-car/scan.vue
View file @
ecc9b6b8
...
...
@@ -129,7 +129,7 @@ export default {
}
}
console
.
log
(
this
.
moveCodeInfo
)
//
console.log(this.moveCodeInfo)
let
opts
=
{
url
:
'/app/moveCode/binding/'
,
method
:
'put'
};
this
.
http
.
httpTokenRequest
(
opts
,
this
.
moveCodeInfo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
...
...
@@ -163,7 +163,7 @@ export default {
this
.
moveCode
=
option
.
moveCode
},
onShow
:
function
(){
console
.
log
(
this
.
$store
.
state
.
selectedCar
);
//
console.log( this.$store.state.selectedCar);
}
}
</
script
>
...
...
pagesC/pages/shop/pay.vue
View file @
ecc9b6b8
...
...
@@ -120,7 +120,7 @@ export default {
}
let
opts
=
{
url
:
'/app/pay/order/submit/more'
,
method
:
'post'
}
this
.
http
.
httpTokenRequest
(
opts
,
that
.
orderSubmit
).
then
(
res
=>
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
data
.
code
==
200
)
{
let
paymentData
=
res
.
data
.
data
.
invokeResponse
;
...
...
@@ -132,13 +132,13 @@ export default {
signType
:
paymentData
.
signType
,
paySign
:
paymentData
.
paySign
,
success
:
function
(
res
)
{
console
.
log
(
'支付成功'
,
res
);
//
console.log('支付成功',res);
uni
.
navigateTo
({
url
:
'/pagesC/pages/shop/payOk'
})
},
fail
:
function
(
err
)
{
console
.
log
(
'支付失败'
,
err
);
//
console.log('支付失败',err);
},
});
}
else
{
...
...
pagesD/pages/personal/addAddress.vue
View file @
ecc9b6b8
...
...
@@ -121,17 +121,17 @@ export default {
content
:
'无法获取当前位置,请手动开启授权'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
//
console.log('用户点击确定')
uni
.
openSetting
({
success
(
res
)
{
if
(
res
.
authSetting
[
'scope.userLocation'
])
{
console
.
log
(
'打开授权设置定位'
)
//
console.log('打开授权设置定位')
_this
.
getLocation
()
}
},
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
//
console.log('用户点击取消')
}
},
})
...
...
@@ -149,7 +149,7 @@ export default {
_this
.
loadCity
(
res
.
longitude
,
res
.
latitude
)
},
fail
()
{
console
.
log
(
'拒绝获取地理位置'
)
//
console.log('拒绝获取地理位置')
}
})
},
...
...
@@ -170,7 +170,7 @@ export default {
latitude
+
'&key=1bba2ab2de600f8b5fafe167e09cd2af&radius=1000&extensions=all'
,
success
(
res
)
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
data
.
status
===
'1'
)
{
let
addressInfo
=
res
.
data
...
...
@@ -179,7 +179,7 @@ export default {
that
.
model1
.
addressInfo
.
address
=
detailInfo
}
}
else
{
console
.
log
(
'获取信息失败,请重试!'
)
//
console.log('获取信息失败,请重试!')
}
},
})
...
...
pagesD/pages/personal/editAddress.vue
View file @
ecc9b6b8
...
...
@@ -30,7 +30,7 @@
<u--input
v-model=
"model1.addressInfo.detailInfo"
placeholder=
"例如 2栋3单元101室"
border=
"none"
></u--input>
</u-form-item>
<u-form-item
label=
"设置默认地址:"
prop=
"addressInfo.defaultFlag"
ref=
"item1"
>
<u-switch
class=
"del__address"
v-model=
"model1.addressInfo.defaultFlag"
activeColor=
"#5ac725"
@
change=
"change"
></u-switch>
<u-switch
class=
"del__address"
v-model=
"model1.addressInfo.defaultFlag"
activeColor=
"#5ac725"
></u-switch>
</u-form-item>
</u--form>
...
...
@@ -110,7 +110,7 @@ export default {
}
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
//
console.log('用户点击取消');
}
}
});
...
...
@@ -152,17 +152,17 @@ export default {
content
:
'无法获取当前位置,请手动开启授权'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
//
console.log('用户点击确定')
uni
.
openSetting
({
success
(
res
)
{
if
(
res
.
authSetting
[
'scope.userLocation'
])
{
console
.
log
(
'打开授权设置定位'
)
//
console.log('打开授权设置定位')
_this
.
getLocation
()
}
},
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
//
console.log('用户点击取消')
}
},
})
...
...
@@ -180,7 +180,7 @@ export default {
_this
.
loadCity
(
res
.
longitude
,
res
.
latitude
)
},
fail
()
{
console
.
log
(
'拒绝获取地理位置'
)
//
console.log('拒绝获取地理位置')
}
})
},
...
...
@@ -201,7 +201,7 @@ export default {
latitude
+
'&key=1bba2ab2de600f8b5fafe167e09cd2af&radius=1000&extensions=all'
,
success
(
res
)
{
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
statusCode
===
200
)
{
if
(
res
.
data
.
status
===
'1'
)
{
let
addressInfo
=
res
.
data
...
...
@@ -210,7 +210,7 @@ export default {
that
.
model1
.
addressInfo
.
address
=
detailInfo
}
}
else
{
console
.
log
(
'获取信息失败,请重试!'
)
//
console.log('获取信息失败,请重试!')
}
},
})
...
...
pagesD/pages/personal/help.vue
View file @
ecc9b6b8
...
...
@@ -5,9 +5,9 @@
<
template
>
<view
class=
"appCotent"
>
<div
class=
"hlep"
>
<u-cell-group>
<
!--
<
u-cell-group>
<u-cell
title=
"设置消息订阅"
:isLink=
"true"
@
click=
"openMsg()"
></u-cell>
</u-cell-group>
</u-cell-group>
-->
<image
v-if=
"image"
:src=
"image"
/>
<image
v-else
src=
"@/static/my/help.png"
/>
</div>
...
...
pagesD/pages/personal/index.vue
View file @
ecc9b6b8
...
...
@@ -88,7 +88,12 @@ export default {
icon
:
require
(
"@/static/my/my11.png"
),
title
:
"问题反馈"
,
url
:
"/pagesD/pages/personal/ask"
}
},
{
icon
:
require
(
"@/static/my/my15.png"
),
title
:
"微信通知设置"
,
url
:
""
},
],
items
:
[{
title
:
'待发货'
,
...
...
@@ -136,9 +141,14 @@ export default {
});
},
goUrl
(
vo
)
{
if
(
vo
.
title
!=
'微信通知设置'
){
uni
.
navigateTo
({
url
:
vo
.
url
});
}
else
{
this
.
openMsg
()
}
},
editInfo
()
{
uni
.
navigateTo
({
...
...
@@ -154,6 +164,91 @@ export default {
}
})
},
openMsg
()
{
var
that
=
this
;
let
nc_templateid
=
that
.
nc_templateid
;
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
wx
.
getSetting
({
withSubscriptions
:
true
,
//是否获取用户订阅消息的订阅状态,默认false不返回
success
(
res
)
{
if
(
that
.
is_authorization
)
{
wx
.
openSetting
({
withSubscriptions
:
true
,
});
}
else
{
if
(
res
.
subscriptionsSetting
[
nc_templateid
]
==
"reject"
)
{
//用户点击了“总是保持以上,不再询问”
wx
.
showModal
({
title
:
"温馨提示"
,
content
:
"检测到您没有开启订阅消息的权限,是否去设置?"
,
success
:
function
(
modal
)
{
if
(
modal
.
confirm
)
{
// 点击肯定
wx
.
openSetting
({
withSubscriptions
:
true
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您已拒绝订阅消息授权,无法接收通知"
,
icon
:
"error"
,
});
that
.
is_authorization
=
false
;
}
},
});
}
else
{
// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
// var templateid = that.setting.templateid.map(item => item.tempid);
let
tmpid
=
[
nc_templateid
];
uni
.
requestSubscribeMessage
({
tmplIds
:
tmpid
,
success
(
res
)
{
if
(
res
[
tmpid
[
0
]]
==
"accept"
)
{
uni
.
showToast
({
title
:
"订阅成功"
,
icon
:
"none"
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您拒绝订阅消息授权,无法接收通知"
,
icon
:
"none"
,
});
that
.
is_authorization
=
false
;
}
},
fail
:
(
res
)
=>
{
wx
.
showModal
({
title
:
"温馨提示"
,
content
:
"检测到您没有开启订阅消息的权限,是否去设置?"
,
success
:
function
(
modal
)
{
if
(
modal
.
confirm
)
{
// 点击肯定
wx
.
openSetting
({
withSubscriptions
:
true
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您已拒绝订阅消息授权,无法接收通知"
,
icon
:
"error"
,
});
that
.
is_authorization
=
false
;
}
},
});
},
});
}
}
},
});
},
},
onShow
()
{
this
.
getUserInfo
()
...
...
pagesD/pages/personal/myOrder.vue
View file @
ecc9b6b8
...
...
@@ -190,7 +190,7 @@ export default {
methods
:
{
// 加载数据
load
(
paging
)
{
console
.
log
(
paging
)
//
console.log(paging)
setTimeout
(()
=>
{
let
list
=
[];
let
order
=
{}
...
...
pagesD/pages/personal/userInfo.vue
View file @
ecc9b6b8
...
...
@@ -127,7 +127,7 @@ export default {
transformTime
(
timestamp
)
{
if
(
timestamp
)
{
var
time
=
new
Date
(
timestamp
);
console
.
log
(
time
);
//
console.log(time);
var
y
=
time
.
getFullYear
();
//getFullYear方法以四位数字返回年份
var
M
=
time
.
getMonth
()
+
1
;
// getMonth方法从 Date 对象返回月份 (0 ~ 11),返回结果需要手动加一
var
d
=
time
.
getDate
();
// getDate方法从 Date 对象返回一个月中的某一天 (1 ~ 31)
...
...
@@ -184,7 +184,7 @@ export default {
this
.
show
=
false
},
clickFn
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
switch
(
e
)
{
case
1
:
this
.
show
=
true
...
...
@@ -263,7 +263,7 @@ export default {
let
uploadData
=
JSON
.
parse
(
res
.
data
)
let
opts
=
{
url
:
'/app/user/update'
,
method
:
'post'
};
let
userInfoItem
=
{
type
:
1
,
val
:
uploadData
.
data
.
fileName
};
console
.
log
(
userInfoItem
)
//
console.log(userInfoItem)
that
.
http
.
httpTokenRequest
(
opts
,
userInfoItem
).
then
(
response
=>
{
if
(
response
.
data
.
code
==
200
)
{
that
.
userInfo
.
avatar
=
res
.
data
.
url
...
...
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