tianyi 10 hours ago
parent
commit
4a21c31c37
  1. 1
      pages/index/index.vue
  2. 60
      pages/login/login.vue
  3. 2
      pages/login/regist.vue
  4. 8
      pages/shop/orderDetail.vue
  5. 51
      pages/worker/index.vue
  6. 2
      pages/worker/partTimeJobRegister.vue

1
pages/index/index.vue

@ -298,7 +298,6 @@
}
},
onLoad() {
console.log('hahaha',uni.getStorageSync('shopId'))
if(!uni.getStorageSync('area') || !uni.getStorageSync('shopId')){
uni.reLaunch({
url: '../login/login'

60
pages/login/login.vue

@ -7,8 +7,8 @@
</view>
<!-- <view v-if="loginType == true" class="logintitle">{{i18n.login.shoujikuaijieLogin}}</view>
<view v-if="loginType == false" class="logintitle">{{i18n.login.zhpassLogin}}</view> -->
<view v-if="peisongyuan == true" class="logintitle">配送员登录</view>
<view v-if="peisongyuan == false" class="logintitle">账号密码登录</view>
<view v-if="peisongyuan == true" class="logintitle">骑士登录</view>
<view v-if="peisongyuan == false" class="logintitle">半径商家登录</view>
<view class="vview"></view>
<view class="codephoneinput row">
@ -45,9 +45,9 @@
<view class="reg-btn" @click="peisongyuan = !peisongyuan">
{{peisongyuan?'切换商家登录':'切换配送员登录'}}
</view>
<!-- <navigator v-if="loginType == false" class="forget-pass" url="/pages/login/regist?type=3">
<navigator v-if="loginType == false" class="forget-pass" url="/pages/login/regist?type=3">
{{i18n.login.forgetPass}}
</navigator> -->
</navigator>
</view>
<button enabled="enabled" class="login-btn" style="border-radius: 50rpx; border: 0;" type="primary"
:class="{ opatity: enabled}" @click="submit">
@ -81,7 +81,7 @@
wayValue: 0,
captchaImg: '',
top: 0,
loginType: false,
loginType: true,
codetimes: '获取验证码',
timer: null,
canshowcode: false,
@ -127,7 +127,7 @@
},
computed: {
enabled: function() {
if (this.mobile.length == 11 && this.password.length > 5 && this.code.length == 4) {
if (this.mobile.length == 11 && this.codes.length == 6) {
return false;
}
return true;
@ -370,27 +370,37 @@
});
return;
}
if(this.code == uni.getStorageSync('yanzhengma')){
uni.showToast({
title: '验证码输入有误',
icon: 'none'
});
return;
}
uni.setStorageSync('yanzhengma',this.code)
// if (this.code == uni.getStorageSync('yanzhengma')) {
// uni.showToast({
// title: '',
// icon: 'none'
// });
// return;
// }
// uni.setStorageSync('yanzhengma', this.code)
let url;
let data;
url = `/auth/login`;
data = {
username: this.mobile,
password: this.password,
captchaId: this.captchaId,
code: this.code,
saveLogin: true,
type: 0,
clientId: uni.getStorageSync('registerID')
};
if (this.loginType == true) {
url = "/auth/smsLogin";
data = {
mobile: this.mobile,
code: this.codes,
saveLogin: true,
type: this.wayValue,
clientId: uni.getStorageSync('registerID')
};
} else {
url = `/auth/login`;
data = {
username: this.mobile,
password: this.password,
captchaId: this.captchaId,
code: this.code,
saveLogin: true,
type: 0
};
}
let that = this;
uni.showLoading({
title: '加载中...',
@ -405,7 +415,7 @@
});
this.getCaptchaImg()
} else {
uni.removeStorageSync('code');
// uni.removeStorageSync('code');
if (res.result.accessToken) uni.setStorageSync('hiver_token', res.result.accessToken)
if (res.result.worker !== undefined) uni.setStorageSync('worker', res.result.worker)
uni.setStorageSync("wayValue", this.wayValue)

2
pages/login/regist.vue

@ -57,7 +57,7 @@
onReady() {
this.codetimes = this.i18n.login.getcode
uni.setNavigationBarTitle({
title: this.i18n.login.zhucezhanghao
title: "修改密码"
});
},
computed: {

8
pages/shop/orderDetail.vue

@ -356,8 +356,8 @@
</view>
</view>
</view>
<view class="bottom">
<view v-if="data.status != 6 && data.status != 8 && Ptype != 'work'" style="height: 66rpx;line-height: 66rpx;display: flex;border-bottom: 1px solid #eee;font-size: 33rpx;">
<view class="bottom" v-if="Ptype != 'work'">
<view v-if="data.status != 6 && data.status != 8" style="height: 66rpx;line-height: 66rpx;display: flex;border-bottom: 1px solid #eee;font-size: 33rpx;">
<view style="flex: 1;">
预计收入
</view>
@ -365,12 +365,12 @@
{{data.incomeSummary ? formatMoney(data.incomeSummary.expectedIncome) : (data.yujishouru?data.yujishouru:0)}}
</view>
</view>
<view v-if="Ptype != 'work'" style="margin-top: 20rpx;">
<view style="margin-top: 20rpx;">
<view @tap="printData(data)" class="btn" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
打印小票
</view>
</view>
<view v-if="Ptype != 'work'" style="margin-top: 20rpx;">
<view style="margin-top: 20rpx;">
<view @tap="mealServing(data)" v-if="(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime == null) || (data.status == 3 && data.deliveryType == 2 && data.userRequireMake == 1)" class="btn" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
已出餐
</view>

51
pages/worker/index.vue

@ -243,7 +243,7 @@
<de-livery ref="deLiveryPage" @tabbar-visible-change="setTabBarVisible"></de-livery>
</view>
<view class="swiper-page" v-show="currentIndex == 2">
<my-center ref="myCenter"></my-center>
<my-center ref="myCenterPage"></my-center>
</view>
</view>
<!-- 弹出区域选择 -->
@ -500,33 +500,35 @@
}
},
onShow() {
this.indexInit()
if (this.pendingTabIndex !== null) {
const tabIndex = this.pendingTabIndex
const shouldShowDeliveryRuleConfirm = this.pendingDeliveryRuleConfirm && tabIndex == 1
this.pendingTabIndex = null
this.pendingDeliveryRuleConfirm = false
this.$nextTick(() => {
Promise.resolve(this.refreshTabCounts()).then(() => {
this.changeIndex(tabIndex)
let that = this;
that.indexInit()
if (that.pendingTabIndex !== null) {
const tabIndex = that.pendingTabIndex
const shouldShowDeliveryRuleConfirm = that.pendingDeliveryRuleConfirm && tabIndex == 1
that.pendingTabIndex = null
that.pendingDeliveryRuleConfirm = false
that.$nextTick(() => {
Promise.resolve(that.refreshTabCounts()).then(() => {
that.changeIndex(tabIndex)
if (shouldShowDeliveryRuleConfirm) {
this.showDeliveryRuleEditedConfirm()
that.showDeliveryRuleEditedConfirm()
}
})
})
} else {
this.$nextTick(() => {
Promise.resolve(this.refreshTabCounts()).then(() => {
if (this.currentIndex == 4 && this.$refs.myCenterPage) {
this.$refs.myCenterPage.init()
that.$nextTick(() => {
Promise.resolve(that.refreshTabCounts()).then(() => {
if (that.currentIndex == 4 && that.$refs.myCenterPage) {
that.$refs.myCenterPage.init()
}
if (this.pendingDeliveryRuleConfirm && this.currentIndex == 1) {
this.pendingDeliveryRuleConfirm = false
this.showDeliveryRuleEditedConfirm()
if (that.pendingDeliveryRuleConfirm && that.currentIndex == 1) {
that.pendingDeliveryRuleConfirm = false
that.showDeliveryRuleEditedConfirm()
}
})
})
}
that.$refs.myCenterPage.init()
},
onHide() {
this.closeProductPopup()
@ -549,10 +551,11 @@
return Promise.resolve()
},
showDeliveryRuleEditedConfirm() {
let that = this;
this.$nextTick(() => {
setTimeout(() => {
if (this.$refs.deLiveryPage && this.$refs.deLiveryPage.showRuleEditedConfirm) {
this.$refs.deLiveryPage.showRuleEditedConfirm()
if (that.$refs.deLiveryPage && that.$refs.deLiveryPage.showRuleEditedConfirm) {
that.$refs.deLiveryPage.showRuleEditedConfirm()
}
}, 300)
})
@ -1053,17 +1056,17 @@
//tab
changeIndex(index, type) {
let that = this;
this.lastIndex = this.currentIndex
this.currentIndex = index
that.lastIndex = that.currentIndex
that.currentIndex = index
switch (index) {
case 0:
this.indexInit()
that.indexInit()
break;
case 1:
that.$refs.deLiveryPage.init(type)
break;
case 2:
that.$refs.myCenter.init()
that.$refs.myCenterPage.init()
break;
}

2
pages/worker/partTimeJobRegister.vue

@ -1027,7 +1027,7 @@
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
url: that.tui.interfaceUrl() + '/upload/file',
url: getApp().globalData.mainurl + '/upload/file',
filePath: path,
name: 'file',
header: {

Loading…
Cancel
Save