guoxing 1 year ago
parent
commit
944a015134
  1. 5
      common/request.api.js
  2. 10
      pages/bind/bind_cloudCard.vue
  3. 38
      pages/good/reservation.vue
  4. 2
      pages/home/cloudCard2.vue
  5. 121
      pages/home/myCellar.vue
  6. 6
      pages/home/myHome.vue
  7. 40
      pages/login/login.vue
  8. 46
      pages/records/transferRecords.vue
  9. 20
      pages/records/transferRecords2.vue

5
common/request.api.js

@ -71,6 +71,9 @@ export default {
createOrder: (params = {}) => request.post("/empsreservoorder/createOrder", params), createOrder: (params = {}) => request.post("/empsreservoorder/createOrder", params),
// 预约记录 // 预约记录
orderListByUserSid: (params = {}) => request.post("/lpksreservoorder/orderListByUserSid", params, {}, {}, true), orderListByUserSid: (params = {}) => request.post("/lpksreservoorder/orderListByUserSid", params, {}, {}, true),
// 转赠记录
transferRecordsList: (params = {}) => request.post("/transferrecords/transferRecordsList", params, {}, {}, true),
// 我的 // 我的
// 获取头像 昵称 // 获取头像 昵称
@ -120,6 +123,8 @@ export default {
vegeCellarList: (params = {}) => request.post("/lpkgoods/vegeCellarList", params), vegeCellarList: (params = {}) => request.post("/lpkgoods/vegeCellarList", params),
// 我的菜窖 转赠亲友 // 我的菜窖 转赠亲友
transSubmission: (params = {}) => request.post("/transferrecords/submission", params), transSubmission: (params = {}) => request.post("/transferrecords/submission", params),
// 我的菜窖 领取/绑定转赠菜窖
receiveTransferGoods: (params = {}) => request.post("/vegetablecellar/receiveTransferGoods", params),
// 我的菜窖 预约提菜 // 我的菜窖 预约提菜
getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params), getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params),
// 我的菜窖 预约提菜 选择时间范围 // 我的菜窖 预约提菜 选择时间范围

10
pages/bind/bind_cloudCard.vue

