Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 04600f3c
authored
Oct 16, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:申请增加条件判断
1 parent
0969cbe6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
64 deletions
api/apply.js
pages/apply/apply.js
pages/apply/apply.wxml
api/apply.js
0 → 100644
View file @
04600f3
File mode changed
pages/apply/apply.js
View file @
04600f3
// pages/apply/apply.js
// pages/apply/apply.js
const
navStyle
=
'background-color: transparent;'
const
navStyle
=
"background-color: transparent;"
;
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
{
IMG_URL
}
from
"~/utils/constantData.js"
;
// `${IMG_URL}index/car2.png`,
// `${IMG_URL}index/car2.png`,
//本地图片路径
//本地图片路径
let
IMG_URLLocal
=
'../../images/'
let
IMG_URLLocal
=
"../../images/"
;
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
navStyle
,
navStyle
,
IMG_URL
,
IMG_URL
,
carObj
:{
carObj
:
{
name
:
'kafdkf'
,
name
:
"kafdkf"
,
model
:
'dfdsf3443'
,
model
:
"dfdsf3443"
,
selNum
:
132
,
selNum
:
132
,
contact
:
''
,
contact
:
""
,
phone
:
''
,
phone
:
""
,
}
}
,
},
},
// navbar高度设置
// navbar高度设置
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
let
{
height
,
statusBarHeight
}
=
e
.
detail
;
this
.
setData
({
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
,
tabBarStyle
:
height
/
2
+
statusBarHeight
,
// headerHeight: height / 2 + statusBarHeight + 88*2
// headerHeight: height / 2 + statusBarHeight + 88*2
})
});
// console.log(e)
// console.log(this.data.headerHeight)
},
},
// 提交信息
// 提交信息
applyFn
(){
applyFn
()
{
console
.
log
(
123
)
let
{
name
}
=
this
.
data
.
carObj
;
console
.
log
(
"name: "
,
name
);
if
(
!
name
)
{
wx
.
pro
.
showToast
({
title
:
"请输入店名"
,
icon
:
"error"
,
});
return
;
}
console
.
log
(
123
);
},
bindinputFn
(
e
)
{
// console.log("e: ", e);
let
name
=
e
.
currentTarget
.
dataset
.
name
;
let
content
=
e
.
detail
.
value
;
this
.
setData
({
[
`carObj.
${
name
}
`
]:
content
})
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{},
onRoute
(
params
)
{
},
console
.
log
(
"params: "
,
params
);
onRoute
(
params
){
console
.
log
(
'params: '
,
params
);
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
onReady
()
{},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
onHide
()
{},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
onUnload
()
{},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
onPullDownRefresh
()
{},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
onReachBottom
()
{},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
onShareAppMessage
()
{},
});
pages/apply/apply.wxml
View file @
04600f3
<!-- pages/apply/apply.wxml -->
<!-- pages/apply/apply.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">申请业务</navigation-bar>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务
</navigation-bar>
<view class="apply">
<view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" />
...
@@ -13,34 +15,24 @@
...
@@ -13,34 +15,24 @@
开店名称
开店名称
<text class="point">*</text>
<text class="point">*</text>
</view>
</view>
<input class="inp" value="{{carObj.name
}}" placeholder="请输入30个字符以内" />
<input class="inp" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30
}}" placeholder="请输入30个字符以内" />
</view>
</view>
<view class="inp-wrap">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
店面车型
<input class="inp" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<input class="inp" value="{{carObj.model}}" placeholder="请输入30个字符以内" />
</view>
</view>
<view class="inp-wrap">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
店面新车销量/基盘客户
<input class="inp" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<input class="inp" value="{{carObj.selNum}}" placeholder="请输入30个字符以内" />
</view>
</view>
<view class="inp-wrap">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
门店联系人
<input class="inp" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<input class="inp" value="{{carObj.contact}}" placeholder="请输入联系人" />
</view>
</view>
<view class="inp-wrap">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
联系人手机号
<input class="inp" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
<input class="inp" value="{{carObj.phone}}" placeholder="请输入手机号" />
</view>
</view>
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment