Browse Source

修改样式 删除citypicker

306132416@qq.com 4 years ago
parent
commit
2ecb612f63

+ 1 - 1
components/foot-tabs/footTabs.vue

@@ -25,7 +25,7 @@
   border-radius: 100rpx;
   position: fixed;
   left: 50%;
-  top: 88%;
+  top: 90%;
   transform: translateX(-50%);
   box-shadow: rgba(100, 100, 111, 0.2) 0rpx 7rpx 29rpx 0rpx;
   background-color: #fff;

File diff suppressed because it is too large
+ 0 - 12542
components/mpvue-citypicker/city-data/area.js


File diff suppressed because it is too large
+ 0 - 1503
components/mpvue-citypicker/city-data/city.js


+ 0 - 139
components/mpvue-citypicker/city-data/province.js

@@ -1,139 +0,0 @@
-/* eslint-disable */
-var provinceData = [{
-    "label": "北京市",
-    "value": "11"
-  },
-  {
-    "label": "天津市",
-    "value": "12"
-  },
-  {
-    "label": "河北省",
-    "value": "13"
-  },
-  {
-    "label": "山西省",
-    "value": "14"
-  },
-  {
-    "label": "内蒙古自治区",
-    "value": "15"
-  },
-  {
-    "label": "辽宁省",
-    "value": "21"
-  },
-  {
-    "label": "吉林省",
-    "value": "22"
-  },
-  {
-    "label": "黑龙江省",
-    "value": "23"
-  },
-  {
-    "label": "上海市",
-    "value": "31"
-  },
-  {
-    "label": "江苏省",
-    "value": "32"
-  },
-  {
-    "label": "浙江省",
-    "value": "33"
-  },
-  {
-    "label": "安徽省",
-    "value": "34"
-  },
-  {
-    "label": "福建省",
-    "value": "35"
-  },
-  {
-    "label": "江西省",
-    "value": "36"
-  },
-  {
-    "label": "山东省",
-    "value": "37"
-  },
-  {
-    "label": "河南省",
-    "value": "41"
-  },
-  {
-    "label": "湖北省",
-    "value": "42"
-  },
-  {
-    "label": "湖南省",
-    "value": "43"
-  },
-  {
-    "label": "广东省",
-    "value": "44"
-  },
-  {
-    "label": "广西壮族自治区",
-    "value": "45"
-  },
-  {
-    "label": "海南省",
-    "value": "46"
-  },
-  {
-    "label": "重庆市",
-    "value": "50"
-  },
-  {
-    "label": "四川省",
-    "value": "51"
-  },
-  {
-    "label": "贵州省",
-    "value": "52"
-  },
-  {
-    "label": "云南省",
-    "value": "53"
-  },
-  {
-    "label": "西藏自治区",
-    "value": "54"
-  },
-  {
-    "label": "陕西省",
-    "value": "61"
-  },
-  {
-    "label": "甘肃省",
-    "value": "62"
-  },
-  {
-    "label": "青海省",
-    "value": "63"
-  },
-  {
-    "label": "宁夏回族自治区",
-    "value": "64"
-  },
-  {
-    "label": "新疆维吾尔自治区",
-    "value": "65"
-  },
-  {
-    "label": "台湾",
-    "value": "66"
-  },
-  {
-    "label": "香港",
-    "value": "67"
-  },
-  {
-    "label": "澳门",
-    "value": "68"
-  }
-]
-export default provinceData;

+ 0 - 210
components/mpvue-citypicker/mpvueCityPicker.vue

