爱尚家接口合并到cms-api.websoft.top
This commit is contained in:
39
api/config.js
Executable file
39
api/config.js
Executable file
@@ -0,0 +1,39 @@
|
||||
module.exports = {
|
||||
// 系统名称
|
||||
name: "爱尚家",
|
||||
// 应用ID
|
||||
appId: 10100,
|
||||
// 租户ID
|
||||
tenantId: 10058,
|
||||
// 应用秘钥
|
||||
appSecret: '1f1d186d98ea4620ac65afbf34940051',
|
||||
|
||||
// 开发环境
|
||||
// apiUrl: "http://127.0.0.1:9095/api",
|
||||
// socketUrl: 'ws://localhost:9190',
|
||||
// fileUrl: 'https://file.wsdns.cn',
|
||||
// apiUrl: "http://47.119.165.234:5483/api",
|
||||
|
||||
|
||||
// 测试环境
|
||||
// apiUrl: 'https://server.gxwebsoft.com/api',
|
||||
// socketUrl: 'wss://server.gxwebsoft.com',
|
||||
fileUrl: 'https://file.wsdns.cn',
|
||||
|
||||
// 生产环境
|
||||
serverUrl: 'https://server.gxwebsoft.com/api',
|
||||
apiUrl: 'https://cms-api.websoft.top/api',
|
||||
socketUrl: 'wss://server.gxwebsoft.com',
|
||||
|
||||
// fileUrl: 'https://oss.jimeigroup.cn',
|
||||
|
||||
// 游客 userId
|
||||
userId: 3373,
|
||||
// 用户ID前缀
|
||||
userIdPrefix: 6675,
|
||||
// AccessKeyID
|
||||
accessKey: 'AI4TyZKCjOUwfq2qtZ',
|
||||
// AccessSecret
|
||||
accessSecret: 'rITq2UmCZ3FVEfMBbzVQoqlfjedFREwh'
|
||||
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
import http from './index.js';
|
||||
import {
|
||||
serverUrl
|
||||
} from '@/config.js';
|
||||
|
||||
// 读取字典数据
|
||||
export const getDictionaryOptions = (params) => http.get('/system/dict-data', {params})
|
||||
export const getDictionaryOptions = (params) => http.get(serverUrl + '/system/dict-data', {params})
|
||||
|
||||
export const listDictionary = (params) => http.get('/system/dict/tree', {params})
|
||||
export const listDictionary = (params) => http.get(serverUrl + '/system/dict/tree', {params})
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import http from './index.js';
|
||||
|
||||
// 分页查询房源信息
|
||||
export const pageHouseInfo = (params) => http.get('/house/info/page', {params})
|
||||
export const pageHouseInfo = (params) => http.get('/house/house-info/page', {params})
|
||||
|
||||
// 查询全部房源信息
|
||||
export const listHouseInfo = (params) => http.get('/house/info', {params})
|
||||
export const listHouseInfo = (params) => http.get('/house/house-info', {params})
|
||||
|
||||
// 查询房源信息(当期登录用户)
|
||||
export const getHouseInfo = (userId) => http.get('/house/info/' + userId)
|
||||
export const getHouseInfo = (userId) => http.get('/house/house-info/' + userId)
|
||||
|
||||
// 查询会员资料
|
||||
export const getUserDetail = (userId) => http.get('/house/info/detail/' + userId)
|
||||
export const getUserDetail = (userId) => http.get('/house/house-info/detail/' + userId)
|
||||
|
||||
// 新增房源信息
|
||||
export const addHouseInfo = (data) => http.post('/house/info', data)
|
||||
export const addHouseInfo = (data) => http.post('/house/house-info', data)
|
||||
|
||||
// 编辑房源信息
|
||||
export const updateHouseInfo = (data) => http.put('/house/info', data)
|
||||
export const updateHouseInfo = (data) => http.put('/house/house-info', data)
|
||||
|
||||
// 删除房源信息
|
||||
export const removeHouseInfo = (id) => http.delete('/house/info/' + id)
|
||||
export const removeHouseInfo = (id) => http.delete('/house/house-info/' + id)
|
||||
|
||||
|
||||
// 收藏房源
|
||||
export const likeHouse = (data) => http.post('/house/like-log', data)
|
||||
export const getLikeHouseList = () => http.get('/house/like-log')
|
||||
export const getViewsHouseList = () => http.get('/house/views-log')
|
||||
export const likeHouse = (data) => http.post('/house/house-like-log', data)
|
||||
export const getLikeHouseList = () => http.get('/house/house-like-log')
|
||||
export const getViewsHouseList = () => http.get('/house/house-views-log')
|
||||
|
||||
export default {
|
||||
pageHouseInfo,
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import http from './index.js';
|
||||
|
||||
// 分页查询房源信息
|
||||
export const pageHouseReservation = (params) => http.get('/house/reservation/page', {params})
|
||||
export const pageHouseReservation = (params) => http.get('/house/house-reservation/page', {params})
|
||||
|
||||
// 查询全部房源信息
|
||||
export const listHouseReservation = (params) => http.get('/house/reservation', {params})
|
||||
export const listHouseReservation = (params) => http.get('/house/house-reservation', {params})
|
||||
|
||||
// 查询房源信息(当期登录用户)
|
||||
export const getHouseReservation = (userId) => http.get('/house/reservation/' + userId)
|
||||
export const getHouseReservation = (userId) => http.get('/house/house-reservation/' + userId)
|
||||
|
||||
// 新增房源信息
|
||||
export const addHouseReservation = (data) => http.post('/house/reservation', data)
|
||||
export const addHouseReservation = (data) => http.post('/house/house-reservation', data)
|
||||
|
||||
// 删除房源信息
|
||||
export const removeHouseReservation = (id) => http.get('/house/reservation/remove/' + id)
|
||||
export const removeHouseReservation = (id) => http.get('/house/house-reservation/remove/' + id)
|
||||
|
||||
export default {
|
||||
pageHouseReservation,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import http from './index.js';
|
||||
import {
|
||||
serverUrl,
|
||||
apiUrl,
|
||||
fileUrl,
|
||||
accessKey,
|
||||
@@ -37,18 +38,18 @@ export const getCaptcha = (params) => http.get('/captcha', {
|
||||
})
|
||||
|
||||
// 发送短信验证码
|
||||
export const sendSmsCaptcha = (params) => http.post('/open/sendSmsCaptcha', {
|
||||
export const sendSmsCaptcha = (params) => http.post(serverUrl + '/open/sendSmsCaptcha', {
|
||||
params
|
||||
})
|
||||
|
||||
// 获取微信openId
|
||||
export const getWxOpenId = (data) => http.post('/wx-login/getWxOpenId', data)
|
||||
export const getWxOpenId = (data) => http.post(serverUrl + '/wx-login/getWxOpenId', data)
|
||||
|
||||
// 支付宝授权码换取userId
|
||||
export const getAuthCode = (data) => http.post('/open/login-alipay/getAuthCode', data)
|
||||
|
||||
// 微信手机号码登录
|
||||
export const loginMpWxMobile = (data) => http.post('/wx-login/loginByMpWxPhone', data)
|
||||
export const loginMpWxMobile = (data) => http.post(serverUrl + '/wx-login/loginByMpWxPhone', data)
|
||||
|
||||
// 获取支付宝手机号码
|
||||
export const getPhoneNumber = (data, config) => http.post('/shop/payment/getPhoneNumber', data, config)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import http from './index.js';
|
||||
|
||||
import {
|
||||
serverUrl
|
||||
} from '@/config.js';
|
||||
/**
|
||||
* 缓存工具包
|
||||
* @author 科技小王子
|
||||
@@ -7,9 +9,9 @@ import http from './index.js';
|
||||
*/
|
||||
|
||||
// 获取配置信息
|
||||
export const getConfig = () => http.get('/system/cache/config')
|
||||
export const getConfig = () => http.get(serverUrl + '/system/cache/config')
|
||||
// 添加关注
|
||||
export const addFocus = (data) => http.post('/shop/user-follow', data)
|
||||
export const addFocus = (data) => http.post(serverUrl + '/shop/user-follow', data)
|
||||
|
||||
export default {
|
||||
getConfig,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import http from './index.js';
|
||||
|
||||
// 分页查询推荐关系
|
||||
export const pageUserReferee = (params) => http.get('/shop/user-referee/page', {params})
|
||||
export const pageUserReferee = (params) => http.get('/shop/shop-user-referee/page', {params})
|
||||
|
||||
// 查询全部推荐关系
|
||||
export const listUserReferee = (params) => http.get('/shop/user-referee', {params})
|
||||
export const listUserReferee = (params) => http.get('/shop/shop-user-referee', {params})
|
||||
|
||||
// 修改推荐关系
|
||||
export const addUserReferee = (data) => http.post('/shop/user-referee', data)
|
||||
export const addUserReferee = (data) => http.post('/shop/shop-user-referee', data)
|
||||
|
||||
// 删除推荐关系
|
||||
export const removeUserReferee = (id) => http.delete('/shop/user-referee/' + id)
|
||||
export const removeUserReferee = (id) => http.delete('/shop/shop-user-referee/' + id)
|
||||
|
||||
export default {
|
||||
pageUserReferee,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import http from './index.js';
|
||||
|
||||
// 获取用户资料
|
||||
export const getUser = (params) => http.get('/auth/user', {params})
|
||||
export const getUser = (params) => http.get('https://server.gxwebsoft.com/api/auth/user', {params})
|
||||
|
||||
// 修改用户资料
|
||||
export const updateUser = (data) => http.put('/system/user', data)
|
||||
|
||||
@@ -12,14 +12,17 @@ module.exports = {
|
||||
// apiUrl: "http://127.0.0.1:9095/api",
|
||||
// socketUrl: 'ws://localhost:9190',
|
||||
// fileUrl: 'https://file.wsdns.cn',
|
||||
// apiUrl: "http://47.119.165.234:5483/api",
|
||||
|
||||
|
||||
// 测试环境
|
||||
// apiUrl: 'https://server.gxwebsoft.com/api',
|
||||
// socketUrl: 'wss://server.gxwebsoft.com',
|
||||
fileUrl: 'https://file.wsdns.com',
|
||||
fileUrl: 'https://file.wsdns.cn',
|
||||
|
||||
// 生产环境
|
||||
apiUrl: 'https://open.gxwebsoft.com/api',
|
||||
serverUrl: 'https://server.gxwebsoft.com/api',
|
||||
apiUrl: 'https://cms-api.websoft.top/api',
|
||||
socketUrl: 'wss://server.gxwebsoft.com',
|
||||
|
||||
// fileUrl: 'https://oss.jimeigroup.cn',
|
||||
@@ -33,4 +36,4 @@ module.exports = {
|
||||
// AccessSecret
|
||||
accessSecret: 'rITq2UmCZ3FVEfMBbzVQoqlfjedFREwh'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"mode" : "hash",
|
||||
"base" : "/love/"
|
||||
},
|
||||
"title" : "爱尚客网"
|
||||
"title" : "爱尚家"
|
||||
}
|
||||
}
|
||||
/* ios打包配置 *//* SDK配置 */
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
{
|
||||
"path": "pages/login/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "爱尚客"
|
||||
"navigationBarTitleText": "爱尚家"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -173,7 +173,7 @@
|
||||
"rpxCalcIncludeWidth": 9999, // rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750
|
||||
// #endif
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTitleText": "爱尚客",
|
||||
"navigationBarTitleText": "爱尚家",
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundTextStyle": "dark"
|
||||
},
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
<u-icon name="checkbox-mark"></u-icon>
|
||||
购买代表同意爱尚客网
|
||||
购买代表同意爱尚家网
|
||||
<text @click="$push('pages/article/detail/detail?id=116')">《人工牵线协议》</text>
|
||||
</view>
|
||||
</u--form>
|
||||
|
||||
@@ -76,14 +76,15 @@
|
||||
},
|
||||
// 1. 未登录则使用免密登录方式登录(游客身份)
|
||||
onLogin() {
|
||||
const token = storage.get(ACCESS_TOKEN)
|
||||
if (!token) {
|
||||
getToken().then(res => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
})
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
// const token = storage.get(ACCESS_TOKEN)
|
||||
// if (!token) {
|
||||
// getToken().then(res => {
|
||||
|
||||
// })
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,8 +134,8 @@
|
||||
canReset: false,
|
||||
disabled: false,
|
||||
swiperList: [
|
||||
'https://file.wsdns.cn/20230802/1116a02b07904991b2ebdc2c3da4a691.png',
|
||||
'https://file.wsdns.cn/20230802/f33f5ac239c843438b36f40941d946ef.png',
|
||||
'https://oss.wsdns.cn/20240708/9e1f58e7fc7b4bad92edd852ff34dbcb.png?x-oss-process=image/resize,w_750/quality,Q_90',
|
||||
'https://oss.wsdns.cn/20240708/c95838b78b5746eb934daffb12a2efdc.png?x-oss-process=image/resize,w_750/quality,Q_90',
|
||||
],
|
||||
hotKeywords: [
|
||||
'五象航洋城',
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
@click="$push('pages/checkout/checkout',{priceId,planId,comments,price})"></u-button>
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
购买即同意爱尚客网<text @click="$push('pages/article/detail/detail?id=116')">《人工牵线协议》</text>
|
||||
购买即同意爱尚家网<text @click="$push('pages/article/detail/detail?id=116')">《人工牵线协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -214,7 +214,7 @@
|
||||
@click="$push('pages/checkout/checkout',{priceId,planId,comments,price})"></u-button>
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
购买即同意爱尚客网<text @click="$push('pages/article/detail/detail?id=116')">《人工牵线协议》</text>
|
||||
购买即同意爱尚家网<text @click="$push('pages/article/detail/detail?id=116')">《服务协议》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
<u-icon name="checkbox-mark"></u-icon>
|
||||
购买代表同意爱尚客网
|
||||
购买代表同意爱尚家网
|
||||
<text>《婚介协议》</text>
|
||||
</view>
|
||||
</u--form>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
<u-icon name="checkbox-mark"></u-icon>
|
||||
购买代表同意爱尚客网
|
||||
购买代表同意爱尚家网
|
||||
<text @click="$push('pages/article/detail/detail?id=117')">《品牌合作协议》</text>
|
||||
</view>
|
||||
</u--form>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '爱尚客',
|
||||
title: '爱尚家',
|
||||
path: 'pages/index/index?user_id=' + uni.getStorageSync('userId')
|
||||
}
|
||||
},
|
||||
@@ -179,7 +179,7 @@
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
imageUrl: "https://file.wsdns.cn/qrcode/M4WhwQv2.png",
|
||||
title: '爱尚客',
|
||||
title: '爱尚家',
|
||||
miniProgram: {
|
||||
id: 'gh_39f1f8019c3f',
|
||||
path: 'pages/index/index',
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
<u-form-item prop="propertyFees">
|
||||
<u-cell title="物业费" :isLink="false">
|
||||
<u-cell title="物业费(元/m²)" :isLink="false">
|
||||
<u-input type="digit" slot="value" class="input" v-model="form.propertyFees"
|
||||
inputAlign="right" maxlength="30" :border="false" placeholder="请输入物业费" />
|
||||
</u-cell>
|
||||
@@ -114,7 +114,7 @@
|
||||
</u-cell>
|
||||
</u-form-item>
|
||||
<u-form-item prop="password">
|
||||
<u-cell title="密码" :isLink="false">
|
||||
<u-cell title="如何看房" :isLink="false">
|
||||
<u-input slot="value" class="input" v-model="form.password" inputAlign="right"
|
||||
maxlength="30" :border="false" placeholder="请输入房屋密码" />
|
||||
</u-cell>
|
||||
@@ -173,9 +173,17 @@
|
||||
<text class="title">房源视频</text>
|
||||
</view>
|
||||
<view class="form-wrapper">
|
||||
<view class="images">
|
||||
<view class="video-box" style="position: relative;" v-if="form.videoUrl">
|
||||
<view class="colse" style="position: absolute; top: 0; right: 30px; width: 26px; height: 26px;color: #000000; z-index: 88; font-size: 24px; background-color: #cccccc; display: flex;justify-content: center; align-items: center;" @click="closeVideo">
|
||||
X
|
||||
</view>
|
||||
<video loop class="swiper-video" muted :autoplay="false" :src="form.videoUrl"></video>
|
||||
</view>
|
||||
|
||||
<view v-else class="images" style="display: flex; flex-direction: column; justify-content: center; ">
|
||||
<u-upload :fileList="fileList2" :maxSize="31457280" :width="72" :height="72" accept="video"
|
||||
@afterRead="afterRead" @delete="deleteVideo" name="2" multiple :maxCount="1"></u-upload>
|
||||
<text style="padding-left: 8px;">上传视频</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
@@ -192,6 +200,18 @@
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item prop="introduction">
|
||||
<view class="his-head">
|
||||
<text class="title">管理员备注</text>
|
||||
</view>
|
||||
<view class="form-wrapper">
|
||||
<view class="textarea">
|
||||
<u--textarea v-model="form.comments" placeholder="请输备注"
|
||||
:customStyle="{backgroundColor: '#f3f3f3'}" maxlength="200"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
|
||||
<block v-if="dict">
|
||||
<u-action-sheet :show="showSex" :actions="actions" title="请选择性别" description="请选择男或女"
|
||||
@@ -653,6 +673,13 @@
|
||||
closeToward() {
|
||||
this.showToward = false
|
||||
},
|
||||
|
||||
closeVideo(){
|
||||
this.form.videoUrl = ''
|
||||
updateHouseInfo(this.form).then(res => {
|
||||
this.$toast('删除成功')
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
confirmRegion(e) {
|
||||
|
||||
@@ -4,22 +4,24 @@
|
||||
<!-- 幻灯片 -->
|
||||
<view class="swiper">
|
||||
<view v-show="swiperType == 'image'">
|
||||
<u-swiper :list="swiperList" height="500rpx" :radius="0" @change="e => currentNum = e.current"
|
||||
<u-swiper :list="swiperList" height="500rpx" :radius="0" @change="e => currentNum = e.current"
|
||||
indicatorStyle="right: 20px; bottom: 50px" @click="click">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="video-box" v-show="swiperType == 'video'">
|
||||
<video loop class="swiper-video" muted :autoplay="true" :src="form.videoUrl"></video>
|
||||
</view>
|
||||
<view class="swiper-switch">
|
||||
<view @click="swiperType = 'image'" :class="{active: swiperType == 'image'}" class="swiper-switch-item">图片</view>
|
||||
<view @click="swiperType = 'video'" :class="{active: swiperType == 'video'}" class="swiper-switch-item">视频</view>
|
||||
<view @click="swiperType = 'image'" :class="{active: swiperType == 'image'}" class="swiper-switch-item">
|
||||
图片</view>
|
||||
<view @click="swiperType = 'video'" :class="{active: swiperType == 'video'}" class="swiper-switch-item">
|
||||
视频</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 房源参数 -->
|
||||
<view class="house-info">
|
||||
@@ -29,9 +31,9 @@
|
||||
</view>
|
||||
<scroll-view scroll-x class="">
|
||||
<view class="label">
|
||||
<view class="u-page__tag-item" :key="index" v-for="(tag, index) in form.houseLabel">
|
||||
<u-tag :text="tag" type="primary" plain size="mini"></u-tag>
|
||||
</view>
|
||||
<view class="u-page__tag-item" :key="index" v-for="(tag, index) in form.houseLabel">
|
||||
<u-tag :text="tag" type="primary" plain size="mini"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="dict">
|
||||
@@ -69,7 +71,7 @@
|
||||
区/县:{{ form.region || '' }}
|
||||
</view>
|
||||
<view class="item col-1">
|
||||
详细地址:{{ form.address || '' }}
|
||||
物业地址:{{ form.address || '' }}
|
||||
</view>
|
||||
<view class="item col-2">
|
||||
租金(元/m²):{{ form.rent || '' }}
|
||||
@@ -78,10 +80,10 @@
|
||||
房号:{{ form.roomNumber || '' }}
|
||||
</view>
|
||||
<view v-if="isManager" class="item col-2">
|
||||
密码:{{ form.password || '' }}
|
||||
如何看房:{{ form.password || '' }}
|
||||
</view>
|
||||
<view v-if="isManager" class="item col-2">业主电话:{{ form.phone || '' }}</view>
|
||||
<view v-if="isManager" class="item col-2">物业费:{{ form.propertyFees || '' }}</view>
|
||||
<view v-if="isManager" class="item col-2" @click="makePhoneCall">业主电话:{{ form.phone || '' }}</view>
|
||||
<view class="item col-2">物业费(元/m²):{{ form.propertyFees || '' }}</view>
|
||||
<!-- <view v-if="isManager" class="item col-2">租期:{{ form.tenancy || '' }}</view> -->
|
||||
<view class="item col-2" v-if="isManager">
|
||||
佣金:{{ form.commission || '' }}
|
||||
@@ -153,7 +155,8 @@
|
||||
<text v-else>收藏</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<u-button icon="map" type="error" text="预约看房" disabled @click="$push('sub_pages/checkout/checkout?id=' + form.houseId)"></u-button>
|
||||
<u-button icon="map" type="error" text="预约看房" disabled
|
||||
@click="$push('sub_pages/checkout/checkout?id=' + form.houseId)"></u-button>
|
||||
</view>
|
||||
<view class="item">
|
||||
<u-button icon="phone" type="primary" text="电话咨询" disabled @click="onCall()"></u-button>
|
||||
@@ -319,25 +322,25 @@
|
||||
onLoad(options) {
|
||||
this.houseId = options.houseId
|
||||
this.getHouseInfo()
|
||||
|
||||
if(options.user_id) {
|
||||
|
||||
if (options.user_id) {
|
||||
getAgentUser(options.user_id).then(res => {
|
||||
this.agentUser = res.data
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
DictApi.getDictionaryOptions({
|
||||
dictCode: 'service'
|
||||
}).then(res => {
|
||||
this.phone = res.data[0].dictDataCode
|
||||
})
|
||||
}
|
||||
getUser().then(res=>{
|
||||
this.isManager = res.data.gradeId == 16
|
||||
}).catch((err)=>{
|
||||
getUser().then(res => {
|
||||
this.isManager = res.data.gradeId == 16
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
onBackPress() {},
|
||||
@@ -370,15 +373,15 @@
|
||||
app.swiperList = app.form.files
|
||||
app.form.houseLabel = JSON.parse(res.data.houseLabel) || []
|
||||
// app.form.supporting = JSON.parse(res.data.supporting) || []
|
||||
|
||||
try{
|
||||
|
||||
try {
|
||||
app.form.supporting = JSON.parse(app.form.supporting)
|
||||
console.log('app.form.supporting: ',app.form.supporting);
|
||||
}catch(e){
|
||||
console.log('app.form.supporting: ', app.form.supporting);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
|
||||
uni.$u.mpShare = {
|
||||
title: `${app.form.houseTitle} ${app.form.monthlyRent}元/月 ${app.form.houseType} ${app.form.extent}m²`,
|
||||
path: `sub_pages/house/detail?houseId=${app.form.houseId}&user_id=${uni.getStorageSync('userId')}`
|
||||
@@ -393,7 +396,7 @@
|
||||
HouseInfoApi.likeHouse({
|
||||
houseId: this.form.houseId,
|
||||
houseUserId: this.form.userId
|
||||
}).then(res=>{
|
||||
}).then(res => {
|
||||
app.form.liked = res.data
|
||||
})
|
||||
},
|
||||
@@ -402,13 +405,36 @@
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.agentUser.phone
|
||||
})
|
||||
}else if(this.phone) {
|
||||
} else if (this.phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.phone
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
makePhoneCall() {
|
||||
if (!this.form.phone) {
|
||||
uni.showToast({
|
||||
title: '暂无电话号码',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.form.phone,
|
||||
success: () => {
|
||||
console.log('拨打电话成功')
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('拨打电话失败', err)
|
||||
uni.showToast({
|
||||
title: '拨打电话失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -478,6 +504,7 @@
|
||||
.label {
|
||||
margin: 10rpx 0;
|
||||
display: flex;
|
||||
|
||||
.u-page__tag-item {
|
||||
margin-bottom: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
@@ -651,17 +678,20 @@
|
||||
.demo-layout {
|
||||
color: #ff0000;
|
||||
}
|
||||
.video-box{
|
||||
|
||||
.video-box {
|
||||
width: 750rpx;
|
||||
height: 500rpx;
|
||||
text-align: center;
|
||||
|
||||
.swiper-video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.swiper-switch{
|
||||
|
||||
.swiper-switch {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
border-radius: 20rpx;
|
||||
@@ -670,6 +700,7 @@
|
||||
background-color: rgba(0, 0, 0, 0.35);
|
||||
left: 30rpx;
|
||||
bottom: 100rpx;
|
||||
|
||||
&-item {
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
@@ -677,10 +708,11 @@
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
&.active {
|
||||
background-color: #FFFFFF;
|
||||
color: #333333;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
methods: {
|
||||
onRefreshList() {
|
||||
const app = this
|
||||
const userId = uni.getStorageSync('userId')
|
||||
// const userId = uni.getStorageSync('userId')
|
||||
app.where.page = app.page
|
||||
app.where.userId = userId
|
||||
// app.where.userId = userId
|
||||
return new Promise((resolve, reject) => {
|
||||
HouseInfoApi.pageHouseInfo(app.where)
|
||||
.then(result => {
|
||||
@@ -404,4 +404,4 @@
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
imageUrl: "https://file.wsdns.cn/qrcode/M4WhwQv2.png",
|
||||
title: '爱尚客',
|
||||
title: '爱尚家',
|
||||
miniProgram: {
|
||||
id: 'gh_39f1f8019c3f',
|
||||
path: 'pages/index/index',
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
console.log(res.target)
|
||||
}
|
||||
return {
|
||||
title: '爱尚客',
|
||||
title: '爱尚家',
|
||||
path: 'pages/index/index?user_id=' + uni.getStorageSync('userId')
|
||||
}
|
||||
},
|
||||
@@ -179,7 +179,7 @@
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
imageUrl: "https://file.wsdns.cn/qrcode/M4WhwQv2.png",
|
||||
title: '爱尚客',
|
||||
title: '爱尚家',
|
||||
miniProgram: {
|
||||
id: 'gh_39f1f8019c3f',
|
||||
path: 'pages/index/index',
|
||||
|
||||
Reference in New Issue
Block a user