售后部分测试改动
This commit is contained in:
@ -407,7 +407,8 @@ export function wxappBindingPhone(data) {
|
|||||||
* 小程序上传用户头像
|
* 小程序上传用户头像
|
||||||
*/
|
*/
|
||||||
export function wxappGetUserInfo (data) {
|
export function wxappGetUserInfo (data) {
|
||||||
return request.post('/wxapp/loginAuth', data)
|
// return request.post('/wxapp/loginAuth', data)
|
||||||
|
return request.get('/wechat/auth', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -318,7 +318,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/order/ReturnList/index",
|
"path": "pages/order/ReturnList/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "退货列表"
|
"navigationBarTitleText": "我的售后"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
return {
|
return {
|
||||||
status: true,
|
status: true,
|
||||||
id: 0,
|
id: 0,
|
||||||
image: "",
|
image: ""
|
||||||
img: 'https://img-blog.csdnimg.cn/20190626120443986.png'
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
class="cu-btn author-btn"
|
class="cu-btn author-btn"
|
||||||
open-type="getPhoneNumber"
|
open-type="getPhoneNumber"
|
||||||
@getphonenumber="phoneLogin">微信手机号一键登录</button>
|
@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>
|
<button class="cu-btn close-btn" @tap="back">暂不登录</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -35,11 +37,14 @@ import dayjs from 'dayjs'
|
|||||||
import cookie from '@/utils/store/cookie'
|
import cookie from '@/utils/store/cookie'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
|
// 公众号登录
|
||||||
|
import { auth } from '@/libs/wechat.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
authorize: false,
|
authorize: false,
|
||||||
canIUseGetUserProfile: false,
|
canIUseGetUserProfile: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -316,6 +316,7 @@ export default {
|
|||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: res => {
|
success: res => {
|
||||||
let option = handleUrlParam(res.result)
|
let option = handleUrlParam(res.result)
|
||||||
|
console.log(option)
|
||||||
switch (option.pageType) {
|
switch (option.pageType) {
|
||||||
case 'good':
|
case 'good':
|
||||||
// 跳转商品详情
|
// 跳转商品详情
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="apply-return">
|
<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">
|
<view class="pictrue">
|
||||||
<image :src="cart.productInfo.image" class="image" />
|
<image :src="cart.productInfo.image" class="image" />
|
||||||
</view>
|
</view>
|
||||||
@ -41,6 +46,31 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
|
<view class="returnBnt bg-color-red" @click="submit">申请退款</view>
|
||||||
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -68,13 +98,20 @@
|
|||||||
Authorization: "Bearer " + this.$store.state.token
|
Authorization: "Bearer " + this.$store.state.token
|
||||||
},
|
},
|
||||||
id: 0,
|
id: 0,
|
||||||
|
selected: true,
|
||||||
orderInfo: {},
|
orderInfo: {},
|
||||||
|
rebackList: [],
|
||||||
reasonList: [],
|
reasonList: [],
|
||||||
reason: "",
|
reason: "",
|
||||||
refund_reason_wap_explain: "",
|
refund_reason_wap_explain: "",
|
||||||
refund_reason_wap_img: []
|
refund_reason_wap_img: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.id = this.$yroute.query.id || 0;
|
||||||
|
this.getOrderDetail();
|
||||||
|
this.getRefundReason();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeReason(e) {
|
changeReason(e) {
|
||||||
this.reason = this.reasonList[e.mp.detail.value];
|
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>
|
</script>
|
||||||
|
39
pages/order/GoodsReturn/productlist.vue
Normal file
39
pages/order/GoodsReturn/productlist.vue
Normal file
@ -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>
|
@ -239,12 +239,20 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<template v-if="orderInfo.shippingType == 1 && status.type == 2">
|
<template v-if="orderInfo.shippingType == 1 && status.type == 2">
|
||||||
<view class="bnt default"
|
<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>
|
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="orderInfo.shippingType == 1 && status.type == 3 && orderInfo.deliveryType == 'express'">
|
<template v-if="orderInfo.shippingType == 1 && status.type == 3 && orderInfo.deliveryType == 'express'">
|
||||||
<view class="bnt default"
|
<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>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="orderInfo.shippingType == 1 && status.type == 4">
|
<template v-if="orderInfo.shippingType == 1 && status.type == 4">
|
||||||
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
||||||
@ -256,10 +264,20 @@
|
|||||||
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
|
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</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">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no"
|
<iframe
|
||||||
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -329,6 +347,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
copyClipboard,
|
copyClipboard,
|
||||||
|
// 申请退款
|
||||||
goGoodsReturn(orderInfo) {
|
goGoodsReturn(orderInfo) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/order/GoodsReturn/index",
|
path: "/pages/order/GoodsReturn/index",
|
||||||
|
@ -310,15 +310,12 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return validatorDefaultCatch(e);
|
return validatorDefaultCatch(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
login({
|
login({
|
||||||
username: account,
|
username: account,
|
||||||
password,
|
password,
|
||||||
spread: cookie.get("spread")
|
spread: cookie.get("spread")
|
||||||
})
|
})
|
||||||
.then(({
|
.then(({ data }) => {
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
this.$store.commit("login", data.token, dayjs(data.expires_time));
|
this.$store.commit("login", data.token, dayjs(data.expires_time));
|
||||||
handleGetUserInfo();
|
handleGetUserInfo();
|
||||||
// let replace=this.$yroute.query.replace
|
// let replace=this.$yroute.query.replace
|
||||||
|
@ -314,7 +314,6 @@ export default {
|
|||||||
iv: res.iv,
|
iv: res.iv,
|
||||||
code: loginRes.code, // 开发code
|
code: loginRes.code, // 开发code
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res === 200)
|
|
||||||
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
|
||||||
|
@ -524,7 +524,7 @@ export const handleLoginStatus = (location, complete, fail, success) => {
|
|||||||
|
|
||||||
// 是否可以访问
|
// 是否可以访问
|
||||||
let isAuth = false
|
let isAuth = false
|
||||||
console.log('即将跳转', location, parseUrl(location))
|
// console.log('即将跳转', location, parseUrl(location))
|
||||||
|
|
||||||
// 从 location 中获取当前url,location typeof string || object
|
// 从 location 中获取当前url,location typeof string || object
|
||||||
let path = ''
|
let path = ''
|
||||||
|
@ -22,12 +22,12 @@ fly.config.baseURL = VUE_APP_API_URL
|
|||||||
|
|
||||||
// 小程序请求域名
|
// 小程序请求域名
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
fly.config.baseURL = 'http://itxzz.51vip.biz/api'
|
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// app端
|
// app端
|
||||||
fly.config.baseURL = 'http://itxzz.51vip.biz/api'
|
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
fly.interceptors.response.use(
|
fly.interceptors.response.use(
|
||||||
|
Reference in New Issue
Block a user