修改提交订单无法修改收货地址的问题;修改无法进入砍价商品详情页面的问题;修改退出登录无法回到首页的问题;

This commit is contained in:
gaoxs
2020-08-12 16:37:31 +08:00
parent bedfd9113e
commit 988bdb0677
8 changed files with 40 additions and 39 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3667,6 +3667,11 @@ page {
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
} }
.personal-data .wrapper .wrapList .item .picTxt .pictrue img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.personal-data .wrapper .wrapList .item .picTxt .pictrue .alter { .personal-data .wrapper .wrapList .item .picTxt .pictrue .alter {
width: 0.3*100rpx; width: 0.3*100rpx;

View File

@ -74,9 +74,7 @@
"UniversalLinks" : "https://yixiang.co/app/" "UniversalLinks" : "https://yixiang.co/app/"
} }
}, },
"ad" : { "ad" : {}
"csj" : {}
}
}, },
"splashscreen" : { "splashscreen" : {
"ios" : { "ios" : {

View File

@ -369,7 +369,7 @@ export default {
var that = this; var that = this;
getBargainDetail(that.bargainId) getBargainDetail(that.bargainId)
.then(res => { .then(res => {
res.data.bargain = res.data.bargain.replace( res.data.bargain.description = res.data.bargain.description.replace(
/\<img/gi, /\<img/gi,
'<img style="max-width:100%;height:auto;"' '<img style="max-width:100%;height:auto;"'
); );
@ -504,7 +504,9 @@ export default {
bargainId: that.bargainId, bargainId: that.bargainId,
bargainUserUid: that.bargainPartake bargainUserUid: that.bargainPartake
}) })
.then(() => {}) .then(() => {
})
.catch(() => { .catch(() => {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/activity/DargainDetails/index", path: "/pages/activity/DargainDetails/index",

View File

@ -486,7 +486,7 @@ export default {
}, },
changeAddress(addressInfo) { changeAddress(addressInfo) {
this.addressInfo = addressInfo; this.addressInfo = addressInfo;
this.getCartInfo() this.computedPrice();
}, },
createOrder() { createOrder() {
let shipping_type = this.shipping_type; let shipping_type = this.shipping_type;

View File

@ -55,7 +55,7 @@
<view <view
class="logOut cart-color acea-row row-center-wrapper" class="logOut cart-color acea-row row-center-wrapper"
@click="logout" @click="logout"
v-if="$deviceType=='app'" v-if="$deviceType!='routine'"
>退出登录</view> >退出登录</view>
</view> </view>
</template> </template>
@ -67,7 +67,7 @@ import {
postUserEdit, postUserEdit,
getLogout, getLogout,
switchH5Login, switchH5Login,
getUserInfo getUserInfo,
} from "@/api/user"; } from "@/api/user";
import cookie from "@/utils/store/cookie"; import cookie from "@/utils/store/cookie";
import store from "@//store"; import store from "@//store";
@ -78,17 +78,17 @@ export default {
components: { components: {
// VueCoreImageUpload // VueCoreImageUpload
}, },
data: function() { data: function () {
return { return {
avatar: "", avatar: "",
isWeixin: false, isWeixin: false,
currentAccounts: 0, currentAccounts: 0,
switchUserInfo: [], switchUserInfo: [],
userIndex: 0 userIndex: 0,
}; };
}, },
computed: mapGetters(["userInfo"]), computed: mapGetters(["userInfo"]),
mounted: function() { mounted: function () {
this.avatar = this.userInfo.avatar; this.avatar = this.userInfo.avatar;
this.isWeixin = isWeixin(); this.isWeixin = isWeixin();
this.getUserInfo(); this.getUserInfo();
@ -97,7 +97,7 @@ export default {
goChangePassword() { goChangePassword() {
this.$yrouter.push("/pages/user/ChangePassword/index"); this.$yrouter.push("/pages/user/ChangePassword/index");
}, },
switchAccounts: function(index) { switchAccounts: function (index) {
let that = this; let that = this;
this.userIndex = index; this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex]; let userInfo = this.switchUserInfo[this.userIndex];
@ -106,7 +106,7 @@ export default {
uni.showToast({ uni.showToast({
title: "切换的账号不存在", title: "切换的账号不存在",
icon: "none", icon: "none",
duration: 2000 duration: 2000,
}); });
return; return;
} }
@ -119,13 +119,13 @@ export default {
that.$emit("changeswitch", false); that.$emit("changeswitch", false);
location.reload(); location.reload();
}) })
.catch(err => { .catch((err) => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: title:
err.msg || err.response.data.msg || err.response.data.message, err.msg || err.response.data.msg || err.response.data.message,
icon: "none", icon: "none",
duration: 2000 duration: 2000,
}); });
}); });
} else { } else {
@ -135,9 +135,9 @@ export default {
this.$emit("changeswitch", false); this.$emit("changeswitch", false);
} }
}, },
getUserInfo: function() { getUserInfo: function () {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then((res) => {
// let switchUserInfo = res.data.switchUserInfo; // let switchUserInfo = res.data.switchUserInfo;
// for (let i = 0; i < switchUserInfo.length; i++) { // for (let i = 0; i < switchUserInfo.length; i++) {
// if (switchUserInfo[i].uid == that.userInfo.uid) that.userIndex = i; // if (switchUserInfo[i].uid == that.userInfo.uid) that.userIndex = i;
@ -152,58 +152,58 @@ export default {
}); });
}, },
chooseImage() { chooseImage() {
chooseImage(img => { chooseImage((img) => {
console.log(img) console.log(img);
this.avatar = img; this.avatar = img;
}); });
}, },
submit: function() { submit: function () {
let userInfo = this.userInfo; let userInfo = this.userInfo;
postUserEdit({ postUserEdit({
nickname: trim(this.userInfo.nickname), nickname: trim(this.userInfo.nickname),
avatar: this.avatar avatar: this.avatar,
}).then( }).then(
res => { (res) => {
this.$store.dispatch("userInfo", true); this.$store.dispatch("userInfo", true);
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: "none", icon: "none",
duration: 2000 duration: 2000,
}); });
this.$yrouter.back(); this.$yrouter.back();
}, },
err => { (err) => {
uni.showToast({ uni.showToast({
title: title:
err.msg || err.response.data.msg || err.response.data.message, err.msg || err.response.data.msg || err.response.data.message,
icon: "none", icon: "none",
duration: 2000 duration: 2000,
}); });
} }
); );
}, },
logout: function() { logout: function () {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
content: "确认退出登录?", content: "确认退出登录?",
success: function(res) { success: (res) => {
if (res.confirm) { if (res.confirm) {
getLogout() getLogout()
.then(res => { .then((res) => {
this.$store.commit("logout"); this.$store.commit("logout");
this.$yrouter.replace({ this.$yrouter.replace({
path: "/pages/user/Login/index", path: "/pages/user/Login/index",
query: {} query: {},
}); });
}) })
.catch(err => {}); .catch((err) => {});
} else if (res.cancel) { } else if (res.cancel) {
// console.log("用户点击取消"); // console.log("用户点击取消");
} }
} },
}); });
} },
} },
}; };
</script> </script>

View File

@ -61,10 +61,6 @@ function baseRequest(options) {
return fly.request(url, params || data, { return fly.request(url, params || data, {
...option ...option
}).then(res => { }).then(res => {
console.log("——————————— "+url+" —————————————")
console.log(params || data)
console.log(res.data)
console.log("—————————————— end ——————————")
const data = res.data || {}; const data = res.data || {};
if (res.status !== 200) { if (res.status !== 200) {
return Promise.reject({ msg: "请求失败", res, data }); return Promise.reject({ msg: "请求失败", res, data });