diff --git a/api/user.js b/api/user.js
index b9045c3..b4555ee 100644
--- a/api/user.js
+++ b/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)
}
/*
diff --git a/pages.json b/pages.json
index ee80869..871b897 100644
--- a/pages.json
+++ b/pages.json
@@ -318,7 +318,7 @@
{
"path": "pages/order/ReturnList/index",
"style": {
- "navigationBarTitleText": "退货列表"
+ "navigationBarTitleText": "我的售后"
}
},
{
diff --git a/pages/activity/Poster/index.vue b/pages/activity/Poster/index.vue
index 5689ca6..2548409 100644
--- a/pages/activity/Poster/index.vue
+++ b/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 () {
diff --git a/pages/authorization/index.vue b/pages/authorization/index.vue
index 47228b5..7c43a22 100644
--- a/pages/authorization/index.vue
+++ b/pages/authorization/index.vue
@@ -11,6 +11,8 @@
class="cu-btn author-btn"
open-type="getPhoneNumber"
@getphonenumber="phoneLogin">微信手机号一键登录
+
@@ -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: {
diff --git a/pages/home/index.vue b/pages/home/index.vue
index fe806b7..a2a308c 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -315,43 +315,44 @@ export default {
startQr: function() {
uni.scanCode({
success: res => {
- let option = handleUrlParam(res.result)
- switch (option.pageType) {
- case 'good':
- // 跳转商品详情
- this.$yrouter.push({
- path: '/pages/shop/GoodsCon/index',
- query: {
- q: res.result,
- },
- })
- break
- case 'group':
- // 跳转团购
- this.$yrouter.push({
- path: '/pages/activity/GroupRule/index',
- query: {
- q: res.result,
- },
- })
- break
- case 'dargain':
- // 跳转砍价
- this.$yrouter.push({
- path: '/pages/activity/DargainDetails/index',
- query: {
- q: res.result,
- },
- })
- break
- default:
- // 跳转分销
- this.$yrouter.push({
- path: '/pages/Loading/index',
- query: {},
- })
- break
- }
+ let option = handleUrlParam(res.result)
+ console.log(option)
+ switch (option.pageType) {
+ case 'good':
+ // 跳转商品详情
+ this.$yrouter.push({
+ path: '/pages/shop/GoodsCon/index',
+ query: {
+ q: res.result,
+ },
+ })
+ break
+ case 'group':
+ // 跳转团购
+ this.$yrouter.push({
+ path: '/pages/activity/GroupRule/index',
+ query: {
+ q: res.result,
+ },
+ })
+ break
+ case 'dargain':
+ // 跳转砍价
+ this.$yrouter.push({
+ path: '/pages/activity/DargainDetails/index',
+ query: {
+ q: res.result,
+ },
+ })
+ break
+ default:
+ // 跳转分销
+ this.$yrouter.push({
+ path: '/pages/Loading/index',
+ query: {},
+ })
+ break
+ }
},
})
},
diff --git a/pages/order/GoodsReturn/index.vue b/pages/order/GoodsReturn/index.vue
index b50ed1b..ab8fa94 100644
--- a/pages/order/GoodsReturn/index.vue
+++ b/pages/order/GoodsReturn/index.vue
@@ -1,45 +1,75 @@
-
-
-
+
+
+
+
+
+
+
+ {{ cart.productInfo.storeName }}
+
+
+ ¥{{
+ cart.productInfo.attrInfo
+ ? cart.productInfo.attrInfo.price
+ : cart.productInfo.price
+ }}
+
+ x{{ cart.cartNum }}
+
+
-
- {{ cart.productInfo.storeName }}
-
-
- ¥{{
- cart.productInfo.attrInfo
- ? cart.productInfo.attrInfo.price
- : cart.productInfo.price
- }}
+
+
+ 退货件数
+ {{ orderInfo.totalNum }}
+
+
+ 退款金额
+ ¥{{ orderInfo.payPrice }}
+
+
+
+ 退款原因
+ {{reason}}
+
- x{{ cart.cartNum }}
+
+
+ 备注说明
+
+ 申请退款
-
-
- 退货件数
- {{ orderInfo.totalNum }}
-
-
- 退款金额
- ¥{{ orderInfo.payPrice }}
-
-
-
- 退款原因
- {{reason}}
-
+
+
+
+
+
+
+
+ {{ cart.productInfo.storeName }}
+
+
+ ¥{{
+ cart.productInfo.attrInfo
+ ? cart.productInfo.attrInfo.price
+ : cart.productInfo.price
+ }}
+
+ x{{ cart.cartNum }}
+
-
-
- 备注说明
-
- 申请退款
@@ -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();
}
};
diff --git a/pages/order/GoodsReturn/productlist.vue b/pages/order/GoodsReturn/productlist.vue
new file mode 100644
index 0000000..21f0243
--- /dev/null
+++ b/pages/order/GoodsReturn/productlist.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ {{ cart.productInfo.storeName }}
+
+
+ ¥{{
+ cart.productInfo.attrInfo
+ ? cart.productInfo.attrInfo.price
+ : cart.productInfo.price
+ }}
+
+ x{{ cart.cartNum }}
+
+
+
+
+
+
+
+
+
diff --git a/pages/order/OrderDetails/index.vue b/pages/order/OrderDetails/index.vue
index f108c88..243de94 100644
--- a/pages/order/OrderDetails/index.vue
+++ b/pages/order/OrderDetails/index.vue
@@ -239,12 +239,20 @@
查看物流
+ @click="$yrouter.push({
+ path: '/pages/order/Logistics/index',
+ query:{
+ id:orderInfo.orderId
+ }
+ })"
+ >查看物流
+ 申请退款
确认收货
查看物流
+ 申请退款
删除订单
@@ -256,10 +264,20 @@
查看拼团
-
+
-
+
@@ -329,6 +347,7 @@
},
methods: {
copyClipboard,
+ // 申请退款
goGoodsReturn(orderInfo) {
this.$yrouter.push({
path: "/pages/order/GoodsReturn/index",
diff --git a/pages/user/Login/login.vue b/pages/user/Login/login.vue
index fbe897a..a446787 100644
--- a/pages/user/Login/login.vue
+++ b/pages/user/Login/login.vue
@@ -145,199 +145,196 @@
};
},
methods: {
- async loginMobile() {
- var that = this;
- const {
- account,
- captcha
- } = that;
- try {
- await that
- .$validator({
- account: [
- required(required.message("手机号码")),
- chs_phone(chs_phone.message())
- ],
- captcha: [
- required(required.message("验证码")),
- alpha_num(alpha_num.message("验证码"))
- ]
- })
- .validate({
- account,
- captcha
- });
- } catch (e) {
- return validatorDefaultCatch(e);
- }
- loginMobile({
- phone: that.account,
- captcha: that.captcha,
- spread: cookie.get("spread")
- })
- .then(res => {
- var data = res.data;
- that.$store.commit("login", data.token, dayjs(data.expires_time));
- handleGetUserInfo();
- })
- .catch(err => {
- uni.showToast({
- title: err.msg || err.response.data.msg || err.response.data.message,
- icon: "none",
- duration: 2000
- });
- });
- },
- async register() {
- var that = this;
- const {
- account,
- captcha,
- password
- } = that;
- try {
- await that
- .$validator({
- account: [
- required(required.message("手机号码")),
- chs_phone(chs_phone.message())
- ],
- captcha: [
- required(required.message("验证码")),
- alpha_num(alpha_num.message("验证码"))
- ],
- password: [
- required(required.message("密码")),
- attrs.range([6, 16], attrs.range.message("密码")),
- alpha_num(alpha_num.message("密码"))
- ]
- })
- .validate({
- account,
- captcha,
- password
- });
- } catch (e) {
- return validatorDefaultCatch(e);
- }
- register({
- account: that.account,
- captcha: that.captcha,
- password: that.password,
- inviteCode: that.inviteCode,
- spread: cookie.get("spread")
- })
- .then(res => {
- uni.showToast({
- title: res.msg,
- icon: "success",
- duration: 2000
- });
- that.formItem = 1;
- })
- .catch(err => {
- uni.showToast({
- title: err.msg || err.response.data.msg || err.response.data.message,
- icon: "none",
- duration: 2000
- });
- });
- },
- async code() {
- var that = this;
- const {
- account
- } = that;
- try {
- await that
- .$validator({
- account: [
- required(required.message("手机号码")),
- chs_phone(chs_phone.message())
- ]
- })
- .validate({
- account
- });
- } catch (e) {
- return validatorDefaultCatch(e);
- }
- if (that.formItem == 2) that.type = "register";
- await registerVerify({
- phone: that.account,
- type: that.type
- })
- .then(res => {
- uni.showToast({
- title: res.msg,
- icon: "success",
- duration: 2000
- });
- that.sendCode();
- })
- .catch(err => {
- uni.showToast({
- title: err.msg || err.response.data.msg || err.response.data.message,
- icon: "none",
- duration: 2000
- });
- });
- },
- navTap: function (index) {
- this.current = index;
- },
- async submit() {
- const {
- account,
- password
- } = this;
- try {
- await this.$validator({
- account: [
- required(required.message("账号")),
- attrs.range([5, 16], attrs.range.message("账号")),
- alpha_num(alpha_num.message("账号"))
- ],
- password: [
- required(required.message("密码")),
- attrs.range([6, 16], attrs.range.message("密码")),
- alpha_num(alpha_num.message("密码"))
- ]
- }).validate({
- account,
- password
- });
- } catch (e) {
- return validatorDefaultCatch(e);
- }
+ async loginMobile() {
+ var that = this;
+ const {
+ account,
+ captcha
+ } = that;
+ try {
+ await that
+ .$validator({
+ account: [
+ required(required.message("手机号码")),
+ chs_phone(chs_phone.message())
+ ],
+ captcha: [
+ required(required.message("验证码")),
+ alpha_num(alpha_num.message("验证码"))
+ ]
+ })
+ .validate({
+ account,
+ captcha
+ });
+ } catch (e) {
+ return validatorDefaultCatch(e);
+ }
+ loginMobile({
+ phone: that.account,
+ captcha: that.captcha,
+ spread: cookie.get("spread")
+ })
+ .then(res => {
+ var data = res.data;
+ that.$store.commit("login", data.token, dayjs(data.expires_time));
+ handleGetUserInfo();
+ })
+ .catch(err => {
+ uni.showToast({
+ title: err.msg || err.response.data.msg || err.response.data.message,
+ icon: "none",
+ duration: 2000
+ });
+ });
+ },
+ async register() {
+ var that = this;
+ const {
+ account,
+ captcha,
+ password
+ } = that;
+ try {
+ await that
+ .$validator({
+ account: [
+ required(required.message("手机号码")),
+ chs_phone(chs_phone.message())
+ ],
+ captcha: [
+ required(required.message("验证码")),
+ alpha_num(alpha_num.message("验证码"))
+ ],
+ password: [
+ required(required.message("密码")),
+ attrs.range([6, 16], attrs.range.message("密码")),
+ alpha_num(alpha_num.message("密码"))
+ ]
+ })
+ .validate({
+ account,
+ captcha,
+ password
+ });
+ } catch (e) {
+ return validatorDefaultCatch(e);
+ }
+ register({
+ account: that.account,
+ captcha: that.captcha,
+ password: that.password,
+ inviteCode: that.inviteCode,
+ spread: cookie.get("spread")
+ })
+ .then(res => {
+ uni.showToast({
+ title: res.msg,
+ icon: "success",
+ duration: 2000
+ });
+ that.formItem = 1;
+ })
+ .catch(err => {
+ uni.showToast({
+ title: err.msg || err.response.data.msg || err.response.data.message,
+ icon: "none",
+ duration: 2000
+ });
+ });
+ },
+ async code() {
+ var that = this;
+ const {
+ account
+ } = that;
+ try {
+ await that
+ .$validator({
+ account: [
+ required(required.message("手机号码")),
+ chs_phone(chs_phone.message())
+ ]
+ })
+ .validate({
+ account
+ });
+ } catch (e) {
+ return validatorDefaultCatch(e);
+ }
+ if (that.formItem == 2) that.type = "register";
+ await registerVerify({
+ phone: that.account,
+ type: that.type
+ })
+ .then(res => {
+ uni.showToast({
+ title: res.msg,
+ icon: "success",
+ duration: 2000
+ });
+ that.sendCode();
+ })
+ .catch(err => {
+ uni.showToast({
+ title: err.msg || err.response.data.msg || err.response.data.message,
+ icon: "none",
+ duration: 2000
+ });
+ });
+ },
+ navTap: function (index) {
+ this.current = index;
+ },
+ async submit() {
+ const {
+ account,
+ password
+ } = this;
+ try {
+ await this.$validator({
+ account: [
+ required(required.message("账号")),
+ attrs.range([5, 16], attrs.range.message("账号")),
+ alpha_num(alpha_num.message("账号"))
+ ],
+ password: [
+ required(required.message("密码")),
+ attrs.range([6, 16], attrs.range.message("密码")),
+ alpha_num(alpha_num.message("密码"))
+ ]
+ }).validate({
+ account,
+ password
+ });
+ } catch (e) {
+ return validatorDefaultCatch(e);
+ }
+ login({
+ username: account,
+ password,
+ spread: cookie.get("spread")
+ })
+ .then(({ data }) => {
+ this.$store.commit("login", data.token, dayjs(data.expires_time));
+ handleGetUserInfo();
+ // let replace=this.$yroute.query.replace
+ // if(replace){
- login({
- username: account,
- password,
- spread: cookie.get("spread")
- })
- .then(({
- data
- }) => {
- this.$store.commit("login", data.token, dayjs(data.expires_time));
- handleGetUserInfo();
- // let replace=this.$yroute.query.replace
- // if(replace){
-
- // }
- // this.$yrouter.replace({
- // path: this.$yroute.query.replace || '/pages/home/index'
- // });
- })
- .catch(err => {
- console.log(err);
- uni.showToast({
- title: err.msg || err.response.data.msg || err.response.data.message,
- icon: "none",
- duration: 2000
- });
- });
- }
+ // }
+ // this.$yrouter.replace({
+ // path: this.$yroute.query.replace || '/pages/home/index'
+ // });
+ })
+ .catch(err => {
+ console.log(err);
+ uni.showToast({
+ title: err.msg || err.response.data.msg || err.response.data.message,
+ icon: "none",
+ duration: 2000
+ });
+ });
+ }
}
};
diff --git a/pages/user/User/index.vue b/pages/user/User/index.vue
index b883206..965a4d1 100644
--- a/pages/user/User/index.vue
+++ b/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
diff --git a/utils/index.js b/utils/index.js
index 907b3b4..171ee01 100644
--- a/utils/index.js
+++ b/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 = ''
diff --git a/utils/request.js b/utils/request.js
index d7f70e0..ab1868e 100644
--- a/utils/request.js
+++ b/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(