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

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

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

Loading…
Cancel
Save