Browse Source

售后部分测试改动

master
Aaron 4 years ago
parent
commit
41cffec39f
  1. 3
      api/user.js
  2. 2
      pages.json
  3. 3
      pages/activity/Poster/index.vue
  4. 7
      pages/authorization/index.vue
  5. 1
      pages/home/index.vue
  6. 44
      pages/order/GoodsReturn/index.vue
  7. 39
      pages/order/GoodsReturn/productlist.vue
  8. 27
      pages/order/OrderDetails/index.vue
  9. 5
      pages/user/Login/login.vue
  10. 1
      pages/user/User/index.vue
  11. 2
      utils/index.js
  12. 4
      utils/request.js

3
api/user.js

@ -407,7 +407,8 @@ export function wxappBindingPhone(data) {
* 小程序上传用户头像
*/
export function wxappGetUserInfo (data) {
return request.post('/wxapp/loginAuth', data)
// return request.post('/wxapp/loginAuth', data)
return request.get('/wechat/auth', data)
}
/*

2
pages.json

@ -318,7 +318,7 @@
{
"path": "pages/order/ReturnList/index",
"style": {
"navigationBarTitleText": "退货列表"
"navigationBarTitleText": "我的售后"
}
},
{

3
pages/activity/Poster/index.vue

@ -29,8 +29,7 @@
return {
status: true,
id: 0,
image: "",
img: 'https://img-blog.csdnimg.cn/20190626120443986.png'
image: ""
};
},
mounted () {

7
pages/authorization/index.vue

@ -11,6 +11,8 @@
class="cu-btn author-btn"
open-type="getPhoneNumber"
@getphonenumber="phoneLogin">微信手机号一键登录</button>
<!-- <button class="cu-btn author-btn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看</button>
<button class="cu-btn author-btn" v-else @getuserinfo="getUserInfoBtn" open-type="getUserInfo">授权并查看</button> -->
<button class="cu-btn close-btn" @tap="back">暂不登录</button>
</view>
</view>
@ -35,11 +37,14 @@ import dayjs from 'dayjs'
import cookie from '@/utils/store/cookie'
import store from '@/store'
//
import { auth } from '@/libs/wechat.js'
export default {
data() {
return {
authorize: false,
canIUseGetUserProfile: false,
canIUseGetUserProfile: false
}
},
computed: {

1
pages/home/index.vue

@ -316,6 +316,7 @@ export default {
uni.scanCode({
success: res => {
let option = handleUrlParam(res.result)
console.log(option)
switch (option.pageType) {
case 'good':
//

44
pages/order/GoodsReturn/index.vue

@ -1,6 +1,11 @@
<template>
<view class="apply-return">
<view class="goodsStyle acea-row row-between" v-for="cart in orderInfo.cartInfo" :key="cart.id">
<!-- 售后提交 -->
<view class="container" v-if="selected">
<view class="goodsStyle acea-row row-between"
v-for="cart in orderInfo.cartInfo"
:key="cart.id"
>
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
@ -41,6 +46,31 @@
</view>
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
</view>
<!-- 选择商品 -->
<view class="selectProduct">
<view class="goodsStyle acea-row row-between"
v-for="cart in orderInfo.cartInfo"
:key="cart.id"
>
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.storeName }}</view>
<view class="money">
<view>
{{
cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price
: cart.productInfo.price
}}
</view>
<view class="num">x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
@ -68,13 +98,20 @@
Authorization: "Bearer " + this.$store.state.token
},
id: 0,
selected: true,
orderInfo: {},
rebackList: [],
reasonList: [],
reason: "",
refund_reason_wap_explain: "",
refund_reason_wap_img: []
};
},
mounted() {
this.id = this.$yroute.query.id || 0;
this.getOrderDetail();
this.getRefundReason();
},
methods: {
changeReason(e) {
this.reason = this.reasonList[e.mp.detail.value];
@ -143,11 +180,6 @@
});
});
}
},
mounted() {
this.id = this.$yroute.query.id || 0;
this.getOrderDetail();
this.getRefundReason();
}
};
</script>

39
pages/order/GoodsReturn/productlist.vue

@ -0,0 +1,39 @@
<template>
<view class="productList">
<view class="goodsStyle acea-row row-between"
v-for="cart in list"
:key="cart.id"
>
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.storeName }}</view>
<view class="money">
<view>
{{
cart.productInfo.attrInfo
? cart.productInfo.attrInfo.price
: cart.productInfo.price
}}
</view>
<view class="num">x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default: () => []
}
}
}
</script>
<style scoped lang="less">
</style>

27
pages/order/OrderDetails/index.vue

@ -239,12 +239,20 @@
<!-- -->
<template v-if="orderInfo.shippingType == 1 && status.type == 2">
<view class="bnt default"
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})">查看物流</view>
@click="$yrouter.push({
path: '/pages/order/Logistics/index',
query:{
id:orderInfo.orderId
}
})"
>查看物流</view>
<view class="bnt default" @click="goGoodsReturn(orderInfo)">申请退款</view>
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
</template>
<template v-if="orderInfo.shippingType == 1 && status.type == 3 && orderInfo.deliveryType == 'express'">
<view class="bnt default"
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})">查看物流</view>
<view class="bnt default" @click="goGoodsReturn(orderInfo)">申请退款</view>
</template>
<template v-if="orderInfo.shippingType == 1 && status.type == 4">
<view class="bnt cancel" @click="delOrder">删除订单</view>
@ -256,10 +264,20 @@
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
</template>
</view>
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
<Payment
v-model="pay"
:types="payType"
@checked="toPay"
:balance="userInfo.nowMoney"
></Payment>
<view class="geoPage" v-if="mapShow">
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe>
<iframe
width="100%"
height="100%"
frameborder="0"
scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"
></iframe>
</view>
</view>
</template>
@ -329,6 +347,7 @@
},
methods: {
copyClipboard,
// 退
goGoodsReturn(orderInfo) {
this.$yrouter.push({
path: "/pages/order/GoodsReturn/index",

5
pages/user/Login/login.vue

@ -310,15 +310,12 @@
} catch (e) {
return validatorDefaultCatch(e);
}
login({
username: account,
password,
spread: cookie.get("spread")
})
.then(({
data
}) => {
.then(({ data }) => {
this.$store.commit("login", data.token, dayjs(data.expires_time));
handleGetUserInfo();
// let replace=this.$yroute.query.replace

1
pages/user/User/index.vue

@ -314,7 +314,6 @@ export default {
iv: res.iv,
code: loginRes.code, // code
}).then(res => {
console.log(res === 200)
if (res.status === 200) {
this.userInfo.avatar = res.data.avatar
this.userInfo.nickname = res.data.nickname

2
utils/index.js

@ -524,7 +524,7 @@ export const handleLoginStatus = (location, complete, fail, success) => {
// 是否可以访问
let isAuth = false
console.log('即将跳转', location, parseUrl(location))
// console.log('即将跳转', location, parseUrl(location))
// 从 location 中获取当前url,location typeof string || object
let path = ''

4
utils/request.js

@ -22,12 +22,12 @@ fly.config.baseURL = VUE_APP_API_URL
// 小程序请求域名
// #ifdef MP-WEIXIN
fly.config.baseURL = 'http://itxzz.51vip.biz/api'
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
// #endif
// #ifdef APP-PLUS
// app端
fly.config.baseURL = 'http://itxzz.51vip.biz/api'
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
// #endif
fly.interceptors.response.use(

Loading…
Cancel
Save