@ -127,7 +127,15 @@
// return // return
// } // }
let _this = this let _this = this
_this.$api.pickUpCardBind(this.page).then((resp) => {
var params = {
customerSid: this.page.customerSid,
transferSid: this.page.codeKey
}
console.log("params+++++++++++++++", params);
_this.$api.receiveTransferGoods(params).then((resp) => {
bus.$emit('order', "监听回调"); bus.$emit('order', "监听回调");
// setTimeout(() => { // setTimeout(() => {
// uni.$emit('order', "") // uni.$emit('order', "")

38
pages/good/reservation.vue

@ -47,11 +47,13 @@
</view> </view>
<view style="display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 1;"> <view
style="display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 1;">
<text <text
style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif; flex: 1;">提货时间</text> style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif; flex: 1;">提货时间</text>
<uni-datetime-picker type="date" v-model="info.reserveDate":start="info.start" :end="info.end":disabledDate="disabledDate" /> <uni-datetime-picker type="date" v-model="info.reserveDate" :start="info.start"
:end="info.end" :disabledDate="disabledDate" />
</view> </view>
@ -63,7 +65,8 @@
<text style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">提菜人</text> <text style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">提菜人</text>
<view style="display: flex;flex-direction: row;align-items: center;" @click="changePer()"> <view v-if="info.name!=''" style="display: flex;flex-direction: row;align-items: center;"
@click="changePer()">
<text <text
style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">{{info.name}}</text> style="font-size: 14px;color: #000; font-weight: 600;font-family: sans-serif;">{{info.name}}</text>
@ -72,6 +75,17 @@
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;"> <image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;">
</image> </image>
</view> </view>
<view v-if="info.name==''" style="display: flex;flex-direction: row;align-items: center;"
@click="changePer()">
<text style="font-size: 12px;color: #999; margin-left: 8px;">请完善</text>
<image src="../../static/right_icon.png" style="width: 15px;height: 15px;margin-left: 5px;">
</image>
</view>
</view> </view>
@ -246,7 +260,7 @@
}) })
}, },
jian(item){ jian(item) {
console.log("item》》》》", item) console.log("item》》》》", item)
const that = this const that = this
if (Number(item.count) == 1) { if (Number(item.count) == 1) {
@ -260,7 +274,8 @@
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') console.log('用户点击确定')
item.count = 0 item.count = 0
const index = that.pickingUpGoods.findIndex((info) => info.goodsSid === item.goodsSid) const index = that.pickingUpGoods.findIndex((info) => info.goodsSid === item
.goodsSid)
console.log("index》》》》", index) console.log("index》》》》", index)
that.pickingUpGoods.splice(index, 1) that.pickingUpGoods.splice(index, 1)
} else if (res.cancel) { } else if (res.cancel) {
@ -276,12 +291,23 @@
} }
}, },
jia(item){ jia(item) {
if (item.count < item.goodsNumber)
item.count = Number(item.count) + 1 item.count = Number(item.count) + 1
}, },
congirmExtract() { congirmExtract() {
let _this = this let _this = this
if (_this.info.reserveDate == '') {
this.shortToast('请选择日期')
return
}
if (this.info.name == "" || this.info.phone == '') {
this.shortToast('请完善提菜人信息')
return
}
let list = [] let list = []
for (var i = 0; i < this.pickingUpGoods.length; i++) { for (var i = 0; i < this.pickingUpGoods.length; i++) {

2
pages/home/cloudCard2.vue

@ -134,7 +134,7 @@
</view> </view>
<view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;"> <view style="color: #888;font-size: 10px;height: 10px;line-height: 10px;margin-top: 5px;">
{{data.brandVos[selectIndex2].qssl}}起订200斤以上免配送费</view> {{data.brandVos[selectIndex2].qssl}}起订</view>
</view> </view>
</view> </view>

121
pages/home/myCellar.vue

@ -401,7 +401,7 @@
}, },
methods: { methods: {
onKeyInput() { onKeyInput(event) {
this.transferInfo.remarks = event.target.value this.transferInfo.remarks = event.target.value
}, },
shareGift() { shareGift() {
@ -467,7 +467,9 @@
this.getcount() this.getcount()
}, },
jia(item) { jia(item) {
if (item.count < item.goodsNumber)
item.count = Number(item.count) + 1 item.count = Number(item.count) + 1
this.getcount() this.getcount()
this.addGoods(item) this.addGoods(item)
}, },
@ -509,14 +511,14 @@
}, },
gotoShopp() { gotoShopp() {
// uni.switchTab({ uni.switchTab({
// url: '/pages/home/cloudCard2', url: '/pages/home/cloudCard2',
// })
uni.navigateTo({
url: '/pages/bind/bind_cloudCard'
}) })
// uni.navigateTo({
// url: '/pages/bind/bind_cloudCard'
// })
}, },
transfer() { transfer() {
@ -558,13 +560,11 @@
this.showModal3 = false this.showModal3 = false
}, },
onShareAppMessage: function(res) { onShareAppMessage: function(res) {
wx.showLoading({
title: '加载中',
icon: 'loading',
duration: 10000
});
let _this = this let _this = this
const promise = new Promise(resolve => {
//
setTimeout(() => {
var list = [] var list = []
for (var i = 0; i < this.pickingUpGoods.length; i++) { for (var i = 0; i < this.pickingUpGoods.length; i++) {
@ -581,7 +581,8 @@
var params = { var params = {
customerSid: getApp().globalData.sid, customerSid: getApp().globalData.sid,
brandId: this.brandType, brandId: _this.brandType,
remarks: _this.transferInfo.remarks,
vos: list vos: list
} }
@ -590,83 +591,41 @@
_this.$api.transSubmission(params).then((resp) => { _this.$api.transSubmission(params).then((resp) => {
console.log("=========", resp); console.log("=========", resp);
_this.showModal3 = false
const promise = new Promise(resolve => { let shareData = JSON.stringify({
// params: {
setTimeout(() => { code: resp.transferCode,
wx.hideLoading() codeKey: resp.sid
this.showModal3 = false },
resolve({ functionName: 'bindCard',
title: '标题', url: '/pages/bind/bind_cloudCard?code=' + resp
path: '页面' .transferCode + "&codeKey=" + resp.sid
})
}, 3000) // url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
// functionName: 'share'
}) })
//
let value = encodeURIComponent(shareData)
return { resolve({
promise title: '汇融惠享-云菜窖',
} //
path: '/pages/login/login?data=' + value,
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', // 5:4
})
}).catch(e => { }).catch(e => {
this.shortToast('发生错误,请稍后再试.') _this.shortToast('发生错误,请稍后再试.')
return return
}) })
// this.shareCard() }, 0)
// wx.showLoading({ })
// title: '',
// icon: 'loading', return promise
// duration: 10000
// });
// const promise = new Promise(resolve => {
// //
// setTimeout(() => {
// wx.hideLoading()
// this.showModal3 = false
// resolve({
// title: '',
// path: ''
// })
// }, 3000)
// })
// return {
// promise
// }
// console.log("res", res)
// console.log("data", res.target.dataset)
// var data = res.target.dataset.info
// //
// let shareData = JSON.stringify({
// params: {
// code: data.code,
// codeKey: data.codeKey,
// customerSid: ''
// },
// functionName: 'bindCard',
// url: '/pages/detail/detail_affeection?sid=' + data.sid
// // url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid,
// // functionName: 'share'
// })
// //
// let value = encodeURIComponent(shareData)
// return {
// title: '-',
// //
// path: '/pages/login/login?data=' + value,
// imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', // 5:4
// success: function(res) {
// console.log('aaaa', "")
// },
// fail: function(res) {
// //
// console.log('aaaa', "")
// }
// }
}, },
shareCard() { shareCard() {

6
pages/home/myHome.vue

@ -122,7 +122,7 @@
</view> </view>
<text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后和您的朋友将获得蔬菜品鉴礼包</text> <text style="font-size: 12px;color: #4B4B4B; margin-top: 8px;">邀请新朋友后您将获得蔬菜品鉴礼包</text>
<!-- <view style="display: flex;flex-direction: row;align-items: center; "> <!-- <view style="display: flex;flex-direction: row;align-items: center; ">
@ -287,12 +287,12 @@
break; break;
case "赠与我的": case "赠与我的":
uni.navigateTo({ uni.navigateTo({
url: '/pages/records/transferRecords', url: '/pages/records/transferRecords2',
}) })
break; break;
case "我的转赠": case "我的转赠":
uni.navigateTo({ uni.navigateTo({
url: '/pages/records/transferRecords2', url: '/pages/records/transferRecords',
}) })
break; break;
} }

40
pages/login/login.vue

@ -84,6 +84,9 @@
console.log("人员sid", res.data.data.sid); console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token); console.log("token", res.data.data.token);
console.log("middleware>>>>>>>>>>>>", _this.middleware);
if (_this.middleware != null) { if (_this.middleware != null) {
// //
if ('share' == _this.middleware.functionName) { if ('share' == _this.middleware.functionName) {
@ -93,26 +96,29 @@
} else if ('bindCard' == _this.middleware } else if ('bindCard' == _this.middleware
.functionName) { .functionName) {
_this.middleware.params.customerSid = res.data.data
.sid
_this.$api.pickUpCardBind(_this.middleware.params)
.then((resp) => {
uni.reLaunch({ uni.reLaunch({
url: _this.middleware.url url: _this.middleware.url
}); });
}).catch(e => { // _this.middleware.params.customerSid = res.data.data
uni.showModal({ // .sid
title: '提示',
content: e.msg, // _this.$api.pickUpCardBind(_this.middleware.params)
showCancel: false, // .then((resp) => {
success: function(res) { // uni.reLaunch({
uni.switchTab({ // url: _this.middleware.url
url: '/pages/home/pickUpCard' // });
}) // }).catch(e => {
} // uni.showModal({
}); // title: '',
}) // content: e.msg,
// showCancel: false,
// success: function(res) {
// uni.switchTab({
// url: '/pages/home/pickUpCard'
// })
// }
// });
// })
} else { } else {
uni.showModal({ uni.showModal({

46
pages/records/transferRecords.vue

@ -9,26 +9,26 @@
<view class="item"> <view class="item">
<text class="item_left">转赠单号</text> <text class="item_left">转赠单号</text>
<text class="item_rifht">{{item.reserveCode}}</text> <text class="item_rifht">{{item.transferCode}}</text>
</view> </view>
<view class="item"> <view class="item">
<text class="item_left">转赠时间</text> <text class="item_left">转赠时间</text>
<text class="item_rifht">{{item.reserveDate}}</text> <text class="item_rifht">{{item.createTime}}</text>
</view> </view>
<view class="item" > <view class="item" >
<text class="item_left">转赠留言</text> <text class="item_left">转赠留言</text>
<text class="item_rifht">{{item.userPhone}}</text> <text class="item_rifht">{{item.remarks}}</text>
</view>
<view class="item">
<text class="item_left">领取人员</text>
<text class="item_rifht">{{item.lqNick}}</text>
</view> </view>
<view <view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;"> style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text> <text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text>
<button v-show="item.state=='1'" class='sharebtn' :data-info="item"
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button> open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item" <button v-show="item.state=='2'" class='sharebtn2'>转赠成功</button>
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view> </view>
</view> </view>
@ -54,12 +54,12 @@
// //
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
let _this = this let _this = this
_this.$api.myOrderListByUserSid({ _this.$api.transferRecordsList({
"current": pageNo, "current": pageNo,
"size": pageSize, "size": pageSize,
"params": { "params": {
"customerSid": getApp().globalData.sid, "customerSid": getApp().globalData.sid,
"state": '0', //0 1 "state": '1', //1 2
} }
}).then((resp) => { }).then((resp) => {
@ -78,12 +78,12 @@
// //
let shareData = JSON.stringify({ let shareData = JSON.stringify({
params: { params: {
code: data.code, code: data.transferCode,
codeKey: data.codeKey, codeKey: data.sid
customerSid: ''
}, },
functionName: 'bindCard', functionName: 'bindCard',
url: '/pages/detail/detail_affeection?sid=' + data.sid url: '/pages/bind/bind_cloudCard?code=' + data
.transferCode + "&codeKey=" + data.sid
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey, // url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
// FunctionName:'share! // FunctionName:'share!
@ -126,7 +126,7 @@
} }
.sharebtn { .sharebtn {
background: #FF4727; background: #FE9039;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
width: 30vw; width: 30vw;
@ -139,18 +139,6 @@
} }
.sharebtn2 { .sharebtn2 {
background: #FF7165;
width: 30vw;
font-size: 12px;
color: #fff;
border-radius: 20px;
}
.sharebtn2::after {
border: none;
}
.sharebtn3 {
background: #CFCFCF; background: #CFCFCF;
width: 30vw; width: 30vw;
font-size: 12px; font-size: 12px;
@ -158,7 +146,7 @@
border-radius: 20px; border-radius: 20px;
} }
.sharebtn3::after { .sharebtn2::after {
border: none; border: none;
} }

20
pages/records/transferRecords2.vue

@ -9,26 +9,24 @@
<view class="item"> <view class="item">
<text class="item_left">转赠单号</text> <text class="item_left">转赠单号</text>
<text class="item_rifht">{{item.reserveCode}}</text> <text class="item_rifht">{{item.transferCode}}</text>
</view> </view>
<view class="item"> <view class="item">
<text class="item_left">转赠时间</text> <text class="item_left">转赠时间</text>
<text class="item_rifht">{{item.reserveDate}}</text> <text class="item_rifht">{{item.createTime}}</text>
</view>
<view class="item">
<text class="item_left">转赠人员</text>
<text class="item_rifht">{{item.fxNick}}</text>
</view> </view>
<view class="item" > <view class="item" >
<text class="item_left">转赠留言</text> <text class="item_left">转赠留言</text>
<text class="item_rifht">{{item.userPhone}}</text> <text class="item_rifht">{{item.remarks}}</text>
</view> </view>
<view <view
style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;"> style="display: flex;flex-direction: row;margin-top: 5px;align-items: center;justify-content: space-between;width: 100%;">
<text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text> <text style="flex: 1;font-size: 12px; color: #A5A5A5; margin-right: 10px;">- {{item.goodss}}</text>
<button v-show="item.isShare=='1'" class='sharebtn' :data-info="item"
open-type="share">分享窖</button>
<button v-show="item.isShare=='2'" class='sharebtn2' :data-info="item"
open-type="share">已分享</button>
<button v-show="item.isShare=='3'" class='sharebtn3'>转赠成功</button>
</view> </view>
</view> </view>
@ -54,12 +52,12 @@
// //
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
let _this = this let _this = this
_this.$api.myOrderListByUserSid({ _this.$api.transferRecordsList({
"current": pageNo, "current": pageNo,
"size": pageSize, "size": pageSize,
"params": { "params": {
"customerSid": getApp().globalData.sid, "customerSid": getApp().globalData.sid,
"state": '0', //0 1 "state": '2', //1 2
} }
}).then((resp) => { }).then((resp) => {

Loading…
Cancel
Save