Commit 6a7230e5 by 张立顺

新增更新日志

1 parent 26960138
......@@ -39,6 +39,8 @@ import './utils/network'
import { getDiscoverList } from '~/api/index.js'
import {Version} from 'glsx-common-sdk'
App({
onLaunch(options) {
/**挂载到wx对象 */
......@@ -49,7 +51,12 @@ App({
wx.$router = router
wx.$storage = $Storage /** 挂载全局缓存方法 */
wx.$eventbus = eventbus
wx.$versionConfig = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false
}
})
// 存储设备信息
setSystem_info()
// console.log('test')
......@@ -65,7 +72,21 @@ App({
})
})
},
async getVersionInfo(request) {
if (request) this.globalData.versionData = null
const {
versionData
} = this.globalData
if (versionData) return versionData
else {
const res = await wx.$versionConfig.get({
moduleUrl: 'mini-merchant',
env: 'update'
})
this.globalData.versionData = res
return res
}
},
onShow(options) {
getUpdateManager()
},
......@@ -73,5 +94,8 @@ App({
onPageNotFound(e) {
wx.$router.goHome()
},
onHide() {}
onHide() {},
globalData: {
versionData: null
},
})
......@@ -100,7 +100,8 @@
"customerManagement/customerList/customerList",
"customerManagement/editCustomer/editCustomer",
"customerManagement/saleList/saleList",
"customerManagement/technicianList/technicianList"
"customerManagement/technicianList/technicianList",
"log/log"
]
}
],
......
......@@ -11,9 +11,14 @@
},
"glsx-applet-component": {
"version": "1.1.18",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.18.tgz",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.18.tgz",
"integrity": "sha512-oNJMLkKh/BOFyiGUDlm5r+5dvqBlZx7T9U+UQ2BkqL8R9i713sCHs+1AOsFMA1GOjsgRM2ShgzoXaQef6RQ/ew=="
},
"glsx-common-sdk": {
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
},
"glsx-map-sdk": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/glsx-map-sdk/-/glsx-map-sdk-0.1.5.tgz",
......
......@@ -6,6 +6,7 @@
"dependencies": {
"@vant/weapp": "^1.10.7",
"glsx-applet-component": "^1.1.18",
"glsx-common-sdk": "^0.2.8",
"glsx-map-sdk": "^0.1.5"
},
"devDependencies": {},
......
// packageStoreAssistant/packageActivity/pages/log/log.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getVersionInfo()
},
async getVersionInfo() {
const logData = await getApp().getVersionInfo()
this.setData({
logData
})
wx.$versionConfig.set(logData.version)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageStoreAssistant/packageActivity/pages/log/log.wxss */
.layout {
.bg {
position: relative;
z-index: -1;
width: 100%;
height: 400rpx;
}
.log-box {
height: calc(100vh - 400rpx);
background: #FFFFFF;
overflow-y: scroll;
box-sizing: border-box;
padding: 40rpx 32rpx calc(40rpx + var(--constantSafeAreaInsetBottom));
padding: 40rpx 32rpx calc(40rpx + var(--envSafeAreaInsetBottom));
.title {
font-weight: 500;
font-size: 48rpx;
color: #282829;
margin-bottom: 48rpx;
}
.sub-title {
font-weight: 500;
font-size: 40rpx;
color: #333333;
margin-bottom: 4rpx;
}
.date {
font-size: 26rpx;
color: #999999;
margin-bottom: 24rpx;
}
.log-item {
margin-bottom: 40rpx;
.log-title {
width: fit-content;
height: 48rpx;
background-image: linear-gradient(-75deg, #E8E6FF 0%, #EDF1FF 49%, #E0F3FF 100%);
border-radius: 8rpx;
padding: 0 16rpx;
.text {
color: transparent !important;
background: linear-gradient(116deg, #27C0C2 0%, #4837E6 100%) !important;
-webkit-background-clip: text !important;
}
}
.log-content {
margin-top: 16rpx;
font-size: 28rpx;
color: #1B233D;
line-height: 44rpx;
.img{
width: 100%;
border-radius: 12rpx;
}
}
}
}
}
\ No newline at end of file
<view class="layout">
<navigation-bar showBack navStyle="background-color: transparent;">
生意助手更新记录
</navigation-bar>
<view class="bg">
<glsx-image webp src="personal/log-bg.png"></glsx-image>
</view>
<view class="log-box">
<view class="title">{{logData.title}}</view>
<view class="sub-title">
{{logData.subtitle}}
</view>
<view class="date">{{logData.date}}</view>
<block wx:for="{{logData.logList}}" wx:key="index">
<view class="log-item">
<view class="log-title text-center">
<view class="text">{{item.title}}</view>
</view>
<block wx:for="{{item.data}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="log-content">
<block wx:if="{{i.type == 'text'}}">
{{i.content}}
</block>
<block wx:else>
<view class="img">
<image webp src="{{i.content}}" mode="widthFix" />
</view>
</block>
</view>
</block>
</view>
</block>
</view>
</view>
\ No newline at end of file
......@@ -13,7 +13,7 @@ Component({
observers: {
'chartData.data': function (data) {
console.log(data, 'pie----------------')
data && data.length && this.onInitChart(data)
data && this.onInitChart(data)
}
},
/**
......
......@@ -3,9 +3,9 @@
流量情况
<view class="title-tip">客户领券后的预约情况</view>
</view>
<!-- <view class="" id="bar"></view> -->
<view class="ec-canvas">
<ec-canvas class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
<!-- force-use-old-canvas="true" -->
<ec-canvas force-use-old-canvas="true" class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" ></ec-canvas>
</view>
<view class="invalidFlowContainer">
<view class="header">
......
......@@ -5,6 +5,7 @@
</view>
<!-- <view class="" id="bar"></view> -->
<view class="ec-canvas">
<ec-canvas class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" force-use-old-canvas="true"></ec-canvas>
<!-- force-use-old-canvas="true" -->
<ec-canvas force-use-old-canvas="true" class="echart-box" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}" ></ec-canvas>
</view>
</view>
\ No newline at end of file
......@@ -47,10 +47,10 @@ var threeNumForTwo = {
}
var filterItemName = function (item,revenueData) {
console.log(item,revenueData);
// console.log(item,revenueData);
var unit = item.name == 'upgradeRateData' ? '%' : ''
if (revenueData && revenueData[item.name]) {
return revenueData[item.name].value + unit
return revenueData[item.name].value || 0 + unit
} else{
return 0 + unit
}
......
// packagesList/packageOutput/pages/openNewBusiness/openNewBusiness.js
import outputApi from '~/api/outputApi/index'
import { tsFormatTime } from '~/utils/format'
import { getMockData } from '~/api/api'
import { IMG_URL } from '~/utils/constantData'
import {
tsFormatTime
} from '~/utils/format'
import {
getMockData
} from '~/api/api'
import {
IMG_URL
} from '~/utils/constantData'
Page({
/**
* 页面的初始数据
......@@ -10,13 +16,12 @@ Page({
data: {
IMGURL: IMG_URL,
merchantInfo: {},
tabList: [
{
tabList: [{
label: '精品升级-太阳膜',
width: '34%'
},
{
label: '售后众筹',
label: '众筹活动',
width: '25%'
},
{
......@@ -57,8 +62,13 @@ Page({
rangeSelect(e) {
console.log(e)
// let { date } = e.detail
let { date, type } = e.detail
let { dateObj } = this.data
let {
date,
type
} = e.detail
let {
dateObj
} = this.data
// 按月份
dateObj = Object.assign(dateObj, date)
// return
......@@ -112,7 +122,9 @@ Page({
})
},
initData() {
let { tabIndx } = this.data
let {
tabIndx
} = this.data
tabIndx == 1 ? this.crowdfunding() : this.getAnalysisTendency(tabIndx)
console.log(tabIndx, 'tabIndx')
},
......@@ -124,7 +136,12 @@ Page({
},
getAnalysisTendency() {
// console.log(tabIndx, 'tabIndx')
let { allType, tabIndx, dateObj, merchantInfo } = this.data
let {
allType,
tabIndx,
dateObj,
merchantInfo
} = this.data
let params = {
shopMerchantIdList: [merchantInfo.merchantId || 44211227],
isSuper: false,
......@@ -156,36 +173,59 @@ Page({
})
})
apiNameTendency(params).then(res => {
console.log(res, 'analysisTendency')
this.setData({
lineChart: {
firstOrderDate: res?.firstOrderDate,
diagnosticResults: res.diagnosticResults || '',
diagramList: res.diagramList || []
}
console.log(res, 'analysisTendency')
this.setData({
lineChart: {
firstOrderDate: res?.firstOrderDate,
diagnosticResults: res.diagnosticResults || '',
diagramList: res.diagramList || []
}
})
})
})
// 精品升级请求流量接口数据
!tabIndx && this.getTrafficInterfaceData(params)
// 精品升级请求流量接口数据
!tabIndx && this.getTrafficInterfaceData(params)
},
getTrafficInterfaceData(params) {
outputApi.analysisInviteRecord(params).then(res => {
console.log(res, 'analysisInviteRecord')
let { expireReachCount, hadInvitedCount, notInvitedCount, cancelInvitedCount } = res
let {
expireReachCount,
hadInvitedCount,
notInvitedCount,
cancelInvitedCount
} = res
this.setData({
['chartDataPie.data']: [
{ value: hadInvitedCount, name: '已预约' },
{ value: cancelInvitedCount, name: '取消预约' },
{ value: expireReachCount, name: '超时未到店' },
{ value: notInvitedCount, name: '待预约' }
['chartDataPie.data']: [{
value: hadInvitedCount||0,
name: '已预约'
},
{
value: cancelInvitedCount||0,
name: '取消预约'
},
{
value: expireReachCount||0,
name: '超时未到店'
},
{
value: notInvitedCount||0,
name: '待预约'
}
],
['chartDataPie.total']: hadInvitedCount + cancelInvitedCount + expireReachCount + notInvitedCount
})
})
outputApi.analysisNotUpgradePage({ ...params, shopMerchantId: params.shopMerchantIdList.join(''), pageSize: 100, pageNum: 1 }).then(res => {
outputApi.analysisNotUpgradePage({
...params,
shopMerchantId: params.shopMerchantIdList.join(''),
pageSize: 100,
pageNum: 1
}).then(res => {
console.log(res, 'analysisNotUpgradePage')
let { list } = res
let {
list
} = res
list.forEach(item => {
item.orderTime = tsFormatTime(item.orderTime)
})
......@@ -197,7 +237,9 @@ Page({
})
},
changeTabIndx(e) {
let { detail } = e
let {
detail
} = e
this.setData({
tabIndx: detail
})
......@@ -205,14 +247,18 @@ Page({
},
// 众筹-start
crowdfunding() {
let { userInfo } = wx.$storage.get()
let {
userInfo
} = wx.$storage.get()
this.getMockInfo(userInfo)
this.judgeAccount()
this.getProList('SC004')
},
async getMockInfo(userInfo) {
let res = (await getMockData()) || { serviceMerchatList: [] }
let res = (await getMockData()) || {
serviceMerchatList: []
}
this.setData({
mockObj: res,
isShowService: res.serviceMerchatList.includes(userInfo.merchantId + '')
......@@ -234,7 +280,9 @@ Page({
pIdx: -1,
idx: -1
}
let { userInfo } = wx.$storage.get()
let {
userInfo
} = wx.$storage.get()
if (this.data.mockObj?.crowdObj) {
let pList = this.data.mockObj.crowdObj.map(item => item.pMerchantId)
for (let i = 0; i < this.data.mockObj.crowdObj.length; i++) {
......@@ -255,7 +303,9 @@ Page({
// 处理SC004的mock数据
mockDealCrowd(data) {
let { userInfo } = wx.$storage.get()
let {
userInfo
} = wx.$storage.get()
var obj = this.judgeCrowd(userInfo.subLoginUser.merchantId, data.merchantId)
if (!obj.flag) {
return data
......@@ -288,7 +338,9 @@ Page({
// 获取产品列表
getProList(sceneCode) {
let productCodes = this.data.merchantInfo.productCodes || []
let {
productCodes
} = this.data.merchantInfo
console.log(productCodes, 'productCodes')
var params = {
sceneCode: sceneCode || ''
......@@ -311,7 +363,9 @@ Page({
// 产品切换
handleActChange(e) {
var idx = e.currentTarget.dataset.idx
let { scenceList } = this.data
let {
scenceList
} = this.data
this.setData({
activityActive: idx,
// openFlag:1-开通;0-不开通
......@@ -320,7 +374,10 @@ Page({
},
setCurActivity() {
let { scenceList, activityActive } = this.data
let {
scenceList,
activityActive
} = this.data
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.sceneActivityObj['scene4'])),
// openFlag:1-开通;0-不开通
......@@ -338,7 +395,9 @@ Page({
getActivityRevenue(isFirst = false) {
wx.showLoading()
outputApi
.getActivityRevenue({ merchantId: this.data.merchantInfo.merchantId })
.getActivityRevenue({
merchantId: this.data.merchantInfo.merchantId
})
.then(res => {
var actList = this.data.scenceList[0].productList
var activitingIdx = -1
......@@ -458,7 +517,7 @@ Page({
},
back() {
wx.$router.back()
},
},
// 众筹-end
onRoute() {
console.log('onRoute')
......@@ -473,4 +532,4 @@ Page({
})
// this.getListSelectAccount(sessionId)
}
})
})
\ No newline at end of file
......@@ -8,6 +8,7 @@ const IMAGES = Object.freeze({
icon2: `personal/icon3.png`,
icon3: `personal/icon4.png`,
icon4: `personal/icon5.png`,
icon5: `personal/icon6.png`,
userAvatarUrl: `/personal/userAvatarUrl.png`
})
import { unreadApi, readApi } from '~/api/index.js'
......@@ -43,7 +44,14 @@ Page({
name: '客户管理',
path: 'packageMine.customerList',
isHide: true
}],
},
{
name: '更新日志',
path: 'packageMine.log',
isHide: false,
newTips:true
}
],
isShowService: false,
},
navGO(e) {
......@@ -156,7 +164,12 @@ Page({
})
}
},
async getVersionInfo() {
const versionData = await getApp().getVersionInfo()
this.setData({
versionData
})
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -176,6 +189,7 @@ Page({
// isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
// })
this.judgeIsHide()
this.getVersionInfo()
console.log(serviceMerchantId)
},
/**
......@@ -187,12 +201,24 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.messageBoxPageIsRead()
this.getUnreadApi()
let { userInfo } = wx.$storage.get()
this.setData({
userInfo: userInfo.subLoginUser
})
let {
versionData
} = this.data
if (versionData) {
versionData = wx.$versionConfig.compare()
wx.nextTick(() => {
this.setData({
versionData
})
})
}
},
/**
......
......@@ -130,6 +130,21 @@ page {
right: 20rpx;
z-index: 1;
}
.new {
width: 52rpx;
height: 22rpx;
background: #F36261;
color: #EEEEEE;
border-radius: 12rpx;
position: absolute;
top: 13rpx;
font-size: 20rpx;
text-align: center;
line-height: 22rpx;
right: -5rpx;
z-index: 1;
}
}
.name {
......@@ -140,6 +155,41 @@ page {
}
}
.update {
height: 112rpx;
background: #2C3255;
font-weight: 500;
font-size: 15px;
color: #FFFFFF;
display: flex;
align-items: center;
padding: 0 16rpx;
.icon {
width: 64rpx;
height: 64rpx;
margin-right: 4rpx;
}
.new {
margin-left: 16rpx;
width: 52rpx;
height: 28rpx;
font-size: 18rpx;
color: #FFFFFF;
line-height: 28rpx;
text-align: center;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
border-radius: 14rpx;
}
.arrow {
margin-left: auto;
width: 32rpx;
height: 32rpx;
}
}
.logoutBtn {
position: fixed;
bottom: 106rpx;
......
......@@ -17,25 +17,25 @@
<view wx:for="{{boxItemList}}" wx:key="index" class="item" data-path="{{item.path}}" data-item="{{item}}" bind:tap="navGO">
<block wx:if="{{!item.isHide}}">
<view class="imgcon">
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" />
<view wx:if="{{item.hasRedPot}}" class="redPot" hidden="{{!item.isRead}}" ></view>
<view wx:if="{{item.newTips}}" class="new" hidden="{{!versionData.isNew}}">new</view>
<glsx-image class="img" src="{{IMAGES['icon' + index]}}" />
</view>
<view class="name">{{item.name}}</view>
</block>
</view>
<!-- <view class="item" data-path="packagesList.customerManagement" bind:tap="navGO">
<view class="imgcon">
<glsx-image class="img" src="{{IMAGES.icon0}}" />
</view>
<view class="name">客户管理</view>
</view>
<view class="item" data-path="packagesList.messageBox" bind:tap="navGO">
<view class="imgcon">
<view class="redPot" hidden="{{!isRead}}" />
<glsx-image class="img" src="{{test}}" />
</view>
<view class="name">消息盒子</view>
</view> -->
<!-- <view class="update" bindtap="jump">
<view class="icon">
<glsx-image class="logo" webp src="store-assistant/menu/log.png"></glsx-image>
</view>
更新日志
<block wx:if="{{versionData.isNew}}">
<view class="new">NEW</view>
</block>
<view class="arrow">
<glsx-image class="logo" webp src="store-assistant/menu/log-arrow.png"></glsx-image>
</view>
</view> -->
</view>
<button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!