Merge pull request '更换手机号,修改密码,新老手机号验证' (#3) from lc into master

Reviewed-on: #3
master
骆超 2 years ago
commit 9378ee3b28
  1. 8
      api/oli-user.js
  2. 4
      packageSecurity/setPassword/setPassword.vue
  3. 40
      pages/index/index.vue

@ -1,6 +1,6 @@
import request from '@/utils/request'
const service_name ='oil-user'
const group_name ='oilCustomerChannelRelation'
const service_name ='xkhl-user'
const group_name ='oilCustomerChannelRelation'
const change_phone ='sysCustomerInfo'
export default{
//根据用户手机查询油站
@ -91,7 +91,7 @@ export default{
initCouldUser(){
return request({
url: `/${service_name}/sysCustomerInfo/initCouldUser/initCouldUser`,
method: 'GET'
method: 'GET'
})
},
}
}

@ -52,7 +52,9 @@
tips: '发送验证码',
frozen: false, //
auth: {},
verifyCodeToken:'',
verifyCodeToken:'',
pwd:"",
authpwd:"",
loginUser: uni.getStorageSync('loginUser')
}
},

@ -1,7 +1,7 @@
<template>
<view class="page-content " :class="(PageCur=='home'||PageCur=='scan')?'my-bg':''">
<!-- <uni-nav-bar left-icon="back" left-text="返回" right-text="菜单" title="导航栏组件"></uni-nav-bar> -->
<home ref='homecheck' v-if="PageCur=='home'||PageCur=='scan'" :user-account="userAccount" @changMenus='changMenus' :site="userAccount" :menusList = 'menusList' :checkUser = 'checkUser'></home>
<home ref='homecheck' v-if="PageCur==='home'||PageCur==='scan'" :user-account="userAccount" @changMenus='changMenus' :site="userAccount" :menusList = 'menusList' :checkUser = 'checkUser'></home>
<setup v-if="PageCur=='setup'"></setup>
<view class="bottom-view">
<view class="padding-top radius shadow bottom-bar-fixed">
@ -11,7 +11,7 @@
<text :class="PageCur=='home'?'text-red':'text-gray'">
加油站
</text>
</view>
</view>
<view class="action text-gray add-action" @tap="NavChange" data-cur="scan">
<button class="cu-btn cuIcon-scan sl shadow" :class="PageCur=='scan'?'bg-main-oil':'bg-gradual-orange'"></button>
<text :class="PageCur=='scan'?'text-red':'text-gray'">
@ -30,11 +30,11 @@
</view>
</template>
<script>
<script>
import cloudSiteApi from '@/api/cloud-site.js'
import oliSiteApi from '@/api/oli-site.js'
import oliUserApi from '@/api/oli-user.js'
export default {
export default {
data() {
return {
checkUser:false,
@ -48,7 +48,7 @@
totalCount: 0,
totalMoney: 0.00
},
loginUser: uni.getStorageSync('loginUser'),
loginUser: uni.getStorageSync('loginUser'),
channelId:uni.getStorageSync('channelId'),
menusList:[],
site: {},
@ -62,10 +62,10 @@
url: '../../packageOrders/pages/printTicket/printTicket'
})
},
onShow() {
onShow() {
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('device')
if (token && openid) {
const openid = uni.getStorageSync('device')
if (token && openid) {
} else {
uni.showToast({
title: '您还没有登录哦',
@ -74,9 +74,9 @@
setTimeout(function() {
uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin',
success: () => {
success: () => {
},
fail: (err) => {
fail: (err) => {
}
})
}, 1500);
@ -99,10 +99,10 @@
// this.Splicing(item)
menusList.push(this.Splicing(item))
}
})
})
//console.log('menusLisPush',menusList)
// uni.setStorageSync('menusLists',menusList)
let check = uni.getStorageSync('checkFirst')
let check = uni.getStorageSync('checkFirst')
//console.log(check)
if(check){
_that.checkUser = true
@ -110,7 +110,7 @@
uni.setStorageSync('menusChangeList',menusList)
this.menusList = menusList
//console.log('menusfor',this.menusList)
// this.getUserInfo()
// this.getUserInfo()
this.longiCheck()
// //console.log('++++++++')
//console.log('menus',this.menusList)
@ -134,26 +134,26 @@
this.menusList =data
},
longiCheck(){
let userInfo = uni.getStorageSync('loginUser'),
_that =this
let userInfo = uni.getStorageSync('loginUser')
const _that = this
//console.log(userInfo)
oliUserApi.getByPhone(userInfo.userPhone).then((res)=>{
//console.log('')
if(res.code == 20000){
_that.checkList = 'show'
_that.oliList = res.data
_that.oliList = res.data
_that.checkList = 'show'
_that.changeChannel.username = _that.loginUser.userPhone
_that.changeChannel.unionId = uni.getStorageSync('unionId')
this.$refs.homecheck.oliList = res.data
}else{
uni.showToast({
title:'请求失败,请稍后再试',
icon:'none'
})
}
})
},
Splicing(list){
Splicing(list){
let obj = {
cuIcon: '',
path: '',
@ -226,7 +226,7 @@
// getUserInfo() {
// //
// oliSiteApi.getSiteBasicData(this.channelId).then(res => {
// //console.log('', res)
// //console.log('', res)
// uni.stopPullDownRefresh();
// if (res.code === 20000) {
// uni.setStorageSync('ueserList',res.data)

Loading…
Cancel
Save