diff --git a/app.json b/app.json index a04053b..6108d20 100644 --- a/app.json +++ b/app.json @@ -99,7 +99,7 @@ ], "permission": { "scope.userLocation": { - "desc": "你的位置信息将用获取最近的打包站" + "desc": "你的位置信息将用获取最近的打包厂" } }, "window": { diff --git a/pages/agent/address/index.js b/pages/agent/address/index.js index fb5348c..cff3c21 100644 --- a/pages/agent/address/index.js +++ b/pages/agent/address/index.js @@ -1,5 +1,5 @@ // pages/shop/apply/index.js -import { createAddress } from "../../api/ztb" +import { updateUserInfoZtb } from "../../api/ztb" const util = require('../../../utils/util') import regions from '../../../utils/region' const app = getApp() @@ -12,14 +12,7 @@ Page({ safeBottom: app.globalData.safeBottom, options: regions, region: [], - form: { - receiver:'', - phone:'', - details:'', - locProvinceId: '', - locCityId: '', - districtId: '' - }, + form: {}, requesting: false }, /** @@ -44,7 +37,10 @@ Page({ } }, submitForm: function(){ - if(util.isEmpty(this.data.form.receiver)){ + if(this.data.requesting){ + return + } + if(util.isEmpty(this.data.form.packageFactoryName)){ util.showToast('请输入工厂全称') return } @@ -60,12 +56,14 @@ Page({ util.showToast('请输入发货人姓名') return } + this.data.requesting = true wx.showLoading({ title: '处理中', mask: true }) - createAddress(this.data.form).then(res => { + updateUserInfoZtb(this.data.form).then(res => { wx.hideLoading() util.showBackToast('新增地址成功') }).catch(err => { - wx.hideLoading() + wx.hideLoading() + this.data.requesting = false util.showToast(err) }) } diff --git a/pages/agent/address/index.wxml b/pages/agent/address/index.wxml index c075304..4f844c0 100644 --- a/pages/agent/address/index.wxml +++ b/pages/agent/address/index.wxml @@ -1,24 +1,32 @@ - 送货信息 + 发货信息 - - 工厂全称: - + + + 请补充 + 您的工厂发货信息 + + + + + 工厂全称: + - 所在地区: + + 所在地区: {{form.areaStr||'请选择所在地区'}} - 详细地址: - + 详细地址: + - 发货人姓名: + 发货人姓名: diff --git a/pages/agent/edit/index.js b/pages/agent/edit/index.js index a1aaa0c..f529aab 100644 --- a/pages/agent/edit/index.js +++ b/pages/agent/edit/index.js @@ -229,6 +229,17 @@ Page({ this.setData({ ['form.unitPrice']: this.data.form.unitPrice, ['form.publicSubsidies']: this.data.form.publicSubsidies, cateName: this.data.cateName }) } }, + editAddress: function(){ + var that = this + var events = {} + events.onCallback = function(data){ + if (data.what == 1030) { + // that.data.form.factoryCustomerId = data.detail.id + // that.setData({ ['form.factoryCustomerName']: data.detail.name }) + } + } + wx.navigateTo({url: `/pages/agent/address/index`, events}) + }, onEvent: function (message) { if(message.what == 402){ // this.setData({ pageIndex: 0 }) diff --git a/pages/agent/edit/index.wxml b/pages/agent/edit/index.wxml index 41e9425..3b6266a 100644 --- a/pages/agent/edit/index.wxml +++ b/pages/agent/edit/index.wxml @@ -56,6 +56,15 @@ + + + 发货信息: + + {{form.deliveryTime||'请填写发货信息'}} + + + + diff --git a/pages/home/certificate/index.js b/pages/home/certificate/index.js index 5f50d09..382e3e5 100644 --- a/pages/home/certificate/index.js +++ b/pages/home/certificate/index.js @@ -1,31 +1,40 @@ // pages/home/authory/index.js -import { getAuthSession, certificateImage } from "../../api/user" +import { certificateImage } from "../../api/user" const util = require('../../../utils/util') -const event = require('../../../utils/event.js') +const app = getApp() Page({ /** * 页面的初始数据 */ data: { + monthList: [{ text: '1000吨以下', value: 1 }, { text: '1000-2000吨', value: 2 }, { text: '2000吨以上', value: 3 }], + expriseList: [{ text: '1年以下', value: 1 }, { text: '1-5年', value: 2 }, { text: '5-10年', value: 3 }, { text: '10年以上', value: 4 }], form: { identityAuthToken: null }, flag: false, // 是否不可以编辑, false:可编辑;true:不可编辑 - imgList: [null, null] + disabled: true, + imgList: [null] }, - onLoad: function (options) { - event.on('EventMessage', this, this.onEvent) - wx.showLoading({ title: '加载中', mask: true }) - getAuthSession().then(result => { - wx.hideLoading() - this.data.form.identityAuthToken = result.data.token - }).catch(error => { - wx.hideLoading() - }) + }, - onEvent: function (message) { - if (message.what == 82) { - wx.navigateBack() + bindForm: function (e) { + // var form_data = 'form.' + e.target.id + this.data.form[e.target.id] = e.detail.value + }, + showPicker: function (e) { + this.pickerView = this.pickerView || this.selectComponent('#picker-view') + if(e.currentTarget.id == 'shipmentPerMonth'){ + this.pickerView.showPicker(this.data.monthList, null, 1) + } else if(e.currentTarget.id == 'experienceTag'){ + this.pickerView.showPicker(this.data.expriseList, null, 2) + } + }, + onPickerChange: function ({detail}) { + if(detail.type == 1){ + this.setData({ ['form.shipmentPerMonth']: detail.text }) + } else if(detail.type == 2){ + this.setData({ ['form.experienceTag']: detail.text }) } }, submitForm: function () { @@ -70,8 +79,7 @@ Page({ let { data } = res // 编码后的数据 if(index == 0){ that.data.form.frontImg = {base64: data, type} - } else { - that.data.form.backImg = {base64: data, type} + } } }) @@ -94,8 +102,5 @@ Page({ var index = e.currentTarget.dataset.index this.data.imgList[index] = null; this.setData({ imgList: this.data.imgList }) - }, - onUnload: function () { - event.remove('EventMessage', this) } }) \ No newline at end of file diff --git a/pages/home/certificate/index.wxml b/pages/home/certificate/index.wxml index ec0eca8..e21537f 100644 --- a/pages/home/certificate/index.wxml +++ b/pages/home/certificate/index.wxml @@ -4,7 +4,7 @@ - *请拍摄/上传本人身份证(头像面) + *请拍摄/上传营业执照 @@ -23,76 +23,46 @@ *公司名称: - + *信用代码: - + 工厂占地面积: - + 工厂人数: - + - 工厂设备数: - + 工厂打包机数: + - + 月出货量: - + + - + 从业经验: - - - - - - - *请拍摄/上传本人身份证(国徽面) - - - - - - - - - - - - - - - - - - 真实姓名: - - - - - - 身份证号码: - + + diff --git a/pages/home/enterprise/enterprise.js b/pages/home/enterprise/enterprise.js index c2d0225..6b5b62f 100644 --- a/pages/home/enterprise/enterprise.js +++ b/pages/home/enterprise/enterprise.js @@ -23,7 +23,7 @@ Page({ }, { id: 2, - name: '打包站' + name: '打包厂' }, { id: 3, @@ -56,7 +56,7 @@ Page({ }, { value: '2', - text: '打包站' + text: '打包厂' }, { value: '3', @@ -147,9 +147,9 @@ Page({ this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog') var that = this var placeholderName = '' - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { placeholderName = that.data.userInfo.packageFactoryName - } else if (e1.currentTarget.dataset.tag == '打包站占地面积') { + } else if (e1.currentTarget.dataset.tag == '打包厂占地面积') { placeholderName = that.data.userInfo.packageFactoryArea } else if (e1.currentTarget.dataset.tag == '工厂人数') { placeholderName = that.data.userInfo.numberOfEmployee @@ -169,12 +169,12 @@ Page({ util.showToast('请输入' + e1.currentTarget.dataset.tag) return } else - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { that.updateUserInfoFct({ packageFactoryName: response }) } else - if (e1.currentTarget.dataset.tag == '打包站占地面积') { + if (e1.currentTarget.dataset.tag == '打包厂占地面积') { if (parseInt(response)>0 && parseInt(response)==Number(response)) { that.updateUserInfoFct({ packageFactoryArea: response diff --git a/pages/home/enterprise/enterprise.wxml b/pages/home/enterprise/enterprise.wxml index c1243da..364585a 100644 --- a/pages/home/enterprise/enterprise.wxml +++ b/pages/home/enterprise/enterprise.wxml @@ -30,13 +30,13 @@ 公司地址 {{companyAddress}} - + 工厂名 - {{userInfo.packageFactoryName || '点击修改打包站名'}} + {{userInfo.packageFactoryName || '点击修改打包厂名'}} - - 打包站占地面积 - {{userInfo.packageFactoryArea || '点击修改打包站占地面积'}} + + 打包厂占地面积 + {{userInfo.packageFactoryArea || '点击修改打包厂占地面积'}} 工厂人数 diff --git a/pages/home/index/index.js b/pages/home/index/index.js index 70c832e..9d9a4ad 100644 --- a/pages/home/index/index.js +++ b/pages/home/index/index.js @@ -166,19 +166,13 @@ Component({ }, toUserInfo: function () { if (!app.globalData.userInfo) { - wx.navigateTo({ - url: '/pages/login/index' - }) + wx.navigateTo({ url: '/pages/login/index' }) return } if (app.globalData.userInfo.isAuth != 1) { - wx.navigateTo({ - url: '/pages/home/idcard/index' - }) + wx.navigateTo({ url: '/pages/home/idcard/index' }) } else { - wx.navigateTo({ - url: '/pages/home/info/index' - }) + wx.navigateTo({ url: '/pages/home/info/index' }) } }, toAuthor: function () { diff --git a/pages/home/info/index.js b/pages/home/info/index.js index ba32d49..b021378 100644 --- a/pages/home/info/index.js +++ b/pages/home/info/index.js @@ -24,7 +24,7 @@ Page({ }, { id: 2, - name: '打包站' + name: '打包厂' }, { id: 3, @@ -57,7 +57,7 @@ Page({ }, { value: '2', - text: '打包站' + text: '打包厂' }, { value: '3', @@ -150,9 +150,9 @@ Page({ this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog') var that = this var placeholderName = '' - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { placeholderName = that.data.userInfo.packageFactoryName - } else if (e1.currentTarget.dataset.tag == '打包站占地面积') { + } else if (e1.currentTarget.dataset.tag == '打包厂占地面积') { placeholderName = that.data.userInfo.packageFactoryArea } else if (e1.currentTarget.dataset.tag == '工厂人数') { placeholderName = that.data.userInfo.numberOfEmployee @@ -175,7 +175,7 @@ Page({ util.showToast('请输入' + e1.currentTarget.dataset.tag) return } else - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { that.updateUserInfoFct({ packageFactoryName: response }) @@ -193,7 +193,7 @@ Page({ util.showToast(err) }) } else - if (e1.currentTarget.dataset.tag == '打包站占地面积') { + if (e1.currentTarget.dataset.tag == '打包厂占地面积') { if (parseInt(response)>0 && parseInt(response)==Number(response)) { that.updateUserInfoFct({ packageFactoryArea: response diff --git a/pages/home/pauthory/index.js b/pages/home/pauthory/index.js deleted file mode 100644 index f0a885a..0000000 --- a/pages/home/pauthory/index.js +++ /dev/null @@ -1,180 +0,0 @@ -// pages/home/authory/index.js -import { personalAuth } from "../../api/saas" -const util = require('../../../utils/util') -const math = require('../../../utils/math') -const app = getApp() - -Page({ - - /** - * 页面的初始数据 - */ - data: { - form: { - authType: 0, - }, - typeList: [{text: '身份证', value: 1}, {text: '身份证', value: 2}], - flag: false, // 是否不可以编辑, false:可编辑;true:不可编辑 - imgList: [null, null], - loadingWidth: math.divide(690, 2) - 16, - pathList: new Array(), - taskArray: [], - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.pickerView = this.pickerView || this.selectComponent('#picker-view') - }, - - showPicker: function (e) { - if (this.data.flag) { - return - } - this.pickerView.showPicker(this.data.typeList, null, 1) - }, - onPickerChange: function (e) { - if (!e.detail) { - return - } - if (e.detail.type == 1) { - this.setData({ ['form.bankName']: e.detail.text, ['form.bankId']: Number(e.detail.value) }) - } - }, - bindForm: function (e) { - // var form_data = 'form.' + e.target.id - this.data.form[e.target.id] = e.detail.value - }, - submitForm: function(){ - if (util.isEmpty(this.data.form.userName)) { - util.showToast('请输入真实姓名') - return - } - if (util.isEmpty(this.data.form.idCard)) { - util.showToast('请输入身份证号码') - return - } - if (util.checkId(this.data.form.idCard).status == 0) { - util.showToast('身份证号码有误') - return - } - if (util.isEmpty(this.data.pathList[0]) || util.isEmpty(this.data.pathList[0].url)) { - util.showToast('请上传身份证正面照片') - return - } - this.data.form.cardFront = this.data.pathList[0].url - if (util.isEmpty(this.data.pathList[1]) || util.isEmpty(this.data.pathList[1].url)) { - util.showToast('请上传身份证背面照片') - return - } - this.data.form.cardReverse = this.data.pathList[1].url - // /front/customer/personalAuth 个人会员认证 - wx.showLoading({ title: '处理中', mask: true }) - personalAuth(this.data.form).then(res => { - wx.hideLoading() - app.globalData.userInfo.isAuth = 1 - util.showBackToast('上传成功') - }).catch(error => { - wx.hideLoading() - util.showToast(error) - }) - }, - /*******************************************************图片上传************************************************************/ - uploadImage: function (index, path) { - var _this = this - _this.setData({ - ['pathList[' + index + ']']: { status: 1, url: '' } - }) - // /utils/uploadImage 统一上传图片接口 - var task = wx.uploadFile({ - url: app.httpUrl + '/saas-user/utils/uploadImage', - filePath: path, - name: 'image', - header: { - "Content-Type": "multipart/form-data", - appversion: app.version - }, - success: function (result) { - var resp = JSON.parse(result.data) - if (resp.code === 0) { - _this.setData({ - ['pathList[' + index + '].status']: 8, - ['pathList[' + index + '].url']: resp.data - }) - if(_this.data.id > 0){ - var _index = Number(index) + 1 - _this.setData({ - ['form.fileUrl' + _index]: resp.msg - }) - } - } - }, - fail: function (res) { - _this.setData({ - ['pathList[' + index + '].status']: -1 - }) - }, - complete: function (res) { - for (let i = 0; i < _this.data.taskArray.length; i++) { - if (_this.data.taskArray[i].path === path) { - _this.data.taskArray.splice(i, 1); - break - } - } - _this.setData({ - taskArray: _this.data.taskArray - }) - }, - }) - _this.data.taskArray.push({ path: path, task: task }) - _this.setData({ - taskArray: _this.data.taskArray - }) - }, - chooseImage(e) { - if (this.data.flag) { - return - } - var index = e.currentTarget.dataset.index - wx.chooseImage({ - count: 1, //默认9 - sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - sourceType: ['album', 'camera'], //从相册选择 - success: (res) => { - this.setData({ ['imgList[' + index + ']']: res.tempFilePaths[0] }) - for (let i = 0; i < res.tempFilePaths.length; i++) { - this.uploadImage(index, res.tempFilePaths[i]) - } - } - }); - }, - viewImage(e) { - var urlList = [] - for (var i = 0; i < this.data.imgList.length; i++) { - if (!util.isEmpty(this.data.imgList[i])) { - urlList.push(this.data.imgList[i]) - } - } - wx.previewImage({ urls: urlList, current: e.currentTarget.dataset.url }); - }, - deleteImg(e) { - var index = e.currentTarget.dataset.index - // 如果是正在上传的; - if (this.data.pathList[index] && this.data.pathList[index].status === 1) { - if (this.data.taskArray[index]) { - this.data.taskArray[index].abort() // 取消上传任务 - } - this.data.taskArray.splice(index, 1); - } - this.data.imgList[index] = null; - if (this.data.pathList.length > index){ - this.data.pathList.splice(index, 1); - } - this.setData({ - imgList: this.data.imgList, - pathList: this.data.pathList, - taskArray: this.data.taskArray - }) - } -}) \ No newline at end of file diff --git a/pages/home/pauthory/index.json b/pages/home/pauthory/index.json deleted file mode 100644 index 1682085..0000000 --- a/pages/home/pauthory/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "picker-view": "/components/picker-view/index", - "wux-button": "/components/button/index" - } -} \ No newline at end of file diff --git a/pages/home/pauthory/index.wxml b/pages/home/pauthory/index.wxml deleted file mode 100644 index 2eb41e3..0000000 --- a/pages/home/pauthory/index.wxml +++ /dev/null @@ -1,61 +0,0 @@ - - - 实名认证 - - - - - - 姓名: - - - - - - - 身份证号码: - - - - - - - 上传身份证 - 正反面共2张 - - - - - - 身份证正面 - - - - - - - - - - 身份证背面 - - - - - - - - - - - - 提交 - - - diff --git a/pages/home/pauthory/index.wxss b/pages/home/pauthory/index.wxss deleted file mode 100644 index ee9d388..0000000 --- a/pages/home/pauthory/index.wxss +++ /dev/null @@ -1,48 +0,0 @@ -.image-reader-item { - position: relative; - width: 49%; - height: 128px; - background-color: #f8f8f8; - box-sizing: border-box; - list-style: none; - background-size: cover; - border-radius: 6rpx; -} - -.image-reader-item .md-icon { - position: absolute; - top: 45%; - left: 50%; - transform: translate(-50%, -50%); - opacity: 0.5; -} - -.image-reader-item .md-load { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); -} - -.image-reader-item .md-hint { - position: absolute; - top: 50%; - left: 0; - width: 100%; - margin-top: 10px; - font-size: 12px; - color: #bababa; - text-align: center; -} - -.image-reader-item .delete { - position: absolute; - top: 0px; - right: 0px; - opacity: 0.8; - border-top-right-radius: 6rpx; - border-bottom-left-radius: 8rpx; - padding: 6rpx 12rpx; - height: auto; - background-color: rgba(0, 0, 0, 0.5); -} \ No newline at end of file diff --git a/pages/home/personal/personal.js b/pages/home/personal/personal.js index c2d0225..6b5b62f 100644 --- a/pages/home/personal/personal.js +++ b/pages/home/personal/personal.js @@ -23,7 +23,7 @@ Page({ }, { id: 2, - name: '打包站' + name: '打包厂' }, { id: 3, @@ -56,7 +56,7 @@ Page({ }, { value: '2', - text: '打包站' + text: '打包厂' }, { value: '3', @@ -147,9 +147,9 @@ Page({ this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog') var that = this var placeholderName = '' - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { placeholderName = that.data.userInfo.packageFactoryName - } else if (e1.currentTarget.dataset.tag == '打包站占地面积') { + } else if (e1.currentTarget.dataset.tag == '打包厂占地面积') { placeholderName = that.data.userInfo.packageFactoryArea } else if (e1.currentTarget.dataset.tag == '工厂人数') { placeholderName = that.data.userInfo.numberOfEmployee @@ -169,12 +169,12 @@ Page({ util.showToast('请输入' + e1.currentTarget.dataset.tag) return } else - if (e1.currentTarget.dataset.tag == '打包站名') { + if (e1.currentTarget.dataset.tag == '打包厂名') { that.updateUserInfoFct({ packageFactoryName: response }) } else - if (e1.currentTarget.dataset.tag == '打包站占地面积') { + if (e1.currentTarget.dataset.tag == '打包厂占地面积') { if (parseInt(response)>0 && parseInt(response)==Number(response)) { that.updateUserInfoFct({ packageFactoryArea: response diff --git a/pages/home/tab1/index.js b/pages/home/tab1/index.js index 42defac..616d884 100644 --- a/pages/home/tab1/index.js +++ b/pages/home/tab1/index.js @@ -30,7 +30,7 @@ Page({ this.data.firstCategoryId = '' this.setData({ ['bidType']: tabIndex }) if (this.data.bidType == 1) { - this.data.identityTag = '打包站' + this.data.identityTag = '打包厂' this.submitForm() } if (this.data.bidType == 2) { @@ -46,6 +46,7 @@ Page({ this.setData({ requesting: true}) updateUserInfo({ identityTag: this.data.identityTag }).then(result => { this.setData({ requesting: false}) + app.globalData.userInfo.identityTag = this.data.identityTag setTimeout(() => this.toNextTab(), 200) }).catch(err => { util.showToast(err) @@ -57,7 +58,7 @@ Page({ }, getUerInfoFct: function () { getBaseInfo().then(res => { - if (res.data.identityTag == '打包站') { + if (res.data.identityTag == '打包厂') { this.setData({ bidType: 1 }) } else if (res.data.identityTag == '废品站') { this.setData({ bidType: 2 }) diff --git a/pages/home/tab1/index.wxml b/pages/home/tab1/index.wxml index ba32541..27ea334 100644 --- a/pages/home/tab1/index.wxml +++ b/pages/home/tab1/index.wxml @@ -25,7 +25,7 @@ - 打包站 + 打包厂 diff --git a/pages/home/tab2/index.js b/pages/home/tab2/index.js index c6f9417..7badc28 100644 --- a/pages/home/tab2/index.js +++ b/pages/home/tab2/index.js @@ -33,10 +33,10 @@ Page({ this.pickerView = this.pickerView || this.selectComponent('#picker-view') }, toNextTab: function () { - wx.navigateTo({ url: '/pages/home/tab3/index' }) + wx.redirectTo({ url: '/pages/home/tab3/index' }) }, toMyInfo: function () { - wx.redirectTo({ url: '/pages/index/index' }) + wx.navigateBack() }, showRegion: function () { if (this.data.disabled) { diff --git a/pages/home/tab3/index.js b/pages/home/tab3/index.js index c7a571a..465db12 100644 --- a/pages/home/tab3/index.js +++ b/pages/home/tab3/index.js @@ -21,14 +21,12 @@ Page({ }, toNextTab: function () { - wx.navigateTo({ + wx.redirectTo({ url: '/pages/home/tab4/index' }) }, toMyInfo: function () { - wx.redirectTo({ - url: '/pages/index/index' - }) + wx.navigateBack() }, /** diff --git a/pages/home/tab4/index.js b/pages/home/tab4/index.js index c58f22c..7e273c1 100644 --- a/pages/home/tab4/index.js +++ b/pages/home/tab4/index.js @@ -56,9 +56,7 @@ Page({ }, toMyInfo: function () { - wx.redirectTo({ - url: '/pages/index/index' - }) + wx.navigateBack() }, /** diff --git a/pages/home/tab5/index.js b/pages/home/tab5/index.js index 2e2bbe0..e418421 100644 --- a/pages/home/tab5/index.js +++ b/pages/home/tab5/index.js @@ -56,9 +56,7 @@ Page({ }, toMyInfo: function () { - wx.redirectTo({ - url: '/pages/index/index' - }) + wx.navigateBack() }, /** diff --git a/pages/home/tab6/index.js b/pages/home/tab6/index.js index 1430676..c619a21 100644 --- a/pages/home/tab6/index.js +++ b/pages/home/tab6/index.js @@ -1,9 +1,6 @@ // pages/home/tab6/index.js -import { - updateUserInfo, - getBaseInfo -} from '../../api/ztb' -const storage = require('../../../utils/storage') +import { updateUserInfo, getBaseInfo } from '../../api/ztb' + Page({ /** @@ -21,9 +18,7 @@ Page({ }, toMyInfo: function () { - wx.redirectTo({ - url: '/pages/index/index' - }) + wx.navigateBack() }, /** diff --git a/pages/index/index.js b/pages/index/index.js index f58ade7..994d4d5 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -70,7 +70,7 @@ Page({ getBaseInfo().then(result => { app.globalData.userInfo = result.data wx.hideLoading() - if(!app.globalData.userInfo.hasShowedLoginTag){ + if(!app.globalData.userInfo.identityTag){ wx.navigateTo({ url: '/pages/home/tab1/index' }) } this.defaultIndex() @@ -102,7 +102,7 @@ Page({ if (this.data.inited) { this.onResume() } - if(app.globalData.userInfo && !app.globalData.userInfo.hasShowedLoginTag){ + if(app.globalData.userInfo && !app.globalData.userInfo.identityTag){ wx.navigateTo({ url: '/pages/home/tab1/index' }) } },