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 ...@@ -2,8 +2,9 @@ project.config.json
project.private.config.json project.private.config.json
sitemap.json sitemap.json
miniprogram_npm miniprogram_npm
/miniprogram_npm
node_modules node_modules
/node_modules
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
......
## 正式版appid wx2c28337db96364d2 ## 正式版appid wx2c28337db96364d2
## 体验版appid wxc50d04ae5aa9984a ## 体验版appid wxc50d04ae5aa9984a
## bobodmd a123456(测试)
## mingcl4sa a123456(开发)
## mdcsx01 a123456(生产)
## JXJTMDD1 glsx8888(生产)
#### computed和watch方法使用 #### computed和watch方法使用
......
...@@ -20,14 +20,14 @@ page { ...@@ -20,14 +20,14 @@ page {
color: #282829; color: #282829;
font-size: 28rpx; font-size: 28rpx;
--themeColor: #F13C3D; --themeColor: #F13C3D;
--btnColor: linear-gradient(-84deg, #556AF5 0%, #7197FF 100%); /* --btnColor: linear-gradient(-84deg, #556AF5 0%, #7197FF 100%); */
--btnColor: #3666fe;
--borderRadius: 8rpx; --borderRadius: 8rpx;
--margin: 32rpx; --margin: 32rpx;
/* vant 样式覆盖 */ /* vant 样式覆盖 */
--tabs-bottom-bar-color:#3666FE; --tabs-bottom-bar-color:#3666FE;
--sidebar-selected-border-color:#3666FE; --sidebar-selected-border-color:#3666FE;
--tree-select-nav-background-color:#f6f6f6; --tree-select-nav-background-color:#f6f6f6;
} }
image { 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 @@ ...@@ -6,7 +6,8 @@
<view class="subtitle"> <view class="subtitle">
欢迎登录门店助手 欢迎登录门店助手
</view> </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> </view>
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
letter-spacing: 2rpx; letter-spacing: 2rpx;
padding-left: 28rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -37,7 +36,7 @@ ...@@ -37,7 +36,7 @@
} }
.tips .choose-box { .tips .choose-box {
width: 80rpx; width: 64rpx;
height: 80rpx; height: 64rpx;
position: relative; position: relative;
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,9 +8,11 @@ ...@@ -8,9 +8,11 @@
&::before { &::before {
content: ''; content: '';
width: 100%; width: 100%;
height: 864rpx; // height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-top.webp') no-repeat; height: 264rpx;
background-size: 100% 864rpx; // 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; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
...@@ -19,9 +21,10 @@ ...@@ -19,9 +21,10 @@
&::after { &::after {
content: ''; content: '';
width: 100%; width: 100%;
height: 864rpx; // height: 864rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/bg-bottom.webp') no-repeat; height: 472rpx;
background-size: 100% 864rpx; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/bg-bottom.webp') no-repeat;
background-size: 100% 472rpx;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
......
import { import {
setSessionId, setSessionId,
setUserInfo, setUserInfo,
setSubMerchant setSubMerchant
} from '~/utils/cache/storageApi' } from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index' import USERAPI from '~/api/usersApi/index'
import outputApi from '~/api/outputApi/index'
import { IMG_URL } from '~/utils/constantData'
const setRouteData = targetPath => { const setRouteData = targetPath => {
let [url, query] = targetPath.split('?'), let [url, query] = targetPath.split('?'),
obj = {} obj = {}
if (query) { if (query) {
var list = query.split('&') || [] var list = query.split('&') || []
list.forEach(item => { list.forEach(item => {
const [key, val] = item.split('=') const [key, val] = item.split('=')
obj[key] = val obj[key] = val
}) })
} }
return { return {
url, url,
obj obj
} }
} }
/**选择账号登录 */ /**选择账号登录 */
const selectAccountLogin = ({ const selectAccountLogin = ({
id,
sessionId
}) => {
USERAPI.selectAccountLogin({
id, id,
sessionId sessionId
}).then(({ }) => {
code, USERAPI.selectAccountLogin({
data, id,
message sessionId
}) => { }).then(({
if (code == '0') { code,
setLoginInfo(data.loginUserInfoList[0], data.sessionId) data,
} else wx.$api.showToast(message || '系统异常') message
}) }) => {
if (code == '0') {
setLoginInfo(data.loginUserInfoList[0], data.sessionId)
} else wx.$api.showToast(message || '系统异常')
})
} }
/**获取门店号下的全部门店 */ /**获取门店号下的全部门店 */
const findSubordinateListByPage = (userInfo)=> { const findSubordinateListByPage = (userInfo) => {
return new Promise(resolve=>{ return new Promise(resolve => {
USERAPI.findSubordinateListByPage({pageSize:10000,pageNum:1,merchantId:userInfo.merchantId,apiProjectName:'rop-merchants'}).then(res=>{ USERAPI.findSubordinateListByPage({ pageSize: 10000, pageNum: 1, merchantId: userInfo.merchantId, apiProjectName: 'rop-merchants' }).then(res => {
const list = res.data||[] const list = res.data || []
const merchant = list.map(i=>i.merchantNo) const merchant = list.map(i => i.merchantNo)
resolve(merchant) resolve(merchant)
}) })
}) })
} }
/**查找二级流量方商户 */ /**查找二级流量方商户 */
const secondFlow = (userInfo)=> { const secondFlow = (userInfo) => {
return new Promise(resolve=>{ return new Promise(resolve => {
USERAPI.secondFlow({merchantId:userInfo.merchantId}).then(res=>{ USERAPI.secondFlow({ merchantId: userInfo.merchantId }).then(res => {
const list = res||{} const list = res || {}
const merchant = list.merchantNoList||[] const merchant = list.merchantNoList || []
resolve(merchant) resolve(merchant)
}) })
}) })
} }
/**设置登录信息 */ /**设置登录信息 */
const setLoginInfo = async (userInfo, sessionId) => { const setLoginInfo = async (userInfo, sessionId) => {
if (!userInfo) { if (!userInfo) {
wx.$api.showToast('请使用商户账号登陆') wx.$api.showToast('请使用商户账号登陆')
return return
} }
setUserInfo(userInfo) setUserInfo(userInfo)
setSessionId(sessionId) setSessionId(sessionId)
try { try {
const merchant = await Promise.all([findSubordinateListByPage(userInfo),secondFlow(userInfo)]) const merchant = await Promise.all([findSubordinateListByPage(userInfo), secondFlow(userInfo)])
setSubMerchant(merchant.flat()) setSubMerchant(merchant.flat())
} catch (error) { } catch (error) {
} }
loginSuccess() loginSuccess()
} }
const initServiceCenter = () => { const initServiceCenter = () => {
USERAPI.initServiceCenter({}) USERAPI.initServiceCenter({})
} }
/**成功跳转 */ /**成功跳转 */
const loginSuccess = () => { const loginSuccess = () => {
const { let { subMerchant } = wx.$storage.get()
options: { let params = {
targetPath merchantIds: subMerchant,
} }
} = wx.$router.getPageInstance() outputApi.getBusiStatistics(params).then(res => {
if (targetPath) { // 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
const { let _openList = [{
url, code: 'SC002',
obj name: 'boutiqueUpgrade',
} = setRouteData(targetPath) type: 1,
wx.$router.reLaunch(url, obj) }, {
} else wx.reLaunch({url:"/pages/tab/output/output"}) 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 ({ const loginModal = async ({
message, message,
confirmText, confirmText,
cancelText cancelText
}) => { }) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showModal({ wx.showModal({
content: message || '网络异常', content: message || '网络异常',
confirmText: confirmText || '重试', confirmText: confirmText || '重试',
cancelText: cancelText || '取消', cancelText: cancelText || '取消',
confirmColor: '#3666FE', confirmColor: '#3666FE',
success(res) { success(res) {
if (res.confirm) resolve(res.confirm) if (res.confirm) resolve(res.confirm)
if (res.cancel) reject(false) if (res.cancel) reject(false)
} }
})
}) })
})
} }
/**手机号&微信登录:是否跳转登录列表页 */ /**手机号&微信登录:是否跳转登录列表页 */
const checkLoginUserInfo = ({ const checkLoginUserInfo = ({
loginUserInfoList, loginUserInfoList,
sessionId sessionId
}) => { }) => {
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
/**多个账号 */ /**多个账号 */
if (loginUserInfoList.length > 1) if (loginUserInfoList.length > 1)
wx.$router.go('login.accountItems', { wx.$router.go('login.accountItems', {
sessionId, sessionId,
...thisPage.options ...thisPage.options
}) })
/**只有一个账号 */ /**只有一个账号 */
else else
selectAccountLogin({ selectAccountLogin({
id: loginUserInfoList[0].uuid, id: loginUserInfoList[0].uuid,
sessionId sessionId
}) })
} }
module.exports = { module.exports = {
checkLoginUserInfo, checkLoginUserInfo,
selectAccountLogin, selectAccountLogin,
loginSuccess, loginSuccess,
setRouteData, setRouteData,
setLoginInfo, setLoginInfo,
loginModal, loginModal,
initServiceCenter initServiceCenter
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
bindgetuserinfo="onGetUserInfo" bindgetuserinfo="onGetUserInfo"
bindcontact="onContact" bindcontact="onContact"
bindgetphonenumber="onGetPhoneNumber" bindgetphonenumber="onGetPhoneNumber"
bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
binderror="onError" binderror="onError"
bindlaunchapp="onLaunchApp" bindlaunchapp="onLaunchApp"
bindopensetting="onOpenSetting" bindopensetting="onOpenSetting"
......
...@@ -56,6 +56,7 @@ var getTime = function (date) { ...@@ -56,6 +56,7 @@ var getTime = function (date) {
}, },
defaultDate: { defaultDate: {
type: null, type: null,
value: (0, utils_1.getToday)().getTime(),
observer: function (val) { observer: function (val) {
this.setData({ currentDate: val }); this.setData({ currentDate: val });
this.scrollIntoView(); this.scrollIntoView();
...@@ -185,13 +186,16 @@ var getTime = function (date) { ...@@ -185,13 +186,16 @@ var getTime = function (date) {
var _this = this; var _this = this;
if (defaultDate === void 0) { defaultDate = null; } if (defaultDate === void 0) { defaultDate = null; }
var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, allowSameDay = _a.allowSameDay; 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(); var now = (0, utils_1.getToday)().getTime();
if (type === 'range') { if (type === 'range') {
if (!Array.isArray(defaultDate)) { if (!Array.isArray(defaultDate)) {
defaultDate = []; defaultDate = [];
} }
var _b = defaultDate || [], startDay = _b[0], endDay = _b[1]; 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 date = getTime(endDay || now);
var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime()); var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime());
return [start, end]; return [start, end];
...@@ -211,6 +215,8 @@ var getTime = function (date) { ...@@ -211,6 +215,8 @@ var getTime = function (date) {
var _this = this; var _this = this;
(0, utils_2.requestAnimationFrame)(function () { (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; 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 // @ts-ignore
var targetDate = type === 'single' ? currentDate : currentDate[0]; var targetDate = type === 'single' ? currentDate : currentDate[0];
var displayed = show || !poppable; 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 \ 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 \ No newline at end of file
...@@ -98,6 +98,8 @@ var STEP = 1; ...@@ -98,6 +98,8 @@ var STEP = 1;
var _a = this.data, color = _a.color, size = _a.size; var _a = this.data, color = _a.color, size = _a.size;
if ((0, validator_1.isObj)(color)) { if ((0, validator_1.isObj)(color)) {
return this.getContext().then(function (context) { return this.getContext().then(function (context) {
if (!context)
return;
var LinearColor = context.createLinearGradient(size, 0, 0, 0); var LinearColor = context.createLinearGradient(size, 0, 0, 0);
Object.keys(color) Object.keys(color)
.sort(function (a, b) { return parseFloat(a) - parseFloat(b); }) .sort(function (a, b) { return parseFloat(a) - parseFloat(b); })
...@@ -142,6 +144,8 @@ var STEP = 1; ...@@ -142,6 +144,8 @@ var STEP = 1;
var _this = this; var _this = this;
var size = this.data.size; var size = this.data.size;
this.getContext().then(function (context) { this.getContext().then(function (context) {
if (!context)
return;
context.clearRect(0, 0, size, size); context.clearRect(0, 0, size, size);
_this.renderLayerCircle(context); _this.renderLayerCircle(context);
var formatValue = format(currentValue); var formatValue = format(currentValue);
......
...@@ -14,4 +14,7 @@ export declare function getRect(context: WechatMiniprogram.Component.TrivialInst ...@@ -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 getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void; export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;
export declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>; 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 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"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); 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 validator_1 = require("./validator");
var version_1 = require("./version"); var version_1 = require("./version");
var validator_2 = require("./validator"); var validator_2 = require("./validator");
...@@ -90,8 +90,18 @@ function toPromise(promiseLike) { ...@@ -90,8 +90,18 @@ function toPromise(promiseLike) {
return Promise.resolve(promiseLike); return Promise.resolve(promiseLike);
} }
exports.toPromise = toPromise; 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() { function getCurrentPage() {
var pages = getCurrentPages(); var pages = getCurrentPages();
return pages[pages.length - 1]; return pages[pages.length - 1];
} }
exports.getCurrentPage = getCurrentPage; exports.getCurrentPage = getCurrentPage;
exports.isPC = ['mac', 'windows'].includes((0, version_1.getSystemInfoSync)().platform);
...@@ -6,6 +6,7 @@ var color_1 = require("../common/color"); ...@@ -6,6 +6,7 @@ var color_1 = require("../common/color");
var utils_1 = require("../common/utils"); var utils_1 = require("../common/utils");
(0, component_1.VantComponent)({ (0, component_1.VantComponent)({
mixins: [button_1.button], mixins: [button_1.button],
classes: ['cancle-button-class', 'confirm-button-class'],
props: { props: {
show: { show: {
type: Boolean, type: Boolean,
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
size="large" size="large"
loading="{{ loading.cancel }}" loading="{{ loading.cancel }}"
class="van-dialog__button van-hairline--right" class="van-dialog__button van-hairline--right"
custom-class="van-dialog__cancel" custom-class="van-dialog__cancel cancle-button-class"
custom-style="color: {{ cancelButtonColor }}" custom-style="color: {{ cancelButtonColor }}"
bind:click="onCancel" bind:click="onCancel"
> >
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
size="large" size="large"
class="van-dialog__button" class="van-dialog__button"
loading="{{ loading.confirm }}" loading="{{ loading.confirm }}"
custom-class="van-dialog__confirm" custom-class="van-dialog__confirm confirm-button-class"
custom-style="color: {{ confirmButtonColor }}" custom-style="color: {{ confirmButtonColor }}"
open-type="{{ confirmButtonOpenType }}" open-type="{{ confirmButtonOpenType }}"
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
size="large" size="large"
loading="{{ loading.cancel }}" loading="{{ loading.cancel }}"
class="van-dialog__button van-hairline--right" class="van-dialog__button van-hairline--right"
custom-class="van-dialog__cancel" custom-class="van-dialog__cancel cancle-button-class"
custom-style="color: {{ cancelButtonColor }}" custom-style="color: {{ cancelButtonColor }}"
bind:click="onCancel" bind:click="onCancel"
> >
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
size="large" size="large"
class="van-dialog__button" class="van-dialog__button"
loading="{{ loading.confirm }}" loading="{{ loading.confirm }}"
custom-class="van-dialog__confirm" custom-class="van-dialog__confirm confirm-button-class"
custom-style="color: {{ confirmButtonColor }}" custom-style="color: {{ confirmButtonColor }}"
open-type="{{ confirmButtonOpenType }}" open-type="{{ confirmButtonOpenType }}"
......
...@@ -49,11 +49,19 @@ var props_1 = require("./props"); ...@@ -49,11 +49,19 @@ var props_1 = require("./props");
this.setData({ innerValue: this.value }); this.setData({ innerValue: this.value });
}, },
methods: { 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) { onInput: function (event) {
var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a; var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;
this.value = value; var formatValue = this.formatValue(value);
this.value = formatValue;
this.setShowClear(); this.setShowClear();
this.emitChange(event.detail); return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));
}, },
onFocus: function (event) { onFocus: function (event) {
this.focused = true; this.focused = true;
...@@ -102,14 +110,16 @@ var props_1 = require("./props"); ...@@ -102,14 +110,16 @@ var props_1 = require("./props");
this.$emit('keyboardheightchange', event.detail); this.$emit('keyboardheightchange', event.detail);
}, },
emitChange: function (detail) { emitChange: function (detail) {
var _this = this;
var extraEventParams = this.data.extraEventParams; var extraEventParams = this.data.extraEventParams;
this.setData({ value: detail.value }); this.setData({ value: detail.value });
(0, utils_1.nextTick)(function () { var result;
var data = extraEventParams ? detail : detail.value; var data = extraEventParams
_this.$emit('input', data); ? __assign(__assign({}, detail), { callback: function (data) {
_this.$emit('change', data); result = data;
}); } }) : detail.value;
this.$emit('input', data);
this.$emit('change', data);
return result;
}, },
setShowClear: function () { setShowClear: function () {
var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger; var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
title-style="margin-right: 12px;" title-style="margin-right: 12px;"
custom-style="{{ customStyle }}" custom-style="{{ customStyle }}"
arrow-direction="{{ arrowDirection }}" arrow-direction="{{ arrowDirection }}"
custom-class="van-field" custom-class="custom-class van-field"
> >
<slot name="left-icon" slot="icon" /> <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 }} {{ label }}
</view> </label>
<slot wx:else name="label" slot="title" /> <slot wx:else name="label" slot="title" />
<view class="{{ utils.bem('field__body', [type]) }}"> <view class="{{ utils.bem('field__body', [type]) }}">
<view class="{{ utils.bem('field__control', [inputAlign, 'custom']) }}" bindtap="onClickInput"> <view class="{{ utils.bem('field__control', [inputAlign, 'custom']) }}" bindtap="onClickInput">
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
<slot name="button" /> <slot name="button" />
</view> </view>
</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 class="{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}
</view> </label>
<view wx:if="{{ errorMessage }}" class="{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}"> <label for="{{ name }}" wx:if="{{ errorMessage }}" class="{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}">
{{ errorMessage }} {{ errorMessage }}
</view> </label>
</van-cell> </van-cell>
<input <input
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class" class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
type="{{ type }}" type="{{ type }}"
focus="{{ focus }}" focus="{{ focus }}"
......
<textarea <textarea
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class" class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class"
fixed="{{ fixed }}" fixed="{{ fixed }}"
focus="{{ focus }}" focus="{{ focus }}"
......
...@@ -10,6 +10,10 @@ var link_1 = require("../mixins/link"); ...@@ -10,6 +10,10 @@ var link_1 = require("../mixins/link");
props: { props: {
text: String, text: String,
color: String, color: String,
size: {
type: String,
value: 'normal',
},
loading: Boolean, loading: Boolean,
disabled: Boolean, disabled: Boolean,
plain: Boolean, plain: Boolean,
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
id="{{ id }}" id="{{ id }}"
lang="{{ lang }}" lang="{{ lang }}"
type="{{ type }}" type="{{ type }}"
size="{{ size }}"
color="{{ color }}" color="{{ color }}"
plain="{{ plain }}" plain="{{ plain }}"
loading="{{ loading }}" loading="{{ loading }}"
disabled="{{ disabled }}" disabled="{{ disabled }}"
open-type="{{ openType }}" open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}" 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 }}" business-id="{{ businessId }}"
session-from="{{ sessionFrom }}" session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}" app-parameter="{{ appParameter }}"
......
...@@ -4,13 +4,14 @@ var component_1 = require("../common/component"); ...@@ -4,13 +4,14 @@ var component_1 = require("../common/component");
var button_1 = require("../mixins/button"); var button_1 = require("../mixins/button");
var link_1 = require("../mixins/link"); var link_1 = require("../mixins/link");
(0, component_1.VantComponent)({ (0, component_1.VantComponent)({
classes: ['icon-class', 'text-class'], classes: ['icon-class', 'text-class', 'info-class'],
mixins: [link_1.link, button_1.button], mixins: [link_1.link, button_1.button],
props: { props: {
text: String, text: String,
dot: Boolean, dot: Boolean,
info: String, info: String,
icon: String, icon: String,
size: String,
color: String, color: String,
classPrefix: { classPrefix: {
type: String, type: String,
......
...@@ -27,10 +27,12 @@ ...@@ -27,10 +27,12 @@
name="{{ icon }}" name="{{ icon }}"
dot="{{ dot }}" dot="{{ dot }}"
info="{{ info }}" info="{{ info }}"
size="{{ size }}"
color="{{ color }}" color="{{ color }}"
class-prefix="{{ classPrefix }}" class-prefix="{{ classPrefix }}"
class="van-goods-action-icon__icon" class="van-goods-action-icon__icon"
custom-class="icon-class" custom-class="icon-class"
info-class="info-class"
/> />
<slot wx:else name="icon" /> <slot wx:else name="icon" />
<text class="text-class">{{ text }}</text> <text class="text-class">{{ text }}</text>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component"); var component_1 = require("../common/component");
(0, component_1.VantComponent)({ (0, component_1.VantComponent)({
classes: ['info-class'],
props: { props: {
dot: Boolean, dot: Boolean,
info: null, info: null,
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
wx:if="{{ info !== null || dot }}" wx:if="{{ info !== null || dot }}"
dot="{{ dot }}" dot="{{ dot }}"
info="{{ info }}" info="{{ info }}"
custom-class="van-icon__info" custom-class="van-icon__info info-class"
/> />
<image <image
wx:if="{{ computed.isImage(name) }}" wx:if="{{ computed.isImage(name) }}"
......
...@@ -9,12 +9,12 @@ function isImage(name) { ...@@ -9,12 +9,12 @@ function isImage(name) {
function rootClass(data) { function rootClass(data) {
var classes = ['custom-class']; var classes = ['custom-class'];
if (data.classPrefix != null) { if (data.classPrefix !== 'van-icon') {
classes.push(data.classPrefix); classes.push('van-icon--custom')
} }
if (data.classPrefix !== 'van-icon') { if (data.classPrefix != null) {
classes.push('van-icon') classes.push(data.classPrefix);
} }
if (isImage(data.name)) { if (isImage(data.name)) {
......
...@@ -31,6 +31,9 @@ exports.button = Behavior({ ...@@ -31,6 +31,9 @@ exports.button = Behavior({
onGetPhoneNumber: function (event) { onGetPhoneNumber: function (event) {
this.triggerEvent('getphonenumber', event.detail); this.triggerEvent('getphonenumber', event.detail);
}, },
onGetRealTimePhoneNumber: function (event) {
this.triggerEvent('getrealtimephonenumber', event.detail);
},
onError: function (event) { onError: function (event) {
this.triggerEvent('error', event.detail); this.triggerEvent('error', event.detail);
}, },
......
...@@ -195,8 +195,12 @@ var DRAG_STATUS = { ...@@ -195,8 +195,12 @@ var DRAG_STATUS = {
return '0%'; return '0%';
}, },
format: function (value) { format: function (value) {
var _a = this.data, max = _a.max, min = _a.min, step = _a.step; var min = +this.data.min;
return Math.round(Math.max(min, Math.min(value, max)) / step) * step; 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) { ...@@ -102,9 +102,9 @@ function equal(value1, value2) {
isDisabled: function (type) { 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; 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') { 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) { onFocus: function (event) {
this.$emit('focus', event.detail); 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 \ 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 \ No newline at end of file
...@@ -61,10 +61,8 @@ var ROOT_ELEMENT = '.van-sticky'; ...@@ -61,10 +61,8 @@ var ROOT_ELEMENT = '.van-sticky';
} }
this.scrollTop = scrollTop || this.scrollTop; this.scrollTop = scrollTop || this.scrollTop;
if (typeof container === 'function') { if (typeof container === 'function') {
Promise.all([ Promise.all([(0, utils_1.getRect)(this, ROOT_ELEMENT), this.getContainerRect()])
(0, utils_1.getRect)(this, ROOT_ELEMENT), .then(function (_a) {
this.getContainerRect(),
]).then(function (_a) {
var root = _a[0], container = _a[1]; var root = _a[0], container = _a[1];
if (offsetTop + root.height > container.height + container.top) { if (offsetTop + root.height > container.height + container.top) {
_this.setDataAfterDiff({ _this.setDataAfterDiff({
...@@ -82,7 +80,8 @@ var ROOT_ELEMENT = '.van-sticky'; ...@@ -82,7 +80,8 @@ var ROOT_ELEMENT = '.van-sticky';
else { else {
_this.setDataAfterDiff({ fixed: false, transform: 0 }); _this.setDataAfterDiff({ fixed: false, transform: 0 });
} }
}); })
.catch(function () { });
return; return;
} }
(0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) { (0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) {
...@@ -118,6 +117,9 @@ var ROOT_ELEMENT = '.van-sticky'; ...@@ -118,6 +117,9 @@ var ROOT_ELEMENT = '.van-sticky';
}, },
getContainerRect: function () { getContainerRect: function () {
var nodesRef = this.data.container(); 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(); }); return new Promise(function (resolve) { return nodesRef.boundingClientRect(resolve).exec(); });
}, },
}, },
......
...@@ -179,6 +179,9 @@ var relation_1 = require("../common/relation"); ...@@ -179,6 +179,9 @@ var relation_1 = require("../common/relation");
}); });
}); });
if (currentIndex === data.currentIndex) { if (currentIndex === data.currentIndex) {
if (!data.inited) {
this.resize();
}
return; return;
} }
var shouldEmitChange = data.currentIndex !== null; var shouldEmitChange = data.currentIndex !== null;
......
<wxs src="../wxs/utils.wxs" module="utils" /> <wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" /> <wxs src="./index.wxs" module="computed" />
<view class="custom-class {{ utils.bem('tabs', [type]) }}"> <view class="custom-class {{ utils.bem('tabs') }}">
<van-sticky <van-sticky
disabled="{{ !sticky }}" disabled="{{ !sticky }}"
z-index="{{ zIndex }}" z-index="{{ zIndex }}"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
container="{{ container }}" container="{{ container }}"
bind:scroll="onTouchScroll" 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" /> <slot name="nav-left" />
<scroll-view <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 \ 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 \ No newline at end of file
...@@ -47,6 +47,9 @@ var validator_1 = require("../common/validator"); ...@@ -47,6 +47,9 @@ var validator_1 = require("../common/validator");
}, previewFullImage: { }, previewFullImage: {
type: Boolean, type: Boolean,
value: true, value: true,
}, videoFit: {
type: String,
value: 'contain',
}, imageFit: { }, imageFit: {
type: String, type: String,
value: 'scaleToFill', value: 'scaleToFill',
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
title="{{ item.name || ('视频' + index) }}" title="{{ item.name || ('视频' + index) }}"
poster="{{ item.thumb }}" poster="{{ item.thumb }}"
autoplay="{{ item.autoplay }}" autoplay="{{ item.autoplay }}"
object-fit="{{videoFit}}"
class="van-uploader__preview-image" class="van-uploader__preview-image"
style="{{ computed.sizeStyle({ previewSize }) }}" style="{{ computed.sizeStyle({ previewSize }) }}"
data-index="{{ index }}" data-index="{{ index }}"
......
...@@ -41,7 +41,7 @@ function isVideoFile(item) { ...@@ -41,7 +41,7 @@ function isVideoFile(item) {
} }
exports.isVideoFile = isVideoFile; exports.isVideoFile = isVideoFile;
function formatImage(res) { 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) { function formatVideo(res) {
return [ return [
...@@ -59,13 +59,27 @@ function chooseFile(_a) { ...@@ -59,13 +59,27 @@ function chooseFile(_a) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
switch (accept) { switch (accept) {
case 'image': case 'image':
wx.chooseImage({ if (utils_1.isPC) {
count: multiple ? Math.min(maxCount, 9) : 1, wx.chooseImage({
sourceType: capture, count: multiple ? Math.min(maxCount, 9) : 1,
sizeType: sizeType, sourceType: capture,
success: function (res) { return resolve(formatImage(res)); }, sizeType: sizeType,
fail: reject, 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; break;
case 'media': case 'media':
wx.chooseMedia({ wx.chooseMedia({
......
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */ /* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title { .title {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #1B233D; color: #1B233D;
line-height: 48rpx; line-height: 48rpx;
} }
.funnel-box { .funnel-box {
padding: 40rpx 0; padding: 32rpx 0;
position: relative; position: relative;
.funnel-bg { .funnel-bg {
position: absolute; position: absolute;
top: 40rpx; top: 40rpx;
left: 50%; left: 50%;
transform: translate(-50%); transform: translate(-50%);
width: 458.18rpx; // width: 458.18rpx;
height: 298rpx; // height: 298rpx;
width: 686rpx;
height: 408rpx;
image { image {
width: 458.18rpx; width: 686rpx;
height: 298rpx; height: 408rpx;
} // width: 458.18rpx;
// height: 298rpx;
} }
}
.funnel-content { .funnel-content {
display: flex; display: flex;
justify-content: center; justify-content: center;
height: 248rpx; height: 408rpx;
width: 100%; width: 100%;
padding-top: 40rpx; padding-top: 40rpx;
.left, .left,
.right { .right {
display: flex; display: flex;
} }
.left { .left {
flex: 0 0 406rpx; flex: 0 0 406rpx;
flex-flow: column; flex-flow: column;
justify-content: space-around; justify-content: space-around;
align-items: flex-end; align-items: flex-end;
// align-items: center; // align-items: center;
z-index: 1; z-index: 1;
font-size: 22rpx; font-size: 22rpx;
color: #2D2D33; color: #2D2D33;
box-sizing: border-box; box-sizing: border-box;
padding-right: 20rpx; padding-right: 20rpx;
view { view {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 28rpx; margin-right: 28rpx;
text { text {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
margin-left: 4rpx; margin-left: 4rpx;
}
}
} }
}
}
.right { .right {
flex: 1; flex: 1;
flex-flow: column; flex-flow: column;
align-items: flex-start; align-items: flex-start;
margin-left: 130rpx; margin-left: 130rpx;
color: #4466F0; color: #4466F0;
padding-top: 20rpx; padding-top: 20rpx;
font-size: 24rpx; font-size: 24rpx;
position: relative; position: relative;
.sort-box:last-child { .sort-box:last-child {
position: absolute; position: absolute;
left: -46rpx; left: -46rpx;
top: 50%; top: 50%;
} }
.sort { .sort {
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
margin-top: 4rpx; margin-top: 4rpx;
} }
}
} }
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -233,6 +233,7 @@ Component({ ...@@ -233,6 +233,7 @@ Component({
} }
return result return result
}) })
console.log(sfaffList,'sfaffList')
this.setData({ this.setData({
sfaff: sfaffList sfaff: sfaffList
}) })
......
.box { .box {
margin: 20rpx; margin: 20rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52; box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx; border-radius: 20rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
.box-title { .box-title {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #1B233D; color: #1B233D;
line-height: 48rpx; line-height: 48rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.select-up { .select-up {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
position: relative; position: relative;
text-align: center; text-align: center;
.staff-type { .staff-type {
width: 128rpx; width: 160rpx;
text { text {
display: inline-block; display: inline-block;
width: 100rpx; 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 { .staff-input {
width: 14rpx; // width: 638rpx;
height: 8rpx; // height: 64rpx;
vertical-align: middle; // 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 { .table {
display: flex; display: flex;
} }
.table_left_column { .table_left_column {
min-width: 150rpx; min-width: 190rpx;
height: auto; height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.left_col_item { .left_col_item {
width: 100%; height: 72rpx;
height: 63rpx; font-size: 20rpx;
font-size: 20rpx; display: flex;
display: flex; align-items: center;
align-items: center;
justify-content: center;
text-align: center;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D; 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) { &:nth-child(2n) {
background: #ffffff; 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 { .table_right_scroll_box {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
overflow-x: scroll; overflow-x: scroll;
} }
.flex_direction_column_item { .flex_direction_column_item {
min-width: 200rpx; min-width: 150rpx;
display: inline-block; display: inline-block;
/* border: 1px solid #000; */ /* border: 1px solid #000; */
} }
.item_name { .item_name {
min-width: 200rpx; min-width: 120rpx;
height: 63rpx; height: 72rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 20rpx; 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;
color: #1B233D; color: #1B233D;
} // background: #F9F9F9;
background: #F5F9FE;
white-space: normal;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:nth-child(2n) { &:first-child {
background: #ffffff; font-weight: 600;
} font-size: 24rpx;
color: #1B233D;
}
&:nth-child(2n) {
background: #ffffff;
}
} }
.empty { .empty {
margin: 20rpx auto 0; margin: 20rpx auto 0;
text-align: center; text-align: center;
.empty-icon { .empty-icon {
width: 400rpx; width: 400rpx;
height: 400rpx; height: 400rpx;
display: inline-block; display: inline-block;
} }
.empty-text { .empty-text {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #7A8299; color: #7A8299;
text-align: center; text-align: center;
margin: 32rpx 106rpx; margin: 32rpx 106rpx;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="select-up"> <view class="select-up">
<view catchtap="showUp" class="staff-type"> <view catchtap="showUp" class="staff-type">
<text>{{dataType[downType][selectValue-1].label}}</text> <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>
<view class="up-box" hidden="{{show}}"> <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"> <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 @@ ...@@ -16,25 +16,31 @@
</view> </view>
</view> </view>
<view class="staff-input"> <view class="staff-input">
<input placeholder="输入员工名称" value="{{empName}}" bind:blur="hanldBlur"/>
<icon class="icon-small" type="search" size="14"></icon> <icon class="icon-small" type="search" size="14"></icon>
<input placeholder="输入员工名称" placeholder-style="color:#cdcdd1" value="{{empName}}" bind:blur="hanldBlur"/>
</view> </view>
<blokc wx:if="{{sfaff[0].list.length}}"> <blokc wx:if="{{sfaff[0].list.length}}">
<view class='table'> <view class='table'>
<!-- 左侧固定 --> <!-- 左侧固定 -->
<view class='table_left_column'> <view class='table_left_column'>
<view class='left_col_item'>排名</view> <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>
<!-- 右侧表格滚动 --> <!-- 右侧表格滚动 -->
<view class="table_right_scroll_box"> <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 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'> <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> <text>
<block wx:if="{{item.name == '转化率'}}">{{litem?litem+'%': '--'}}</block> <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> <block wx:else>{{filter.thousand(litem)||'--'}}</block>
</text> </text>
</view> </view>
......
...@@ -4,4 +4,7 @@ function thousand(n) { ...@@ -4,4 +4,7 @@ function thousand(n) {
var p = (n+'').replace(r, ',') var p = (n+'').replace(r, ',')
return p return p
} }
module.exports = {thousand:thousand}
\ No newline at end of file \ 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 \ No newline at end of file
...@@ -19,7 +19,11 @@ ...@@ -19,7 +19,11 @@
.search-text+.search-text { .search-text+.search-text {
margin-left: 40rpx; margin-left: 40rpx;
} }
.search-unit {
margin-left: auto;
font-size: 24rpx;
color: #8A8C90;
}
.active { .active {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
......
<view class="bar-wrap"> <view class="bar-wrap">
<view class="searchList"> <view class="searchList">
<block wx:for="{{opts.barList}}" wx:for-item="item" wx:key="index"> <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-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view>
</view> </block>
<view class="search-unit">单位:{{(dataType == 3&&opts.barList.length == 3) || (opts.barList.length == 2&&dataType==1) ?'元':'张'}}</view>
</view>
<view class="container"> <view class="container">
<bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" /> <bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" />
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
.bar-wrap { .bar-wrap {
padding: 34rpx 30rpx 30rpx 40rpx; padding: 34rpx 30rpx 30rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
.searchList { .searchList {
display: flex; display: flex;
align-items: center; align-items: center;
.search-text { .search-text {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #A6A6A6; color: #A6A6A6;
line-height: 48rpx; line-height: 48rpx;
} }
.search-text+.search-text { .search-text+.search-text {
margin-left: 40rpx; margin-left: 40rpx;
} }
.active { .search-unit {
font-weight: 600; margin-left: auto;
font-size: 32rpx; font-size: 24rpx;
color: #1B233D; color: #8A8C90;
}
.active {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
}
} }
}
.searchTime { .searchTime {
margin-top: 24rpx; margin-top: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
z-index: 9999; z-index: 9999;
margin-bottom: 20rpx; margin-bottom: 20rpx;
position: relative; position: relative;
.time { .time {
padding: 5rpx 28rpx; padding: 6rpx 30rpx;
border: 2rpx solid #EBEBEB; // border: 2rpx solid #EBEBEB;
border-radius: 32rpx; // border-radius: 32rpx;
font-weight: 400; background: #FFFFFF;
font-size: 22rpx; border: 1rpx solid #C3C3C3;
color: #A6A6A6; border-radius: 6rpx;
} font-weight: 400;
font-size: 20rpx;
color: #5A6066;
// color: #A6A6A6;
}
.active { .active {
background: #4466f01a; // background: #4466f01a;
border-color: #fff; border-color: #fff;
color: #4466F0; // color: #4466F0;
} color: #fff;
background: #3582EE;
border: 1prx solid #3582EE;
}
.time+.time { .time+.time {
margin-left: 12rpx; margin-left: 8rpx;
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
.time-icon { .time-icon {
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
} }
.temporal { .temporal {
font-size: 22rpx; font-size: 22rpx;
color: #A6A6A6; color: #A6A6A6;
margin: 0 8rpx; margin: 0 8rpx;
} }
.arrows { .arrows {
width: 20rpx; width: 20rpx;
height: 12rpx; height: 12rpx;
} }
}
} }
}
.remind { .remind {
color: #D3D3D3; color: #D3D3D3;
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
margin-top: 10rpx; padding: 24rpx;
} }
.container { .container {
height: 370rpx; height: 370rpx;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<view class="searchList"> <view class="searchList">
<block wx:for="{{opts.lineList}}" wx:for-item="item" wx:key="index"> <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-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>
<view class="searchTime"> <view class="searchTime">
<block wx:for="{{dimension}}" wx:for-item="item" wx:key="index"> <block wx:for="{{dimension}}" wx:for-item="item" wx:key="index">
......
import ActivityApi from '~/api/activityApi/index' import ActivityApi from '~/api/activityApi/index'
let thisPage; let thisPage;
import { thousand } from '~/utils/format' import {
thousand
} from '~/utils/format'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -21,89 +23,112 @@ Component({ ...@@ -21,89 +23,112 @@ Component({
minDate: new Date(2020, 0, 1).getTime(), minDate: new Date(2020, 0, 1).getTime(),
maxDate: new Date().getTime(), maxDate: new Date().getTime(),
outputView: { outputView: {
outputValue: [{ outputValue: [
label: '总报价量', // {
name: 'totalQuotationCount' // label: '总报价量',
}, { // name: 'totalQuotationCount'
label: '总成交量', // },
name: 'totalSuccessCount', // {
unit: '' // label: '总成交量',
}, { // name: 'totalSuccessCount',
label: '总产值', // unit: ''
name: 'totalOutputValue', // },
_unit: '¥' // {
}, { // label: '总产值',
label: '当月报价量', // name: 'totalOutputValue',
// _unit: '¥'
// },
{
label: '当月报价(单)',
name: 'monthQuotationCount', name: 'monthQuotationCount',
_unit: '¥' _unit: '',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, { }, {
label: '当月成交量', label: '当月成交(单)',
name: 'monthSuccessCount', name: 'monthSuccessCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '当月产值', label: '当月产值(元)',
name: 'monthOutputValue', name: 'monthOutputValue',
_unit: '¥' _unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}, { }, {
label: '单价', label: '单价(元)',
name: 'avgPrice', name: 'avgPrice',
_unit: '¥' _unit: '¥',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, { }, {
label: '升级率', label: '升级率',
name: 'conversionRate', name: 'conversionRate',
unit_: '%', unit_: '%',
multiple: 100, multiple: 100,
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '平均车险报价', label: '平均报价',
name: 'avgQuotationPrice', name: 'avgQuotationPrice',
_unit: '¥' _unit: '¥',
iconUrl:'store-assistant-assemble/output/icon04.png'
}], }],
boutiqueOutputValue: [{ boutiqueOutputValue: [{
label: '发券量(总)/张', label: '总发券量(张)',
name: 'sendCouponCountTotal', name: 'sendCouponCountTotal',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}, { }, {
label: '升级订单/单', label: '升级订单(单)',
name: 'upgradeCountTotal', name: 'upgradeCountTotal',
unit: '' unit: '',
}, { iconUrl:'store-assistant-assemble/output/icon07.png'
label: '营业额(总)/元', },
name: 'orderMoneyTotal', // {
_unit: '¥' // label: '营业额(总)/元',
}, { // name: 'orderMoneyTotal',
label: '客单价/元', // _unit: '¥'
// },
{
label: '客单价(元)',
name: 'averagePrice', name: 'averagePrice',
_unit: '¥' _unit: '¥',
}, { iconUrl:'store-assistant-assemble/output/icon05.png'
label: '转化率', },
name: 'upgradeRatio', // {
unit_: '%' // label: '转化率',
}], // name: 'upgradeRatio',
// unit_: '%'
// }
],
todayOutiqueOutputValue: [{ todayOutiqueOutputValue: [{
label: '发券量/张', label: '发券量(张)',
name: 'sendCouponCountToday', name: 'sendCouponCountToday',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon01.png'
}, { }, {
label: '升级订单/单', label: '升级订单(单)',
name: 'upgradeCountToday', name: 'upgradeCountToday',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '营业额(总)/元', label: '营业额(元)',
name: 'orderMoneyTotalToday', name: 'orderMoneyTotalToday',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon05.png'
}], }],
todayOutputValue: [{ todayOutputValue: [{
label: '报价量', label: '单日报价(单)',
name: 'quotationCount', name: 'quotationCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}, { }, {
label: '成交量', label: '单日成交(单)',
name: 'successCount', name: 'successCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '产值', label: '单日产值(元)',
name: 'outputValue', name: 'outputValue',
unit: '' unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}], }],
}, },
calendarLoading: false, calendarLoading: false,
...@@ -159,45 +184,45 @@ Component({ ...@@ -159,45 +184,45 @@ Component({
opts opts
} = this.data } = this.data
const obj = { const obj = {
1: { 1: {
lineList: [{ lineList: [{
title: '营业额', title: '营业额',
type: 1 type: 1
}, { }, {
title: '到店量', title: '到店量',
type: 2 type: 2
}], }],
barList: [{ barList: [{
title: '发券量', title: '发券量',
type: 3 type: 3
}, { }, {
title: '营业额', title: '营业额',
type: 1 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, lineList = obj[type].lineList,
barList = obj[type].barList barList = obj[type].barList
const barObj = this.selectComponent('#bar') const barObj = this.selectComponent('#bar')
...@@ -227,7 +252,7 @@ Component({ ...@@ -227,7 +252,7 @@ Component({
console.log(type) console.log(type)
let apiName = 'merchantsOutput' let apiName = 'merchantsOutput'
let params = { let params = {
merchantIds: [thisPage.data.merchantId] merchantIds: [thisPage.data.merchantId]
} }
if ([1].includes(type)) { if ([1].includes(type)) {
apiName = 'boutiquecouponOutputValue' apiName = 'boutiquecouponOutputValue'
...@@ -241,7 +266,9 @@ Component({ ...@@ -241,7 +266,9 @@ Component({
// }) // })
} }
ActivityApi[apiName](params).then(res => { ActivityApi[apiName](params).then(res => {
thisPage.setData({ loading: false }) thisPage.setData({
loading: false
})
this.setData({ this.setData({
outputData: { outputData: {
...this.data.outputData, ...this.data.outputData,
...@@ -435,12 +462,12 @@ Component({ ...@@ -435,12 +462,12 @@ Component({
attached() { attached() {
if (this.control) return if (this.control) return
this.control = true this.control = true
setTimeout(()=>{ setTimeout(() => {
this.setData({ this.setData({
calendarLoading: true, calendarLoading: true,
}) })
},0) }, 0)
this.initLocal(this.data.entranceType) this.initLocal(this.data.entranceType)
} }
}, },
......
.output-box { .output-box {
padding: 24rpx; padding: 20rpx 24rpx 24rpx;
margin: 0rpx 16rpx; // margin: 0rpx 16rpx;
border-radius: 32rpx; margin-top: 16rpx;
background: #F4F8FE; background: #FFFFFF;
.output-title {
font-weight: 600; // border-radius: 32rpx;
font-size: 32rpx; // background: #F4F8FE;
color: #1B233D; .output-title {
line-height: 48rpx; font-weight: 600;
margin: 20rpx 0rpx; 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 { .output-value {
display: grid; display: flex;
grid-template-columns: repeat(3, 33.33%); justify-content: space-between;
row-gap: 24rpx; flex-wrap: wrap;
padding: 32rpx; // display: grid;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%); // grid-template-columns: repeat(3, 33.33%);
border-radius: 16rpx; // row-gap: 24rpx;
// padding: 32rpx;
&.today { // background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%); // border-radius: 16rpx;
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 { .output-label {
text-align: center; box-sizing: border-box;
display: flex;
.output-num { justify-content: space-between;
font-weight: 600; // align-items: center;
font-size: 30rpx; font-size: 24rpx;
color: #1B233D; color: #6E6E7A;
line-height: 48rpx; // line-height: 36rpx;
._unit { // margin-top: 12rpx;
font-size: 28rpx; .label {
} margin-top: 5rpx;
} }
.icon {
.output-label { width: 56rpx;
font-size: 24rpx; height: 56rpx;
color: #6E6E7A; // margin-left: 6rpx;
line-height: 36rpx; }
margin-top: 12rpx;
}
} }
}
} }
.line-box { .line-box {
width: 710rpx; width: 750rpx;
height: 584rpx; height: 604rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52; border-radius: 20rpx;
border-radius: 20rpx; margin: 24rpx auto 0rpx;
margin: 24rpx auto 0rpx;
} }
.bar-box { .bar-box {
width: 710rpx; width: 750rpx;
height: 516rpx; height: 536rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52; border-radius: 20rpx;
border-radius: 20rpx; margin: 24rpx auto 0rpx;
margin: 24rpx auto 0rpx;
} }
.staf-box { .staf-box {
width: 710rpx; width: 710rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52; box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx; border-radius: 20rpx;
margin: 24rpx auto 0rpx; margin: 24rpx auto 0rpx;
height: 300rpx; height: 300rpx;
} }
.table-box { .table-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 48rpx; margin-top: 48rpx;
padding-bottom: 50rpx; padding-bottom: 50rpx;
.btn-box { .btn-box {
width: 316rpx; width: 316rpx;
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 32rpx;
border-radius: 20rpx; border-radius: 12rpx;
background: #FFFFFF; background: #FFFFFF;
color: #1B233D; // color: #1B233D;
border: 2rpx solid #DCDFE6; color: #3582EE;
border: 2rpx solid #0075F9;
&.month-btn {
background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%); &.month-btn {
margin-left: 22rpx; // background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%);
color: #FFFFFF; background: #3582EE;
} margin-left: 22rpx;
color: #FFFFFF;
} }
}
} }
.van-calendar{
z-index:9999; .van-calendar {
z-index: 9999;
} }
\ No newline at end of file \ No newline at end of file
<wxs src="../../index.wxs" module="fn"></wxs> <wxs src="../../index.wxs" module="fn" />
<scroll-view scroll-y class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="activityRefresh" style="{{'height: calc(100% - 22rpx);'}}"> <scroll-view
<view class="output-box"> scroll-y
<view class="output-title">产值总览</view> class="content"
<view class="output-value"> refresher-triggered="{{triggered}}"
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}"> refresher-enabled
<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> bindrefresherrefresh="activityRefresh"
<view class="output-label">{{item.label}}</view> style="{{'height: calc(100% - 22rpx);'}}"
</view> >
<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>
<view class="output-title">当日新增</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 class="output-value today"> </view>
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}"> </view>
<view class="output-num">{{outputData[item.name]|| 0}} </view> </view>
<view class="output-label">{{item.label}}</view> </view>
</view> <view class="output-box">
</view> <view class="output-title">当日新增</view>
</view> <view class="output-value today">
<view class="line-box"> <view class="output-item" wx:key="index" wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}">
<output-line id="line" opts="{{opts}}" chartData="{{lineData}}" bind:selectTime="selectTime" bind:selectEvent="selectEvent"></output-line> <view class="output-label"><view class="label">{{item.label}}</view>
</view> <glsx-image src="{{item.iconUrl}}" class="icon" /></view>
<view class="bar-box"> <view class="output-num"><text class="_unit">{{item.unit}}</text>{{outputData[item.name]|| 0}} </view>
<output-bar opts="{{opts}}" chartData="{{chartData}}" id="bar" bind:selectEvent="selectBarEvent"></output-bar> </view>
</view> </view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}"/> </view>
<view class="table-box">
<view class="btn-box day-btn" bindtap="jumpReport" data-time="day">查看日报表</view> <view class="line-box">
<view class="btn-box month-btn" bindtap="jumpReport" data-time="month">查看月报表</view> <output-line
</view> id="line"
opts="{{opts}}"
</scroll-view > 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}}"> <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> </view>
.box { .box {
height: 100%; height: 100%;
z-index: 10; z-index: 10;
} }
.searchInput {
width: 100%;
background: #fff;
padding: 18rpx 0;
}
.input-box { .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; height: 64rpx;
background: #ffffff7d; line-height: 64rpx;
border: 2rpx solid #EEEEEE; flex: 1;
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);
} }
}
.icon-small{
margin-right: 10rpx;
}
.main-box {
border-radius: 32rpx;
width: 100%;
background: #FFFFFF;
height: calc(100% - 64rpx);
}
.content-box { .content-box {
padding: 0 16rpx 80rpx 16rpx; padding: 0 16rpx 80rpx 16rpx;
} }
\ No newline at end of file \ No newline at end of file
<view class="box"> <view class="box">
<view class="input-box"> <view class="searchInput">
<input value="{{activityName}}" type="text" placeholder="输入活动名称" bind:blur="handleBlur" /> <view class="input-box">
<icon class="icon-small" type="search" size="14"></icon> <icon class="icon-small" type="search" size="14"></icon>
<input value="{{activityName}}" type="text" placeholder="活动名称" bind:blur="handleBlur" />
</view> </view>
</view>
<view class="main-box"> <view class="main-box">
<activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab> <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);'}}"> <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({ ...@@ -14,14 +14,15 @@ Component({
let s = v let s = v
v.overviewData = { // 活动中 v.overviewData = { // 活动中
browseData: { browseData: {
all: { title: '总浏览', num: s.browsCount } all: { title: '总浏览(次)', num: s.browsCount }
},
shareData: {
all: { title: '产值(总)/元', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
}, },
visitorData: { visitorData: {
all: { title: '总访客', num: s.visitCount }, all: { title: '总访客(人)', num: s.visitCount },
},
shareData: {
all: { title: '总产值(元)', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
}, },
} }
console.log(v) console.log(v)
this.setData({ data: v }) this.setData({ data: v })
......
...@@ -2,13 +2,34 @@ ...@@ -2,13 +2,34 @@
.active-overview{ .active-overview{
.wrapper{ .wrapper{
display: grid; display: grid;
position: relative;
grid-template-columns: repeat(3,33.33%); grid-template-columns: repeat(3,33.33%);
&.overview-wrapper { &.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; border-radius: 20rpx;
padding: 24rpx 0rpx 26rpx 0rpx; padding: 24rpx 0rpx 26rpx 0rpx;
margin: 24rpx 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{ .overview-item-box{
width: 100%; width: 100%;
...@@ -54,18 +75,22 @@ ...@@ -54,18 +75,22 @@
.checkDetail{ .checkDetail{
width: 160rpx; width: 160rpx;
height: 48rpx; height: 48rpx;
background: rgba(255,255,255,0.20); // background: rgba(255,255,255,0.20);
border: 1rpx solid #4466F0; // border: 1rpx solid #4466F0;
border-radius: 36rpx; // border-radius: 36rpx;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 26rpx;
color: #4466F0; color: #3582EE;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto; margin: 0 auto;
} }
// .center {
// border-left:2rpx solid #eeeeee;
// border-right:2rpx solid #eeeeee;
// }
.godetail{ .godetail{
width: 236rpx; width: 236rpx;
margin: 0; margin: 0;
......
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view bind:tap="jumpOutput" data-item="{{data}}" class="checkDetail">产值详情</view> <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 bind:tap="jumpReport" data-item="{{data}}" class="checkDetail">活动战报</view>
</view> </view>
</block> </block>
......
/* packagesList/outDetail/components/activityTab/activityTab.wxss */ /* packagesList/outDetail/components/activityTab/activityTab.wxss */
.tab { .tab {
display: flex; display: flex;
align-items: center; align-items: center;
height: 78rpx; // height: 78rpx;
line-height: 78rpx; // line-height: 78rpx;
justify-content: space-around; justify-content: space-around;
.tab-item { padding-bottom: 12rpx;
color: #666666;
padding: 0rpx 20rpx; .tab-item {
&.checked { color: #666666;
color: #708CFF; padding: 12rpx 40rpx;
} background: #F8F9FC;
border-radius: 32rpx;
&.checked {
color: #6d8cd1;
background: #e9f0fe;
} }
}
} }
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/activityTop/activityTop.wxss */ /* pages/tab/index/components/activityTop/activityTop.wxss */
.active-top{ .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;
display: flex; display: flex;
flex-flow: column;
justify-content: space-between; .active-img {
padding: 8rpx 0; flex-shrink: 0;
.name{ position: relative;
// display: flex; width: 160rpx;
// align-items: center; height: 160rpx;
.name-left{ margin-right: 24rpx;
font-weight: 600;
font-size: 36rpx; .thum-icon {
color: #1B233D; width: 100%;
line-height: 48rpx; height: 100%;
word-break: break-all; position: absolute;
.activity-type{ border-radius: 16rpx;
float: right; overflow: hidden;
line-height: 44rpx; top: 0;
font-size: 28rpx; left: 0;
font-weight: 400;
color: #FE5662; image {
margin-top: 4rpx; height: 100%;
image{ }
margin-top: 4rpx; }
width: 32rpx;
height: 32rpx; .active-type {
} position: absolute;
} top: 0;
} left: 0;
.right{ width: 72rpx;
display: flex; height: 40rpx;
flex-flow: 1; background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
font-size: 28rpx; border-radius: 16rpx 0 24rpx 0;
align-items: center; color: #673F00;
image{ font-size: 24rpx;
width: 32rpx; text-align: center;
height: 32rpx;
} }
}
} }
.time{
color: #7A8299; .active-title {
font-size: 28rpx; flex: 1;
text{ display: flex;
color: #1B233D; 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 \ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
display: inline-block; display: inline-block;
margin: 32rpx 0 8rpx 0; margin: 32rpx 0 8rpx 0;
overflow: hidden; 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); // box-shadow: 0 10rpx 20rpx 0 rgba(204, 133, 122, 0.16);
border-radius: 32rpx; border-radius: 32rpx;
.item-bg { .item-bg {
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
} }
.end{ .end{
color: #6E6E7A; color: #6E6E7A;
margin-left: 8rpx;
} }
.un-start-class { .un-start-class {
width: 32rpx; width: 32rpx;
......
<view class="content-item"> <view class="content-item">
<view class="item-bg"> <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>
<view class="item-box"> <view class="item-box">
<!-- 活动top信息 --> <!-- 活动top信息 -->
<activity-top tabType="{{tabType}}" data="{{item}}" widthStyle="flex: 0 0 62%;"> <activity-top tabType="{{tabType}}" data="{{item}}" widthStyle="flex: 0 0 62%;">
<block wx:if="{{item.activityStatus==2}}"> <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> <text class="hot">火热进行中</text>
</block> </block>
<block wx:if="{{item.activityStatus==1}}"> <block wx:if="{{item.activityStatus==1}}">
......
...@@ -128,11 +128,11 @@ Component({ ...@@ -128,11 +128,11 @@ Component({
label: { label: {
show: true, show: true,
position: 'top', position: 'top',
color: this.data.color, color: '#3582EE',
}, },
color: this.data.color, color: '#3582EE',
itemStyle: { itemStyle: {
borderRadius: [50, 50, 0, 0], // borderRadius: [50, 50, 0, 0],
padding: [50, 50, 0, 0] padding: [50, 50, 0, 0]
}, },
barWidth: 24 barWidth: 24
......
import * as echarts from '../../../outDetail/ec-canvas/echarts'; import * as echarts from '../../../outDetail/ec-canvas/echarts';
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
chartData: { chartData: {
type: Array, type: Array,
value: () => [] value: () => []
}, },
keys: { keys: {
type: Array, type: Array,
value: ['year', 'sales'] value: ['year', 'sales']
}, },
tickCount: { tickCount: {
type: Number, type: Number,
value: 5 value: 5
},
color: {
type: String,
value: '#3975C6'
}
}, },
color: { observers: {
type: String, 'chartData': function (data) {
value: '#3975C6' this.initData(data)
} },
},
observers: {
'chartData': function (data) {
this.initData(data)
}, },
}, /**
/** * 组件的初始数据
* 组件的初始数据 */
*/ data: {
data: { ec: {
ec: { lazyLoad: true
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' */
}, methods: {
axisLine: { onInitChart(xData, yData) {
show: false //坐标轴线线 this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
}, const chart = echarts.init(canvas, null, {
axisTick: { width: width,
show: false //坐标轴刻度 height: height,
}, devicePixelRatio: dpr // new
data: xData });
this.setOption(chart, xData, yData);
return chart;
})
}, },
yAxis: { setOption(chart, xData, yData) {
x: 'center', let maxSpan = xData.length < 10 ? 80 : 20
type: 'value', // let start= xData.length < 10 ? 50 : 80
axisLabel: { var option = {
fontSize: 11, grid: {
color: '#A6A6A6' left: 8,
}, right: 30,
axisLine: { top: 30,
show: false //坐标轴线线 bottom: 0,
}, containLabel: true
axisTick: { },
show: false //坐标轴刻度 tooltip: {
}, trigger: 'axis',
splitLine: { triggerOn: "mousemove",
lineStyle: { axisPointer: {
type: 'dashed' 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", initData(data) {
maxSpan:maxSpan, const xData = [],
// end: 100, yData = [];
// // start: start, 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() {
ready() { // 获取组件
// 获取组件 this.ecComponent = this.selectComponent('#mychart-dom-line');
this.ecComponent = this.selectComponent('#mychart-dom-line'); }
}
}) })
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="title">场景切换</view> <view class="title">场景切换</view>
<block wx:for="{{menus}}" wx:key="index"> <block wx:for="{{menus}}" wx:key="index">
<view catch:tap="selectMenu" data-index="{{item.serviceType}}" class="element {{item.serviceType==current?'active':''}}"> <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 class="label">{{item.title}}</view>
<view wx:if="{{totals&&item.serviceType==0}}" class="num_pannel">{{totals}}</view> <view wx:if="{{totals&&item.serviceType==0}}" class="num_pannel">{{totals}}</view>
</view> </view>
......
...@@ -69,6 +69,7 @@ Component({ ...@@ -69,6 +69,7 @@ Component({
}, },
onLoad(options) { onLoad(options) {
console.log(options,'options');
const { merchantId, merchantName } = options; const { merchantId, merchantName } = options;
this.setData({ merchantId, merchantName }) this.setData({ merchantId, merchantName })
this.getSubscribeConfig(options) this.getSubscribeConfig(options)
......
@import "index.skeleton.wxss"; @import "index.skeleton.wxss";
page { page {
overflow: hidden; overflow: hidden;
// background-color: #fff;
} }
.navigation-bar { .navigation-bar {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 2; z-index: 2;
.bar-text {
font-size: 34rpx; .bar-text {
font-weight: 600; font-size: 34rpx;
} font-weight: 600;
}
} }
.layout { .layout {
box-sizing: border-box;
position: relative; position: relative;
.bg-box { padding-bottom: 60rpx;
width: 100%;
overflow: hidden; // background-color: #fff;
position: absolute; &::after {
left: 0; content: '';
z-index: -1; width: 100%;
.bg { // height: 486rpx;
width: 100%; // height: 350rpx;
height: 100%; height: 275rpx;
position: absolute; background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
top: 0; background-size: 100% 264rpx;
left: 0; background-color: #fff;
} position: absolute;
} left: 0;
.tab-box { 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; position: sticky;
top: 0; top: 0;
left: 0; left: 0;
...@@ -41,28 +64,34 @@ page { ...@@ -41,28 +64,34 @@ page {
white-space: nowrap; white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
padding: 0 32rpx; padding: 0 32rpx;
.tab-scroll{
.tab-scroll {
height: 100%; height: 100%;
width: 600rpx; width: 600rpx;
} }
.nav-btn { .nav-btn {
width: 88rpx;
transform: translate(20rpx, 8rpx);
.nav-func-icon {
width: 88rpx; width: 88rpx;
transform: translate(20rpx,8rpx); height: 88rpx;
.nav-func-icon{ }
width: 88rpx;
height: 88rpx;
}
} }
.tab_element{
.tab_element {
display: inline-block; display: inline-block;
padding: 0rpx 28rpx; padding: 0rpx 28rpx;
position: relative; position: relative;
line-height: 96rpx; line-height: 96rpx;
margin-right: 24rpx; margin-right: 24rpx;
&:last-child { &:last-child {
margin-right: 0rpx; margin-right: 0rpx;
} }
.inner{
.inner {
width: 100%; width: 100%;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
...@@ -72,14 +101,20 @@ page { ...@@ -72,14 +101,20 @@ page {
color: #2D2D33; color: #2D2D33;
opacity: 0.9; opacity: 0.9;
} }
.active { .active {
font-size: 36rpx; // font-size: 36rpx;
font-weight: 600; // font-weight: 600;
font-weight: 500;
font-size: 32rpx;
color: #3666FE;
} }
.line{
.line {
width: 48rpx; width: 48rpx;
height: 8rpx; height: 8rpx;
background: #708CFF; // background: #708CFF;
background: #3666FE;
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
transform: scale(1); transform: scale(1);
position: absolute; position: absolute;
...@@ -88,9 +123,10 @@ page { ...@@ -88,9 +123,10 @@ page {
bottom: 0; bottom: 0;
} }
} }
} }
.add-activity{
.add-activity {
position: fixed; position: fixed;
top: 75%; top: 75%;
right: 16rpx; right: 16rpx;
...@@ -98,12 +134,14 @@ page { ...@@ -98,12 +134,14 @@ page {
height: 160rpx; height: 160rpx;
} }
} }
.wrappper{
.wrappper {
height: 80rpx; height: 80rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
padding-top: 16rpx; padding-top: 16rpx;
.topMessag{
.topMessag {
width: 686rpx; width: 686rpx;
height: 72rpx; height: 72rpx;
background-image: linear-gradient(85deg, #FAFBFF 0%, #F5F6FF 100%); background-image: linear-gradient(85deg, #FAFBFF 0%, #F5F6FF 100%);
...@@ -115,58 +153,68 @@ page { ...@@ -115,58 +153,68 @@ page {
padding: 0 20rpx; padding: 0 20rpx;
position: relative; position: relative;
z-index: 99; z-index: 99;
.left{
.left {
display: flex; display: flex;
align-items: center; align-items: center;
.sign_icon{
.sign_icon {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.text1{
.text1 {
color: rgba(27, 35, 61, 1); color: rgba(27, 35, 61, 1);
font-size: 26rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
} }
.text2{
.text2 {
color: rgba(27, 35, 61, 1); color: rgba(27, 35, 61, 1);
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
margin-left: 4rpx; margin-left: 4rpx;
} }
} }
.right{
.right {
display: flex; display: flex;
align-items: center; align-items: center;
.text3{
.text3 {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #4466F0; color: #4466F0;
} }
.arrow_icon{
.arrow_icon {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-left: 4rpx; margin-left: 4rpx;
} }
} }
} }
.title1{
.title1 {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #1B233D; color: #1B233D;
} }
} }
.messageBg1{
.messageBg1 {
width: 100%; width: 100%;
background: #FFFFFF; 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; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 40rpx; padding-right: 40rpx;
.btn{
.btn {
width: 160rpx; width: 160rpx;
height: 56rpx; height: 56rpx;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%); background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
...@@ -180,4 +228,4 @@ page { ...@@ -180,4 +228,4 @@ page {
position: relative; position: relative;
z-index: 20; z-index: 20;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
</navigation-bar> </navigation-bar>
</view> </view>
<block wx:if="{{navHeight}}"> <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"> <view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image> <glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view> </view>
</view> </view> -->
<!-- tab切换 --> <!-- tab切换 -->
<view class="tab-box" style="top: {{navHeight}}px"> <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> <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({ ...@@ -8,9 +8,9 @@ Component({
let s = v let s = v
if (s) { if (s) {
v.numList = [ v.numList = [
{ title: '浏览量', num: s.browsCount }, { title: '浏览量(次)', num: s.browsCount },
{ title: '访客量', num: s.visitCount }, { title: '访客量(人)', num: s.visitCount },
{ title: '订单量', num: s.orderCount } { title: '订单量(单)', num: s.orderCount }
] ]
v.sortList = [ v.sortList = [
{ title: '访客率', sort: Number(s.fansRate).toFixed(2) }, { title: '访客率', sort: Number(s.fansRate).toFixed(2) },
......
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */ /* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title { .title {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #1B233D; color: #1B233D;
line-height: 48rpx; line-height: 48rpx;
} }
.funnel-box { .funnel-box {
padding: 40rpx 0; padding: 40rpx 0;
position: relative; position: relative;
.funnel-bg { .funnel-bg {
position: absolute; position: absolute;
top: 40rpx; top: 40rpx;
left: 50%; left: 50%;
transform: translate(-50%); transform: translate(-50%);
width: 406rpx; // width: 406rpx;
height: 288rpx; // height: 288rpx;
width: 686rpx;
height: 408rpx;
image { image {
width: 406rpx; width: 686rpx;
height: 288rpx; 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; display: flex;
justify-content: center; align-items: center;
height: 248rpx; margin-right: 28rpx;
justify-content: space-between;
width: 100%; width: 100%;
padding-top: 40rpx; padding-left: 40rpx;
.left, .num {
.right { font-size: 28rpx;
display: flex; font-weight: 700;
// margin-left: 4rpx;
color: #3666FE;
} }
.left { .lable {
flex: 0 0 406rpx; font-weight: 400;
flex-flow: column; font-size: 24rpx;
justify-content: space-around; color: #323436;
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;
}
}
} }
}
}
.right { .right {
flex: 1; flex: 1;
flex-flow: column; flex-flow: column;
align-items: flex-start; align-items: flex-start;
margin-left: 130rpx; margin-left: 130rpx;
color: #4466F0; // color: #4466F0;
padding-top: 20rpx; color: #3666FE;
font-size: 24rpx; padding-top: 85rpx;
position: relative; font-size: 24rpx;
position: relative;
.sort-box:last-child { .sort-box {
position: absolute; font-weight: 400;
left: -46rpx; font-size: 24rpx;
top: 50%; color: #323436;
}
.sort { .sort {
font-size: 40rpx; font-weight: 700;
font-weight: bold; font-size: 28rpx;
margin-top: 4rpx; 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 \ No newline at end of file
<view class="funnel-box"> <view class="funnel-box">
<view class="funnel-bg"> <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>
<view class="funnel-content"> <view class="funnel-content">
<view class="left"> <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>
<view class="right"> <view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index"> <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 class="sort">{{item.sort}}%</view>
</view> </view>
</view> </view>
......
...@@ -12,32 +12,38 @@ Page({ ...@@ -12,32 +12,38 @@ Page({
browseCount: 1, browseCount: 1,
} }
}, },
outputValue: [{ outputValue: [
label: '今日产值/元', // {
name: 'realAmountToday', // label: '今日产值/元',
unit: '¥', // name: 'realAmountToday',
multiple: 0.01, // unit: '¥',
}, { // multiple: 0.01,
label: '今日订单/单', // }, {
name: 'orderCountToday', // label: '今日订单/单',
unit: '' // name: 'orderCountToday',
}, { // unit: ''
label: '今日访客/个', // }, {
name: 'visitCountToday', // label: '今日访客/个',
unit: '' // name: 'visitCountToday',
}, { // unit: ''
// },
{
label: '累计产值/元', label: '累计产值/元',
name: 'realAmount', name: 'realAmount',
unit: '¥', unit: '¥',
multiple: 0.01, multiple: 0.01,
iconUrl:'store-assistant-assemble/output/icon05.png'
}, { }, {
label: '累计订单/单', label: '累计订单/单',
name: 'orderCount', name: 'orderCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '累计访客/个', label: '累计访客/个',
name: 'visitCount', name: 'visitCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon03.png'
}], }],
}, },
......
...@@ -3,71 +3,207 @@ ...@@ -3,71 +3,207 @@
overflow: hidden; overflow: hidden;
} }
.layout { .layout {
// position: relative;
box-sizing: border-box;
position: relative; 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 { // .bg {
width: 100%; // width: 100%;
overflow: hidden; // height: 100%;
position: absolute; // position: absolute;
left: 0; // z-index: -1;
z-index: -1; // top: 0;
// left: 0;
.bg { // }
width: 100%; // }
height: 100%; }
position: absolute; .output-box {
z-index: -1; padding: 20rpx 24rpx 24rpx;
top: 0; // margin: 0rpx 16rpx;
left: 0; 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 { .item {
background: #F4F8FE; width: 60%;
border-radius: 32rpx; display: flex;
margin: 0 16rpx; flex-direction: column;
padding: 24rpx; justify-content: space-between;
font-weight: 700;
.output-title { .unit {
font-weight: 600; font-size: 30rpx;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
display: flex;
} }
.output-value { .label {
display: grid; font-family: PingFangSC-SNaNrpxibold;
grid-template-columns: repeat(3, 33.33%); font-weight: 600;
row-gap: 24rpx; font-size: 24rpx;
padding: 32rpx; color: #323436;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%); line-height: 36rpx;
border-radius: 16rpx; margin-bottom: 12rpx;
}
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
text {
font-size: 28rpx;
}
}
.output-label { .number {
font-size: 24rpx; font-family: numberBold;
color: #6E6E7A; // font-weight: 600;
line-height: 36rpx; font-size: 48rpx;
margin-top: 12rpx; 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 { .box {
margin: 20rpx; margin: 20rpx;
......
<!--packageOutput/pages/crowdDetail/crowdDetail.wxml--> <!--packageOutput/pages/crowdDetail/crowdDetail.wxml-->
<view class="container"> <view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值详情</navigation-bar> <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"> <view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image> <glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view> </view>
</view> </view> -->
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" style="{{'height: calc(100% - 50rpx);'}}"> <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-box">
<view class="output-title"> <view class="output-title">
产值总览 产值总览
</view> </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-value">
<view class="output-item" wx:for="{{outputValue}}" wx:key="index"> <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">
<view class="output-label">{{item.label}}</view> <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> </view>
</view> </view>
......
...@@ -14,39 +14,51 @@ Page({ ...@@ -14,39 +14,51 @@ Page({
timeValue: new Date().format('yyyy-MM-dd'), timeValue: new Date().format('yyyy-MM-dd'),
outputView: { outputView: {
outputValue: [{ outputValue: [{
label: '报价量', label: '报价量(单)',
name: 'quotationCount', name: 'quotationCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon02.png'
}, { }, {
label: '成交量', label: '成交量(单)',
name: 'successCount', name: 'successCount',
unit: '' unit: '',
iconUrl:'store-assistant-assemble/output/icon07.png'
}, { }, {
label: '产值', label: '产值(元)',
name: 'outputValue', name: 'outputValue',
_unit: '¥' _unit: '¥',
iconUrl:'store-assistant-assemble/output/icon05.png'
}], }],
outputValueBoutique: [{ outputValueBoutique: [
label: '发券量(总)/张', // {
name: 'sendCouponTotal', // label: '发券量(总)/张',
unit: '' // name: 'sendCouponTotal',
}, { // unit: ''
label: '升级订单/单', // },
// {
// label: '营业额(总)/元',
// name: 'orderMoneyTotal',
// _unit: '¥'
// },
{
label: '升级订单(单)',
name: 'upgradeCountTotal', name: 'upgradeCountTotal',
unit: '' unit: '',
}, { iconUrl:'store-assistant-assemble/output/icon02.png'
label: '营业额(总)/元', },
name: 'orderMoneyTotal', {
_unit: '¥' label: '转化率',
}, { name: 'upgradeRatio',
label: '客单价/元', unit_: '%',
iconUrl:'store-assistant-assemble/output/icon07.png'
},
{
label: '客单价(元)',
name: 'averagePrice', name: 'averagePrice',
_unit: '¥' _unit: '¥',
}, { iconUrl:'store-assistant-assemble/output/icon05.png'
label: '转化率', },
name: 'upgradeRatio', ],
unit_: '%'
}],
} }
}, },
......
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
<wxs src="time.wxs" module="formatTime" /> <wxs src="time.wxs" module="formatTime" />
<view class="container"> <view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值{{timeType=='day'?'日':'月'}}报表</navigation-bar> <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"> <view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image> <glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view> </view>
</view> </view> -->
<scroll-view scroll-y class="content" class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="getReport" bindscroll="scrollIng" style="{{'height: calc(100% - 22rpx);'}}"> <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-box">
<view class="store-item"> <view class="store-item">
<view class="store-logo"> <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>
<view class="store-content"> <view class="store-content">
<view class="store-name">{{merchantName}}</view> <view class="store-name">{{merchantName}}</view>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="date-input" bindtap="onDisplay"> <view class="date-input" bindtap="onDisplay">
<view class="date-value">{{formatTime.formatTime(timeValue,timeType=='day'?11:8)}}</view> <view class="date-value">{{formatTime.formatTime(timeValue,timeType=='day'?11:8)}}</view>
<view class="date-icon"> <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> </view>
</view> </view>
...@@ -31,24 +31,44 @@ ...@@ -31,24 +31,44 @@
<view class="output-title"> <view class="output-title">
当{{timeType=='day'?'日':'月'}}产值 当{{timeType=='day'?'日':'月'}}产值
</view> </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-value">
<view class="output-item" wx:for="{{outputView[type == 2?'outputValue':'outputValueBoutique']}}" wx:key="index"> <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-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>
</view> </view>
<view class="billboard-box"> <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"> <view class="billboard-border">
<block wx:if="{{billboard.length}}"> <block wx:if="{{billboard.length}}">
<view class="billboard-item" wx:for="{{billboard}}" wx:key="index"> <view class="billboard-item" wx:for="{{billboard}}" wx:key="index">
<view class="billboard-item-bar"> <view class="billboard-item-bar">
<view class="bill-border"> <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">{{item.name}}</view>
<view class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view> <view class="bill-num" wx:if="{{item.name}}"><text class="unit">¥</text>{{item.value}}</view>
</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>
</view> </view>
</block> </block>
......
/* packageActivity/pages/visitor/visitor.wxss */ /* packageActivity/pages/visitor/visitor.wxss */
.visitor-box{ .visitor-box{
min-height: 100vh; min-height: 100vh;
background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%); // background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden; overflow: hidden;
.img-bg{ .img-bg{
width: 100%; width: 100%;
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
font-weight: 600; font-weight: 600;
color: #1B233D; color: #1B233D;
display: flex; display: flex;
.num{
color: #3666FE;
}
view:last-child{ view:last-child{
margin-left: 48rpx; margin-left: 48rpx;
} }
...@@ -31,13 +36,18 @@ ...@@ -31,13 +36,18 @@
margin: 32rpx 24rpx; margin: 32rpx 24rpx;
right: 0; right: 0;
left: 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; margin-bottom: 24rpx;
background-image: linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%);
border-radius: 24rpx; 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); .list-item{
position: relative; padding: 24rpx 40rpx 0;
.top{ .top{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -86,14 +96,17 @@ ...@@ -86,14 +96,17 @@
} }
.bottom{ .bottom{
margin-top: 24rpx; margin-top: 24rpx;
background: #FFFFFF;
border-radius: 8px; border-radius: 8px;
padding: 24rpx 32rpx; padding: 24rpx 0;
border-top: 2rpx dashed #EEEEEE;
.activity{ .activity{
font-size: 30rpx; // font-size: 30rpx;
font-weight: 600; font-size: 24rpx;
// font-weight: 600;
line-height: 48rpx; line-height: 48rpx;
color: #1B233D; // color: #1B233D;
color: #393B3E;
text{ text{
display: inline-block; display: inline-block;
padding: 2rpx 16rpx; padding: 2rpx 16rpx;
...@@ -108,13 +121,7 @@ ...@@ -108,13 +121,7 @@
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%); 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{ .pravite-text{
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
...@@ -125,6 +132,7 @@ ...@@ -125,6 +132,7 @@
} }
} }
} }
.status{ .status{
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -165,3 +173,14 @@ ...@@ -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 \ No newline at end of file
<!--packageActivity/pages/visitor/visitor.wxml--> <!--packageActivity/pages/visitor/visitor.wxml-->
<view class="visitor-box"> <view class="visitor-box">
<view class="img-bg"> <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>
<view class="content"> <view class="content">
<view class="title"> <view class="title">
<view>总访客<text> · {{allNum}}</text></view> <view>总访客<text class="num"> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view> <view>今日访客<text class="num"> · {{todayNum}}</text></view>
</view>
<view>
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:if="{{!isPravite}}"> <block wx:if="{{!isPravite}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<view class="item_box">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}"> <view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top"> <view class="top">
<view class="top-left"> <view class="top-left">
...@@ -38,15 +42,18 @@ ...@@ -38,15 +42,18 @@
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="activity"> <view class="activity">
{{item.activityName}} 访问页面: {{item.activityName}}
<!-- <text>{{activityTypList[0]}}</text> --> <!-- <text>{{activityTypList[0]}}</text> -->
</view> </view>
<view class="footprint">
<text>浏览 {{item.visitCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view> </view>
</view> </view>
<view class="footprint">
<text>{{item.lastVisitFormatTime}} 访问过</text>
<text>浏览 {{item.visitCount}} 次</text>
</view>
</view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -4,7 +4,8 @@ const IMAGES = Object.freeze({ ...@@ -4,7 +4,8 @@ const IMAGES = Object.freeze({
icon2: `/personal/icon3.png`, icon2: `/personal/icon3.png`,
userAvatarUrl: `/personal/userAvatarUrl.png` userAvatarUrl: `/personal/userAvatarUrl.png`
}) })
import { getMockData } from '~/api/api' // import { getMockData } from '~/api/api'
import USERAPI from '~/api/usersApi/index'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -18,6 +19,42 @@ Page({ ...@@ -18,6 +19,42 @@ Page({
url: '/pages/tab/logout/logout', 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) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail
this.setData({ this.setData({
...@@ -29,6 +66,8 @@ Page({ ...@@ -29,6 +66,8 @@ Page({
*/ */
onLoad: async function (options) { onLoad: async function (options) {
let { userInfo } = wx.$storage.get() 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({ this.setData({
userInfo: userInfo.subLoginUser userInfo: userInfo.subLoginUser
}) })
......
...@@ -38,8 +38,10 @@ page { ...@@ -38,8 +38,10 @@ page {
&::after { &::after {
content: ''; content: '';
width: 100%; width: 100%;
height: 750rpx; // height: 750rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant-assemble/login/logout-bg.png') no-repeat; 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%; background-size: 100% 100%;
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -57,13 +59,18 @@ page { ...@@ -57,13 +59,18 @@ page {
.userInfoCon { .userInfoCon {
height: 360rpx; height: 360rpx;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
padding: 0rpx 44rpx; padding: 0rpx 44rpx;
.info { margin-top: 32rpx;
flex: 1;
margin-left: 24rpx; .info {
} flex: 1;
text-align: center;
// margin-left: 24rpx;
}
.headPortrait { .headPortrait {
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
...@@ -145,9 +152,10 @@ page { ...@@ -145,9 +152,10 @@ page {
font-size: 32rpx !important; font-size: 32rpx !important;
color: #999999 !important; color: #999999 !important;
font-weight: 400 !important; font-weight: 400 !important;
width: 330rpx; width: 336rpx;
height: 96rpx; height: 88rpx;
line-height: 96rpx; line-height: 88rpx;
border: 2rpx solid #E2E2E2; border: 1rpx solid #E2E2E2;
border-radius: 12rpx; border-radius: 12rpx;
background-color: #fff !important;
} }
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/output.wxml --> <!-- 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="layout">
<view class="userInfoCon" bindtap="jumpLogout"> <!-- bindtap="jumpLogout" -->
<view class="userInfoCon">
<glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp> <glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>
头像 头像
</glsx-image> </glsx-image>
...@@ -9,8 +10,11 @@ ...@@ -9,8 +10,11 @@
<view class="name">{{userInfo.merchantName}}</view> <view class="name">{{userInfo.merchantName}}</view>
<view class="id">{{userInfo.phone}}</view> <view class="id">{{userInfo.phone}}</view>
</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> <glsx-image class="logot" webp src="store-assistant-assemble/login/arrow-left.png"></glsx-image>
</view> </view> -->
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 8rpx; margin-right: 8rpx;
padding-bottom: 14rpx; margin-top: -4rpx;
border-radius: 50%;
} }
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
border-bottom: 2rpx dotted #E0E0E0; // border-bottom: 2rpx dotted #E0E0E0;
padding-bottom: 14rpx; padding-bottom: 14rpx;
} }
...@@ -54,23 +53,39 @@ ...@@ -54,23 +53,39 @@
.content { .content {
display: flex; display: flex;
justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 20rpx; padding: 0 20rpx;
} }
.content-item { .content-item {
width: 33.33%; width: 32%;
// flex: 1;
text-align: center; text-align: center;
font-size: 20rpx; font-size: 20rpx;
display: flex;
justify-content: center;
flex-direction: column;
flex-wrap: wrap;
color: #999999; color: #999999;
margin-top: 16rpx; margin-top: 16rpx;
height: 128rpx;
background: #F8F9FC;
border-radius: 12rpx;
.price { .price {
font-weight: 500; font-weight: 700;
font-size: 28rpx; font-size: 24rpx;
color: #323436; color: #323436;
font-weight: 600; font-weight: 600;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.unit{
font-size: 20rpx;
font-weight: 600;
}
// .label{
// font-size: 20rpx;
// }
} }
} }
\ No newline at end of file \ No newline at end of file
<!--pages/tab/output/components/BusiCard/BusiCard.wxml--> <!--pages/tab/output/components/BusiCard/BusiCard.wxml-->
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<view class="busi-card"> <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" /> <image wx:if="{{formObj.userAvatar}}" src="{{formObj.userAvatar}}" class="icon" />
<glsx-image wx:else src="personal/staff_defalut_avatar.png" class="icon" /> <glsx-image wx:else src="personal/staff_defalut_avatar.png" class="icon" />
<view class="title"> <view class="title">
{{info.userName}} {{info.userName}}
<view class="title-tap">{{timeTabObj[formData.timeIdx || '0']}}</view> <view class="title-tap">{{timeTabObj[formData.timeIdx || '0']}}</view>
</view> </view>
</view> </view> bf-blue-->
<view class="title-box bf-blue" wx:else> <view class="title-box " >
<glsx-image src="store-assistant-assemble/output/merchantIcon.png" class="icon" />
<view class="title">{{info.merchantName || info.merchantName4s || ''}}</view> <view class="title">{{info.merchantName || info.merchantName4s || ''}}</view>
</view> </view>
<view class="content"> <view class="content">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="content-item" data-info="{{info}}" data-item="{{item}}" bindtap="jumpDetail"> <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:if="{{info[item.name] == '未开通'}}" class="price">{{info[item.name]}}</view>
<view wx:else="" class="price"> <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.isNum ? filter.money_three_for_two_thousands(info[item.name] || 0.00) : (info[item.name] || 0)}}
{{item.suffix || ''}} {{item.suffix || ''}}
</view> </view>
<view>{{item.label}}</view> <view class="label">{{item.label}}</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -11,20 +11,23 @@ ...@@ -11,20 +11,23 @@
.input-box { .input-box {
width: 686rpx; width: 686rpx;
height: 64rpx; height: 64rpx;
background: #ffffff7d; // background: #ffffff7d;
// border-radius: 12rpx;
background: #F8F9FC;
border: 2rpx solid #EEEEEE; border: 2rpx solid #EEEEEE;
border-radius: 12rpx; border-radius: 32rpx;
margin: 0rpx auto 24rpx; margin: 0rpx auto 24rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: 0rpx 24rpx 0rpx 40rpx; padding: 0rpx 24rpx 0rpx 24rpx;
input { input {
flex: 1; flex: 1;
height: 64rpx; height: 64rpx;
line-height: 64rpx; line-height: 64rpx;
margin-left: 15rpx;
} }
} }
...@@ -57,13 +60,15 @@ ...@@ -57,13 +60,15 @@
.profit-box { .profit-box {
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
width: 100%; display: flex;
justify-content: space-between;
width: 710rpx;
height: 96rpx; 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; line-height: 96rpx;
padding: 0 20rpx 0 32rpx; margin: 20rpx auto 0;
margin-bottom: 0rpx; padding: 0 32rpx;
margin-top: 16rpx;
background-size: 100% 96rpx;
font-weight: 600; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
color: #1B233D; color: #1B233D;
...@@ -76,6 +81,10 @@ ...@@ -76,6 +81,10 @@
// font-family: 'number'; // font-family: 'number';
// font-size: 26rpx; // font-size: 26rpx;
} }
.unit{
font-size: 28rpx;
margin-right: 10rpx;
}
} }
.sort-fix { .sort-fix {
...@@ -205,6 +214,7 @@ ...@@ -205,6 +214,7 @@
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
color: #CCCED1; color: #CCCED1;
margin-top: 16rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
......
...@@ -4,12 +4,13 @@ ...@@ -4,12 +4,13 @@
<view class="client-box"> <view class="client-box">
<!-- 总收益 --> <!-- 总收益 -->
<view> <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"> <view class="profit-box flex">
<text>总产值</text> <text>总产值</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(totalProfit || 0.00)}}</text> <text class="price-txt"><text class="unit">¥</text>{{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>
</view> </view>
<view> <view>
</view> </view>
......
...@@ -6,7 +6,7 @@ Component({ ...@@ -6,7 +6,7 @@ Component({
properties: { properties: {
title: { title: {
type: String, type: String,
value: '合作门店' value: '我的门店'
}, },
sceneCode: { sceneCode: {
type: String, type: String,
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
.sort-tab { .sort-tab {
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
width: calc(100vw - 32rpx);
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -12,7 +11,10 @@ ...@@ -12,7 +11,10 @@
border-top-right-radius: 32rpx; border-top-right-radius: 32rpx;
.title { .title {
font-weight: 600;
font-size: 30rpx;
width: 196rpx; width: 196rpx;
padding-left: 8rpx;
flex-shrink: 0; flex-shrink: 0;
} }
...@@ -30,6 +32,7 @@ ...@@ -30,6 +32,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 20rpx; margin-right: 20rpx;
color: #5a6066;
} }
.icon { .icon {
......
<!--pages/tab/output/components/sortTab/sortTab.wxml--> <!--pages/tab/output/components/sortTab/sortTab.wxml-->
<view class="sort-tab"> <view class="sort-tab">
<ciew class="title">{{title}}</ciew> <view class="title">{{title}}</view>
<scroll-view class="sort-scroll" scroll-x="true"> <scroll-view class="sort-scroll" scroll-x="true">
<view class="flex"> <view class="flex">
<view wx:for="{{formObj[sceneCode]}}" wx:key="index" class="item" bindtap="handleSort" data-idx="{{index}}"> <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' ...@@ -4,167 +4,180 @@ import USERAPI from '~/api/usersApi/index'
import { IMG_URL } from '~/utils/constantData' import { IMG_URL } from '~/utils/constantData'
import { getMockData } from '~/api/api' import { getMockData } from '~/api/api'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL, IMG_URL,
navStyle: 'background-color: rgba(0,0,0,0);', isShow: true,
loginType: 0, navStyle: 'background-color: rgba(0,0,0,0);',
agree: true, loginType: 0,
tabIndx: 0, agree: true,
// tabList: ['我的客户', '我的门店', '我的员工'], tabIndx: 0,
tabList: ['我的客户', '我的员工'], // tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: false, tabList: ['我的客户', '我的员工'],
subIndex: -1, popupShow: false,
merchantList: [ subIndex: -1,
{ merchantList: [
merchantId: 0, {
merchantName: 'string', merchantId: 0,
show: true merchantName: 'string',
}, show: true
{ },
merchantId: 1, {
merchantName: 'test', merchantId: 1,
show: true 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
} }
}) ],
this.setData({ isShowService: false,
merchantRange, },
subIndex // 切换园区
}) 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 { async getMockInfo() {
let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }] let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({ this.setData({
merchantRange, isShowService: serviceMerchatList.includes(this.data.userInfo.merchantId + '')
subIndex: 0 })
}) },
} 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 this.init()
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()
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
// console.log(getTextWidth('随后获取dom元素的clientWidth 随后获取dom元素的clientWidth随后获取dom元素的clientWidth随后获取dom元素的clientWidth', '12px')) // 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!