1263428893@qq.com 3 months ago
parent
commit
ade33689b0
12 changed files with 265 additions and 163 deletions
  1. +25
    -8
      common/api.js
  2. +2
    -0
      common/config.js
  3. +20
    -26
      pages/auth/index.vue
  4. +7
    -5
      pages/home/index.vue
  5. +3
    -3
      pages/login/index.vue
  6. +36
    -19
      pages/user/index.vue
  7. +44
    -33
      pages_subpack/enterprise/index.vue
  8. +101
    -43
      pages_subpack/person/index.vue
  9. +6
    -6
      pages_subpack/release/component/master.vue
  10. +2
    -1
      pages_subpack/wallet/component/recharge.vue
  11. +1
    -1
      pages_subpack/wallet/index.vue
  12. +18
    -18
      util/request/responseInterceptors.js

+ 25
- 8
common/api.js View File

@ -9,7 +9,7 @@ export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/i
* 登录的接口
*/
// 微信登录接口
export const appletLogin = (params) => http.get('/employ-api/user/login', {params:params})
export const appletLogin = (params) => http.get('/employ-api/employ/login/login', {params:params})
// 招聘方填写信息
export const roleBoss = (params) => http.post('/employ-api/user/roleBoss', params)
// 求职者填写信息
@ -19,7 +19,7 @@ export const role = (params) => http.post('/employ-api/user/role', params)
// 首页行业菜单
export const industryList = (params) => http.get('/employ-api/index/industryList', {params:params})
// 获取banner列表
export const bannerList = (params) => http.post('/employ-api/index/bannerList', params)
export const bannerList = (params) => http.get('/employ-api/employ/banner/queryBannerList', {params:params})
// 招聘大厅列表查询
export const taskList = (params) => http.get('/employ-api/index/taskList', {params:params})
// 求职大厅列表查询
@ -32,15 +32,15 @@ export const industryById = (params) => http.get('/employ-api/index/getIndustryB
export const getTaskById = (params) => http.get('/employ-api/user/getTaskById', {params:params})
// 我的头像昵称,平台客户电话等信息
export const userInfo = (params) => http.post('/employ-api/index/index', params)
export const userInfo = (params) => http.get('/employ-api/employ/user/getUserCenterData', {params:params})
// 帮助与反馈
export const addSuggest = (params) => http.post('/employ-api/index/addSuggest', params)
// 余额日志
export const payLog = (params) => http.post('/employ-api/pay/log', params)
// 充值支付
export const payRecharge = (params) => http.post('/employ-api/pay/payRecharge', params)
export const payRecharge = (params) => http.get('/employ-api/employ/amount/recharge',{params:params})
// 提现
export const withdrawal = (params) => http.post('/employ-api/pay/withdrawal', params)
export const withdrawal = (params) => http.get('/employ-api/employ/amount/CashOut',{params:params})
// 发起聘请,等待师傅确认
@ -58,11 +58,11 @@ export const bossOrderList = (params) => http.get('/employ-api/order/bossOrderLi
// 求职方订单分页列表查询
export const workOrderList = (params) => http.get('/employ-api/order/workOrderList', {params:params})
// 获取平台隐私政策,协议等
export const getSysText = (params) => http.post('/employ-api/index/getSysText', params)
export const getSysText = (params) => http.get('/employ-api/employ/config/queryConfigList', {params:params})
// 小程序-绑定手机号
export const bindPhone = (params) => http.post('/employ-api/user/bindPhone', params)
export const bindPhone = (params) => http.get('/employ-api/employ/login/bindPhone', {params:params})
// 修改头像和昵称,传nickName和headimgurl
export const updateUserInfo = (params) => http.post('/employ-api/user/updateUserInfo', params)
export const updateUserInfo = (params) => http.post('/employ-api/employ/user/updateUser', params)
// 公告详情
export const getNotice = (params) => http.get('/employ-api/index/getNotice', {params:params})
// 求职者修改信息 传id修改
@ -77,4 +77,21 @@ export const getSessionKey = (params) => http.get('/employ-api/user/getSessionKe
// 求职者修改信息 传id修改
export const addTask2 = (params) => http.post('/employ-api/user/addTask2', params)
// 配置信息-获取配置信息列表
export const queryConfigList = (params) => http.get('/employ-api/employ/config/queryConfigList', {params:params})
// 个人信息
export const userInfoDetail = (params) => http.get('/employ-api/employ/user/queryUser', {params:params})
// 实名认证-企业实名认证
export const addAuthenticationCompany = (params) => http.post('/employ-api/employ/authentication/addAuthenticationCompany', params)
// 实名认证-查询企业实名认证信息
export const getAuthenticationCompany = (params) => http.get('/employ-api/employ/authentication/getAuthenticationCompany', {params:params})
// 实名认证-个人实名认证
export const addAuthenticationPerson = (params) => http.post('/employ-api/employ/authentication/addAuthenticationPerson', params)
// 实名认证-查询个人实名认证信息
export const getAuthenticationPerson = (params) => http.get('/employ-api/employ/authentication/getAuthenticationPerson', {params:params})
// 首页-分类信息列表
export const queryCategoryList = (params) => http.get('/employ-api/employ/category/queryCategoryList', params)

+ 2
- 0
common/config.js View File

@ -2,4 +2,6 @@ module.exports = {
// baseUrl: 'http://3fl8266127.qicp.vip'
baseUrl:"https://employadmin.hhlm1688.com",
// baseUrl:"http://augcl.natapp1.cc"
// https://employadmin.hhlm1688.com/employ-api
}

+ 20
- 26
pages/auth/index.vue View File

@ -34,7 +34,7 @@
服务协议和隐私权政策
</view>
<view class="se-lh-40 se-mt-40 se-fs-24 se-c-99">
<u-parse :content="getValueByName('yszc')"></u-parse>
<u-parse :content="getValueByName('config_privacy')"></u-parse>
<!-- <text>请您务必审慎阅读充分理解用户协议和隐私政策各条款包括但不限于用户注意事项用户行为规范以及为了向你提供服务而收集使用存储你个人信息的情况等你可阅读</text>
<text class="se-c-black se-fw-6" @click="handleOpenPrivacyContract()">用工平台小程序用户服务协议</text>
<text></text>
@ -88,18 +88,18 @@
// })
},
getValueByName(name) {
const item = this.sysList.find((item) => item.name == name);
const item = this.sysList.find((item) => item.paramCode == name);
return item ? item.value : "";
},
onSysText(){
let that = this
let params={}
getSysText(params).then(response=>{
that.sysList=response.result
uni.setStorageSync('sysList', response.result)
}).catch(error=>{
// getSysText(params).then(response=>{
// that.sysList=response.result
// uni.setStorageSync('sysList', response.result)
// }).catch(error=>{
})
// })
},
checkboxChange(n) {
console.log('change', n);
@ -141,26 +141,20 @@
vid:""
}
appletLogin(params).then((response) => {
console.info(`response`,response)
let result = response.result
console.info(`appletLogin`,result)
uni.hideLoading()
uni.setStorageSync('token', response.result.token)
uni.setStorageSync('company', response.result.company)
uni.setStorageSync('boss', response.result.boss)
uni.setStorageSync('worker', response.result.worker)
uni.setStorageSync('userInfo', response.result.userInfo)
userInfo({}).then(response=>{
if(!response.result.headImage && !response.result.nickName){
uni.navigateTo({
url:"/pages/login/index"
})
}else{
uni.navigateTo({
url:"/pages/identity/index"
})
}
}).catch(err=>{
})
uni.setStorageSync('token', result.token)
uni.setStorageSync('userInfo', result.userInfo)
if(!result.userInfo.headImage && !result.userInfo.nickName && !result.userInfo.phone){
uni.navigateTo({
url:"/pages/login/index"
})
}else{
uni.navigateTo({
url:"/pages/identity/index"
})
}
}).catch((error) =>{
})


+ 7
- 5
pages/home/index.vue View File

@ -72,7 +72,8 @@
industryList,
getSysText,
getNotice,
noticeList
noticeList,
queryConfigList
} from "@/common/api.js"
import enterpriseBox from "./component/enterprise.vue"
import masterBox from "./component/master.vue"
@ -133,6 +134,7 @@
that.onRolelist()
},
methods:{
onNoticeDetail(index){
uni.navigateTo({
url:"/pages_subpack/notice/index?id="+this.notice[index].id
@ -157,7 +159,8 @@
let that = this
let params={}
getSysText(params).then(response=>{
localStorage.setItem("sysList",response.result)
console.info("onSysText",response.result)
uni.setStorageSync('sysList', result.result)
}).catch(error=>{
})
@ -201,9 +204,8 @@
})
},
onBannerList(){
bannerList({}).then(response=>{
console.info("banner",response)
this.swiperList = response.result[0]
bannerList({type:0}).then(response=>{
this.swiperList = response.result.records
}).catch(error=>{
})


+ 3
- 3
pages/login/index.vue View File

@ -99,7 +99,7 @@
var detail = event.detail;
if(detail.errMsg=='getPhoneNumber:ok'){
let params={
code : detail.code,
phoneCode : detail.code,
encryptedData: detail.encryptedData,
iv:detail.iv,
}
@ -125,10 +125,10 @@
}
let params={
code : res.code,
headimgurl:that.imagUrl,
headImage:that.imagUrl,
nickName:that.nameUser,
openid:uni.getStorageSync('userInfo').appletOpenid,
phoneNumber:that.phone
phone:that.phone
}
//
if(that.imagUrl&&that.nameUser&&that.phone){


+ 36
- 19
pages/user/index.vue View File

@ -2,10 +2,10 @@
<view class="u-page">
<view class="se-pt-50 se-pb-120 se-px-40 se-bgc-orange se-c-white se-pos">
<view class="se-flex">
<image :src="headImage" class="se-br-p-50 se-bgc-f5 se-w-100 se-h-100" mode=""></image>
<image :src="user.headImage" class="se-br-p-50 se-bgc-f5 se-w-100 se-h-100" mode=""></image>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<view class="se-flex">
<text class="se-fw-6 se-fs-30">{{nickName}}</text>
<text class="se-fw-6 se-fs-30">{{user.nickName}}</text>
<view class="se-flex se-flex-ai-c se-ml-20" @click="onEdit()">
<image class="se-a-25 se-mr-10" src="@/static/image/pencil.png" mode=""></image>
<text class="se-fs-22">修改资料</text>
@ -13,7 +13,7 @@
</view>
<view class="se-fs-24 se-display-ib">
<text>手机号:</text>
<text class="se-ml-20">{{phone}}</text>
<text class="se-ml-20">{{user.phone}}</text>
</view>
</view>
</view>
@ -31,7 +31,7 @@
我的余额
</view>
<view class="se-fs-30 se-display-ib se-pt-20" style="color: #DC2828;">
{{myMoney}}
{{amount}}
</view>
</view>
</view>
@ -113,11 +113,16 @@
<script>
import {
userInfo,
userInfoDetail,
bannerList
} from "@/common/api.js"
export default {
data() {
return {
amount:0,
companyAuthenticationStatus:null,//
personAuthenticationStatus:null,//
user:{},
swiperList:[],
list: [
'@/static/image/59.png'
@ -139,6 +144,7 @@
onShow() {
this.onUserInfo()
this.onBannerList()
this.onUserInfoDetail()
},
methods: {
onEdit(){
@ -147,9 +153,17 @@
})
},
onBannerList(){
bannerList({}).then(response=>{
console.info("banner",response)
this.swiperList = response.result[1]
bannerList({type:1}).then(response=>{
this.swiperList = response.result.records
}).catch(error=>{
})
},
onUserInfoDetail(){
let params = {}
userInfoDetail(params).then(response=>{
console.info("userInfoDetail",response)
this.user = response.result
}).catch(error=>{
})
@ -157,18 +171,21 @@
onUserInfo(){
let params={}
userInfo(params).then(response=>{
console.info("userInfo",response)
this.id=response.result.id
this.headImage=response.result.headImage
this.myMoney=response.result.myMoney?response.result.myMoney:0
this.nickName=response.result.nickName?response.result.nickName:"微信昵称"
this.phone=response.result.phone?response.result.phone:""
this.worker=response.result.worker?response.result.worker:""
this.boss=response.result.boss?response.result.boss:""
this.company=response.result.company?response.result.company:""
uni.setStorageSync('company', response.result.company)
uni.setStorageSync('boss', response.result.boss)
uni.setStorageSync('worker', response.result.worker)
this.amount = response.result.amount;
this.companyAuthenticationStatus = response.result.companyAuthenticationStatus;
this.personAuthenticationStatus = response.result.personAuthenticationStatus;
console.info("userInfo",response.result)
// this.id=response.result.id
// this.headImage=response.result.headImage
// this.myMoney=response.result.myMoney?response.result.myMoney:0
// this.nickName=response.result.nickName?response.result.nickName:""
// this.phone=response.result.phone?response.result.phone:""
// this.worker=response.result.worker?response.result.worker:""
// this.boss=response.result.boss?response.result.boss:""
// this.company=response.result.company?response.result.company:""
// uni.setStorageSync('company', response.result.company)
// uni.setStorageSync('boss', response.result.boss)
// uni.setStorageSync('worker', response.result.worker)
}).catch(error=>{
})


+ 44
- 33
pages_subpack/enterprise/index.vue View File

@ -60,7 +60,7 @@
</view>
</template>
<script>
import {roleBoss,industryList,updateRoleBoss} from "@/common/api.js"
import {roleBoss,industryList,updateRoleBoss,addAuthenticationCompany,queryCategoryList,getAuthenticationCompany} from "@/common/api.js"
export default{
data(){
return{
@ -144,23 +144,33 @@
},
onReady() {
this.onIndustryList()
this.onQueryCategoryList()
this.onAuthenticationCompany()
this.$refs.uForm.setRules(this.rules)
},
mounted() {
let company = uni.getStorageSync("company")
if(company){
this.form.id = company.id
this.form.name = company.userName
this.form.mobile = company.phone
this.form.company = company.companyName
this.form.address = company.companyAddress
this.form.industryId = company.industryId
this.form.industryName = company.industryName
this.form.businessLicenseFile = this.stringToKeyValueArray(company.businessLicense)
}
},
methods: {
onAuthenticationCompany(){
let params={}
getAuthenticationCompany(params).then(response=>{
let company = response.result
if(response.result){
this.form.id = company.id
this.form.name = company.name
this.form.mobile = company.phone
this.form.company = company.company
this.form.address = company.address
this.form.industryId = company.industry
this.form.industryName = company.industryName
this.form.businessLicenseFile = this.stringToKeyValueArray(company.license)
}
}).catch(error=>{
})
},
stringToKeyValueArray(str, delimiter1 = ',') {
if(str){
let arro = str.split(delimiter1);
@ -184,8 +194,8 @@
this.form.industryName = event.name
this.show = false
},
onIndustryList(){
industryList({}).then(response=>{
onQueryCategoryList(){
queryCategoryList({}).then(response=>{
console.info(response)
this.indList = response.result
}).catch(error=>{
@ -195,29 +205,30 @@
onRoleBoss(){
let that = this
let params={
userId:uni.getStorageSync("userInfo").id,
id:that.form.id,
userName:that.form.name,
name:that.form.name,
role:that.form.role,
phone:that.form.mobile,
companyName:that.form.company,
companyAddress:that.form.address,
industryId:that.form.industryId,
company:that.form.company,
address:that.form.address,
industry:that.form.industryId,
industryName:that.form.industryName,
businessLicense:that.form.businessLicenseFile.map(item => item.url).join(','),
license:that.form.businessLicenseFile.map(item => item.url).join(','),
}
if(that.form.id){
updateRoleBoss(params).then(response=>{
uni.$u.toast("保存成功!")
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},1500)
}).catch(error=>{
// if(that.form.id){
// updateRoleBoss(params).then(response=>{
// uni.$u.toast("")
// setTimeout(()=>{
// uni.navigateBack({
// delta:1
// })
// },1500)
// }).catch(error=>{
})
}else{
roleBoss(params).then(response=>{
// })
// }else{
addAuthenticationCompany(params).then(response=>{
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.switchTab({
@ -227,7 +238,7 @@
}).catch(error=>{
})
}
// }
},
submit() {
let that = this


+ 101
- 43
pages_subpack/person/index.vue View File

@ -29,11 +29,29 @@
<view class="se-py-20 se-w-p-100 se-flex">
<view class="line-orange"></view>
<view class="se-ml-10">
身份证上传()
身份证上传(正面)
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="form.idCardFile" @afterRead="afterRead" @delete="deletePic" name="1"
<u-upload :fileList="form.cerImageBackFile" @afterRead="afterCerImageBackFileRead" @delete="deleteCerImageBackFilePic" name="1"
multiple :maxCount="10"></u-upload>
</view>
</view>
</u-form-item>
</view>
</view>
<view class="se-p-20">
<view class="se-px-20 se-pb-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item prop="file" labelWidth="2">
<view class="se-flex se-flex-v-sa">
<view class="se-py-20 se-w-p-100 se-flex">
<view class="line-orange"></view>
<view class="se-ml-10">
身份证上传(反面)
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="form.cerImageFrontFile" @afterRead="afterCerImageFrontRead" @delete="deleteCerImageFrontReadPic" name="1"
multiple :maxCount="10"></u-upload>
</view>
</view>
@ -56,7 +74,7 @@
</view>
</template>
<script>
import {roleBoss,industryList,updateRoleBoss} from "@/common/api.js"
import {roleBoss,industryList,updateRoleBoss,queryCategoryList,addAuthenticationPerson,getAuthenticationPerson} from "@/common/api.js"
export default{
data(){
return{
@ -72,7 +90,8 @@
address:'',
industryId:'',
industryName:'',
idCardFile:[]
cerImageBackFile:[],
cerImageFrontFile:[]
},
rules: {
name: [{
@ -113,7 +132,19 @@
message: '请选择行业',
trigger: ['blur', 'change']
}],
idCardFile:[
cerImageBackFile:[
{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
callback(new Error('请选择身份证'));
} else {
callback();
}
},
trigger: 'blur'
}
],
cerImageFrontFile:[
{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
@ -132,22 +163,43 @@
},
onReady() {
this.onIndustryList()
this.onAuthenticationPerson()
this.onQueryCategoryList()
this.$refs.uForm.setRules(this.rules)
},
mounted() {
let worker = uni.getStorageSync("worker")
if(worker){
this.form.id = worker.id
this.form.name = worker.userName
this.form.mobile = worker.phone
this.form.industryId = worker.industryId
this.form.industryName = worker.industryName
this.form.idCardFile = this.stringToKeyValueArray(worker.idCard)
}
},
methods: {
onAuthenticationPerson(){
let params={}
getAuthenticationPerson(params).then(response=>{
let person = response.result
if(response.result){
this.form.id = person.id
this.form.name = person.name
this.form.mobile = person.phone
this.form.address = person.address
this.form.industryId = person.industry
this.form.industryName = person.industryName
this.form.cerImageBackFile = this.stringToKeyValueArray(person.cerImageBack)
this.form.cerImageFrontFile = this.stringToKeyValueArray(person.cerImageFront)
}
}).catch(error=>{
})
},
onQueryCategoryList(){
queryCategoryList({}).then(response=>{
console.info(response)
this.indList = response.result
}).catch(error=>{
})
},
stringToKeyValueArray(str, delimiter1 = ',') {
if(str){
let arro = str.split(delimiter1);
@ -172,14 +224,6 @@
this.form.industryName = event.name
this.show = false
},
onIndustryList(){
industryList({}).then(response=>{
console.info(response)
this.indList = response.result
}).catch(error=>{
})
},
submit() {
let that = this
that.$refs.uForm.validate().then(res => {
@ -193,26 +237,27 @@
let that = this
let params={
id:that.form.id,
userName:that.form.name,
name:that.form.name,
role:that.form.role,
phone:that.form.mobile,
industryId:that.form.industryId,
industry:that.form.industryId,
industryName:that.form.industryName,
idCard:that.form.idCardFile.map(item => item.url).join(','),
cerImageBack:that.form.cerImageBackFile.map(item => item.url).join(','),
cerImageFront:that.form.cerImageFrontFile.map(item => item.url).join(','),
}
if(that.form.id){
updateRoleBoss(params).then(response=>{
uni.$u.toast("保存成功!")
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},1500)
}).catch(error=>{
// if(that.form.id){
// updateRoleBoss(params).then(response=>{
// uni.$u.toast("")
// setTimeout(()=>{
// uni.navigateBack({
// delta:1
// })
// },1500)
// }).catch(error=>{
})
}else{
roleBoss(params).then(response=>{
// })
// }else{
addAuthenticationPerson(params).then(response=>{
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.switchTab({
@ -222,16 +267,29 @@
}).catch(error=>{
})
}
// }
},
deleteCerImageBackFilePic(event) {
this.form.cerImageBackFile.splice(e.index, 1)
},
async afterCerImageBackFileRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.cerImageBackFile.push({
url
})
})
})
},
deletePic(event) {
this.form.idCardFile.splice(e.index, 1)
deleteCerImageFrontReadPic(event) {
this.form.cerImageFrontFile.splice(e.index, 1)
},
async afterRead(e) {
async afterCerImageFrontRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.form.idCardFile.push({
self.form.cerImageFrontFile.push({
url
})
})


+ 6
- 6
pages_subpack/release/component/master.vue View File

@ -376,12 +376,12 @@
// let p={"bossPhone":"13189698115","dayMoney":"500","endTime":"2016-01-01 00:00:00","industryId":"1865299999310622721","industryName":"","latitude":28.23529,"longitude":112.93134,"moneymax":"15000","moneymin":"12000","payType":"1","startTime":"2015-01-01 00:00:00","title":"","workAddress":"517","workDetail":"","workPic":"https://tennis-oss.xzaiyp.top/2025-02-19/341d669a-ef66-4abb-8b98-ac71c08814c9.jpg"}
addTask2(params).then(response=>{
// console.info("response",response)
// uni.$u.toast("")
// setTimeout(()=>{
// uni.navigateBack({
// delta:1
// })
// },1500)
uni.$u.toast("提交成功!")
setTimeout(()=>{
uni.navigateBack({
delta:1
})
},1500)
}).catch(error=>{
})


+ 2
- 1
pages_subpack/wallet/component/recharge.vue View File

@ -57,10 +57,11 @@
return that.$u.toast("请填写金额!")
}
payRecharge(params).then(response=>{
console.info("response",response.result)
uni.requestPayment({
provider: "wxpay",
nonceStr: response.result.nonceStr,
package: response.result.package,
package: response.result.packageValue,
timeStamp: response.result.timeStamp,
signType: response.result.signType,
paySign: response.result.paySign,


+ 1
- 1
pages_subpack/wallet/index.vue View File

@ -64,7 +64,7 @@
userInfo(params).then(response=>{
console.info("userInfo",response)
this.userId=response.result.id
this.myMoney=response.result.myMoney?response.result.myMoney:0
this.myMoney=response.result.amount?response.result.amount:0
}).catch(error=>{
})


+ 18
- 18
util/request/responseInterceptors.js View File

@ -10,16 +10,16 @@ module.exports = (vm) => {
if (data.code == 200) {
return Promise.resolve(data);
}else if(data.code === 401){
uni.showToast({
icon:"none",
title:data.message
})
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.navigateTo({
url:"/pages/auth/index"
})
return;
// uni.showToast({
// icon:"none",
// title:data.message
// })
// uni.removeStorageSync('token')
// uni.removeStorageSync('userInfo')
// uni.navigateTo({
// url:"/pages/auth/index"
// })
// return;
}else if(data.code === 500 && (data.message == '操作失败,token非法无效!' || data.message == '操作失败,用户不存在!')){
uni.$u.toast(data.message)
uni.showToast({
@ -42,14 +42,14 @@ module.exports = (vm) => {
}, (response) => {
const data = response.data
console.info('responseresponse',data)
if(data.code === 401){
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.navigateTo({
url:"/pages/auth/index"
})
return;
}
// if(data.code === 401){
// uni.removeStorageSync('token')
// uni.removeStorageSync('userInfo')
// uni.navigateTo({
// url:"/pages/auth/index"
// })
// return;
// }
// return Promise.reject(response)
})
}

Loading…
Cancel
Save