Commit 928ad6b8 by xuningning

修复已知问题

parent 955ff2e0
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
list: [] list: []
} }
}, },
onLoad() { onShow() {
this.getCarousel() this.getCarousel()
}, },
methods: { methods: {
//获取轮播图 //获取轮播图
getCarousel() { getCarousel() {
this.$request('/carousel', 'GET', {}).then(res => { this.$request('/carousel', 'GET', {}).then(res => {
console.log('请求成功'); console.log(res);
this.list = res.data; this.list = res.data.info;
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
.activityModel { .activityModel {
height: 504rpx; height: 504rpx;
width: calc(100% - 80rpx); width: calc(100% - 80rpx);
background-color: #666666;
border-radius: 20rpx; border-radius: 20rpx;
margin: 20rpx 40rpx; margin: 20rpx 40rpx;
overflow: hidden; overflow: hidden;
......
...@@ -58,10 +58,6 @@ ...@@ -58,10 +58,6 @@
this.userInfo = res.data; this.userInfo = res.data;
this.applyinviteFriendsbg(); this.applyinviteFriendsbg();
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
saveHB() { saveHB() {
......
...@@ -59,13 +59,6 @@ ...@@ -59,13 +59,6 @@
this.buycode = res.data.buycode; this.buycode = res.data.buycode;
this.isShow = this.buycode.length > 0 ? true : false this.isShow = this.buycode.length > 0 ? true : false
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
} }
......
...@@ -48,10 +48,6 @@ ...@@ -48,10 +48,6 @@
this.nickname = res.data.nickname; this.nickname = res.data.nickname;
this.baseImg = res.data.avatar; this.baseImg = res.data.avatar;
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
// 新增图片 // 新增图片
......
...@@ -92,10 +92,6 @@ ...@@ -92,10 +92,6 @@
console.log('请求成功'); console.log('请求成功');
this.userInfo = res.data; this.userInfo = res.data;
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
scrolltolower() { scrolltolower() {
......
...@@ -48,10 +48,6 @@ ...@@ -48,10 +48,6 @@
console.log('请求成功') console.log('请求成功')
this.userInfo = res.data; this.userInfo = res.data;
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
//添加银行卡 //添加银行卡
......
...@@ -80,10 +80,10 @@ ...@@ -80,10 +80,10 @@
}).then(res => { }).then(res => {
this.pageList = res.data; this.pageList = res.data;
}).catch(err => { }).catch(err => {
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '' + err.message // title: '' + err.message
}) // })
}) })
}, },
choseThisaddress(item) { choseThisaddress(item) {
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<span class="active">{{allprice}}</span> <span class="active">{{allprice}}</span>
</view> </view>
</view> </view>
<view class="orderInfo"> <view class="orderInfo" style="margin-bottom: 150rpx;">
<view class="orderLine_pay" @click="changePayType(1)"> <view class="orderLine_pay" @click="changePayType(1)">
<view class="pay_left"> <view class="pay_left">
<image class="init_image" :src="urlToBase64('/static/wxp.png')" mode=""> <image class="init_image" :src="urlToBase64('/static/wxp.png')" mode="">
...@@ -286,10 +286,6 @@ ...@@ -286,10 +286,6 @@
} }
console.log(res.data) console.log(res.data)
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
getLocation() { getLocation() {
...@@ -341,10 +337,6 @@ ...@@ -341,10 +337,6 @@
// .num) // .num)
} }
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
//获取确定订单详情-购物车 //获取确定订单详情-购物车
...@@ -395,10 +387,10 @@ ...@@ -395,10 +387,10 @@
} }
this.baseaddress = res.data[0]; this.baseaddress = res.data[0];
}).catch(err => { }).catch(err => {
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '' + err.message // title: '' + err.message
}) // })
}) })
}, },
gotoaddress() { gotoaddress() {
......
...@@ -265,10 +265,6 @@ ...@@ -265,10 +265,6 @@
} }
_this.getGoodsDetail(); _this.getGoodsDetail();
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
open() { open() {
...@@ -375,6 +371,15 @@ ...@@ -375,6 +371,15 @@
}, },
//添加购物车 //添加购物车
add_shopping_cart() { add_shopping_cart() {
uni.showToast({
title: "请先登录!"
});
if (!uni.getStorageSync('token')) {
uni.reLaunch({
url: '/pages/login/login'
})
return
}
if (this.btnFlag) { if (this.btnFlag) {
return return
} }
...@@ -415,8 +420,8 @@ ...@@ -415,8 +420,8 @@
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/jump.png' iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/jump.png'
}) })
}).catch(err => { }).catch(err => {
this.btnFlag = false _this.btnFlag = false
_uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '' + err.message title: '' + err.message
}) })
...@@ -460,6 +465,15 @@ ...@@ -460,6 +465,15 @@
this.tabInit = item.name; this.tabInit = item.name;
}, },
goConfirmOrder() { goConfirmOrder() {
if (!uni.getStorageSync('token')) {
uni.showToast({
title: "请先登录!"
});
uni.reLaunch({
url: '/pages/login/login'
})
return
}
let _this = this; let _this = this;
if (this.goods_detail.skuOne.stock == 0) { if (this.goods_detail.skuOne.stock == 0) {
_this.$refs.uToast.show({ _this.$refs.uToast.show({
......
...@@ -139,6 +139,7 @@ ...@@ -139,6 +139,7 @@
if (option.q || uni.getStorageSync('inviteCode')) { if (option.q || uni.getStorageSync('inviteCode')) {
let code = uni.getStorageSync('inviteCode') let code = uni.getStorageSync('inviteCode')
if (option.q) { if (option.q) {
console.log(option.q)
let url = decodeURIComponent(option.q); let url = decodeURIComponent(option.q);
code = url.split("=")[1]; code = url.split("=")[1];
uni.setStorageSync('inviteCode', code); uni.setStorageSync('inviteCode', code);
...@@ -233,6 +234,15 @@ ...@@ -233,6 +234,15 @@
}, },
// 通用页面跳转方法 // 通用页面跳转方法
navigateToPage(page) { navigateToPage(page) {
if (!uni.getStorageSync('token')) {
uni.showToast({
title: "请先登录!"
});
uni.reLaunch({
url: '/pages/login/login'
})
return
}
let url = ''; let url = '';
switch (page) { switch (page) {
case 'hotActivity': case 'hotActivity':
......
...@@ -132,13 +132,6 @@ ...@@ -132,13 +132,6 @@
this.userInfo = res.data; this.userInfo = res.data;
uni.setStorageSync('userInfo', res.data) uni.setStorageSync('userInfo', res.data)
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
tabChange(res) { tabChange(res) {
......
...@@ -127,10 +127,6 @@ ...@@ -127,10 +127,6 @@
console.log('请求成功'); console.log('请求成功');
this.ShopCarInfo = res.data; this.ShopCarInfo = res.data;
}).catch(err => { }).catch(err => {
uni.showToast({
icon: 'error',
title: '' + err.message
})
}) })
}, },
goConfirOrder() { goConfirOrder() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9711,7 +9711,7 @@ function normalizeComponent ( ...@@ -9711,7 +9711,7 @@ function normalizeComponent (
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
...@@ -9723,7 +9723,7 @@ var _default = { ...@@ -9723,7 +9723,7 @@ var _default = {
mpShare: { mpShare: {
title: "", title: "",
// 分享的标题 // 分享的标题
path: '/pages/index/index', path: '/pages/index/index?code=' + uni.getStorageSync('inviteCode'),
// 分享的页面路径 // 分享的页面路径
imageUrl: '/static/logo.png' // 封面图片路径 imageUrl: '/static/logo.png' // 封面图片路径
} }
...@@ -9739,6 +9739,7 @@ var _default = { ...@@ -9739,6 +9739,7 @@ var _default = {
} }
}; };
exports.default = _default; exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }), /***/ }),
/* 34 */ /* 34 */
......
{ {
"component": true,
"usingComponents": { "usingComponents": {
"u-icon": "/node-modules/uview-ui/components/u-icon/u-icon", "u-icon": "/node-modules/uview-ui/components/u-icon/u-icon",
"u-badge": "/node-modules/uview-ui/components/u-badge/u-badge" "u-badge": "/node-modules/uview-ui/components/u-badge/u-badge"
} },
"component": true
} }
\ No newline at end of file
...@@ -189,7 +189,7 @@ var _default = { ...@@ -189,7 +189,7 @@ var _default = {
list: [] list: []
}; };
}, },
onLoad: function onLoad() { onShow: function onShow() {
this.getCarousel(); this.getCarousel();
}, },
methods: { methods: {
...@@ -197,8 +197,8 @@ var _default = { ...@@ -197,8 +197,8 @@ var _default = {
getCarousel: function getCarousel() { getCarousel: function getCarousel() {
var _this = this; var _this = this;
this.$request('/carousel', 'GET', {}).then(function (res) { this.$request('/carousel', 'GET', {}).then(function (res) {
console.log('请求成功'); console.log(res);
_this.list = res.data; _this.list = res.data.info;
}).catch(function (err) { }).catch(function (err) {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
.activityModel.data-v-47851966 { .activityModel.data-v-47851966 {
height: 504rpx; height: 504rpx;
width: calc(100% - 80rpx); width: calc(100% - 80rpx);
background-color: #666666;
border-radius: 20rpx; border-radius: 20rpx;
margin: 20rpx 40rpx; margin: 20rpx 40rpx;
overflow: hidden; overflow: hidden;
......
...@@ -221,12 +221,7 @@ var _default = { ...@@ -221,12 +221,7 @@ var _default = {
console.log('请求成功'); console.log('请求成功');
_this2.userInfo = res.data; _this2.userInfo = res.data;
_this2.applyinviteFriendsbg(); _this2.applyinviteFriendsbg();
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
saveHB: function saveHB() { saveHB: function saveHB() {
// console.log('点击了图片') // console.log('点击了图片')
......
...@@ -228,12 +228,7 @@ var _default = { ...@@ -228,12 +228,7 @@ var _default = {
_this2.code = res.data.buycode; _this2.code = res.data.buycode;
_this2.buycode = res.data.buycode; _this2.buycode = res.data.buycode;
_this2.isShow = _this2.buycode.length > 0 ? true : false; _this2.isShow = _this2.buycode.length > 0 ? true : false;
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
} }
} }
}; };
......
...@@ -234,12 +234,7 @@ var _default = { ...@@ -234,12 +234,7 @@ var _default = {
_this.phone = res.data.phone; _this.phone = res.data.phone;
_this.nickname = res.data.nickname; _this.nickname = res.data.nickname;
_this.baseImg = res.data.avatar; _this.baseImg = res.data.avatar;
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
// 新增图片 // 新增图片
afterRead: function afterRead(event) { afterRead: function afterRead(event) {
......
...@@ -277,12 +277,7 @@ var _default = { ...@@ -277,12 +277,7 @@ var _default = {
this.$request('/user-info', 'GET', {}).then(function (res) { this.$request('/user-info', 'GET', {}).then(function (res) {
console.log('请求成功'); console.log('请求成功');
_this.userInfo = res.data; _this.userInfo = res.data;
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
scrolltolower: function scrolltolower() { scrolltolower: function scrolltolower() {
console.log('+10'); console.log('+10');
......
...@@ -216,12 +216,7 @@ var _default = { ...@@ -216,12 +216,7 @@ var _default = {
this.$request('/merchant-info', 'GET', {}).then(function (res) { this.$request('/merchant-info', 'GET', {}).then(function (res) {
console.log('请求成功'); console.log('请求成功');
_this.userInfo = res.data; _this.userInfo = res.data;
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
//添加银行卡 //添加银行卡
addBankCard: function addBankCard() { addBankCard: function addBankCard() {
......
...@@ -272,10 +272,10 @@ var _default = { ...@@ -272,10 +272,10 @@ var _default = {
}).then(function (res) { }).then(function (res) {
_this2.pageList = res.data; _this2.pageList = res.data;
}).catch(function (err) { }).catch(function (err) {
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '' + err.message // title: '' + err.message
}); // })
}); });
}, },
choseThisaddress: function choseThisaddress(item) { choseThisaddress: function choseThisaddress(item) {
......
...@@ -494,12 +494,7 @@ var _default = { ...@@ -494,12 +494,7 @@ var _default = {
_this3.columns = ['送货上门']; _this3.columns = ['送货上门'];
} }
console.log(res.data); console.log(res.data);
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
getLocation: function getLocation() { getLocation: function getLocation() {
var _this = this; var _this = this;
...@@ -550,12 +545,7 @@ var _default = { ...@@ -550,12 +545,7 @@ var _default = {
// this.allprice = this.allprice + (Number(this.OrderInfo[i].goods_price) * this.OrderInfo[i] // this.allprice = this.allprice + (Number(this.OrderInfo[i].goods_price) * this.OrderInfo[i]
// .num) // .num)
} }
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
//获取确定订单详情-购物车 //获取确定订单详情-购物车
checkout_buy_carorder: function checkout_buy_carorder() { checkout_buy_carorder: function checkout_buy_carorder() {
...@@ -606,10 +596,10 @@ var _default = { ...@@ -606,10 +596,10 @@ var _default = {
} }
_this6.baseaddress = res.data[0]; _this6.baseaddress = res.data[0];
}).catch(function (err) { }).catch(function (err) {
uni.showToast({ // uni.showToast({
icon: 'error', // icon: 'error',
title: '' + err.message // title: '' + err.message
}); // })
}); });
}, },
gotoaddress: function gotoaddress() { gotoaddress: function gotoaddress() {
......
...@@ -490,12 +490,7 @@ var _default = { ...@@ -490,12 +490,7 @@ var _default = {
_this.buycode = res.data.buycode; _this.buycode = res.data.buycode;
} }
_this.getGoodsDetail(); _this.getGoodsDetail();
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
case 3: case 3:
case "end": case "end":
return _context.stop(); return _context.stop();
...@@ -603,6 +598,15 @@ var _default = { ...@@ -603,6 +598,15 @@ var _default = {
//添加购物车 //添加购物车
add_shopping_cart: function add_shopping_cart() { add_shopping_cart: function add_shopping_cart() {
var _this6 = this; var _this6 = this;
uni.showToast({
title: "请先登录!"
});
if (!uni.getStorageSync('token')) {
uni.reLaunch({
url: '/pages/login/login'
});
return;
}
if (this.btnFlag) { if (this.btnFlag) {
return; return;
} }
...@@ -643,8 +647,8 @@ var _default = { ...@@ -643,8 +647,8 @@ var _default = {
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/jump.png' iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/jump.png'
}); });
}).catch(function (err) { }).catch(function (err) {
_this6.btnFlag = false; _this.btnFlag = false;
_uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '' + err.message title: '' + err.message
}); });
...@@ -684,6 +688,15 @@ var _default = { ...@@ -684,6 +688,15 @@ var _default = {
this.tabInit = item.name; this.tabInit = item.name;
}, },
goConfirmOrder: function goConfirmOrder() { goConfirmOrder: function goConfirmOrder() {
if (!uni.getStorageSync('token')) {
uni.showToast({
title: "请先登录!"
});
uni.reLaunch({
url: '/pages/login/login'
});
return;
}
var _this = this; var _this = this;
if (this.goods_detail.skuOne.stock == 0) { if (this.goods_detail.skuOne.stock == 0) {
_this.$refs.uToast.show({ _this.$refs.uToast.show({
......
...@@ -370,6 +370,7 @@ var _default = { ...@@ -370,6 +370,7 @@ var _default = {
if (option.q || uni.getStorageSync('inviteCode')) { if (option.q || uni.getStorageSync('inviteCode')) {
var code = uni.getStorageSync('inviteCode'); var code = uni.getStorageSync('inviteCode');
if (option.q) { if (option.q) {
console.log(option.q);
var url = decodeURIComponent(option.q); var url = decodeURIComponent(option.q);
code = url.split("=")[1]; code = url.split("=")[1];
uni.setStorageSync('inviteCode', code); uni.setStorageSync('inviteCode', code);
...@@ -477,6 +478,15 @@ var _default = { ...@@ -477,6 +478,15 @@ var _default = {
}, },
// 通用页面跳转方法 // 通用页面跳转方法
navigateToPage: function navigateToPage(page) { navigateToPage: function navigateToPage(page) {
if (!uni.getStorageSync('token')) {
uni.showToast({
title: "请先登录!"
});
uni.reLaunch({
url: '/pages/login/login'
});
return;
}
var url = ''; var url = '';
switch (page) { switch (page) {
case 'hotActivity': case 'hotActivity':
......
...@@ -308,12 +308,7 @@ var _default = { ...@@ -308,12 +308,7 @@ var _default = {
console.log('请求成功'); console.log('请求成功');
_this.userInfo = res.data; _this.userInfo = res.data;
uni.setStorageSync('userInfo', res.data); uni.setStorageSync('userInfo', res.data);
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
tabChange: function tabChange(res) { tabChange: function tabChange(res) {
uni.navigateTo({ uni.navigateTo({
......
...@@ -324,12 +324,7 @@ var _default = { ...@@ -324,12 +324,7 @@ var _default = {
this.$request('/show-shopping-cart', 'GET', {}).then(function (res) { this.$request('/show-shopping-cart', 'GET', {}).then(function (res) {
console.log('请求成功'); console.log('请求成功');
_this3.ShopCarInfo = res.data; _this3.ShopCarInfo = res.data;
}).catch(function (err) { }).catch(function (err) {});
uni.showToast({
icon: 'error',
title: '' + err.message
});
});
}, },
goConfirOrder: function goConfirOrder() { goConfirOrder: function goConfirOrder() {
var confirOrderObj = { var confirOrderObj = {
......
export default { export default {
data() { data() {
return { return {
mpShare: { mpShare: {
title: "",// 分享的标题 title: "", // 分享的标题
path: '/pages/index/index', // 分享的页面路径 path: '/pages/index/index?code=' + uni.getStorageSync('inviteCode'), // 分享的页面路径
imageUrl: '/static/logo.png' // 封面图片路径 imageUrl: '/static/logo.png' // 封面图片路径
} }
} }
}, },
// 分享给微信好友 // 分享给微信好友
onShareAppMessage(res) { onShareAppMessage(res) {
return this.mpShare return this.mpShare
}, },
// 分享到朋友圈 // 分享到朋友圈
onShareTimeline(res) { onShareTimeline(res) {
return this.mpShare return this.mpShare
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment