分享功能-803
parent
ffa10cb4d3
commit
9abedc3f2e
|
@ -160,14 +160,23 @@
|
|||
// 分享到微信
|
||||
onShareAppMessage(res) {
|
||||
let shareObj = {
|
||||
imageUrl:'/static/img/shear-index.jpg'
|
||||
title:'老农极鲜',
|
||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
||||
imageUrl:'/static/img/shear-index.jpg',
|
||||
}
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline(res){
|
||||
|
||||
let shareObj = {
|
||||
title:'老农极鲜',
|
||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
||||
imageUrl:'/static/img/shear-index.jpg',
|
||||
}
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
// 触底
|
||||
onReachBottom(e) {
|
||||
|
|
|
@ -147,24 +147,6 @@
|
|||
// 刷新购物车信息
|
||||
getCartInfo();
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage(res) {
|
||||
if(res.from==='button'){//分享按钮
|
||||
this.isShow = false;
|
||||
return {
|
||||
title:'分销二维码',
|
||||
imageUrl:this.codeImg,
|
||||
success: function (res) {
|
||||
if(res.errMsg == 'shareAppMessage:ok'){
|
||||
console.log("成功",res)
|
||||
}
|
||||
},
|
||||
fail:function(res){
|
||||
console.log("失败",res)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getUserInfo(){
|
||||
|
|
|
@ -113,14 +113,6 @@
|
|||
if(op.id){this.id = op.id;}
|
||||
if(op.backTag){this.backTag = op.backTag;}
|
||||
this.getOrderDetail();
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline(res){
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 查询订单详情
|
||||
|
|
|
@ -114,14 +114,6 @@
|
|||
this.page++;
|
||||
this.getOrderList();
|
||||
}
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline(res){
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 导航切换
|
||||
|
|
|
@ -116,12 +116,25 @@
|
|||
this.scroolTop = false;
|
||||
}
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage(res) {
|
||||
|
||||
let shareObj = {
|
||||
title:this.shopDetail.name,
|
||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
||||
imageUrl:this.shopDetail.images[0],
|
||||
}
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline(res){
|
||||
|
||||
let shareObj = {
|
||||
title:this.shopDetail.name,
|
||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
||||
imageUrl:this.shopDetail.images[0],
|
||||
}
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
mounted() {
|
||||
// 获取当前页面路径
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -315,6 +315,8 @@ var _default = {
|
|||
// 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage(res) {
|
||||
var shareObj = {
|
||||
title: '老农极鲜',
|
||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
||||
imageUrl: '/static/img/shear-index.jpg' };
|
||||
|
||||
// 返回shareObj
|
||||
|
@ -322,7 +324,14 @@ var _default = {
|
|||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function onShareTimeline(res) {
|
||||
var shareObj = {
|
||||
title: '老农极鲜',
|
||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
||||
imageUrl: '/static/img/shear-index.jpg' };
|
||||
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
// 触底
|
||||
onReachBottom: function onReachBottom(e) {
|
||||
|
|
|
@ -335,24 +335,6 @@ var _default = {
|
|||
// 刷新购物车信息
|
||||
(0, _publicApi.getCartInfo)();
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage(res) {
|
||||
if (res.from === 'button') {//分享按钮
|
||||
this.isShow = false;
|
||||
return {
|
||||
title: '分销二维码',
|
||||
imageUrl: this.codeImg,
|
||||
success: function success(res) {
|
||||
if (res.errMsg == 'shareAppMessage:ok') {
|
||||
console.log("成功", res);
|
||||
}
|
||||
},
|
||||
fail: function fail(res) {
|
||||
console.log("失败", res);
|
||||
} };
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getUserInfo: function getUserInfo() {var _this = this;
|
||||
|
|
|
@ -352,9 +352,7 @@ var _default = { data: function data() {return { orderDetail: {}, //订单详情
|
|||
flag: true, isLoading: false, id: 0, //订单id
|
||||
coupon_vip_price: '', //折扣优惠
|
||||
priceAll: '', //实际付款
|
||||
backTag: '' };}, onLoad: function onLoad(op) {if (op.id) {this.id = op.id;}if (op.backTag) {this.backTag = op.backTag;}this.getOrderDetail();}, // 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
||||
onShareTimeline: function onShareTimeline(res) {}, methods: { // 查询订单详情
|
||||
backTag: '' };}, onLoad: function onLoad(op) {if (op.id) {this.id = op.id;}if (op.backTag) {this.backTag = op.backTag;}this.getOrderDetail();}, methods: { // 查询订单详情
|
||||
getOrderDetail: function getOrderDetail() {var _this = this;uni.showLoading({ title: '加载中' });this.$requst.get('/api/user/order-detail', { id: this.id }).then(function (res) {if (res.code == 0) {console.log(res, '订单详情');_this.orderDetail = res.data;_this.coupon_vip_price = _this.$toolAll.tools.addXiaoShu(parseFloat(res.data.discount_money) + parseFloat(res.data.coupon_price));_this.priceAll = _this.$toolAll.tools.addXiaoShu(parseFloat(res.data.balance) + parseFloat(res.data.wechat));}uni.hideLoading();_this.isLoading = true;});}, // 取消订单
|
||||
cancleEv: function cancleEv(coding) {var _this2 = this;var params = { order_coding: coding //订单号
|
||||
};this.$requst.post('/api/order/cancel', params).then(function (res) {if (res.code == 0) {_this2.$toolAll.tools.showToast('取消订单成功(*^▽^*)');uni.navigateTo({ url: '/pagesA/order/order' });} else {_this2.$toolAll.tools.showToast(res.msg);}});}, // 确认收货
|
||||
|
|
|
@ -285,18 +285,10 @@ var _vuex = __webpack_require__(/*! vuex */ 13); //
|
|||
var _default = { data: function data() {return { newTop: uni.getSystemInfoSync().statusBarHeight + 50, orderNav: [{ title: '全部', tag: 'all' }, { title: '待付款', tag: 'waiting' }, { title: '已下单', tag: 'paid' }, { title: '已发货', tag: 'shipped' }, { title: '已完成', tag: 'completed' }, { title: '已取消', tag: 'closed' }], activeIndex: 0, scrollLeft: 0, tabsScrollLeft: 0, navWidth: '', //导航宽度
|
||||
orderList: [], flag: true, isLoading: false, total: 0, totalAll: -1, page: 1, size: 10, tag: 'all', order_coding: '', //订单号
|
||||
backTag: '' };}, onLoad: function onLoad(op) {var _this = this;if (op.tag && op.index) {this.tag = op.tag;this.activeIndex = op.index;setTimeout(function () {//计算左滑距离
|
||||
_this.setLeft();}, 200);}if (op.backTag) {this.backTag = op.backTag;}this.navWidth = this.orderNav.length * 150 - 20 + 'rpx';}, onShow: function onShow() {this.orderList = [];this.getOrderList();}, onReachBottom: function onReachBottom(e) {if (this.orderList.length < this.total) {this.page++;this.getOrderList();}}, // 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage() {}, // 分享到朋友圈
|
||||
onShareTimeline: function onShareTimeline(res) {}, methods: { // 导航切换
|
||||
changeNav: function changeNav(index, tag) {this.total = 0;this.totalAll = -1;this.activeIndex = index;this.tag = tag;this.orderList = [];this.page = 1;this.order_coding = '';this.getOrderList();
|
||||
// 分类切换效果
|
||||
this.setTabList();
|
||||
},
|
||||
// 搜索订单
|
||||
doSearch: function doSearch() {
|
||||
this.orderList = [];
|
||||
this.activeIndex = 0;
|
||||
this.tag = 'all';
|
||||
_this.setLeft();}, 200);}if (op.backTag) {this.backTag = op.backTag;}this.navWidth = this.orderNav.length * 150 - 20 + 'rpx';}, onShow: function onShow() {this.orderList = [];this.getOrderList();}, onReachBottom: function onReachBottom(e) {if (this.orderList.length < this.total) {this.page++;this.getOrderList();}}, methods: { // 导航切换
|
||||
changeNav: function changeNav(index, tag) {this.total = 0;this.totalAll = -1;this.activeIndex = index;this.tag = tag;this.orderList = [];this.page = 1;this.order_coding = '';this.getOrderList(); // 分类切换效果
|
||||
this.setTabList();}, // 搜索订单
|
||||
doSearch: function doSearch() {this.orderList = [];this.activeIndex = 0;this.tag = 'all';
|
||||
// 获取订单列表
|
||||
this.getOrderList();
|
||||
},
|
||||
|
|
|
@ -271,12 +271,25 @@ var _default = {
|
|||
this.scroolTop = false;
|
||||
}
|
||||
},
|
||||
// 分享到微信
|
||||
onShareAppMessage: function onShareAppMessage(res) {
|
||||
var shareObj = {
|
||||
title: this.shopDetail.name,
|
||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
||||
imageUrl: this.shopDetail.images[0] };
|
||||
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
// 分享到朋友圈
|
||||
onShareTimeline: function onShareTimeline(res) {
|
||||
var shareObj = {
|
||||
title: this.shopDetail.name,
|
||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
||||
imageUrl: this.shopDetail.images[0] };
|
||||
|
||||
// 返回shareObj
|
||||
return shareObj;
|
||||
},
|
||||
mounted: function mounted() {
|
||||
// 获取当前页面路径
|
||||
|
|
Loading…
Reference in New Issue