@@ -1,210 +0,0 @@
-<template>
-  <div class="mpvue-picker">
-    <div :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></div>
-    <div class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}">
-      <div class="mpvue-picker__hd" catchtouchmove="true">
-        <div class="mpvue-picker__action" @click="pickerCancel">取消</div>
-        <div class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">确定</div>
-      </div>
-      <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange">
-        <block>
-          <picker-view-column>
-            <div class="picker-item" v-for="(item,index) in provinceDataList" :key="index">{{item.label}}</div>
-          </picker-view-column>
-          <picker-view-column>
-            <div class="picker-item" v-for="(item,index) in cityDataList" :key="index">{{item.label}}</div>
-          </picker-view-column>
-          <picker-view-column>
-            <div class="picker-item" v-for="(item,index) in areaDataList" :key="index">{{item.label}}</div>
-          </picker-view-column>
-        </block>
-      </picker-view>
-    </div>
-  </div>
-</template>
-
-<script>
-import provinceData from './city-data/province.js';
-import cityData from './city-data/city.js';
-import areaData from './city-data/area.js';
-export default {
-  data() {
-    return {
-      pickerValue: [0, 0, 0],
-      provinceDataList: [],
-      cityDataList: [],
-      areaDataList: [],
-			/* 是否显示控件 */
-			showPicker: false,
-    };
-  },
-  created() {
-    this.init()
-  },
-  props: {
-    /* 默认值 */
-    pickerValueDefault: {
-      type: Array,
-      default(){
-				return [0, 0, 0]
-			}
-    },
-    /* 主题色 */
-    themeColor: String
-  },
-	watch:{
-		pickerValueDefault(){
-			this.init();
-		}
-	},
-  methods: {
-		init() {
-			this.handPickValueDefault(); // 对 pickerValueDefault 做兼容处理
-			this.provinceDataList = provinceData;
-			this.cityDataList = cityData[this.pickerValueDefault[0]];
-			this.areaDataList = areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]];
-			this.pickerValue = this.pickerValueDefault;
-		},
-    show() {
-      setTimeout(() => {
-        this.showPicker = true;
-      }, 0);
-    },
-    maskClick() {
-      this.pickerCancel();
-    },
-    pickerCancel() {
-      this.showPicker = false;
-      this._$emit('onCancel');
-    },
-    pickerConfirm(e) {
-      this.showPicker = false;
-      this._$emit('onConfirm');
-    },
-    showPickerView() {
-      this.showPicker = true;
-    },
-    handPickValueDefault() {
-      if (this.pickerValueDefault !== [0, 0, 0]) {
-        if (this.pickerValueDefault[0] > provinceData.length - 1) {
-          this.pickerValueDefault[0] = provinceData.length - 1;
-        }
-        if (this.pickerValueDefault[1] > cityData[this.pickerValueDefault[0]].length - 1) {
-          this.pickerValueDefault[1] = cityData[this.pickerValueDefault[0]].length - 1;
-        }
-        if (this.pickerValueDefault[2] > areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1) {
-          this.pickerValueDefault[2] = areaData[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length - 1;
-        }
-      }
-    },
-    pickerChange(e) {
-      let changePickerValue = e.mp.detail.value;
-      if (this.pickerValue[0] !== changePickerValue[0]) {
-        // 第一级发生滚动
-        this.cityDataList = cityData[changePickerValue[0]];
-        this.areaDataList = areaData[changePickerValue[0]][0];
-        changePickerValue[1] = 0;
-        changePickerValue[2] = 0;
-      } else if (this.pickerValue[1] !== changePickerValue[1]) {
-        // 第二级滚动
-        this.areaDataList =
-          areaData[changePickerValue[0]][changePickerValue[1]];
-        changePickerValue[2] = 0;
-      }
-      this.pickerValue = changePickerValue;
-      this._$emit('onChange');
-    },
-    _$emit(emitName) {
-      let pickObj = {
-        label: this._getLabel(),
-        value: this.pickerValue,
-        cityCode: this._getCityCode()
-      };
-      this.$emit(emitName, pickObj);
-    },
-    _getLabel() {
-      let pcikerLabel =
-        this.provinceDataList[this.pickerValue[0]].label +
-        '-' +
-        this.cityDataList[this.pickerValue[1]].label +
-        '-' +
-        this.areaDataList[this.pickerValue[2]].label;
-      return pcikerLabel;
-    },
-    _getCityCode() {
-      return this.areaDataList[this.pickerValue[2]].value;
-    }
-  }
-};
-</script>
-
-<style>
-.pickerMask {
-  position: fixed;
-  z-index: 1000;
-  top: 0;
-  right: 0;
-  left: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.6);
-}
-.mpvue-picker-content {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  transition: all 0.3s ease;
-  transform: translateY(100%);
-  z-index: 3000;
-}
-.mpvue-picker-view-show {
-  transform: translateY(0);
-}
-.mpvue-picker__hd {
-  display: flex;
-  padding: 9px 15px;
-  background-color: #fff;
-  position: relative;
-  text-align: center;
-  font-size: 17px;
-}
-.mpvue-picker__hd:after {
-  content: ' ';
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  height: 1px;
-  border-bottom: 1px solid #e5e5e5;
-  color: #e5e5e5;
-  transform-origin: 0 100%;
-  transform: scaleY(0.5);
-}
-.mpvue-picker__action {
-  display: block;
-  flex: 1;
-  color: #1aad19;
-}
-.mpvue-picker__action:first-child {
-  text-align: left;
-  color: #888;
-}
-.mpvue-picker__action:last-child {
-  text-align: right;
-}
-.picker-item {
-  text-align: center;
-  line-height: 40px;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  font-size: 16px;
-}
-.mpvue-picker-view {
-  position: relative;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  height: 238px;
-  background-color: rgba(255, 255, 255, 1);
-}
-</style>

+ 9 - 0
components/uni-popup/config.json

@@ -0,0 +1,9 @@
+{
+	"id":"329",
+	"name":"PopUp",
+	"desc":"弹出层",
+	"url":"popup",
+	"edition":"1.1.2",
+	"path":"https://ext.dcloud.net.cn/plugin?id=329",
+	"update_log":"- 新增 显示弹窗属性\n- 修复 h5 取消导航栏,顶部空白问题"
+}

+ 83 - 0
components/uni-popup/readme.md

