刘翔宇-旅管家 3 years ago
parent 92b4caa53d
commit 73c1ac919e

BIN
.DS_Store vendored

Binary file not shown.

@ -112,31 +112,55 @@
<view class="buyBtn" @click="toBuy"></view>
</view>
<u-popup v-model="showPop" mode="bottom" closeable="true">
<view class="buyBox">
<view class="title">请输入您的联系方式</view>
<view class="formCol">
<view>宝妈姓名<text style="color:red">*</text></view>
<view class="formRight"><input type="text" v-model="form.member_name" placeholder="宝妈姓名"></view>
</view>
<view class="formCol">
<view>手机号码<text style="color:red">*</text></view>
<view class="formRight"><input type="text" v-model="form.phone" placeholder="请输入手机号码"></view>
</view>
<view class="formCol">
<view>宝宝生日/预产期<text style="color:red">*</text></view>
<view class="formRight">
<picker mode="date" :value="form.due_date" @change="bindDateChange">
<view class="uni-input">{{form.due_date}}</view>
</picker>
<scroll-view scroll-y="true" style="height: 700rpx;padding-bottom: 40rpx;">
<view class="formCol">
<view>宝妈姓名<text style="color:red">*</text></view>
<view class="formRight"><input type="text" v-model="form.member_name" placeholder="宝妈姓名"></view>
</view>
<view class="formCol">
<view>手机号码<text style="color:red">*</text></view>
<view class="formRight"><input type="text" v-model="form.phone" placeholder="请输入手机号码"></view>
</view>
<view class="formCol">
<view>宝宝生日/预产期<text style="color:red">*</text></view>
<view class="formRight">
<picker mode="date" :value="form.due_date" @change="bindDateChange">
<view class="uni-input">{{form.due_date}}</view>
</picker>
</view>
</view>
<view class="formCol">
<view>所属区域<text style="color:red">*</text></view>
<view class="formRight">
<picker :value="rindex" @change="bindRegionChange" :range="arrRegion">
<view class="uni-input">{{arrRegion[rindex]}}</view>
</picker>
<input type="text" v-if="rindex!=0" v-model="info.address" style="margin-top: 10rpx;"
placeholder="请输入具体街道/地址">
</view>
</view>
<view class="formCol">
<view>建卡医院</view>
<view class="formRight">
<picker :value="hindex" @change="bindHospitalChange" :range="arrHospital">
<view class="uni-input">{{arrHospital[hindex]}}</view>
</picker>
<input type="text" v-if="arrHospital[hindex]==''" v-model="info.hospital"
style="margin-top: 10rpx;" placeholder="请输入具体建卡医院">
</view>
</view>
</view>
<view class="formCol">
<view>备注信息</view>
<view class="formRight">
<u-input v-model="form.member_comment" border="true" type="textarea" placeholder="备注信息" />
<view class="formCol">
<view>备注信息</view>
<view class="formRight">
<u-input v-model="form.member_comment" border="true" type="textarea" placeholder="备注信息" />
</view>
</view>
</view>
</scroll-view>
<view class="payBtn" @click="toBuy"></view>
</view>
</u-popup>
@ -202,8 +226,17 @@
phone: '',
member_name: "",
member_comment: "",
promotion: ""
promotion: "",
region: '',
address: '',
hospital: ''
},
arrHospital: ["请选择建卡医院", "市立医院", "苏大附一院", "苏大附二院", "中医院", "第五人民医院", "苏州市第七人民医院", "明基医院", "九龙医院", "娄葑医院",
"吴中人民医院", "甪直人民医院", "相城人民医院", "相城区第二人民医院", "吴江第一人民医院", "吴江第二人民医院", "盛泽医院", "其他"
],
arrRegion: ["请选择区域", "吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"],
rindex: 0,
hindex: 0,
openid: "",
showPop: false,
@ -267,6 +300,16 @@
},
methods: {
bindRegionChange: function(e) {
this.rindex = e.target.value;
this.form.region = this.arrRegion[e.target.value];
},
bindHospitalChange: function(e) {
this.hindex = e.target.value;
if (this.arrHospital[e.target.value] != '其他') {
this.form.hospital = this.arrHospital[e.target.value];
}
},
getUserProfile() {
var that = this;
weixin.getUserProfile((res) => {
@ -275,8 +318,8 @@
api: '/api/member/update-wechat-info',
method: 'POST',
data: {
nickname: res.nickName,
avatar:res.avatarUrl
nickname: res.nickName,
avatar: res.avatarUrl
},
utilSuccess: function(r) {
console.log(r)
@ -524,7 +567,7 @@
toBuy() {
let user_info = weixin.getUserInfoCache();
if (weixin.isNull(user_info.user_info.wechat_nickname)||weixin.isNull(user_info.user_info.avatar)) {
if (weixin.isNull(user_info.user_info.wechat_nickname) || weixin.isNull(user_info.user_info.avatar)) {
this.showUser = true;
return false;
//this.getUserProfile();

@ -5,7 +5,7 @@
"pages": [{
"path": "pages/home/home",
"style": {
"navigationBarTitleText": "优孕课堂",
"navigationBarTitleText": "孕育邦",
"navigationBarBackgroundColor": "#FF578A",
"navigationBarTextStyle": "white"
@ -14,7 +14,7 @@
{
"path": "pages/active/active",
"style": {
"navigationBarTitleText": "优孕课堂",
"navigationBarTitleText": "孕育邦",
"navigationBarBackgroundColor": "#FF578A",
"navigationBarTextStyle": "white"
@ -318,7 +318,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "优孕课堂",
"navigationBarTitleText": "孕育邦",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},

@ -129,17 +129,13 @@
},
onShareAppMessage() {
var url = 'pages/home';
return {
title: "孕育帮",
path: url
title: "孕育邦"
}
},
onShareTimeline() {
var url = 'pages/home';
return {
title: "孕育帮",
path: url,
title: "孕育邦"
}
},
onReachBottom() {

Loading…
Cancel
Save