Browse Source

👍 bug处理

master
Boom 1 year ago
parent
commit
9c0105f141
  1. 2
      App.vue
  2. 403
      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. 217
      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() const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function (res) { updateManager.onCheckForUpdate(function (res) {
// //
console.log(res.hasUpdate) // console.log(res.hasUpdate)
}) })
// //
updateManager.onUpdateReady(function () { updateManager.onUpdateReady(function () {

403
manifest.json

@ -1,33 +1,33 @@
{ {
"name" : "ZSW", "name": "ZSW",
"appid" : "__UNI__7085CB1", "appid": "__UNI__7085CB1",
"description" : "", "description": "",
"versionName" : "1.0.2", "versionName": "1.0.2",
"versionCode" : 2, "versionCode": 2,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueCompiler" : "uni-app", "nvueCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : false, "waiting": false,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"OAuth" : {}, "OAuth": {},
"Payment" : {}, "Payment": {},
"Share" : {}, "Share": {},
"Geolocation" : {} "Geolocation": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
@ -53,27 +53,27 @@
] ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios": {},
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"oauth" : { "oauth": {
"weixin" : { "weixin": {
"appid" : "wx7c84ede33062d1e4", "appid": "wx7c84ede33062d1e4",
"appsecret" : "c47ef66d3311194da44e60387d5c1abd", "appsecret": "c47ef66d3311194da44e60387d5c1abd",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks": "https://yixiang.co/app/"
} }
}, },
"payment" : { "payment": {
"weixin" : { "weixin": {
"appid" : "wx7c84ede33062d1e4", "appid": "wx7c84ede33062d1e4",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks": "https://yixiang.co/app/"
} }
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
@ -93,168 +93,173 @@
] ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios": {},
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"oauth" : { "oauth": {
"weixin" : { "weixin": {
"appid" : "wx7c84ede33062d1e4", "appid": "wx7c84ede33062d1e4",
"appsecret" : "c47ef66d3311194da44e60387d5c1abd", "appsecret": "c47ef66d3311194da44e60387d5c1abd",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks": "https://yixiang.co/app/"
} }
}, },
"payment" : { "payment": {
"weixin" : { "weixin": {
"appid" : "wx7c84ede33062d1e4", "appid": "wx7c84ede33062d1e4",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks": "https://yixiang.co/app/"
} }
}, },
"share" : { "share": {
"weixin" : { "weixin": {
"appid" : "wx7c84ede33062d1e4", "appid": "wx7c84ede33062d1e4",
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks": "https://yixiang.co/app/"
} }
}, },
"ad" : {}, "ad": {},
"geolocation" : {} "geolocation": {}
}, },
"splashscreen" : { "splashscreen": {
"ios" : { "ios": {
"iphone" : { "iphone": {
"portrait-896h@3x" : "splash/1242+2688.png", "portrait-896h@3x": "splash/1242+2688.png",
"portrait-896h@2x" : "splash/828+1792.png", "portrait-896h@2x": "splash/828+1792.png",
"iphonex" : "splash/1125+2436.png", "iphonex": "splash/1125+2436.png",
"retina55" : "splash/1142+2208.png", "retina55": "splash/1142+2208.png",
"retina47" : "splash/750+1334.png", "retina47": "splash/750+1334.png",
"retina40" : "splash/640+1136.png", "retina40": "splash/640+1136.png",
"retina35" : "splash/640+960.png" "retina35": "splash/640+960.png"
} }
}, },
"android" : { "android": {
"hdpi" : "splash/480+762.png", "hdpi": "splash/480+762.png",
"xhdpi" : "splash/720+1242.png", "xhdpi": "splash/720+1242.png",
"xxhdpi" : "splash/1080+1882.png" "xxhdpi": "splash/1080+1882.png"
}, },
"iosStyle" : "common" "iosStyle": "common"
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "icons/72x72.png", "hdpi": "icons/72x72.png",
"xhdpi" : "icons/96x96.png", "xhdpi": "icons/96x96.png",
"xxhdpi" : "icons/144x144.png", "xxhdpi": "icons/144x144.png",
"xxxhdpi" : "icons/192x192.png" "xxxhdpi": "icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "icons/1024x1024.png", "appstore": "icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "icons/76x76.png", "app": "icons/76x76.png",
"app@2x" : "icons/152x152.png", "app@2x": "icons/152x152.png",
"notification" : "icons/20x20.png", "notification": "icons/20x20.png",
"notification@2x" : "icons/40x40.png", "notification@2x": "icons/40x40.png",
"proapp@2x" : "icons/167x167.png", "proapp@2x": "icons/167x167.png",
"settings" : "icons/29x29.png", "settings": "icons/29x29.png",
"settings@2x" : "icons/58x58.png", "settings@2x": "icons/58x58.png",
"spotlight" : "icons/40x40.png", "spotlight": "icons/40x40.png",
"spotlight@2x" : "icons/80x80.png" "spotlight@2x": "icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "icons/120x120.png", "app@2x": "icons/120x120.png",
"app@3x" : "icons/180x180.png", "app@3x": "icons/180x180.png",
"notification@2x" : "icons/40x40.png", "notification@2x": "icons/40x40.png",
"notification@3x" : "icons/60x60.png", "notification@3x": "icons/60x60.png",
"settings@2x" : "icons/58x58.png", "settings@2x": "icons/58x58.png",
"settings@3x" : "icons/87x87.png", "settings@3x": "icons/87x87.png",
"spotlight@2x" : "icons/80x80.png", "spotlight@2x": "icons/80x80.png",
"spotlight@3x" : "icons/120x120.png" "spotlight@3x": "icons/120x120.png"
} }
} }
} }
}, },
"ad" : {} "ad": {}
}, },
"quickapp" : {}, "quickapp": {},
"mp-weixin" : { "mp-weixin": {
"appid" : "wx604d2ea4702620d2", "appid": "wx604d2ea4702620d2",
"setting" : { "setting": {
"urlCheck" : true, "urlCheck": true,
"postcss" : true, "postcss": true,
"minified" : true "minified": true
}, },
"usingComponents" : true, "usingComponents": true,
"permission" : { "permission": {
"scope.userLocation" : { "scope.userLocation": {
"desc" : "定位最近的门店" "desc": "定位最近的门店"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ] "requiredPrivateInfos": ["getLocation", "chooseLocation"]
}, },
"splashscreen" : { "splashscreen": {
"ios" : { "ios": {
"iphone" : { "iphone": {
"portrait-896h@3x" : "splash/1242+2688.png", "portrait-896h@3x": "splash/1242+2688.png",
"portrait-896h@2x" : "splash/828+1792.png", "portrait-896h@2x": "splash/828+1792.png",
"iphonex" : "splash/1125+2436.png", "iphonex": "splash/1125+2436.png",
"retina55" : "splash/1142+2208.png", "retina55": "splash/1142+2208.png",
"retina47" : "splash/750+1334.png", "retina47": "splash/750+1334.png",
"retina40" : "splash/640+1136.png", "retina40": "splash/640+1136.png",
"retina35" : "splash/640+960.png" "retina35": "splash/640+960.png"
} }
}, },
"android" : { "android": {
"hdpi" : "splash/480+762.png", "hdpi": "splash/480+762.png",
"xhdpi" : "splash/720+1242.png", "xhdpi": "splash/720+1242.png",
"xxhdpi" : "splash/1080+1882.png" "xxhdpi": "splash/1080+1882.png"
}, },
"iosStyle" : "common" "iosStyle": "common"
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "icons/72x72.png", "hdpi": "icons/72x72.png",
"xhdpi" : "icons/96x96.png", "xhdpi": "icons/96x96.png",
"xxhdpi" : "icons/144x144.png", "xxhdpi": "icons/144x144.png",
"xxxhdpi" : "icons/192x192.png" "xxxhdpi": "icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "icons/1024x1024.png", "appstore": "icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "icons/76x76.png", "app": "icons/76x76.png",
"app@2x" : "icons/152x152.png", "app@2x": "icons/152x152.png",
"notification" : "icons/20x20.png", "notification": "icons/20x20.png",
"notification@2x" : "icons/40x40.png", "notification@2x": "icons/40x40.png",
"proapp@2x" : "icons/167x167.png", "proapp@2x": "icons/167x167.png",
"settings" : "icons/29x29.png", "settings": "icons/29x29.png",
"settings@2x" : "icons/58x58.png", "settings@2x": "icons/58x58.png",
"spotlight" : "icons/40x40.png", "spotlight": "icons/40x40.png",
"spotlight@2x" : "icons/80x80.png" "spotlight@2x": "icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "icons/120x120.png", "app@2x": "icons/120x120.png",
"app@3x" : "icons/180x180.png", "app@3x": "icons/180x180.png",
"notification@2x" : "icons/40x40.png", "notification@2x": "icons/40x40.png",
"notification@3x" : "icons/60x60.png", "notification@3x": "icons/60x60.png",
"settings@2x" : "icons/58x58.png", "settings@2x": "icons/58x58.png",
"settings@3x" : "icons/87x87.png", "settings@3x": "icons/87x87.png",
"spotlight@2x" : "icons/80x80.png", "spotlight@2x": "icons/80x80.png",
"spotlight@3x" : "icons/120x120.png" "spotlight@3x": "icons/120x120.png"
} }
} }
} }
} }
}, },
"quickapp" : {}, "quickapp": {},
"mp-weixin" : { "mp-weixin": {
"appid" : "wx2914c96abb4b0be9", "appid": "wx2914c96abb4b0be9",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true, "usingComponents": {},
"permission" : { "permission": {
"scope.userLocation" : { "scope.userLocation": {
"desc" : "定位最近的门店" "desc": "定位最近的门店"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], "requiredPrivateInfos": ["getLocation", "chooseLocation"],
"plugins" : {} "plugins": {
"contactPlugin": {
"version": "1.4.7",
"provider": "wx104a1a20c3f81ec2"
}
}
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
// "live-player-plugin" : { // "live-player-plugin" : {
@ -262,40 +267,40 @@
// "provider" : "wx2b03c6e691cd7370" // "provider" : "wx2b03c6e691cd7370"
// } // }
// #endif // #endif
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"h5" : { "h5": {
"title" : "mall", "title": "mall",
"devServer" : { "devServer": {
"disableHostCheck" : true, "disableHostCheck": true,
"proxy" : { "proxy": {
"^/api" : { "^/api": {
"target" : "https://wxapi.yixiang.co", "target": "https://wxapi.yixiang.co",
"changeOrigin" : true, "changeOrigin": true,
"secure" : true, "secure": true,
"pathRewrite" : { "pathRewrite": {
"^/api" : "/api" "^/api": "/api"
} }
} }
} }
}, },
"router" : { "router": {
"mode" : "history" "mode": "history"
}, },
"sdkConfigs" : { "sdkConfigs": {
"maps" : { "maps": {
"qqmap" : { "qqmap": {
"key" : "" "key": ""
} }
} }
}, },
"domain" : "h5.yixiang.co" "domain": "h5.yixiang.co"
} }
} }

5
pages.json

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

3
pages/Loading/index.vue

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

4
pages/map/index.vue

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

2
pages/user/PersonalData/index.vue

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

217
pages/user/User/index.vue

@ -1,26 +1,11 @@
<template> <template>
<view class="user"> <view class="user">
<view> <view>
<view <view class="getUserBaseData header bg-color-red acea-row row-between-wrapper" v-if="!userInfo.uid">
class="getUserBaseData header bg-color-red acea-row row-between-wrapper" <button class="userDataBtn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看用户信息</button>
v-if="!userInfo.uid" <button class="userDataBtn" v-else @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看用户信息</button>
>
<button
class="userDataBtn"
v-if="canIUseGetUserProfile"
@tap="getUserInfoProfile"
>授权并查看用户信息</button>
<button
class="userDataBtn"
v-else
@getuserinfo="getUserInfo"
open-type="getUserInfo"
>授权并查看用户信息</button>
</view> </view>
<view <view class="header bg-color-red acea-row row-between-wrapper" v-else>
class="header bg-color-red acea-row row-between-wrapper"
v-else
>
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="pictrue"> <view class="pictrue">
<image :src="userInfo.avatar" /> <image :src="userInfo.avatar" />
@ -28,19 +13,12 @@
<view class="text"> <view class="text">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="name line1">{{ userInfo.nickname }}</view> <view class="name line1">{{ userInfo.nickname }}</view>
<view <view class="member acea-row row-middle" v-if="userInfo.vip">
class="member acea-row row-middle"
v-if="userInfo.vip"
>
<image :src="userInfo.vipIcon" /> <image :src="userInfo.vipIcon" />
<text>{{ userInfo.vipName }}</text> <text>{{ userInfo.vipName }}</text>
</view> </view>
</view> </view>
<view <view @click="goPersonalData()" class="id" v-if="userInfo.phone">
@click="goPersonalData()"
class="id"
v-if="userInfo.phone"
>
<text>ID{{ userInfo.uid || 0 }}</text> <text>ID{{ userInfo.uid || 0 }}</text>
<text class="iconfont icon-bianji1"></text> <text class="iconfont icon-bianji1"></text>
</view> </view>
@ -57,40 +35,24 @@
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
<text <text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
class="iconfont icon-shezhi"
@click="goPersonalData()"
></text>
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="nav acea-row row-middle"> <view class="nav acea-row row-middle">
<view <view @click="goUserAccount()" class="item">
@click="goUserAccount()"
class="item"
>
<text>我的余额</text> <text>我的余额</text>
<text class="num">{{ userInfo.nowMoney || 0 }}</text> <text class="num">{{ userInfo.nowMoney || 0 }}</text>
</view> </view>
<view <view @click="goUserPromotion()" class="item"
@click="goUserPromotion()" v-if="userInfo.isPromoter === 1 || userInfo.statu === 2">
class="item"
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
>
<text>当前佣金</text> <text>当前佣金</text>
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text> <text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
</view> </view>
<view <view @click="goIntegral()" class="item" v-else>
@click="goIntegral()"
class="item"
v-else
>
<text>当前积分</text> <text>当前积分</text>
<text class="num">{{ userInfo.integral || 0 }}</text> <text class="num">{{ userInfo.integral || 0 }}</text>
</view> </view>
<view <view @click="goUserCoupon()" class="item">
@click="goUserCoupon()"
class="item"
>
<text>优惠券</text> <text>优惠券</text>
<text class="num">{{ userInfo.couponCount || 0 }}</text> <text class="num">{{ userInfo.couponCount || 0 }}</text>
</view> </view>
@ -98,80 +60,50 @@
<view class="myOrder"> <view class="myOrder">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<text>我的订单</text> <text>我的订单</text>
<text <text @click="goMyOrder()" class="allOrder">
@click="goMyOrder()"
class="allOrder"
>
<text>全部订单</text> <text>全部订单</text>
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</text> </text>
</view> </view>
<view <view class="orderState acea-row row-middle"
class="orderState acea-row row-middle" v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null">
v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null" <view @click="goMyOrder(0)" class="item">
>
<view
@click="goMyOrder(0)"
class="item"
>
<view class="pictrue"> <view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" />
<text <text class="order-status-num"
class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text>
v-if="userInfo.orderStatusNum.unpaidCount > 0"
>{{ userInfo.orderStatusNum.unpaidCount }}</text>
</view> </view>
<view>待付款</view> <view>待付款</view>
</view> </view>
<view <view @click="goMyOrder(1)" class="item">
@click="goMyOrder(1)"
class="item"
>
<view class="pictrue"> <view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" />
<text <text class="order-status-num"
class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text>
v-if="userInfo.orderStatusNum.unshippedCount > 0"
>{{ userInfo.orderStatusNum.unshippedCount }}</text>
</view> </view>
<view>待发货</view> <view>待发货</view>
</view> </view>
<view <view @click="goMyOrder(2)" class="item">
@click="goMyOrder(2)"
class="item"
>
<view class="pictrue"> <view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" />
<text <text class="order-status-num"
class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text>
v-if="userInfo.orderStatusNum.receivedCount > 0"
>{{ userInfo.orderStatusNum.receivedCount }}</text>
</view> </view>
<text>待收货</text> <text>待收货</text>
</view> </view>
<view <view @click="goMyOrder(3)" class="item">
@click="goMyOrder(3)"
class="item"
>
<view class="pictrue"> <view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" />
<text <text class="order-status-num"
class="order-status-num" v-if="userInfo.orderStatusNum.evaluatedCount > 0">{{ userInfo.orderStatusNum.evaluatedCount }}</text>
v-if="userInfo.orderStatusNum.evaluatedCount > 0"
>{{ userInfo.orderStatusNum.evaluatedCount }}</text>
</view> </view>
<text>待评价</text> <text>待评价</text>
</view> </view>
<view <view @click="goReturnList()" class="item">
@click="goReturnList()"
class="item"
>
<view class="pictrue"> <view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" /> <image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" />
<text <text class="order-status-num"
class="order-status-num" v-if="userInfo.orderStatusNum.refundCount > 0">{{ userInfo.orderStatusNum.refundCount }}</text>
v-if="userInfo.orderStatusNum.refundCount > 0"
>{{ userInfo.orderStatusNum.refundCount }}</text>
</view> </view>
<text>售后/退款</text> <text>售后/退款</text>
</view> </view>
@ -180,11 +112,7 @@
<view class="myService"> <view class="myService">
<view class="serviceList acea-row row-middle"> <view class="serviceList acea-row row-middle">
<template v-for="(item, MyMenusIndex) in MyMenus"> <template v-for="(item, MyMenusIndex) in MyMenus">
<view <view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)">
class="item"
:key="MyMenusIndex"
@click="goPages(MyMenusIndex)"
>
<view class="pictrue"> <view class="pictrue">
<image :src="item.pic" /> <image :src="item.pic" />
</view> </view>
@ -197,7 +125,12 @@
</view> </view>
<view class="by"> <view class="by">
<view> <view>
<text class="by-text">@</text> </view>
<view>
<cell bind:startmessage='startmessage' bind:completemessage="completemessage"
plugid='d0119260ce74b479608a9d9c2d473467' />
<text class="by-text">
@回乡 区域品牌合作联系</text>
</view> </view>
</view> </view>
<!-- <SwitchWindow <!-- <SwitchWindow
@ -206,30 +139,47 @@
:login_type="userInfo.login_type" :login_type="userInfo.login_type"
></SwitchWindow>--> ></SwitchWindow>-->
</view> </view>
<!-- <Authorization <!-- <Authorization
v-else v-else
ref="authorization" ref="authorization"
/> --> /> -->
</view> </view>
</template> </template>
<script> <script>
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex' import {
import { getUserInfo, getMenuUser, wxappAuth, bindingPhone, wxappBindingPhone, wxappGetUserInfo } from '@/api/user' mapState,
import { isWeixin, VUE_APP_RESOURCES_URL, parseQuery, getProvider } from '@/utils' mapGetters,
import SwitchWindow from '@/components/SwitchWindow' mapMutations,
import Authorization from '@/pages/authorization/index' mapActions
import cookie from '@/utils/store/cookie' } 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'
const NAME = 'User' const NAME = 'User'
export default { export default {
name: NAME, name: NAME,
components: { components: {
SwitchWindow, SwitchWindow,
Authorization, Authorization,
}, },
props: {}, props: {},
data: function () { data: function() {
return { return {
canIUseGetUserProfile: false, canIUseGetUserProfile: false,
MyMenus: [], MyMenus: [],
@ -401,7 +351,8 @@ export default {
}).then(res => { }).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.userInfo.avatar = res.data.avatar this.userInfo.avatar = res.data.avatar
this.userInfo.nickname = res.data.nickname this.userInfo.nickname = res.data
.nickname
} else { } else {
uni.showLoading({ uni.showLoading({
title: res.msg, title: res.msg,
@ -483,7 +434,7 @@ export default {
}, },
onShow() { onShow() {
if (this.$store.getters.token) { if (this.$store.getters.token) {
console.log('userInfo11:',this.$store.getters.token) console.log('userInfo11:', this.$store.getters.token)
// //
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
@ -497,11 +448,11 @@ export default {
console.log('离开用户中心') console.log('离开用户中心')
this.updateAuthorizationPage(false) this.updateAuthorizationPage(false)
}, },
} }
</script> </script>
<style lang="less"> <style lang="less">
.getUserBaseData { .getUserBaseData {
.userDataBtn { .userDataBtn {
width: 80%; width: 80%;
height: 80rpx; height: 80rpx;
@ -513,13 +464,13 @@ export default {
font-weight: 500; font-weight: 500;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
} }
} }
.footer-line-height { .footer-line-height {
height: 1 * 100rpx; height: 1 * 100rpx;
} }
.order-status-num { .order-status-num {
min-width: 0.33 * 100rpx; min-width: 0.33 * 100rpx;
background-color: #fff; background-color: #fff;
color: #eb3729; color: #eb3729;
@ -530,17 +481,17 @@ export default {
font-size: 0.2 * 100rpx; font-size: 0.2 * 100rpx;
padding: 0 0.08 * 100rpx; padding: 0 0.08 * 100rpx;
border: 1px solid #eb3729; border: 1px solid #eb3729;
} }
.pictrue { .pictrue {
position: relative; position: relative;
} }
.switch-h5 { .switch-h5 {
margin-left: 0.2 * 100rpx; margin-left: 0.2 * 100rpx;
} }
.binding { .binding {
margin-top: 0.1 * 100rpx; margin-top: 0.1 * 100rpx;
display: inline-block; display: inline-block;
padding: 0.05 * 100rpx 0.2 * 100rpx; padding: 0.05 * 100rpx 0.2 * 100rpx;
@ -550,15 +501,15 @@ export default {
line-height: 1.5; line-height: 1.5;
border: 1px solid #e8695e; border: 1px solid #e8695e;
color: #ffffff; color: #ffffff;
} }
.by { .by {
text-align: center; text-align: center;
padding: 30rpx 0; padding: 30rpx 0;
} }
.by-text { .by-text {
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
} }
</style> </style>

2
utils/index.js

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

3
utils/request.js

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

Loading…
Cancel
Save