@@ -0,0 +1,83 @@
+## Popup 弹出层
+
+弹出层组件,为了解决遮罩弹层的问题。组件名:``uni-popup``,代码块: uPopup。
+
+
+**使用方式:**
+
+在 ``script`` 中引用组件 
+
+```javascript
+import uniPopup from "@/components/uni-popup/uni-popup.vue"
+export default {
+    components: {uniPopup}
+}
+```
+
+**基本用法**
+
+```html
+<uni-popup ref="popup" type="bottom">底部弹出 Popup</uni-popup>
+```
+
+**属性说明:**
+
+|  属性名	|    类型	| 默认值| 说明															|
+| ---		| ---		| ---	| ---															|
+| animation	| Boolean	|true	| 是否开启动画													|
+| type		| String	|center	| 弹出方式,可选值:top(顶部),center(居中),bottom(底部)	|
+| show		| Boolean	|false	| 显示弹窗	|
+| custom	| Boolean	|false	| 是否自定义内容												|
+| maskClick	| Boolean	|true	| 蒙版点击是否关闭弹窗											|
+
+
+**方法说明:**
+通过 `ref` 获取组件方法
+
+|事件称名	|说明		|
+|---		|----		|
+|open		|打开弹出层	|
+|close		|关闭弹出层	|
+
+```html
+<view>
+	<button @click="openPopup">打开弹出层</button>
+	<uni-popup ref="popup" type="center">
+		弹出层示例
+		<button @click="closePopup">关闭弹出层</button>
+	</uni-popup>
+</view>
+```
+
+```javascript
+export default {
+	methods:{
+		openPopup(){
+			this.$refs.popup.open()
+		},
+		closePopup(){
+			this.$refs.popup.close()
+		}
+	}
+}
+```
+
+Tips 
+- show 的作用与 open() 效果一致 ,在使用中显示弹窗二者只能选择其一。如果使用 show 显示弹窗,那么关闭弹窗时,应将 show 置为 false
+
+### 更新日志
+
+**1.1.2**
+- 新增 显示弹窗属性
+- 修复 h5 取消导航栏,顶部空白问题
+
+**1.1.1**
+- 修复 图片不显示的问题
+
+**1.1.0**
+- 新增 动画效果
+- 修复 示例底部弹出样式错乱的 bug
+- 优化 代码重构 可完全自定义内容
+
+**1.0.0**
+- 初始化项目

+ 206 - 0
components/uni-popup/uni-popup.vue

@@ -0,0 +1,206 @@
+<template>
+  <view
+    v-if="showPopup"
+    class="uni-popup">
+    <view
+      :class="[ani, animation ? 'ani' : '', !custom ? 'uni-custom' : '']"
+      class="uni-popup__mask"
+      @click="close(true)" />
+    <view
+      :class="[type, ani, animation ? 'ani' : '', !custom ? 'uni-custom' : '']"
+      class="uni-popup__wrapper"
+      @click="close(true)">
+      <view
+        class="uni-popup__wrapper-box"
+        @click.stop="clear">
+        <slot />
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'UniPopup',
+  props: {
+    // 开启动画
+    animation: {
+      type: Boolean,
+      default: true
+    },
+    // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+    type: {
+      type: String,
+      default: 'center'
+    },
+    // 是否开启自定义
+    custom: {
+      type: Boolean,
+      default: false
+    },
+    // maskClick
+    maskClick: {
+      type: Boolean,
+      default: false
+    },
+    show: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      ani: '',
+      showPopup: false
+    }
+  },
+  watch: {
+    show (newValue) {
+      if (newValue) {
+        this.open()
+      } else {
+        this.close()
+      }
+    }
+  },
+  created () {},
+  methods: {
+    clear() {},
+    open() {
+      this.$emit('change', {
+        show: true
+      })
+      this.showPopup = true
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.ani = 'uni-' + this.type
+        }, 30)
+      })
+    },
+    close(type) {
+      if (!this.maskClick && type) return
+      this.$emit('change', {
+        show: false
+      })
+      this.ani = ''
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.showPopup = false
+        }, 300)
+      })
+    }
+  }
+}
+</script>
+<style lang="scss">
+.uni-popup {
+  position: fixed;
+  /*  #ifdef  H5  */
+  top: 0px;
+  // top: 50px;
+  /*  #endif  */
+  /*  #ifndef  H5  */
+  top: 0px;
+  /*  #endif  */
+  bottom: 0;
+  left: 0;
+  right: 0;
+  z-index: 99999;
+  overflow: hidden;
+  &__mask {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 998;
+    background: rgba(0, 0, 0, 0.4);
+    opacity: 0;
+
+    &.ani {
+      transition: all 0.3s;
+    }
+
+    &.uni-top,
+    &.uni-bottom,
+    &.uni-center {
+      opacity: 1;
+    }
+  }
+
+  &__wrapper {
+    position: absolute;
+    z-index: 999;
+    box-sizing: border-box;
+
+    &.ani {
+      transition: all 0.3s;
+    }
+
+    &.top {
+      top: 0;
+      left: 0;
+      width: 100%;
+      transform: translateY(-100%);
+    }
+
+    &.bottom {
+      bottom: 0;
+      left: 0;
+      width: 100%;
+      transform: translateY(100%);
+    }
+
+    &.center {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      transform: scale(1.2);
+      opacity: 0;
+    }
+
+    &-box {
+      position: relative;
+      box-sizing: border-box;
+    }
+
+    &.uni-custom {
+      & .uni-popup__wrapper-box {
+       // padding: 30upx;
+        background: #fff;
+      }
+
+      &.center {
+        & .uni-popup__wrapper-box {
+          position: relative;
+          // max-width: 80%;
+          // max-height: 80%;
+          overflow-y: scroll;
+		  border-radius: 10rpx;
+        }
+      }
+
+      &.top,
+      &.bottom {
+        & .uni-popup__wrapper-box {
+          width: 100%;
+          // max-height: 500px;
+          overflow-y: scroll;
+        }
+      }
+    }
+
+    &.uni-top,
+    &.uni-bottom {
+      transform: translateY(0);
+    }
+
+    &.uni-center {
+      transform: scale(1);
+      opacity: 1;
+    }
+  }
+}
+</style>

+ 6 - 0
pages.json

@@ -128,6 +128,12 @@
 			"style": {
 				"navigationBarTitleText": "找服务"
 			}
