Commit 3be7d53a by chenwq

申请业务,样式修改

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