11111111
This commit is contained in:
@@ -118,6 +118,8 @@ export default {
|
|||||||
vegeCellarTypeList: (params = {}) => request.post("/lpkgoods/vegeCellarTypeList", params),
|
vegeCellarTypeList: (params = {}) => request.post("/lpkgoods/vegeCellarTypeList", params),
|
||||||
// 我的菜窖 商品列表
|
// 我的菜窖 商品列表
|
||||||
vegeCellarList: (params = {}) => request.post("/lpkgoods/vegeCellarList", params),
|
vegeCellarList: (params = {}) => request.post("/lpkgoods/vegeCellarList", params),
|
||||||
|
// 我的菜窖 转赠亲友
|
||||||
|
transSubmission: (params = {}) => request.post("/transferrecords/submission", params),
|
||||||
// 我的菜窖 预约提菜
|
// 我的菜窖 预约提菜
|
||||||
getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params),
|
getStoreBySid: (params = {}) => request.get("/customerstore/getStoreBySid/" + params, params),
|
||||||
// 我的菜窖 预约提菜 选择时间范围
|
// 我的菜窖 预约提菜 选择时间范围
|
||||||
|
|||||||
22
pages.json
22
pages.json
@@ -299,6 +299,22 @@
|
|||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/records/transferRecords",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "转赠记录",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/records/transferRecords2",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "转赠记录",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/records/reservationRecords2",
|
"path" : "pages/records/reservationRecords2",
|
||||||
"style" :
|
"style" :
|
||||||
@@ -306,6 +322,12 @@
|
|||||||
"navigationBarTitleText" : "预约记录",
|
"navigationBarTitleText" : "预约记录",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/bind/bind_cloudCard",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
160
pages/bind/bind_cloudCard.vue
Normal file
160
pages/bind/bind_cloudCard.vue
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
<template>
|
||||||
|
<view style="display: flex;flex-direction: column;background-color: #fff;">
|
||||||
|
|
||||||
|
<view class="top">
|
||||||
|
<NavBar ref="nav" navTitle="绑定云菜窖" :showIcon="true" :start-change-height="page.startHeight"
|
||||||
|
:end-change-height="page.endHeight">
|
||||||
|
</NavBar>
|
||||||
|
<view>
|
||||||
|
<image src="https://supervise.yxtsoft.com/lpk/image/bind_bj.png" mode="scaleToFill"
|
||||||
|
style="width: 100%;height: 70vw"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view style="display: flex;flex-direction: column;margin-top: -10vw;box-sizing: border-box;">
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;border-radius: 20rpx;background: #FFFFFF;z-index: 1;align-items: center;box-sizing: border-box;">
|
||||||
|
<view style="margin: 15px;">绑定云菜窖卡</view>
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;">
|
||||||
|
<input maxlength="20" placeholder="请输入/扫码 提货编码"
|
||||||
|
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;margin-right: 10px;padding-left: 10px;"
|
||||||
|
type="number" :value="page.code" @input="onKeyInput1" />
|
||||||
|
<uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;" @click="scan" />
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: row;justify-content: space-between;box-sizing: border-box;width: calc(100vw - 60px);align-items: center;margin-top: 10px;">
|
||||||
|
<input maxlength="6" placeholder="请输入提货密码"
|
||||||
|
style="font-size: 30rpx;flex: 1;background: #F8F8F8;border-radius: 5px;height: 40px;line-height: 40px;padding-left: 10px;"
|
||||||
|
type="number" :value="page.codeKey" @input="onKeyInput2" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="margin: 30px;background-color: #fd3655;width: calc(100% - 60px);border-radius: 100rpx;height: 80rpx;display: flex;flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;"
|
||||||
|
@click="save">
|
||||||
|
绑定</view> -->
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column;padding:20px;">
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||||
|
<view style="background: #FF9D33; border-radius: 50%;width: 12px;height: 12px;"></view>
|
||||||
|
<view style="background: #FFDAB2; border-radius: 50%;width: 12px;height: 12px;"></view>
|
||||||
|
<text style="margin-left: 8px;font-size: 18px;color: #333;">绑定云菜窖</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货编码</text>
|
||||||
|
<view style="display: flex;flex-direction: row;justify-content: space-between;
|
||||||
|
background: #F8F8F8;border-radius: 5px;box-sizing: border-box;
|
||||||
|
width: calc(100vw -40px);align-items: center; padding:10px 0px;margin-top: 5px;">
|
||||||
|
<input maxlength="20" placeholder="请输入"
|
||||||
|
style="font-size: 30rpx;flex: 1;margin-right: 20px;padding-left: 10px;" type="number"
|
||||||
|
:value="page.code" @input="onKeyInput1" />
|
||||||
|
<!-- <view style="width: 1px;height: 20px;background: #ccc; margin-right: 10px;"></view> -->
|
||||||
|
<!-- <uni-icons type="camera-filled" color="#c0c4cc" size="22" style="flex-shrink: 0;margin-right: 10px;"
|
||||||
|
@click="scan" /> -->
|
||||||
|
</view>
|
||||||
|
<!-- <text style="margin-left: 8px;font-size: 14px;color: #333;margin-top: 20px;">提货密码</text>
|
||||||
|
<view style="display: flex;flex-direction: row;justify-content: space-between;
|
||||||
|
background: #F8F8F8;border-radius: 5px; padding:10px 0px;
|
||||||
|
box-sizing: border-box;width: calc(100vw - 40px);align-items: center;margin-top: 10px;">
|
||||||
|
<input maxlength="6" placeholder="请输入提货密码" style="font-size: 30rpx;flex: 1;padding-left: 10px;"
|
||||||
|
type="number" :value="page.codeKey" @input="onKeyInput2" />
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<view style="background: -webkit-linear-gradient(left,#FFB176,#FE923B); position: absolute; bottom: 30px;
|
||||||
|
width: 90%;border-radius: 100rpx;height: 80rpx;display: flex;
|
||||||
|
flex-direction: column;align-items: center;line-height: 80rpx;color: #FFFFFF;font-size: 36rpx;" @click="save">
|
||||||
|
绑定</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//引入bus
|
||||||
|
import bus from '@/common/bus';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: {
|
||||||
|
code: '',
|
||||||
|
codeKey: '',
|
||||||
|
customerSid: '',
|
||||||
|
startHeight: 0,
|
||||||
|
endHeight: 0
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
this.page.code = options.code
|
||||||
|
this.page.codeKey = options.codeKey
|
||||||
|
|
||||||
|
|
||||||
|
this.page.customerSid = getApp().globalData.sid
|
||||||
|
let info = uni.getSystemInfoSync();
|
||||||
|
|
||||||
|
this.page.startHeight = info.windowWidth * 0.6
|
||||||
|
this.page.endHeight = info.windowWidth * 0.8
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onKeyInput1(event) {
|
||||||
|
this.page.code = event.target.value
|
||||||
|
},
|
||||||
|
onKeyInput2(event) {
|
||||||
|
this.page.codeKey = event.target.value
|
||||||
|
},
|
||||||
|
scan() {
|
||||||
|
// 只允许通过相机扫码
|
||||||
|
let _this = this
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
success(res) {
|
||||||
|
_this.page.code = res.result.substring(res.result.length - 20, res.result.length)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
if (this.stringIsEmpty(this.page.code) || this.page.code.length != 20) {
|
||||||
|
this.shortToast('请输入20位提货编码')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (this.stringIsEmpty(this.page.codeKey) || this.page.codeKey.length != 6) {
|
||||||
|
// this.shortToast('请输入6位提货密码')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
let _this = this
|
||||||
|
_this.$api.pickUpCardBind(this.page).then((resp) => {
|
||||||
|
bus.$emit('order', "监听回调");
|
||||||
|
// setTimeout(() => {
|
||||||
|
// uni.$emit('order', "监听回调")
|
||||||
|
// }, 500)
|
||||||
|
const pages = getCurrentPages()
|
||||||
|
// 有可返回的页面则直接返回,uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
|
||||||
|
if (pages.length > 1) {
|
||||||
|
uni.navigateBack(1)
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/home/myCellar'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
_this.longToast(e.msg)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.top {
|
||||||
|
width: 100vw;
|
||||||
|
height: 70vw;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/home/pickUpCard'
|
url: '/pages/home/myCellar'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
_this.$api.pickUpCardBind(this.page).then((resp) => {
|
_this.$api.pickUpCardBind(this.page).then((resp) => {
|
||||||
bus.$emit('order', "监听回调");
|
bus.$emit('order', "监听回调");
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/home/pickUpCard'
|
url: '/pages/home/myCellar'
|
||||||
})
|
})
|
||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
|||||||
@@ -509,9 +509,14 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
gotoShopp() {
|
gotoShopp() {
|
||||||
uni.switchTab({
|
// uni.switchTab({
|
||||||
url: '/pages/home/cloudCard2',
|
// url: '/pages/home/cloudCard2',
|
||||||
|
// })
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/bind/bind_cloudCard'
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
transfer() {
|
transfer() {
|
||||||
@@ -553,20 +558,81 @@
|
|||||||
this.showModal3 = false
|
this.showModal3 = false
|
||||||
},
|
},
|
||||||
onShareAppMessage: function(res) {
|
onShareAppMessage: function(res) {
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中',
|
||||||
|
icon: 'loading',
|
||||||
|
duration: 10000
|
||||||
|
});
|
||||||
|
|
||||||
const promise = new Promise(resolve => {
|
let _this = this
|
||||||
// 模拟网络请求
|
|
||||||
setTimeout(()=>{
|
var list = []
|
||||||
resolve({
|
for (var i = 0; i < this.pickingUpGoods.length; i++) {
|
||||||
title: '标题',
|
var item = this.pickingUpGoods[i]
|
||||||
path: '页面'
|
|
||||||
|
if (item.count > 0) {
|
||||||
|
list.push({
|
||||||
|
goodsSid: item.goodsSid,
|
||||||
|
select: item.count
|
||||||
})
|
})
|
||||||
},3000)
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
customerSid: getApp().globalData.sid,
|
||||||
|
brandId: this.brandType,
|
||||||
|
vos: list
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("=========0", params);
|
||||||
|
|
||||||
|
_this.$api.transSubmission(params).then((resp) => {
|
||||||
|
|
||||||
|
console.log("=========", resp);
|
||||||
|
|
||||||
|
const promise = new Promise(resolve => {
|
||||||
|
// 模拟网络请求
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.hideLoading()
|
||||||
|
this.showModal3 = false
|
||||||
|
resolve({
|
||||||
|
title: '标题',
|
||||||
|
path: '页面'
|
||||||
|
})
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
promise
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch(e => {
|
||||||
|
this.shortToast('发生错误,请稍后再试.')
|
||||||
|
return
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
// this.shareCard()
|
||||||
promise
|
// wx.showLoading({
|
||||||
}
|
// title: '加载中',
|
||||||
|
// icon: 'loading',
|
||||||
|
// 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("res", res)
|
||||||
// console.log("data", res.target.dataset)
|
// console.log("data", res.target.dataset)
|
||||||
@@ -603,17 +669,34 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
shareCard(sid) {
|
shareCard() {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
|
||||||
_this.$api.shareEmpCard(sid).then((resp) => {
|
var list = []
|
||||||
|
for (var i = 0; i < this.pickingUpGoods.length; i++) {
|
||||||
|
var item = this.pickingUpGoods[i]
|
||||||
|
|
||||||
var item = _this.data.empCardGiftVos.find(item => item.sid === sid)
|
if (item.count > 0) {
|
||||||
|
list.push({
|
||||||
|
goodsSid: item.goodsSid,
|
||||||
|
select: item.count
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
console.log("item", item);
|
}
|
||||||
|
|
||||||
item.share = '2'
|
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
customerSid: getApp().globalData.sid,
|
||||||
|
brandId: this.brandType,
|
||||||
|
vos: list
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("=========0", params);
|
||||||
|
|
||||||
|
_this.$api.transSubmission(params).then((resp) => {
|
||||||
|
|
||||||
|
console.log("=========", resp);
|
||||||
}).catch(e => {})
|
}).catch(e => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<view class="icon">
|
<view class="icon">
|
||||||
<image class="img" src="../../static/img/record-query/waiting_extraction.png"
|
<image class="img" src="../../static/img/record-query/waiting_extraction.png"
|
||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
<view v-if="data.count>0" class="count">{{data.count}}</view>
|
<!-- <view v-if="data.count>0" class="count">{{data.count}}</view> -->
|
||||||
</view>
|
</view>
|
||||||
<text class="name">待提菜</text>
|
<text class="name">待提菜</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -47,10 +47,9 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单记录 -->
|
<!-- 订单记录 -->
|
||||||
<view class="icon-cow">
|
<!-- <view class="icon-cow">
|
||||||
<text class="title">订单记录</text>
|
<text class="title">订单记录</text>
|
||||||
<view class="group">
|
<view class="group">
|
||||||
<!-- 待付款 -->
|
|
||||||
<view class="icon-name" @click="itemClick('待付款')">
|
<view class="icon-name" @click="itemClick('待付款')">
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
<image class="img" src="../../static/img/record-query/obligation.png" mode="aspectFill">
|
<image class="img" src="../../static/img/record-query/obligation.png" mode="aspectFill">
|
||||||
@@ -59,7 +58,6 @@
|
|||||||
</view>
|
</view>
|
||||||
<text class="name">待付款</text>
|
<text class="name">待付款</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 已提菜 -->
|
|
||||||
<view class="icon-name" @click="itemClick('已付款')">
|
<view class="icon-name" @click="itemClick('已付款')">
|
||||||
<view class="icon">
|
<view class="icon">
|
||||||
<image class="img" src="../../static/img/record-query/paid.png" mode="aspectFill">
|
<image class="img" src="../../static/img/record-query/paid.png" mode="aspectFill">
|
||||||
@@ -70,7 +68,7 @@
|
|||||||
<view class="icon-name"></view>
|
<view class="icon-name"></view>
|
||||||
<view class="icon-name"></view>
|
<view class="icon-name"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- 转赠记录 -->
|
<!-- 转赠记录 -->
|
||||||
<view class="icon-cow">
|
<view class="icon-cow">
|
||||||
<text class="title">转赠记录</text>
|
<text class="title">转赠记录</text>
|
||||||
@@ -286,10 +284,14 @@
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case "赠与我的":
|
case "赠与我的":
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/records/transferRecords',
|
||||||
|
})
|
||||||
break;
|
break;
|
||||||
case "我的转赠":
|
case "我的转赠":
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/records/transferRecords2',
|
||||||
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
165
pages/records/transferRecords.vue
Normal file
165
pages/records/transferRecords.vue
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;height: 100vh;background: -webkit-linear-gradient(left,#FEA65F,#FB9440);">
|
||||||
|
<!-- 有列表的时候用 :auto='false' 需要你在onload等调用reload方法 -->
|
||||||
|
<z-paging ref="paging" v-model="data" @query="queryList" :pagingStyle='styleObject' :auto='true'>
|
||||||
|
|
||||||
|
<view v-for="(item,index) in data" style=" display: flex;flex-direction: column;margin-left: 10px;margin-right: 10px;background: #fff;margin-top: 10px;
|
||||||
|
border-radius: 10px;padding: 10px 20px;">
|
||||||
|
|
||||||
|
<view class="item">
|
||||||
|
<text class="item_left">转赠单号:</text>
|
||||||
|
<text class="item_rifht">{{item.reserveCode}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="item_left">转赠时间:</text>
|
||||||
|
<text class="item_rifht">{{item.reserveDate}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" >
|
||||||
|
<text class="item_left">转赠留言:</text>
|
||||||
|
<text class="item_rifht">{{item.userPhone}}</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</z-paging>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
styleObject: {
|
||||||
|
'padding-top': '10px',
|
||||||
|
'padding-bottom': '10px',
|
||||||
|
'border-radius': '15px',
|
||||||
|
'background': '#f2f2f2'
|
||||||
|
},
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 分页的请求
|
||||||
|
queryList(pageNo, pageSize) {
|
||||||
|
let _this = this
|
||||||
|
_this.$api.myOrderListByUserSid({
|
||||||
|
"current": pageNo,
|
||||||
|
"size": pageSize,
|
||||||
|
"params": {
|
||||||
|
"customerSid": getApp().globalData.sid,
|
||||||
|
"state": '0', //0 未提货 1 已提货
|
||||||
|
|
||||||
|
}
|
||||||
|
}).then((resp) => {
|
||||||
|
// 添加数据源
|
||||||
|
this.$refs.paging.complete(resp.records)
|
||||||
|
}).catch(e => {
|
||||||
|
// 出错了,点击重试
|
||||||
|
_this.$refs.paging.complete(false);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onShareAppMessage: function(res) {
|
||||||
|
console.log("res", res)
|
||||||
|
console.log("data", res.target.dataset)
|
||||||
|
var data = res.target.dataset.info
|
||||||
|
// this.shareCard(data.sid)
|
||||||
|
// ①
|
||||||
|
let shareData = JSON.stringify({
|
||||||
|
params: {
|
||||||
|
code: data.code,
|
||||||
|
codeKey: data.codeKey,
|
||||||
|
customerSid: ''
|
||||||
|
},
|
||||||
|
functionName: 'bindCard',
|
||||||
|
url: '/pages/detail/detail_affeection?sid=' + data.sid
|
||||||
|
|
||||||
|
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
|
||||||
|
// 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', "用户点击了取消")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.item {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_left {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_rifht {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn {
|
||||||
|
background: #FF4727;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
width: 30vw;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sharebtn::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn2 {
|
||||||
|
background: #FF7165;
|
||||||
|
width: 30vw;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn2::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn3 {
|
||||||
|
background: #CFCFCF;
|
||||||
|
width: 30vw;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn3::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
165
pages/records/transferRecords2.vue
Normal file
165
pages/records/transferRecords2.vue
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<template>
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;height: 100vh;background: -webkit-linear-gradient(left,#FEA65F,#FB9440);">
|
||||||
|
<!-- 有列表的时候用 :auto='false' 需要你在onload等调用reload方法 -->
|
||||||
|
<z-paging ref="paging" v-model="data" @query="queryList" :pagingStyle='styleObject' :auto='true'>
|
||||||
|
|
||||||
|
<view v-for="(item,index) in data" style=" display: flex;flex-direction: column;margin-left: 10px;margin-right: 10px;background: #fff;margin-top: 10px;
|
||||||
|
border-radius: 10px;padding: 10px 20px;">
|
||||||
|
|
||||||
|
<view class="item">
|
||||||
|
<text class="item_left">转赠单号:</text>
|
||||||
|
<text class="item_rifht">{{item.reserveCode}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<text class="item_left">转赠时间:</text>
|
||||||
|
<text class="item_rifht">{{item.reserveDate}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="item" >
|
||||||
|
<text class="item_left">转赠留言:</text>
|
||||||
|
<text class="item_rifht">{{item.userPhone}}</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</z-paging>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
styleObject: {
|
||||||
|
'padding-top': '10px',
|
||||||
|
'padding-bottom': '10px',
|
||||||
|
'border-radius': '15px',
|
||||||
|
'background': '#f2f2f2'
|
||||||
|
},
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 分页的请求
|
||||||
|
queryList(pageNo, pageSize) {
|
||||||
|
let _this = this
|
||||||
|
_this.$api.myOrderListByUserSid({
|
||||||
|
"current": pageNo,
|
||||||
|
"size": pageSize,
|
||||||
|
"params": {
|
||||||
|
"customerSid": getApp().globalData.sid,
|
||||||
|
"state": '0', //0 未提货 1 已提货
|
||||||
|
|
||||||
|
}
|
||||||
|
}).then((resp) => {
|
||||||
|
// 添加数据源
|
||||||
|
this.$refs.paging.complete(resp.records)
|
||||||
|
}).catch(e => {
|
||||||
|
// 出错了,点击重试
|
||||||
|
_this.$refs.paging.complete(false);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onShareAppMessage: function(res) {
|
||||||
|
console.log("res", res)
|
||||||
|
console.log("data", res.target.dataset)
|
||||||
|
var data = res.target.dataset.info
|
||||||
|
// this.shareCard(data.sid)
|
||||||
|
// ①
|
||||||
|
let shareData = JSON.stringify({
|
||||||
|
params: {
|
||||||
|
code: data.code,
|
||||||
|
codeKey: data.codeKey,
|
||||||
|
customerSid: ''
|
||||||
|
},
|
||||||
|
functionName: 'bindCard',
|
||||||
|
url: '/pages/detail/detail_affeection?sid=' + data.sid
|
||||||
|
|
||||||
|
// url:'/pages/bind/bind_pickUpCard?code=' + + &codeKey=' + data.codeKey,
|
||||||
|
// 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', "用户点击了取消")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.item {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_left {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_rifht {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn {
|
||||||
|
background: #FF4727;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
width: 30vw;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sharebtn::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn2 {
|
||||||
|
background: #FF7165;
|
||||||
|
width: 30vw;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn2::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn3 {
|
||||||
|
background: #CFCFCF;
|
||||||
|
width: 30vw;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sharebtn3::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user