diff --git a/index.html b/index.html
index a012471..eb1a67b 100644
--- a/index.html
+++ b/index.html
@@ -21,7 +21,8 @@
window._AMapSecurityConfig = {
//securityJsCode: "js秘钥",
// serviceHost: 'https://wx.sjajk.com/_AMapService',
- serviceHost: 'http://120.46.52.165/_AMapService',
+ // serviceHost: 'http://120.46.52.165/_AMapService',
+ serviceHost: 'http://192.168.2.222:8187/_AMapService',
};
diff --git a/manifest.json b/manifest.json
index 9939b2e..42e3310 100644
--- a/manifest.json
+++ b/manifest.json
@@ -184,11 +184,12 @@
"key" : "2acf1b8c3d1aaf0070472dec19018d96",
"securityJsCode" : "2b07c8496878c327a8ae7a19de33e2a7",
// "serviceHost" : "http://wx.sjajk.com/_AMapService"//生产需替换
- // "serviceHost" : "http://120.46.52.165/_AMapService"
- "serviceHost" : "http://192.168.2.222:8187/_AMapService"
+ // "serviceHost" : "http://120.46.52.165/_AMapService",
+ "serviceHost" : "http://192.168.2.222:8187/_AMapService"
}
}
},
+ // "serviceHost" : "http://192.168.2.222:8187/_AMapService"
// "serviceHost" : "http://47.75.182.93:8090/_AMapService"
"template" : "index.html"
}
diff --git a/pages.json b/pages.json
index b7cb449..7206c3d 100644
--- a/pages.json
+++ b/pages.json
@@ -454,7 +454,7 @@
"path": "pages/therapist/therapist",
"style": {
"navigationBarTitleText": "理疗师",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false
}
@@ -466,7 +466,7 @@
"path": "pages/therapist/therapist",
"style": {
"navigationBarTitleText": "理疗师",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false
}
@@ -484,7 +484,7 @@
"path": "pages/therapist/orderDetail",
"style": {
"navigationBarTitleText": "理疗师详情",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"app-plus": {
"titleNView": false
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index d952814..3850822 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -18,8 +18,8 @@
-
-
+
+
@@ -59,7 +59,7 @@
盛安套餐
-
+
盛安技师
@@ -120,7 +120,7 @@
- 1.2km
+ {{item.dingwei}}km
@@ -145,7 +145,7 @@
-
+
助眠解压
@@ -448,6 +448,10 @@
this.getHomeArtificerList();
this.latitude = uni.getStorageSync('latitude')
this.longitude = uni.getStorageSync('longitude')
+ }else{
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
}
that.token = uni.getStorageSync('token');
// that.getKTCityList();
@@ -479,6 +483,74 @@
// }
},
methods: {
+ goChat() {
+ let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信
+ let kefuPhone = this.$queue.getData('kefuPhone');
+ if (kefu == 1) {
+ uni.makePhoneCall({
+ phoneNumber: kefuPhone //仅为示例
+ });
+ }else if(kefu == 3){
+ uni.navigateTo({
+ url: '/my/setting/customer'
+ });
+ } else{
+ // #ifdef MP-WEIXIN
+ let that = this
+ try {
+ wx.openCustomerServiceChat({
+ extInfo: {
+ url: that.$queue.getData('kefuUrl')
+ },
+ corpId: that.$queue.getData('kefuAppId'),
+ success(res) {},
+ fail(res) {
+ console.error(res)
+ }
+ })
+ } catch (error) {
+ console.error("catchcatch" + error)
+ uni.showToast({
+ title: '请更新至微信最新版本'
+ });
+ }
+ // #endif
+ // #ifndef MP-WEIXIN
+ let url = that.$queue.getData('kefuUrl');
+ if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
+ uni.navigateTo({
+ url
+ });
+ } else {
+ //#ifndef H5
+ uni.navigateTo({
+ url: '/pages/index/webView?url=' + url
+ });
+ //#endif
+ //#ifdef H5
+ window.location.href = url;
+ //#endif
+ }
+ // #endif
+ }
+ },
+ calculateDistance(lat1, lon1, lat2, lon2) {
+ // 将经纬度转换为弧度
+ const radLat1 = lat1 * (Math.PI / 180);
+ const radLat2 = lat2 * (Math.PI / 180);
+ const radLon1 = lon1 * (Math.PI / 180);
+ const radLon2 = lon2 * (Math.PI / 180);
+ const a = radLat1 - radLat2;
+ const b = radLon1 - radLon2;
+
+ // 使用海里公式计算距离
+ const Haversine = Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2);
+ const distance = 2 * 6371 * Math.atan2(Math.sqrt(Haversine), Math.sqrt(1 - Haversine));
+
+ // 返回单位为公里的距离
+ return distance;
+
+ },
// 开启订阅消息
openMsg() {
console.log('订阅消息')
@@ -580,6 +652,11 @@
}
})
},
+ goNavs(e){
+ uni.switchTab({
+ url:e
+ })
+ },
goNav(e){
if(e!=undefined){
uni.navigateTo({
@@ -749,8 +826,24 @@
this.$Request.get("/app/artificer/getHomeArtificerList",data).then(res => {
if (res.code == 0) {
this.starTechnician = res.startData.list;
- this.nearbyTechnician=res.nearData.list
- console.log("starTechnician",res.startData.list)
+ this.nearbyTechnician=res.nearData.list;
+ // const myLatitude = this.latitude; // 当前位置纬度
+ // const myLongitude = this.longitude; // 当前位置经度
+ // const targetLatitude = 39.919; // 目标位置纬度
+ // const targetLongitude = 116.486; // 目标位置经度
+ // const targetLatitude = ''; // 目标位置纬度
+ // const targetLongitude =''; // 目标位置经度
+ for(var i=0;i",this.nearbyTechnician)
// this.classifyId = res.data[0].id;
// this.getorderlist('')
}
diff --git a/pages/my/index.vue b/pages/my/index.vue
index dbbdd77..7c10b3a 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -32,11 +32,11 @@
优惠券
-
+
券码兑换
-
+
积分兑换
@@ -130,10 +130,12 @@
{urlImg:'../../static/my-gong-7.png',text:'设置中心',link:'/my/setting/index'},
{urlImg:'../../static/my-gong-8.png',text:'浏览历史',link:'/pages/my/historyMy'},
{urlImg:'../../static/my-gong-9.png',text:'我的团队',link:'/pages/my/myteam'},
- ]
+ ],
+ token:''
}
},
onLoad(e) {
+ this.token = uni.getStorageSync('token');
this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
if (e.money && e.couponnum) {
this.money = e.money;
@@ -323,7 +325,6 @@
}
},
goNav(e, name) {
- console.log(e)
if (this.userId) {
uni.navigateTo({
url: e
@@ -435,40 +436,110 @@
});
},
chonghi(link){//我的钱包
- if(link=='充值'){
- uni.navigateTo({
- url:'/my/wallet/index?text='+'my'
- })
- }else{
- uni.navigateTo({
- url:'/my/wallet/mymoneydetail'
+ if (this.userId) {
+ if(link=='充值'){
+ uni.navigateTo({
+ url:'/my/wallet/index?text='+'my'
+ })
+ }else{
+ uni.navigateTo({
+ url:'/my/wallet/mymoneydetail'
+ })
+ }
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
})
}
+
+
},
youhui(link){//优惠劵,券码兑换,积分兑换 跳页
+ if (this.userId) {
uni.navigateTo({
url:link
})
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ }
},
useToUrl(item){//常用功能跳转页面
var link=item.link
+ if (this.userId) {
uni.navigateTo({
url:link
})
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ }
},
meServe(item){
- if(item=="服务套餐"){
- uni.navigateTo({
- url:'/pages/my/servicePackage'
- })
- }else if(item=="项目次卡"){
- uni.navigateTo({
- url:'/pages/my/cika'
- })
- }else if(item=="服务疗程"){
- uni.navigateTo({
- url:'/pages/my/fuwuliaocheng'
+ if (this.userId) {
+ if(item=="服务套餐"){
+ uni.navigateTo({
+ url:'/pages/my/servicePackage'
+ })
+ }else if(item=="项目次卡"){
+ uni.navigateTo({
+ url:'/pages/my/cika'
+ })
+ }else if(item=="服务疗程"){
+ uni.navigateTo({
+ url:'/pages/my/fuwuliaocheng'
+ })
+ }
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
})
}
},
diff --git a/pages/my/indextaociliaoList.vue b/pages/my/indextaociliaoList.vue
index 3ead65a..7d097c7 100644
--- a/pages/my/indextaociliaoList.vue
+++ b/pages/my/indextaociliaoList.vue
@@ -45,9 +45,9 @@
+
-
@@ -113,7 +113,8 @@
that.$Request.get("/app/massage/package/findPage", {
type:that.typeData,
page:that.page,
- limit:that.limit
+ limit:that.limit,
+ title:that.searchValue
}).then(res => {
if (res.code == 0) {
if (res.data) {
@@ -160,12 +161,14 @@
/deep/.refresh-body{
height: 100% !important;
border-top: 2px solid #f7f7f7;
+ margin: 50px 0px;
}
.content-view{
width: 100%;
height: 100vh;
overflow: auto;
background-color: #f7f7f7;
+ position: relative;
}
.item-view-bottom-btn{
text-align: center;
@@ -409,6 +412,8 @@
align-items: center;
justify-content: space-between;
background-color: #fff;
+ position: fixed;
+ z-index: 999;
}
diff --git a/pages/therapist/therapist.vue b/pages/therapist/therapist.vue
index 456612f..65db353 100644
--- a/pages/therapist/therapist.vue
+++ b/pages/therapist/therapist.vue
@@ -342,7 +342,8 @@ import permision from "@/components/permission.js";
massageTypeId: null,
currentMarkerIndex: -1,
showPopup: false,
- dataIndex:''
+ dataIndex:'',
+ userId:''
}
},
@@ -410,7 +411,12 @@ import permision from "@/components/permission.js";
that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
that.getTpCount();
that.getTpMy();
-
+ that.userId = uni.getStorageSync('userId')
+ if (!this.userId) {
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ }
that.token = uni.getStorageSync('token')
if (uni.getStorageSync('token')) {
if (that.latitude && that.longitude) {
@@ -1215,14 +1221,17 @@ import permision from "@/components/permission.js";
this.page = this.page + 1;
this.getlist()
},
- onPullDownRefresh: function() {
- this.page = 1;
- this.getlist()
- },
+ // onPullDownRefresh: function() {
+ // this.page = 1;
+ // this.getlist()
+ // },
}