Commit 4e6204c0 by 张立顺

fix bug修复

1 parent 5f0a37bd
Showing 40 changed files with 248 additions and 999 deletions
......@@ -10,6 +10,7 @@ Component({
options: {
styleIsolation: 'shared'
},
// options: { styleIsolation: 'apply-shared' },
/**
* 组件的属性列表
*/
......@@ -139,11 +140,31 @@ Component({
showPwd: !this.data.showPwd
})
},
// checkAgree() {
// let { agree } = this.data
// console.log('agree', agree)
// if (!agree) {
// wx.$api.showToast('请同意用户协议')
// return true
// }
// return false
// },
onClose() {
this.setData({
showAuthDialog: false
})
},
agreeEvent() {
this.setData({
agree: true
})
},
checkAgree() {
let { agree } = this.data
console.log('agree', agree)
if (!agree) {
wx.$api.showToast('请同意用户协议')
this.setData({
showAuthDialog: true
})
return true
}
return false
......@@ -160,13 +181,13 @@ Component({
obj =
loginType == 1
? {
mobile: formData.phone,
code: formData.code
}
mobile: formData.phone,
code: formData.code
}
: {
userName: formData.account,
password: md5(formData.password)
}
userName: formData.account,
password: md5(formData.password)
}
this.setBtnLoading()
USERAPI[target](obj)
.then(({ code, data, message }) => {
......@@ -205,8 +226,7 @@ Component({
confirmText: '我知道了',
showCancel: false,
confirmColor: '#292d33',
success(res) {
}
success(res) {}
})
}
})
......
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"input-icon": "../InputIcon/InputIcon",
"auth-setting": "../authSetting/authSetting"
}
......
......@@ -131,4 +131,38 @@
width: 100%;
/* left: 50%; */
/* transform: translateX(-50%); */
}
.auth-dialog-class {
text-align: center;
font-size: var(--fontSize28);
font-weight: 400;
}
.auth-dialog-class .van-dialog__header {
font-size: var(--fontSize36);
font-weight: 500;
color: #333333;
}
.title_text {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize36);
color: #333333;
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
}
.message-box .message {
padding: 8px 0;
}
\ No newline at end of file
<block wx:if="{{loginType == 0}}">
<view class="wx opacity-view">
<view class="title">
您好
</view>
<view class="subtitle">
欢迎登录销售助手
</view>
<image webp class="img" src="{{IMGURL}}login/login-2.webp" />
</view>
<block wx:if="{{ loginType == 0 }}">
<view class="wx opacity-view">
<view class="title">您好</view>
<view class="subtitle">欢迎登录销售助手</view>
<image webp class="img" src="{{ IMGURL }}login/login-2.webp" />
</view>
</block>
<block wx:else>
<view class="box">
<view class="input-box opacity-view">
<view class="title">{{loginType == 1?'手机号':'账号'}}登录</view>
<block wx:if="{{loginType == 1}}">
<view class="input">
<view class="label">手机号</view>
<input type="number" placeholder="请输入手机号" placeholder-class="placeholder" bindinput="input" data-name="phone" value="{{formData.phone}}" maxlength="11" />
<input-icon show="{{formData.phone}}" bindtap="clear" data-name="phone" />
</view>
<view class="input">
<view class="label">验证码</view>
<input type="number" placeholder="请输入验证码" placeholder-class="placeholder" bindinput="input" data-name="code" value="{{formData.code}}" maxlength="4" />
<input-icon show="{{formData.code}}" bindtap="clear" data-name="code" />
<button plain="true" class="sms text-center " bindtap="getSmsCode" disabled="{{count || !phoneReady}}" loading="{{smsLoading}}">{{
<view class="box">
<view class="input-box opacity-view">
<view class="title">{{loginType == 1?'手机号':'账号'}}登录</view>
<block wx:if="{{ loginType == 1 }}">
<view class="input">
<view class="label">手机号</view>
<input
type="number"
placeholder="请输入手机号"
placeholder-class="placeholder"
bindinput="input"
data-name="phone"
value="{{ formData.phone }}"
maxlength="11"
/>
<input-icon show="{{ formData.phone }}" bindtap="clear" data-name="phone" />
</view>
<view class="input">
<view class="label">验证码</view>
<input
type="number"
placeholder="请输入验证码"
placeholder-class="placeholder"
bindinput="input"
data-name="code"
value="{{ formData.code }}"
maxlength="4"
/>
<input-icon show="{{ formData.code }}" bindtap="clear" data-name="code" />
<button
plain="true"
class="sms text-center"
bindtap="getSmsCode"
disabled="{{ count || !phoneReady }}"
loading="{{ smsLoading }}"
>{{
count? count + 's后重新获取':'获取验证码'
}}
</button>
<block wx:if="{{smsError}}">
<view class="error">验证码错误</view>
</block>
</view>
</block>
<block wx:else>
<view class="input">
<input type="text" placeholder="填写账号" placeholder-class="placeholder" bindinput="input" data-name="account" value="{{formData.account}}" maxlength="15" />
<input-icon show="{{formData.account}}" bindtap="clear" data-name="account" />
</view>
<view class="input">
<input type="text" placeholder="填写密码" placeholder-class="placeholder" bindinput="input" data-name="password" value="{{formData.password}}" maxlength="20" password='{{!showPwd}}' />
<input-icon show bindtap="pwdSwitch" type="{{showPwd?'showPwd':'hidePwd'}}" />
<input-icon show="{{formData.password}}" bindtap="clear" data-name="password" />
</view>
</block>
</view>
</view>
}}</button>
<block wx:if="{{ smsError }}">
<view class="error">验证码错误</view>
</block>
</view>
</block>
<block wx:else>
<view class="input">
<input
type="text"
placeholder="填写账号"
placeholder-class="placeholder"
bindinput="input"
data-name="account"
value="{{ formData.account }}"
maxlength="15"
/>
<input-icon show="{{ formData.account }}" bindtap="clear" data-name="account" />
</view>
<view class="input">
<input
type="text"
placeholder="填写密码"
placeholder-class="placeholder"
bindinput="input"
data-name="password"
value="{{ formData.password }}"
maxlength="20"
password="{{ !showPwd }}"
/>
<input-icon show bindtap="pwdSwitch" type="{{ showPwd?'showPwd':'hidePwd' }}" />
<input-icon show="{{ formData.password }}" bindtap="clear" data-name="password" />
</view>
</block>
</view>
</view>
</block>
<block wx:if="{{loginType == 0 &&agree}}">
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" open-type="getPhoneNumber" bindgetphonenumber="wxLogin" loading="{{loading}}">登录
</button>
<block wx:if="{{ loginType == 0 &&agree }}">
<button
class="button"
disabled="{{ disabled }}"
hover-class="btn-hover"
open-type="getPhoneNumber"
bindgetphonenumber="wxLogin"
loading="{{ loading }}"
>登录</button>
</block>
<block wx:else>
<button class="button" disabled="{{disabled}}" hover-class="btn-hover" bindtap="login" loading="{{loading}}">登录
</button>
<button class="button" disabled="{{ disabled }}" hover-class="btn-hover" bindtap="login" loading="{{ loading }}">登录</button>
</block>
<view class="auth_box">
<auth-setting bind:choose="authChoose" />
<!-- <auth-setting bind:choose="authChoose" /> -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
</view>
<!-- 协议 -->
<!-- <auth-setting bind:choose="authChoose" agree="{{ agree }}" /> -->
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
\ No newline at end of file
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- 未同意协议弹窗提示 -->
<van-dialog
use-slot
title="隐私协议与用户协议"
show="{{ showAuthDialog }}"
class="auth-dialog-class"
custom-class="auth-dialog-class"
width="var(--fontSize552)"
show-cancel-button
confirmButtonText="同意"
use-title-slot="{{ true }}"
confirm-button-color="#5092FF"
bind:confirm="agreeEvent"
bind:close="onClose"
>
<view slot="title">
<view class="title_text">隐私协议与用户协议</view>
</view>
<view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《隐私协议》</text>
和
<text catchtap="jump" data-url="agreement">《用户协议》</text>
</view>
</van-dialog>
\ No newline at end of file
......@@ -27,6 +27,7 @@ Component({
// type: Boolean,
// value: false
// }
agree: Boolean
},
/**
......
......@@ -36,7 +36,7 @@ Page({
list: []
},
getWarningStores() {
let { month, staffUuid, regionId, tabList } = this.data
let { month, staffUuid, regionId, tabList, activeIndex } = this.data
let params = { month }
if (staffUuid) {
params.staffUuid = staffUuid
......@@ -60,12 +60,12 @@ Page({
const mapExpected = arr =>
Array.isArray(arr)
? arr.map(item => ({
...item,
expectedOperationDateFormatted: formatYMDHM(
item.expectedOperationDate
),
signedTimeFormatted: formatYMDHM(item.signedTime)
}))
...item,
expectedOperationDateFormatted: formatYMDHM(
item.expectedOperationDate
),
signedTimeFormatted: formatYMDHM(item.signedTime)
}))
: []
const _backstop = mapExpected(backstopWarningList)
const _lostShop = mapExpected(lostShopWarningList)
......@@ -76,7 +76,12 @@ Page({
backstopWarningList: _backstop,
lostShopWarningList: _lostShop,
lossWarningList: _loss,
list: _backstop || []
list:
activeIndex == 0
? _backstop || []
: activeIndex == 1
? _lostShop || []
: _loss || []
})
})
},
......@@ -122,8 +127,8 @@ Page({
e.detail == 0
? backstopWarningList
: e.detail == 1
? lostShopWarningList
: lossWarningList
? lostShopWarningList
: lossWarningList
this.setData({
activeIndex: e.detail,
list: list || []
......@@ -144,47 +149,48 @@ Page({
this.setData({
month: options.month,
staffUuid: options.staffUuid,
regionId: options.regionId
regionId: options.regionId,
activeIndex: options.index || 0
})
this.getWarningStores()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) { },
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() { },
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() { }
onShareAppMessage() {}
})
......@@ -18,10 +18,14 @@ Page({
todayAutoHeight: true,
todayHeight: 76,
tomorrowAutoHeight: true,
tomorrowHeight: 76
tomorrowHeight: 76,
// 防重复提交标识
isSubmitting: false
},
handleConfirm() {
let that = this
// 简单防抖:正在提交则直接返回
if (this._submitLock || this.data.isSubmitting) return
let { orderObj } = this.data
let params = {
staffName: orderObj.staffName,
......@@ -33,12 +37,18 @@ Page({
// 都填写了才请求接口
if (orderObj.todayWorkContent && orderObj.tomorrowPlanContent) {
if (orderObj.todayWorkContent.trim().length == 0 || orderObj.tomorrowPlanContent.trim().length == 0) {
if (
orderObj.todayWorkContent.trim().length == 0 ||
orderObj.tomorrowPlanContent.trim().length == 0
) {
return wx.showToast({
title: '日报内容不可为空,请重新输入',
icon: 'none',
icon: 'none'
})
}
// 通过校验后加锁,避免重复点击
this._submitLock = true
this.setData({ isSubmitting: true })
dailyReportApi
.staffDailyReportSave(params)
.then(result => {
......@@ -54,7 +64,14 @@ Page({
}
})
})
.catch(err => { })
.catch(err => {})
.finally(() => {
setTimeout(() => {
// 解锁
this._submitLock = false
this.setData({ isSubmitting: false })
}, 500)
})
}
},
formatDateTime(date) {
......@@ -300,7 +317,7 @@ Page({
},
initData() {
let { orderObj, reportDate, userInfo } = this.data
console.log(reportDate, 'reportDate');
console.log(reportDate, 'reportDate')
if (reportDate) {
// reportDate = "2024-04-27";
var dateisSunday = new Date(reportDate)
......@@ -322,7 +339,7 @@ Page({
timeBean: util.getWeekDayList(0 - countSundays),
selectWeek: 0 - countSundays,
['timeBean.selectDay']:
dateisSunday.getDay() == 0 ? 6 : dateisSunday.getDay() - 1,
dateisSunday.getDay() == 0 ? 6 : dateisSunday.getDay() - 1
// selectWeek: dateisSunday.getDay() === 0 ? -1 : 0
})
} else {
......@@ -392,40 +409,40 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) { },
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() { },
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() { }
onShareAppMessage() {}
})
......@@ -88,7 +88,7 @@ Component({
width: 'var(--fontSize150)'
},
{
name: '当月目标',
name: '目标',
key: 'target',
width: 'var(--fontSize150)'
},
......
......@@ -109,9 +109,11 @@ Component({
this.setData({ pendingMonthValue: ts })
},
navigateToStoreDetail: function (e) {
let { index } = e.currentTarget.dataset
console.log(e, 'e')
wx.$router.go('packageIndex.warningStoreList', {
month: this.data.month
month: this.data.month,
index: index
// storeUuid: e.currentTarget.dataset.storeuuid
})
// wx.navigateTo({
......
......@@ -9,22 +9,22 @@
</view>
</view>
<view class="tips">指标异常门店</view>
<view class="list" bindtap="navigateToStoreDetail">
<view class="item">
<view class="list">
<view class="item" bindtap="navigateToStoreDetail" data-index="{{ 0 }}">
<view class="top">兜底指数预警</view>
<view class="bottom">
<text class="num">{{warningStores.backstopWarningCount}}</text>
<text class="unit">家</text>
</view>
</view>
<view class="item">
<view class="item" bindtap="navigateToStoreDetail" data-index="{{ 1 }}">
<view class="top">丢店风险预警</view>
<view class="bottom">
<text class="num">{{warningStores.lostShopWarningCount}}</text>
<text class="unit">家</text>
</view>
</view>
<view class="item last">
<view class="item last" bindtap="navigateToStoreDetail" data-index="{{ 2 }}">
<view class="top">亏损预警</view>
<view class="bottom">
<text class="num">{{warningStores.lossWarningCount}}</text>
......
// login/index/components/InputIcon/InputIcon.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
type: {
type: String,
value: 'clear'
},
src: String
},
/**
* 组件的初始数据
*/
data: {
ICON_TYPE: {
showPwd: './images/seePwd.png',
hidePwd: './images/hidePwd.png',
clear: './images/clear.png'
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* login/index/components/Clear/Clear.wxss */
.icon-box {
width: 44rpx;
height: 40rpx;
padding: 0 10rpx;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
transition: all .25s;
.icon {
width: 32rpx;
height: 32rpx;
}
}
\ No newline at end of file
<view class="icon-box" hidden="{{!show}}">
<image src="{{src || ICON_TYPE[type]}}" class="icon"></image>
</view>
\ No newline at end of file
// login/index/components/TypeList.js
// import { imgUrlMixin } from '~/mixins/index'
Component({
// behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {
loginType: Number
},
/**
* 组件的初始数据
*/
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
IMG_VERSION: 'v1.0.0',
loginList: [{
name: '手机号',
index: 1
}, {
name: '账号密码',
index: 2
}, {
name: '微信登录',
index: 0
}],
},
/**
* 组件的方法列表
*/
methods: {
changLoginType(e) {
const thisPage = wx.$router.getPageInstance(),
loginType = e.currentTarget.dataset.index
thisPage.setData({
loginType: loginType + 1
})
wx.vibrateShort()
// thisPage.checkLoginBtn()
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* login/index/components/TypeList.wxss */
.tips {
padding-top: 100rpx;
text-align: center;
margin-bottom: 40rpx;
font-size: 24rpx;
color: #8A8C90;
}
.tips.true {
padding-top: 48rpx;
}
.login-list {
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #8A8C90;
.item {
display: flex;
align-items: center;
flex-direction: column;
width: 100rpx;
animation: btn-move .25s forwards;
margin: 0 79rpx;
.icon {
width: 68rpx;
height: 68rpx;
margin-bottom: 12rpx;
}
}
@keyframes btn-move {
0% {
transform: scale(0.1);
}
100% {
transform: scale(1);
}
}
}
\ No newline at end of file
<view class="tips {{loginType == 2}}">其他方式</view>
<view class="login-list">
<block wx:for="{{loginList}}" wx:key="index">
<block wx:if="{{loginType != index+1 }}">
<view class="item" bindtap="changLoginType" data-index="{{index}}">
<image class="icon" webp src="{{IMGURL}}login/icon-{{item.index}}.png"></image>
{{item.name}}
</view>
</block>
</block>
</view>
\ No newline at end of file
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')
// var appInstance = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
// auth: {
// type: Boolean,
// value: true,
// observer: function (newVal, oldVal) {
// this.getHeadImage()
// }
// },
// type: {
// type: Boolean,
// value: true
// },
// special: {
// type: Boolean,
// value: false
// },
// index: {
// type: Boolean,
// value: false
// }
agree: Boolean
},
/**
* 组件的初始数据
*/
data: {
// auth: true,
// type: true,
// appLogo: '',
// appName: '',
// merchantName: '',
// gender: 1
},
ready() {
// this.getHeadImage()
},
/**
* 组件的方法列表
*/
methods: {
choose() {
this.setData({
agree: !this.data.agree
})
this.triggerEvent('choose', this.data.agree)
},
jump(e) {
console.log(e)
let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
noScroll() {}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='tips'>
<view class='choose-box' bindtap="choose">
<view class='icon'>
<image src="{{agree?'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_checked.png':'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_check.png'}}" class='check-img' />
</view>
</view>
<text>30天内免登录</text>
</view>
/* components/authSetting/authSetting.wxss */
.tips {
/* position: fixed; */
width: 100%;
/* left: 0;
bottom: var(--fontSize60); */
font-size: var(--fontSize24);
color: #8F959E;
letter-spacing: var(--fontSize2);
/* padding-left: var(--fontSize28); */
box-sizing: border-box;
display: flex;
align-items: center;
/* padding-left: var(--fontSize90); */
}
/* .tips text {
color: #5092FF;
} */
.tips .icon {
position: absolute;
top: 50%;
left: 50%;
width: var(--fontSize28);
height: var(--fontSize28);
border-radius: 50%;
box-sizing: border-box;
transform: translate(-50%, -50%);
}
.tips .icon .check-img {
vertical-align: top;
width: 100%;
height: 100%;
}
.tips .choose-box {
width: var(--fontSize50);
height: var(--fontSize50);
position: relative;
z-index: 10;
}
\ No newline at end of file
// components/authSetting/authSetting.js
// const restapi = require('../../utils/restapi.js')
// var appInstance = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
// auth: {
// type: Boolean,
// value: true,
// observer: function (newVal, oldVal) {
// this.getHeadImage()
// }
// },
// type: {
// type: Boolean,
// value: true
// },
// special: {
// type: Boolean,
// value: false
// },
// index: {
// type: Boolean,
// value: false
// }
agree: Boolean
},
/**
* 组件的初始数据
*/
data: {
// auth: true,
// type: true,
// appLogo: '',
// appName: '',
// merchantName: '',
// gender: 1
},
ready() {
// this.getHeadImage()
},
/**
* 组件的方法列表
*/
methods: {
choose() {
this.setData({
agree: !this.data.agree
})
this.triggerEvent('choose', this.data.agree)
},
jump(e) {
console.log(e)
let { url } = e.currentTarget.dataset
const baseUrl = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const path = `${baseUrl}${url}.html`
// private user
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
noScroll() {}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='tips'>
<view class='choose-box' bindtap="choose">
<view class='icon'>
<image src="{{agree?'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_checked.png':'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_check.png'}}" class='check-img' />
</view>
</view>
我已阅读并同意
<!-- <text catchtap="jump" data-url="agree">《服务协议》</text> -->
<text catchtap="jump" data-url="privacy">《隐私协议》</text>和
<text catchtap="jump" data-url="agreement">《用户协议》</text>
</view>
/* components/authSetting/authSetting.wxss */
.tips {
/* position: fixed; */
width: 100%;
left: 0;
bottom: var(--fontSize60);
font-size: var(--fontSize24);
color: #8F959E;
letter-spacing: var(--fontSize2);
box-sizing: border-box;
display: flex;
align-items: center;
/* padding-left: var(--fontSize90); */
}
.tips text {
color: #5092FF;
}
.tips .icon {
position: absolute;
top: 50%;
left: 50%;
width: var(--fontSize28);
height: var(--fontSize28);
border-radius: 50%;
box-sizing: border-box;
transform: translate(-50%, -50%);
}
.tips .icon .check-img {
vertical-align: top;
width: 100%;
height: 100%;
}
.tips .choose-box {
width: var(--fontSize50);
height: var(--fontSize50);
position: relative;
z-index: 10;
}
\ No newline at end of file
{
"usingComponents": {
"auth-setting": "./components/authSetting/authSetting",
"auth-noLogin": "./components/authNoLogin/authNoLogin",
"input-icon": "./components/InputIcon/InputIcon",
"type-list": "./components/TypeList/TypeList"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* pages/login/login/login.wxss */
page {
background: #fff;
}
.layout {
/* padding: 0 var(--fontSize80); */
position: relative;
display: flex;
justify-content: center;
height: 100vh;
}
.layout::before {
content: '';
width: 100%;
height: 100%;
background: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ligin_bg.png') no-repeat;
background-size: 100% 100%;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.phone_login_layout::after {
content: '';
width: 100%;
height: 100%;
background: #fff;
position: fixed;
left: 0;
top: 0;
z-index: -1;
}
.navigation-header {
background-color: transparent;
}
.wx .title {
font-weight: 600;
font-size: var(--fontSize52);
color: #181A1F;
padding-top: 4vh;
}
.wx .subtitle {
font-size: var(--fontSize40);
color: #181A1F;
margin-bottom: 4.5vh;
}
.wx .img {
width: var(--fontSize378);
height: var(--fontSize336);
display: block;
margin: 0 auto;
}
.opacity-view {
animation: opacity-view .5s forwards;
}
.login-btn {
margin: 9vh 0 0;
background-image: linear-gradient(125deg, #65B8F8 0%, #347BFF 100%);
border-radius: var(--fontSize12);
text-align: center;
font-size: var(--fontSize32);
color: #fff;
height: var(--fontSize100);
line-height: var(--fontSize100);
width: var(--fontSize594);
font-weight: normal;
transition: all .5s;
position: relative;
}
.login-btn button {
opacity: 0;
position: absolute;
top: 0;
left: 0;
padding: 0;
width: 100% !important;
height: var(--fontSize100);
box-sizing: border-box;
}
.mobile_btn {
width: var(--fontSize594);
height: var(--fontSize100);
background: #E6F0FD;
border-radius: var(--fontSize12);
color: #347BFF;
text-align: center;
line-height: var(--fontSize100);
font-size: var(--fontSize32);
}
.auth-dialog-class {
text-align: center;
font-size: var(--fontSize28);
font-weight: 400;
}
.auth-dialog-class .van-dialog__header {
font-size: var(--fontSize36);
font-weight: 500;
color: #333333;
}
.title_text {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize36);
color: #333333;
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: var(--fontSize20) 0 var(--fontSize30);
color: #666666;
text-align: center;
font-size: var(--fontSize28);
}
.message-box .message {
padding: 8px 0;
}
.phone_login {
width: 100%;
}
.phone_login .title {
font-weight: 600;
font-size: var(--fontSize48);
color: #181A1F;
padding: 12vh 0 9vh;
display: flex;
justify-content: center;
}
.login-form {
font-size: var(--fontSize28);
}
.login-form .input {
width: var(--fontSize594);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: var(--fontSize20);
padding: var(--fontSize26) var(--fontSize40);
background: #F7F8FA;
border-radius: var(--fontSize12);
}
.login-form .input input {
height: var(--fontSize38);
}
.login-form .input .clear {
flex-shrink: 0;
width: var(--fontSize36);
height: var(--fontSize36);
padding: 0 var(--fontSize20);
}
.login-form .sms {
flex-shrink: 0;
font-size: var(--fontSize24);
padding: 0;
text-align: right;
transition: all 0.25s;
color: #347BFF;
}
.login-form .code-disabled {
color: #BEC1C7;
}
.login-form .login_btn {
width: var(--fontSize594);
height: var(--fontSize100);
background-image: linear-gradient(125deg, #65B8F8 0%, #347BFF 100%);
border-radius: var(--fontSize12);
color: #fff;
text-align: center;
line-height: var(--fontSize100);
margin: var(--fontSize94) 0 var(--fontSize40);
}
.login-form .wx_login {
text-align: center;
font-size: var(--fontSize28);
color: #888888;
}
.login-form .wx_login text {
color: #347BFF;
margin-left: var(--fontSize20);
}
.auth_box {
padding: var(--fontSize30) 0;
/* position: fixed; */
width: 100%;
/* left: 50%; */
/* transform: translateX(-50%); */
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.wx .img {
width: var(--fontSize200);
height: var(--fontSize178);
}
.wx .title {
font-weight: 600;
font-size: var(--fontSize52);
color: #181A1F;
padding-top: 2vh;
}
.wx .subtitle {
font-size: var(--fontSize40);
color: #181A1F;
margin-bottom: 2vh;
}
.login-btn {
margin: 4vh 0 var(--fontSize28);
background-image: linear-gradient(125deg, #65B8F8 0%, #347BFF 100%);
border-radius: var(--fontSize12);
text-align: center;
font-size: var(--fontSize32);
color: #fff;
height: var(--fontSize70);
line-height: var(--fontSize70);
width: var(--fontSize594);
font-weight: normal;
transition: all .5s;
position: relative;
}
.login-btn button {
opacity: 0;
position: absolute;
top: 0;
left: 0;
padding: 0;
width: 100% !important;
height: var(--fontSize70);
box-sizing: border-box;
}
.mobile_btn {
width: var(--fontSize594);
height: var(--fontSize70);
background: #E6F0FD;
border-radius: var(--fontSize12);
color: #347BFF;
text-align: center;
line-height: var(--fontSize70);
font-size: var(--fontSize32);
}
.auth_box {
padding: var(--fontSize20) 0;
width: 100%;
}
.phone_login {
width: 100%;
}
.phone_login .title {
font-weight: 600;
font-size: var(--fontSize48);
color: #181A1F;
padding: 4vh 0 2vh;
display: flex;
justify-content: center;
}
.login-form .login_btn {
width: var(--fontSize594);
height: var(--fontSize70);
background-image: linear-gradient(125deg, #65B8F8 0%, #347BFF 100%);
border-radius: var(--fontSize12);
color: #fff;
text-align: center;
line-height: var(--fontSize70);
margin: var(--fontSize94) 0 var(--fontSize40);
}
}
.passwordinput {
display: flex;
align-items: center;
margin-top: 33rpx;
border-bottom: 1rpx solid #E3E3E6;
padding: 24rpx 0;
position: relative;
input {
flex: 1;
color: #323436;
font-size: 28rpx;
}
.placeholder {
color: #CCCED1;
font-size: 28rpx;
}
.sms {
width: 160rpx;
flex-shrink: 0;
color: #5092FF;
font-size: 24rpx;
padding: 0;
text-align: right;
transition: all .25s;
&[disabled]:not([type]) {
color: #CCCED1;
}
}
.error {
position: absolute;
font-size: 24rpx;
color: #F35251;
left: 0;
bottom: -13rpx;
transform: translateY(100%);
}
}
\ No newline at end of file
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="layout {{ loginType == 1?'phone_login_layout':'' }}">
<navigation-bar navStyle="background-color: rgba(0,0,0,0);box-shadow:none;" bindnavbarReady="navbarReady">生意助手员工版</navigation-bar>
<view class="box_content" style="margin-top: {{navBarHeight}}px;">
<!-- 登录区域 -->
<view class="box">
<!-- 微信登录 -->
<block wx:if="{{ loginType == 3 }}">
<view class="wx opacity-view">
<view class="title">您好</view>
<view class="subtitle">欢迎登录生意助手员工版</view>
<image class="img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_box.png" />
</view>
<view class="login-btn {{ loginType == 3?'mini':'' }}">
<button size="default" hidden="{{ loginType != 3 || !agree }}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
<view hidden="{{ loginType !=3 }}" bindtap="checkAgree">授权登录</view>
<!-- <view hidden="{{ loginType !=3 }}" bindtap="checkAgree">微信登录</view> -->
</view>
<type-list loginType="{{loginType}}" />
<!-- <view class="mobile_btn" bindtap="changeLoginType" data-type="1" wx:if="{{ loginType != 1 }}">手机号登录</view> -->
</block>
<!-- 账号登录 -->
<block wx:if="{{ loginType == 2 }}">
<view class="phone_login">
<view class="title">账号登录</view>
<view class="login-form">
<view class="passwordinput">
<input type="text" placeholder="填写账号" placeholder-class="placeholder" bindinput="input" data-name="accountName" value="{{formData.account}}" maxlength="15" />
<input-icon show="{{formData.account}}" bindtap="clear" data-name="account" />
</view>
<view class="passwordinput">
<input type="text" placeholder="填写密码" placeholder-class="placeholder" bindinput="input" data-name="password" value="{{formData.password}}" maxlength="20" password='{{!showPwd}}' />
<input-icon show bindtap="pwdSwitch" type="{{showPwd?'showPwd':'hidePwd'}}" />
<input-icon show="{{formData.password}}" bindtap="clear" data-name="password" />
</view>
<view class="login_btn" bindtap="smsLogin">登录</view>
<type-list loginType="{{loginType}}" />
<!-- <view class="wx_login">
或
<text bindtap="changeLoginType" data-type="3">授权登录</text>
</view> -->
</view>
</view>
</block>
<!-- 手机号登录 -->
<block wx:if="{{ loginType == 1 }}">
<view class="phone_login">
<view class="title">手机号码登录</view>
<view class="login-form">
<view class="input">
<input placeholder="请输入手机号" type="number" placeholder-style="color:#999;" style="width:calc(100% - var(--fontSize50));" bindinput="input" data-name="mobile" value="{{ mobile }}" maxlength="11" />
<view class="clear" hidden="{{ !mobile }}" bindtap="clear" data-name="mobile">
<image src="/images/clear.png" />
</view>
</view>
<view class="input">
<input placeholder="请输入验证码" type="number" placeholder-style="color:#999;" style="width:calc(100% - var(--fontSize176));" bindinput="input" data-name="code" value="{{ code }}" maxlength="4" />
<view class="clear" hidden="{{ !code }}" bindtap="clear" data-name="code">
<image src="/images/clear.png" />
</view>
<view class="sms {{ countDown?'code-disabled':'' }}" bindtap="getSms">
<view wx:if="{{ countDown }}">重新发送({{count}})</view>
<view wx:else>获取验证码</view>
</view>
</view>
<view class="login_btn" bindtap="smsLogin">登录</view>
<type-list loginType="{{loginType}}" />
<!-- <view class="wx_login">
或
<text bindtap="changeLoginType" data-type="3">授权登录</text>
</view> -->
</view>
</view>
<autoLogin-btn></autoLogin-btn>
</block>
<view class="auth_box {{loginType == 3 ? '' : 'lear_bottom'}}">
<!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" />
<!-- 30天免登录 -->
<auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}" wx:if="{{loginType == 3}}"></auth-noLogin>
</view>
</view>
</view>
<!-- -->
</view>
<!-- 未同意协议弹窗提示 -->
<van-dialog use-slot title="隐私协议与用户协议" show="{{ showAuthDialog }}" class="auth-dialog-class" width="var(--fontSize552)" show-cancel-button confirmButtonText="同意" use-title-slot="{{ true }}" confirm-button-color="#5092FF" bind:confirm="agreeEvent" bind:close="onClose">
<view slot="title">
<view class="title_text">隐私协议与用户协议</view>
</view>
<view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《隐私协议》</text>
和
<text catchtap="jump" data-url="agreement">《用户协议》</text>
</view>
</van-dialog>
\ No newline at end of file
......@@ -117,8 +117,8 @@ const domain = {
ip: {
// dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.150:8293',
// dj: 'http://192.168.1.76:8293', //璐琦
dj: 'http:// 192.168.1.150:8293', // 张富康
dj: 'http://192.168.1.76:8293', //璐琦
// dj: 'http:// 192.168.1.150:8293', // 张富康
scrm: 'https://scrm.dev.glsx.com.cn',
merchant: 'http://192.168.1.144:8091'
// dj: 'http://192.168.3.189:8385',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!