Commit c3045a60 authored by 肖健's avatar 肖健

Merge branch 'v1.0.0' into v1.0.0_jd

# Conflicts:
#	common/api/api.js
parents 5b7e02c7 7e4696d1
...@@ -61,7 +61,7 @@ const httpTokenRequest = (opts, data) => { ...@@ -61,7 +61,7 @@ const httpTokenRequest = (opts, data) => {
let promise = new Promise(function(resolve, reject) { let promise = new Promise(function(resolve, reject) {
uni.request(httpDefaultOpts).then( uni.request(httpDefaultOpts).then(
(res) => { (res) => {
console.log(33333333333,res[1]) // console.log(33333333333,res[1])
if(res[1].data.code == 401){ if(res[1].data.code == 401){
uni.removeStorageSync('userToken') uni.removeStorageSync('userToken')
uni.navigateTo({ uni.navigateTo({
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
}else{ }else{
sku = 100025676611 sku = 100025676611
} }
console.log(sku,777777777) // console.log(sku,777777777)
uni.navigateToMiniProgram({ uni.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id appId: 'wx91d27dbf599dff74', // 跳转目标小程序的id
path: 'pages/item/detail/detail?sku='+sku, // 目标小程序的页面路径 path: 'pages/item/detail/detail?sku='+sku, // 目标小程序的页面路径
...@@ -258,6 +258,11 @@ ...@@ -258,6 +258,11 @@
imgList.push(e) imgList.push(e)
}) })
this.list5 = imgList this.list5 = imgList
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
});
} }
}) })
}, },
...@@ -314,7 +319,7 @@ ...@@ -314,7 +319,7 @@
}, },
}, },
created() { created() {
this.getMoveCode() // this.getMoveCode()
this.getRotationList() this.getRotationList()
}, },
mounted() { mounted() {
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
}) })
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
console.log(res,111111)
if (res.from === 'menu') { if (res.from === 'menu') {
return { return {
title: '京东汽车挪车牌', title: '京东汽车挪车牌',
...@@ -58,6 +57,13 @@ ...@@ -58,6 +57,13 @@
}; };
} }
}, },
onShareTimeline(res){
return {
title: '京东汽车挪车牌',
path: '/pages/main',
imageUrl: ""
};
},
onShow: function() { onShow: function() {
uni.hideHomeButton() uni.hideHomeButton()
if (this.tab == 'personal') { if (this.tab == 'personal') {
...@@ -105,7 +111,7 @@ ...@@ -105,7 +111,7 @@
that.http.httpTokenRequest(opts, {}).then(res => { that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let xcxIndexPath = res.data.data.xcxIndexPath let xcxIndexPath = res.data.data.xcxIndexPath
console.log(xcxIndexPath,path,'扫一扫进入') // console.log(xcxIndexPath,path,'扫一扫进入')
if (xcxIndexPath) { if (xcxIndexPath) {
xcxIndexPath = path.replace(xcxIndexPath, '').replace( xcxIndexPath = path.replace(xcxIndexPath, '').replace(
"?", '') "?", '')
...@@ -211,6 +217,11 @@ ...@@ -211,6 +217,11 @@
if (res.data.code == 200) { if (res.data.code == 200) {
that.openid = res.data.data.openid that.openid = res.data.data.openid
uni.setStorageSync('openid', that.openid); uni.setStorageSync('openid', that.openid);
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
});
} }
}) })
}, },
...@@ -292,7 +303,7 @@ ...@@ -292,7 +303,7 @@
message message
} = res; } = res;
if (!token) { if (!token) {
console.log(res,"pin_key失效") // console.log(res,"pin_key失效")
uni.navigateTo({ uni.navigateTo({
url:"/pages/login/index/index" url:"/pages/login/index/index"
}) })
...@@ -324,7 +335,7 @@ ...@@ -324,7 +335,7 @@
// 判断是否扫码进入 // 判断是否扫码进入
that.scene = uni.getStorageSync('scene') that.scene = uni.getStorageSync('scene')
console.log(that.scene,"微信扫码进入") // console.log(that.scene,"微信扫码进入")
if (that.scene) { if (that.scene) {
//获取二维码携带的参数 //获取二维码携带的参数
//扫码后得到的参数 //扫码后得到的参数
...@@ -366,7 +377,7 @@ ...@@ -366,7 +377,7 @@
}) })
}else{ }else{
// 判断是否扫码进入 // 判断是否扫码进入
console.log("扫码进入但是未登录") // console.log("扫码进入但是未登录")
if (option && option.scene) { if (option && option.scene) {
uni.setStorageSync('scene', decodeURIComponent(option.scene)) uni.setStorageSync('scene', decodeURIComponent(option.scene))
let returnPage= '/pages/main'; let returnPage= '/pages/main';
...@@ -379,7 +390,7 @@ ...@@ -379,7 +390,7 @@
}else{ }else{
// 判断是否扫码进入 // 判断是否扫码进入
if (option && option.scene) { if (option && option.scene) {
console.log(option.scene,"扫码一登录") // console.log(option.scene,"扫码一登录")
//获取二维码携带的参数 //获取二维码携带的参数
//扫码后得到的参数 //扫码后得到的参数
that.scene = decodeURIComponent(option.scene) that.scene = decodeURIComponent(option.scene)
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
} }
that.http.httpTokenRequest(opts, param).then(res => { that.http.httpTokenRequest(opts, param).then(res => {
console.log(res, "扫码通知车主") // console.log(res, "扫码通知车主")
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.bindFlag) { if (res.data.data.bindFlag) {
that.gotoMoveCar(scene) that.gotoMoveCar(scene)
...@@ -107,7 +107,6 @@ ...@@ -107,7 +107,6 @@
uni.showToast({ uni.showToast({
title: res.data.msg, title: res.data.msg,
icon: 'none', icon: 'none',
icon: 'error',
}) })
} }
}) })
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
uni.removeStorageSync('xcxIndexPath') uni.removeStorageSync('xcxIndexPath')
// uni.removeStorageSync('openid') // uni.removeStorageSync('openid')
plugin.logout().then((res) => { plugin.logout().then((res) => {
console.jdLoginLog(res, 'logoutres'); // console.jdLoginLog(res, 'logoutres');
uni.reLaunch({ uni.reLaunch({
url: '/pages/main' url: '/pages/main'
}); });
...@@ -234,6 +234,12 @@ export default { ...@@ -234,6 +234,12 @@ export default {
if(this.userInfo.avatar){ if(this.userInfo.avatar){
this.avatar = this.userInfo.avatar this.avatar = this.userInfo.avatar
} }
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
}, },
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
methods: { methods: {
scroll: function (e) { scroll: function (e) {
this.old.scrollTop = e.detail.scrollTop this.old.scrollTop = e.detail.scrollTop
console.log(this.old.scrollTop); // console.log(this.old.scrollTop);
}, },
goTop() { goTop() {
this.scrollTop = this.old.scrollTop this.scrollTop = this.old.scrollTop
...@@ -118,6 +118,11 @@ export default { ...@@ -118,6 +118,11 @@ export default {
} else { } else {
// 加载失败 // 加载失败
this.$refs.list.loadFail() this.$refs.list.loadFail()
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
}, this.$u.random(100, 1000)); }, this.$u.random(100, 1000));
......
...@@ -116,6 +116,7 @@ export default { ...@@ -116,6 +116,7 @@ export default {
}); });
let opts = { url: '/app/vehicleAdmin/list', method: 'get' }; let opts = { url: '/app/vehicleAdmin/list', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
// console.log(res,222222)
if (res.statusCode == 200) { if (res.statusCode == 200) {
uni.hideLoading() uni.hideLoading()
this.carList = res.data || [] this.carList = res.data || []
......
...@@ -75,6 +75,11 @@ export default { ...@@ -75,6 +75,11 @@ export default {
} }
list.push({title: "绑定手机号", value: data.userMobile}) list.push({title: "绑定手机号", value: data.userMobile})
this.items = list this.items = list
}else{
uni.showToast({
title: res.data.msg,
icon: "none",
});
} }
}) })
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Description: 我的挪车记录 * @Description: 我的挪车记录
--> -->
<template> <template>
<view class="appCotent"> <view class="appCotent">
<div class="myRecord"> <div class="myRecord">
<scroll-list ref="list" :option="option" @load="load" @refresh="refresh"> <scroll-list ref="list" :option="option" @load="load" @refresh="refresh">
<div class="record__item" v-for="(vo,inx) in items" :key="inx"> <div class="record__item" v-for="(vo,inx) in items" :key="inx">
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
</div> </div>
</scroll-list> </scroll-list>
</div> </div>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
option: { option: {
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.items = res.data.rows this.items = res.data.rows
}else{ } else {
uni.showToast({ uni.showToast({
title: res.data.msg, title: res.data.msg,
icon: 'none', icon: 'none',
...@@ -136,11 +136,11 @@ export default { ...@@ -136,11 +136,11 @@ export default {
created() { created() {
//this.getMyMoveLogList() //this.getMyMoveLogList()
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.myRecord { .myRecord {
padding: 40rpx 0rpx; padding: 40rpx 0rpx;
.record__item { .record__item {
...@@ -237,5 +237,5 @@ export default { ...@@ -237,5 +237,5 @@ export default {
} }
} }
} }
} }
</style> </style>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
//查询挪车码失败 //查询挪车码失败
uni.showToast({ uni.showToast({
title: res.data.msg, title: res.data.msg,
icon: "error", icon: "none",
}); });
} }
}) })
......
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
if (res.data.code == 200) { if (res.data.code == 200) {
let data = res.data.data let data = res.data.data
try{ try{
let str = data.s3.padStart(8,0) let str = data.s3//.padStart(8,0)
let ivs = data.s3 let ivs = data.s3
let str2 = data.l1 let str2 = data.l1
if(str2.length == 4){ if(str2.length == 4){
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
let searchCondition = { let searchCondition = {
searchVal: this.keyword searchVal: this.keyword
} }
console.log(searchCondition,222222222) // console.log(searchCondition,222222222)
let opts = { url: '/app/index/mall/list', method: 'get' }; let opts = { url: '/app/index/mall/list', method: 'get' };
this.http.httpRequest(opts, searchCondition).then(res => { this.http.httpRequest(opts, searchCondition).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
......
...@@ -45,6 +45,12 @@ export default { ...@@ -45,6 +45,12 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.askingList = res.data.data this.askingList = res.data.data
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
}, },
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
<u-cell title="设置消息订阅" :isLink="true" @click="openMsg()"></u-cell> <u-cell title="设置消息订阅" :isLink="true" @click="openMsg()"></u-cell>
</u-cell-group> --> </u-cell-group> -->
<image v-if="image" :src="image" /> <image v-if="image" :src="image" />
<image v-else src="@/static/my/help.png"/> <image v-else src="@/static/my/help.png" />
</div> </div>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
image: '', image: '',
...@@ -25,12 +25,21 @@ export default { ...@@ -25,12 +25,21 @@ export default {
}, },
methods: { methods: {
getHelpInfo() { getHelpInfo() {
let opts = {url: '/app/user/help', method: 'get'}; let opts = {
url: '/app/user/help',
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.imgPath != '') { if (res.data.data.imgPath != '') {
this.image = res.data.data.imgPath this.image = res.data.data.imgPath
} }
}else{
uni.showToast({
title: res.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
}, },
...@@ -50,7 +59,7 @@ export default { ...@@ -50,7 +59,7 @@ export default {
wx.showModal({ wx.showModal({
title: "温馨提示", title: "温馨提示",
content: "检测到您没有开启订阅消息的权限,是否去设置?", content: "检测到您没有开启订阅消息的权限,是否去设置?",
success: function (modal) { success: function(modal) {
if (modal.confirm) { if (modal.confirm) {
// 点击肯定 // 点击肯定
wx.openSetting({ wx.openSetting({
...@@ -93,14 +102,15 @@ export default { ...@@ -93,14 +102,15 @@ export default {
wx.showModal({ wx.showModal({
title: "温馨提示", title: "温馨提示",
content: "检测到您没有开启订阅消息的权限,是否去设置?", content: "检测到您没有开启订阅消息的权限,是否去设置?",
success: function (modal) { success: function(modal) {
if (modal.confirm) { if (modal.confirm) {
// 点击肯定 // 点击肯定
wx.openSetting({ wx.openSetting({
withSubscriptions: true, withSubscriptions: true,
}); });
that.is_authorization = true; that.is_authorization = true;
uni.setStorageSync("is_authorization", true); uni.setStorageSync("is_authorization",
true);
} else { } else {
uni.showToast({ uni.showToast({
title: "您已拒绝订阅消息授权,无法接收通知", title: "您已拒绝订阅消息授权,无法接收通知",
...@@ -142,12 +152,11 @@ export default { ...@@ -142,12 +152,11 @@ export default {
this.getHelpInfo() this.getHelpInfo()
//this.openMsg() //this.openMsg()
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.hlep { .hlep {
padding: 0rpx 0; padding: 0rpx 0;
height: 1092rpx; height: 1092rpx;
...@@ -155,5 +164,5 @@ export default { ...@@ -155,5 +164,5 @@ export default {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
} }
</style> </style>
...@@ -163,6 +163,12 @@ export default { ...@@ -163,6 +163,12 @@ export default {
this.http.httpTokenRequest(opts, userInfoItem).then(response => { this.http.httpTokenRequest(opts, userInfoItem).then(response => {
if (response.data.code == 200) { if (response.data.code == 200) {
}else{
uni.showToast({
title: response.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
} }
...@@ -185,6 +191,12 @@ export default { ...@@ -185,6 +191,12 @@ export default {
this.http.httpTokenRequest(opts, userInfoItem).then(response => { this.http.httpTokenRequest(opts, userInfoItem).then(response => {
if (response.data.code == 200) { if (response.data.code == 200) {
}else{
uni.showToast({
title: response.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
} }
...@@ -208,6 +220,12 @@ export default { ...@@ -208,6 +220,12 @@ export default {
that.http.httpTokenRequest(opts, userInfoItem).then(response => { that.http.httpTokenRequest(opts, userInfoItem).then(response => {
if (response.data.code == 200) { if (response.data.code == 200) {
this.getUserInfo() this.getUserInfo()
}else{
uni.showToast({
title: response.data.msg,
icon: 'none',
duration: 2000
});
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment