Commit 9a68678a by 张立顺

功能开发

1 parent 994fc291
No preview for this file type
// 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 \ 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: 60rpx;
font-size: 24rpx;
color: #999;
letter-spacing: 2rpx;
padding-left: 28rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.tips text {
color: #5092FF;
}
.tips .icon {
position: absolute;
top: 50%;
left: 50%;
width: 28rpx;
height: 28rpx;
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: 80rpx;
height: 80rpx;
position: relative;
z-index: 10;
margin-right: -18rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="layout {{loginType == 1?'phone_login_layout':''}}"> <view class="layout {{ loginType == 1?'phone_login_layout':'' }}">
<navigation-bar navStyle="background-color: rgba(0,0,0,0);box-shadow:none;">生意助手员工版</navigation-bar> <navigation-bar navStyle="background-color: rgba(0,0,0,0);box-shadow:none;">生意助手员工版</navigation-bar>
<view class="box_content"> <view class="box_content">
<!-- 登录区域 --> <!-- 登录区域 -->
<view class="box"> <view class="box">
<!-- 微信登录 --> <!-- 微信登录 -->
<block wx:if="{{loginType == 3}}"> <block wx:if="{{ loginType == 3 }}">
<view class="wx opacity-view"> <view class="wx opacity-view">
<view class="title"> <view class="title">您好</view>
您好 <view class="subtitle">欢迎登录生意助手员工版</view>
</view>
<view class="subtitle">
欢迎登录生意助手员工版
</view>
<image class="img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_box.png" /> <image class="img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/login_box.png" />
</view> </view>
<view class="login-btn {{loginType == 3?'mini':''}}"> <view class="login-btn {{ loginType == 3?'mini':'' }}">
<button <button size="default" hidden="{{ loginType != 3 || !agree }}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" />
size="default" <view hidden="{{ loginType !=3 }}" bindtap="checkAgree">微信登录</view>
hidden="{{loginType != 3 || !agree}}"
open-type="getPhoneNumber"
bindgetphonenumber="getPhoneNumber" />
<view hidden="{{loginType !=3 }}" bindtap="checkAgree">微信登录</view>
</view> </view>
<view <view class="mobile_btn" bindtap="changeLoginType" data-type="1" wx:if="{{ loginType != 1 }}">手机号登录</view>
class="mobile_btn"
bindtap="changeLoginType"
data-type="1"
wx:if="{{loginType != 1}}">手机号登录 </view>
</block> </block>
<!-- 手机号登录 --> <!-- 手机号登录 -->
<block wx:if="{{loginType == 1}}"> <block wx:if="{{ loginType == 1 }}">
<view class="phone_login"> <view class="phone_login">
<view class="title">手机号码登录</view> <view class="title">手机号码登录</view>
<view class='login-form'> <view class="login-form">
<view class='input'> <view class="input">
<input <input
placeholder="请输入手机号" placeholder="请输入手机号"
type="number" type="number"
placeholder-style="color:#999;" placeholder-style="color:#999;"
style="width:calc(100% - 50rpx);" style="width:calc(100% - 50rpx);"
bindinput="input" bindinput="input"
data-name='mobile' data-name="mobile"
value="{{mobile}}" value="{{ mobile }}"
maxlength="11" /> maxlength="11"
<view />
class='clear' <view class="clear" hidden="{{ !mobile }}" bindtap="clear" data-name="mobile">
hidden="{{!mobile}}"
bindtap="clear"
data-name='mobile'>
<image src="/images/clear.png" /> <image src="/images/clear.png" />
</view> </view>
</view> </view>
<view class='input'> <view class="input">
<input <input
placeholder="请输入验证码" placeholder="请输入验证码"
type="number" type="number"
placeholder-style="color:#999;" placeholder-style="color:#999;"
style="width:calc(100% - 100rpx);" style="width:calc(100% - 100rpx);"
bindinput="input" bindinput="input"
data-name='code' data-name="code"
value='{{code}}' value="{{ code }}"
maxlength="4" /> maxlength="4"
<view />
class='clear' <view class="clear" hidden="{{ !code }}" bindtap="clear" data-name="code">
hidden="{{!code}}"
bindtap="clear"
data-name='code'>
<image src="/images/clear.png" /> <image src="/images/clear.png" />
</view> </view>
<view class="sms {{countDown?'code-disabled':''}}" bindtap="getSms"> <view class="sms {{ countDown?'code-disabled':'' }}" bindtap="getSms">
<view wx:if="{{countDown}}">重新发送({{count}})</view> <view wx:if="{{ countDown }}">重新发送({{count}})</view>
<view wx:else>获取验证码</view> <view wx:else>获取验证码</view>
</view> </view>
</view> </view>
<view class="login_btn" bindtap="smsLogin">登录</view> <view class="login_btn" bindtap="smsLogin">登录</view>
<view class="wx_login">或<text bindtap="changeLoginType" data-type="3">微信登录</text></view> <view class="wx_login">
或
<text bindtap="changeLoginType" data-type="3">微信登录</text>
</view>
</view> </view>
</view> </view>
<autoLogin-btn></autoLogin-btn>
</block> </block>
</view> </view>
<!-- 协议 --> <!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{agree}}"/> <auth-setting bind:choose="authChoose" agree="{{ agree }}" />
</view> </view>
<!-- --> <!-- -->
</view> </view>
...@@ -99,8 +85,8 @@ ...@@ -99,8 +85,8 @@
> >
<view class="message-box"> <view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view> <view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《隐私协议》</text>和 <text catchtap="jump" data-url="privacy">《隐私协议》</text>
和
<text catchtap="jump" data-url="agreement">《用户协议》</text> <text catchtap="jump" data-url="agreement">《用户协议》</text>
</view> </view>
</van-dialog> </van-dialog>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!