Commit 5587dda0 by 张立顺

合并代码

1 parent 95ba0670
...@@ -85,7 +85,7 @@ Component({ ...@@ -85,7 +85,7 @@ Component({
let key = res.tapIndex == 0 ? 'monthTime' : 'todayTime' let key = res.tapIndex == 0 ? 'monthTime' : 'todayTime'
let merchantId = list[index]['merchantId'] let merchantId = list[index]['merchantId']
let params = { let params = {
partnerMerchantId: '44209468', // userInfo.merchantId partnerMerchantId: userInfo.merchantId, // userInfo.merchantId
merchantIdList: [merchantId], merchantIdList: [merchantId],
...dataObj[key] ...dataObj[key]
} }
...@@ -129,12 +129,14 @@ Component({ ...@@ -129,12 +129,14 @@ Component({
let { current } = this.data let { current } = this.data
// let { merchantId } = userInfo.subLoginUser // let { merchantId } = userInfo.subLoginUser
// console.log('merchantId', merchantId) // console.log('merchantId', merchantId)
console.log('test', userInfo.merchantId)
// 默认返回2前两条的具体数据 剩下需要自己手动查询 // 默认返回2前两条的具体数据 剩下需要自己手动查询
// console.log(outputApi.partnerMerchantTotal) // console.log(outputApi.partnerMerchantTotal)
outputApi outputApi
.partnerMerchantTotal({ merchantId: '44209468' }) .partnerMerchantTotal({ merchantId: userInfo.merchantId })
.then(result => { .then(result => {
// console.log(result) debugger
console.log(result)
let { dataList, yqMerchantIds } = result let { dataList, yqMerchantIds } = result
const list = yqMerchantIds.reduce((list, item, index) => { const list = yqMerchantIds.reduce((list, item, index) => {
...@@ -224,7 +226,7 @@ Component({ ...@@ -224,7 +226,7 @@ Component({
}, },
swiperChange(e) { swiperChange(e) {
console.log(e) console.log(e)
let { list } = this.data let { list, userInfo } = this.data
let { current } = e.detail let { current } = e.detail
this.setData({ this.setData({
totalMoney: list[current].totalMoney, totalMoney: list[current].totalMoney,
...@@ -237,7 +239,7 @@ Component({ ...@@ -237,7 +239,7 @@ Component({
let merchantId = list[current + 1]['merchantId'] let merchantId = list[current + 1]['merchantId']
console.log(merchantId) console.log(merchantId)
let params = { let params = {
partnerMerchantId: '44209468', partnerMerchantId: userInfo.merchantId,
merchantIdList: [merchantId] merchantIdList: [merchantId]
} }
// console.log() // console.log()
......
<!-- pages/tab/output/components/merchant/mrechant.wxml --> <!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- hidden="{{true}}" --> <!-- hidden="{{true}}" -->
<view class="con"> <view class="con" wx:if="{{list.length }}">
<view class="statistics"> <view class="statistics">
<view class="totalOutputValue box"> <view class="totalOutputValue box">
<view class="num">¥{{totalMoney}}</view> <view class="num">¥{{totalMoney}}</view>
...@@ -117,5 +117,5 @@ ...@@ -117,5 +117,5 @@
查看订单详情 查看订单详情
</navigator> </navigator>
</view> </view>
<nothingTipsCon wx:if="{{noProduct}}" /> <nothingTipsCon wx:if="{{!list.length }}" />
...@@ -16,5 +16,9 @@ Component({ ...@@ -16,5 +16,9 @@ Component({
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: {} methods: {
nav() {
wx.$router.go('pages.index')
}
}
}) })
/* pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxss */ /* pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxss */
.nothingCon { .nothingCon {
box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #fff; background-color: #fff;
// justify-content: center;
align-items: center;
padding-top: 80rpx;
.link {
color: rgba(54, 102, 254, 1);
font-size: 26rpx;
}
} }
.img { .img {
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
webp webp
src="{{nothingBg}}" src="{{nothingBg}}"
alt="" /> alt="" />
<view>
暂未开通,去 暂未开通,去
<text>了解产品</text> <text class="link" bind:tap="nav">了解产品</text>
开通门店 开通门店
</view>
</view> </view>
...@@ -7,6 +7,7 @@ const target = ['ip', 'dev', 'uat', 'prod'] ...@@ -7,6 +7,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
3生产 3生产
*/ */
const index = 1 const index = 1
const secretKey = { const secretKey = {
ip: {}, ip: {},
dev: { dev: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!