Merge branch 'master' of http://47.115.223.229:8888/yangjun/sadjv3_user
This commit is contained in:
commit
0f9c78d4fe
|
@ -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',
|
||||
};
|
||||
</script>
|
||||
<!-- 高德 -->
|
||||
|
|
|
@ -184,11 +184,12 @@
|
|||
"key" : "2acf1b8c3d1aaf0070472dec19018d96",
|
||||
"securityJsCode" : "2b07c8496878c327a8ae7a19de33e2a7",
|
||||
// "serviceHost" : "http://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"
|
||||
}
|
||||
}
|
||||
},
|
||||
// "serviceHost" : "http://192.168.2.222:8187/_AMapService"
|
||||
// "serviceHost" : "http://47.75.182.93:8090/_AMapService"
|
||||
"template" : "index.html"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="index-top-right">
|
||||
<image src="../../static/index-nav-4.png" mode="widthFix"></image>
|
||||
<image src="../../static/index-nav-5.png" mode="widthFix"></image>
|
||||
<image src="../../static/index-nav-4.png" @click="goChat()" mode="widthFix"></image>
|
||||
<!-- <image src="../../static/index-nav-5.png" mode="widthFix"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-top-sm flex align-center index-mian">
|
||||
|
@ -59,7 +59,7 @@
|
|||
<image src="../../static/index-fenglei1.png" mode="widthFix"></image>
|
||||
<span class="feng_word">盛安套餐</span>
|
||||
</view>
|
||||
<view class="index-project-content" @click="goNav('/pages/therapist/therapist')">
|
||||
<view class="index-project-content" @click="goNavs('/pages/therapist/therapist')">
|
||||
<image src="../../static/index-fenglei2.png" mode="widthFix"></image>
|
||||
<span class="feng_word">盛安技师</span>
|
||||
</view>
|
||||
|
@ -120,7 +120,7 @@
|
|||
<image class="index-fujin-view-img" :src="item.artificerImg" mode=""></image>
|
||||
<view class="index-fujin-view-text">
|
||||
<image src="../../static/orderDetail/dingwei.png" mode="w"></image>
|
||||
<span>1.2km</span>
|
||||
<span>{{item.dingwei}}km</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-fujin-jie">
|
||||
|
@ -145,7 +145,7 @@
|
|||
<view class="index-card">
|
||||
<view class="index-card-view" v-for="(item,index) in tjData" :key="index" @click="goDatail(item)">
|
||||
<view class="index-card-view-title">
|
||||
<image class="index-card-image" :src="item.packageImg" mode=""></image>
|
||||
<image class="index-card-image" :src="item.packageImg?item.packageImg:item.massageImg" mode=""></image>
|
||||
<!-- <view class="index-card-view-title-left">{{item.title}}</view> -->
|
||||
<view class="index-card-view-title-right">助眠解压</view>
|
||||
</view>
|
||||
|
@ -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.length;i++){
|
||||
const distance = this.calculateDistance(
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.nearbyTechnician[i].latitude,
|
||||
this.nearbyTechnician[i].longitude
|
||||
);
|
||||
this.nearbyTechnician[i].dingwei= distance.toFixed(1)
|
||||
console.log(`距离为: ${distance.toFixed(1)} km`);
|
||||
}
|
||||
console.log("starTechnician===>",this.nearbyTechnician)
|
||||
// this.classifyId = res.data[0].id;
|
||||
// this.getorderlist('')
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@
|
|||
<span class="my-head-mian-bottom-list-text">优惠券</span>
|
||||
</view>
|
||||
<view class="my-head-mian-bottom-list">
|
||||
<image src="../../static/my-juanma.png" mode=""></image>
|
||||
<image src="../../static/my-juanma.png" mode="" @click="youhui()"></image>
|
||||
<span class="my-head-mian-bottom-list-text">券码兑换</span>
|
||||
</view>
|
||||
<view class="my-head-mian-bottom-list">
|
||||
<image src="../../static/my-jifen.png" mode=""></image>
|
||||
<image src="../../static/my-jifen.png" mode="" @click="youhui()"></image>
|
||||
<span class="my-head-mian-bottom-list-text">积分兑换</span>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -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,6 +436,7 @@
|
|||
});
|
||||
},
|
||||
chonghi(link){//我的钱包
|
||||
if (this.userId) {
|
||||
if(link=='充值'){
|
||||
uni.navigateTo({
|
||||
url:'/my/wallet/index?text='+'my'
|
||||
|
@ -444,20 +446,73 @@
|
|||
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 (this.userId) {
|
||||
if(item=="服务套餐"){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/servicePackage'
|
||||
|
@ -471,6 +526,22 @@
|
|||
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('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="dataList.length==0"></empty>
|
||||
</template>
|
||||
</t-refresh>
|
||||
<empty v-if="dataList.length==0"></empty>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -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()
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.margin-bottom-sm{
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
/deep/.u-drawer,/deep/.u-mask-show{
|
||||
z-index:11 !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue