Commit 928ad6b8 by xuningning

修复已知问题

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