+		},
+		{
+			"path": "pages/auth/index",
+			"style": {
+				"navigationBarTitleText": "授权"
+			}
 		}
 	],
 	"globalStyle": {

+ 478 - 0
pages/auth/index.vue

@@ -0,0 +1,478 @@
+<template>
+	<view>
+	<view v-if="imStaff&&!isLogin" class="auth">
+		<image src="/static/login-logo.png" mode=""></image>
+			提示:工作人员登录后才能显示会员管理信息<br/>
+			请点击
+			<button v-if="!isAuth" type='primary' class="allow" open-type="getUserInfo" @getuserinfo="getUserInfo">授权</button>
+			<button v-if="isAuth" type="primary" class="allow"  open-type="getPhoneNumber"  style="font-size: 12px;" @getphonenumber="getPhoneNumber">绑定手机</button>
+	</view>
+	<view v-if="imMember&&(!isLogin)" class="auth">
+		<image src="/static/login-logo.png" mode=""></image>
+			提示:会员登录后才能使用会员功能<br/>
+			请点击
+			<button v-if="!isAuth" type='primary' class="allow" open-type="getUserInfo" @getuserinfo="getUserInfo">授权</button>
+			<button v-if="isAuth" type="primary" class="allow"  open-type="getPhoneNumber"  style="font-size: 12px;" @getphonenumber="getPhoneNumber">绑定手机</button>
+	</view>
+	<uni-popup ref="popup" type="center">
+		<view class="uni-tip">
+			<view class="uni-tip-title">登录失败</view>
+			<view class="uni-tip-content">您授权的手机号与后台信息不匹配,请联系客服人员{{kf_number}}</view>
+			<button class="uni-tip-button" @click="closePopup">确定</button>
+		</view>
+	</uni-popup>
+
+	</view>
+</template>
+
+<script>
+var md5 = require("../../common/md5.js");
+import uniPopup from '@/components/uni-popup/uni-popup.vue';
+export default {
+	components: {
+		uniPopup,
+	},
+	data(){
+		return {
+				iv:'',
+				encryptedData:'',
+				session_key:getApp().globalData.session_key,
+				open_id: getApp().globalData.open_id,
+				imStaff:getApp().globalData.imStaff,
+				imMember:getApp().globalData.imMember,
+			    isAuth:getApp().globalData.isAuth,
+				isBind:getApp().globalData.isBind,
+				isLogin:getApp().globalData.isLogin,
+				kf_number:getApp().globalData.kf_number,
+				user_type:'',
+		}
+	},
+	onLoad() {
+		// console.log("是否授权"+getApp().globalData.isAuth);
+		// console.log("是否绑定"+getApp().globalData.isBind);
+		// console.log("是否登录"+getApp().globalData.isLogin);
+		// console.log("是否工作人员"+getApp().globalData.imStaff);
+		// console.log("是否客户"+getApp().globalData.imMember);
+	},
+	watch:{
+		user_type(){
+			console.log("监听到用户类型了!");
+			// this.judgeStaff(getApp().globalData.user_type);
+		},
+	},
+	methods:{
+		loginRequest(){
+			uni.login({
+				success: (res) => {
+					uni.request({
+						url: getApp().globalData.shareUrl, //需要设置为全局
+						method: 'POST',
+						header: {
+							'content-type': 'application/x-www-form-urlencoded',
+						},
+						data: {
+							method: 'login',
+							timestamp: getApp().globalData.globalTimestamp,
+							code: res.code,
+							sign: md5('login' + getApp().globalData.globalTimestamp)
+						},
+						success: res => {
+							// 通过openid发起会员登录
+							console.log(res);
+							if(res.data.msg.status===1){
+								getApp().globalData.isAuth=true;//用户已授权 手机号未绑定
+							}else if(res.data.msg.status===2){
+								getApp().globalData.isAuth=true;
+								getApp().globalData.isBind=true;//用户手机号已绑定 进入调用用户信息流程来判断用户类型
+							    this.getSelInfo();
+							};
+							getApp().globalData.open_id = res.data.msg.openId;
+							getApp().globalData.session_key = res.data.msg.session_key;
+							console.log('会员&工作人员尝试登录');
+						},
+					});
+				},
+			});
+		},
+		getSelInfo(){
+			let that = this;
+			uni.request({
+				url: getApp().globalData.shareUrl, 
+				method: 'POST',
+				header: {
+					'content-type': 'application/x-www-form-urlencoded'
+				},
+				data: {
+					sign: md5('get_member_info' + getApp().globalData.globalTimestamp),
+					method: 'get_member_info',
+					timestamp: getApp().globalData.globalTimestamp,
+					openId: getApp().globalData.open_id,
+				},
+				success:(res)=>{
+					if(res.data.code===200){
+						getApp().globalData.user_id=res.data.msg.id;
+						getApp().globalData.user_type=res.data.msg.type;
+						getApp().globalData.member_count=res.data.msg.member_count;
+						getApp().globalData.user_adminid=res.data.msg.adminid;
+						getApp().globalData.user_headimg=res.data.msg.headimg;
+						getApp().globalData.user_name=res.data.msg.name;
+						getApp().globalData.user_nickname=res.data.msg.nickname;
+						getApp().globalData.user_sex=res.data.msg.sex;
+						getApp().globalData.user_status=res.data.msg.status;
+						getApp().globalData.user_birthday=res.data.msg.birthday;
+						getApp().globalData.user_idnum=res.data.msg.idnum;
+						getApp().globalData.user_phone=res.data.msg.phone;
+						getApp().globalData.user_email=res.data.msg.email;
+						getApp().globalData.user_home_address=res.data.msg.home_address;
+						getApp().globalData.user_send_address=res.data.msg.send_address;
+						getApp().globalData.user_pcode=res.data.msg.pcode;
+						getApp().globalData.user_number=res.data.msg.number;
+						getApp().globalData.user_firsttime=res.data.msg.firsttime;
+						getApp().globalData.user_addtime=res.data.msg.addtime;
+						getApp().globalData.user_balance=res.data.msg.balance;
+						getApp().globalData.user_deadline=res.data.msg.deadline;
+						getApp().globalData.user_doctor=res.data.msg.doctor;
+						getApp().globalData.user_doctor_name=res.data.msg.doctor_name;
+						getApp().globalData.user_online_doctor=res.data.msg.online_doctor;
+						getApp().globalData.user_online_doctor_name=res.data.msg.online_doctor_name;
+						getApp().globalData.user_kf=res.data.msg.kf;
+						getApp().globalData.user_kf_name=res.data.msg.kf_name;
+						getApp().globalData.member_count=res.data.msg.member_count;
+						getApp().globalData.user_health_doc=res.data.msg.health_doc;
+						getApp().globalData.roomId = res.data.msg.type === '0' ? res.data.msg.rooms[0] :res.data.msg.rooms;
+						if(getApp().globalData.user_deadline*1000<new Date().getTime()){
+							getApp().globalData.deadline=true;
+						}
+						console.log("读取用户个人信息成功");
+						that.judgeStaff(getApp().globalData.user_type);
+					}
+				},
+				fail:()=>{
+					console.log("读取用户个人信息失败");
+				},
+			});
+		},
+		judgeStaff(type){
+			if(type==0){
+				if(!getApp().globalData.imMember){
+					this.$refs.popup.open();
+					getApp().globalData.isSignOut=true;
+					getApp().globalData.isAuth=false;
+					getApp().globalData.isBind=false;
+					getApp().globalData.isLogin=false;
+					this.signout();
+				}else{
+					getApp().globalData.isLogin=true;
+					console.log("该用户登录成功");
+					if(getApp().globalData.user_deadline*1000<new Date().getTime()){
+						getApp().globalData.deadline=true;
+					}
+					this.refuseBtn();
+					//登陆成功再获取一次用户信息,登录状态不同获取的信息不一致
+				}
+			}else{
+				if(!getApp().globalData.imStaff){
+					this.$refs.popup.open();
+					getApp().globalData.isSignOut=true;
+					getApp().globalData.isAuth=false;
+					getApp().globalData.isBind=false;
+					getApp().globalData.isLogin=false;
+					this.signout();
+				}else{
+					getApp().globalData.isLogin=true;
+					console.log("该医生&客服登录成功");
+					this.goChatlist();
+					// this.getSelInfo();
+				}
+			}
+		},
+		getUserInfo(e) {
+				if (e.detail.errMsg == "getUserInfo:ok") {
+					console.log(e);
+					getApp().globalData.isAuth = true;
+					getApp().globalData.user_headimg = e.detail.userInfo.avatarUrl;
+					getApp().globalData.user_name = e.detail.userInfo.nickName;
+					this.iv = e.detail.iv;
+					this.encryptedData = e.detail.encryptedData;
+					this.isAuth=true;
+					console.log("用户信息授权成功");
+				} else {
+					console.log("用户信息授权失败");
+					this.isAuth = false;
+					getApp().globalData.isAuth = false;
+				}
+			},
+		getPhoneNumber(e){
+				console.log(e);
+				let that = this;
+				 if (e.detail.errMsg == 'getPhoneNumber:ok') { //允许授权执行跳转
+				  that.phoneRequest(e.detail.iv, e.detail.encryptedData, getApp().globalData.session_key);
+				} else { //
+				      that.isNeedPhone = false;
+				}
+			},
+		phoneRequest(myIv,myEncryptedData,sKey){
+				let that = this;
+				uni.request({
+					url:getApp().globalData.shareUrl, //需要设置为全局
+					method: 'POST',
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					data: {
+						method: 'auth',
+						timestamp: getApp().globalData.globalTimestamp, 
+						sign: md5('auth' + getApp().globalData.globalTimestamp),
+						iv:myIv,
+						encryptedData:myEncryptedData,
+						session_key:sKey,
+						openId: that.open_id,
+					},
+					success: res => {
+						console.log(res.data.code);
+						if(res.data.code===200){
+							console.log("手机号绑定成功!");
+							getApp().globalData.isBind=true;
+							that.uploadHeadimg();
+						}else{
+							this.$refs.popup.open();
+							getApp().globalData.isSignOut=true;
+							getApp().globalData.isAuth=false;
+							getApp().globalData.isBind=false;
+							getApp().globalData.isLogin=false;
+							this.isBind = false;
+						}
+					} 
+				});
+			},
+		uploadHeadimg(){
+			let that = this;
+			uni.request({
+				url: getApp().globalData.shareUrl, 
+				method: 'POST',
+				header: {
+					'content-type': 'application/x-www-form-urlencoded'
+				},
+				data: {
+					sign: md5('update_member_info' + getApp().globalData.globalTimestamp),
+					method: 'update_member_info',
+					timestamp: getApp().globalData.globalTimestamp, 
+					openId:getApp().globalData.open_id,
+					key:'headimg',
+					value:getApp().globalData.user_headimg,
+				},
+				success:(res)=>{
+					if(res.data.code===200){
+						getApp().globalData.user_headimg=res.data.msg.headimg;
+						that.getSelInfo()
+						console.log("将微信头像作为用户头像");
+					}
+				},
+				fail:()=>{
+					console.log("微信头像作为用户头像更新失败");
+				},
+			});
+		},
+		refuseBtn(){
+			uni.navigateBack({
+				delta: 1
+			});
+		},
+		goChatlist(){
+			uni.reLaunch({
+				url: '../index/chatList/index',
+				success: res => {},
+				fail: () => {},
+				complete: () => {}
+			});
+			return true;
+		},
+		signout(){
+			getApp().globalData.isAuth=false;
+			getApp().globalData.isBind=false;
+			getApp().globalData.isLogin=false;
+			uni.request({
+				url: getApp().globalData.shareUrl, 
+				method: 'POST',
+				header: {
+					'content-type': 'application/x-www-form-urlencoded'
+				},
+				data: {
+					sign: md5('update_member_info' + getApp().globalData.globalTimestamp),
+					method: 'update_member_info',
+					timestamp: getApp().globalData.globalTimestamp, 
+					uid:getApp().globalData.user_id,
+					openId:getApp().globalData.open_id,
+					key:'login_status',
+					value:0,
+				},
+				success:(res)=>{
+					if(res.data.code===200){
+						getApp().globalData.login_status=res.data.msg.login_status;
+						getApp().globalData.user_headimg=res.data.msg.headimg;
+						getApp().globalData.user_name=res.data.msg.name;
+						getApp().globalData.user_birthday=res.data.msg.birthday;
+						getApp().globalData.user_idnum=res.data.msg.idnum;
+						getApp().globalData.user_phone=res.data.msg.phone;
+						getApp().globalData.user_email=res.data.msg.email;
+						getApp().globalData.user_home_address=res.data.msg.home_address;
+						getApp().globalData.user_send_address=res.data.msg.send_address;
+						getApp().globalData.user_pcode=res.data.msg.pcode;
+						getApp().globalData.user_number=res.data.msg.number;
+						getApp().globalData.user_firsttime=res.data.msg.firsttime;
+						getApp().globalData.user_balance=res.data.msg.balance;
+						getApp().globalData.user_deadline=res.data.msg.deadline;
+						getApp().globalData.user_doctor_name=res.data.msg.doctor_name;
+						getApp().globalData.user_online_doctor_name=res.data.msg.online_doctor_name;
+						getApp().globalData.kf_name=res.data.msg.kf_name;
+						console.log("退出登录成功!");
+					}
+				},
+				fail:()=>{
+					console.log("999");
+				},
+			});
+		},
+		closePopup(){
+			getApp().globalData.isSignOut=true;
+			getApp().globalData.isAuth=true;
+			getApp().globalData.isBind=false;
+			getApp().globalData.isLogin=false;
+			
+				this.$refs.popup.close();
+				uni.reLaunch({
+						url: '../index/chooseId/index',
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+				});
+		},
+	}
+}
+</script>
+
+<style>
+   .auth{
+	   margin-top: 0;
+	   text-align: center;
+	   display: flex;
+	   flex-direction: column;
+	   justify-content: center;
+	   align-items: center;
+	   padding: 100upx;
+	   vertical-align: middle;
+   }
+   .auth image{
+	   width: 200upx;
+	   height: 200upx;
+   }
+   .auth view {
+	   display: flex;
+	   width: 490upx;
+	   justify-content: space-between;
+   }
+   .auth-title {
+	   font-size: 32upx;
+   }
+   .auth-content {
+   	   font-size: 26upx;
+	   color: #a7aaa9;
+   }
+   .allow {
+	   background-color: #27BCEF;
+	   margin: 20rpx 0 200rpx;
+	   text-align: center;
+	   vertical-align: middle;
+	   touch-action: manipulation;
+	   cursor: pointer;
+	   background-image: none;
+	   white-space: nowrap;
+	   user-select: none;
+	   font-size: 14px;
+	   border: 0 !important;
+	   position: relative;
+	   text-decoration: none;
+	   height: 44px;
+	   width: 250rpx;
+	   line-height: 44px;
+	   box-shadow: inset 0 0 0 1px #27BCEF;
+	   background: #fff !important;
+	   color: #27BCEF !important;
+	   display: inline-block;
+	   border-radius: 10rpx;
+
+   }
+   .refuse {
+	   background-color: #19be6b;
+	   margin: 20rpx 20rpx 200rpx 20rpx;
+	   text-align: center;
+	   vertical-align: middle;
+	   touch-action: manipulation;
+	   cursor: pointer;
+	   background-image: none;
+	   white-space: nowrap;
+	   user-select: none;
+	   font-size: 14px;
+	   border: 0 !important;
+	   position: relative;
+	   text-decoration: none;
+	   height: 44px;
+	   width: 250rpx;
+	   line-height: 44px;
+	   box-shadow: inset 0 0 0 1px #8a8a8a;
+	   background: #fff !important;
+	   color: #8a8a8a !important;
+	   display: inline-block;
+	   border-radius: 10rpx;
+
+   }
+   .margin-top-3{
+	   margin-top: 10%;
+   }
+   
+   
+   .uni-tip {
+   	 	padding: 30rpx;
+   	 	width: 600rpx;
+   		height: 340rpx;
+   	 	background: #fff;
+   	 	box-sizing: border-box;
+   		border:2rpx solid #fff;
+   	 	border-radius: 10rpx;
+   	}
+   	 
+   	.uni-tip-title {
+   	 	text-align: center;
+		height: 40rpx;
+   	 	/* font-weight: bold; */
+   	 	font-size: 30rpx;
+		background: #fff;
+   	 	/* color: #333; */
+   	}
+   	 
+   	.uni-tip-content {
+		text-align: center;
+		background: #fff;
+   	 	padding: 15px;
+   	 	font-size: 28rpx;
+		height: 70rpx;
+		line-height: 1.8;
+   	 	/* color: #666; */
+   	}
+	 
+	.uni-tip-button {
+		width: 200rpx;
+		height: 60rpx;
+		line-height: 60rpx;
+	 	margin-top: 30rpx;
+	 	/* display: flex; */
+		text-align: center;
+		background: #fff;
+		font-size: 28rpx;
+		color: #c02924;
+		border: solid 1rpx #c02924;
+		border-radius: 30rpx;
+	}
+   
+   
+</style>

+ 41 - 3
pages/index/index.vue

@@ -11,6 +11,7 @@
 		 			<image :src="item.pic_path" mode="aspectFill" style="width: 100%;height: 100%;"></image>
 		 		</swiper-item>
 		 	</swiper>
+			<image src="../../static/Intersect.svg" class="groove-img"></image>
 			<view class="rowDot">
 				 <view v-for="(item,index) in swiperList" :key="index" class="dots">
 					 <view :class="['dot',index === swiperCurrent ? 'active' : '']"></view>
@@ -265,11 +266,42 @@
 		onLoad() {
            this.getSwiperList();
 		   this.getPark();
+		//   this.loginLoad();
 		},
 		methods: {
 			swiperChange(e){
 				this.swiperCurrent = e.detail.current
 			},
+			loginLoad(){
+				let that = this;
+				uni.login({
+					success(res) {
+						that.loginRequest(res.code)
+					}
+				})
+			},
+			loginRequest(codeRes){
+				let md5Sign = md5("method="+'user'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
+				let url = getApp().globalData.shareUrl+'api/api.php'+'?method=user&source=user&action=login&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
+				uni.request({
+					url:url,
+					method: 'POST',
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					data: {
+						code:codeRes
+					},
+					success: (res) => {
+						console.log(res)
+						if(res.data.code === 200){
+						}
+					},
+					fail: () => {
+						console.log("连接失败");
+					}
+				});
+			},
 			getSwiperList(){
 				let md5Sign = md5("method="+'common'+"&timestamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
 				let url = getApp().globalData.shareUrl+'api/api.php'+'?method=common&source=main_pics&action=list&timestamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
@@ -360,11 +392,17 @@
 		font-size: 36rpx;
 		color: #8f8f94;
 	}
+	.groove-img {
+		width: 100%;
+		height: 100rpx;
+		bottom: -22rpx;
+		position: absolute;
+	}
 	.rowDot {
 		display: flex;
 		position: absolute;
-		top: 135px;
-		left: 40px;
+		top: 270rpx;
+		left: 80rpx;
 	}
 	.dots {
 		flex-direction: row;
@@ -384,7 +422,7 @@
 		background: #ff4e54;
 	}
 	.swiper-content {
-		border-radius: 0 0 10% 10%; 
+		/* border-radius: 0 0 10% 10%; */
 	}
 	.page-nav-box {
 		width: 80%;

+ 33 - 7
pages/park/index.vue

@@ -2,7 +2,11 @@
 	<view class="content">
 		
 		<view class="display-flex-start map-header-box">
-			<uni-easyinput prefixIcon="search" v-model="headerVal" placeholder="请输入园区名称搜索" @iconClick="headerSerach()" class="map-search-box"></uni-easyinput>
+			<!-- <uni-easyinput prefixIcon="search" v-model="headerVal" placeholder="请输入园区名称搜索" @iconClick="headerSerach()" class="map-search-box"></uni-easyinput> -->
+			<view class="input-box">
+			  <image src="/static/policy/u377.png" alt="search" @click="headerSerach()"/>
+			  <input type="text" placeholder="请输入园区名称搜索" v-model="headerVal"/>
+			</view>
 			<navigator url="/pages/park/map_search"><button type="default" class="map-search-btn">地图查找</button></navigator>
 		</view>
 		
@@ -127,8 +131,7 @@
 				let typeList = this.filterList.filter((item)=>{return item.isSelected})
 				typeList.forEach((item)=>{typeStr.push(item.typeId)})
 				typeStr = typeStr.join(',')
-				console.log(typeStr)
-				//this.getPark(typeStr)
+				this.getPark(this.headerVal,typeStr)
 				this.filterBoxFlag = false;
 			},
 			showFilterBox(){
@@ -145,7 +148,7 @@
 				let postData = {
 					order_by:"weight desc",
 				}
-				if(searchVal){
+				if(searchVal && !typeList){
 					postData = {
 						order_by:"weight desc",
 						ss_name:searchVal
@@ -154,7 +157,7 @@
 				if(typeList){
 					postData = {
 						order_by:"weight desc",
-						ss_name:searchVal || '',
+						ss_name:searchVal,
 						park_type:typeList
 					}
 				}
@@ -212,15 +215,38 @@
 	}
 	.map-header-box {
 		background-color: #02A7F0;
-		padding: 20rpx 0rpx 30rpx 0rpx;
+		padding: 20rpx 0rpx 20rpx 0rpx;
 		width: 100%;
 	}
-	.map-search-box {
+/* 	.map-search-box {
 		background-color: #fff;
 		margin-left: 30rpx;
 		margin-right: 20rpx;
 		border-radius: 10rpx;
 		width: 70%;
+	} */
+	.input-box {
+	  width: 75%;
+	  display: flex;
+	  justify-content: center;
+	  align-items: center;
+	  position: relative;
+	}
+	.input-box image {
+	    position: absolute;
+		left: 60rpx;
+		width: 30rpx;
+		height: 30rpx;
+	  }
+	 .input-box input {
+	    background-color: #ffffff;
+	    width: 90%;
+	    height: 70rpx;
+	    border-radius: 10rpx;
+	    padding: 3rpx;
+	    font-size: 24rpx;
+	    padding-left: 80rpx;
+	    box-sizing: border-box;
 	}
 	.map-search-btn {
 		height: 66rpx;

+ 15 - 11
pages/park/park_deatil.vue

@@ -69,43 +69,43 @@
 			<view class="display-around-column content-font">
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">运营机构</view>
-					<view>{{detailObj.manager || '-'}}</view>
+					<view class="width-70">{{detailObj.manager || '-'}}</view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">产业定位</view>
-					<view>{{detailObj.target || '-'}}</view>
+					<view class="width-70">{{detailObj.target || '-'}}</view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">园区类型</view>
-					<view>{{detailObj.building_types || '-'}}</view>
+					<view class="width-70">{{detailObj.building_types || '-'}}</view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">物业费</view>
-					<view>{{detailObj.service_price || '-'}}<text style="font-size: 16rpx;">元/㎡/月</text></view>
+					<view class="width-70">{{detailObj.service_price || '-'}}<text style="font-size: 16rpx;">元/㎡/月</text></view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">电费</view>
-					<view>{{detailObj.power_price || '-'}}<text style="font-size: 16rpx;">KW·h</text></view>
+					<view class="width-70">{{detailObj.power_price || '-'}}<text style="font-size: 16rpx;">KW·h</text></view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">水费</view>
-					<view>{{detailObj.water_price || '-'}}<text style="font-size: 16rpx;">m³</text></view>
+					<view class="width-70">{{detailObj.water_price || '-'}}<text style="font-size: 16rpx;">m³</text></view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">一层楼高</view>
-					<view>{{detailObj.max_height || '-'}}<text style="font-size: 16rpx;">m</text></view>
+					<view  class="width-70">{{detailObj.max_height || '-'}}<text style="font-size: 16rpx;">m</text></view>
 				</view>
 				<view  class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">最大承重</view>
-					<view>{{detailObj.max_weight || '-'}}<text style="font-size: 16rpx;">kg</text></view>
+					<view  class="width-70">{{detailObj.max_weight || '-'}}<text style="font-size: 16rpx;">kg</text></view>
 				</view>
 				<view class="display-flex-start items-center margin-bottom-20">
 					<view class="width-30 margin-left-60 color-cf">联系电话</view>
-					<view @click="makeCall(detailObj.tel)" style="color: #007AFF;">{{detailObj.phone}}</view>
+					<view  class="width-70"  @click="makeCall(detailObj.tel)" style="color: #007AFF;">{{detailObj.phone}}</view>
 				</view>
 				<view class="display-flex-start items-center">
 					<view class="width-30 margin-left-60 color-cf">详细地址</view>
-					<view>{{detailObj.address || '-'}}</view>
+					<view class="width-70">{{detailObj.address || '-'}}</view>
 				</view>
 			</view>
 	    	
@@ -125,7 +125,6 @@
 			  </view>
 			</view>
 		</view>
-	   
 		<footer-share style="width: 100%;" :isCollection="false" @collectionPages="collectionPage" @sharePages="sharePage"></footer-share>
 	</view> 
 	</view>
@@ -134,6 +133,8 @@
 <script>
 	import md5 from '@/common/md5.js';
 	export default {
+		components: {
+		},
 		data() {
 			return {
 			    swiperList:[
@@ -335,6 +336,9 @@
 	.width-30 {
 		width: 30%;
 	}
+	.width-70 {
+		width: 70%;
+	}
 	.content-font {
 		font-size: 20rpx;
 	}

+ 8 - 1
pages/selfCenter/index.vue

@@ -11,6 +11,7 @@
         src="https://kiq.xazhima.com//upload/main_page/202109/202109231407288075.jpeg"
         alt=""
       />
+	  <image src="../../static/Intersect.svg" class="groove-img"></image>
     </div>
     <div class="options">
       <div v-for="(item, idx) in list" :key="idx" class="options-item">
@@ -77,8 +78,14 @@ export default {
       position: absolute;
       width: 100%;
       height: 100%;
-      border-radius: 0rpx 0rpx 70rpx 70rpx;
+      // border-radius: 0rpx 0rpx 70rpx 70rpx;
     }
+	.groove-img {
+		width: 100%;
+		height: 100rpx;
+		bottom: -22rpx;
+		position: absolute;
+	}
     .nickname {
       font-weight: 600;
       font-size: 35rpx;

+ 3 - 0
static/Intersect.svg

@@ -0,0 +1,3 @@
+<svg width="375" height="31" viewBox="0 0 375 31" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0.459839L0 31H375V0.459841C315.799 19.0046 252.817 29 187.5 29C122.183 29 59.2013 19.0046 0 0.459839Z" fill="white"/>
+</svg>