修改im接口报错问题

This commit is contained in:
2023-02-08 12:03:48 +08:00
26 changed files with 215 additions and 259 deletions

View File

@@ -33,18 +33,18 @@
<m-city :provinceData="list" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" pickerSize="4">
</m-city>
<uniMap v-if="mapFlage" @close="closeMap" @callback="callBackAddress" />
<uniMap v-if="mapFlag" @close="closeMap" @callback="callBackAddress" />
</div>
</view>
</template>
<script>
import { addAddress, editAddress, getAddressDetail } from "@/api/address.js";
import gkcity from "@/components/m-city/m-city.vue";
import city from "@/components/m-city/m-city.vue";
import uniMap from "./uniMap";
import permision from "@/js_sdk/wa-permission/permission.js";
export default {
components: {
"m-city": gkcity,
"m-city": city,
uniMap,
},
onShow() {
@@ -53,7 +53,7 @@ export default {
methods: {
// 关闭地图
closeMap() {
this.mapFlage = false;
this.mapFlag = false;
},
// 打开地图并访问权限
clickUniMap() {
@@ -61,8 +61,8 @@ export default {
if (plus.os.name == "iOS") {
// ios系统
permision.judgeIosPermission("location")
? (this.mapFlage = true)
: this.refuseMapOuther();
? (this.mapFlag = true)
: this.refuseMap();
} else {
// 安卓
this.requestAndroidPermission(
@@ -72,12 +72,12 @@ export default {
// #endif
// #ifndef APP-PLUS
this.mapFlage = true;
this.mapFlag = true;
// #endif
},
// 如果拒绝权限 提示区设置
refuseMapOuther() {
refuseMap() {
uni.showModal({
title: "温馨提示",
content: "您已拒绝定位,请开启",
@@ -113,9 +113,9 @@ export default {
var result = await permision.requestAndroidPermission(permisionID);
if (result == 1) {
this.mapFlage = true;
this.mapFlag = true;
} else {
this.refuseMapOuther();
this.refuseMap();
}
},
@@ -136,7 +136,7 @@ export default {
uni.hideLoading();
}
this.mapFlage = !this.mapFlage; //关闭地图
this.mapFlag = !this.mapFlag; //关闭地图
},
// 保存当前 地址
@@ -206,7 +206,7 @@ export default {
data() {
return {
lightColor: this.$lightColor, //高亮颜色
mapFlage: false, // 地图选择开
mapFlag: false, // 地图选择开
routerVal: "",
form: {
detail: "", //地址详情

View File

@@ -29,7 +29,8 @@ export default {
});
});
},
fail() {
fail(e) {
console.log(e)
that.$emit("close");
},
});

View File

@@ -14,7 +14,7 @@
<swiper class="swiper-box" :current="swiperCurrent">
<swiper-item class="swiper-item" v-for="index in list.length" :key="index">
<scroll-view class="scroll-v view-wrapper" enableBackToTop="true" scroll-with-animation scroll-y @scrolltolower="loadMore">
<view v-if="datas.length!=0" class="view-item" v-for="(logItem, logIndex) in datas" :key="logIndex">
<view v-if="depositData.length!=0" class="view-item" v-for="(logItem, logIndex) in depositData" :key="logIndex">
<view class="view-item-detail">
<view class="-title">{{logItem.detail}}</view>
<!-- <view class="-number">{{logItem.detail}}</view> -->
@@ -27,7 +27,7 @@
</view>
</view>
<u-empty v-if="datas.length==0" mode="history" text="暂无记录" />
<u-empty v-if="depositData.length==0" mode="history" text="暂无记录" />
</scroll-view>
@@ -45,7 +45,6 @@ export default {
data() {
return {
walletNum: 0,
current: 0,
swiperCurrent: 0,
userInfo: "", //用户详情信息
@@ -54,7 +53,7 @@ export default {
pageSize: 10,
order: "desc",
},
datas: [], //遍历的数据集合
depositData: [], //遍历的数据集合
rechargeList: "", //充值明细列表
walletLogList: "", //钱包变动列表
list: [
@@ -82,12 +81,10 @@ export default {
/**分页获取预存款充值记录 */
getRecharge() {
getUserRecharge(this.params).then((res) => {
if (res.data.success) {
if (res.data.result.records.length != 0) {
this.datas.push(...res.data.result.records);
this.depositData.push(...res.data.result.records);
}
}
});
@@ -98,7 +95,7 @@ export default {
getWalletLog(this.params).then((res) => {
if (res.data.success) {
if (res.data.result.records.length != 0) {
this.datas.push(...res.data.result.records);
this.depositData.push(...res.data.result.records);
}
}
});
@@ -106,7 +103,7 @@ export default {
changed(index) {
this.datas = [];
this.depositData = [];
this.swiperCurrent = index;
this.params.pageNumber = 1;
if (index == 0) {

View File

@@ -5,11 +5,11 @@
<div class="deposit">预存款金额</div>
<div class="money">{{walletNum | unitPrice }}</div>
<div class="operation-btns">
<div class="operation-btn light" @click="navgition('/pages/mine/deposit/withdrawal')">提现</div>
<div class="operation-btn" @click="navgition('/pages/mine/deposit/recharge')">充值</div>
<div class="operation-btn light" @click="navigateTo('/pages/mine/deposit/withdrawal')">提现</div>
<div class="operation-btn" @click="navigateTo('/pages/mine/deposit/recharge')">充值</div>
</div>
</div>
<div class="box list" @click="navgition('/pages/mine/deposit/index')">
<div class="box list" @click="navigateTo('/pages/mine/deposit/index')">
<div class="list-left">预存款明细</div>
<div class="list-right">
<u-icon name="arrow-right"></u-icon>
@@ -31,12 +31,6 @@ export default {
let result = await getUserWallet(); //预存款
this.walletNum = result.data.result.memberWallet;
} else {
uni.showToast({
icon: "none",
duration: 3000,
title: "请先登录!",
});
this.$options.filters.navigateToLogin("redirectTo");
}
},
@@ -49,7 +43,7 @@ export default {
/**
* 跳转
*/
navgition(url) {
navigateTo(url) {
uni.navigateTo({
url,
});

View File

@@ -98,7 +98,7 @@ export default {
.nav-list {
color: #fff;
padding: 40rpx 0;
background: $aider-light-color;
background: linear-gradient(91deg, $light-color 1%, $aider-light-color 99%);
}
.total {
padding: 10rpx 0;

View File

@@ -25,7 +25,7 @@
<view>{{ item.content }}</view>
<view>{{ item.createTime}}</view>
</view>
<view><span>{{item.pointType == "INCREASE" ? '+' : '-'}}</span>{{ item.variablePoint }}</view>
<view :class="[item.pointType == 'INCREASE' ? 'plus' : 'reduce']"><span>{{item.pointType == "INCREASE" ? '+' : '-'}}</span>{{ item.variablePoint }}</view>
</view>
<uni-load-more :status="count.loadStatus"></uni-load-more>
</div>
@@ -109,6 +109,14 @@ export default {
font-size: 32rpx;
font-weight: bold;
}
.plus{
color: $light-color;
font-weight: bold;
}
.reduce{
color: $weChat-color;
font-weight: bold;
}
.point-item {
width: 100%;
@@ -150,7 +158,7 @@ export default {
border-right: 1px solid $border-color-light;
}
.pcolor {
color: #4ebb9d;
color: $light-color;
}
}
@@ -168,7 +176,7 @@ export default {
.portrait-box {
background-color: $main-color;
height: 250rpx;
background: linear-gradient(134deg, #28d094 2%, #1abc9c 98%);
background: linear-gradient(91deg, $light-color 1%, $aider-light-color 99%);
border-radius: 20rpx 20rpx 0 0;
margin: 20rpx 20rpx 0;
position: relative;

View File

@@ -23,26 +23,22 @@
<u-input v-model="form.___path" disabled @click="clickRegion" />
</u-form-item>
<view class="submit" @click="submit">保存</view>
<view class="submit" @click="showModalDialog">退出登录</view>
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
:content="'确定要退出登录么?'"></u-modal>
<view class="submit" @click="quiteLoginOut">退出登录</view>
</u-form>
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" pickerSize="4"></m-city>
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getPickerParentValue" pickerSize="4"></m-city>
</view>
</template>
<script>
import { logout } from "@/api/login";
import { saveUserInfo } from "@/api/members.js";
import { upload } from "@/api/common.js";
import storage from "@/utils/storage.js";
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
import gkcity from "@/components/m-city/m-city.vue";
import city from "@/components/m-city/m-city.vue";
export default {
components: { uFormItem, "m-city": gkcity },
components: { uFormItem, "m-city": city },
data() {
return {
quitShow: false,
lightColor: this.$lightColor, //高亮颜色
form: {
nickName: storage.getUserInfo().nickName || "",
@@ -71,38 +67,16 @@ export default {
},
methods: {
/**
* 显示退出登录对话框
* 退出登录
*/
showModalDialog() {
this.quitShow = true;
},
clear() {
storage.setAccessToken("");
storage.setRefreshToken("");
storage.setUserInfo({});
this.$options.filters.navigateToLogin("redirectTo");
},
/**
* 确认退出
* 清除缓存重新登录
*/
async confirm() {
try{
await logout();
this.clear();
}catch(e){
//TODO handle the exception
this.clear();
}
quiteLoginOut() {
this.$options.filters.quiteLoginOut();
},
/**
* 选择地址回调
*/
getpickerParentValue(e) {
getPickerParentValue(e) {
this.form.region = [];
this.form.regionId = [];
let name = "";

View File

@@ -4,7 +4,6 @@
<u-image width=140 height="140" shape="circle" :src="userInfo.face || userImage" mode="">
</u-image>
<view class="user-name">
{{ userInfo.id ? userInfo.nickName || '' : '暂未登录' }}
</view>
<u-icon color="#ccc" name="arrow-right"></u-icon>
@@ -16,29 +15,25 @@
<!-- #ifdef APP-PLUS -->
<u-cell-item title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell-item>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
<!-- #endif -->
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<!-- #ifndef H5 -->
<!-- #endif -->
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
</u-cell-group>
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'登录'}}</view>
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
:content="userInfo.id ? '确定要退出登录么?' : '确定要登录么?'"></u-modal>
<view class="submit" v-if="userInfo.id" @click="quiteLoginOut">退出登录</view>
</view>
</template>
<script>
import { logout } from "@/api/login";
import storage from "@/utils/storage.js";
import config from "@/config/config";
export default {
data() {
return {
config,
userImage:config.defaultUserPhoto,
lightColor: this.$lightColor,
quitShow: false,
isCertificate: false,
userInfo: {},
fileSizeString: "0B",
@@ -54,34 +49,14 @@ export default {
url: url,
});
},
clear() {
storage.setAccessToken("");
storage.setRefreshToken("");
storage.setUserInfo({});
this.$options.filters.navigateToLogin("redirectTo");
},
/**
* 退出登录
*/
quiteLoginOut() {
this.$options.filters.quiteLoginOut();
},
/**
* 确认退出
* 清除缓存重新登录
*/
async confirm() {
try{
await logout();
this.clear();
}catch(e){
//TODO handle the exception
this.clear();
}
},
/**
* 显示退出登录对话框
*/
showModalDialog() {
this.quitShow = true;
},
/**
* 读取当前缓存
@@ -113,11 +88,7 @@ export default {
if (this.$options.filters.isLogin("auth")) {
this.navigateTo("/pages/mine/set/personMsg");
} else {
uni.showToast({
title: "当前暂无用户请登录后重试",
duration: 2000,
icon: "none",
});
this.$options.filters.tipsToLogin();
}
},