Browse Source

👍 bug处理

master
Boom 1 year ago
parent
commit
9c0105f141
  1. 2
      App.vue
  2. 9
      manifest.json
  3. 5
      pages.json
  4. 3
      pages/Loading/index.vue
  5. 4
      pages/map/index.vue
  6. 2
      pages/user/PersonalData/index.vue
  7. 167
      pages/user/User/index.vue
  8. 2
      utils/index.js
  9. 3
      utils/request.js

2
App.vue

@ -8,7 +8,7 @@ export default {
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
//
console.log(res.hasUpdate)
// console.log(res.hasUpdate)
})
//
updateManager.onUpdateReady(function () {

9
manifest.json

@ -247,14 +247,19 @@
"setting": {
"urlCheck": false
},
"usingComponents" : true,
"usingComponents": {},
"permission": {
"scope.userLocation": {
"desc": "定位最近的门店"
}
},
"requiredPrivateInfos": ["getLocation", "chooseLocation"],
"plugins" : {}
"plugins": {
"contactPlugin": {
"version": "1.4.7",
"provider": "wx104a1a20c3f81ec2"
}
}
},
// #ifdef MP-WEIXIN
// "live-player-plugin" : {

5
pages.json

@ -84,7 +84,10 @@
{
"path": "pages/user/User/index",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "我的",
"usingComponents": {
"cell": "plugin://contactPlugin/cell"
}
}
},
{

3
pages/Loading/index.vue

@ -32,8 +32,7 @@ export default {
if (!url) {
url = handleUrlParam(getCurrentPageUrlWithArgs())
}
console.log(url)
console.log('判断是否是分销')
console.log(url,'判断是否是分销')
//
if (url) {
let urlSpread = parseInt(url.spread)

4
pages/map/index.vue

@ -37,10 +37,8 @@
},
methods: {
test(res) {
console.log("res",res)
let that = this;
if (res.type == "end") {
console.log(this._mapContext)
this._mapContext.getCenterLocation({
success(res){
that.refresh(res)
@ -51,7 +49,7 @@
refresh(location){
let that = this;
getFishIndex(location).then(res => {
console.log(res.data)
// console.log(res.data)
if (res.data) {
res.data.forEach(e => {
// ,marker

2
pages/user/PersonalData/index.vue

@ -26,7 +26,7 @@
<view class="item acea-row row-between-wrapper">
<view>昵称</view>
<view class="input">
<input type="text" v-model="userInfo.nickname" />
<input type="nickname" v-model="userInfo.nickname" />
</view>
</view>
<view class="item acea-row row-between-wrapper">

167
pages/user/User/index.vue

@ -1,26 +1,11 @@
<template>
<view class="user">
<view>
<view
class="getUserBaseData header bg-color-red acea-row row-between-wrapper"
v-if="!userInfo.uid"
>
<button
class="userDataBtn"
v-if="canIUseGetUserProfile"
@tap="getUserInfoProfile"
>授权并查看用户信息</button>
<button
class="userDataBtn"
v-else
@getuserinfo="getUserInfo"
open-type="getUserInfo"
>授权并查看用户信息</button>
<view class="getUserBaseData header bg-color-red acea-row row-between-wrapper" v-if="!userInfo.uid">
<button class="userDataBtn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看用户信息</button>
<button class="userDataBtn" v-else @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看用户信息</button>
</view>
<view
class="header bg-color-red acea-row row-between-wrapper"
v-else
>
<view class="header bg-color-red acea-row row-between-wrapper" v-else>
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="userInfo.avatar" />
@ -28,19 +13,12 @@
<view class="text">
<view class="acea-row row-middle">
<view class="name line1">{{ userInfo.nickname }}</view>
<view
class="member acea-row row-middle"
v-if="userInfo.vip"
>
<view class="member acea-row row-middle" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" />
<text>{{ userInfo.vipName }}</text>
</view>
</view>
<view
@click="goPersonalData()"
class="id"
v-if="userInfo.phone"
>
<view @click="goPersonalData()" class="id" v-if="userInfo.phone">
<text>ID{{ userInfo.uid || 0 }}</text>
<text class="iconfont icon-bianji1"></text>
</view>
@ -57,40 +35,24 @@
<!-- #endif -->
</view>
</view>
<text
class="iconfont icon-shezhi"
@click="goPersonalData()"
></text>
<text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
</view>
<view class="wrapper">
<view class="nav acea-row row-middle">
<view
@click="goUserAccount()"
class="item"
>
<view @click="goUserAccount()" class="item">
<text>我的余额</text>
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
</view>
<view
@click="goUserPromotion()"
class="item"
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
>
<view @click="goUserPromotion()" class="item"
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2">
<text>当前佣金</text>
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
</view>
<view
@click="goIntegral()"
class="item"
v-else
>
<view @click="goIntegral()" class="item" v-else>
<text>当前积分</text>
<text class="num">{{ userInfo.integral || 0 }}</text>
</view>
<view
@click="goUserCoupon()"
class="item"
>
<view @click="goUserCoupon()" class="item">
<text>优惠券</text>
<text class="num">{{ userInfo.couponCount || 0 }}</text>
</view>
@ -98,80 +60,50 @@
<view class="myOrder">
<view class="title acea-row row-between-wrapper">
<text>我的订单</text>
<text
@click="goMyOrder()"
class="allOrder"
>
<text @click="goMyOrder()" class="allOrder">
<text>全部订单</text>
<text class="iconfont icon-jiantou"></text>
</text>
</view>
<view
class="orderState acea-row row-middle"
v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null"
>
<view
@click="goMyOrder(0)"
class="item"
>
<view class="orderState acea-row row-middle"
v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null">
<view @click="goMyOrder(0)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" />
<text
class="order-status-num"
v-if="userInfo.orderStatusNum.unpaidCount > 0"
>{{ userInfo.orderStatusNum.unpaidCount }}</text>
<text class="order-status-num"
v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text>
</view>
<view>待付款</view>
</view>
<view
@click="goMyOrder(1)"
class="item"
>
<view @click="goMyOrder(1)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" />
<text
class="order-status-num"
v-if="userInfo.orderStatusNum.unshippedCount > 0"
>{{ userInfo.orderStatusNum.unshippedCount }}</text>
<text class="order-status-num"
v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text>
</view>
<view>待发货</view>
</view>
<view
@click="goMyOrder(2)"
class="item"
>
<view @click="goMyOrder(2)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" />
<text
class="order-status-num"
v-if="userInfo.orderStatusNum.receivedCount > 0"
>{{ userInfo.orderStatusNum.receivedCount }}</text>
<text class="order-status-num"
v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text>
</view>
<text>待收货</text>
</view>
<view
@click="goMyOrder(3)"
class="item"
>
<view @click="goMyOrder(3)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" />
<text
class="order-status-num"
v-if="userInfo.orderStatusNum.evaluatedCount > 0"
>{{ userInfo.orderStatusNum.evaluatedCount }}</text>
<text class="order-status-num"
v-if="userInfo.orderStatusNum.evaluatedCount > 0">{{ userInfo.orderStatusNum.evaluatedCount }}</text>
</view>
<text>待评价</text>
</view>
<view
@click="goReturnList()"
class="item"
>
<view @click="goReturnList()" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" />
<text
class="order-status-num"
v-if="userInfo.orderStatusNum.refundCount > 0"
>{{ userInfo.orderStatusNum.refundCount }}</text>
<text class="order-status-num"
v-if="userInfo.orderStatusNum.refundCount > 0">{{ userInfo.orderStatusNum.refundCount }}</text>
</view>
<text>售后/退款</text>
</view>
@ -180,11 +112,7 @@
<view class="myService">
<view class="serviceList acea-row row-middle">
<template v-for="(item, MyMenusIndex) in MyMenus">
<view
class="item"
:key="MyMenusIndex"
@click="goPages(MyMenusIndex)"
>
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)">
<view class="pictrue">
<image :src="item.pic" />
</view>
@ -197,7 +125,12 @@
</view>
<view class="by">
<view>
<text class="by-text">@</text>
</view>
<view>
<cell bind:startmessage='startmessage' bind:completemessage="completemessage"
plugid='d0119260ce74b479608a9d9c2d473467' />
<text class="by-text">
@回乡 区域品牌合作联系</text>
</view>
</view>
<!-- <SwitchWindow
@ -213,9 +146,26 @@
</view>
</template>
<script>
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, getMenuUser, wxappAuth, bindingPhone, wxappBindingPhone, wxappGetUserInfo } from '@/api/user'
import { isWeixin, VUE_APP_RESOURCES_URL, parseQuery, getProvider } from '@/utils'
import {
mapState,
mapGetters,
mapMutations,
mapActions
} from 'vuex'
import {
getUserInfo,
getMenuUser,
wxappAuth,
bindingPhone,
wxappBindingPhone,
wxappGetUserInfo
} from '@/api/user'
import {
isWeixin,
VUE_APP_RESOURCES_URL,
parseQuery,
getProvider
} from '@/utils'
import SwitchWindow from '@/components/SwitchWindow'
import Authorization from '@/pages/authorization/index'
import cookie from '@/utils/store/cookie'
@ -401,7 +351,8 @@ export default {
}).then(res => {
if (res.status === 200) {
this.userInfo.avatar = res.data.avatar
this.userInfo.nickname = res.data.nickname
this.userInfo.nickname = res.data
.nickname
} else {
uni.showLoading({
title: res.msg,

2
utils/index.js

@ -546,7 +546,7 @@ export const handleLoginStatus = (location, complete, fail, success) => {
} else {
isAuth = true
}
console.log(isAuth)
// console.log(isAuth)
return new Promise((resolve, reject) => {
resolve({
url: parseUrl(location),

3
utils/request.js

@ -71,7 +71,6 @@ function baseRequest(options) {
// 合并传参过来的 headers
// 如果接口需要登录,携带 token 去请求
console.log(options)
options.headers = {
...options.headers,
@ -109,7 +108,7 @@ console.log(options)
if (res.status !== 200) {
return Promise.reject({ msg: '请求失败', res, data })
}
console.log(data)
// console.log(data)
if ([401, 403].indexOf(data.status) !== -1) {
handleLoginFailure()
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true })

Loading…
Cancel
Save