1.在我的界面增加我的消息链接到IM消息
1.在我的界面增加我的消息链接到IM消息 2.调整了一下我的界面菜单的排序 3.顶部点击用户进去的personMsg增加一个退出登录的按钮master
parent
d8cca8b372
commit
bbbe25e339
|
@ -7,6 +7,9 @@
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
Version {{localVersion.version}}
|
Version {{localVersion.version}}
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
小程序版本: {{localVersion.version}} {{ localVersion.envVersion}}
|
||||||
|
<!-- #endif -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- {{localVersion}} -->
|
<!-- {{localVersion}} -->
|
||||||
|
@ -16,6 +19,7 @@
|
||||||
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
|
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
|
||||||
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
|
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
|
||||||
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
|
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
|
||||||
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
|
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
|
||||||
|
@ -74,6 +78,19 @@ export default {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
const accountInfo = wx.getAccountInfoSync();
|
||||||
|
console.log("===========accountInfo==============");
|
||||||
|
console.log(accountInfo);
|
||||||
|
this.version_number = accountInfo.miniProgram.version // 小程序 版本号
|
||||||
|
this.localVersion = {
|
||||||
|
versionCode: accountInfo.miniProgram.version.replace(/\./g, ""),
|
||||||
|
version: accountInfo.miniProgram.version ,// 小程序 版本号,
|
||||||
|
envVersion:accountInfo.miniProgram.envVersion, //判断小程序是开发版本还是release版本
|
||||||
|
};
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -23,12 +23,16 @@
|
||||||
<u-input v-model="form.___path" disabled @click="clickRegion" />
|
<u-input v-model="form.___path" disabled @click="clickRegion" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="submit" @click="submit">保存</view>
|
<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>
|
||||||
</u-form>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { logout } from "@/api/login";
|
||||||
import { saveUserInfo } from "@/api/members.js";
|
import { saveUserInfo } from "@/api/members.js";
|
||||||
import { upload } from "@/api/common.js";
|
import { upload } from "@/api/common.js";
|
||||||
import storage from "@/utils/storage.js";
|
import storage from "@/utils/storage.js";
|
||||||
|
@ -38,6 +42,7 @@ export default {
|
||||||
components: { uFormItem, "m-city": gkcity },
|
components: { uFormItem, "m-city": gkcity },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
quitShow: false,
|
||||||
lightColor: this.$lightColor, //高亮颜色
|
lightColor: this.$lightColor, //高亮颜色
|
||||||
form: {
|
form: {
|
||||||
nickName: storage.getUserInfo().nickName || "",
|
nickName: storage.getUserInfo().nickName || "",
|
||||||
|
@ -65,6 +70,35 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择地址回调
|
* 选择地址回调
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view>
|
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'登录'}}</view>
|
||||||
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
|
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
|
||||||
:content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"></u-modal>
|
:content="userInfo.id ? '确定要退出登录么?' : '确定要登录么?'"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,24 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
params.IM ? (this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${params.IM}`): (this.src = decodeURIComponent(params.src));
|
// params.IM ? (this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${params.IM}`): (this.src = decodeURIComponent(params.src));
|
||||||
console.log(this.src);
|
if(params.IM)
|
||||||
|
{
|
||||||
|
if(params.IM==0)
|
||||||
|
{
|
||||||
|
this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}`;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${params.IM}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.src = decodeURIComponent(params.src);
|
||||||
|
console.log(this.src);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -36,12 +36,7 @@
|
||||||
</u-row>
|
</u-row>
|
||||||
<!-- 我的订单,代付款 -->
|
<!-- 我的订单,代付款 -->
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
|
|
||||||
<div class="bag bag1">
|
|
||||||
<u-icon name="order" size="35" color="#fff"></u-icon>
|
|
||||||
</div>
|
|
||||||
<view>我的订单</view>
|
|
||||||
</view>
|
|
||||||
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')">
|
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=1')">
|
||||||
<div class="bag bag2">
|
<div class="bag bag2">
|
||||||
<u-icon name="bag-fill" size="35" color="#fff"></u-icon>
|
<u-icon name="bag-fill" size="35" color="#fff"></u-icon>
|
||||||
|
@ -64,8 +59,14 @@
|
||||||
<div class="bag bag5">
|
<div class="bag bag5">
|
||||||
<u-icon name="server-fill" size="35" color="#fff"></u-icon>
|
<u-icon name="server-fill" size="35" color="#fff"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
<view>售后服务</view>
|
<view>售后</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="order-item" @click="navigateTo('/pages/order/myOrder?status=0')">
|
||||||
|
<div class="bag bag1">
|
||||||
|
<u-icon name="order" size="35" color="#fff"></u-icon>
|
||||||
|
</div>
|
||||||
|
<view>我的订单</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
<!-- 常用工具 -->
|
<!-- 常用工具 -->
|
||||||
|
|
|
@ -5,59 +5,99 @@
|
||||||
|
|
||||||
<div class="paddingBox">
|
<div class="paddingBox">
|
||||||
<view class="interact-container">
|
<view class="interact-container">
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')">
|
||||||
|
<image src="/static/mine/myaddress.png" mode=""></image>
|
||||||
|
<view>地址管理</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/myTracks')">
|
||||||
|
<image src="/static/mine/logistics.png" mode=""></image>
|
||||||
|
<view>我的足迹</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
||||||
|
<image src="/static/mine/feedback.png" mode=""></image>
|
||||||
|
<view>我的评价</view>
|
||||||
|
</view>
|
||||||
|
<view class="interact-item" @click="linkMsgDetail()">
|
||||||
|
<image src="/static/mine/mycommit.png" mode=""></image>
|
||||||
|
<view>我的消息</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
|
||||||
|
<image src="/static/mine/myfavorite.png" mode=""></image>
|
||||||
|
<view>我的关注</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')">
|
||||||
|
<image src="/static/mine/mypoint.png" mode=""></image>
|
||||||
|
<view>我的积分</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="interact-item" @click="distribution">
|
||||||
|
<image src="/static/mine/distribution.png" mode=""></image>
|
||||||
|
<view>我的分销</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')">
|
||||||
|
<image src="/static/mine/shensu.png" mode=""></image>
|
||||||
|
<view>我的投诉</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
||||||
|
<image src="/static/mine/mycoupon.png" mode=""></image>
|
||||||
|
<view>优惠券</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
|
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
|
||||||
<image src="/static/mine/sign.png" mode=""></image>
|
<image src="/static/mine/sign.png" mode=""></image>
|
||||||
<view>每日签到</view>
|
<view>每日签到</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')">
|
|
||||||
<image src="/static/mine/mypoint.png" mode=""></image>
|
|
||||||
<view>我的积分</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
|
|
||||||
<image src="/static/mine/mycoupon.png" mode=""></image>
|
|
||||||
<view>优惠券</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
|
|
||||||
<image src="/static/mine/myfavorite.png" mode=""></image>
|
|
||||||
<view>我的关注</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/myTracks')">
|
|
||||||
<image src="/static/mine/myhistory.png" mode=""></image>
|
|
||||||
<view>我的足迹</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
|
|
||||||
<image src="/static/mine/mycommit.png" mode=""></image>
|
|
||||||
<view>我的评价</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')">
|
|
||||||
<image src="/static/mine/shensu.png" mode=""></image>
|
|
||||||
<view>我的投诉</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')">
|
|
||||||
<image src="/static/mine/feedback.png" mode=""></image>
|
|
||||||
<view>意见反馈</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
|
<view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
|
||||||
<image src="/static/mine/couponcenter.png" mode=""></image>
|
<image src="/static/mine/couponcenter.png" mode=""></image>
|
||||||
<view>领券中心</view>
|
<view>领券中心</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')">
|
|
||||||
<image src="/static/mine/myaddress.png" mode=""></image>
|
|
||||||
<view>地址管理</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
|
||||||
<image src="/static/mine/setting.png" mode=""></image>
|
|
||||||
<view>设置</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="distribution">
|
|
||||||
<image src="/static/mine/distribution.png" mode=""></image>
|
|
||||||
<view>我的分销</view>
|
|
||||||
</view>
|
|
||||||
<view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
|
<view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')">
|
||||||
<image src="/static/mine/kanjia.png" mode=""></image>
|
<image src="/static/mine/kanjia.png" mode=""></image>
|
||||||
<view>砍价记录</view>
|
<view>砍价记录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')">
|
||||||
|
<image src="/static/mine/feedback.png" mode=""></image>
|
||||||
|
<view>意见反馈</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/set/editionIntro')">
|
||||||
|
<image src="/static/mine/pointgift.png" mode=""></image>
|
||||||
|
<view>关于</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
|
||||||
|
<image src="/static/mine/setting.png" mode=""></image>
|
||||||
|
<view>设置</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
|
@ -66,13 +106,30 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { distribution } from "@/api/goods";
|
import { distribution } from "@/api/goods";
|
||||||
|
import configs from "@/config/config";
|
||||||
|
import storage from "@/utils/storage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
configs,
|
||||||
|
storage
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
navigateTo(url) {
|
navigateTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url,
|
url,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
linkMsgDetail(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/tabbar/home/web-view?IM=0`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
distribution() {
|
distribution() {
|
||||||
distribution().then((res) => {
|
distribution().then((res) => {
|
||||||
if (res.data.result) {
|
if (res.data.result) {
|
||||||
|
|
Loading…
Reference in New Issue