Merge remote-tracking branch 'origin/master'
| | |
| | | ], |
| | | answer: '', |
| | | sortnu: '', |
| | | score: '', |
| | | type: 0, |
| | | scroe:null, |
| | | useType: 1 |
| | |
| | | } |
| | | let argus = JSON.stringify(params) |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + argus + '}', '*') |
| | | }, 3000) |
| | | }, 8000) |
| | | }, |
| | | // 确定修改密码 |
| | | confirmChangePwd() { |
| | |
| | | } |
| | | // const argus = JSON.stringify(params) |
| | | myWindow.postMessage('{"method":"goToApp","argument":' + row.param5 + '}', '*') |
| | | }, 3000) |
| | | }, 8000) |
| | | }) |
| | | }, |
| | | SubSuccess (str) { |
| | |
| | | onLaunch: function () { |
| | | window.addEventListener("popstate", (event) => { |
| | | const path = this.$route.fullPath |
| | | // console.log('path', path); |
| | | if(path == '/pages/login/login' || path == '/'){ |
| | | window.location.href = app_url |
| | | } |
| | | // console.log('path', path); |
| | | if(path == '/pages/wdata/home'){ |
| | | window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home' |
| | | } |
| | | if(path == '/pages/waybill/home'){ |
| | | window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home' |
| | | } |
| | | }) |
| | | console.log('onLaunch') |
| | | }, |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 司机登录 |
| | | export const loginDriverByPhone = (data) => { |
| | | return http({ |
| | | url: 'loginDriverByPhone', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 司机验证码登录 |
| | | export const loginDriverWithCode = (data) => { |
| | | return http({ |
| | |
| | | data |
| | | }) |
| | | } |
| | | export const validPhoneCaptcha = (data) => { |
| | | export const loginGkUserWithCode = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/smsEmail/validPhoneCaptcha', |
| | | url: 'loginGkUserWithCode', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | export const loginH5ByPhone = (data) => { |
| | | return http({ |
| | | url: 'loginH5ByPhone', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | export const loginCaptcha = () => { |
| | | return http({ |
| | | url: 'captcha', |
| | |
| | | |
| | | onLoad(option) { |
| | | if(option.phone){ |
| | | this.$set(this.form, 'phone', option.phone) |
| | | this.$set(this.form, 'phone', option.phone || '') |
| | | } |
| | | }, |
| | | |
| | |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
|
| | | <view class="login_title">安泰物流智慧园区</view>
|
| | | <view class="login_title">物流车司机登录</view>
|
| | | <view class="tabs"> |
| | | <view class="tab" @click="tabsClick(0)" :class="{active: activeTab == 0 }"><view>账号登录</view><view class="bor"></view></view> |
| | | <view class="tab" @click="tabsClick(1)" :class="{active: activeTab == 1 }"><view>验证码登录</view><view class="bor"></view></view> |
| | | </view>
|
| | | <view class="login_list">
|
| | | <template v-if="activeTab == 0"> |
| | | <view class="login_list_item">
|
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
|
| | | <input v-model="form.username" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false"
|
| | | maxlength="18" placeholder="手机号" />
|
| | | maxlength="18" placeholder="账号" /> |
| | | </view>
|
| | | <view class="login_list_item">
|
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
|
| | | <input v-model="form.password" @focus="showKeyboard = true" @blur="showKeyboard = false" type="password"
|
| | | placeholder="密码" />
|
| | | </view>
|
| | | </template> |
| | | <template v-else> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.phone" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false" |
| | | :maxlength="18" placeholder="手机号" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input |
| | | v-model="form.code" |
| | | placeholder="请输入验证码" |
| | | :maxlength="6" |
| | | type="number" |
| | | /> |
| | | <text class="captcha" v-if="countDown == 0" @click="initCaptcha" |
| | | >获取验证码</text |
| | | > |
| | | <text class="placeholder9" v-else>{{ countDown }}</text> |
| | | </view> |
| | | </template>
|
| | | </view>
|
| | | <view class="login_btn">
|
| | | <view class="login_btn_n" @click="onLogin">立即登录</view>
|
| | |
| | | import {
|
| | | driverLogin,
|
| | | loginCaptcha,
|
| | | getUserInfo
|
| | | getUserInfo, |
| | | sendSms, |
| | | loginDriverByPhone |
| | | } from '@/api'
|
| | | import {
|
| | | mapState,
|
| | |
| | | data() {
|
| | | return {
|
| | | form: {
|
| | | username: '',
|
| | | password: ''
|
| | | username: null, |
| | | phone: null,
|
| | | password: null
|
| | | },
|
| | | isShowProtocol: false,
|
| | | showKeyboard: false,
|
| | | countDown: 0, |
| | | activeTab: 0, |
| | | |
| | | ywinfo: {}
|
| | | }
|
| | | },
|
| | | onLoad() {
|
| | | this.initCaptcha()
|
| | | const ywinfo = uni.getStorageSync('ywinfo') || {}
|
| | | if (ywinfo.ywid && ywinfo.type == 0) { |
| | | this.ywinfo = ywinfo
|
| | |
| | | },
|
| | |
|
| | | methods: {
|
| | | ...mapMutations(["setToken", "setDriverInfo"]),
|
| | | handleRegister() {
|
| | | uni.navigateTo({
|
| | | url: "/pages/driver/register"
|
| | | })
|
| | | },
|
| | | handleSetPsd() {
|
| | | uni.navigateTo({
|
| | | url: "/pages/driver/forgetPsd?phone=" + this.form.username
|
| | | })
|
| | | },
|
| | | dealChange(e) {
|
| | | console.log(e)
|
| | | },
|
| | | initCaptcha() {
|
| | | loginCaptcha().then(res => {
|
| | | this.captcha = res.data
|
| | | })
|
| | | },
|
| | |
|
| | | onLogin() {
|
| | | const {
|
| | | form
|
| | | form,activeTab |
| | | } = this
|
| | | if(activeTab == 0){ |
| | | if (!form.username) return uni.showToast({
|
| | | title: '手机号不能为空',
|
| | | title: '账号不能为空', |
| | | icon: 'none'
|
| | | })
|
| | | if (!form.password) return uni.showToast({
|
| | | title: '密码不能为空',
|
| | | icon: 'none'
|
| | | })
|
| | | driverLogin({
|
| | | }else{ |
| | | if (!form.phone) return uni.showToast({ |
| | | title: '手机号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.code) return uni.showToast({ |
| | | title: '验证码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | let fn = activeTab == 0 ? driverLogin : loginDriverByPhone |
| | | fn({ |
| | | ...form,
|
| | | uuid: this.captcha.uuid,
|
| | | openid: this.$store.state.openId,
|
| | | code: '1'
|
| | | }).then(res => {
|
| | | if (res.code === 200) {
|
| | | this.setToken(res.data)
|
| | |
| | | })
|
| | | }
|
| | | })
|
| | | },
|
| | | ...mapMutations(["setToken", "setDriverInfo"]),
|
| | | handleRegister() {
|
| | | uni.navigateTo({
|
| | | url: "/pages/driver/register"
|
| | | })
|
| | | }, |
| | | tabsClick(val) { |
| | | this.activeTab = val |
| | | if(val == 0){ |
| | | this.form.username = this.form.username || this.form.phone |
| | | this.form.phone = null |
| | | this.form.code = null |
| | | }else{ |
| | | this.form.phone = this.form.username || this.form.phone |
| | | this.form.password = null |
| | | this.form.username = null |
| | | }
|
| | | },
|
| | | handleSetPsd() { |
| | | if(this.form.username || this.form.phone){ |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/forgetPsd?phone=" + this.form.username || this.form.phone || '' |
| | | }) |
| | | }else{ |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/forgetPsd" |
| | | }) |
| | | }
|
| | | |
| | | },
|
| | | dealChange(e) {
|
| | | console.log(e)
|
| | | },
|
| | | initCaptcha() {
|
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: '手机号不能为空', |
| | | icon: 'none' |
| | | }) |
| | | sendSms({ phone: this.form.phone }).then(res => { |
| | | this.countDown = 60 |
| | | setInterval(() => { |
| | | if (this.countDown == 0) return |
| | | this.countDown-- |
| | | }, 1000) |
| | | })
|
| | | },
|
| | | }
|
| | | }
|
| | | </script>
|
| | |
| | | font-weight: 600;
|
| | | color: #333333;
|
| | | }
|
| | |
|
| | | .tabs{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-evenly; |
| | | width: 530rpx; |
| | | margin: 48rpx auto 0rpx; |
| | | .tab{ |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | height: 52rpx; |
| | | line-height: 36rpx; |
| | | } |
| | | .active{ |
| | | font-weight: bold; |
| | | font-size: 34rpx; |
| | | color: #222222; |
| | | .bor{ |
| | | width: 80rpx; |
| | | height: 8rpx; |
| | | background: linear-gradient(to bottom, #4d99a8, #a3c8d4); |
| | | } |
| | | } |
| | | }
|
| | | .login_list {
|
| | | margin-top: 60rpx;
|
| | | margin-top: 36rpx;
|
| | | width: 100%;
|
| | | padding: 0 60rpx;
|
| | | box-sizing: border-box;
|
| | |
| | |
|
| | | .captcha {
|
| | | color: $uni-color-primary;
|
| | | font-size: 30rpx;
|
| | | }
|
| | |
|
| | | input {
|
| | |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title">安泰物流智慧园区</view> |
| | | <view class="login_title">物流车司机登录</view> |
| | | <view class="login_title">物流车司机</view> |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | |
| | | if (res.confirm) { |
| | | driverCarRevoke({ |
| | | id: info.id, info: '' |
| | | }).then(() => { |
| | | this.getDetail(info.id) |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | |
| | | isShowDate: false, |
| | | param: {}, |
| | | page: 1, |
| | | capacity: 10, |
| | | capacity: 20, |
| | | total: 0, |
| | | datalist: [], |
| | | statusMap: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | onShow() { |
| | | this.page = 1 |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | const { total, datalist} = this |
| | | if(datalist.length < total){ |
| | | this.page = this.page + 1 |
| | | this.getList() |
| | | } else { |
| | | this.showToast('暂无更多数据') |
| | | } |
| | | }, |
| | | methods: { |
| | | getList() { |
| | |
| | | driverApplyRecord({ |
| | | page, capacity,model: {} |
| | | }).then(res => { |
| | | this.datalist = res.data.records |
| | | this.datalist = [...this.datalist, ...res.data.records] |
| | | this.total = res.data.total |
| | | }) |
| | | }, |
| | |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" mode="widthFix" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title">安泰物流智慧园区</view> |
| | | <view class="tabs">
|
| | | <view class="tab" @click="tabsClick(0)" :class="{active: activeTab == 0 }">
|
| | | <view>账号登录</view>
|
| | | <view class="bor"></view>
|
| | | </view>
|
| | | <view class="tab" @click="tabsClick(1)" :class="{active: activeTab == 1 }">
|
| | | <view>验证码登录</view>
|
| | | <view class="bor"></view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="login_list"> |
| | | <template v-if="activeTab == 0">
|
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.username" type="number" maxlength="18" @focus="showKeyboard = true" @blur="showKeyboard = false" placeholder="账号" /> |
| | | <input v-model="form.username" type="number" maxlength="18" @focus="showKeyboard = true"
|
| | | @blur="showKeyboard = false" placeholder="账号" />
|
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input v-model="form.password" @focus="showKeyboard = true" @blur="showKeyboard = false" type="password" placeholder="密码" /> |
| | | <input v-model="form.password" @focus="showKeyboard = true" @blur="showKeyboard = false" type="password"
|
| | | placeholder="密码" />
|
| | | </view>
|
| | | </template>
|
| | | <template v-else>
|
| | | <view class="login_list_item">
|
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
|
| | | <input v-model="form.phone" type="tel" @focus="showKeyboard = true" @blur="showKeyboard = false"
|
| | | :maxlength="18" placeholder="手机号" />
|
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image>
|
| | | <input v-model="form.code" placeholder="请输入验证码" :maxlength="6" type="number" />
|
| | | <text class="captcha" v-if="countDown == 0" @click="initCaptcha">获取验证码</text>
|
| | | <text class="placeholder9" v-else>{{ countDown }}</text>
|
| | | </view>
|
| | | </template>
|
| | | <!-- <view class="login_list_item">
|
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input v-model="form.code" @focus="showKeyboard = true" @blur="showKeyboard = false" placeholder="验证码" type="text" /> |
| | | <image |
| | |
| | | class="captcha" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | </view> -->
|
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">立即登录</view> |
| | | <view @click="$jump('/pages/staffLogin/forgetPsd')" class="for_psd" |
| | | >忘记密码</view |
| | | > |
| | | <view @click="$jump('/pages/staffLogin/forgetPsd')" class="for_psd">忘记密码</view>
|
| | | </view> |
| | | |
| | | <view class="deal_wrap"> |
| | | <image |
| | | @click="changeFalg" |
| | | v-if="ProtocolFlag" |
| | | src="@/static/checkbox_sel@2x.png" |
| | | mode="widthFix" |
| | | class="checked" |
| | | ></image> |
| | | <image |
| | | @click="changeFalg" |
| | | v-if="!ProtocolFlag" |
| | | src="@/static/meeting/icon/ic_choose@2x.png" |
| | | mode="widthFix" |
| | | class="checked" |
| | | |
| | | ></image> |
| | | <image @click="changeFalg" v-if="ProtocolFlag" src="@/static/checkbox_sel@2x.png" mode="widthFix" class="checked">
|
| | | </image>
|
| | | <image @click="changeFalg" v-if="!ProtocolFlag" src="@/static/meeting/icon/ic_choose@2x.png" mode="widthFix"
|
| | | class="checked"></image>
|
| | | <text>登录即同意</text> |
| | | <text class="deal" @click="showContent">《安泰物流用户协议》</text> |
| | | </view> |
| | | <!-- --> |
| | | <u-popup |
| | | :show="isShowProtocol" |
| | | @close="isShowProtocol = false" |
| | | closeable |
| | | :round="8" |
| | | mode="center" |
| | | > |
| | | <u-popup :show="isShowProtocol" @close="isShowProtocol = false" closeable :round="8" mode="center">
|
| | | <view class="modal"> |
| | | <!-- <view v-html="htmlText"></view> --> |
| | | <view class="content"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { loginPost, loginCaptcha, getUserInfo, getSystemDictData, saveHkUserOpenid } from '@/api' |
| | | import { mapState, mapMutations } from 'vuex' |
| | | import {
|
| | | loginPost,
|
| | | loginH5ByPhone,
|
| | | getUserInfo,
|
| | | getSystemDictData,
|
| | | saveHkUserOpenid, |
| | | sendSms
|
| | | } from '@/api'
|
| | | import {
|
| | | mapState,
|
| | | mapMutations
|
| | | } from 'vuex'
|
| | | export default { |
| | | name: 'login', |
| | | |
| | | data() { |
| | | return { |
| | | form: { |
| | | // username: '18056814089', |
| | | username: '', |
| | | password: '', |
| | | code: '' |
| | | // username: '18655749830',
|
| | | username: null, |
| | | phone: null,
|
| | | password: null,
|
| | | code: null
|
| | | }, |
| | | showKeyboard: false, |
| | | isShowProtocol: false, |
| | |
| | | htmlText: '', |
| | | windowHeight: '', |
| | | |
| | | countDown: 0,
|
| | | activeTab: 0,
|
| | |
|
| | | ywinfo: {} |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.initCaptcha() |
| | | const result = uni.getWindowInfo() |
| | | this.windowHeight = result.windowHeight |
| | | |
| | |
| | | return true |
| | | }, |
| | | methods: { |
| | | ...mapMutations(["setToken", "setUserInfo"]), |
| | | changeFalg() { |
| | | this.ProtocolFlag = !this.ProtocolFlag |
| | | }, |
| | | getContent() { |
| | | getSystemDictData({ |
| | | dictCode: 'SYSTEM', |
| | | label: 'USER_PROTOCOL' |
| | | }).then(res => { |
| | | this.htmlText = res.data.code |
| | | this.isShowProtocol = true |
| | | }) |
| | | }, |
| | | showContent() { |
| | | this.getContent() |
| | | }, |
| | | initCaptcha() { |
| | | loginCaptcha().then(res => { |
| | | this.captcha = res.data |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form, ProtocolFlag } = this |
| | | const {
|
| | | form,
|
| | | ProtocolFlag,
|
| | | activeTab
|
| | | } = this
|
| | | if (!ProtocolFlag) return uni.showToast({ |
| | | title: '请先阅读并同意用户协议', |
| | | icon: 'none' |
| | | }) |
| | | if (activeTab == 0) {
|
| | | if (!form.username) return uni.showToast({ |
| | | title: '账号不能为空', |
| | | icon: 'none' |
| | |
| | | title: '密码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | } else {
|
| | | if (!form.phone) return uni.showToast({
|
| | | title: '手机号不能为空',
|
| | | icon: 'none'
|
| | | })
|
| | | if (!form.code) return uni.showToast({ |
| | | title: '验证码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | loginPost({ |
| | | } |
| | | let fn = activeTab == 0 ? loginPost : loginH5ByPhone
|
| | | fn({
|
| | | ...form, |
| | | uuid: this.captcha.uuid, |
| | | openid: this.$store.state.openId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | this.initCaptcha() |
| | | } |
| | | }) |
| | | },
|
| | | ...mapMutations(["setToken", "setUserInfo"]),
|
| | | tabsClick(val) {
|
| | | this.activeTab = val
|
| | | if (val == 0) {
|
| | | this.form.username = this.form.username || this.form.phone
|
| | | this.form.phone = null
|
| | | this.form.code = null
|
| | | } else {
|
| | | this.form.phone = this.form.username || this.form.phone
|
| | | this.form.password = null
|
| | | this.form.username = null
|
| | | }
|
| | | },
|
| | | changeFalg() {
|
| | | this.ProtocolFlag = !this.ProtocolFlag
|
| | | },
|
| | | getContent() {
|
| | | getSystemDictData({
|
| | | dictCode: 'SYSTEM',
|
| | | label: 'USER_PROTOCOL'
|
| | | }).then(res => {
|
| | | this.htmlText = res.data.code
|
| | | this.isShowProtocol = true
|
| | | })
|
| | | },
|
| | | showContent() {
|
| | | this.getContent()
|
| | | },
|
| | | initCaptcha() {
|
| | | if (!this.form.phone) return uni.showToast({
|
| | | title: '手机号不能为空',
|
| | | icon: 'none'
|
| | | })
|
| | | sendSms({
|
| | | phone: this.form.phone
|
| | | }).then(res => {
|
| | | this.countDown = 60
|
| | | setInterval(() => {
|
| | | if (this.countDown == 0) return
|
| | | this.countDown--
|
| | | }, 1000)
|
| | | })
|
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | flex-direction: column; |
| | | position: relative; |
| | | background: linear-gradient( |
| | | 180deg, |
| | | background: linear-gradient(180deg,
|
| | | rgba(39, 155, 170, 0.2) 0%, |
| | | rgba(39, 155, 170, 0) 100% |
| | | ); |
| | | rgba(39, 155, 170, 0) 100%);
|
| | |
|
| | | .login_logo { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | } |
| | |
|
| | | .login_bg { |
| | | position: absolute; |
| | | top: 0; |
| | |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | |
|
| | | .login_title { |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | color: #333333; |
| | | margin-top: 40rpx; |
| | | margin-bottom: 80rpx; |
| | | } |
| | |
|
| | | .tabs {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: space-evenly;
|
| | | width: 530rpx;
|
| | | margin: 60rpx auto 42rpx;
|
| | |
|
| | | .tab {
|
| | | font-size: 30rpx;
|
| | | color: #666666;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | align-items: center;
|
| | | height: 52rpx;
|
| | | line-height: 36rpx;
|
| | | }
|
| | |
|
| | | .active {
|
| | | font-weight: bold;
|
| | | font-size: 34rpx;
|
| | | color: #222222;
|
| | |
|
| | | .bor {
|
| | | width: 80rpx;
|
| | | height: 8rpx;
|
| | | background: linear-gradient(to bottom, #4d99a8, #a3c8d4);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .login_list { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | |
|
| | | .login_list_item { |
| | | width: 100%; |
| | | border-radius: 50rpx; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | |
|
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | |
|
| | | .captcha {
|
| | | color: $uni-color-primary;
|
| | | font-size: 30rpx;
|
| | | }
|
| | |
|
| | | image { |
| | | flex-shrink: 0; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | |
|
| | | .captcha { |
| | | width: 200rpx; |
| | | } |
| | |
|
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | |
| | | } |
| | | } |
| | | } |
| | |
|
| | | .login_btn { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | margin-top: 60rpx; |
| | |
|
| | | .for_psd { |
| | | color: $uni-color-primary; |
| | | width: 140rpx; |
| | | text-align: center; |
| | | margin: 40rpx auto; |
| | | } |
| | |
|
| | | .login_btn_n { |
| | | width: 100%; |
| | | height: 98rpx; |
| | |
| | | border-radius: 50rpx; |
| | | } |
| | | } |
| | |
|
| | | .deal_wrap { |
| | | position: absolute; |
| | | width: 100%; |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | |
|
| | | .deal { |
| | | color: $uni-color-primary; |
| | | } |
| | |
|
| | | .checked { |
| | | width: 48rpx; |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | |
|
| | | .rela_wrap{ |
| | | position: relative; |
| | | margin-top: 360rpx; |
| | | } |
| | | } |
| | |
|
| | | .modal { |
| | | width: 690rpx; |
| | | max-height: 80vh; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { sendSms, validPhoneCaptcha } from '@/api' |
| | | import { sendSms, loginGkUserWithCode, wxAuthorizea, getUserInfo } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | code: '', |
| | | phone: '' |
| | | }, |
| | | countDown: 0 |
| | | countDown: 0, |
| | | |
| | | code: '' |
| | | }; |
| | | }, |
| | | onShow() { |
| | | var that = this |
| | | let url = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home' |
| | | let code = '' |
| | | if (window.location.href.indexOf('code=') !== -1 || this.code) { |
| | | this.userAuth(3) |
| | | } else { |
| | | // let url = window.location.href |
| | | const appID = 'wx173e6caf5abc718a' |
| | | let uri = encodeURIComponent(url) |
| | | let authURL = |
| | | `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base#wechat_redirect` |
| | | window.location.href = authURL |
| | | } |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const { code, phone } = this.form |
| | | if (!phone) return this.showToast('手机号不能为空') |
| | | if (!code) return this.showToast('验证码不能为空') |
| | | validPhoneCaptcha({ |
| | | phone, code |
| | | loginGkUserWithCode({ |
| | | phone, code,openid: this.$store.state.openId, userType: 3 |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | this.$store.commit('setToken', res.data.token) |
| | | getUserInfo().then(ress => { |
| | | this.$store.commit('setWaybillInfo', ress.data) |
| | | uni.navigateTo({ |
| | | url: "/pages/waybill/list?phone=" + phone |
| | | url: '/pages/waybill/list' |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | userAuth(source) { |
| | | var that = this |
| | | let url = window.location.href |
| | | let code = '' |
| | | if (url.indexOf('code=') !== -1 || this.code) { |
| | | const query = url.split('?') |
| | | for (const q of query) { |
| | | if (q.indexOf('code=') !== -1) { |
| | | let statusIndex = q.indexOf('&state') |
| | | code = q.substring(q.indexOf('code=') + 5, statusIndex) |
| | | } |
| | | } |
| | | wxAuthorizea({ |
| | | code: code || this.code, |
| | | source: source |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | that.$store.commit('setOpenId', res.data.openid) |
| | | if (res.data.token) { |
| | | that.$store.commit('setToken', res.data.token) |
| | | getUserInfo().then(ress => { |
| | | that.$store.commit('setWaybillInfo', ress.data) |
| | | uni.navigateTo({ |
| | | url: '/pages/waybill/list' |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | initCaptcha() { |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: '手机号不能为空', |
| | |
| | | <template>
|
| | | <view class="main_app">
|
| | | <view class="title_wrap"> |
| | | <view class="name">{{ waybillInfo.realname || waybillInfo.username || waybillInfo.mobile }},欢迎登录~</view> |
| | | <view class="btn" @click="loginOut">退出登录</view> |
| | | </view>
|
| | | <view class="head_wrap" @click="openModal">
|
| | | <view class="search_box">
|
| | | <image src="@/static/ic_search@2x.png" class="search" mode=""></image>
|
| | |
| | |
|
| | | <script>
|
| | | import {
|
| | | orderListTms
|
| | | orderListTms, |
| | | logoutPost
|
| | | } from '@/api'
|
| | | import dayjs from 'dayjs';
|
| | | export default {
|
| | |
| | | page: 1,
|
| | | total: 0,
|
| | |
|
| | | waybillInfo: uni.getStorageSync('waybillInfo'),
|
| | | showModal: false,
|
| | | showStarttime: false,
|
| | | showEndtime: false, |
| | |
| | | };
|
| | | },
|
| | | onLoad(options) {
|
| | | this.$set(this.param, 'phoneNumber', options.phone)
|
| | | this.getList()
|
| | | },
|
| | | methods: { |
| | | clear() { |
| | | this.param = { |
| | | phoneNumber: this.param.phoneNumber |
| | | } |
| | | this.param = {} |
| | | this.form = {} |
| | | this.page = 1 |
| | | this.list = [] |
| | |
| | | diaodu() { |
| | | uni.navigateTo({ |
| | | url: '/pages/staff/signin' |
| | | }) |
| | | }, |
| | | loginOut() { |
| | | let app_url = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home' |
| | | logoutPost({ |
| | | isH5: 1 |
| | | }).then(res => { |
| | | this.$store.commit('empty') |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | }) |
| | | },
|
| | | modalSub() {
|
| | |
| | | form,
|
| | | page
|
| | | } = this
|
| | | // if (form.contract) {
|
| | | // form.contractNumber = form.contract
|
| | | // } else {
|
| | | // form.contractNumber = null
|
| | | // }
|
| | | orderListTms({
|
| | | parameters: {
|
| | | ...param,
|
| | |
| | | <style lang="scss">
|
| | | page {
|
| | | background: #F7F7F7;
|
| | | } |
| | | .title_wrap { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | // align-items: center; |
| | | background-color: #fff; |
| | | width: 750rpx; |
| | | height: 70rpx; |
| | | margin: -10rpx -30rpx 0; |
| | | padding: 12rpx 30rpx; |
| | | .name { |
| | | font-weight: 600; |
| | | font-size: 34rpx; |
| | | color: #222222; |
| | | } |
| | | |
| | | .btn { |
| | | width: 144rpx; |
| | | height: 56rpx; |
| | | border-radius: 36rpx; |
| | | border: 1rpx solid $uni-color-primary; |
| | | font-size: 26rpx; |
| | | color: $uni-color-primary; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | }
|
| | | .head_title{ |
| | | color: $uni-color-primary; |
| | |
| | |
|
| | | .scroll_Y {
|
| | | background-color: #f7f7f7;
|
| | | height: calc(100vh - 180rpx); |
| | | height: calc(100vh - 250rpx); |
| | | margin-top: 10rpx;
|
| | |
|
| | | .main_list {
|
| | | width: 750rpx;
|
| | | margin: 0 -30rpx;
|
| | |
| | | that.$store.commit('setToken', res.data.token) |
| | | getUserInfo().then(ress => { |
| | | that.$store.commit('setDriverInfo', ress.data) |
| | | }) |
| | | uni.navigateTo({ |
| | | url: '/pages/wdata/list' |
| | | }) |
| | | }) |
| | | }
|
| | | }
|
| | | })
|
| | |
| | | const time = uni.getStorageSync('time') |
| | | const userInfo = uni.getStorageSync('userInfo') |
| | | const driverInfo = uni.getStorageSync('driverInfo') |
| | | const waybillInfo = uni.getStorageSync('waybillInfo') |
| | | const sessionKey = uni.getStorageSync('sessionKey') |
| | | |
| | | const store = new Vuex.Store({ |
| | |
| | | time: time || null, |
| | | userInfo: userInfo || {}, |
| | | driverInfo: driverInfo || {}, |
| | | waybillInfo: waybillInfo || {}, |
| | | height: height || '0', |
| | | sessionKey: sessionKey || '', |
| | | primaryColor: '#279baa' |
| | |
| | | setMember(state, val) { |
| | | state.member = val |
| | | uni.setStorageSync('member', val) |
| | | }, |
| | | setWaybillInfo(state, val) { |
| | | state.waybillInfo = val |
| | | uni.setStorageSync('waybillInfo', val) |
| | | }, |
| | | // 设置导航栏高度 |
| | | setHeight(state, val) { |
| | |
| | | state.openId = '' |
| | | state.userInfo = {} |
| | | state.driverInfo = {} |
| | | state.waybillInfo = {} |
| | | } |
| | | }, |
| | | actions: { |
| | |
| | | </div> |
| | | <div class="static" v-if="data1.gasQuantity"> |
| | | <span class="lab">同比</span> |
| | | <template v-if="data1.gasQuantity.sameNum"> |
| | | <img v-if="data1.gasQuantity.totalNum > data1.gasQuantity.sameNum" class="icon" |
| | | src="@/assets/images/ic_up.webp" alt="" /> |
| | | <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> |
| | | </template> |
| | | <span class="val" v-if="data1.gasQuantity.totalNum && data1.gasQuantity.totalNum != 0">{{ |
| | | Math.abs(((data1.gasQuantity.totalNum - data1.gasQuantity.sameNum) / data1.gasQuantity.totalNum |
| | | * 100).toFixed(1)) |
| | | }}%</span> |
| | | <span class="val" v-else style="margin-left: 4px;">-</span> |
| | | <span class="lab">环比</span> |
| | | <template v-if="data1.gasQuantity.sameNum"> |
| | | <img v-if="data1.gasQuantity.totalNum > data1.gasQuantity.ringNum" class="icon" |
| | | src="@/assets/images/ic_up.webp" alt="" /> |
| | | <img v-else class="icon" src="@/assets/images/ic_down.webp" alt="" /> |
| | | </template> |
| | | <span class="val" v-if="data1.gasQuantity.totalNum && data1.gasQuantity.totalNum != 0">{{ |
| | | Math.abs(((data1.gasQuantity.totalNum - data1.gasQuantity.ringNum) / data1.gasQuantity.totalNum |
| | | * 100).toFixed(1)) |
| | |
| | | } |
| | | |
| | | .bottom { |
| | | width: 140px; |
| | | width: 150px; |
| | | height: 194px; |
| | | position: absolute; |
| | | text-align: center; |
| | |
| | | <img src="@/assets/images/LogisticsCenter/ic_jinrijihua@2x.png" alt=""> |
| | | <div class="content"> |
| | | <div class="name">当日订单量</div> |
| | | <div class="num"><span class="blue">{{ cneterData.currentOrderNum }}</span>万支</div> |
| | | <div class="num"><span class="blue" v-if="cneterData.currentOrderNum">{{ cneterData.currentOrderNum.toFixed(0) }}</span>箱</div> |
| | | </div> |
| | | </div> |
| | | <div class="item"> |
| | | <img src="@/assets/images/LogisticsCenter/ic_jinrijihua@2.png" alt=""> |
| | | <div class="content"> |
| | | <div class="name">当日计划量</div> |
| | | <div class="num"><span>{{ cneterData.currentPlanNum }}</span>万支</div> |
| | | <div class="num"><span v-if="cneterData.currentPlanNum">{{ cneterData.currentPlanNum.toFixed(0) }}</span>箱</div> |
| | | <div class="unit">车次:{{ cneterData.currentPlanCarNum }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="@/assets/images/LogisticsCenter/ic_jinrichuku@2x.png" alt=""> |
| | | <div class="content"> |
| | | <div class="name">今日出库量</div> |
| | | <div class="num"><span class="finish">{{ cneterData.crrentOutNum }}</span>万支</div> |
| | | <div class="num"><span v-if="cneterData.crrentOutNum" class="finish">{{ cneterData.crrentOutNum.toFixed(0) }}</span>箱</div> |
| | | <div class="unit">车次:{{ cneterData.crrentOutCarNum }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="@/assets/images/LogisticsCenter/ic_jinriweichu@2x.png" alt=""> |
| | | <div class="content"> |
| | | <div class="name">剩余任务量</div> |
| | | <div class="num"><span class="today">{{ cneterData.crrentRestNum }}</span>万支</div> |
| | | <div class="num"><span v-if="cneterData.crrentRestNum" class="today">{{ cneterData.crrentRestNum.toFixed(0) }}</span>箱</div> |
| | | <div class="unit">车次:{{ cneterData.crrentRestCarNum }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="side"> |
| | | 全省: |
| | | <span>{{ data5.currentNum }}</span> |
| | | <span class="unit">万支 | </span> |
| | | <span class="unit">箱 | </span> |
| | | <span v-if="data5.totalNum">{{ ((data5.currentNum / data5.totalNum) * 100).toFixed(1) }}%</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="side"> |
| | | 全省: |
| | | <span>{{ data6.currentNum }}</span> |
| | | <span class="unit">万支 | </span> |
| | | <span class="unit">箱 | </span> |
| | | <span v-if="data6.totalNum">{{ ((data6.currentNum / data6.totalNum) * 100).toFixed(1) }}%</span> |
| | | </div> |
| | | </div> |
| | |
| | | <span class="dot bj"></span> |
| | | <span class="item-state-num"> |
| | | <span class="text">本月调拨量:</span> |
| | | <span class="num">${params.data.monthNum}万支</span> |
| | | <span class="num">${params.data.monthNum}箱</span> |
| | | </span> |
| | | </div> |
| | | <div class="item-state-con"> |
| | | <span class="dot yj"></span> |
| | | <span class="item-state-num"> |
| | | <span class="text">本年调拨量:</span> |
| | | <span class="num">${params.data.yearNum}万支</span> |
| | | <span class="num">${params.data.yearNum}箱</span> |
| | | </span> |
| | | </div> |
| | | <div class="item-state-con"> |
| | |
| | | nameTextStyle: { |
| | | color: '#869CC9', |
| | | }, |
| | | name: '万支', |
| | | name: '箱', |
| | | nameGap: 16, |
| | | type: 'value', |
| | | axisLabel: { |
| | |
| | | }], |
| | | yAxis: [ |
| | | { |
| | | name: '万支', |
| | | name: '箱', |
| | | nameGap: 16, |
| | | type: 'value', |
| | | axisLabel: { |
| | |
| | | .static_wrap { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin: 30px 0 14px; |
| | | |
| | | .item { |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | min-width: 76px; |
| | | border: 1px solid #fff; |
| | | border: 1px solid #FECE01; |
| | | |
| | | .icon { |
| | | position: absolute; |
| | |
| | | |
| | | .tag1 { |
| | | background-color: #28F0CC; |
| | | |
| | | border: 1px solid #28F0CC; |
| | | .icon { |
| | | background-color: #28F0CC; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div @click="openCloudAddr" class="monitoring"> |
| | | <img src="@/assets/images/ic_jiankong@2x.png" class="icon" alt=""> |
| | | <div>车辆监控平台</div> |
| | | <img class="top" src="@/assets/images/SecurityControl/ar_open@2x.png" alt=""> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="right_box"> |
| | |
| | | }) |
| | | } |
| | | |
| | | const openCloudAddr = () => { |
| | | window.open('https://vms.hikvisionauto.com:8040/', '_blank') |
| | | } |
| | | |
| | | |
| | | const data1 = ref({}) |
| | | const activeTab1 = ref(0) |
| | |
| | | overflow: auto; |
| | | padding-left: 10px; |
| | | padding-bottom: 12px; |
| | | |
| | | .line { |
| | | font-size: 13px; |
| | | color: #D2E0FF; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .monitoring { |
| | | position: absolute; |
| | | cursor: pointer; |
| | | bottom: 10px; |
| | | left: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 500; |
| | | font-size: 15px; |
| | | width: 156px; |
| | | height: 40px; |
| | | background: linear-gradient(180deg, rgba(0, 148, 235, 0.68) 0%, rgba(0, 148, 235, 0) 100%); |
| | | border-radius: 2px; |
| | | border: 1px solid; |
| | | border-image: linear-gradient(180deg, rgba(177, 210, 255, 0.64), rgba(0, 171, 255, 0.7)) 1 1; |
| | | |
| | | .icon { |
| | | width: 16px; |
| | | height: 16px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .top { |
| | | width: 7px; |
| | | margin-left: 6px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |