Commit 943afd83 by 张立顺

新增sentry配置

1 parent 117b3a22
......@@ -3,9 +3,14 @@ import util from './utils/util'
import wxApi from './utils/utils_wx'
import '~/router/routerBefore'
import router from './router/index'
import * as Sentry from './utils/lib/sentry-miniapp'
// 有问题 前后顺序不能随意调整
// accountInfo.miniProgram.envVersion == 'release' &&
Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: 'https://59c3cfc3ffb84ed68fc0dda26fb09e12@sentry.glsx.com.cn/30'
})
console.log(test)
import { setSystem_info } from '~/utils/cache/storageApi'
// console.log(setSystem_info)
// 判断小程序是否需要更新
......@@ -21,7 +26,6 @@ import { promisifyAll } from './utils/lib/wx-promise-pro'
promisifyAll()
// promisify(wx.getSystemInfo)().then(console.log)
// 实例化对象存储
import { Storage } from './utils/cache/storage'
const $Storage = new Storage()
......@@ -34,7 +38,7 @@ import './utils/network'
App({
onLaunch(options) {
/**挂载到wx对象 */
/**挂载到wx对象 */
/**挂载到wx对象 */
wx.$authStatus = false
wx.$util = util
......
......@@ -10,7 +10,7 @@ Component({
type: Object,
observer(n) {
console.log(n, '=================')
this.getImageInfo(n)
n.posterUrl && this.getImageInfo(n)
}
}
},
......@@ -25,10 +25,10 @@ Component({
*/
methods: {
getImageInfo(n, width, height) {
wx.$api.showLoading('战报生成中')
wx.$api.showLoading('处理中')
let that = this
wx.getImageInfo({
src: `${n.posterUrl}?v=${Date.now()}`,
src: `${n.posterUrl}?v=${Date.now()}`,
success: function (res) {
console.log(res)
// w = res.width
......@@ -36,7 +36,7 @@ Component({
that.init(n, res.width, res.height)
},
fail: function (res) {
console.log(res);
console.log(res)
wx.$api.showToast('生成失败')
}
})
......
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<view class="layout">
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{orderObj[item.name] || 0}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<!-- text-hide -->
<view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}">{{item.activityName}}</view>
<view class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
下载海报
</view>
<view class="down-tips" wx:if="{{index == 0 && isShowTip}}">下载活动海报分享给门店开展活动</view>
</view>
<view class="content">
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status" wx:if="{{item.activityStatus == 1}}">
距离开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.activityStatus == 2}}">
已开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.activityStatus == 3 && item.interDays < 8}}">
已结束{{item.interDays}}天
</view>
</view>
<view class="rank-table">
<view class="tr">
<view class="th" style="width: {{subItem.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
{{subItem.label}}
</view>
</view>
<view wx:if="{{item.showStaffList.length}}">
<block wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="tr">
<view class="td text-hide" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j">
<view wx:if="{{j == 0 && idx < 3}}">
<image class="icon-rank" src="{{IMGURL}}output/rank0{{idx + 1}}.png?v={{img_version}}" />
</view>
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}}
</view>
</view>
</block>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">
查看更多
</view>
</view>
<view class="tr-no-data" wx:else>暂无数据</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest" wx:if="{{item.activityStatus == 2 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">
<!-- <text wx:if="{{item.toEndDays < 8}}">距离活动结束剩余{{item.interDays}}天,</text> -->
{{item.suggestTxt}}推荐以下建议:
</view>
<view class="suggest-block">
<view class="suggest-step" wx:for="{{item.suggestList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{orderObj[item.name] || 0}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<!-- text-hide -->
<view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}">
{{item.activityName}}
</view>
<view class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
母链海报
</view>
<view class="down-tips" wx:if="{{index == 0 && isShowTip}}">下载活动海报分享给门店开展活动</view>
</view>
<view class="content">
<view
class="content-row"
wx:for="{{merchantFormList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status" wx:if="{{item.activityStatus == 1}}">
距离开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.activityStatus == 2}}">
已开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.activityStatus == 3 && item.interDays < 8}}">
已结束{{item.interDays}}天
</view>
</view>
<view class="rank-table">
<view class="tr">
<view
class="th"
style="width: {{subItem.width || ''}};"
wx:for="{{tableHeadList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
{{subItem.label}}
</view>
</view>
<view wx:if="{{item.showStaffList.length}}">
<block
wx:for="{{item.showStaffList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
<view class="tr">
<view
class="td text-hide"
style="width: {{i.width || ''}};"
wx:for="{{tableHeadList}}"
wx:for-item="i"
wx:for-index="j"
wx:key="j">
<view wx:if="{{j == 0 && idx < 3}}">
<image class="icon-rank" src="{{IMGURL}}output/rank0{{idx + 1}}.png?v={{img_version}}" />
</view>
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}}
</view>
</view>
</block>
<view
wx:if="{{item.staffList.length}}"
class="btn-more"
bindtap="handleMore"
data-idx="{{index}}">
查看更多
</view>
</view>
<view class="tr-no-data" wx:else>暂无数据</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest" wx:if="{{item.activityStatus == 2 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">
<!-- <text wx:if="{{item.toEndDays < 8}}">距离活动结束剩余{{item.interDays}}天,</text> -->
{{item.suggestTxt}}推荐以下建议:
</view>
<view class="suggest-block">
<view
class="suggest-step"
wx:for="{{item.suggestList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<crowdfund-poster item="{{posterItem}}" />
\ No newline at end of file
<crowdfund-poster item="{{posterItem}}" />
......@@ -105,7 +105,7 @@
wx:if="{{item.activityUrl}}"
bind:tap="copyLink"
data-url="{{item.activityUrl}}">
下载活动二维码
下载海报
</view>
</view>
</view>
......
......@@ -27,7 +27,7 @@ Component({
getImageInfo(n) {
let that = this
wx.getImageInfo({
src: n.posterUrl,
src: `${n.posterUrl}?v=${Date.now()}`,
success: function (res) {
console.log(res)
// w = res.width
......
......@@ -7,7 +7,8 @@ const IMAGES = {
funnel: `${IMG_URL}/output/funnel.png`,
money: `${IMG_URL}/output/money.png`,
paper: `${IMG_URL}/output/paper.png`,
link: `${IMG_URL}/output/link.webp`
link: `${IMG_URL}/output/link.webp`,
empty: `${IMG_URL}/output/empty.png`
}
Component({
/**
......@@ -21,18 +22,19 @@ Component({
data: {
noProduct: false,
IMAGES,
sceneIndx: 3,
sceneIndx: 0,
startInd: 0,
isAct: false,
indicatorDots: true,
vertical: false,
autoplay: false,
interval: 2000,
duration: 500,
swiperHeight: 570,
// tabIndx: 4,
current: 0,
totalMoney: 0,
totalOrder: 0,
startInd: 0,
list: [],
nowList: [],
todayList: [],
......@@ -193,11 +195,31 @@ Component({
// this.
// this
// totalMoney = list[current].totalMoney
// let sceneIndx = list[current].startInd
let swiperHeight
let index = list[current].startInd
// console.log(index)
// 动态计算swiper 高度
if ([0, -1].includes(index)) {
swiperHeight = 483
} else if ([1, 2].includes(index)) {
console.log(list[current])
if (list[current]['showList'][index]['diagnoseList']) {
swiperHeight = 735
} else {
swiperHeight = 686
}
} else {
swiperHeight = 570
}
// console.log('swiperHeight', swiperHeight)
this.setData({
list,
yqMerchantIds,
totalMoney: list[current].totalMoney,
totalOrder: list[current].totalOrder
totalOrder: list[current].totalOrder,
sceneIndx: list[current].startInd,
swiperHeight
})
})
.catch(err => {
......@@ -210,17 +232,40 @@ Component({
handleSceneChange(e) {
console.log(e)
let { list } = this.data
let { index } = e.currentTarget.dataset
let { index, item } = e.currentTarget.dataset
console.log(item)
let { sceneIdx } = e.detail
sceneIdx = sceneIdx - 1
console.log(sceneIdx)
console.log(index)
let swiperHeight
// 动态计算swiper 高度
console.log(item.startInd)
// 最后要判断 sceneIdx 为空也能切换的兼容问题
if (sceneIdx == 0 || item.startInd == -1 || item['showList'][sceneIdx] == null) {
swiperHeight = 483
} else if ([1, 2].includes(sceneIdx)) {
// console.log(item['diagnoseList'])
// item['showList'][index]['diagnoseList']
if (item['showList'][sceneIdx]['diagnoseList']) {
swiperHeight = 735
} else {
swiperHeight = 686
}
} else {
swiperHeight = 590
}
// let value = list[index][sceneIdx]
// console.log(list[index]['showList'][sceneIdx - 1])
// 没开通场景不给切换过去
if (!list[index]['showList'][sceneIdx - 1]) return
list[index].startInd = sceneIdx - 1
// if (!list[index]['showList'][sceneIdx - 1]) return
list[index].startInd = sceneIdx
this.setData({
list,
startInd: sceneIdx
startInd: sceneIdx + 1,
sceneIndx: sceneIdx,
swiperHeight
// sceneIndx: sceneIdx - 1
})
},
getMerchantById(params) {
......@@ -247,7 +292,7 @@ Component({
obj.merchantName = item?.merchantName
// obj.merchantId = item
obj.startInd =
oldItem.startInd ||
oldItem?.startInd ||
item?.sceneList.findIndex(item => {
return item != null
}) ||
......@@ -262,6 +307,7 @@ Component({
// console.log('listObj', listObj)
console.log(obj.selectName)
let listObj = `list[${index}]`
console.log('sceneIndx', obj.startInd)
this.setData({
[listObj]: Object.assign(list[index], obj)
})
......@@ -270,11 +316,33 @@ Component({
console.log(e)
let { list, userInfo } = this.data
let { current } = e.detail
console.log(list[current].startInd)
let swiperHeight
// 动态计算swiper 高度
if (list[current].startInd == 0 || list[current].startInd == -1) {
swiperHeight = 483
} else if ([1, 2].includes(list[current].startInd)) {
let subscript = list[current]['startInd']
let item = list[current]['showList']
if (item[subscript]['diagnoseList']) {
swiperHeight = 735
} else {
swiperHeight = 686
}
} else if (condition) {
swiperHeight = 570
}
// console.log(swiperHeight)
this.setData({
totalMoney: list[current].totalMoney,
totalOrder: list[current].totalOrder,
startInd: 0
totalMoney: list[current].totalMoney || 0,
totalOrder: list[current].totalOrder || 0,
sceneIndx: list[current].startInd,
swiperHeight
})
// list[current].startInd == 0? ''
// 692
console.log('swiper', list[current].startInd)
// list
if (current >= 1 && list[current + 1] && list[current + 1].startInd == -1) {
// 请求
......@@ -296,6 +364,14 @@ Component({
console.log(err)
})
}
// else {
// this.setData({
// totalMoney: list[current].totalMoney || 0,
// totalOrder: list[current].totalOrder || 0,
// sceneIndx: list[current].startInd
// })
// }
}
}
})
......@@ -267,6 +267,19 @@
}
}
.emptyCon {
width: 100%;
height: 500rpx;
display: flex;
align-items: center;
justify-content: center;
.img {
width: 500rpx;
height: 500rpx;
}
}
// .swiper .wx-swiper-dot {
// width: 40rpx !important;
// height: 10rpx !important;
......@@ -275,11 +288,11 @@
// // display: inline-flex;
// // justify-content: space-between;
// }
swiper .wx-swiper-dot {
width: 35rpx;
height: 7rpx;
border-radius: 50%;
display: inline-flex;
margin-left: 19rpx;
justify-content: space-between;
}
\ No newline at end of file
// swiper .wx-swiper-dot {
// width: 35rpx;
// height: 7rpx;
// border-radius: 50%;
// display: inline-flex;
// margin-left: 19rpx;
// justify-content: space-between;
// }
\ No newline at end of file
......@@ -15,9 +15,11 @@
<!-- 无门店 -->
<!-- <merchantDataStatistics bind:swiperChange="swiperChange" /> -->
<!-- sceneIndx==3? 'short': -->
<!-- {{startInd ==4?'short':'full'}} -->
<swiper
indicator-dots="{{indicatorDots}}"
class="swiper {{startInd ==4?'short':'full'}}"
indicator-dots="{{list.length>1? indicatorDots:false}}"
class="swiper "
style="height:{{swiperHeight*2}}rpx"
autoplay="{{autoplay}}"
bindchange="swiperChange"
interval="{{interval}}"
......@@ -46,10 +48,11 @@
<scene-box
formData="{{item}}"
data-index="{{index}}"
data-item="{{item}}"
bind:handleSceneChange="handleSceneChange"
sceneActive="{{(item.startInd + 1)}}" />
</view>
<view class="outputValueCon" wx:if="{{!showNothingSceneCon}}">
<view class="outputValueCon " wx:if="{{!item.showNothingSceneCon && item.showList[item.startInd] }}">
<view class="title">产值图</view>
<view class="swiperCon" wx:if="{{item['showList']}}">
<view class="swiper-item ">
......@@ -82,7 +85,7 @@
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="diagnosisCon" wx:if="{{item.showList[item.startInd]['diagnoseList'].length}}">
<view class="tipsIcon">指标诊断</view>
<swiper
class="tips"
......@@ -107,13 +110,15 @@
</view>
<!-- <view wx:else>test</view> -->
</view>
<view wx:if="{{showNothingSceneCon}}" />
<view wx:else class="emptyCon">
<image class="img" src="{{IMAGES.empty}}" />
</view>
</view>
</swiper-item>
</block>
</swiper>
<navigator
wx:if="{{swiperHeight>590}}"
class="navOhterApp"
target="miniProgram"
open-type="navigate"
......
账号登录: 10988866666(超管)xiong110
测试环境 bb123456 密码 bb123456
csysfws a123456
预发布服务商:csyfbfws01/a123456
ssfwsa a123456
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!