Commit 6abc06d2 authored by Nero's avatar Nero

init

parents
#商户
###营销概览
![image](http://hh-oss-picture.miyapay.com/box/8d9c84c9627afaa4595eb0bc6dbe026c.png)
###推广管理
###人群列表
###数据报表
---
#非商户
###商户列表
###营销概览
![image](http://hh-oss-picture.miyapay.com/box/8d9c84c9627afaa4595eb0bc6dbe026c.png)
\ No newline at end of file
//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
globalData: {
userInfo: null
}
})
\ No newline at end of file
{
"pages":[
"pages/index/index",
"pages/charts/charts",
"pages/lines/lines",
"pages/pie/pie",
"pages/login/login",
"pages/tryTry/tryTry",
"pages/dataView/index",
"pages/overview/index",
"pages/overallView/index",
"pages/planView/index",
"pages/promoteView/index",
"pages/creativeView/index"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "雪焰",
"navigationBarTextStyle":"black"
},
"networkTimeout": {
"request": 10000,
"downloadFile": 10000
}
}
/**app.wxss**/
.container {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 0px;
margin: 0px;
box-sizing: border-box;
}
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _wxF = __webpack_require__(1);
var _wxF2 = _interopRequireDefault(_wxF);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Component({
/**
* 组件的属性列表
*/
properties: {
canvasId: {
type: String,
value: 'f2-canvas'
},
opts: {
type: Object
}
},
/**
* 组件的初始数据
*/
data: {},
ready: function ready() {
if (!this.data.opts) {
console.warn('组件需绑定 opts 变量,例:<ff-canvas id="mychart-dom-bar" canvas-id="mychart-bar" opts="{{ opts }}"></ff-canvas>');
return;
}
if (!this.data.opts.lazyLoad) {
this.init();
}
},
/**
* 组件的方法列表
*/
methods: {
init: function init(callback) {
var _this = this;
var version = wx.version.version.split('.').map(function (n) {
return parseInt(n, 10);
});
var isValid = version[0] > 1 || version[0] === 1 && version[1] > 9 || version[0] === 1 && version[1] === 9 && version[2] >= 91;
if (!isValid) {
console.error('微信基础库版本过低,需大于等于 1.9.91。');
return;
}
var ctx = wx.createCanvasContext(this.data.canvasId, this); // 获取小程序上下文
var canvas = new _wxF2.default.Renderer(ctx);
this.canvas = canvas;
var query = wx.createSelectorQuery().in(this);
query.select('.f2-canvas').boundingClientRect(function (res) {
if (typeof callback === 'function') {
_this.chart = callback(canvas, res.width, res.height, _wxF2.default);
} else if (_this.data.opts && _this.data.opts.onInit) {
_this.chart = _this.data.opts.onInit(canvas, res.width, res.height, _wxF2.default);
}
}).exec();
},
touchStart: function touchStart(e) {
if (this.canvas) {
this.canvas.emitEvent('touchstart', [e]);
}
},
touchMove: function touchMove(e) {
if (this.canvas) {
this.canvas.emitEvent('touchmove', [e]);
}
},
touchEnd: function touchEnd(e) {
if (this.canvas) {
this.canvas.emitEvent('touchend', [e]);
}
},
press: function press(e) {
if (this.canvas) {
this.canvas.emitEvent('press', [e]);
}
}
}
}); // f2-canvas.js
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = require("@antv/wx-f2");
/***/ })
/******/ ]);
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<canvas
class="f2-canvas"
canvas-id="{{ canvasId }}"
bindinit="init"
bindtouchstart="touchStart"
bindtouchmove="touchMove"
bindtouchend="touchEnd"
bindlongtap="press"
>
</canvas>
/* f2-canvas.wxss */
.f2-canvas {
width: 100%;
height: 100%;
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"name": "BigData_Wechat",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@antv/adjust": {
"version": "0.1.1",
"resolved": "http://registry.npm.taobao.org/@antv/adjust/download/@antv/adjust-0.1.1.tgz",
"integrity": "sha1-4mOrDhoZQaZIhC/Ahs9lp+O3Xpg=",
"requires": {
"@antv/util": "~1.3.1"
},
"dependencies": {
"@antv/util": {
"version": "1.3.1",
"resolved": "http://registry.npm.taobao.org/@antv/util/download/@antv/util-1.3.1.tgz",
"integrity": "sha1-MKNLIB/5Em7A1YxyyBZqnD5kTM0=",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
}
}
},
"@antv/attr": {
"version": "0.0.7",
"resolved": "http://registry.npm.taobao.org/@antv/attr/download/@antv/attr-0.0.7.tgz",
"integrity": "sha1-Mz8lLONfw+/fitSARsJjpr4tfQQ=",
"requires": {
"@antv/util": "~1.2.5"
}
},
"@antv/f2": {
"version": "3.3.5",
"resolved": "http://registry.npm.taobao.org/@antv/f2/download/@antv/f2-3.3.5.tgz",
"integrity": "sha1-ER1D1STi3kXWpQteCqUKDC4tfgU=",
"requires": {
"@antv/adjust": "~0.1.1",
"@antv/attr": "~0.0.3",
"@antv/scale": "~0.0.6",
"@antv/util": "~1.2.5",
"hammerjs": "^2.0.8"
}
},
"@antv/f2-canvas": {
"version": "1.0.5",
"resolved": "http://registry.npm.taobao.org/@antv/f2-canvas/download/@antv/f2-canvas-1.0.5.tgz",
"integrity": "sha1-o7x3NpBSXhp7FiCvG+st44lw5Wg=",
"requires": {
"@antv/wx-f2": "^1.1.4"
}
},
"@antv/gl-matrix": {
"version": "2.7.1",
"resolved": "http://registry.npm.taobao.org/@antv/gl-matrix/download/@antv/gl-matrix-2.7.1.tgz",
"integrity": "sha1-rLjjf3qz3wE0WrpDcteUK+QuuhQ="
},
"@antv/scale": {
"version": "0.0.9",
"resolved": "http://registry.npm.taobao.org/@antv/scale/download/@antv/scale-0.0.9.tgz",
"integrity": "sha1-JKltPDpKUHMVqaM15aQ1vk1szUU=",
"requires": {
"@antv/util": "~1.2.5",
"fecha": "~2.3.3"
}
},
"@antv/util": {
"version": "1.2.5",
"resolved": "http://registry.npm.taobao.org/@antv/util/download/@antv/util-1.2.5.tgz",
"integrity": "sha1-iJbFBV7Cnko0S12ql7+CkF99QM0=",
"requires": {
"@antv/gl-matrix": "^2.7.1"
}
},
"@antv/wx-f2": {
"version": "1.1.4",
"resolved": "http://registry.npm.taobao.org/@antv/wx-f2/download/@antv/wx-f2-1.1.4.tgz",
"integrity": "sha1-cH3z5oYiFHIDkvEOKF/csYN4erY=",
"requires": {
"@antv/f2": "^3.3.3",
"wolfy87-eventemitter": "^5.2.4"
}
},
"fecha": {
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/fecha/download/fecha-2.3.3.tgz",
"integrity": "sha1-lI50FX3xoy/RsSw6PDzctuydls0="
},
"hammerjs": {
"version": "2.0.8",
"resolved": "http://registry.npm.taobao.org/hammerjs/download/hammerjs-2.0.8.tgz",
"integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
},
"wolfy87-eventemitter": {
"version": "5.2.6",
"resolved": "http://registry.npm.taobao.org/wolfy87-eventemitter/download/wolfy87-eventemitter-5.2.6.tgz",
"integrity": "sha1-zF3pZdNAmeXBTsGJ7nJVOALTrOI="
}
}
}
{
"name": "BigData_Wechat",
"version": "1.1.0",
"description": "BigData_Wechat",
"license": "MIT",
"dependencies": {
"@antv/f2-canvas": "^1.0.5",
"@antv/wx-f2": "^1.1.4"
}
}
let chart = null;
function initChart(canvas, width, height, F2) {
const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
{ year: '1959 年', sales: 38 },
{ year: '1960 年', sales: 38 },
{ year: '1962 年', sales: 38 },
];
chart = new F2.Chart({
el: canvas,
width,
height
});
chart.source(data, {
sales: {
tickCount: 5
}
});
chart.tooltip({
showItemMarker: false,
onShow(ev) {
const { items } = ev;
items[0].name = null;
items[0].name = items[0].title;
items[0].value = '¥ ' + items[0].value;
}
});
chart.interval().position('year*sales');
chart.render();
return chart;
}
Page({
data: {
opts: {
onInit: initChart
}
},
onReady() {
}
});
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
<!--index.wxml-->
<view class="container">
<ff-canvas id="column-dom" canvas-id="column" opts="{{ opts }}"></ff-canvas>
</view>
.container{
width: 100vw;
height: 100vh;
background: white;
}
ff-canvas {
width: 100%;
height: 50%;
}
This diff is collapsed.
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
},
"navigationBarTitleText": "分推广创意"
}
\ No newline at end of file
This diff is collapsed.
.container{
background: #F3F3F3;
width: 100vw;
height: 100vh;
}
.titleView{
background: white;
width: 100%;
}
.titleWrapper{
display: flex;
flex-direction: row;
background: white;
align-items: center;
padding-top:20px;
width: 100%;
height: 45px;
}
.tipsView{
margin-left: 20px;
margin-right: 5px;
width: 15px;
height: 10px;
background: red;
}
.tipsTitle{
font-size: 15px;
color: gray
}
.rowData{
width: 100%;
background: white;
}
.row{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
padding-bottom: 20px;
}
.left{
display: flex;
width: 40%;
height: 90px;
background: white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
border-style: solid;
border-width: 1px;
border-color: #F3F3F3;
}
.right{
display: flex;
width: 40%;
height: 90px;
background:white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
border-style: solid;
border-width: 1px;
border-color: #F3F3F3;
}
.title{
display: block;
font-size: 18px;
}
.subTitle{
display: block;
font-size: 10px;
color: gray;
margin-bottom: 10px;
}
.littleTitle{
/* display: block; */
font-size: 10px;
color: gray;
}
.littleNum{
/* display: block; */
font-size: 10px;
color: block;
}
.rowInRow{
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
}
\ No newline at end of file
const util = require('../../utils/util');
const request = require('../../utils/request');
const api = require('../../utils/api');
const yesterday = new Date(Date.now() - 864e5);
const yesterdayStr = util.formatTime(yesterday);
Page({
data: {
date: yesterdayStr,
showType:"",
opts: {
onInit: initChart
}
},
onLoad:function(options) {
this.setData({
showType:options.showType
})
},
dateSelected(e) {
this.setData({
date: e.detail.value
})
this.queryData(String(e.detail.value));
},
queryData(date){
wx.showLoading({
title: '加载中',
})
let data = {'date':date};
request.Get(api.customerTotal(),data, function (data) {
wx.hideLoading();
if (data.code == "200") {
console.log("data>>>>>>>>", JSON.stringify(data));
} else {
wx.showToast({
title: data.msg,
icon: 'none',
duration: 1500
})
}
});
},
onReady() {
if (this.data.showType === "total" ){
this.queryData(yesterdayStr);
}
}
})
// -----------------------------------------------------------------------
// -----------------------------------------------------
let chart = null;
function initChart(canvas, width, height, F2) {
const data = [{ "year": 1997, "type": "United States", "value": 4.9 }, { "year": 1997, "type": "Florida", "value": 4.8 }, { "year": 1998, "type": "United States", "value": 4.5 }, { "year": 1998, "type": "Florida", "value": 4.3 }, { "year": 1999, "type": "United States", "value": 4.2 }, { "year": 1999, "type": "Florida", "value": 3.9 }, { "year": 2000, "type": "United States", "value": 4 }, { "year": 2000, "type": "Florida", "value": 3.7 }, { "year": 2001, "type": "United States", "value": 4.7 }, { "year": 2001, "type": "Florida", "value": 4.7 }, { "year": 2002, "type": "United States", "value": 5.8 }, { "year": 2002, "type": "Florida", "value": 5.6 }, { "year": 2003, "type": "United States", "value": 6 }, { "year": 2003, "type": "Florida", "value": 5.2 }, { "year": 2004, "type": "United States", "value": 5.5 }, { "year": 2004, "type": "Florida", "value": 4.6 }, { "year": 2005, "type": "United States", "value": 5.1 }, { "year": 2005, "type": "Florida", "value": 3.7 }, { "year": 2006, "type": "United States", "value": 4.6 }, { "year": 2006, "type": "Florida", "value": 3.2 }, { "year": 2007, "type": "United States", "value": 4.6 }, { "year": 2007, "type": "Florida", "value": 4 }, { "year": 2008, "type": "United States", "value": 5.8 }, { "year": 2008, "type": "Florida", "value": 6.3 }, { "year": 2009, "type": "United States", "value": 9.3 }, { "year": 2009, "type": "Florida", "value": 10.4 }, { "year": 2010, "type": "United States", "value": 9.6 }, { "year": 2010, "type": "Florida", "value": 11.1 }, { "year": 2011, "type": "United States", "value": 8.9 }, { "year": 2011, "type": "Florida", "value": 10 }, { "year": 2012, "type": "United States", "value": 8.1 }, { "year": 2012, "type": "Florida", "value": 8.5 }, { "year": 2013, "type": "United States", "value": 7.4 }, { "year": 2013, "type": "Florida", "value": 7.2 }, { "year": 2014, "type": "United States", "value": 6.2 }, { "year": 2014, "type": "Florida", "value": 6.3 }, { "year": 2015, "type": "United States", "value": 5.3 }, { "year": 2015, "type": "Florida", "value": 5.4 }, { "year": 2016, "type": "United States", "value": 4.9 }, { "year": 2016, "type": "Florida", "value": 4.9 }, { "year": 2017, "type": "United States", "value": 4.4 }, { "year": 2017, "type": "Florida", "value": 4.3 }];
chart = new F2.Chart({
el: canvas,
width,
height
});
chart.source(data, {
year: {
range: [0, 1],
ticks: [1997, 1999, 2001, 2003, 2005, 2007, 2009, 2011, 2013, 2015, 2017]
},
value: {
tickCount: 10,
formatter(val) {
return val.toFixed(1) + '%';
}
}
});
chart.tooltip({
custom: true, // 自定义 tooltip 内容框
showXTip: true,
onChange(obj) {
const legend = chart.get('legendController').legends.top[0];
const tooltipItems = obj.items;
const legendItems = legend.items;
const map = {};
legendItems.map(item => {
map[item.name] = Object.assign({}, item);
});
tooltipItems.map(item => {
const { name, value } = item;
if (map[name]) {
map[name].value = value;
}
});
legend.setItems(Object.values(map));
},
onHide() {
const legend = chart.get('legendController').legends.top[0];
legend.setItems(chart.getLegendItems().country);
}
});
chart.guide().rect({
start: [2011, 'max'],
end: ['max', 'min'],
style: {
fill: '#CCD6EC',
opacity: 0.3
}
});
chart.guide().text({
position: [2014, 'max'],
content: 'Scott administratio\n(2011 to present)',
style: {
fontSize: 10,
textBaseline: 'top'
}
});
chart.line().position('year*value').color('type', val => {
if (val === 'United States') {
return '#ccc';
}
});
chart.render();
return chart;
}
\ No newline at end of file
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
},
"navigationBarTitleText": "数据"
}
\ No newline at end of file
<view class="container">
<scroll-view>
<view class="titleView">
<picker class="picker" mode="date" value="{{currentDate}}" start="2019-01-01" end="2027-09-01" bindchange="dateSelected" style="padding-top: 10px;font-size: 15px;">
<text>日期: {{date}}</text>
</picker>
</view>
<view class="titleWrapper">
<view class="tipsView"></view>
<text class="tipsTitle">累计表现</text>
</view>
<view class="rowData">
<view class="row">
<view class="left">
<text class="title">20.90</text>
<text class="subTitle">历史累计消耗</text>
</view>
<view class="right">
<text class="title">20.90</text>
<text class="subTitle">历史累计曝光PV</text>
</view>
</view>
<view class="row">
<view class="left">
<text class="title">20.90</text>
<text class="subTitle">累计曝光UV</text>
</view>
<view class="right">
<text class="title">20.90</text>
<text class="subTitle">累计点击UV</text>
</view>
</view>
<view class="row">
<view class="left">
<text class="title">20.90</text>
<text class="subTitle">累计点击率</text>
</view>
<view class="right">
<text class="title">20.90</text>
<text class="subTitle">累计唤端率</text>
</view>
</view>
<view class="row">
<view class="left">
<text class="title">20.90</text>
<text class="subTitle">累计人均曝光次数</text>
</view>
<view class="right">
<text class="title">20.90</text>
<text class="subTitle">累计每千曝光金额</text>
</view>
</view>
<view class="row">
<view class="left">
<text class="title">20.90</text>
<text class="subTitle">累计点击PV</text>
</view>
<view class="right">
<text class="title">20.90</text>
<text class="subTitle">累计点击单价</text>
</view>
</view>
</view>
<view class="space"></view>
<view class="titleWrapper">
<view class="tipsView"></view>
<text class="tipsTitle">日趋势图</text>
</view>
<view class="lineView">
<ff-canvas id="line-dom" canvas-id="line" opts="{{ opts }}"></ff-canvas>
</view>
</scroll-view>
</view>
\ No newline at end of file
.container{
background:#F3F3F3;
width: 100vw;
height: 100vh;
}
.titleView{
margin-top: 10px;
display: flex;
flex-direction: row;
justify-content: center;
width: 100%;
background: white;
height: 50px;
}
.picker{
font-size: 15;
}
.titleWrapper{
display: flex;
flex-direction: row;
background: white;
align-items: center;
width: 100%;
height: 45px;
}
.tipsView{
margin-left: 20px;
margin-right: 5px;
width: 15px;
height: 10px;
background: red;
}
.tipsTitle{
font-size: 15px;
}
.rowData{
margin-top: 10px;
margin-bottom: 10px;
padding-bottom: 10px;
padding-top: 10px;
width: 100%;
background: white;
}
.row{
margin-top: 20px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.left{
display: flex;
width: 40%;
height: 90px;
background: white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
border-style: solid;
border-width: 1px;
border-color: #F3F3F3;
}
.right{
display: flex;
width: 40%;
height: 90px;
background:white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
border-style: solid;
border-width: 1px;
border-color: #F3F3F3;
}
.title{
display: block;
font-size: 18px;
}
.subTitle{
display: block;
font-size: 10px;
color: gray;
margin-bottom: 10px;
}
.space{
width: 100%;
height: 30px;
}
.lineView{
width: 100%;
height: 200px;
}
ff-canvas {
width: 100%;
height: 200px;
}
.popDate{
position: fixed;
bottom: 0;
left: 0;
right: 0;
top:0;
background-color: rgba(128, 128, 128,0.5);
}
.pickerWraper{
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
height: 250px;
background: white;
}
.pickerTop{
display: flex;
flex-direction: row;
justify-content: flex-end;
width: 100%;
height: 40px;
}
.pickerClose{
padding: 10px;
font-size: 15px;
color: black;
}
.pickerView {
padding-left: 40px;
}
\ No newline at end of file
var request = require('../../utils/request');
var api = require('../../utils/api');
Page({
data: {
},
tapAction:function(item){
let type = item.currentTarget.dataset.type;
if (type == 'overview') {
wx.navigateTo({
url: '../overview/index'
})
} else if (type == 'total'){
wx.navigateTo({
url: `../overallView/index`
})
} else if (type == 'plan') {
wx.navigateTo({
url: `../planView/index`
})
} else if (type == 'promote') {
wx.navigateTo({
url: `../promoteView/index`
})
}else if (type == 'creative') {
wx.navigateTo({
url: `../creativeView/index`
})
}
},
onLoad: function () {
wx.getStorage({
key:"user",
success(res){
if (res.data != null) {
// console.log("user>>>>>",JSON.stringify(res.data));
}else{
wx.redirectTo({
url: '../login/login'
})
}
},
fail(res){
wx.redirectTo({
url: '../login/login'
})
}
})
},
})
{
"usingComponents": {},
"navigationBarTitleText": "雪焰"
}
\ No newline at end of file
<!-- index.wxml -->
<view class="container">
<view class="row">
<view class="left" bindtap="tapAction" data-type="overview">
<text class="title">营销概览</text>
<view class="image-row">
<image src="http://hh-oss-picture.miyapay.com/box/1dca895b0e859c80874e559f2218a324.png" class="detal-image" />
</view>
</view>
<view class="right" bindtap="tapAction" data-type="total">
<text class="title">分广告主整体</text>
<view class="image-row">
<image src="http://hh-oss-picture.miyapay.com/box/1dca895b0e859c80874e559f2218a324.png" class="detal-image" />
</view>
</view>
</view>
<view class="row">
<view class="left" bindtap="tapAction" data-type="plan">
<text class="title">分推广计划</text>
<view class="image-row">
<image src="http://hh-oss-picture.miyapay.com/box/1dca895b0e859c80874e559f2218a324.png" class="detal-image" />
</view>
</view>
<view class="right" bindtap="tapAction" data-type="promote">
<text class="title">分推广组</text>
<view class="image-row">
<image src="http://hh-oss-picture.miyapay.com/box/1dca895b0e859c80874e559f2218a324.png" class="detal-image" />
</view>
</view>
</view>
<view class="bottomRow">
<view class="left" bindtap="tapAction" data-type="creative">
<text class="title">分推广创意</text>
<view class="image-row">
<image src="http://hh-oss-picture.miyapay.com/box/1dca895b0e859c80874e559f2218a324.png" class="detal-image" />
</view>
</view>
</view>
</view>
\ No newline at end of file
/**index.wxss**/
.container{
background:#F3F3F3;
}
.row{
margin-top: 20px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-around;
}
.bottomRow {
margin-top: 20px;
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-start;
padding-left:40px;
}
.left{
display: flex;
width: 40%;
height: 90px;
background: white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
}
.right{
display: flex;
width: 40%;
height: 90px;
background:white;
border-radius: 9px;
justify-content: center;
align-items: center;
flex-direction: column;
}
.title{
display: block;
font-size: 18px;
}
.subTitle{
display: block;
font-size: 10px;
color: gray;
margin-bottom: 10px;
}
.detal-image{
width: 15px;
height: 15px;
}
.image-row{
display: flex;
justify-content: flex-end;
width:80%;
}
\ No newline at end of file
This diff is collapsed.
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
<!--index.wxml-->
<view class="container">
<ff-canvas id="line-dom" canvas-id="line" opts="{{ opts }}"></ff-canvas>
</view>
/* pages/chart/line/index.wxss */
.container{
width: 100vw;
height: 100vh;
background: white;
}
ff-canvas {
width: 100%;
height: 50%;
}
\ No newline at end of file
var request = require('../../utils/request');
var api = require('../../utils/api');
Page({
data: {
userName: "",
pwd: "",
},
userNameInput(e) {
this.setData({
userName: e.detail.value
})
},
pwdInput(e) {
this.setData({
pwd: e.detail.value
})
},
tryAction() {
wx.navigateTo({
url: '../tryTry/tryTry'
})
},
loginAction() {
// admin
// 123456
if (this.data.userName.length == 0) {
wx.showToast({
title: `请输入账号`,
icon: 'none',
duration: 1500
})
return;
}
if (this.data.pwd.length == 0) {
wx.showToast({
title: `请输入密码`,
icon: 'none',
duration: 1500
})
return;
}
wx.showLoading({
title: '加载中',
})
let data = {
"username": this.data.userName,
"password": this.data.pwd
}
request.Post(api.getoken(), data, function (data) {
wx.hideLoading();
if (data.code == "200") {
wx.setStorage({
key: 'user',
data: data.data
});
wx.redirectTo({
url: '../index/index'
});
} else {
wx.showToast({
title: data.msg,
icon: 'none',
duration: 1500
})
}
});
}
})
\ No newline at end of file
{
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
},
"navigationBarTitleText": "分广告组整体"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"usingComponents": {
"ff-canvas": "@antv/f2-canvas"
},
"navigationBarTitleText": "分推广组"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment