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 { .inp-wrap {
margin-left: 32rpx; margin-left: 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,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;
...@@ -60,8 +60,17 @@ ...@@ -60,8 +60,17 @@
width: 184rpx; width: 184rpx;
} }
.van-cell-text {
font-weight: 600;
}
.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 {
...@@ -72,9 +81,11 @@ ...@@ -72,9 +81,11 @@
} }
} }
}
} }
.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> </view>
<input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" /> <input class="inp" placeholder-class="inp-placeholder" model:value="{{prodName}}" maxlength="{{10}}" placeholder="请输入产品名称" />
</view> </view>
<view class="inp-wrap"> <view class="inp-wrap">
<view class="out-van-cell"> <view class="out-van-cell">
<van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore"> <van-cell custom-class="inp-van-cell" value="{{selectStoreValue}}" is-link bind:click="selectStore">
<view slot="title" class="title"> <view slot="title">
<view class="van-cell-text"> <view class="van-cell-text">
合作门店 合作门店
<text class="point">*</text> <text class="point">*</text>
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</view> </view>
</van-cell> </van-cell>
</view> </view>
</view>
</view> </view>
<view> <view>
<van-action-sheet show="{{ storeShow }}" cancel-text="取消" actions="{{ actions }}" list-class="list-sheet-wrap" bind:cancel="onStoreClose" bind:close="onStoreClose" bind:select="onStoreSelect" /> <van-action-sheet show="{{ storeShow }}" cancel-text="取消" actions="{{ actions }}" list-class="list-sheet-wrap" bind:cancel="onStoreClose" bind:close="onStoreClose" bind:select="onStoreSelect" />
......
...@@ -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,37 +125,51 @@ Page({ ...@@ -111,37 +125,51 @@ 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() {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
......
...@@ -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!