Commit f4fc468628bce8edc6bf6fd82f40ca31d9f930b1

Authored by pengye
1 parent 4df71046

邀请函加入驻功能

Showing 29 changed files with 498 additions and 42 deletions
// pages/customer/collectSeller.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
backFun() {
wx.navigateBack(1)
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
... ...
/* pages/customer/collectSeller.wxss */
.main {
display: flex;
flex-direction: column;
align-items: center;
}
.imgs {
margin: 120rpx 0 20rpx 0;
border: 4rpx solid #0143a3;
border-radius: 50%;
width: 140rpx;
height: 140rpx;
display: flex;
align-items: center;
justify-content: center;
}
.imgs image {
width: 102rpx;
height: 70rpx;
}
.texts {
display: flex;
flex-direction: column;
margin: 0 40rpx;
color: #000000;
font-family: PingFang SC;
font-size: 32rpx;
}
.btnBox {
width: 100%;
margin-top: 120rpx;
background: #FAFAFA;
padding: 24rpx 0 50rpx 0;
}
.btn {
width: 75%;
color: #fff;
font-size: 32rpx;
border-radius: 40rpx;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
\ No newline at end of file
... ...
... ... @@ -147,10 +147,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -51,7 +51,7 @@
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
... ... @@ -187,8 +187,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
... ...
... ... @@ -733,4 +733,14 @@
.pearlWhite .positioning {
background: #FBF6F1;
color: #515151;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -148,10 +148,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -52,7 +52,7 @@
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
... ... @@ -195,8 +195,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
... ...
... ... @@ -766,4 +766,14 @@
.pearlWhite .positioning {
background: #515151;
color: #FBF6F1;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -148,10 +148,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -39,8 +39,8 @@
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="cli">复制微信号</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
</block>
... ... @@ -172,8 +172,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
... ...
... ... @@ -707,4 +707,14 @@
.pearlWhite .rubric {
color: #0143A3;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -147,10 +147,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -33,8 +33,8 @@
<view class="font28r">服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="cli">复制微信号</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
</block>
... ... @@ -167,8 +167,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
... ...
... ... @@ -704,4 +704,14 @@
.pearlWhite .brownFont {
color: #515151;
border: 2rpx solid #515151;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -140,12 +140,20 @@ Page({
console.log('无微信号')
}
},
call() {
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
})
},
// 拨打电话
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
looklocation: function () {
wx.reportMonitor('1015', 1)
wx.openLocation({
... ...
... ... @@ -50,8 +50,8 @@
<view class="font28r">服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="cli">复制微信号</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
</block>
... ... @@ -246,8 +246,8 @@
点击了解更多会员优惠政策
</view>
<image wx:if="{{marketing && marketing.logo && (!marketing.is_logo || marketing.is_logo!='0')}}" src="{{marketing.logo?marketing.logo:''}}" mode="aspectFill" />
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="more" wx:if="{{showMoreTip}}">
... ...
... ... @@ -754,4 +754,14 @@
.pearlWhite .title,
.pearlWhite .info {
color: #515151;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -147,10 +147,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -46,7 +46,7 @@
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
... ... @@ -189,8 +189,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="{{(!marketing || (marketing.is_transpond!='1' && marketing.is_online_book!='1'))?'more more1':'more'}}" wx:if="{{showMoreTip}}">
... ...
... ... @@ -721,4 +721,14 @@
.pearlWhite .positioning {
background: #F8F9FD;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
... ... @@ -147,10 +147,17 @@ Page({
}
},
// 拨打电话
call() {
call(e) {
const phone = e.currentTarget.dataset['phone'];
wx.reportMonitor('1012', 1)
wx.makePhoneCall({
phoneNumber: this.data.staffinfo.phone
phoneNumber: phone
})
},
// 跳转到商家入驻页
gotoJoinSeller() {
wx.navigateTo({
url: '/pages/customer/joinSeller',
})
},
// 导航
... ...
... ... @@ -33,7 +33,7 @@
<view>服务电话:{{staffinfo.phone}}</view>
</view>
<view class="handle">
<view wx:if="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.phone}}" data-phone="{{staffinfo.phone}}" class="font22r brownFont" bindtap="call">拨打电话</view>
<view wx:if="{{staffinfo.wechat}}" class="font22r brownFont" bindtap="copyWeChat">复制微信号</view>
</view>
</view>
... ... @@ -176,8 +176,8 @@
<view wx:if="{{marketing.is_link=='1'}}" class="font24r favouredPolicy" bindtap="gotoFavourableList">
点击了解更多会员优惠政策
</view>
<text style="color: #999; font-size: 26rpx;font-family: PingFang SC;">
周到安排提供技术支持 400 000 9690
<text class="businessBox">
周到安排提供技术支持<text bindtap="call" data-phone="4000009690">4000009690</text>,餐厅入驻请点击<text bindtap="gotoJoinSeller" style="text-decoration: underline;">这里</text>
</text>
</view>
<view class="{{(!marketing || (marketing.is_transpond!='1' && marketing.is_online_book!='1'))?'more more1':'more'}}" wx:if="{{showMoreTip}}">
... ...
... ... @@ -740,4 +740,14 @@
.pearlWhite .positioning {
background: #F8F9FD;
}
.businessBox {
color: #515151;
font-size: 24rpx;
font-family: PingFang SC;
}
.businessBox text {
color: #0143A3;
}
\ No newline at end of file
... ...
// pages/customer/joinSeller.js
var util = require('../../utils/util.js')
import App from '../../utils/api';
Page({
/**
* 页面的初始数据
*/
data: {
sellername: '',
phone: '',
rname: '',
map_address: '',
pro_code: '',
dis_code: '',
pro_code: '',
long: '',
lat: '',
region: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
submitInfo() {
let sellername = this.data.sellername.trim();
let phone = this.data.phone.trim();
let rname = this.data.rname.trim();
this.setData({
sellername,
phone,
rname,
})
if (!sellername) {
return util.toast('请输入店铺名称', 'none')
}
if (!this.data.map_address) {
return util.toast('请输入店铺地址', 'none')
}
if (!this.data.phone) {
return util.toast('请输入您的电话号码', 'none')
}
var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!myreg.test(phone)) {
return util.toast('手机格式不正确', 'none')
}
if (!this.data.rname) {
return util.toast('请输入您的姓名', 'none')
}
if (!this.data.pro_code || !this.data.city_code || !this.data.dis_code) {
return util.toast('请选择城市', 'none')
}
let obj = {
sellername,
phone,
rname,
map_address: this.data.map_address,
long: this.data.long,
lat: this.data.lat,
pro_code: this.data.pro_code,
city_code: this.data.city_code,
dis_code: this.data.dis_code,
}
console.log('提交信息', {
...obj
});
App.SellerVersion.SetSellerCollect({
...obj,
openid: getApp().openid,
}).then(res => {
if (res.ret != 200) {
return util.toast(res.msg, 'none')
}
wx.redirectTo({
url: '/pages/customer/collectSeller',
})
})
},
bindRegionChange(e) {
if (e.detail.value) {
this.setData({
region: e.detail.value,
pro_code: e.detail.code[0],
city_code: e.detail.code[1],
dis_code: e.detail.code[2],
})
}
},
// 选择地址
chooselocation: function () {
var that = this;
wx.chooseLocation({
success: function (res) {
console.log('选址信息', res);
that.setData({
map_address: res.address,
long: res.longitude,
lat: res.latitude,
})
},
fail: function (res) {
console.log(res)
wx.showModal({
title: '位置授权',
content: '您的位置信息需授权给一键订商户用于位置的展示',
confirmColor: '#199095',
cancelColor: '#999999',
success: function (res) {
console.log(res)
if (res.confirm) {
util.setting();
}
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "",
"usingComponents": {
"nav": "/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pages/customer/joinSeller.wxml-->
<nav class="navhome" place="{{true}}">店铺信息</nav>
<view class="main">
<view class="topBox">在开始之前,请告诉我们关于您的一些信息,以方便专属客服给您提供周到的服务。</view>
<view class="items">
<view class="left">店铺名称:</view>
<input type="text" class="right" model:value="{{sellername}}" placeholder="点击输入店铺名称" />
</view>
<view class="items">
<view class="left">店铺地址:</view>
<view type="text" value="{{map_address}}" class="infoInput {{map_address=='' ? 'gray-font' : 'black-font'}} smooth" bindtap="chooselocation" name="map_address" placeholder="点击设置您的地址">{{map_address==''?'点这里,选择店铺地图位置' : map_address}}</view>
</view>
<view class="items">
<view class="left">联系电话:</view>
<input type="text" class="right" maxlength="11" model:value="{{phone}}" placeholder="点击输入您的电话号码" />
</view>
<view class="items">
<view class="left">联系人:</view>
<input class="right" type="text" model:value="{{rname}}" placeholder="点击输入您的姓名" />
</view>
<view class="items">
<view class="left">城市选择:</view>
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" style="flex:1;">
<view class="picker {{region.length>0 ? 'black-font' : 'gray-font'}}"> {{region.length>0?region[0]+region[1]+region[2]:'请选择城市'}}</view>
</picker>
</view>
<view class="btnBox">
<button class="btn" bindtap="submitInfo">提交</button>
</view>
</view>
\ No newline at end of file
... ...
/* pages/customer/joinSeller.wxss */
.topBox {
margin: 40rpx 80rpx 40rpx 40rpx;
color: #000000;
font-family: PingFang SC;
font-size: 32rpx;
}
.items {
display: flex;
justify-content: space-between;
margin-left: 32rpx;
border-bottom: 2rpx solid #E7E7E7;
padding: 24rpx 32rpx 24rpx 0;
}
.left {
min-width: 150rpx;
}
.right {
flex: 1;
text-align: right;
}
.infoInput {
height: auto;
text-align: right;
}
input::-webkit-input-placeholder {
color: #909399;
}
.gray-font {
color: #909399;
}
.btnBox {
width: 100%;
margin-top: 120rpx;
background: #FAFAFA;
padding: 24rpx 0 50rpx 0;
}
.btn {
width: 75%;
color: #fff;
font-size: 32rpx;
border-radius: 40rpx;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
.picker {
text-align: right;
}
\ No newline at end of file
... ...
... ... @@ -720,5 +720,10 @@ export default {
'App.Qiniu.GetUploadToken':{
openid:'openid'
},
// 收集店铺信息
'App.SellerVersion.SetSellerCollect':{
openid:'openid'
},
}
\ No newline at end of file
... ...