提交 78b56364 authored 作者: 何忠建's avatar 何忠建

优化调整

上级 035b6dff
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
//获取手机号 //获取手机号
onGetPhoneNumber(e) { onGetPhoneNumber(e) {
let _this = this let _this = this
if (_this.result.sessionKey) {
if (e.detail.errMsg === "getPhoneNumber:fail user deny") { //用户决绝授权 if (e.detail.errMsg === "getPhoneNumber:fail user deny") { //用户决绝授权
//拒绝授权后弹出一些提示 //拒绝授权后弹出一些提示
uni.showModal({ uni.showModal({
...@@ -110,6 +111,15 @@ ...@@ -110,6 +111,15 @@
} else { //允许授权 } else { //允许授权
_this.getUserPhone(e) _this.getUserPhone(e)
} }
} else {
wx.login({
success(res) {
if (res.code) {
_this.getCode(res.code)
}
}
})
}
}, },
// 获取手机号 // 获取手机号
async getUserPhone(e) { async getUserPhone(e) {
...@@ -139,7 +149,7 @@ ...@@ -139,7 +149,7 @@
uni.setStorageSync('token', res.result.token); uni.setStorageSync('token', res.result.token);
let userInfo = res.result.userInfo; let userInfo = res.result.userInfo;
if (userInfo) { if (userInfo) {
uni.setStorageSync('platform_code',userInfo.platformCode) uni.setStorageSync('platform_code', userInfo.platformCode)
uni.setStorageSync('user_phone', userInfo.phone); uni.setStorageSync('user_phone', userInfo.phone);
uni.setStorageSync('user_name', userInfo.realname); uni.setStorageSync('user_name', userInfo.realname);
let img = userInfo.avatar ? let img = userInfo.avatar ?
...@@ -148,7 +158,7 @@ ...@@ -148,7 +158,7 @@
} }
this.$emit('loginEnd') this.$emit('loginEnd')
this.$refs.authorization.close() this.$refs.authorization.close()
}else{ } else {
wx.clearStorage() wx.clearStorage()
} }
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="picture-box"> <view class="picture-box">
<text class="text">头像</text> <text class="text">头像</text>
<button class="button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" hover-class="none"> <button class="button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" hover-class="none">
<image class="avatar" :src="userForm.userAvatarUrl || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'" mode="aspectFill"></image> <image class="avatar" :src="userForm.userAvatarUrl" mode="aspectFill" v-if="userForm.userAvatarUrl"></image>
</button> </button>
</view> </view>
<view class="picture-box"> <view class="picture-box">
......
...@@ -63,10 +63,12 @@ http.interceptors.response.use((response) => { ...@@ -63,10 +63,12 @@ http.interceptors.response.use((response) => {
} }
}, 30) }, 30)
//未登录时清空缓存跳转 //未登录时清空缓存跳转
if (response.statusCode == 401) { if (!response.statusCode) {
wx.clearStorage()
}else if (response.statusCode == 401) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: 'Token失效,请重新登录!' title: '登录过期,请重新登录!'
}) })
wx.clearStorage() wx.clearStorage()
uni.showTabBar() uni.showTabBar()
......
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
isFinish: false isFinish: false
} }
}, },
computed: { computed: {},
},
methods: { methods: {
async getList(flag) { async getList(flag) {
let { let {
result result
} = await getCompanyListApi(this.page) } = await getCompanyListApi(this.page)
if (result && result.records) {
let data = result.records; let data = result.records;
if (flag) { if (flag) {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
} else { } else {
this.page.pageNo += 1 this.page.pageNo += 1
} }
}
}, },
onChangeHouse(item) { onChangeHouse(item) {
if (item.communityCode) { if (item.communityCode) {
...@@ -106,10 +109,10 @@ ...@@ -106,10 +109,10 @@
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
.item { .item {
font-size: 28rpx; font-size: 32rpx;
color: #373737; color: #373737;
height: 84rpx; height: 100rpx;
line-height: 84rpx; line-height: 100rpx;
border-bottom: 1px solid #F8F6F9; border-bottom: 1px solid #F8F6F9;
&.active { &.active {
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<uni-icons type="person" size="20px" color="#666666" v-else <uni-icons type="person" size="20px" color="#666666" v-else
@click="toLogin"></uni-icons> @click="toLogin"></uni-icons>
</view> </view>
<view class="name" v-if="userPhone">{{userPhone}}</view> <view class="name" v-if="userName">{{userName}}</view>
<view class="name" v-else @click="toLogin">未登录</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -391,6 +392,7 @@ ...@@ -391,6 +392,7 @@
if (token) { if (token) {
this.isLogin = true this.isLogin = true
this.userAvatar = uni.getStorageSync('user_avatar') this.userAvatar = uni.getStorageSync('user_avatar')
this.userName = uni.getStorageSync('user_name')
this.userPhone = uni.getStorageSync('user_phone') this.userPhone = uni.getStorageSync('user_phone')
this.getData(); this.getData();
} else { } else {
...@@ -409,6 +411,7 @@ ...@@ -409,6 +411,7 @@
if (token) { if (token) {
this.isLogin = true this.isLogin = true
this.userAvatar = uni.getStorageSync('user_avatar') this.userAvatar = uni.getStorageSync('user_avatar')
this.userName = uni.getStorageSync('user_name')
this.userPhone = uni.getStorageSync('user_phone') this.userPhone = uni.getStorageSync('user_phone')
} else { } else {
wx.clearStorage() wx.clearStorage()
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="image"> <view class="image">
<image <image
:src="imageURL+details.communityImage" :src="imageURL+details.communityImage"
class="icon"></image> class="icon" v-if="details.communityImage"></image>
</view> </view>
<view class="details"> <view class="details">
<view class="content"> <view class="content">
...@@ -76,25 +76,6 @@ ...@@ -76,25 +76,6 @@
...result ...result
} }
}, },
async onSubmit() {
// await editCommunityRepairApi({
// id: this.formModel.id,
// repairEvaluate: this.evaluation,
// evaluateCount: this.rateValue
// })
// uni.$emit('change-maintenance');
// setTimeout(() => {
// uni.showToast({
// title: '评价成功!',
// icon: 'none'
// });
// setTimeout(() => {
// uni.navigateBack({
// delta: 2
// });
// }, 1500)
// }, 30)
},
}, },
onLoad(option) { onLoad(option) {
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
let { let {
result result
} = await getCompanyListApi(this.page) } = await getCompanyListApi(this.page)
if (result && result.records) {
let data = result.records; let data = result.records;
if (flag) { if (flag) {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
...@@ -61,6 +62,7 @@ ...@@ -61,6 +62,7 @@
} else { } else {
this.page.pageNo += 1 this.page.pageNo += 1
} }
}
}, },
toDetails(id) { toDetails(id) {
if (id) { if (id) {
......
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
头像 头像
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<image <image :src="formData.avatar" class="icon" v-if="formData.avatar"></image>
:src="formData.avatar || 'https://life.cloud.hjxbc.cn/sys/common/static/scott/pic/lxLTJxnMqmF4536a26893262a4d66527a51bcab612c9_1687861702460.png'"
class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons> <uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view> </view>
</view> </view>
...@@ -83,7 +81,7 @@ ...@@ -83,7 +81,7 @@
data() { data() {
return { return {
formData: { formData: {
id:'', id: '',
avatar: '', avatar: '',
temAvatar: '', temAvatar: '',
realname: '', realname: '',
...@@ -117,7 +115,7 @@ ...@@ -117,7 +115,7 @@
let userInfo = res.result.userInfo; let userInfo = res.result.userInfo;
let avatar = userInfo.avatar ? `${serverConfig.imageURL}${userInfo.avatar}` : '' let avatar = userInfo.avatar ? `${serverConfig.imageURL}${userInfo.avatar}` : ''
this.formData = { this.formData = {
id:userInfo.id, id: userInfo.id,
avatar, avatar,
temAvatar: userInfo.avatar, temAvatar: userInfo.avatar,
realname: userInfo.realname, realname: userInfo.realname,
...@@ -127,6 +125,8 @@ ...@@ -127,6 +125,8 @@
address: userInfo.platformName, address: userInfo.platformName,
//platformCode: userInfo.platformCode //platformCode: userInfo.platformCode
} }
uni.setStorageSync('user_phone', userInfo.phone);
uni.setStorageSync('user_name', avatar);
} }
}, },
onOpenAvatar() { onOpenAvatar() {
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
} }
let avatar = uploadImg || this.formData.temAvatar let avatar = uploadImg || this.formData.temAvatar
await userEditApi({ await userEditApi({
id:this.formData.id, id: this.formData.id,
avatar, avatar,
realname: this.formData.realname, realname: this.formData.realname,
sex: this.formData.sex, sex: this.formData.sex,
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
</view> </view>
<view class="item"> <view class="item">
<view class="name">支付方式</view> <view class="name">支付方式</view>
<view class="detail">{{details.payWay}}</view> <view class="detail">
<template v-if="details.payWay === 'payPropertyFee'">抵扣物业费</template>
<template v-else-if="details.payWay === 'refundOrder'">申请退款</template>
<template v-else-if="details.payWay === 'scanQrCodePay'">扫码支付</template>
</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">订单来源</view> <view class="name">订单来源</view>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
</template> </template>
<script> <script>
import serverConfig from '@/config/server_config.js';
import { import {
getShopQrCode getShopQrCode
} from '@/config/api.js' } from '@/config/api.js'
...@@ -26,28 +27,42 @@ ...@@ -26,28 +27,42 @@
}, },
data() { data() {
return { return {
baseURL: '',
imgUrl: '' imgUrl: ''
} }
}, },
methods: { methods: {
async getDetail(code) { getDetail(code) {
let { const token = uni.getStorageSync('token');
result const tenantId = uni.getStorageSync('platform_code');
} = await getShopQrCode({ uni.request({
url: this.baseURL + "/property-central/shop/shopInfo/getQrCode",
method: "GET",
header: {
'content-type': 'application/json;charset:utf-8',
'X-Access-Token': token,
'tenant-id': tenantId
},
responseType: "arraybuffer",
data: {
shopCode: code, shopCode: code,
platformType: 'partner' platformType: "partner"
}) },
if (result && result != undefined) { success: res => {
this.imgUrl = window.URL.createObjectURL(new Blob([result])); let datas = res.data
} this.imgUrl = 'data:image/jpeg;base64,'+ uni.arrayBufferToBase64(datas)
},
});
} }
}, },
onLoad(option) { onLoad(option) {
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
if (token && option.code) { if (token && option.code) {
this.baseURL = `${serverConfig.baseURL}`
this.getDetail(option.code) this.getDetail(option.code)
} }
} },
} }
</script> </script>
<style> <style>
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<view class="item text"> <view class="item text">
<view class="name">商铺图</view> <view class="name">商铺图</view>
<view class="image"> <view class="image">
<image :src="imageURL+details.logoUrl" class="icon"></image> <image :src="imageURL+details.logoUrl" class="icon" v-if="details.logoUrl"></image>
</view> </view>
</view> </view>
<view class="item text"> <view class="item text">
......
...@@ -6,11 +6,13 @@ ...@@ -6,11 +6,13 @@
@cancel="cancel" /> @cancel="cancel" />
</view> </view>
<view class="list" v-if="dataList.length"> <view class="list" v-if="dataList.length">
<view class="item" v-for="item in dataList" :key="item.id" <view class="item" v-for="item in dataList" :key="item.id" @click="toDetails(item)">
@click="toDetails(item)">
<image mode="aspectFill" :src="imageURL+item.shopInfo.logoUrl" class="icon"></image> <image mode="aspectFill" :src="imageURL+item.shopInfo.logoUrl" class="icon"></image>
<view class="con"> <view class="con">
<view class="name">{{item.shopName}}</view> <view class="name">{{item.shopName}}
<view class="tag purple" v-if="item.bindPartners === 'Y'">未绑定</view>
<view class="tag gray" v-else>已绑定</view>
</view>
<view class="text">{{item.shopInfo.shopContent}}</view> <view class="text">{{item.shopInfo.shopContent}}</view>
<view class="card"> <view class="card">
<image mode="aspectFill" src="../../static/images/icon_licence.png" class="icon"></image> <image mode="aspectFill" src="../../static/images/icon_licence.png" class="icon"></image>
...@@ -38,19 +40,20 @@ ...@@ -38,19 +40,20 @@
data() { data() {
return { return {
page: { page: {
column:'createTime', column: 'createTime',
order:'desc', order: 'desc',
pageSize: 10, pageSize: 10,
pageNo: 1 pageNo: 1,
auditStatus: 'auditPass',
shopStatus: 'normal'
}, },
dataList: [], dataList: [],
isFinish: false, isFinish: false,
imageURL: '', imageURL: '',
communityCode:'' communityCode: ''
} }
}, },
computed: { computed: {},
},
methods: { methods: {
async getList(flag) { async getList(flag) {
let { let {
...@@ -86,9 +89,16 @@ ...@@ -86,9 +89,16 @@
}, },
toDetails(item) { toDetails(item) {
if (item.shopInfo.id) { if (item.shopInfo.id) {
if (item.bindPartners === 'Y') {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopsDetails/index?id=${item.shopInfo.id}&code=${this.communityCode}` url: `/pages/shopsDetails/index?id=${item.shopInfo.id}&code=${this.communityCode}`
}); });
} else {
uni.showToast({
icon: "none",
title: '该商铺已绑定合作伙伴,请重新选择!'
})
}
} }
}, },
}, },
...@@ -165,6 +175,7 @@ ...@@ -165,6 +175,7 @@
.con { .con {
margin-left: 30rpx; margin-left: 30rpx;
padding-right: 10rpx; padding-right: 10rpx;
width: 100%;
.name { .name {
font-size: 32rpx; font-size: 32rpx;
...@@ -180,6 +191,29 @@ ...@@ -180,6 +191,29 @@
} }
.tag {
padding: 0 24rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
text-align: center;
border-radius: 36rpx;
float: right;
}
.purple {
color: #6A59F2;
background-color: #F5F4FF;
border: 1px solid #6A59F2;
}
.gray {
color: #B6B6BA;
background-color: #F8F8F8;
border: 1px solid #B6B6BA;
}
.text { .text {
font-size: 28rpx; font-size: 28rpx;
color: #9D9CA6; color: #9D9CA6;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</view> </view>
<view class="withdrawal"> <view class="withdrawal">
<view class="list" v-if="dataList.length"> <view class="list" v-if="dataList.length">
<view class="item" v-for="item in dataList" :key="item.id"> <view class="item" v-for="item in dataList" :key="item.id" @click="toDetail(item.id)">
<view class="title"> <view class="title">
<view class="name">{{item.balanceNum}}</view> <view class="name">{{item.balanceNum}}</view>
<view class="tag">已结算</view> <view class="tag">已结算</view>
...@@ -78,6 +78,13 @@ ...@@ -78,6 +78,13 @@
this.page.pageNo += 1 this.page.pageNo += 1
} }
}, },
toDetail(id) {
if (id) {
uni.navigateTo({
url: `/pages/settlementDetails/index?id=${id}`,
});
}
},
search(value) { search(value) {
if (value.value) { if (value.value) {
this.page.balanceNum = value.value.toString(); this.page.balanceNum = value.value.toString();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论