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

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

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

Loading…
Cancel
Save