Commit e40f3c36 by 前端

Merge branch 'SAAS+V4.25.2' into 'master'

Saas+v4.25.2

See merge request !6
2 parents 15cce88c 91f60325
Showing 99 changed files with 2248 additions and 1408 deletions
......@@ -2,8 +2,9 @@ project.config.json
project.private.config.json
sitemap.json
miniprogram_npm
/miniprogram_npm
node_modules
/node_modules
# local env files
.env.local
.env.*.local
......
## 正式版appid wx2c28337db96364d2
## 体验版appid wxc50d04ae5aa9984a
## bobodmd a123456(测试)
## mingcl4sa a123456(开发)
## mdcsx01 a123456(生产)
## JXJTMDD1 glsx8888(生产)
#### computed和watch方法使用
......
......@@ -20,14 +20,14 @@ page {
color: #282829;
font-size: 28rpx;
--themeColor: #F13C3D;
--btnColor: linear-gradient(-84deg, #556AF5 0%, #7197FF 100%);
/* --btnColor: linear-gradient(-84deg, #556AF5 0%, #7197FF 100%); */
--btnColor: #3666fe;
--borderRadius: 8rpx;
--margin: 32rpx;
/* vant 样式覆盖 */
--tabs-bottom-bar-color:#3666FE;
--sidebar-selected-border-color:#3666FE;
--tree-select-nav-background-color:#f6f6f6;
}
image {
......

2.02 KB | W: | H:

1.33 KB | W: | H:

images/home.png
images/home.png
images/home.png
images/home.png
  • 2-up
  • Swipe
  • Onion skin

3.5 KB | W: | H:

1.29 KB | W: | H:

images/home_active.png
images/home_active.png
images/home_active.png
images/home_active.png
  • 2-up
  • Swipe
  • Onion skin

2.02 KB | W: | H:

1.09 KB | W: | H:

images/mine.png
images/mine.png
images/mine.png
images/mine.png
  • 2-up
  • Swipe
  • Onion skin

3.41 KB | W: | H:

1.16 KB | W: | H:

images/mine_active.png
images/mine_active.png
images/mine_active.png
images/mine_active.png
  • 2-up
  • Swipe
  • Onion skin

1.67 KB | W: | H:

452 Bytes | W: | H:

images/output.png
images/output.png
images/output.png
images/output.png
  • 2-up
  • Swipe
  • Onion skin

2.7 KB | W: | H:

623 Bytes | W: | H:

images/output_active.png
images/output_active.png
images/output_active.png
images/output_active.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,7 +6,8 @@
<view class="subtitle">
欢迎登录门店助手
</view>
<image webp class="img" src="{{IMG_URL_STORE}}store-assistant-assemble/login/login-logo.png" />
<!-- <image webp class="img" src="{{IMG_URL_STORE}}store-assistant-assemble/login/login-logo.png" /> -->
<image webp class="img" src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/login-2.webp" />
</view>
</block>
<block wx:else>
......
......@@ -8,7 +8,6 @@
font-size: 24rpx;
color: #999;
letter-spacing: 2rpx;
padding-left: 28rpx;
box-sizing: border-box;
display: flex;
align-items: center;
......@@ -37,7 +36,7 @@
}
.tips .choose-box {
width: 80rpx;
height: 80rpx;
width: 64rpx;
height: 64rpx;
position: relative;
}
\ No newline at end of file
......@@ -8,9 +8,11 @@
&::before {
content: '';
width: 100%;
height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-top.webp') no-repeat;
background-size: 100% 864rpx;
// height: 864rpx;
height: 264rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-top.webp') no-repeat;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg-top.webp') no-repeat;
background-size: 100% 264rpx;
position: fixed;
left: 0;
top: 0;
......@@ -19,9 +21,10 @@
&::after {
content: '';
width: 100%;
height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-bottom.webp') no-repeat;
background-size: 100% 864rpx;
// height: 864rpx;
height: 472rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg-bottom.webp') no-repeat;
background-size: 100% 472rpx;
position: fixed;
left: 0;
bottom: 0;
......
import {
setSessionId,
setUserInfo,
setSubMerchant
setSessionId,
setUserInfo,
setSubMerchant
} from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index'
import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData'
const setRouteData = targetPath => {
let [url, query] = targetPath.split('?'),
obj = {}
if (query) {
var list = query.split('&') || []
list.forEach(item => {
const [key, val] = item.split('=')
obj[key] = val
})
}
return {
url,
obj
}
let [url, query] = targetPath.split('?'),
obj = {}
if (query) {
var list = query.split('&') || []
list.forEach(item => {
const [key, val] = item.split('=')
obj[key] = val
})
}
return {
url,
obj
}
}
/**选择账号登录 */
const selectAccountLogin = ({
id,
sessionId
}) => {
USERAPI.selectAccountLogin({
id,
sessionId
}).then(({
code,
data,
message
}) => {
if (code == '0') {
setLoginInfo(data.loginUserInfoList[0], data.sessionId)
} else wx.$api.showToast(message || '系统异常')
})
}) => {
USERAPI.selectAccountLogin({
id,
sessionId
}).then(({
code,
data,
message
}) => {
if (code == '0') {
setLoginInfo(data.loginUserInfoList[0], data.sessionId)
} else wx.$api.showToast(message || '系统异常')
})
}
/**获取门店号下的全部门店 */
const findSubordinateListByPage = (userInfo)=> {
return new Promise(resolve=>{
USERAPI.findSubordinateListByPage({pageSize:10000,pageNum:1,merchantId:userInfo.merchantId,apiProjectName:'rop-merchants'}).then(res=>{
const list = res.data||[]
const merchant = list.map(i=>i.merchantNo)
const findSubordinateListByPage = (userInfo) => {
return new Promise(resolve => {
USERAPI.findSubordinateListByPage({ pageSize: 10000, pageNum: 1, merchantId: userInfo.merchantId, apiProjectName: 'rop-merchants' }).then(res => {
const list = res.data || []
const merchant = list.map(i => i.merchantNo)
resolve(merchant)
})
})
}
/**查找二级流量方商户 */
const secondFlow = (userInfo)=> {
return new Promise(resolve=>{
USERAPI.secondFlow({merchantId:userInfo.merchantId}).then(res=>{
const list = res||{}
const merchant = list.merchantNoList||[]
const secondFlow = (userInfo) => {
return new Promise(resolve => {
USERAPI.secondFlow({ merchantId: userInfo.merchantId }).then(res => {
const list = res || {}
const merchant = list.merchantNoList || []
resolve(merchant)
})
})
}
/**设置登录信息 */
const setLoginInfo = async (userInfo, sessionId) => {
if (!userInfo) {
wx.$api.showToast('请使用商户账号登陆')
return
}
setUserInfo(userInfo)
setSessionId(sessionId)
try {
const merchant = await Promise.all([findSubordinateListByPage(userInfo),secondFlow(userInfo)])
setSubMerchant(merchant.flat())
} catch (error) {
}
loginSuccess()
if (!userInfo) {
wx.$api.showToast('请使用商户账号登陆')
return
}
setUserInfo(userInfo)
setSessionId(sessionId)
try {
const merchant = await Promise.all([findSubordinateListByPage(userInfo), secondFlow(userInfo)])
setSubMerchant(merchant.flat())
} catch (error) {
}
loginSuccess()
}
const initServiceCenter = () => {
USERAPI.initServiceCenter({})
USERAPI.initServiceCenter({})
}
/**成功跳转 */
const loginSuccess = () => {
const {
options: {
targetPath
let { subMerchant } = wx.$storage.get()
let params = {
merchantIds: subMerchant,
}
} = wx.$router.getPageInstance()
if (targetPath) {
const {
url,
obj
} = setRouteData(targetPath)
wx.$router.reLaunch(url, obj)
} else wx.reLaunch({url:"/pages/tab/output/output"})
outputApi.getBusiStatistics(params).then(res => {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
let _openList = [{
code: 'SC002',
name: 'boutiqueUpgrade',
type: 1,
}, {
code: 'SC004',
name: 'afterSalesCrowdfunding',
type: 0,
}, {
code: 'SC001',
name: 'vdUpgrade',
type: 2,
}]
let type = null;
let _list = []
_list = res.merchantList || []
try {
_openList.forEach(k => {
if (_list[0].sceneCodes && _list[0].sceneCodes.includes(k.code)) {
type = k.type
throw new Error()
}
})
} catch (error) {
}
if (_list.length == 1 && type !== null) {
wx.reLaunch({
url: `/pages/tab/output/output?merchantId=${_list[0].merchantId4s}&type=${type}&merchantName=${_list[0].merchantName4s}`,
})
} else wx.reLaunch({ url: "/pages/tab/output/output" })
})
}
const loginModal = async ({
message,
confirmText,
cancelText
message,
confirmText,
cancelText
}) => {
return new Promise((resolve, reject) => {
wx.showModal({
content: message || '网络异常',
confirmText: confirmText || '重试',
cancelText: cancelText || '取消',
confirmColor: '#3666FE',
success(res) {
if (res.confirm) resolve(res.confirm)
if (res.cancel) reject(false)
}
return new Promise((resolve, reject) => {
wx.showModal({
content: message || '网络异常',
confirmText: confirmText || '重试',
cancelText: cancelText || '取消',
confirmColor: '#3666FE',
success(res) {
if (res.confirm) resolve(res.confirm)
if (res.cancel) reject(false)
}
})
})
})
}
/**手机号&微信登录:是否跳转登录列表页 */
const checkLoginUserInfo = ({
loginUserInfoList,
sessionId
loginUserInfoList,
sessionId
}) => {
const thisPage = wx.$router.getPageInstance()
/**多个账号 */
if (loginUserInfoList.length > 1)
wx.$router.go('login.accountItems', {
sessionId,
...thisPage.options
})
/**只有一个账号 */
else
selectAccountLogin({
id: loginUserInfoList[0].uuid,
sessionId
})
const thisPage = wx.$router.getPageInstance()
/**多个账号 */
if (loginUserInfoList.length > 1)
wx.$router.go('login.accountItems', {
sessionId,
...thisPage.options
})
/**只有一个账号 */
else
selectAccountLogin({
id: loginUserInfoList[0].uuid,
sessionId
})
}
module.exports = {
checkLoginUserInfo,
selectAccountLogin,
loginSuccess,
setRouteData,
setLoginInfo,
loginModal,
initServiceCenter
checkLoginUserInfo,
selectAccountLogin,
loginSuccess,
setRouteData,
setLoginInfo,
loginModal,
initServiceCenter
}
\ No newline at end of file
......@@ -22,6 +22,7 @@
bindgetuserinfo="onGetUserInfo"
bindcontact="onContact"
bindgetphonenumber="onGetPhoneNumber"
bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
binderror="onError"
bindlaunchapp="onLaunchApp"
bindopensetting="onOpenSetting"
......
......@@ -56,6 +56,7 @@ var getTime = function (date) {
},
defaultDate: {
type: null,
value: (0, utils_1.getToday)().getTime(),
observer: function (val) {
this.setData({ currentDate: val });
this.scrollIntoView();
......@@ -185,13 +186,16 @@ var getTime = function (date) {
var _this = this;
if (defaultDate === void 0) { defaultDate = null; }
var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, allowSameDay = _a.allowSameDay;
if (!defaultDate)
return [];
var now = (0, utils_1.getToday)().getTime();
if (type === 'range') {
if (!Array.isArray(defaultDate)) {
defaultDate = [];
}
var _b = defaultDate || [], startDay = _b[0], endDay = _b[1];
var start = this.limitDateRange(startDay || now, minDate, (0, utils_1.getPrevDay)(new Date(maxDate)).getTime());
var startDate = getTime(startDay || now);
var start = this.limitDateRange(startDate, minDate, allowSameDay ? startDate : (0, utils_1.getPrevDay)(new Date(maxDate)).getTime());
var date = getTime(endDay || now);
var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime());
return [start, end];
......@@ -211,6 +215,8 @@ var getTime = function (date) {
var _this = this;
(0, utils_2.requestAnimationFrame)(function () {
var _a = _this.data, currentDate = _a.currentDate, type = _a.type, show = _a.show, poppable = _a.poppable, minDate = _a.minDate, maxDate = _a.maxDate;
if (!currentDate)
return;
// @ts-ignore
var targetDate = type === 'single' ? currentDate : currentDate[0];
var displayed = show || !poppable;
......
@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important}
\ No newline at end of file
@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,90%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important}
\ No newline at end of file
......@@ -98,6 +98,8 @@ var STEP = 1;
var _a = this.data, color = _a.color, size = _a.size;
if ((0, validator_1.isObj)(color)) {
return this.getContext().then(function (context) {
if (!context)
return;
var LinearColor = context.createLinearGradient(size, 0, 0, 0);
Object.keys(color)
.sort(function (a, b) { return parseFloat(a) - parseFloat(b); })
......@@ -142,6 +144,8 @@ var STEP = 1;
var _this = this;
var size = this.data.size;
this.getContext().then(function (context) {
if (!context)
return;
context.clearRect(0, 0, size, size);
_this.renderLayerCircle(context);
var formatValue = format(currentValue);
......
......@@ -14,4 +14,7 @@ export declare function getRect(context: WechatMiniprogram.Component.TrivialInst
export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;
export declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;
export declare function addNumber(num1: any, num2: any): number;
export declare const clamp: (num: any, min: any, max: any) => number;
export declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject;
export declare const isPC: boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCurrentPage = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;
exports.isPC = exports.getCurrentPage = exports.clamp = exports.addNumber = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;
var validator_1 = require("./validator");
var version_1 = require("./version");
var validator_2 = require("./validator");
......@@ -90,8 +90,18 @@ function toPromise(promiseLike) {
return Promise.resolve(promiseLike);
}
exports.toPromise = toPromise;
// 浮点数精度处理
function addNumber(num1, num2) {
var cardinal = Math.pow(10, 10);
return Math.round((num1 + num2) * cardinal) / cardinal;
}
exports.addNumber = addNumber;
// 限制value在[min, max]之间
var clamp = function (num, min, max) { return Math.min(Math.max(num, min), max); };
exports.clamp = clamp;
function getCurrentPage() {
var pages = getCurrentPages();
return pages[pages.length - 1];
}
exports.getCurrentPage = getCurrentPage;
exports.isPC = ['mac', 'windows'].includes((0, version_1.getSystemInfoSync)().platform);
......@@ -6,6 +6,7 @@ var color_1 = require("../common/color");
var utils_1 = require("../common/utils");
(0, component_1.VantComponent)({
mixins: [button_1.button],
classes: ['cancle-button-class', 'confirm-button-class'],
props: {
show: {
type: Boolean,
......
......@@ -33,7 +33,7 @@
size="large"
loading="{{ loading.cancel }}"
class="van-dialog__button van-hairline--right"
custom-class="van-dialog__cancel"
custom-class="van-dialog__cancel cancle-button-class"
custom-style="color: {{ cancelButtonColor }}"
bind:click="onCancel"
>
......@@ -44,7 +44,7 @@
size="large"
class="van-dialog__button"
loading="{{ loading.confirm }}"
custom-class="van-dialog__confirm"
custom-class="van-dialog__confirm confirm-button-class"
custom-style="color: {{ confirmButtonColor }}"
open-type="{{ confirmButtonOpenType }}"
......@@ -75,7 +75,7 @@
size="large"
loading="{{ loading.cancel }}"
class="van-dialog__button van-hairline--right"
custom-class="van-dialog__cancel"
custom-class="van-dialog__cancel cancle-button-class"
custom-style="color: {{ cancelButtonColor }}"
bind:click="onCancel"
>
......@@ -86,7 +86,7 @@
size="large"
class="van-dialog__button"
loading="{{ loading.confirm }}"
custom-class="van-dialog__confirm"
custom-class="van-dialog__confirm confirm-button-class"
custom-style="color: {{ confirmButtonColor }}"
open-type="{{ confirmButtonOpenType }}"
......
......@@ -49,11 +49,19 @@ var props_1 = require("./props");
this.setData({ innerValue: this.value });
},
methods: {
formatValue: function (value) {
var maxlength = this.data.maxlength;
if (maxlength !== -1 && value.length > maxlength) {
return value.slice(0, maxlength);
}
return value;
},
onInput: function (event) {
var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;
this.value = value;
var formatValue = this.formatValue(value);
this.value = formatValue;
this.setShowClear();
this.emitChange(event.detail);
return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));
},
onFocus: function (event) {
this.focused = true;
......@@ -102,14 +110,16 @@ var props_1 = require("./props");
this.$emit('keyboardheightchange', event.detail);
},
emitChange: function (detail) {
var _this = this;
var extraEventParams = this.data.extraEventParams;
this.setData({ value: detail.value });
(0, utils_1.nextTick)(function () {
var data = extraEventParams ? detail : detail.value;
_this.$emit('input', data);
_this.$emit('change', data);
});
var result;
var data = extraEventParams
? __assign(__assign({}, detail), { callback: function (data) {
result = data;
} }) : detail.value;
this.$emit('input', data);
this.$emit('change', data);
return result;
},
setShowClear: function () {
var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger;
......
......@@ -13,12 +13,12 @@
title-style="margin-right: 12px;"
custom-style="{{ customStyle }}"
arrow-direction="{{ arrowDirection }}"
custom-class="van-field"
custom-class="custom-class van-field"
>
<slot name="left-icon" slot="icon" />
<view wx:if="{{ label }}" class="label-class {{ utils.bem('field__label', { disabled }) }}" slot="title">
<label for="{{ name }}" wx:if="{{ label }}" class="label-class {{ utils.bem('field__label', { disabled }) }}" slot="title">
{{ label }}
</view>
</label>
<slot wx:else name="label" slot="title" />
<view class="{{ utils.bem('field__body', [type]) }}">
<view class="{{ utils.bem('field__control', [inputAlign, 'custom']) }}" bindtap="onClickInput">
......@@ -47,10 +47,10 @@
<slot name="button" />
</view>
</view>
<view wx:if="{{ showWordLimit && maxlength }}" class="van-field__word-limit">
<label for="{{ name }}" wx:if="{{ showWordLimit && maxlength }}" class="van-field__word-limit">
<view class="{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}
</view>
<view wx:if="{{ errorMessage }}" class="{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}">
</label>
<label for="{{ name }}" wx:if="{{ errorMessage }}" class="{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}">
{{ errorMessage }}
</view>
</label>
</van-cell>
<input
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
type="{{ type }}"
focus="{{ focus }}"
......
<textarea
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class"
fixed="{{ fixed }}"
focus="{{ focus }}"
......
......@@ -10,6 +10,10 @@ var link_1 = require("../mixins/link");
props: {
text: String,
color: String,
size: {
type: String,
value: 'normal',
},
loading: Boolean,
disabled: Boolean,
plain: Boolean,
......
......@@ -3,13 +3,14 @@
id="{{ id }}"
lang="{{ lang }}"
type="{{ type }}"
size="{{ size }}"
color="{{ color }}"
plain="{{ plain }}"
loading="{{ loading }}"
disabled="{{ disabled }}"
open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
custom-class="van-goods-action-button__inner"
custom-class="van-goods-action-button__inner custom-class"
business-id="{{ businessId }}"
session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}"
......
......@@ -4,13 +4,14 @@ var component_1 = require("../common/component");
var button_1 = require("../mixins/button");
var link_1 = require("../mixins/link");
(0, component_1.VantComponent)({
classes: ['icon-class', 'text-class'],
classes: ['icon-class', 'text-class', 'info-class'],
mixins: [link_1.link, button_1.button],
props: {
text: String,
dot: Boolean,
info: String,
icon: String,
size: String,
color: String,
classPrefix: {
type: String,
......
......@@ -27,10 +27,12 @@
name="{{ icon }}"
dot="{{ dot }}"
info="{{ info }}"
size="{{ size }}"
color="{{ color }}"
class-prefix="{{ classPrefix }}"
class="van-goods-action-icon__icon"
custom-class="icon-class"
info-class="info-class"
/>
<slot wx:else name="icon" />
<text class="text-class">{{ text }}</text>
......
......@@ -2,6 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
(0, component_1.VantComponent)({
classes: ['info-class'],
props: {
dot: Boolean,
info: null,
......
......@@ -9,7 +9,7 @@
wx:if="{{ info !== null || dot }}"
dot="{{ dot }}"
info="{{ info }}"
custom-class="van-icon__info"
custom-class="van-icon__info info-class"
/>
<image
wx:if="{{ computed.isImage(name) }}"
......
......@@ -9,12 +9,12 @@ function isImage(name) {
function rootClass(data) {
var classes = ['custom-class'];
if (data.classPrefix != null) {
classes.push(data.classPrefix);
if (data.classPrefix !== 'van-icon') {
classes.push('van-icon--custom')
}
if (data.classPrefix !== 'van-icon') {
classes.push('van-icon')
if (data.classPrefix != null) {
classes.push(data.classPrefix);
}
if (isImage(data.name)) {
......
......@@ -31,6 +31,9 @@ exports.button = Behavior({
onGetPhoneNumber: function (event) {
this.triggerEvent('getphonenumber', event.detail);
},
onGetRealTimePhoneNumber: function (event) {
this.triggerEvent('getrealtimephonenumber', event.detail);
},
onError: function (event) {
this.triggerEvent('error', event.detail);
},
......
......@@ -195,8 +195,12 @@ var DRAG_STATUS = {
return '0%';
},
format: function (value) {
var _a = this.data, max = _a.max, min = _a.min, step = _a.step;
return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
var min = +this.data.min;
var max = +this.data.max;
var step = +this.data.step;
value = (0, utils_1.clamp)(value, min, max);
var diff = Math.round((value - min) / step) * step;
return (0, utils_1.addNumber)(min, diff);
},
},
});
......@@ -102,9 +102,9 @@ function equal(value1, value2) {
isDisabled: function (type) {
var _a = this.data, disabled = _a.disabled, disablePlus = _a.disablePlus, disableMinus = _a.disableMinus, currentValue = _a.currentValue, max = _a.max, min = _a.min;
if (type === 'plus') {
return disabled || disablePlus || currentValue >= max;
return disabled || disablePlus || +currentValue >= +max;
}
return disabled || disableMinus || currentValue <= min;
return disabled || disableMinus || +currentValue <= +min;
},
onFocus: function (event) {
this.$emit('focus', event.detail);
......
@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}
\ No newline at end of file
@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:"";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}
\ No newline at end of file
......@@ -61,10 +61,8 @@ var ROOT_ELEMENT = '.van-sticky';
}
this.scrollTop = scrollTop || this.scrollTop;
if (typeof container === 'function') {
Promise.all([
(0, utils_1.getRect)(this, ROOT_ELEMENT),
this.getContainerRect(),
]).then(function (_a) {
Promise.all([(0, utils_1.getRect)(this, ROOT_ELEMENT), this.getContainerRect()])
.then(function (_a) {
var root = _a[0], container = _a[1];
if (offsetTop + root.height > container.height + container.top) {
_this.setDataAfterDiff({
......@@ -82,7 +80,8 @@ var ROOT_ELEMENT = '.van-sticky';
else {
_this.setDataAfterDiff({ fixed: false, transform: 0 });
}
});
})
.catch(function () { });
return;
}
(0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) {
......@@ -118,6 +117,9 @@ var ROOT_ELEMENT = '.van-sticky';
},
getContainerRect: function () {
var nodesRef = this.data.container();
if (!nodesRef) {
return Promise.reject(new Error('not found container'));
}
return new Promise(function (resolve) { return nodesRef.boundingClientRect(resolve).exec(); });
},
},
......
......@@ -179,6 +179,9 @@ var relation_1 = require("../common/relation");
});
});
if (currentIndex === data.currentIndex) {
if (!data.inited) {
this.resize();
}
return;
}
var shouldEmitChange = data.currentIndex !== null;
......
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<view class="custom-class {{ utils.bem('tabs', [type]) }}">
<view class="custom-class {{ utils.bem('tabs') }}">
<van-sticky
disabled="{{ !sticky }}"
z-index="{{ zIndex }}"
......@@ -9,7 +9,7 @@
container="{{ container }}"
bind:scroll="onTouchScroll"
>
<view class="{{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class">
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class">
<slot name="nav-left" />
<scroll-view
......
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff)}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--tabs-line-height,44px)}.van-tabs--card .van-tabs__wrap{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{display:inline-block;position:relative!important;top:-1px!important;transform:translateX(0)!important}
\ No newline at end of file
@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff);overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,44px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
\ No newline at end of file
......@@ -47,6 +47,9 @@ var validator_1 = require("../common/validator");
}, previewFullImage: {
type: Boolean,
value: true,
}, videoFit: {
type: String,
value: 'contain',
}, imageFit: {
type: String,
value: 'scaleToFill',
......
......@@ -28,6 +28,7 @@
title="{{ item.name || ('视频' + index) }}"
poster="{{ item.thumb }}"
autoplay="{{ item.autoplay }}"
object-fit="{{videoFit}}"
class="van-uploader__preview-image"
style="{{ computed.sizeStyle({ previewSize }) }}"
data-index="{{ index }}"
......
......@@ -41,7 +41,7 @@ function isVideoFile(item) {
}
exports.isVideoFile = isVideoFile;
function formatImage(res) {
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { type: 'image', url: item.path, thumb: item.path })); });
return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { type: 'image', url: item.tempFilePath || item.path, thumb: item.tempFilePath || item.path })); });
}
function formatVideo(res) {
return [
......@@ -59,13 +59,27 @@ function chooseFile(_a) {
return new Promise(function (resolve, reject) {
switch (accept) {
case 'image':
wx.chooseImage({
count: multiple ? Math.min(maxCount, 9) : 1,
sourceType: capture,
sizeType: sizeType,
success: function (res) { return resolve(formatImage(res)); },
fail: reject,
});
if (utils_1.isPC) {
wx.chooseImage({
count: multiple ? Math.min(maxCount, 9) : 1,
sourceType: capture,
sizeType: sizeType,
success: function (res) { return resolve(formatImage(res)); },
fail: reject,
});
}
else {
wx.chooseMedia({
count: multiple ? Math.min(maxCount, 9) : 1,
mediaType: ['image'],
sourceType: capture,
maxDuration: maxDuration,
sizeType: sizeType,
camera: camera,
success: function (res) { return resolve(formatImage(res)); },
fail: reject,
});
}
break;
case 'media':
wx.chooseMedia({
......
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 40rpx 0;
position: relative;
padding: 32rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
width: 458.18rpx;
height: 298rpx;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
// width: 458.18rpx;
// height: 298rpx;
width: 686rpx;
height: 408rpx;
image {
width: 458.18rpx;
height: 298rpx;
}
image {
width: 686rpx;
height: 408rpx;
// width: 458.18rpx;
// height: 298rpx;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 248rpx;
width: 100%;
padding-top: 40rpx;
.funnel-content {
display: flex;
justify-content: center;
height: 408rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex;
}
.left,
.right {
display: flex;
}
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
display: flex;
align-items: center;
margin-right: 28rpx;
view {
display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
}
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
}
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
}
}
\ No newline at end of file
......@@ -233,6 +233,7 @@ Component({
}
return result
})
console.log(sfaffList,'sfaffList')
this.setData({
sfaff: sfaffList
})
......
.box {
margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;
.select-up {
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: relative;
text-align: center;
.staff-type {
width: 128rpx;
text {
display: inline-block;
width: 100rpx;
margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;
.select-up {
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: relative;
text-align: center;
.staff-type {
width: 160rpx;
text {
display: inline-block;
width: 120rpx;
text-align: right;
}
.up-icon {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
}
.up-box {
position: absolute;
width: 128rpx;
left: 20rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
z-index: 10;
.up-item {
flex: auto;
font-weight: 400;
font-size: 22rpx;
color: #666666;
line-height: 53rpx;
&.checked {
color: #708CFF;
}
}
}
}
}
.up-icon {
width: 14rpx;
height: 8rpx;
vertical-align: middle;
.staff-input {
// width: 638rpx;
// height: 64rpx;
// background: #ffffff7d;
// border: 2rpx solid #EEEEEE;
// border-radius: 12rpx;
// margin: 40rpx auto 20rpx;
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 0rpx 20rpx;
box-sizing: border-box;
// width: 686rpx;
width: 100%;
height: 64rpx;
// margin-top: 28rpx;
// background: #ffffff7d;
// border-radius: 12rpx;
background: #F8F9FC;
border: 2rpx solid #EEEEEE;
border-radius: 32rpx;
margin: 28rpx auto 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 24rpx 0rpx 24rpx;
input {
// height: 64rpx;
// line-height: 64rpx;
// color: #999999;
// flex: 1;
flex: 1;
height: 64rpx;
line-height: 64rpx;
margin-left: 15rpx;
&::placeholder {
color: red;
}
}
}
.up-box {
position: absolute;
width: 128rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
z-index: 10;
.up-item {
flex: auto;
font-weight: 400;
font-size: 22rpx;
color: #666666;
line-height: 53rpx;
&.checked {
color: #708CFF;
}
}
}
}
}
.staff-input {
width: 638rpx;
height: 64rpx;
background: #ffffff7d;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
margin: 40rpx auto 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 20rpx;
box-sizing: border-box;
input {
height: 64rpx;
line-height: 64rpx;
color: #999999;
flex: 1;
}
}
}
.table {
display: flex;
display: flex;
}
.table_left_column {
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
min-width: 190rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
width: 100%;
height: 63rpx;
font-size: 20rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
height: 72rpx;
font-size: 20rpx;
display: flex;
align-items: center;
color: #1B233D;
}
// background: #F9F9F9;
background: #F5F9FE;
padding-left: 18rpx;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:not(:first-child) {
// border-right: 2rpx solid #F3F3F3;
}
&:nth-child(2n) {
background: #ffffff;
}
&:nth-child(2n) {
background: #ffffff;
}
.left_item_avatar {
flex: 1;
margin-left: 20rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #666666;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
}
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.flex_direction_column_item {
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
min-width: 150rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 200rpx;
height: 63rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #1B233D;
background: #F9F9F9;
white-space: normal;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:first-child {
font-weight: 600;
font-size: 24rpx;
min-width: 120rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #1B233D;
}
// background: #F9F9F9;
background: #F5F9FE;
white-space: normal;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:nth-child(2n) {
background: #ffffff;
}
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:nth-child(2n) {
background: #ffffff;
}
}
.empty {
margin: 20rpx auto 0;
text-align: center;
margin: 20rpx auto 0;
text-align: center;
.empty-icon {
width: 400rpx;
height: 400rpx;
display: inline-block;
}
.empty-icon {
width: 400rpx;
height: 400rpx;
display: inline-block;
}
.empty-text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
text-align: center;
margin: 32rpx 106rpx;
}
.empty-text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
text-align: center;
margin: 32rpx 106rpx;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
<view class="select-up">
<view catchtap="showUp" class="staff-type">
<text>{{dataType[downType][selectValue-1].label}}</text>
<glsx-image webp custom-class="up-icon" src="store-assistant-assemble/output/arrow.png"></glsx-image>
<glsx-image webp custom-class="up-icon" src="store-assistant-assemble/output/down.png"></glsx-image>
</view>
<view class="up-box" hidden="{{show}}">
<view class="up-item {{selectValue == item.value? 'checked':''}}" wx:for="{{dataType[downType]}}" wx:key="index" data-label="{{item.label}}" data-value="{{item.value}}" catchtap="selectType">
......@@ -16,25 +16,31 @@
</view>
</view>
<view class="staff-input">
<input placeholder="输入员工名称" value="{{empName}}" bind:blur="hanldBlur"/>
<icon class="icon-small" type="search" size="14"></icon>
<input placeholder="输入员工名称" placeholder-style="color:#cdcdd1" value="{{empName}}" bind:blur="hanldBlur"/>
</view>
<blokc wx:if="{{sfaff[0].list.length}}">
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>排名</view>
<view class='left_col_item' wx:for="{{sfaff[0].list}}" wx:for-index="index" wx:key="index">{{index+1}}</view>
<view class='left_col_item' wx:for="{{sfaff[0].list}}" wx:for-index="index" wx:key="index">
<text>{{index+1}}</text>
<view class="left_item_avatar">
<image wx:if="{{item.avatarUrl}}" src="{{ item.avatarUrl}}" mode="scaleToFill"></image>
<text>{{item.transferName?item.transferName:'--'}}</text>
</view>
</view>
</view>
<!-- 右侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{sfaff}}" wx:for-index="index" wx:key="index">
<view class="flex_direction_column_item" wx:for="{{filter.sliceArr(sfaff,1)}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<image wx:if="{{item.name == '员工'&& litem.avatarUrl}}" src="{{ litem.avatarUrl? litem.avatarUrl:''}}" mode="scaleToFill"></image>
<!-- <image wx:if="{{item.name == '员工'&& litem.avatarUrl}}" src="{{ litem.avatarUrl? litem.avatarUrl:''}}" mode="scaleToFill"></image> -->
<text>
<block wx:if="{{item.name == '转化率'}}">{{litem?litem+'%': '--'}}</block>
<block wx:elif="{{item.name == '员工'}}">{{litem.transferName?litem.transferName:'--'}}</block>
<!-- <block wx:elif="{{item.name == '员工'}}">{{litem.transferName?litem.transferName:'--'}}</block> -->
<block wx:else>{{filter.thousand(litem)||'--'}}</block>
</text>
</view>
......
......@@ -4,4 +4,7 @@ function thousand(n) {
var p = (n+'').replace(r, ',')
return p
}
module.exports = {thousand:thousand}
\ No newline at end of file
function sliceArr(arr,n) {
return arr.slice(n)
}
module.exports = {thousand:thousand,sliceArr:sliceArr}
\ No newline at end of file
......@@ -19,7 +19,11 @@
.search-text+.search-text {
margin-left: 40rpx;
}
.search-unit {
margin-left: auto;
font-size: 24rpx;
color: #8A8C90;
}
.active {
font-weight: 600;
font-size: 32rpx;
......
<view class="bar-wrap">
<view class="searchList">
<block wx:for="{{opts.barList}}" wx:for-item="item" wx:key="index">
<view class="search-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view></block>
</view>
<view class="searchList">
<block wx:for="{{opts.barList}}" wx:for-item="item" wx:key="index">
<view class="search-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view>
</block>
<view class="search-unit">单位:{{(dataType == 3&&opts.barList.length == 3) || (opts.barList.length == 2&&dataType==1) ?'元':'张'}}</view>
</view>
<view class="container">
<bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" />
</view>
<view class="container">
<bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" />
</view>
</view>
\ No newline at end of file
.bar-wrap {
padding: 34rpx 30rpx 30rpx 40rpx;
box-sizing: border-box;
padding: 34rpx 30rpx 30rpx 40rpx;
box-sizing: border-box;
.searchList {
display: flex;
align-items: center;
.searchList {
display: flex;
align-items: center;
.search-text {
font-weight: 400;
font-size: 28rpx;
color: #A6A6A6;
line-height: 48rpx;
}
.search-text {
font-weight: 400;
font-size: 28rpx;
color: #A6A6A6;
line-height: 48rpx;
}
.search-text+.search-text {
margin-left: 40rpx;
}
.search-text+.search-text {
margin-left: 40rpx;
}
.active {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
.search-unit {
margin-left: auto;
font-size: 24rpx;
color: #8A8C90;
}
.active {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
}
}
}
.searchTime {
margin-top: 24rpx;
display: flex;
align-items: center;
z-index: 9999;
margin-bottom: 20rpx;
position: relative;
.searchTime {
margin-top: 24rpx;
display: flex;
align-items: center;
z-index: 9999;
margin-bottom: 20rpx;
position: relative;
.time {
padding: 5rpx 28rpx;
border: 2rpx solid #EBEBEB;
border-radius: 32rpx;
font-weight: 400;
font-size: 22rpx;
color: #A6A6A6;
}
.time {
padding: 6rpx 30rpx;
// border: 2rpx solid #EBEBEB;
// border-radius: 32rpx;
background: #FFFFFF;
border: 1rpx solid #C3C3C3;
border-radius: 6rpx;
font-weight: 400;
font-size: 20rpx;
color: #5A6066;
// color: #A6A6A6;
}
.active {
background: #4466f01a;
border-color: #fff;
color: #4466F0;
}
.active {
// background: #4466f01a;
border-color: #fff;
// color: #4466F0;
color: #fff;
background: #3582EE;
border: 1prx solid #3582EE;
}
.time+.time {
margin-left: 12rpx;
}
.time+.time {
margin-left: 8rpx;
}
.flex {
display: flex;
align-items: center;
position: absolute;
right: 30rpx;
.flex {
display: flex;
align-items: center;
position: absolute;
right: 30rpx;
.time-icon {
width: 26rpx;
height: 26rpx;
}
.time-icon {
width: 26rpx;
height: 26rpx;
}
.temporal {
font-size: 22rpx;
color: #A6A6A6;
margin: 0 8rpx;
}
.temporal {
font-size: 22rpx;
color: #A6A6A6;
margin: 0 8rpx;
}
.arrows {
width: 20rpx;
height: 12rpx;
}
.arrows {
width: 20rpx;
height: 12rpx;
}
}
}
}
.remind {
color: #D3D3D3;
font-size: 20rpx;
text-align: center;
margin-top: 10rpx;
}
.remind {
color: #D3D3D3;
font-size: 20rpx;
text-align: center;
padding: 24rpx;
}
.container {
height: 370rpx;
}
.container {
height: 370rpx;
}
}
\ No newline at end of file
......@@ -2,6 +2,7 @@
<view class="searchList">
<block wx:for="{{opts.lineList}}" wx:for-item="item" wx:key="index">
<view class="search-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view></block>
<view class="search-unit">单位:{{(opts.lineList.length == 2 && dataType==1)||opts.lineList.length == 3 && dataType==3?'元':'单'}}</view>
</view>
<view class="searchTime">
<block wx:for="{{dimension}}" wx:for-item="item" wx:key="index">
......
import ActivityApi from '~/api/activityApi/index'
let thisPage;
import { thousand } from '~/utils/format'
import {
thousand
} from '~/utils/format'
Component({
/**
* 组件的属性列表
......@@ -21,89 +23,112 @@ Component({
minDate: new Date(2020, 0, 1).getTime(),
maxDate: new Date().getTime(),
outputView: {
outputValue: [{
label: '总报价量',
name: 'totalQuotationCount'
}, {
label: '总成交量',
name: 'totalSuccessCount',
unit: ''
}, {
label: '总产值',
name: 'totalOutputValue',
_unit: '¥'
}, {
label: '当月报价量',
outputValue: [
// {
// label: '总报价量',
// name: 'totalQuotationCount'
// },
// {
// label: '总成交量',
// name: 'totalSuccessCount',
// unit: ''
// },
// {
// label: '总产值',
// name: 'totalOutputValue',
// _unit: '¥'
// },
{
label: '当月报价(单)',
name: 'monthQuotationCount',
_unit: '¥'
_unit: '',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, {
label: '当月成交量',
label: '当月成交(单)',
name: 'monthSuccessCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '当月产值',
label: '当月产值(元)',
name: 'monthOutputValue',
_unit: '¥'
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}, {
label: '单价',
label: '单价(元)',
name: 'avgPrice',
_unit: '¥'
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, {
label: '升级率',
name: 'conversionRate',
unit_: '%',
multiple: 100,
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '平均车险报价',
label: '平均报价',
name: 'avgQuotationPrice',
_unit: '¥'
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon04.png'
}],
boutiqueOutputValue: [{
label: '发券量(总)/张',
label: '总发券量(张)',
name: 'sendCouponCountTotal',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}, {
label: '升级订单/单',
label: '升级订单(单)',
name: 'upgradeCountTotal',
unit: ''
}, {
label: '营业额(总)/元',
name: 'orderMoneyTotal',
_unit: '¥'
}, {
label: '客单价/元',
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
},
// {
// label: '营业额(总)/元',
// name: 'orderMoneyTotal',
// _unit: '¥'
// },
{
label: '客单价(元)',
name: 'averagePrice',
_unit: '¥'
}, {
label: '转化率',
name: 'upgradeRatio',
unit_: '%'
}],
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
},
// {
// label: '转化率',
// name: 'upgradeRatio',
// unit_: '%'
// }
],
todayOutiqueOutputValue: [{
label: '发券量/张',
label: '发券量(张)',
name: 'sendCouponCountToday',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon01.png'
}, {
label: '升级订单/单',
label: '升级订单(单)',
name: 'upgradeCountToday',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '营业额(总)/元',
label: '营业额(元)',
name: 'orderMoneyTotalToday',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon05.png'
}],
todayOutputValue: [{
label: '报价量',
label: '单日报价(单)',
name: 'quotationCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}, {
label: '成交量',
label: '单日成交(单)',
name: 'successCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '产值',
label: '单日产值(元)',
name: 'outputValue',
unit: ''
unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}],
},
calendarLoading: false,
......@@ -159,45 +184,45 @@ Component({
opts
} = this.data
const obj = {
1: {
lineList: [{
title: '营业额',
type: 1
}, {
title: '到店量',
type: 2
}],
barList: [{
title: '发券量',
type: 3
}, {
title: '营业额',
type: 1
}]
1: {
lineList: [{
title: '营业额',
type: 1
}, {
title: '到店量',
type: 2
}],
barList: [{
title: '发券量',
type: 3
}, {
title: '营业额',
type: 1
}]
},
2: {
lineList: [{
title: '报价量',
type: 1
}, {
title: '成交量',
type: 2
}, {
title: '产值',
type: 3
}],
barList: [{
title: '报价量',
type: 1
}, {
title: '成交量',
type: 2
}, {
title: '产值',
type: 3
}]
}
},
2: {
lineList: [{
title: '报价量',
type: 1
}, {
title: '成交量',
type: 2
}, {
title: '产值',
type: 3
}],
barList: [{
title: '报价量',
type: 1
}, {
title: '成交量',
type: 2
}, {
title: '产值',
type: 3
}]
}
},
lineList = obj[type].lineList,
barList = obj[type].barList
const barObj = this.selectComponent('#bar')
......@@ -227,7 +252,7 @@ Component({
console.log(type)
let apiName = 'merchantsOutput'
let params = {
merchantIds: [thisPage.data.merchantId]
merchantIds: [thisPage.data.merchantId]
}
if ([1].includes(type)) {
apiName = 'boutiquecouponOutputValue'
......@@ -241,7 +266,9 @@ Component({
// })
}
ActivityApi[apiName](params).then(res => {
thisPage.setData({ loading: false })
thisPage.setData({
loading: false
})
this.setData({
outputData: {
...this.data.outputData,
......@@ -435,12 +462,12 @@ Component({
attached() {
if (this.control) return
this.control = true
setTimeout(()=>{
setTimeout(() => {
this.setData({
calendarLoading: true,
})
},0)
})
}, 0)
this.initLocal(this.data.entranceType)
}
},
......
.output-box {
padding: 24rpx;
margin: 0rpx 16rpx;
border-radius: 32rpx;
background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin: 20rpx 0rpx;
padding: 20rpx 24rpx 24rpx;
// margin: 0rpx 16rpx;
margin-top: 16rpx;
background: #FFFFFF;
// border-radius: 32rpx;
// background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
// margin: 20rpx 0rpx;
margin-bottom: 20rpx;
}
}
.totalCon {
display: flex;
margin-bottom: 20rpx;
.item {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 700;
.unit {
font-size: 30rpx;
}
.label {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 24rpx;
color: #323436;
line-height: 36rpx;
margin-bottom: 12rpx;
}
.number {
font-family: numberBold;
// font-weight: 600;
font-size: 36rpx;
color: #2D2D33;
}
}
.otherItem{
width: 32%;
}
.otherItem:last-child{
width: 36%;
}
}
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
&.today {
background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
border-radius: 16rpx;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// &.today {
// background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
// border-radius: 16rpx;
// }
.output-item {
box-sizing: border-box;
width: 32%;
height: 136rpx;
// text-align: center;
background-image: linear-gradient(90deg, #F3FCFC 0%, #F9FEFF 49%, #EFF7FF 100%);
border-radius: 12rpx;
padding: 24rpx 12rpx 24rpx 16rpx;
&:nth-child(n+4){
margin-top: 16rpx;
}
.output-num {
font-weight: 700;
font-size: 32rpx;
color: #2D2D33;
text-align-last: left;
._unit {
font-size: 28rpx;
}
}
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 30rpx;
color: #1B233D;
line-height: 48rpx;
._unit {
font-size: 28rpx;
}
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
.output-label {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// align-items: center;
font-size: 24rpx;
color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
.label {
margin-top: 5rpx;
}
.icon {
width: 56rpx;
height: 56rpx;
// margin-left: 6rpx;
}
}
}
}
.line-box {
width: 710rpx;
height: 584rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
width: 750rpx;
height: 604rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.bar-box {
width: 710rpx;
height: 516rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
width: 750rpx;
height: 536rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.staf-box {
width: 710rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
height: 300rpx;
width: 710rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
height: 300rpx;
}
.table-box {
display: flex;
justify-content: center;
margin-top: 48rpx;
padding-bottom: 50rpx;
.btn-box {
width: 316rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
border-radius: 20rpx;
background: #FFFFFF;
color: #1B233D;
border: 2rpx solid #DCDFE6;
&.month-btn {
background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%);
margin-left: 22rpx;
color: #FFFFFF;
}
display: flex;
justify-content: center;
margin-top: 48rpx;
padding-bottom: 50rpx;
.btn-box {
width: 316rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
border-radius: 12rpx;
background: #FFFFFF;
// color: #1B233D;
color: #3582EE;
border: 2rpx solid #0075F9;
&.month-btn {
// background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%);
background: #3582EE;
margin-left: 22rpx;
color: #FFFFFF;
}
}
}
.van-calendar{
z-index:9999;
.van-calendar {
z-index: 9999;
}
\ No newline at end of file
<wxs src="../../index.wxs" module="fn"></wxs>
<scroll-view scroll-y class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="activityRefresh" style="{{'height: calc(100% - 22rpx);'}}">
<view class="output-box">
<view class="output-title">产值总览</view>
<view class="output-value">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{fn.accMul(outputData[item.name], (item.multiple || 1))||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-label">{{item.label}}</view>
</view>
<wxs src="../../index.wxs" module="fn" />
<scroll-view
scroll-y
class="content"
refresher-triggered="{{triggered}}"
refresher-enabled
bindrefresherrefresh="activityRefresh"
style="{{'height: calc(100% - 22rpx);'}}"
>
<view class="output-box">
<view class="output-title">产值总览</view>
<view class="totalCon" wx:if="{{entranceType == 1}}">
<view class="item">
<view class="label">总营业额(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{fn.accMul(outputData['orderMoneyTotal'],1)||0}}
</veiw>
</view>
<view class="item">
<view class="label">转化率</view>
<veiw class="number">
{{fn.accMul(outputData['upgradeRatio'], 1)||0}}<text class="unit">%</text>
</veiw>
</view>
</view>
<view class="totalCon" wx:else>
<view class="item otherItem ">
<view class="label">总报价量(单)</view>
<veiw class="number">{{fn.accMul(outputData['totalQuotationCount'],1)||0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">总成交(单)</view>
<veiw class="number">
{{fn.accMul(outputData['totalSuccessCount'], 1)||0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">总产值(员)</view>
<veiw class="number">
<text class="unit">¥</text>{{fn.accMul(outputData['totalOutputValue'], 1)||0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-title">当日新增</view>
<view class="output-value today">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}">
<view class="output-num">{{outputData[item.name]|| 0}} </view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="line-box">
<output-line id="line" opts="{{opts}}" chartData="{{lineData}}" bind:selectTime="selectTime" bind:selectEvent="selectEvent"></output-line>
</view>
<view class="bar-box">
<output-bar opts="{{opts}}" chartData="{{chartData}}" id="bar" bind:selectEvent="selectBarEvent"></output-bar>
</view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}"/>
<view class="table-box">
<view class="btn-box day-btn" bindtap="jumpReport" data-time="day">查看日报表</view>
<view class="btn-box month-btn" bindtap="jumpReport" data-time="month">查看月报表</view>
</view>
</scroll-view >
<view class="output-num"><text class="_unit">{{item._unit}}</text>{{fn.accMul(outputData[item.name], (item.multiple || 1))||0}}<text class="unit_">{{item.unit_}}</text>
</view>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">当日新增</view>
<view class="output-value today">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}">
<view class="output-label"><view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" /></view>
<view class="output-num"><text class="_unit">{{item.unit}}</text>{{outputData[item.name]|| 0}} </view>
</view>
</view>
</view>
<view class="line-box">
<output-line
id="line"
opts="{{opts}}"
chartData="{{lineData}}"
bind:selectTime="selectTime"
bind:selectEvent="selectEvent"
/>
</view>
<view class="bar-box">
<output-bar
opts="{{opts}}"
chartData="{{chartData}}"
id="bar"
bind:selectEvent="selectBarEvent"
/>
</view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}" />
<view class="table-box">
<view class="btn-box day-btn" bindtap="jumpReport" data-time="day">查看日报表</view>
<view class="btn-box month-btn" bindtap="jumpReport" data-time="month">查看月报表</view>
</view>
</scroll-view>
<view wx:if="{{calendarLoading}}">
<van-calendar max-range="{{ 30 }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose"/>
<van-calendar
max-range="{{ 30 }}"
min-date="{{ minDate }}"
max-date="{{ maxDate }}"
show="{{ isShow }}"
type="range"
color="#4466F0"
bind:confirm="onConfirm"
bind:close="onClose"
/>
</view>
.box {
height: 100%;
z-index: 10;
height: 100%;
z-index: 10;
}
.searchInput {
width: 100%;
background: #fff;
padding: 18rpx 0;
}
.input-box {
width: 686rpx;
width: 686rpx;
height: 64rpx;
// background: #fff;
// background: #ffffff7d;
background: #F8F9FC;
// border: 2rpx solid #EEEEEE;
// border-radius: 12rpx;
border-radius: 36rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0rpx 24rpx 0rpx 40rpx;
input {
height: 64rpx;
background: #ffffff7d;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
margin: 24rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0rpx 24rpx 0rpx 40rpx;
input {
height: 64rpx;
line-height: 64rpx;
flex: 1;
}
}
.main-box {
border-radius: 32rpx;
width: 100%;
background: #FFFFFF;
height: calc(100% - 64rpx);
line-height: 64rpx;
flex: 1;
}
}
.icon-small{
margin-right: 10rpx;
}
.main-box {
border-radius: 32rpx;
width: 100%;
background: #FFFFFF;
height: calc(100% - 64rpx);
}
.content-box {
padding: 0 16rpx 80rpx 16rpx;
padding: 0 16rpx 80rpx 16rpx;
}
\ No newline at end of file
<view class="box">
<view class="input-box">
<input value="{{activityName}}" type="text" placeholder="输入活动名称" bind:blur="handleBlur" />
<view class="searchInput">
<view class="input-box">
<icon class="icon-small" type="search" size="14"></icon>
<input value="{{activityName}}" type="text" placeholder="活动名称" bind:blur="handleBlur" />
</view>
</view>
<view class="main-box">
<activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% - 90rpx);'}}">
......
......@@ -14,14 +14,15 @@ Component({
let s = v
v.overviewData = { // 活动中
browseData: {
all: { title: '总浏览', num: s.browsCount }
},
shareData: {
all: { title: '产值(总)/元', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
all: { title: '总浏览(次)', num: s.browsCount }
},
visitorData: {
all: { title: '总访客', num: s.visitCount },
all: { title: '总访客(人)', num: s.visitCount },
},
shareData: {
all: { title: '总产值(元)', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
},
}
console.log(v)
this.setData({ data: v })
......
......@@ -2,13 +2,34 @@
.active-overview{
.wrapper{
display: grid;
position: relative;
grid-template-columns: repeat(3,33.33%);
&.overview-wrapper {
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
background: #f8fafb;
border-radius: 20rpx;
padding: 24rpx 0rpx 26rpx 0rpx;
margin: 24rpx 0rpx;
}
.left_line {
position: absolute;
top: 50%;
// transition: ;
transform: translateY(-50%);
left: 35%;
width: 2rpx;
height: 40rpx;
background: #eee;
}
.right_line {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 65%;
width: 2rpx;
height: 40rpx;
background: #eee;
}
}
.overview-item-box{
width: 100%;
......@@ -54,18 +75,22 @@
.checkDetail{
width: 160rpx;
height: 48rpx;
background: rgba(255,255,255,0.20);
border: 1rpx solid #4466F0;
border-radius: 36rpx;
// background: rgba(255,255,255,0.20);
// border: 1rpx solid #4466F0;
// border-radius: 36rpx;
font-weight: 400;
font-size: 24rpx;
color: #4466F0;
font-size: 26rpx;
color: #3582EE;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
margin: 0 auto;
}
// .center {
// border-left:2rpx solid #eeeeee;
// border-right:2rpx solid #eeeeee;
// }
.godetail{
width: 236rpx;
margin: 0;
......
......@@ -14,7 +14,9 @@
</view>
<view class="wrapper">
<view bind:tap="jumpOutput" data-item="{{data}}" class="checkDetail">产值详情</view>
<view bind:tap="jump" data-item="{{data}}" class="checkDetail">访客详情</view>
<view class="left_line"></view>
<view bind:tap="jump" data-item="{{data}}" class="checkDetail center">访客详情</view>
<view class="right_line"></view>
<view bind:tap="jumpReport" data-item="{{data}}" class="checkDetail">活动战报</view>
</view>
</block>
......
/* packagesList/outDetail/components/activityTab/activityTab.wxss */
.tab {
display: flex;
align-items: center;
height: 78rpx;
line-height: 78rpx;
justify-content: space-around;
.tab-item {
color: #666666;
padding: 0rpx 20rpx;
&.checked {
color: #708CFF;
}
display: flex;
align-items: center;
// height: 78rpx;
// line-height: 78rpx;
justify-content: space-around;
padding-bottom: 12rpx;
.tab-item {
color: #666666;
padding: 12rpx 40rpx;
background: #F8F9FC;
border-radius: 32rpx;
&.checked {
color: #6d8cd1;
background: #e9f0fe;
}
}
}
\ No newline at end of file
/* pages/tab/index/components/activityTop/activityTop.wxss */
.active-top{
display: flex;
.active-img{
flex-shrink: 0;
position: relative;
width: 160rpx;
height: 160rpx;
margin-right: 24rpx;
.thum-icon{
width: 100%;
height: 100%;
position: absolute;
border-radius: 16rpx;
overflow: hidden;
top: 0;
left: 0;
image {
height: 100%;
}
}
.active-type{
position: absolute;
top: 0;
left: 0;
width: 72rpx;
height: 40rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
border-radius: 16rpx 0 24rpx 0;
color: #673F00;
font-size: 24rpx;
text-align: center;
}
}
.active-title{
flex: 1;
.active-top {
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 8rpx 0;
.name{
// display: flex;
// align-items: center;
.name-left{
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
line-height: 48rpx;
word-break: break-all;
.activity-type{
float: right;
line-height: 44rpx;
font-size: 28rpx;
font-weight: 400;
color: #FE5662;
margin-top: 4rpx;
image{
margin-top: 4rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.right{
display: flex;
flex-flow: 1;
font-size: 28rpx;
align-items: center;
image{
width: 32rpx;
height: 32rpx;
.active-img {
flex-shrink: 0;
position: relative;
width: 160rpx;
height: 160rpx;
margin-right: 24rpx;
.thum-icon {
width: 100%;
height: 100%;
position: absolute;
border-radius: 16rpx;
overflow: hidden;
top: 0;
left: 0;
image {
height: 100%;
}
}
.active-type {
position: absolute;
top: 0;
left: 0;
width: 72rpx;
height: 40rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
border-radius: 16rpx 0 24rpx 0;
color: #673F00;
font-size: 24rpx;
text-align: center;
}
}
}
.time{
color: #7A8299;
font-size: 28rpx;
text{
color: #1B233D;
}
.active-title {
flex: 1;
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 8rpx 0;
.name {
// display: flex;
// align-items: center;
.name-left {
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
line-height: 48rpx;
word-break: break-all;
.activity-type {
float: right;
line-height: 44rpx;
font-size: 28rpx;
font-weight: 400;
color: #FE5662;
margin-top: 4rpx;
image {
margin-top: 4rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.right {
display: flex;
flex-flow: 1;
font-size: 28rpx;
align-items: center;
image {
width: 32rpx;
height: 32rpx;
}
}
}
.time {
color: #7A8299;
font-size: 24rpx;
text {
color: #1B233D;
}
}
}
}
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
display: inline-block;
margin: 32rpx 0 8rpx 0;
overflow: hidden;
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, 0.24), inset 0 -2rpx 6rpx 0 rgba(255, 255, 255, 0.40);
// box-shadow: 0 10rpx 20rpx 0 rgba(204, 133, 122, 0.16);
border-radius: 32rpx;
.item-bg {
......@@ -38,6 +39,7 @@
}
.end{
color: #6E6E7A;
margin-left: 8rpx;
}
.un-start-class {
width: 32rpx;
......
<view class="content-item">
<view class="item-bg">
<glsx-image webp src="store-assistant-assemble/acvitity/activity-bg.png"></glsx-image>
<!-- <glsx-image webp src="store-assistant-assemble/acvitity/activity-bg.png"></glsx-image> -->
</view>
<view class="item-box">
<!-- 活动top信息 -->
<activity-top tabType="{{tabType}}" data="{{item}}" widthStyle="flex: 0 0 62%;">
<block wx:if="{{item.activityStatus==2}}">
<glsx-image webp src="store-assistant/hot-icon.png"></glsx-image>
<glsx-image class="un-start-class" webp src="store-assistant/hot-icon.png"></glsx-image>
<text class="hot">火热进行中</text>
</block>
<block wx:if="{{item.activityStatus==1}}">
......
......@@ -128,11 +128,11 @@ Component({
label: {
show: true,
position: 'top',
color: this.data.color,
color: '#3582EE',
},
color: this.data.color,
color: '#3582EE',
itemStyle: {
borderRadius: [50, 50, 0, 0],
// borderRadius: [50, 50, 0, 0],
padding: [50, 50, 0, 0]
},
barWidth: 24
......
import * as echarts from '../../../outDetail/ec-canvas/echarts';
Component({
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Array,
value: () => []
},
keys: {
type: Array,
value: ['year', 'sales']
},
tickCount: {
type: Number,
value: 5
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Array,
value: () => []
},
keys: {
type: Array,
value: ['year', 'sales']
},
tickCount: {
type: Number,
value: 5
},
color: {
type: String,
value: '#3975C6'
}
},
color: {
type: String,
value: '#3975C6'
}
},
observers: {
'chartData': function (data) {
this.initData(data)
observers: {
'chartData': function (data) {
this.initData(data)
},
},
},
/**
* 组件的初始数据
*/
data: {
ec: {
lazyLoad: true
}
/**
* 组件的初始数据
*/
data: {
ec: {
lazyLoad: true
}
},
/**
* 组件的方法列表
*/
methods: {
onInitChart(xData, yData) {
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
this.setOption(chart, xData, yData);
return chart;
})
},
setOption(chart, xData, yData) {
let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80
var option = {
grid: {
left: 8,
right: 30,
top: 30,
bottom: 0,
containLabel: true
},
tooltip: {
trigger: 'axis',
triggerOn: "mousemove",
axisPointer: {
type: "none",
lineStyle: {
type: 'solid'
}
},
padding: [0, 12],
borderWidth: 2,
borderColor: '#6ED0BE',
borderRadius: 10,
textStyle: {
color: '#6ED0BE',
fontSize: 10
},
// position: function(pt) {
// console.log(pt)
// return [pt[0], pt[1]+20];
// },
formatter: function (item) {
return `${item[0].value}`
}
},
xAxis: {
type: 'category',
boundaryGap: false,
// min:1,
// max: 5,
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
data: xData
/**
* 组件的方法列表
*/
methods: {
onInitChart(xData, yData) {
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
this.setOption(chart, xData, yData);
return chart;
})
},
yAxis: {
x: 'center',
type: 'value',
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
splitLine: {
lineStyle: {
type: 'dashed'
setOption(chart, xData, yData) {
let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80
var option = {
grid: {
left: 8,
right: 30,
top: 30,
bottom: 0,
containLabel: true
},
tooltip: {
trigger: 'axis',
triggerOn: "mousemove",
axisPointer: {
type: "shadow",
shadowStyle: {
shadowColor: 'rgba(53, 195, 118, .1)',
color: 'rgba(53, 195, 118, .1)',
},
lineStyle: {
color: '#35C376',
type: 'shadow'
}
},
position: 'top',
padding: [0, 12],
borderWidth: 2,
borderColor: '#6ED0BE',
borderRadius: 10,
textStyle: {
color: '#6ED0BE',
fontSize: 10
},
position: function (point, params, dom, rect, size) {
// 固定在顶部
return [point[0]-20, '10%'];
},
formatter: function (item) {
return `${item[0].value}`
}
},
xAxis: {
type: 'category',
boundaryGap: false,
// min:1,
// max: 5,
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
data: xData
},
yAxis: {
x: 'center',
type: 'value',
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
dataZoom: {
type: "inside",
maxSpan: maxSpan,
// end: 100,
// // start: start,
},
series: [{
data: yData,
type: 'line',
// smooth: true,
color: this.data.color
}]
}
}
chart.setOption(option)
},
dataZoom: {
type: "inside",
maxSpan:maxSpan,
// end: 100,
// // start: start,
//初始化数据
initData(data) {
const xData = [],
yData = [];
const [x, y] = this.data.keys
data.forEach(item => {
xData.push(item[x])
yData.push(item[y])
})
this.setData({
xData,
yData
})
this.onInitChart(xData, yData)
},
series: [{
data: yData,
type: 'line',
smooth: true,
color: this.data.color
}]
}
chart.setOption(option)
},
//初始化数据
initData(data) {
const xData = [],
yData = [];
const [x, y] = this.data.keys
data.forEach(item => {
xData.push(item[x])
yData.push(item[y])
})
this.setData({
xData,
yData
})
this.onInitChart(xData, yData)
},
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-line');
}
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-line');
}
})
\ No newline at end of file
......@@ -3,7 +3,7 @@
<view class="title">场景切换</view>
<block wx:for="{{menus}}" wx:key="index">
<view catch:tap="selectMenu" data-index="{{item.serviceType}}" class="element {{item.serviceType==current?'active':''}}">
<glsx-image class="logo" webp src="store-assistant-assemble/menu/{{item.logo}}.png"></glsx-image>
<glsx-image class="logo" webp src="store-assistant-assemble/menu/{{item.logo}}{{item.serviceType==current?'-o':''}}.png"></glsx-image>
<view class="label">{{item.title}}</view>
<view wx:if="{{totals&&item.serviceType==0}}" class="num_pannel">{{totals}}</view>
</view>
......
......@@ -69,6 +69,7 @@ Component({
},
onLoad(options) {
console.log(options,'options');
const { merchantId, merchantName } = options;
this.setData({ merchantId, merchantName })
this.getSubscribeConfig(options)
......
@import "index.skeleton.wxss";
page {
overflow: hidden;
overflow: hidden;
// background-color: #fff;
}
.navigation-bar {
position: fixed;
top: 0;
left: 0;
z-index: 2;
.bar-text {
font-size: 34rpx;
font-weight: 600;
}
position: fixed;
top: 0;
left: 0;
z-index: 2;
.bar-text {
font-size: 34rpx;
font-weight: 600;
}
}
.layout {
box-sizing: border-box;
position: relative;
.bg-box {
width: 100%;
overflow: hidden;
position: absolute;
left: 0;
z-index: -1;
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
}
.tab-box {
padding-bottom: 60rpx;
// background-color: #fff;
&::after {
content: '';
width: 100%;
// height: 486rpx;
// height: 350rpx;
height: 275rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// .bg-box {
// width: 100%;
// overflow: hidden;
// position: absolute;
// left: 0;
// z-index: -1;
// .bg {
// width: 100%;
// height: 100%;
// position: absolute;
// top: 0;
// left: 0;
// }
// }
.tab-box {
position: sticky;
top: 0;
left: 0;
......@@ -41,28 +64,34 @@ page {
white-space: nowrap;
box-sizing: border-box;
padding: 0 32rpx;
.tab-scroll{
.tab-scroll {
height: 100%;
width: 600rpx;
}
.nav-btn {
width: 88rpx;
transform: translate(20rpx, 8rpx);
.nav-func-icon {
width: 88rpx;
transform: translate(20rpx,8rpx);
.nav-func-icon{
width: 88rpx;
height: 88rpx;
}
height: 88rpx;
}
}
.tab_element{
.tab_element {
display: inline-block;
padding: 0rpx 28rpx;
position: relative;
line-height: 96rpx;
margin-right: 24rpx;
&:last-child {
margin-right: 0rpx;
margin-right: 0rpx;
}
.inner{
.inner {
width: 100%;
display: flex;
flex-flow: column;
......@@ -72,14 +101,20 @@ page {
color: #2D2D33;
opacity: 0.9;
}
.active {
font-size: 36rpx;
font-weight: 600;
// font-size: 36rpx;
// font-weight: 600;
font-weight: 500;
font-size: 32rpx;
color: #3666FE;
}
.line{
.line {
width: 48rpx;
height: 8rpx;
background: #708CFF;
// background: #708CFF;
background: #3666FE;
border-radius: 3px 3px 0 0;
transform: scale(1);
position: absolute;
......@@ -88,9 +123,10 @@ page {
bottom: 0;
}
}
}
.add-activity{
.add-activity {
position: fixed;
top: 75%;
right: 16rpx;
......@@ -98,12 +134,14 @@ page {
height: 160rpx;
}
}
.wrappper{
.wrappper {
height: 80rpx;
display: flex;
justify-content: center;
padding-top: 16rpx;
.topMessag{
.topMessag {
width: 686rpx;
height: 72rpx;
background-image: linear-gradient(85deg, #FAFBFF 0%, #F5F6FF 100%);
......@@ -115,58 +153,68 @@ page {
padding: 0 20rpx;
position: relative;
z-index: 99;
.left{
.left {
display: flex;
align-items: center;
.sign_icon{
.sign_icon {
width: 48rpx;
height: 48rpx;
margin-right: 16rpx;
}
.text1{
.text1 {
color: rgba(27, 35, 61, 1);
font-size: 26rpx;
font-weight: 400;
}
.text2{
.text2 {
color: rgba(27, 35, 61, 1);
font-size: 26rpx;
font-weight: 600;
margin-left: 4rpx;
}
}
.right{
.right {
display: flex;
align-items: center;
.text3{
.text3 {
font-weight: 400;
font-size: 24rpx;
color: #4466F0;
}
.arrow_icon{
.arrow_icon {
width: 24rpx;
height: 24rpx;
margin-left: 4rpx;
}
}
}
.title1{
.title1 {
font-weight: 400;
font-size: 28rpx;
color: #1B233D;
}
}
.messageBg1{
.messageBg1 {
width: 100%;
background: #FFFFFF;
background-image: linear-gradient(270deg, rgba(255,170,62,0.10) 0%, rgba(254,109,75,0.10) 100%);
background-image: linear-gradient(270deg, rgba(255, 170, 62, 0.10) 0%, rgba(254, 109, 75, 0.10) 100%);
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding-left: 32rpx;
padding-right: 40rpx;
.btn{
.btn {
width: 160rpx;
height: 56rpx;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
......@@ -180,4 +228,4 @@ page {
position: relative;
z-index: 20;
}
}
}
\ No newline at end of file
......@@ -10,13 +10,13 @@
</navigation-bar>
</view>
<block wx:if="{{navHeight}}">
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - {{navHeight*2}}rpx - 60rpx)">
<view class="layout" id="layout" style="padding-top:{{navHeight}}px; height: 100vh">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<!-- <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view>
</view> -->
<!-- tab切换 -->
<view class="tab-box" style="top: {{navHeight}}px">
<scroll-view class="tab-scroll" scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-x="{{true}}" scroll-with-animation>
......
......@@ -8,9 +8,9 @@ Component({
let s = v
if (s) {
v.numList = [
{ title: '浏览量', num: s.browsCount },
{ title: '访客量', num: s.visitCount },
{ title: '订单量', num: s.orderCount }
{ title: '浏览量(次)', num: s.browsCount },
{ title: '访客量(人)', num: s.visitCount },
{ title: '订单量(单)', num: s.orderCount }
]
v.sortList = [
{ title: '访客率', sort: Number(s.fansRate).toFixed(2) },
......
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 40rpx 0;
position: relative;
padding: 40rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
width: 406rpx;
height: 288rpx;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
// width: 406rpx;
// height: 288rpx;
width: 686rpx;
height: 408rpx;
image {
width: 406rpx;
height: 288rpx;
}
image {
width: 686rpx;
height: 408rpx;
// width: 406rpx;
// height: 288rpx;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 320rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex;
}
.funnel-content {
.left {
flex: 0 0 380rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
height: 360rpx;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 33rpx;
.labelText:last-child{
.num{
color: #FFFFFF;
}
}
.item-0{
margin-top: 20rpx;
}
.item-1{
margin-top: 20rpx;
}
.item-2{
margin-top: 23rpx;
}
view {
box-sizing: border-box;
display: flex;
justify-content: center;
height: 248rpx;
align-items: center;
margin-right: 28rpx;
justify-content: space-between;
width: 100%;
padding-top: 40rpx;
padding-left: 40rpx;
.left,
.right {
display: flex;
.num {
font-size: 28rpx;
font-weight: 700;
// margin-left: 4rpx;
color: #3666FE;
}
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
.lable {
font-weight: 400;
font-size: 24rpx;
color: #323436;
}
}
}
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
// color: #4466F0;
color: #3666FE;
padding-top: 85rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
}
.sort-box {
font-weight: 400;
font-size: 24rpx;
color: #323436;
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
.sort {
font-weight: 700;
font-size: 28rpx;
color: #3666FE;
}
}
.sort-box:last-child {
position: absolute;
left: 0rpx;
top: 64%;
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
}
}
\ No newline at end of file
<view class="funnel-box">
<view class="funnel-bg">
<glsx-image webp src="store-assistant/activity_funnel.webp"></glsx-image>
<glsx-image webp src="store-assistant-assemble/output/activity_funnel.webp"></glsx-image>
</view>
<view class="funnel-content">
<view class="left">
<view wx:for="{{data.numList}}" wx:key="index">{{item.title}}<text>{{item.num||0}}</text></view>
<view class="labelText item-{{index}}" wx:for="{{data.numList}}" wx:key="index"><text class="label ">{{item.title}}</text><text class="num">{{item.num||0}}</text></view>
</view>
<view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index">
<view>{{item.title}}</view>
<view class="label">{{item.title}}</view>
<view class="sort">{{item.sort}}%</view>
</view>
</view>
......
......@@ -12,32 +12,38 @@ Page({
browseCount: 1,
}
},
outputValue: [{
label: '今日产值/元',
name: 'realAmountToday',
unit: '¥',
multiple: 0.01,
}, {
label: '今日订单/单',
name: 'orderCountToday',
unit: ''
}, {
label: '今日访客/个',
name: 'visitCountToday',
unit: ''
}, {
outputValue: [
// {
// label: '今日产值/元',
// name: 'realAmountToday',
// unit: '¥',
// multiple: 0.01,
// }, {
// label: '今日订单/单',
// name: 'orderCountToday',
// unit: ''
// }, {
// label: '今日访客/个',
// name: 'visitCountToday',
// unit: ''
// },
{
label: '累计产值/元',
name: 'realAmount',
unit: '¥',
multiple: 0.01,
iconUrl:'store-assistant-assemble/output/icon05.png'
}, {
label: '累计订单/单',
name: 'orderCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '累计访客/个',
name: 'visitCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}],
},
......
......@@ -3,71 +3,207 @@
overflow: hidden;
}
.layout {
// position: relative;
box-sizing: border-box;
position: relative;
padding-top: 400rpx;
&::after {
content: '';
width: 100%;
// height: 486rpx;
// height: 350rpx;
height: 275rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// .bg-box {
// width: 100%;
// overflow: hidden;
// position: absolute;
// left: 0;
// z-index: -1;
.bg-box {
width: 100%;
overflow: hidden;
position: absolute;
left: 0;
z-index: -1;
.bg {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
top: 0;
left: 0;
}
// .bg {
// width: 100%;
// height: 100%;
// position: absolute;
// z-index: -1;
// top: 0;
// left: 0;
// }
// }
}
.output-box {
padding: 20rpx 24rpx 24rpx;
// margin: 0rpx 16rpx;
margin-top: 16rpx;
background: #FFFFFF;
// border-radius: 32rpx;
// background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
// margin: 20rpx 0rpx;
margin-bottom: 20rpx;
}
}
.output-value {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// &.today {
// background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
// border-radius: 16rpx;
// }
.output-item {
box-sizing: border-box;
width: 32%;
height: 136rpx;
// text-align: center;
background-image: linear-gradient(90deg, #F3FCFC 0%, #F9FEFF 49%, #EFF7FF 100%);
border-radius: 12rpx;
padding: 24rpx 12rpx 24rpx 16rpx;
&:nth-child(n+4){
margin-top: 16rpx;
}
.output-num {
font-weight: 700;
font-size: 36rpx;
color: #2D2D33;
text-align-last: left;
._unit {
font-size: 28rpx;
}
}
.output-label {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// align-items: center;
font-size: 24rpx;
color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
.label {
margin-top: 5rpx;
}
.icon {
width: 56rpx;
height: 48rpx;
// margin-left: 6rpx;
}
}
}
}
.totalCon {
display: flex;
margin-bottom: 20rpx;
.output-box {
background: #F4F8FE;
border-radius: 32rpx;
margin: 0 16rpx;
padding: 24rpx;
.item {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 700;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
display: flex;
.unit {
font-size: 30rpx;
}
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
text {
font-size: 28rpx;
}
}
.label {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 24rpx;
color: #323436;
line-height: 36rpx;
margin-bottom: 12rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
}
.number {
font-family: numberBold;
// font-weight: 600;
font-size: 48rpx;
color: #2D2D33;
}
}
.item+.item {
width: 40%;
}
.otherItem{
width: 40%;
}
.otherItem+ .otherItem{
width: 30%;
}
}
// .output-box {
// // background: #F4F8FE;
// background: #FFFFFF;
// // border-radius: 32rpx;
// // margin: 0 16rpx;
// padding: 24rpx;
// .output-title {
// font-weight: 600;
// font-size: 32rpx;
// color: #1B233D;
// line-height: 48rpx;
// margin-bottom: 22rpx;
// display: flex;
// }
// .output-value {
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// .output-item {
// text-align: center;
// .output-num {
// font-weight: 600;
// font-size: 44rpx;
// color: #1B233D;
// line-height: 64rpx;
// text {
// font-size: 28rpx;
// }
// }
// .output-label {
// font-size: 24rpx;
// color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
// }
// }
// }
// }
.box {
margin: 20rpx;
......
<!--packageOutput/pages/crowdDetail/crowdDetail.wxml-->
<view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值详情</navigation-bar>
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - {{navHeight}}px)">
<view class="layout" id="layout" style="padding-top:{{navHeight}}px; height: calc(100vh)">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<!-- <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view>
</view> -->
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" style="{{'height: calc(100% - 50rpx);'}}">
<view class="output-box">
<view class="output-title">
产值总览
</view>
<view class="totalCon" >
<view class="item otherItem ">
<view class="label">今日产值(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{outputData['realAmountToday']*(0.01) || 0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">今日订单(单)</view>
<veiw class="number">
{{outputData['orderCountToday'] || 0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">今日访客(员)</view>
<veiw class="number">
{{outputData['visitCountToday'] || 0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputValue}}" wx:key="index">
<view class="output-num"><text>{{item.unit}}</text>{{outputData[item.name]*(item.multiple || 1) || 0}}</view>
<view class="output-label">{{item.label}}</view>
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text class="_unit">{{item.unit}}</text>{{outputData[item.name]*(item.multiple || 1) || 0}}</view>
</view>
</view>
</view>
......
......@@ -14,39 +14,51 @@ Page({
timeValue: new Date().format('yyyy-MM-dd'),
outputView: {
outputValue: [{
label: '报价量',
label: '报价量(单)',
name: 'quotationCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, {
label: '成交量',
label: '成交量(单)',
name: 'successCount',
unit: ''
unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, {
label: '产值',
label: '产值(元)',
name: 'outputValue',
_unit: '¥'
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}],
outputValueBoutique: [{
label: '发券量(总)/张',
name: 'sendCouponTotal',
unit: ''
}, {
label: '升级订单/单',
outputValueBoutique: [
// {
// label: '发券量(总)/张',
// name: 'sendCouponTotal',
// unit: ''
// },
// {
// label: '营业额(总)/元',
// name: 'orderMoneyTotal',
// _unit: '¥'
// },
{
label: '升级订单(单)',
name: 'upgradeCountTotal',
unit: ''
}, {
label: '营业额(总)/元',
name: 'orderMoneyTotal',
_unit: '¥'
}, {
label: '客单价/元',
unit: '',
iconUrl:'store-assistant-assemble/output/icon02.png'
},
{
label: '转化率',
name: 'upgradeRatio',
unit_: '%',
iconUrl:'store-assistant-assemble/output/icon07.png'
},
{
label: '客单价(元)',
name: 'averagePrice',
_unit: '¥'
}, {
label: '转化率',
name: 'upgradeRatio',
unit_: '%'
}],
_unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
},
],
}
},
......
......@@ -2,18 +2,18 @@
<wxs src="time.wxs" module="formatTime" />
<view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值{{timeType=='day'?'日':'月'}}报表</navigation-bar>
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<view class="layout" id="layout" style="padding-top:{{navHeight}}px; height: calc(100vh)">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<!-- <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view>
<scroll-view scroll-y class="content" class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="getReport" bindscroll="scrollIng" style="{{'height: calc(100% - 22rpx);'}}">
</view> -->
<scroll-view scroll-y class="content" class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="getReport" bindscroll="scrollIng" style="{{'height: 100%'}}">
<view class="store-box">
<view class="store-item">
<view class="store-logo">
<glsx-image class="store-logo" webp src="store-assistant-assemble/output/store-icon.png"></glsx-image>
<glsx-image class="store-logo" webp src="store-assistant-assemble/output/merchantIcon.png"></glsx-image>
</view>
<view class="store-content">
<view class="store-name">{{merchantName}}</view>
......@@ -23,7 +23,7 @@
<view class="date-input" bindtap="onDisplay">
<view class="date-value">{{formatTime.formatTime(timeValue,timeType=='day'?11:8)}}</view>
<view class="date-icon">
<glsx-image class="date-icon" webp src="store-assistant-assemble/output/date-icon.png"></glsx-image>
<glsx-image class="date-icon" webp src="store-assistant-assemble/output/clander.png"></glsx-image>
</view>
</view>
</view>
......@@ -31,24 +31,44 @@
<view class="output-title">
当{{timeType=='day'?'日':'月'}}产值
</view>
<view class="totalCon" wx:if="{{type != 2}}">
<view class="item">
<view class="label">总营业额(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{outputData['orderMoneyTotal'] ||0}}
</veiw>
</view>
<view class="item">
<view class="label">发券量(张)</view>
<veiw class="number">
{{outputData['sendCouponTotal'] ||0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputView[type == 2?'outputValue':'outputValueBoutique']}}" wx:key="index">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{outputData[item.name] ||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="billboard-box">
<view class="billboard-title">当{{timeType=='day'?'日':'月'}}员工龙虎榜</view>
<view class="billboard-title">
<text>当{{timeType=='day'?'日':'月'}}员工龙虎榜</text>
<text class="unit">累计产值(元)</text>
</view>
<view class="billboard-border">
<block wx:if="{{billboard.length}}">
<view class="billboard-item" wx:for="{{billboard}}" wx:key="index">
<view class="billboard-item-bar">
<view class="bill-border">
<view class="bill-num" wx:if="{{item.name}}" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">¥{{item.value}}</view>
<view class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view>
<view class="bill-name">{{item.name}}</view>
<view class="bill-num" wx:if="{{item.name}}"><text class="unit">¥</text>{{item.value}}</view>
</view>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill0{{item.sort}}.png"></glsx-image>
</view>
</view>
</block>
......
/* packageActivity/pages/visitor/visitor.wxss */
.visitor-box{
min-height: 100vh;
background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
// background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden;
.img-bg{
width: 100%;
......@@ -18,6 +18,11 @@
font-weight: 600;
color: #1B233D;
display: flex;
.num{
color: #3666FE;
}
view:last-child{
margin-left: 48rpx;
}
......@@ -31,13 +36,18 @@
margin: 32rpx 24rpx;
right: 0;
left: 0;
.list-item{
.item_box{
position: relative;
background: #FFFFFF;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
// position: relative;
overflow: hidden;
margin-bottom: 24rpx;
background-image: linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%);
border-radius: 24rpx;
padding: 24rpx 40rpx;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
position: relative;
}
.list-item{
padding: 24rpx 40rpx 0;
.top{
display: flex;
justify-content: space-between;
......@@ -86,14 +96,17 @@
}
.bottom{
margin-top: 24rpx;
background: #FFFFFF;
border-radius: 8px;
padding: 24rpx 32rpx;
padding: 24rpx 0;
border-top: 2rpx dashed #EEEEEE;
.activity{
font-size: 30rpx;
font-weight: 600;
// font-size: 30rpx;
font-size: 24rpx;
// font-weight: 600;
line-height: 48rpx;
color: #1B233D;
// color: #1B233D;
color: #393B3E;
text{
display: inline-block;
padding: 2rpx 16rpx;
......@@ -108,13 +121,7 @@
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
}
}
.footprint{
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
margin-top: 16rpx;
}
.pravite-text{
font-weight: 500;
font-size: 30rpx;
......@@ -125,6 +132,7 @@
}
}
}
.status{
position: absolute;
right: 0;
......@@ -165,3 +173,14 @@
}
}
}
.footprint{
height: 64rpx;
line-height: 64rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
// margin-top: 16rpx;
background: #FFF9F2;
}
\ No newline at end of file
<!--packageActivity/pages/visitor/visitor.wxml-->
<view class="visitor-box">
<view class="img-bg">
<glsx-image class="bg_image" webp src="store-assistant/visitor_bg.png"></glsx-image>
<!-- <glsx-image class="bg_image" webp src="store-assistant/visitor_bg.png"></glsx-image> -->
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view>
<view>总访客<text class="num"> · {{allNum}}</text></view>
<view>今日访客<text class="num"> · {{todayNum}}</text></view>
</view>
<view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
<block wx:for="{{list}}" wx:key="index">
<view class="item_box">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
......@@ -38,15 +42,18 @@
</view>
<view class="bottom">
<view class="activity">
{{item.activityName}}
访问页面: {{item.activityName}}
<!-- <text>{{activityTypList[0]}}</text> -->
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
</view>
<view class="footprint">
<text>{{item.lastVisitFormatTime}} 访问过</text>
<text>浏览 {{item.visitCount}} 次</text>
</view>
</view>
</block>
</block>
<block wx:else>
......
......@@ -4,7 +4,8 @@ const IMAGES = Object.freeze({
icon2: `/personal/icon3.png`,
userAvatarUrl: `/personal/userAvatarUrl.png`
})
import { getMockData } from '~/api/api'
// import { getMockData } from '~/api/api'
import USERAPI from '~/api/usersApi/index'
Page({
/**
* 页面的初始数据
......@@ -18,6 +19,42 @@ Page({
url: '/pages/tab/logout/logout',
})
},
logout() {
let _this = this
wx.showModal({
title: '温馨提示',
content: '是否退出当前账号?',
confirmColor: '#3666FE',
success(res) {
if (res.confirm) {
// _this.showLoading()
wx.$api.showLoading()
USERAPI.logout().then(_res_ => {
const fn = wx.getFileSystemManager()
fn.readdir({
dirPath: wx.env.USER_DATA_PATH,
success({ files }) {
files.length &&
files.map(e => {
fn.unlink({
filePath: `${wx.env.USER_DATA_PATH}/${e}`
})
})
}
})
// wx.$storage.rm('fileList')
wx.$storage.rm('sessionId')
wx.$storage.rm('userInfo')
wx.$storage.rm('subMerchant')
wx.$storage.rm('auto_login_object')
wx.$storage.rm('posterId')
wx.$storage.rm("mock_data")
wx.$router.reLaunch('login.index')
})
}
}
})
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
......@@ -29,6 +66,8 @@ Page({
*/
onLoad: async function (options) {
let { userInfo } = wx.$storage.get()
if(userInfo.subLoginUser&&userInfo.subLoginUser.phone)
userInfo.subLoginUser.phone = userInfo.subLoginUser.phone.replace(/\B(?=(\d{4})+(?!\d))/g, ' ');
this.setData({
userInfo: userInfo.subLoginUser
})
......
......@@ -38,8 +38,10 @@ page {
&::after {
content: '';
width: 100%;
height: 750rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/logout-bg.png') no-repeat;
// height: 750rpx;
height: 486rpx;
// background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/logout-bg.png') no-repeat;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/personal/bg.webp') no-repeat;
background-size: 100% 100%;
position: absolute;
left: 0;
......@@ -57,13 +59,18 @@ page {
.userInfoCon {
height: 360rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 0rpx 44rpx;
.info {
flex: 1;
margin-left: 24rpx;
}
margin-top: 32rpx;
.info {
flex: 1;
text-align: center;
// margin-left: 24rpx;
}
.headPortrait {
width: 128rpx;
height: 128rpx;
......@@ -145,9 +152,10 @@ page {
font-size: 32rpx !important;
color: #999999 !important;
font-weight: 400 !important;
width: 330rpx;
height: 96rpx;
line-height: 96rpx;
border: 2rpx solid #E2E2E2;
border-radius: 12rpx;
width: 336rpx;
height: 88rpx;
line-height: 88rpx;
border: 1rpx solid #E2E2E2;
border-radius: 12rpx;
background-color: #fff !important;
}
\ No newline at end of file
<!-- pages/tab/output/output.wxml -->
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的</navigation-bar>
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">个人中心</navigation-bar>
<view class="layout">
<view class="userInfoCon" bindtap="jumpLogout">
<!-- bindtap="jumpLogout" -->
<view class="userInfoCon">
<glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>
头像
</glsx-image>
......@@ -9,8 +10,11 @@
<view class="name">{{userInfo.merchantName}}</view>
<view class="id">{{userInfo.phone}}</view>
</view>
<view class="logot">
<button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
</button>
<!-- <view class="logot">
<glsx-image class="logot" webp src="store-assistant-assemble/login/arrow-left.png"></glsx-image>
</view>
</view> -->
</view>
</view>
\ No newline at end of file
......@@ -15,15 +15,14 @@
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
padding-bottom: 14rpx;
border-radius: 50%;
margin-top: -4rpx;
}
.title {
display: flex;
justify-content: space-between;
width: calc(100% - 40rpx);
border-bottom: 2rpx dotted #E0E0E0;
// border-bottom: 2rpx dotted #E0E0E0;
padding-bottom: 14rpx;
}
......@@ -54,23 +53,39 @@
.content {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 0 20rpx;
}
.content-item {
width: 33.33%;
width: 32%;
// flex: 1;
text-align: center;
font-size: 20rpx;
display: flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
color: #999999;
margin-top: 16rpx;
height: 128rpx;
background: #F8F9FC;
border-radius: 12rpx;
.price {
font-weight: 500;
font-size: 28rpx;
font-weight: 700;
font-size: 24rpx;
color: #323436;
font-weight: 600;
margin-bottom: 10rpx;
}
.unit{
font-size: 20rpx;
font-weight: 600;
}
// .label{
// font-size: 20rpx;
// }
}
}
\ No newline at end of file
<!--pages/tab/output/components/BusiCard/BusiCard.wxml-->
<wxs src="../index.wxs" module="filter" />
<view class="busi-card">
<view class="title-box" wx:if="{{fromPage == 'staff'}}">
<!-- <view class="title-box" wx:if="{{fromPage == 'staff'}}">
<image wx:if="{{formObj.userAvatar}}" src="{{formObj.userAvatar}}" class="icon" />
<glsx-image wx:else src="personal/staff_defalut_avatar.png" class="icon" />
<view class="title">
{{info.userName}}
<view class="title-tap">{{timeTabObj[formData.timeIdx || '0']}}</view>
</view>
</view>
<view class="title-box bf-blue" wx:else>
</view> bf-blue-->
<view class="title-box " >
<glsx-image src="store-assistant-assemble/output/merchantIcon.png" class="icon" />
<view class="title">{{info.merchantName || info.merchantName4s || ''}}</view>
</view>
<view class="content">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item" data-info="{{info}}" data-item="{{item}}" bindtap="jumpDetail">
<view wx:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view>
<view wx:else="" class="price">
{{item.prefix || ''}}
<text class="unit">{{item.prefix || ''}}</text>
{{item.isNum ? filter.money_three_for_two_thousands(info[item.name] || 0.00) : (info[item.name] || 0)}}
{{item.suffix || ''}}
</view>
<view>{{item.label}}</view>
<view class="label">{{item.label}}</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -11,20 +11,23 @@
.input-box {
width: 686rpx;
height: 64rpx;
background: #ffffff7d;
// background: #ffffff7d;
// border-radius: 12rpx;
background: #F8F9FC;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
border-radius: 32rpx;
margin: 0rpx auto 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0rpx 24rpx 0rpx 40rpx;
padding: 0rpx 24rpx 0rpx 24rpx;
input {
flex: 1;
height: 64rpx;
line-height: 64rpx;
margin-left: 15rpx;
}
}
......@@ -57,13 +60,15 @@
.profit-box {
box-sizing: border-box;
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
width: 710rpx;
height: 96rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/output/total_bg.png') no-repeat;
background-size: 100% 100%;
line-height: 96rpx;
padding: 0 20rpx 0 32rpx;
margin-bottom: 0rpx;
margin-top: 16rpx;
background-size: 100% 96rpx;
margin: 20rpx auto 0;
padding: 0 32rpx;
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
......@@ -76,6 +81,10 @@
// font-family: 'number';
// font-size: 26rpx;
}
.unit{
font-size: 28rpx;
margin-right: 10rpx;
}
}
.sort-fix {
......@@ -205,6 +214,7 @@
font-size: 24rpx;
text-align: center;
color: #CCCED1;
margin-top: 16rpx;
padding-bottom: 60rpx;
}
......
......@@ -4,12 +4,13 @@
<view class="client-box">
<!-- 总收益 -->
<view>
<view class="input-box">
<icon class="icon-small" type="search" size="14"></icon>
<input value="{{merchantName4s}}" type="text" placeholder="门店名称" bind:blur="handleBlur" />
</view>
<view class="profit-box flex">
<text>总产值</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(totalProfit || 0.00)}}</text>
</view>
<view class="input-box"><input value="{{merchantName4s}}" type="text" placeholder="输入门店" bind:blur="handleBlur" />
<icon class="icon-small" type="search" size="14"></icon>
<text class="price-txt"><text class="unit">¥</text>{{filter.money_three_for_two_thousands(totalProfit || 0.00)}}</text>
</view>
<view>
</view>
......
......@@ -6,7 +6,7 @@ Component({
properties: {
title: {
type: String,
value: '合作门店'
value: '我的门店'
},
sceneCode: {
type: String,
......
......@@ -2,7 +2,6 @@
.sort-tab {
display: flex;
box-sizing: border-box;
width: calc(100vw - 32rpx);
height: 86rpx;
line-height: 86rpx;
background-color: #FFFFFF;
......@@ -12,7 +11,10 @@
border-top-right-radius: 32rpx;
.title {
font-weight: 600;
font-size: 30rpx;
width: 196rpx;
padding-left: 8rpx;
flex-shrink: 0;
}
......@@ -30,6 +32,7 @@
justify-content: center;
align-items: center;
margin-right: 20rpx;
color: #5a6066;
}
.icon {
......
<!--pages/tab/output/components/sortTab/sortTab.wxml-->
<view class="sort-tab">
<ciew class="title">{{title}}</ciew>
<view class="title">{{title}}</view>
<scroll-view class="sort-scroll" scroll-x="true">
<view class="flex">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="item" bindtap="handleSort" data-idx="{{index}}">
......
......@@ -4,167 +4,180 @@ import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData'
import { getMockData } from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 0,
agree: true,
tabIndx: 0,
// tabList: ['我的客户', '我的门店', '我的员工'],
tabList: ['我的客户', '我的员工'],
popupShow: false,
subIndex: -1,
merchantList: [
{
merchantId: 0,
merchantName: 'string',
show: true
},
{
merchantId: 1,
merchantName: 'test',
show: true
}
],
isShowService: false,
},
// 切换园区
tapPicker() {
let { isSuper } = this.data
isSuper &&
this.setData({
moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow
})
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight
})
// console.log(e)
},
changeTabIndx(e) {
this.setData({
tabIndx: e.detail
})
},
init() {
this.setUserInfo()
this.getMerchantRange()
// this.getMockInfo()
},
setUserInfo() {
let { userInfo } = wx.$storage.get()
// console.log(userInfo)
this.setData({
userInfo,
isSuper: userInfo.isSuper
})
},
async getMockInfo() {
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(this.data.userInfo.merchantId + '')
})
},
getMerchantRange(e) {
// 重新刷新
// let { detail } = e || null
// console.log(detail)
if (e) {
this.setUserInfo()
let clientModule = this.selectComponent('#client')
// let merchantModule = this.selectComponent('#merchant')
clientModule.getClientApi && clientModule.clientRefresh()
clientModule.getBusinessData && clientModule.getBusinessData()
// merchantModule.init && merchantModule.init()
}
let { isSuper, userInfo } = this.data
// 判断是超管才需要切换账号
if (isSuper) {
USERAPI.adminSelectLogin()
.then(result => {
// console.log(result)
let { merchantList: merchantRange } = result
// console.log(merchantRange)
let subIndex = -1
merchantRange.forEach((item, index) => {
item.show = true
if (item.merchantId == userInfo.subLoginUser.merchantId) {
subIndex = index
item.act = true
/**
* 页面的初始数据
*/
data: {
IMG_URL,
isShow: true,
navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 0,
agree: true,
tabIndx: 0,
// tabList: ['我的客户', '我的门店', '我的员工'],
tabList: ['我的客户', '我的员工'],
popupShow: false,
subIndex: -1,
merchantList: [
{
merchantId: 0,
merchantName: 'string',
show: true
},
{
merchantId: 1,
merchantName: 'test',
show: true
}
})
this.setData({
merchantRange,
subIndex
})
],
isShowService: false,
},
// 切换园区
tapPicker() {
let { isSuper } = this.data
isSuper &&
this.setData({
moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow
})
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight
})
// console.log(e)
},
changeTabIndx(e) {
this.setData({
tabIndx: e.detail
})
},
init() {
this.setUserInfo()
this.getMerchantRange()
// this.getMockInfo()
},
setUserInfo() {
let { userInfo } = wx.$storage.get()
// console.log(userInfo)
this.setData({
userInfo,
isSuper: userInfo.isSuper
})
.catch(err => { })
} else {
let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }]
this.setData({
merchantRange,
subIndex: 0
})
}
},
},
async getMockInfo() {
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(this.data.userInfo.merchantId + '')
})
},
getMerchantRange(e) {
// 重新刷新
// let { detail } = e || null
// console.log(detail)
if (e) {
this.setUserInfo()
let clientModule = this.selectComponent('#client')
// let merchantModule = this.selectComponent('#merchant')
clientModule.getClientApi && clientModule.clientRefresh()
clientModule.getBusinessData && clientModule.getBusinessData()
// merchantModule.init && merchantModule.init()
}
let { isSuper, userInfo } = this.data
// 判断是超管才需要切换账号
if (isSuper) {
USERAPI.adminSelectLogin()
.then(result => {
// console.log(result)
let { merchantList: merchantRange } = result
// console.log(merchantRange)
let subIndex = -1
merchantRange.forEach((item, index) => {
item.show = true
if (item.merchantId == userInfo.subLoginUser.merchantId) {
subIndex = index
item.act = true
}
})
this.setData({
merchantRange,
subIndex
})
})
.catch(err => { })
} else {
let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }]
this.setData({
merchantRange,
subIndex: 0
})
}
},
onRoute(options) {
if (!options || wx.$util.isEmptyObj(options)) return
let { page = 'client', refresh = true } = options
if (page == 'client' && refresh) {
let clientModule = this.selectComponent('#client')
clientModule.getClientApi && clientModule.clientRefresh()
clientModule.getBusinessData && clientModule.getBusinessData()
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const {merchantId,type,merchantName} = options
if (merchantId) {
wx.navigateTo({
url: `/packagesList/outDetail/index?merchantId=${merchantId}&type=${type}&merchantName=${merchantName}`,
})
this.setData({ isShow: false }, () => {
setTimeout(() => {
this.setData({ isShow: true })
}, 1000)
})
onRoute(options) {
if (!options || wx.$util.isEmptyObj(options)) return
let { page = 'client', refresh = true } = options
if (page == 'client' && refresh) {
let clientModule = this.selectComponent('#client')
clientModule.getClientApi && clientModule.clientRefresh()
clientModule.getBusinessData && clientModule.getBusinessData()
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.init()
},
}
this.init()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px'))
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px'))
},
/**
* 生命周期函数--监听页面显示
*/
onShow() { },
/**
* 生命周期函数--监听页面显示
*/
onShow() { },
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
/**
* 用户点击右上角分享
*/
onShareAppMessage() { }
/**
* 用户点击右上角分享
*/
onShareAppMessage() { }
})
This diff is collapsed. Click to expand it.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!