Commit 3be7d53a by chenwq

申请业务,样式修改

1 parent d4888a55
......@@ -10,7 +10,7 @@
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 500;
font-weight: 600;
font-size: 14px;
color: #323436;
......
......@@ -18,11 +18,11 @@
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" maxlength="{{50}}" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
<input class="inp" placeholder-class="inp-placeholder" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" maxlength="{{11}}" placeholder="请输入手机号" />
</view>
<view class="scene-title" hover-class="none" hover-stop-propagation="false">业务场景</view>
<view class="content-product">
......
......@@ -22,7 +22,7 @@ Component({
computed: {
selectStoreValue(data) {
return data.selectStoreItem.name || '请输入合作门店'
return data.selectStoreItem.name || '请选择合作门店'
}
},
......
......@@ -3,5 +3,6 @@
"usingComponents": {
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-cell": "@vant/weapp/cell/index"
}
},
"styleIsolation": "shared"
}
\ No newline at end of file
/* packagesList/apply/components/ApplyProduct/ApplyProduct.wxss */
.apply-product {
.inp-wrap {
margin-left: 32rpx;
display: flex;
align-items: center;
height: 112rpx;
border-bottom: 1px solid #f3f3f3;
.title {
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 600;
font-size: 14px;
color: #323436;
.inp-wrap {
margin-left: 32rpx;
display: flex;
align-items: center;
height: 112rpx;
border-bottom: 1px solid #f3f3f3;
.title {
margin-right: 64rpx;
// margin-top: 8px;
// margin-bottom: 8px;
font-weight: 500;
font-size: 14px;
color: #323436;
.point {
color: #f35251;
.point {
color: #f35251;
}
}
}
.inp {
flex: 1;
height: 112rpx;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp {
flex: 1;
height: 112rpx;
// padding: 7px 12px;
// border: 1px solid #E3E4E8;
// border-radius: 2px;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8a8c90;
}
.inp-placeholder {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #8a8c90;
}
.out-van-cell {
flex: 1;
.out-van-cell {
flex: 1;
.inp-van-cell {
&.van-cell {
height: 112rpx;
line-height: 112rpx;
padding: 0;
flex: 1;
.inp-van-cell {
&.van-cell {
height: 112rpx;
line-height: 112rpx;
padding: 0;
flex: 1;
.point {
color: #f35251;
}
.point {
color: #f35251;
// line-height: 1;
}
// line-height: 1;
}
&:after {
display: none;
}
&:after {
display: none;
}
.van-cell__title {
flex: none;
width: 184rpx;
}
.van-cell__title {
flex: none;
width: 184rpx;
}
.van-cell-text {
font-weight: 600;
}
.van-cell__value {
text-align: left;
}
.van-cell__value {
text-align: left;
font-family: UICTFontTextStyleBody;
min-height: 1.4rem;
overflow: hidden;
text-overflow: clip;
white-space: nowrap;
}
.van-cell__right-icon-wrap {
margin-right: 32rpx;
height: 112rpx;
line-height: 112rpx;
.van-cell__right-icon-wrap {
margin-right: 32rpx;
height: 112rpx;
line-height: 112rpx;
}
}
}
}
}
.list-sheet-wrap{
.list-sheet-wrap {
max-height: 60vh;
overflow-y: auto;
}
\ No newline at end of file
<!--packagesList/apply/components/ApplyProduct/ApplyProduct.wxml-->
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
<view class="apply-product">
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<view class="inp-wrap">
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title" class="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
<view class="inp-wrap">
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
</view>
</view>
</view>
</van-cell>
</van-cell>
</view>
</view>
</view>
<view>
......
......@@ -45,6 +45,13 @@ page {
}
}
}
.btn-box {
position: fixed;
bottom: 64rpx;
left: 0;
width: 100%;
background-color: #FFFFFF;
}
.btn {
margin: 64rpx auto 0;
width: 648rpx;
......
......@@ -19,6 +19,9 @@
<apply-product id="apply-product" wx:if="{{tabActive == 2}}"></apply-product>
</view>
</view>
<button class="btn" bindtap="{{tabActive == 1 ? 'applyBusiness' : 'applyProduct'}}">{{ tabActive == 1 ? '提交开店信息' : '申请合作产品'}}</button>
<button wx:if="{{tabActive == 1}}" class="btn" bindtap="applyBusiness">提交开店信息</button>
<view wx:if="{{tabActive == 2}}" class="isFullSucreen btn-box" bindtap="applyProduct">
<button class="btn">申请合作</button>
</view>
<!-- <button class="btn" bindtap="applyFn">申请合作产品</button> -->
</view>
\ No newline at end of file
// pages/apply/apply.js
const navStyle = 'background-color: transparent;'
import { IMG_URL } from '~/utils/constantData.js'
import {addCoProductApi} from '~/api/applyProd.js'
import {getMerchantListApi,addCoProductApi} from '~/api/applyProd.js'
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
import utils from '~/utils/util.js'
Page({
/**
* 页面的初始数据
......@@ -13,7 +12,9 @@ Page({
data: {
IMG_URL,
// navStyle,
prodName:'',
cooperativeStore:'',
storeShow: false,
actions: [
// {
// "merchantId": 0,
......@@ -24,6 +25,13 @@ Page({
// "merchantName": "选项2"
// },
],
selectStoreItem:{},
scene:'' //场景值
},
computed: {
selectStoreValue(data) {
return data.selectStoreItem.name || '请输入合作门店'
}
},
// navbar高度设置
navbarReady(e) {
......@@ -33,6 +41,19 @@ Page({
// headerHeight: height / 2 + statusBarHeight + 88*2
})
},
// 选择门店
selectStore(){
this.setData({ storeShow: true });
},
onStoreClose() {
this.setData({ storeShow: false });
},
onStoreSelect(event) {
console.log(event.detail);
let selectStoreItem = event.detail
this.setData({ selectStoreItem})
this.onStoreClose()
},
// 提交信息
applyFn() {
......@@ -51,7 +72,6 @@ Page({
})
return
}
this.submitForm()
// console.log(123)
},
......@@ -64,7 +84,6 @@ Page({
serviceMerchantName:userInfo.merchantName,
coProduct:prodName
}
let {code} = await addCoProductApi(params)
// console.log('res: ', res);
if(code == 0){
......@@ -76,10 +95,6 @@ Page({
})
}, 1000)
}
// // return wx.$api.showToast('申请成功')
// applyApi
// .merchantApply(params)
......@@ -97,7 +112,6 @@ Page({
// })
// .catch(err => {})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -111,39 +125,53 @@ Page({
})
this.getMerchantListFn()
},
//获取门店
async getMerchantListFn(){
let {scene} = this.data
let userInfo = wx.$storage.get('userInfo')
let params = {
// scene,
serviceMerchantId:userInfo.merchantId
}
let {code,data} = await getMerchantListApi(params)
if(code== 0 && data.length != 0){
data = data.map(item=>{
item.name = item.merchantName
return item
} )
// console.log('data: ', data);
this.setData({
actions:data
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
})
\ No newline at end of file
......@@ -11,6 +11,30 @@
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">申请合作</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
您的产品名称
<text class="point">*</text>
</view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view>
<view class="inp-wrap">
<!-- <view class="title" hover-class="none" hover-stop-propagation="false">
合作门店
<text class="point">*</text>
</view> -->
<!-- <input class="inp" placeholder-class="inp-placeholder" model:value="{{cooperativeStore}}" maxlength="{{30}}" placeholder="营业执照上的公司名称" /> -->
<view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title">
<view class="van-cell-text">
合作门店
<text class="point">*</text>
</view>
</view>
</van-cell>
</view>
</view>
</view>
</view>
<button class="btn" bindtap="applyFn">申请合作产品</button>
......
......@@ -10,5 +10,5 @@
<view class="name">转发</view>
</button>
</view>
<view class="apply" bindtap="apply">合作申请</view>
<view class="apply" bindtap="apply">申请合作</view>
</view>
\ 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!