16 changed files with 328 additions and 144 deletions
Split View
Diff Options
-
1app.json
-
64components/dialog/index.wxml
-
99pages/client/registe/index.js
-
6pages/client/registe/index.json
-
33pages/client/registe/index.wxml
-
4pages/client/registe/index.wxss
-
2pages/home/index/index.js
-
48pages/process/agent-list/index.js
-
22pages/process/agent-list/index.wxml
-
17pages/process/order-info/index.wxml
-
13pages/process/order-list/index.js
-
6pages/process/order-list/index.wxml
-
60pages/process/payment/index.js
-
47pages/process/payment/index.wxml
-
48pages/process/payment/index.wxss
-
2project.config.json
@ -1,64 +1,34 @@ |
|||
<wxs src="../wxs/utils.wxs" module="utils" /> |
|||
|
|||
<van-popup |
|||
show="{{ show }}" |
|||
z-index="{{ zIndex }}" |
|||
overlay="{{ overlay }}" |
|||
transition="{{ transition }}" |
|||
custom-class="van-dialog {{ className }}" |
|||
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}" |
|||
overlay-style="{{ overlayStyle }}" |
|||
close-on-click-overlay="{{ closeOnClickOverlay }}" |
|||
bind:close="onClickOverlay"> |
|||
<view |
|||
wx:if="{{ title || useTitleSlot }}" |
|||
class="van-dialog__header {{ message || useSlot ? '' : 'van-dialog--isolated' }}" |
|||
> |
|||
<van-popup show="{{ show }}" z-index="{{ zIndex }}" overlay="{{ overlay }}" transition="{{ transition }}" |
|||
custom-class="van-dialog {{ className }}" custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}" |
|||
overlay-style="{{ overlayStyle }}" close-on-click-overlay="{{ closeOnClickOverlay }}" bind:close="onClickOverlay"> |
|||
<view wx:if="{{ title || useTitleSlot }}" |
|||
class="van-dialog__header {{ message || useSlot ? '' : 'van-dialog--isolated' }}"> |
|||
<slot wx:if="{{ useTitleSlot }}" name="title" /> |
|||
<block wx:elif="{{ title }}"> {{ title }}</block> |
|||
</view> |
|||
|
|||
<slot wx:if="{{ useSlot }}" /> |
|||
<view |
|||
wx:elif="{{ message }}" |
|||
<view wx:elif="{{ message }}" |
|||
class="van-dialog__message {{ title ? 'van-dialog__message--has-title' : '' }} {{ messageAlign ? 'van-dialog__message--' + messageAlign : '' }}"> |
|||
<text class="van-dialog__message-text">{{ message }}</text> |
|||
</view> |
|||
|
|||
<view class="van-hairline--top van-dialog__footer"> |
|||
<van-button |
|||
wx:if="{{ showCancelButton }}" |
|||
size="large" |
|||
loading="{{ loading.cancel }}" |
|||
class="van-dialog__button van-hairline--right" |
|||
custom-class="van-dialog__cancel" |
|||
custom-style="color: {{ cancelButtonColor }}" |
|||
bind:click="onCancel"> |
|||
<van-button wx:if="{{ showCancelButton }}" size="large" loading="{{ loading.cancel }}" |
|||
class="van-dialog__button van-hairline--right" custom-class="van-dialog__cancel" |
|||
custom-style="color: {{ cancelButtonColor }}" bind:click="onCancel"> |
|||
{{ cancelButtonText }} |
|||
</van-button> |
|||
<van-button |
|||
wx:if="{{ showConfirmButton }}" |
|||
size="large" |
|||
class="van-dialog__button" |
|||
loading="{{ loading.confirm }}" |
|||
custom-class="van-dialog__confirm" |
|||
custom-style="color: {{ confirmButtonColor }}" |
|||
open-type="{{ confirmButtonOpenType }}" |
|||
lang="{{ lang }}" |
|||
business-id="{{ businessId }}" |
|||
session-from="{{ sessionFrom }}" |
|||
send-message-title="{{ sendMessageTitle }}" |
|||
send-message-path="{{ sendMessagePath }}" |
|||
send-message-img="{{ sendMessageImg }}" |
|||
show-message-card="{{ showMessageCard }}" |
|||
app-parameter="{{ appParameter }}" |
|||
bind:click="onConfirm" |
|||
bindgetuserinfo="bindGetUserInfo" |
|||
bindcontact="bindContact" |
|||
bindgetphonenumber="bindGetPhoneNumber" |
|||
binderror="bindError" |
|||
bindlaunchapp="bindLaunchApp" |
|||
bindopensetting="bindOpenSetting"> |
|||
<van-button wx:if="{{ showConfirmButton }}" size="large" class="van-dialog__button" loading="{{ loading.confirm }}" |
|||
custom-class="van-dialog__confirm" custom-style="color: {{ confirmButtonColor }}" |
|||
open-type="{{ confirmButtonOpenType }}" lang="{{ lang }}" business-id="{{ businessId }}" |
|||
session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" |
|||
send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" |
|||
show-message-card="{{ showMessageCard }}" app-parameter="{{ appParameter }}" bind:click="onConfirm" |
|||
bindgetuserinfo="bindGetUserInfo" bindcontact="bindContact" bindgetphonenumber="bindGetPhoneNumber" |
|||
binderror="bindError" bindlaunchapp="bindLaunchApp" bindopensetting="bindOpenSetting"> |
|||
{{ confirmButtonText }} |
|||
</van-button> |
|||
</view> |
|||
@ -0,0 +1,99 @@ |
|||
// pages/home/password/index.js
|
|||
// 页面已经废弃,因为UEC的修改,暂时不会提供修改密码的功能
|
|||
import { postCaptcha } from "../../../api/user" |
|||
import { getCustomerInfo, bindCustomer } from "../../../api/saas" |
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
Page({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
second: '获取验证码', |
|||
codeEnable: false, |
|||
pwdType: 'password', |
|||
pwd_icon: 'attention', |
|||
form: { |
|||
mobile: null, |
|||
captcha: null |
|||
}, |
|||
loging: false, |
|||
customerInfo: null |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if(options.id){ |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
getCustomerInfo(options.id).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ customerInfo: result.data }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}, |
|||
bindForm: function (e) { |
|||
this.data.form[e.target.id] = e.detail.value |
|||
}, |
|||
changePwd: function (e) { |
|||
if (this.data.pwdType === 'password') { |
|||
this.setData({ pwdType: 'text', pwd_icon: 'attentionforbid' }) |
|||
} else { |
|||
this.setData({ pwdType: 'password', pwd_icon: 'attention' }) |
|||
} |
|||
}, |
|||
fetchCode: function () { |
|||
if (util.isEmpty(this.data.form.mobile)) { |
|||
util.showToast('请输入手机号码') |
|||
return |
|||
} |
|||
if (this.second && this.second.interval) return !1 |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
postCaptcha({ verifiableAccount: this.data.form.mobile, verifiableAccountType: 1, purpose: 1 }).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ codeEnable: true }) |
|||
util.showToast('验证码已经发送') |
|||
this.countDown = this.countDown || this.selectComponent('.count-down') |
|||
this.countDown.reset() |
|||
this.countDown.start() |
|||
}).catch(error => { |
|||
wx.hideLoading() |
|||
util.showToast(error) |
|||
}) |
|||
}, |
|||
onChange: function(e) { |
|||
this.setData({ second: e.detail.seconds + ' 秒 ' }) |
|||
}, |
|||
onFinished: function(){ |
|||
this.setData({ second: '重新获取验证码', codeEnable: false }) |
|||
}, |
|||
submitForm: function () { |
|||
if (this.data.loging || !this.data.customerInfo) { |
|||
return |
|||
} |
|||
if (util.isEmpty(this.data.form.mobile)) { |
|||
util.showToast('请输入客户手机号码') |
|||
return |
|||
} |
|||
if (util.isEmpty(this.data.form.captcha)) { |
|||
util.showToast('请输入验证码') |
|||
return |
|||
} |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
this.setData({ loging: true }) |
|||
this.data.form.factorycustomerId = this.customerInfo.id |
|||
this.data.form.factoryId = app.userInfo.factoryId |
|||
bindCustomer(this.data.form).then(result => { |
|||
util.showBackToast('客户注册成功') |
|||
}).catch(error => { |
|||
wx.hideLoading() |
|||
util.showToast(error) |
|||
this.setData({ loging: false }) |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
@ -0,0 +1,6 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-button": "/components/button/index", |
|||
"van-count-down": "/components/count-down/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
<!--pages/home/password/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content" style="color:black;font-size:18px">用户注册</view> |
|||
</cu-custom> |
|||
|
|||
<view class="flex flex-center flex-column" style="width:100%;height:320rpx;margin-top:80rpx"> |
|||
<image style="width:192rpx;height:192rpx" src="/assets/image/ygImg.png"></image> |
|||
<view class="text-xl" wx:if="{{customerInfo}}">{{customerInfo.name}}</view> |
|||
</view> |
|||
|
|||
<view class="cu-list menu no-card sm-border margin-top"> |
|||
<view class="cu-item"> |
|||
<view class="flex content cu-item" style="font-size:28rpx"> |
|||
<view style="min-width:170rpx">手机号:</view> |
|||
<input id="mobile" maxlength="11" disabled="true" type="number" value="{{form.mobile}}" placeholder="请输入客户手机号码" bindinput="bindForm"></input> |
|||
</view> |
|||
</view> |
|||
<view class="cu-item"> |
|||
<view class="flex content cu-item" style="font-size:28rpx"> |
|||
<view style="min-width:170rpx">验证码:</view> |
|||
<input id="captcha" maxlength="6" type="number" placeholder="请输入验证码" bindinput="bindForm"></input> |
|||
</view> |
|||
<van-button size="small" plain type="info" custom-style="width:220rpx" disabled="{{codeEnable}}" bind:click="fetchCode"> |
|||
<van-count-down id="count-down" time="{{ 60000 }}" use-slot auto-start="{{false}}" bind:change="onChange" bind:finish="onFinished"> |
|||
<text class="text-sm">{{second}}</text> |
|||
</van-count-down> |
|||
</van-button> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="flex flex-direction" style="padding:80rpx 32rpx"> |
|||
<van-button block type="info" loading="{{loging}}" loading-text="提交..." bind:click="submitForm">提交</van-button> |
|||
</view> |
|||
@ -0,0 +1,4 @@ |
|||
/* pages/home/password/index.wxss */ |
|||
page { |
|||
background-color: #fff; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save