├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── api
├── includes
│ ├── cls_weixin_login.php
│ └── init.php
├── log
│ └── 2017-08-01 - jsApiParameters.txt
├── wx_login.php
└── wx_pay.php
├── build
├── build.js
├── check-versions.js
├── dev-client.js
├── dev-server.js
├── utils.js
├── vendor-manifest.json
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
├── webpack.dll.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── index.html
├── package.json
├── src
├── App.vue
├── components
│ └── common
│ │ ├── alert.vue
│ │ ├── confirm.vue
│ │ ├── err_tip.vue
│ │ ├── filter_tab.vue
│ │ ├── footer_bar.vue
│ │ ├── load.vue
│ │ ├── num_tip.vue
│ │ ├── scroll_selector.vue
│ │ └── tree_node.vue
├── config
│ ├── JsBarcode.all.min.js
│ ├── flexible.js
│ ├── flexible_css.js
│ ├── helper.js
│ ├── interface_config.js
│ ├── jquery.qrcode.min.js
│ ├── md5.js
│ ├── request.js
│ └── wx_pay_helper.js
├── font
│ ├── sanse_w3.ttf
│ └── sanse_w6.ttf
├── images
│ ├── address_manager
│ │ ├── add_icon.png
│ │ ├── address_del_icon.png
│ │ ├── address_edit_icon.png
│ │ └── address_selected_icon.png
│ ├── blance
│ │ └── my_blance_bg.jpg
│ ├── common
│ │ ├── active_alert_succeed_icon.png
│ │ ├── active_alert_tip_icon.png
│ │ ├── add_disable_icon.png
│ │ ├── add_icon.png
│ │ ├── black_arr_icon.png
│ │ ├── checkbox_disbale_icon.png
│ │ ├── checkbox_icon.png
│ │ ├── checkbox_icon_active.png
│ │ ├── complete_icon.png
│ │ ├── default_user_icon.png
│ │ ├── edit_icon.png
│ │ ├── link_right_arrow.png
│ │ ├── load_more.gif
│ │ ├── loading.gif
│ │ ├── login_bg.jpg
│ │ ├── market_pay_icon.png
│ │ ├── pull_arrow.png
│ │ ├── sanse_logo.png
│ │ ├── shopping_bag_icon.png
│ │ ├── subtract_disable_icon.png
│ │ ├── subtract_icon.png
│ │ ├── user_icon.png
│ │ ├── wechat_icon.png
│ │ └── wx_pay_icon.png
│ ├── coupon
│ │ ├── coupon_out_of_date.jpg
│ │ └── overdue_icon.png
│ ├── footer_bar
│ │ ├── brand_active_icon.png
│ │ ├── brand_icon.png
│ │ ├── carts_active_icon.png
│ │ ├── carts_icon.png
│ │ ├── home_active_icon.png
│ │ ├── home_icon.png
│ │ ├── store_pay_active_icon.png
│ │ ├── store_pay_icon.png
│ │ ├── tide_active_icon.png
│ │ ├── tide_icon.png
│ │ ├── user_active_icon.png
│ │ └── user_icon.png
│ ├── goods_detail
│ │ ├── add_goods_hide_icon.png
│ │ ├── add_goods_icon.png
│ │ ├── add_to_shopping_bag_icon.png
│ │ ├── add_to_shopping_bag_tip_icon.png
│ │ ├── collection_active_icon.png
│ │ ├── collection_icon.png
│ │ └── store_search_icon.png
│ ├── goods_list
│ │ ├── clock_icon.png
│ │ ├── empty_filter_icon.png
│ │ ├── goods_list_empty_icon.png
│ │ ├── new_goods_empty_icon.png
│ │ ├── rest_btn_active_btn.png
│ │ ├── rest_btn_icon.png
│ │ ├── scroll_back.png
│ │ ├── search_goods_btn_icon.png
│ │ ├── search_goods_icon.png
│ │ ├── seckill_icon.png
│ │ ├── seckill_price_icon.png
│ │ ├── special_price_icon.png
│ │ ├── ttime_limited_preferential_icon.png
│ │ └── ttime_limited_preferential_price_icon.png
│ ├── goods_search
│ │ └── clear_history_icon.png
│ ├── help_center
│ │ └── link_right_arrow.png
│ ├── home
│ │ └── home_bg.jpg
│ ├── my_collection
│ │ ├── collection_empty_icon.png
│ │ └── del_collection.png
│ ├── my_commission
│ │ └── explain_icon.png
│ ├── order_detail
│ │ ├── point_icon.png
│ │ └── sending_status_icon.png
│ ├── orders_common
│ │ ├── orders_empty.png
│ │ ├── orders_no_pay_empty.png
│ │ └── orders_no_send_empty.png
│ ├── pay_info
│ │ ├── prompt_icon.png
│ │ └── reward_tip_icon.png
│ ├── point
│ │ └── my_points_bg.jpg
│ ├── red_package
│ │ └── my_package_bg.jpg
│ ├── shopping_bag
│ │ ├── del_goods_item_icon.png
│ │ └── shopping_bag_empty_icon.png
│ ├── store_pay
│ │ ├── history_pay_icon.png
│ │ ├── refresh_icon.png
│ │ └── shop_pay_bg_code.jpg
│ ├── store_pay_result
│ │ └── pay_success.png
│ ├── store_search
│ │ └── empty_store_icon.png
│ ├── temp_coupon.jpg
│ ├── temp_coupon_out_of_date.jpg
│ ├── test_img.jpg
│ ├── test_img2.jpg
│ ├── test_img3.jpg
│ ├── user_index
│ │ ├── amount_arrow.png
│ │ ├── amount_cut_down_arrow.png
│ │ ├── collection_icon.png
│ │ ├── commission_icon.png
│ │ ├── exit.png
│ │ ├── help_icon.png
│ │ ├── invite_friend_qr_code.png
│ │ ├── location_icon.png
│ │ ├── message.png
│ │ ├── pay_icon.png
│ │ ├── receive_goods_icon.png
│ │ ├── record_list_line.png
│ │ ├── send_goods_icon.png
│ │ ├── special.png
│ │ ├── user_card.jpg
│ │ └── user_data_icon.png
│ └── user_info
│ │ ├── female_icon.png
│ │ ├── male_icon.png
│ │ ├── mobile_icon.png
│ │ ├── sex_btn.png
│ │ ├── sex_btn_active.png
│ │ └── toggle_icon.png
├── main.js
├── pages
│ ├── brand
│ │ ├── brand.vue
│ │ ├── goods_detail.vue
│ │ ├── goods_list.vue
│ │ ├── goods_search.vue
│ │ └── store_search.vue
│ ├── home
│ │ └── home.vue
│ ├── shopping_bag
│ │ ├── delievry_time.vue
│ │ ├── payment_list.vue
│ │ ├── select_coupon.vue
│ │ ├── settle_accounts.vue
│ │ └── shopping_bag.vue
│ ├── store_pay
│ │ ├── checkstand_pay_info.vue
│ │ ├── history_pay.vue
│ │ ├── pay_info.vue
│ │ ├── store_pay.vue
│ │ └── store_pay_result.vue
│ └── user
│ │ ├── address_add.vue
│ │ ├── address_edit.vue
│ │ ├── address_manager.vue
│ │ ├── apply_return.vue
│ │ ├── bind_phone_number.vue
│ │ ├── blance.vue
│ │ ├── coupon.vue
│ │ ├── coupon_no_use.vue
│ │ ├── coupon_overdue.vue
│ │ ├── help_center.vue
│ │ ├── help_center_content.vue
│ │ ├── login.vue
│ │ ├── my_collection.vue
│ │ ├── my_commission.vue
│ │ ├── order_detail.vue
│ │ ├── orders_all.vue
│ │ ├── orders_no_pay.vue
│ │ ├── orders_no_receive.vue
│ │ ├── orders_no_send.vue
│ │ ├── point.vue
│ │ ├── red_package.vue
│ │ ├── user_index.vue
│ │ ├── user_info.vue
│ │ └── wx_login.vue
├── plugins
│ ├── date
│ │ ├── date.css
│ │ └── date.js
│ ├── iscroll-5.js
│ ├── iscroll-probe.js
│ ├── iscroll.js
│ ├── lazysizes.min.js
│ └── swiper
│ │ ├── swiper.min.css
│ │ └── swiper.min.js
├── router
│ └── index.js
├── store
│ ├── index.js
│ └── mutations.js
└── styles
│ └── common.css
└── static
├── .gitkeep
└── js
└── vendor.dll.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-2"
5 | ],
6 | "plugins": ["transform-runtime"],
7 | "comments": false,
8 | "env": {
9 | "test": {
10 | "presets": ["env", "stage-2"],
11 | "plugins": [ "istanbul" ]
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 4
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserlist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # sanse_wap_v2
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
22 |
--------------------------------------------------------------------------------
/api/includes/cls_weixin_login.php:
--------------------------------------------------------------------------------
1 | db = $db;
15 | $this->ecs = $ecs;
16 | $this->user_id = $user_id;
17 | $this->user_obj = $user;
18 | $openid = $_COOKIE['OS']['openid'];
19 | if(!$openid){
20 | $openid = $_COOKIE['WeChat']['openid'];
21 | }
22 | if($openid){
23 | $this->openid = $openid;
24 | }
25 |
26 | }
27 | function getOpenInfo(){
28 | $user_agent = $_SERVER['HTTP_USER_AGENT'];
29 | $agent = strtolower($user_agent);
30 | if (!strpos($user_agent, 'MicroMessenger')) {
31 | return false;
32 | }
33 | if(!$this->openid){
34 | if( ($_GET['code'] && !$_GET['weixin_no']) or (!$_GET['code'] && $_GET['weixin_no'])){
35 | return false;
36 | }
37 | if($_GET['code'] && $_GET['weixin_no']){
38 |
39 | $open_info = getOpenInfo();
40 | $this->openid = $open_info['openid'];
41 | setcookie('OS[openid]',$open_info['openid']);
42 | setcookie('WeChat[openid]',$open_info['openid']);
43 | }else{
44 | weixin_authorize(false);exit;
45 | }
46 | }
47 | }
48 | function login(){
49 | global $is_wechat_login;
50 | if($_GET['is_ajax']){
51 | return false;
52 | }
53 |
54 | $php_self = isset($_SERVER['URL'])?$_SERVER['URL']:$_SERVER['PHP_SELF'];
55 | $php_self = basename($php_self,'.php');
56 | if($php_self == 'outer_source' || $php_self == 'bind_user_code' || $php_self == 'applogin'){
57 | $this->getOpenInfo();return ;
58 | }
59 |
60 | if($this->user_id){
61 | return $this->user_id;
62 | }
63 | if($this->openid){
64 | $wx_user_info = getWxExistUser($this->openid);
65 | if($wx_user_info && $this->user_id){
66 | if($wx_user_info['user_id'] != $this->user_id){
67 | $user_id = $this->wx_authorize_login($wx_user_info);
68 | if($user_id){
69 | echo "";exit;
70 | }
71 | }
72 | }
73 |
74 |
75 | }
76 |
77 | if($_GET['is_authorize']){ // 手动授权判断,防止被自动登陆拦截 授权逻辑
78 | return false;
79 | }
80 | $user_agent = $_SERVER['HTTP_USER_AGENT'];
81 | $agent = strtolower($user_agent);
82 | if (!strpos($user_agent, 'MicroMessenger')) {
83 | return false;
84 | }
85 | $http_referer = $_SERVER['HTTP_REFERER'];
86 | if($http_referer && !$_GET['code'] && !$_GET['weixin_no']){
87 | return false;
88 | }
89 |
90 | if( ($_GET['code'] && !$_GET['weixin_no']) or (!$_GET['code'] && $_GET['weixin_no'])){
91 | return false;
92 | }
93 | if($_GET['code'] && $_GET['weixin_no']){
94 | $open_info = getOpenInfo();
95 | $this->openid = $open_info['openid'];
96 | setcookie('OS[openid]',$open_info['openid']);
97 | setcookie('WeChat[openid]',$open_info['openid']);
98 | $wx_user_info = getWxExistUser($open_info['openid']);
99 | if($wx_user_info){
100 | $user_id = $this->wx_authorize_login($wx_user_info);
101 | return $user_id;
102 | // if($user_id){
103 | // echo "";exit;
104 | // }
105 | }else{
106 | return false;
107 | }
108 | }else{
109 | weixin_authorize(false);exit;
110 |
111 |
112 | }
113 | return false;
114 | }
115 | function wx_authorize_login($wx_user_info){
116 | $weixin_src = "AUTH";
117 | $user_id = createWxUser($wx_user_info,$weixin_src,true);//授权 AUTH 关注 SUBS
118 |
119 | if(!$user_id){
120 | return false;
121 | }
122 | // $this->user_obj->set_session($user_id);
123 | // $this->user_obj->set_cookie($user_id, $remember);
124 | update_user_info();
125 | return $user_id;
126 | }
127 | }
128 | ?>
--------------------------------------------------------------------------------
/api/log/2017-08-01 - jsApiParameters.txt:
--------------------------------------------------------------------------------
1 | 127.0.0.1 2017-08-01 11:29:33 http://www.sanse.com/sanse_wap_v2/api/wx_pay.php?pay_code=MTZ8fDAwMDAxMTcwODAxMTEzMzUzOTQzMjk5fHwxMi4wMXx8MTUwMTU1ODE3MXx8NWNiNDg0YzYzYTlkMDliNGYwNWNmNWZhZGM2NjQ1Mzg= {"appId":"wxbc90f9464e0d6043","nonceStr":"nxwt4wjqegto5exlblv9b6fyni2zbuie","package":"prepay_id=wx20170801113603c911e8cb780860127299","signType":"MD5","timeStamp":"1501558173","paySign":"32F5E1F704B2311E3C0C65916922790B"}
2 |
--------------------------------------------------------------------------------
/api/wx_login.php:
--------------------------------------------------------------------------------
1 | login();
63 | if($res > 0){
64 | echo $res;
65 | }else{
66 | echo '异常';
67 | }
68 | }elseif($act == 'bind_weixin_authorize'){
69 | weixin_authorize(true,'act=get_wechat_msg&is_authorize=1');
70 | }elseif($act == 'get_wechat_msg'){
71 | $open_info = getOpenInfo();
72 | $wx_user_info = getWxAuthorizeUser($open_info);
73 |
74 | if(!$wx_user_info['openid']){
75 | echo "";exit;
77 | }
78 | if($order['return_code'] == 'FAIL'){
79 | error_write_log(json_encode($order),'wap_req_weixin_3.36_pay_error');
80 | echo json_encode(array('error'=>1,'msg'=>'505 参数异常,请联系管理员 '));exit;
81 | // echo "";exit;
82 | }
83 | //echo '统一下单支付单信息
';
84 | // printf_info($order);
85 | $jsApiParameters = $tools->GetJsApiParameters($order);
86 | // $jsApiParameters = json_decode($jsApiParameters,true);
87 | write_log($jsApiParameters,'jsApiParameters');
88 | echo $jsApiParameters;exit();
89 | // echo json_encode(array('order_id'=>$order_id ,'pay_info'=>$jsApiParameters));exit();
90 | }
91 |
92 |
93 | function validateOrder($pay_code){
94 | global $ecs,$db;
95 | // $pay_code = $_GET['pay_code'];
96 | $pay_info = explode('||',base64_decode($pay_code));
97 | $payment_id = $pay_info[0];
98 | $order_sn = $pay_info[1];
99 | $order_amount = $pay_info[2];
100 | $time = $pay_info[3];
101 | $sign = $pay_info[4];
102 | $sign_temp = get_sign_code($payment_id.$order_sn.$order_amount.$time);
103 | $return = array('error'=>0,'msg'=>'');
104 | $return['pay_info'] = array('payment_id'=>$payment_id,'order_sn'=>$order_sn,'order_amount'=>$order_amount);
105 | if($sign_temp != $sign){
106 | $return['error'] = 1 ;
107 | $return['msg'] = '验证失败,请返回';
108 | return $return;exit;
109 | }
110 |
111 | $order_info = $db->getRow("select * from ".$ecs->table('order_info')." where order_sn='".$order_sn."' ");
112 | if(!$order_info){
113 | $return['error'] = 1 ;
114 | $return['msg'] = '订单不存在';
115 | return $return;exit;
116 | }
117 | if($order_info['pay_status']==2){
118 | $return['error'] = 2 ;
119 | $return['msg'] = '订单已支付';
120 | // $return['order_id'] = $order_id ;
121 | return $return;exit;
122 | }
123 | return $return;exit;
124 | }
125 | ?>
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | process.env.NODE_ENV = 'production'
4 |
5 | var ora = require('ora')
6 | var rm = require('rimraf')
7 | var path = require('path')
8 | var chalk = require('chalk')
9 | var webpack = require('webpack')
10 | var config = require('../config')
11 | var webpackConfig = require('./webpack.prod.conf')
12 |
13 | var spinner = ora('building for production...')
14 | spinner.start()
15 |
16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
17 | if (err) throw err
18 | webpack(webpackConfig, function (err, stats) {
19 | spinner.stop()
20 | if (err) throw err
21 | process.stdout.write(stats.toString({
22 | colors: true,
23 | modules: false,
24 | children: false,
25 | chunks: false,
26 | chunkModules: false
27 | }) + '\n\n')
28 |
29 | console.log(chalk.cyan(' Build complete.\n'))
30 | console.log(chalk.yellow(
31 | ' Tip: built files are meant to be served over an HTTP server.\n' +
32 | ' Opening index.html over file:// won\'t work.\n'
33 | ))
34 | })
35 | })
36 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var chalk = require('chalk')
2 | var semver = require('semver')
3 | var packageConfig = require('../package.json')
4 | var shell = require('shelljs')
5 | function exec (cmd) {
6 | return require('child_process').execSync(cmd).toString().trim()
7 | }
8 |
9 | var versionRequirements = [
10 | {
11 | name: 'node',
12 | currentVersion: semver.clean(process.version),
13 | versionRequirement: packageConfig.engines.node
14 | },
15 | ]
16 |
17 | if (shell.which('npm')) {
18 | versionRequirements.push({
19 | name: 'npm',
20 | currentVersion: exec('npm --version'),
21 | versionRequirement: packageConfig.engines.npm
22 | })
23 | }
24 |
25 | module.exports = function () {
26 | var warnings = []
27 | for (var i = 0; i < versionRequirements.length; i++) {
28 | var mod = versionRequirements[i]
29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
30 | warnings.push(mod.name + ': ' +
31 | chalk.red(mod.currentVersion) + ' should be ' +
32 | chalk.green(mod.versionRequirement)
33 | )
34 | }
35 | }
36 |
37 | if (warnings.length) {
38 | console.log('')
39 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
40 | console.log()
41 | for (var i = 0; i < warnings.length; i++) {
42 | var warning = warnings[i]
43 | console.log(' ' + warning)
44 | }
45 | console.log()
46 | process.exit(1)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | require('eventsource-polyfill')
3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 |
5 | hotClient.subscribe(function (event) {
6 | if (event.action === 'reload') {
7 | window.location.reload()
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/build/dev-server.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | var config = require('../config')
4 | if (!process.env.NODE_ENV) {
5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
6 | }
7 |
8 | var opn = require('opn')
9 | var path = require('path')
10 | var express = require('express')
11 | var webpack = require('webpack')
12 | var proxyMiddleware = require('http-proxy-middleware')
13 | var webpackConfig = require('./webpack.dev.conf')
14 |
15 | // default port where dev server listens for incoming traffic
16 | var port = process.env.PORT || config.dev.port
17 | // automatically open browser, if not set will be false
18 | var autoOpenBrowser = !!config.dev.autoOpenBrowser
19 | // Define HTTP proxies to your custom API backend
20 | // https://github.com/chimurai/http-proxy-middleware
21 | var proxyTable = config.dev.proxyTable
22 |
23 | var app = express()
24 | var compiler = webpack(webpackConfig)
25 |
26 | var devMiddleware = require('webpack-dev-middleware')(compiler, {
27 | publicPath: webpackConfig.output.publicPath,
28 | quiet: true
29 | })
30 |
31 | var hotMiddleware = require('webpack-hot-middleware')(compiler, {
32 | log: () => {}
33 | })
34 | // force page reload when html-webpack-plugin template changes
35 | compiler.plugin('compilation', function (compilation) {
36 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
37 | hotMiddleware.publish({ action: 'reload' })
38 | cb()
39 | })
40 | })
41 |
42 | // proxy api requests
43 | Object.keys(proxyTable).forEach(function (context) {
44 | var options = proxyTable[context]
45 | if (typeof options === 'string') {
46 | options = { target: options }
47 | }
48 | app.use(proxyMiddleware(options.filter || context, options))
49 | })
50 |
51 | // handle fallback for HTML5 history API
52 | app.use(require('connect-history-api-fallback')())
53 |
54 | // serve webpack bundle output
55 | app.use(devMiddleware)
56 |
57 | // enable hot-reload and state-preserving
58 | // compilation error display
59 | app.use(hotMiddleware)
60 |
61 | // serve pure static assets
62 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
63 | app.use(staticPath, express.static('./static'))
64 |
65 | var uri = 'http://localhost:' + port
66 |
67 | var _resolve
68 | var readyPromise = new Promise(resolve => {
69 | _resolve = resolve
70 | })
71 |
72 | console.log('> Starting dev server...')
73 | devMiddleware.waitUntilValid(() => {
74 | console.log('> Listening at ' + uri + '\n')
75 | // when env is testing, don't need open it
76 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
77 | opn(uri)
78 | }
79 | _resolve()
80 | })
81 |
82 | var server = app.listen(port)
83 |
84 | module.exports = {
85 | ready: readyPromise,
86 | close: () => {
87 | server.close()
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
4 |
5 | exports.assetsPath = function (_path) {
6 | var assetsSubDirectory = process.env.NODE_ENV === 'production'
7 | ? config.build.assetsSubDirectory
8 | : config.dev.assetsSubDirectory
9 | return path.posix.join(assetsSubDirectory, _path)
10 | }
11 |
12 | exports.cssLoaders = function (options) {
13 | options = options || {}
14 |
15 | var cssLoader = {
16 | loader: 'css-loader',
17 | options: {
18 | minimize: process.env.NODE_ENV === 'production',
19 | sourceMap: options.sourceMap
20 | }
21 | }
22 |
23 | // generate loader string to be used with extract text plugin
24 | function generateLoaders (loader, loaderOptions) {
25 | var loaders = [cssLoader]
26 | if (loader) {
27 | loaders.push({
28 | loader: loader + '-loader',
29 | options: Object.assign({}, loaderOptions, {
30 | sourceMap: options.sourceMap
31 | })
32 | })
33 | }
34 |
35 | // Extract CSS when that option is specified
36 | // (which is the case during production build)
37 | if (options.extract) {
38 | return ExtractTextPlugin.extract({
39 | use: loaders,
40 | fallback: 'vue-style-loader'
41 | })
42 | } else {
43 | return ['vue-style-loader'].concat(loaders)
44 | }
45 | }
46 |
47 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
48 | return {
49 | css: generateLoaders(),
50 | postcss: generateLoaders(),
51 | less: generateLoaders('less'),
52 | sass: generateLoaders('sass', { indentedSyntax: true }),
53 | scss: generateLoaders('sass'),
54 | stylus: generateLoaders('stylus'),
55 | styl: generateLoaders('stylus')
56 | }
57 | }
58 |
59 | // Generate loaders for standalone style files (outside of .vue)
60 | exports.styleLoaders = function (options) {
61 | var output = []
62 | var loaders = exports.cssLoaders(options)
63 | for (var extension in loaders) {
64 | var loader = loaders[extension]
65 | output.push({
66 | test: new RegExp('\\.' + extension + '$'),
67 | use: loader
68 | })
69 | }
70 | return output
71 | }
72 |
--------------------------------------------------------------------------------
/build/vendor-manifest.json:
--------------------------------------------------------------------------------
1 | {"name":"vendor_library","content":{"./node_modules/.npminstall/axios/0.16.2/axios/lib/utils.js":{"id":0,"meta":{}},"./node_modules/.npminstall/process/0.11.10/process/browser.js":{"id":1,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/defaults.js":{"id":2,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/adapters/xhr.js":{"id":3,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/cancel/Cancel.js":{"id":4,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/cancel/isCancel.js":{"id":5,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/createError.js":{"id":6,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/bind.js":{"id":7,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/index.js":{"id":8,"meta":{}},"./node_modules/.npminstall/vue-router/2.7.0/vue-router/dist/vue-router.esm.js":{"id":9,"meta":{"harmonyModule":true},"exports":["default"]},"./node_modules/.npminstall/vue/2.3.4/vue/dist/vue.common.js":{"id":10,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/axios.js":{"id":11,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/cancel/CancelToken.js":{"id":12,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/Axios.js":{"id":13,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/InterceptorManager.js":{"id":14,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/dispatchRequest.js":{"id":15,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/enhanceError.js":{"id":16,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/settle.js":{"id":17,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/core/transformData.js":{"id":18,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/btoa.js":{"id":19,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/buildURL.js":{"id":20,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/combineURLs.js":{"id":21,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/cookies.js":{"id":22,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/isAbsoluteURL.js":{"id":23,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/isURLSameOrigin.js":{"id":24,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/normalizeHeaderName.js":{"id":25,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/parseHeaders.js":{"id":26,"meta":{}},"./node_modules/.npminstall/axios/0.16.2/axios/lib/helpers/spread.js":{"id":27,"meta":{}},"./node_modules/.npminstall/is-buffer/1.1.5/is-buffer/index.js":{"id":28,"meta":{}},"./node_modules/.npminstall/webpack/2.7.0/webpack/buildin/global.js":{"id":29,"meta":{}}}}
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var config = require('../config')
3 | var isProduction = process.env.NODE_ENV === 'production'
4 |
5 | module.exports = {
6 | loaders: utils.cssLoaders({
7 | sourceMap: isProduction
8 | ? config.build.productionSourceMap
9 | : config.dev.cssSourceMap,
10 | extract: isProduction
11 | })
12 | }
13 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var utils = require('./utils')
3 | var config = require('../config')
4 | var vueLoaderConfig = require('./vue-loader.conf')
5 | var webpack = require("webpack")
6 |
7 | function resolve (dir) {
8 | return path.join(__dirname, '..', dir)
9 | }
10 |
11 | module.exports = {
12 | entry: {
13 | app: './src/main.js'
14 | },
15 | output: {
16 | path: config.build.assetsRoot,
17 | filename: '[name].js',
18 | publicPath: process.env.NODE_ENV === 'production'
19 | ? config.build.assetsPublicPath
20 | : config.dev.assetsPublicPath
21 | },
22 | resolve: {
23 | extensions: ['.js', '.vue', '.json'],
24 | alias: {
25 | 'vue$': 'vue/dist/vue.esm.js',
26 | '@': resolve('src')
27 | }
28 | },
29 | module: {
30 | rules: [
31 | {
32 | test: /\.vue$/,
33 | loader: 'vue-loader',
34 | options: vueLoaderConfig
35 | },
36 | {
37 | test: /\.js$/,
38 | loader: 'babel-loader',
39 | include: [resolve('src'), resolve('test')]
40 | },
41 | {
42 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
43 | loader: 'url-loader',
44 | options: {
45 | limit: 10000,
46 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
47 | }
48 | },
49 | {
50 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
51 | loader: 'url-loader',
52 | options: {
53 | limit: 10000,
54 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
55 | }
56 | }
57 | ]
58 | },
59 | plugins: [
60 | new webpack.ProvidePlugin({
61 | jQuery: "jquery",
62 | $: "jquery"
63 | })
64 | ]
65 | }
66 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var webpack = require('webpack')
3 | var config = require('../config')
4 | var merge = require('webpack-merge')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | var HtmlWebpackPlugin = require('html-webpack-plugin')
7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8 |
9 | // add hot-reload related code to entry chunks
10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
12 | })
13 |
14 | module.exports = merge(baseWebpackConfig, {
15 | module: {
16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
17 | },
18 | // cheap-module-eval-source-map is faster for development
19 | devtool: '#cheap-module-eval-source-map',
20 | plugins: [
21 | new webpack.DefinePlugin({
22 | 'process.env': config.dev.env
23 | }),
24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
25 | new webpack.HotModuleReplacementPlugin(),
26 | new webpack.NoEmitOnErrorsPlugin(),
27 | // https://github.com/ampedandwired/html-webpack-plugin
28 | new HtmlWebpackPlugin({
29 | filename: 'index.html',
30 | template: 'index.html',
31 | inject: true
32 | }),
33 | new FriendlyErrorsPlugin()
34 | ]
35 | })
36 |
--------------------------------------------------------------------------------
/build/webpack.dll.conf.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const webpack = require('webpack');
3 |
4 | module.exports = {
5 | entry: {
6 | vendor: ['vue/dist/vue.common.js','vue-router', 'axios']
7 | },
8 | output: {
9 | path: path.join(__dirname, '../static/js'),
10 | filename: '[name].dll.js',
11 | library: '[name]_library' // vendor.dll.js中暴露出的全局变量名
12 | },
13 | plugins: [
14 | new webpack.DllPlugin({
15 | path: path.join(__dirname, '.', '[name]-manifest.json'),
16 | name: '[name]_library'
17 | }),
18 | new webpack.optimize.UglifyJsPlugin({
19 | compress: {
20 | warnings: false
21 | }
22 | })
23 | ]
24 | };
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var utils = require('./utils')
3 | var webpack = require('webpack')
4 | var config = require('../config')
5 | var merge = require('webpack-merge')
6 | var baseWebpackConfig = require('./webpack.base.conf')
7 | var CopyWebpackPlugin = require('copy-webpack-plugin')
8 | var HtmlWebpackPlugin = require('html-webpack-plugin')
9 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
10 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
11 |
12 | var env = config.build.env
13 |
14 | var webpackConfig = merge(baseWebpackConfig, {
15 | module: {
16 | rules: utils.styleLoaders({
17 | sourceMap: config.build.productionSourceMap,
18 | extract: true
19 | })
20 | },
21 | devtool: config.build.productionSourceMap ? '#source-map' : false,
22 | output: {
23 | path: config.build.assetsRoot,
24 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
25 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
26 | },
27 | plugins: [
28 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
29 | new webpack.DefinePlugin({
30 | 'process.env': env
31 | }),
32 | new webpack.optimize.UglifyJsPlugin({
33 | compress: {
34 | warnings: false
35 | },
36 | sourceMap: true
37 | }),
38 | // extract css into its own file
39 | new ExtractTextPlugin({
40 | filename: utils.assetsPath('css/[name].[contenthash].css')
41 | }),
42 | // Compress extracted CSS. We are using this plugin so that possible
43 | // duplicated CSS from different components can be deduped.
44 | new OptimizeCSSPlugin({
45 | cssProcessorOptions: {
46 | safe: true
47 | }
48 | }),
49 | // generate dist index.html with correct asset hash for caching.
50 | // you can customize output by editing /index.html
51 | // see https://github.com/ampedandwired/html-webpack-plugin
52 | new HtmlWebpackPlugin({
53 | filename: config.build.index,
54 | template: 'index.html',
55 | inject: true,
56 | minify: {
57 | removeComments: true,
58 | collapseWhitespace: true,
59 | removeAttributeQuotes: true
60 | // more options:
61 | // https://github.com/kangax/html-minifier#options-quick-reference
62 | },
63 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
64 | chunksSortMode: 'dependency'
65 | }),
66 | // split vendor js into its own file
67 | new webpack.optimize.CommonsChunkPlugin({
68 | name: 'vendor',
69 | minChunks: function (module, count) {
70 | // any required modules inside node_modules are extracted to vendor
71 | return (
72 | module.resource &&
73 | /\.js$/.test(module.resource) &&
74 | module.resource.indexOf(
75 | path.join(__dirname, '../node_modules')
76 | ) === 0
77 | )
78 | }
79 | }),
80 | // extract webpack runtime and module manifest to its own file in order to
81 | // prevent vendor hash from being updated whenever app bundle is updated
82 | new webpack.optimize.CommonsChunkPlugin({
83 | name: 'manifest',
84 | chunks: ['vendor']
85 | }),
86 | // copy custom static assets
87 | new CopyWebpackPlugin([
88 | {
89 | from: path.resolve(__dirname, '../static'),
90 | to: config.build.assetsSubDirectory,
91 | ignore: ['.*']
92 | }
93 | ])
94 | ]
95 | })
96 |
97 | if (config.build.productionGzip) {
98 | var CompressionWebpackPlugin = require('compression-webpack-plugin')
99 |
100 | webpackConfig.plugins.push(
101 | new CompressionWebpackPlugin({
102 | asset: '[path].gz[query]',
103 | algorithm: 'gzip',
104 | test: new RegExp(
105 | '\\.(' +
106 | config.build.productionGzipExtensions.join('|') +
107 | ')$'
108 | ),
109 | threshold: 10240,
110 | minRatio: 0.8
111 | })
112 | )
113 | }
114 |
115 | if (config.build.bundleAnalyzerReport) {
116 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
117 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
118 | }
119 |
120 | module.exports = webpackConfig
121 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"',
6 | API_ROOT: '"/api"',
7 | API_WX_PAY_ROOT: '"/wx_pay_dev"'
8 | })
9 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../dist/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../dist'),
9 | assetsSubDirectory: 'static',
10 | // assetsPublicPath: '/vue_mobile/',
11 | assetsPublicPath: '/sanse_wap_v2/dist/',
12 | productionSourceMap: true,
13 | // Gzip off by default as many popular static hosts such as
14 | // Surge or Netlify already gzip all static assets for you.
15 | // Before setting to `true`, make sure to:
16 | // npm install --save-dev compression-webpack-plugin
17 | productionGzip: false,
18 | productionGzipExtensions: ['js', 'css'],
19 | // Run the build command with an extra argument to
20 | // View the bundle analyzer report after build finishes:
21 | // `npm run build --report`
22 | // Set to `true` or `false` to always turn it on or off
23 | bundleAnalyzerReport: process.env.npm_config_report
24 | },
25 | dev: {
26 | env: require('./dev.env'),
27 | port: 8080,
28 | autoOpenBrowser: true,
29 | assetsSubDirectory: 'static',
30 | assetsPublicPath: '/',
31 | proxyTable: {
32 | '/api': {
33 |
34 | // target: 'http://inno.mo2o.com.cn:8092/int_app/VER_SANSE_1_2_5/APPSERVICE.svc',
35 | target: 'http://inno.mo2o.com.cn:8092/int_app/VER_SANSE_1_2_6/APPSERVICE.svc',
36 | changeOrigin: true,
37 | pathRewrite: {
38 | '^/api': ''
39 | }
40 | },
41 | '/wx_pay_dev': {
42 |
43 | // target: 'http://inno.mo2o.com.cn:8092/int_app/VER_SANSE_1_2_5/APPSERVICE.svc',
44 | target: 'http://www.sanse.com/sanse_wap_v2/api',
45 | changeOrigin: true,
46 | pathRewrite: {
47 | '^/wx_pay_dev': ''
48 | }
49 | }
50 | },
51 | // CSS Sourcemaps off by default because relative paths are "buggy"
52 | // with this option, according to the CSS-Loader README
53 | // (https://github.com/webpack/css-loader#sourcemaps)
54 | // In our experience, they generally work as expected,
55 | // just be aware of this issue when enabling this option.
56 | cssSourceMap: false
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"',
3 | API_ROOT: '"http://inno.mo2o.com.cn:8092/int_app/VER_SANSE_1_2_6/APPSERVICE.svc"',
4 | API_WX_PAY_ROOT: '"http://fortest.innourl.com/sanse_wap_v2/api"'
5 | // API_WX_PAY_ROOT: '"http://fortest.innourl.com/"'
6 | }
7 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Sanse Wap
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sanse_wap_v2",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "x-shadow-x <2509344578@qq.com>",
6 | "private": true,
7 | "scripts": {
8 | "dev": "node build/dev-server.js",
9 | "start": "node build/dev-server.js",
10 | "build": "node build/build.js",
11 | "build:dll": "webpack --config build/webpack.dll.conf.js"
12 | },
13 | "dependencies": {
14 | "axios": "^0.16.1",
15 | "eve": "^0.5.4",
16 | "fastclick": "^1.0.6",
17 | "jquery": "^3.2.1",
18 | "vue": "^2.2.2",
19 | "vue-router": "^2.3.0",
20 | "vuex": "^2.3.1"
21 | },
22 | "devDependencies": {
23 | "autoprefixer": "^6.7.2",
24 | "autoprefixer-loader": "^3.2.0",
25 | "babel-core": "^6.22.1",
26 | "babel-loader": "^6.2.10",
27 | "babel-plugin-transform-runtime": "^6.22.0",
28 | "babel-preset-env": "^1.2.1",
29 | "babel-preset-es2015": "^6.0.0",
30 | "babel-preset-stage-2": "^6.22.0",
31 | "babel-register": "^6.22.0",
32 | "babel-runtime": "^6.23.0",
33 | "chalk": "^1.1.3",
34 | "connect-history-api-fallback": "^1.3.0",
35 | "copy-webpack-plugin": "^4.0.1",
36 | "css-loader": "^0.26.1",
37 | "eventsource-polyfill": "^0.9.6",
38 | "express": "^4.14.1",
39 | "extract-text-webpack-plugin": "^2.0.0",
40 | "file-loader": "^0.10.0",
41 | "friendly-errors-webpack-plugin": "^1.1.3",
42 | "html-webpack-plugin": "^2.28.0",
43 | "http-proxy-middleware": "^0.17.3",
44 | "node-sass": "^4.5.3",
45 | "opn": "^4.0.2",
46 | "optimize-css-assets-webpack-plugin": "^1.3.0",
47 | "ora": "^1.1.0",
48 | "rimraf": "^2.6.0",
49 | "sass-loader": "^6.0.5",
50 | "semver": "^5.3.0",
51 | "shelljs": "^0.7.6",
52 | "url-loader": "^0.5.8",
53 | "vue-loader": "^11.1.4",
54 | "vue-style-loader": "^2.0.0",
55 | "vue-template-compiler": "^2.2.4",
56 | "webpack": "^2.2.1",
57 | "webpack-bundle-analyzer": "^2.2.1",
58 | "webpack-dev-middleware": "^1.10.0",
59 | "webpack-hot-middleware": "^2.16.1",
60 | "webpack-merge": "^2.6.1"
61 | },
62 | "engines": {
63 | "node": ">= 4.0.0",
64 | "npm": ">= 3.0.0"
65 | },
66 | "browserslist": [
67 | "> 1%",
68 | "last 2 versions",
69 | "not ie <= 8"
70 | ]
71 | }
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
61 |
62 |
116 |
--------------------------------------------------------------------------------
/src/components/common/alert.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
{{tipTitle}}
8 |
{{tipContent}}
9 |
10 |
11 | 知道了
12 |
13 |
14 |
15 |
16 |
17 |
18 |
42 |
43 |
107 |
--------------------------------------------------------------------------------
/src/components/common/confirm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
{{tipTitle}}
7 |
{{tipContent}}
8 |
9 |
10 | 确认
11 | 取消
12 |
13 |
14 |
15 |
16 |
17 |
18 |
42 |
43 |
118 |
--------------------------------------------------------------------------------
/src/components/common/err_tip.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{errText}}
4 |
5 |
6 |
7 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/components/common/filter_tab.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | {{item.text}}
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
45 |
46 |
63 |
--------------------------------------------------------------------------------
/src/components/common/footer_bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
28 |
29 |
30 |
54 |
55 |
146 |
--------------------------------------------------------------------------------
/src/components/common/load.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
34 |
--------------------------------------------------------------------------------
/src/components/common/num_tip.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{tipNum}}
4 | {{tipNum}}
5 |
6 |
7 |
8 |
22 |
23 |
--------------------------------------------------------------------------------
/src/components/common/tree_node.vue:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
![]()
8 |
9 | {{nodeData.name}}
10 |
11 |
{{nodeData.name}}
12 |
13 |
14 |
15 |
19 |
20 |
21 |
22 |
23 |
53 |
54 |
106 |
--------------------------------------------------------------------------------
/src/config/flexible.js:
--------------------------------------------------------------------------------
1 | !function(a,b){function c(){var b=f.getBoundingClientRect().width;b/i>540&&(b=540*i);var c=b/10;f.style.fontSize=c+"px",k.rem=a.rem=c}var d,e=a.document,f=e.documentElement,g=e.querySelector('meta[name="viewport"]'),h=e.querySelector('meta[name="flexible"]'),i=0,j=0,k=b.flexible||(b.flexible={});if(g){console.warn("将根据已有的meta标签来设置缩放比例");var l=g.getAttribute("content").match(/initial\-scale=([\d\.]+)/);l&&(j=parseFloat(l[1]),i=parseInt(1/j))}else if(h){var m=h.getAttribute("content");if(m){var n=m.match(/initial\-dpr=([\d\.]+)/),o=m.match(/maximum\-dpr=([\d\.]+)/);n&&(i=parseFloat(n[1]),j=parseFloat((1/i).toFixed(2))),o&&(i=parseFloat(o[1]),j=parseFloat((1/i).toFixed(2)))}}if(!i&&!j){var p=(a.navigator.appVersion.match(/android/gi),a.navigator.appVersion.match(/iphone/gi)),q=a.devicePixelRatio;i=p?q>=3&&(!i||i>=3)?3:q>=2&&(!i||i>=2)?2:1:1,j=1/i}if(f.setAttribute("data-dpr",i),!g)if(g=e.createElement("meta"),g.setAttribute("name","viewport"),g.setAttribute("content","initial-scale="+j+", maximum-scale="+j+", minimum-scale="+j+", user-scalable=no"),f.firstElementChild)f.firstElementChild.appendChild(g);else{var r=e.createElement("div");r.appendChild(g),e.write(r.innerHTML)}a.addEventListener("resize",function(){clearTimeout(d),d=setTimeout(c,300)},!1),a.addEventListener("pageshow",function(a){a.persisted&&(clearTimeout(d),d=setTimeout(c,300))},!1),"complete"===e.readyState?e.body.style.fontSize=12*i+"px":e.addEventListener("DOMContentLoaded",function(){e.body.style.fontSize=12*i+"px"},!1),c(),k.dpr=a.dpr=i,k.refreshRem=c,k.rem2px=function(a){var b=parseFloat(a)*this.rem;return"string"==typeof a&&a.match(/rem$/)&&(b+="px"),b},k.px2rem=function(a){var b=parseFloat(a)/this.rem;return"string"==typeof a&&a.match(/px$/)&&(b+="rem"),b}}(window,window.lib||(window.lib={}));
--------------------------------------------------------------------------------
/src/config/flexible_css.js:
--------------------------------------------------------------------------------
1 | !function(){var a="@charset \"utf-8\";html{color:#000;background:#fff;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}html *{outline:0;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}html,body{font-family:sans-serif}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{margin:0;padding:0}input,select,textarea{font-size:100%}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}abbr,acronym{border:0;font-variant:normal}del{text-decoration:line-through}address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:500}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:500}q:before,q:after{content:''}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}a:hover{text-decoration:underline}ins,a{text-decoration:none}",b=document.createElement("style");if(document.getElementsByTagName("head")[0].appendChild(b),b.styleSheet)b.styleSheet.disabled||(b.styleSheet.cssText=a);else try{b.innerHTML=a}catch(c){b.innerText=a}}();
--------------------------------------------------------------------------------
/src/config/helper.js:
--------------------------------------------------------------------------------
1 | function setCookie(cname, cvalue, exdays) {
2 | var d = new Date();
3 | d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
4 | var expires = "expires=" + d.toUTCString();
5 | document.cookie = cname + "=" + cvalue + "; " + expires;
6 | }
7 |
8 | function getCookie(name) {
9 | var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
10 | if (arr = document.cookie.match(reg))
11 | return unescape(arr[2]);
12 | else
13 | return null;
14 | }
15 |
16 | function delCookie(name) {
17 | var exp = new Date();
18 | exp.setTime(exp.getTime() - 1);
19 | var cval = getCookie(name);
20 | if(cval!=null)
21 | document.cookie= name + "="+cval+";expires="+exp.toGMTString();
22 | }
23 |
24 |
25 | export default {
26 | isLogin: function(url, params, success, failure) {
27 | let userId = localStorage.getItem('USER_ID');
28 | if (!userId) {
29 | let wxUserId = getCookie('WX_USER_ID');
30 | let wxUserOpenId = getCookie('WX_USER_OPENID');
31 | let wxUnionId = getCookie('WX_UNIONID');
32 |
33 | if (!wxUserId) {
34 | return false;
35 | } else {
36 | localStorage.setItem('USER_ID', wxUserId);
37 | localStorage.setItem('WX_USER_OPENID', wxUserOpenId);
38 | localStorage.setItem('WX_UNIONID', wxUnionId);
39 | return true;
40 | }
41 | } else {
42 | return true;
43 | }
44 | // return localStorage.getItem('USER_ID');
45 | },
46 |
47 | delCookie: delCookie
48 | }
49 |
--------------------------------------------------------------------------------
/src/config/interface_config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'PAGE_SIZE': '32',
3 | 'GET_BRAND_WITH_CATEGORYLIST': '/GetBrandWithCategory_List/', // 品牌列表页获取品牌信息
4 | 'GET_BUY_CAR_GOOD_LIST': '/GetBuyCarGoodList/', // 点击底部导航栏进入购物袋页面获取购物袋列表数据
5 | 'GET_USER_ACCOUNT_LIST': '/Get_User_AccountList/', // 个人中心用户余额记录列表
6 | 'GET_USER_REDPACK_LIST': '/Get_user_red_packList/', // 个人中心用户红包记录列表
7 | 'GET_POINT_LIST': '/Get_PointList/', // 个人中心用户积分记录列表
8 | 'GET_MEMBERINFO_BONUSLIST': '/Get_MemberInfo_BonusList/', // 个人中心优惠券列表页
9 | 'GET_APP_VARIOUSTYPE_ORDER_LIST': '/Get_APP_VariousType_OrderList/', // 个人中心手机订单
10 | 'GET_MWIN_ORDER_LIST': '/Get_MWIN_OrderList_ByMemberId/', // 个人中心店铺订单
11 | 'GET_ALL_ORDER_ENTITY': '/Get_ALLOrderEntity/', // 订单详情
12 | 'GET_USER_ADDRESS_LIST': '/GetUserAddressList/', // 用户地址列表
13 | 'UPDATE_ADDRESS_IS_DEFAULT': '/Update_AddressIsDefault/', // 更新默认地址
14 | 'GET_ADDRESS_LIST': '/GetAddressList', // 获取省市区数据
15 | 'ADD_ADDRESS': '/Add_Address/', // 新增地址上传数据
16 | 'EDIT_ADDRESS': '/Edit_Address/', // 编辑地址上传数据
17 | 'DEL_ADDRESS': '/Del_Address/', // 编辑地址上传数据
18 | 'GET_FAVOURITE_GOODS_LIST': '/Get_FavoriteGoodsList/', // 获取收藏列表数据
19 | 'DELETE_FAVOURITE_GOODS': '/Delete_FavoriteGoods/', // 删除选中的收藏商品
20 | 'GET_ARTICLE_LIST': '/GetArticle_List/', // 获取文章列表数据
21 | 'DEL_BUY_GOODS': '/DelBuyGood/', // 购物袋列表页删除选中的商品
22 | 'BATCH_OPTIMIZE_BUY_CAR': '/BatchOptimize_BuyCar/', // 购物袋列表页商品批量删除
23 | 'GET_BRAND_WITH_CATEGORY_PLUS_LIST': '/GetBrandWithCategoryPlus_List/', // 获取商品列表页顶部分类类别
24 | 'GET_APP_PROPERTY_LIST': '/Get_APP_Property_List/', // 获取商品能被用于做过滤条件的属性
25 | 'GET_ALL_GOODS_DETAIL_LIST': '/Get_ALL_Goods_Detail_List/', // 获取所有商品列表
26 | 'GET_APP_SEARCH_GOOD_DETAIL_LIST_FORPRO': '/Get_APP_SearchGoodDetailList_ForPro/', // 使用过滤条件时获取商品列表
27 | 'GET_SEARCH_LOG_LIST': '/Get_SearchLog_List/', // 搜索页获取热门搜索列表
28 | 'GET_GOODS_DETAIL_LIST_GOODSID_MESSAGE': '/GetGoodsDetailList_GoodsIdMessage/',
29 | 'GET_GOODS_SIZE': '/GetGoods_Size/', // 普通商品尺码
30 | 'GET_SECKILL_GOODS_SIZE': '/GetSeckillGoods_Size/', // 秒杀活动的商品尺码
31 | 'GET_INTERNAL_GOODS_SIZE': '/Get_Internal_GoodsSize/', // 员工内购专场商品尺码
32 | 'CREATE_BUYCAR_INSERT': '/Create_BuyCar_Insert/', // 登录状态下添加商品到购物车
33 | 'CREATE_INSERT_BUYCAR_UNLOGININ': '/Create_Insert_BuyCar_UnLoginIn/', // 未登录状态下添加商品到购物车
34 | 'ADD_FAVORITEGOODS': '/Add_FavoriteGoods/', // 添加商品到我的收藏
35 | 'DELETE_FAVORITEGOODS': '/Delete_FavoriteGoods/', // 取消收藏当前商品
36 | 'GETSTOREAGECOUNT': '/GetStoreageCount/', // 获取购物车商品数量
37 | 'GOODDETAIL_STORE_INVENTORY_QUERY': '/GoodDetail_StoreInventoryQuery/', // 获取库存查询结果列表
38 | 'SEND_SMS': '/Send_SMS/', // 获取验证码
39 | 'LOGIN_BY_CAPTCHA_BIND_PUSH': '/LoginInByCaptchaBindPush/', // 获取验证码
40 | 'GET_USERINFO_PUSH': '/GetUserInfo_Push/', // 获取用户信息
41 | 'GET_APP_ORDERCOUNT_BY_USERID': '/Get_APP_OrderCount_ByUserID/', // 获取个人中心订单信息
42 |
43 | /**
44 | * {userId}&{userName}&{sex}&{birthday}&{email}
45 | * userName为昵称
46 | */
47 | 'UPDATEUSERS': '/UpdateUsers/', // 获取个人更新个人信息
48 |
49 | /**
50 | * {user_id}&{captcha}&{mobile_num}
51 | */
52 | 'MODIFYUSERNAME': '/ModifyUserName/', // 修改绑定手机
53 |
54 | /**
55 | * {orderId}&{userId}
56 | */
57 | 'CONFIRMGETGOODS': '/ConfirmGetGoods/', // 确认收货
58 | 'GET_REASON_LIST': '/GetReason_List', // 获取退货原因列表
59 |
60 |
61 | /**
62 | * {related_order_id}
63 | * {userId}
64 | * {return_type} 目前只有退货,值为 1
65 | * {return_reason_Id}
66 | * {return_remark}
67 | * {consignee}
68 | * {telephone}
69 | * {districtId}
70 | * {addr}
71 | * {return_goodsnum}
72 | * {goods_id}
73 | * {product_id}
74 | * {goods_type}
75 | */
76 | 'CREATE_RESHIPORDER': '/Create_ReshipOrder/', // 申请退换货
77 | 'GET_MOTO_ORDER_CANCEL_REASON_LIST': '/Get_moto_order_cancel_reasonList', // 取消订单原因列表
78 |
79 | /**
80 | * {orderId}&{userId}&{cancelReasonId}
81 | */
82 | 'CANCEL_ORDER_INFO': '/Cancel_OrderInfo/', // 取消订单
83 |
84 | /**
85 | * {orderId}
86 | */
87 | 'GET_AUTO_CANCEL_TIME_BY_ORDER_ID': '/Get_AutoCancelTime_ByOrderID/', // 取消订单剩余时间
88 |
89 |
90 |
91 |
92 | /**
93 | * {userId}
94 | * {rec_ids}
95 | * {bonusId}
96 | * {IsUsePoint}
97 | * {IsUseBalance}
98 | * {IsStore} 传0
99 | * {addressId}
100 | * {isUsePromote}
101 | * {isUseRedPacket}
102 | */
103 | 'GET_JIESUAN_LIST': '/Get_JieSuanList/', // 获取结算信息
104 | 'GET_PAYMENT_LIST': '/GetPaymentList', // 获取支付方式
105 | 'GET_RECETIME_LIST': '/GetReceTimeList', // 获取收货时间
106 |
107 | /**
108 | * {user_id}
109 | * {bonus_ids} 默认为0~如有需要可在跳转到优惠券选择列表时在url后带上请求参数
110 | * {pageIndex}
111 | * {pageSize}
112 | */
113 | 'GET_BONUS_LIST': '/Get_BonusList/', // 结算页跳转到使用优惠券列表
114 |
115 | /**
116 | * {userId}&{addressId}&{paymentId}
117 | * {besttimeId} 收货时间id
118 | * {changeType} 目前为 1
119 | * {changeValue} 积分变动
120 | * {rec_ids}&{isStore}&{bonusId}&{surplus}&{postscript}&{condition_ids}&{redPacket}
121 | */
122 | 'ADD_ORDERINFO_FOR_CHANGE_BY_PRODUCTIDS': '/Add_OrderInfo_ForChangeByProductIds/', // 提交订单
123 |
124 | /**
125 | * userId, pageIndex, pageSize
126 | */
127 | 'GET_OFFLINE_ORDERINFORECORD_LIST': '/Get_offline_OrderInfoRecord_List/', // 获取店铺支付历史列表
128 |
129 |
130 | /**
131 | * userId, qr_pay_code
132 | */
133 | 'GET_OFFLINE_ORDERINFO': '/Get_offline_OrderInfo/', // 判断该二维码是否已经被扫过
134 | /**
135 | * paymentid
136 | * bonusId 默认为 0
137 | * IsUsePoint 默认为 0
138 | */
139 | 'GET_OFFLINE_JIESUANLIST': '/Get_offline_JieSuanList/', // 店铺支付支付信息
140 |
141 |
142 | /**
143 | * userId,
144 | * bonusIds 默认为0~如有需要可在跳转到优惠券选择列表时在url后带上请求参数
145 | * pageIndex,
146 | * pageCount
147 | */
148 | 'GET_OFFLINE_COUPONUS_LIST': '/Get_offlineCouponusList/', // 获取店铺支付优惠券
149 |
150 | // payment_id
151 | 'GET_OFFLINE_ORDER_INFO_ENTITY': '/Get_offlineOrderInfo_Entity/', // 获取店铺支付支付信息
152 |
153 | // {layoutStyle} sanse-home-layout
154 | 'GET_AD_LIST': '/GetAd_List/', // 获取首页广告布局数据
155 |
156 | /**
157 | * {userId}
158 | * {cookieId}
159 | * {versionType} 还未有wap的接口~此处使用和ios相同的配置参数去获取系统配置 MAPP
160 | * {systypes} 还未有wap的接口~此处使用和ios相同的配置参数去获取系统配置 IOS
161 | * {companyId}
162 | */
163 | 'GET_NEW_VERSION': '/Get_NewVersion/', // 获取系统配置
164 |
165 | // {openid}&{unionid}&{userid} res.code = 0 的时候询此接口会返回另外一个userid~此时应该询问是否合并资产
166 | 'SYS_USER_BIND_WXUSER': '/SYS_USER_BIND_WXUSER/', // 绑定微信
167 |
168 | /**
169 | * {userId}&{mobile}
170 | * {msgcode} 用户填写的短信验证码
171 | * res.code = 0 的时候询此接口会返回另外一个userid~此时应该询问是否合并资产
172 | */
173 | 'SystemWeiXin_BindMobile': '/SystemWeiXin_BindMobile/', // 绑定手机
174 |
175 | // {from_userid}&{to_userid}
176 | 'SYS_TRANSFER_USERINFO': '/SysTransferUserInfo/', // 资产转移
177 | }
178 |
--------------------------------------------------------------------------------
/src/config/md5.js:
--------------------------------------------------------------------------------
1 | !function(a){"use strict";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b>5]|=(255&a.charCodeAt(b/8))<16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d="0123456789abcdef",e="";for(c=0;c>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"function"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);
--------------------------------------------------------------------------------
/src/config/request.js:
--------------------------------------------------------------------------------
1 | // 配置API接口地址
2 | // 开发环境接口
3 | var root = process.env.API_ROOT
4 |
5 |
6 | // 生产环境接口
7 | // var root = 'http://inno.mo2o.com.cn:8092/int_app/VER_SANSE_1_2_6/APPSERVICE.svc'
8 |
9 | // 引用axios
10 | var axios = require('axios')
11 |
12 | /**
13 | * 判断中文字符
14 | * 根据后台要求~请求参数若是中文字符~在进行base64编码前要经过urlencode转码
15 | */
16 | function isChineseChar(str) {
17 | var reg = /[\u4E00-\u9FA5\uF900-\uFA2D]/;
18 | return reg.test(str);
19 | }
20 |
21 | /**
22 | * 判断全角符号~待用
23 | */
24 | function isFullwidthChar(str) {
25 | var reg = /[\uFF00-\uFFEF]/;
26 | return reg.test(str);
27 | }
28 |
29 | function base64Encode(str) {
30 | var result;
31 | result = encodeURIComponent(str);
32 | result = unescape(result);
33 | result = window.btoa(result);
34 | return result;
35 | }
36 |
37 | /**
38 | * 由于此项目对应后台对请求参数要求需要转为base64~故有此函数
39 | * @params json格式请求参数
40 | * @return 返回base64编码的字符转~依据后台要求去除了key~只将value进行base64编码并通过&连接
41 | */
42 | function queryEncoded(params) {
43 | var resultStr = '';
44 | for(let item in params) {
45 | let value = params[item];
46 | value = isChineseChar(value) ? encodeURI(value).toLowerCase() : value;
47 | resultStr = resultStr + '&' + base64Encode(value);
48 | }
49 | return resultStr.substr(1);
50 | }
51 |
52 | /**
53 | * 接口处理函数
54 | * @param {[type]} method [description]
55 | * @param {[type]} url [description]
56 | * @param {[type]} params [数据请求参数]
57 | * @param {[type]} success [description]
58 | * @param {[type]} failure [description]
59 | * @param {[type]} extendParams [额外参数用来做特殊处理~比如用验证码登录或是修改绑定的时候~如果验证码输入不对~接口返回的code为-1
60 | * 但是整个请求以及返回过程是正确的~故不能当做错误处理~
61 | * 此处约定如果extendParams中存在validateRequest字段并且为true~则将code为-1的情况视为正确
62 | * 不过存在的问题是必须保持此处validateRequest字段名和页面发送请求的时候的字段名一致]
63 | * @return {[type]} [description]
64 | */
65 | function apiAxios (method, url, params, success, failure, extendParams) {
66 | method = method.toUpperCase();
67 | let headerInfo = {
68 | 'platform_src': 'WAP',
69 | 'cookie_id': '23456006805d970d5438a354dc019fc295614979',
70 | 'systype': 'wap'
71 | };
72 | if((method == 'GET' && params) || (method == 'POST' && params)) {
73 | if(params && params.header) {
74 | headerInfo = params.header;
75 | delete params.header;
76 | }
77 |
78 | url = url + queryEncoded(params);
79 | }
80 |
81 | axios({
82 | method: method,
83 | url: url,
84 | // data: method === 'POST' || method === 'PUT' ? params : null,
85 | data: method === 'PUT' ? params : null,
86 | headers: headerInfo ? headerInfo : null,
87 | // params: method === 'GET' || method === 'DELETE' ? params : null,
88 | baseURL: root,
89 | withCredentials: false
90 | })
91 | .then(function (res) {
92 | if(typeof extendParams.cb == 'function' && extendParams.cb(res)) {
93 | // 并不是所有返回-1状态的请求都是错误的~一些请求整个流程是正确成功~但是返回的code不一定是1~
94 | // 此时在发送请求的时候传递一个回调函数做处理~以便此处可以正确执行到成功的回调
95 | if (typeof success == 'function') {
96 | success(res.data);
97 | }
98 | } else if(res.data.code != '-1') {
99 | if (typeof success == 'function') {
100 | success(res.data);
101 | }
102 | } else {
103 | if (typeof failure == 'function') {
104 | failure(res.data)
105 | } else {
106 | window.alert('error: ' + JSON.stringify(res.data))
107 | }
108 | }
109 | })
110 | .catch(function (err) {
111 | let res = err.response;
112 |
113 | if (err) {
114 | window.alert('api error, HTTP CODE: ' + err)
115 | return
116 | }
117 | })
118 | }
119 |
120 | // 返回在vue模板中的调用接口
121 | export default {
122 | get: function (url, params, success, failure, extendParams={}) {
123 | return apiAxios('GET', url, params, success, failure, extendParams)
124 | },
125 |
126 | post: function (url, params, success, failure, extendParams={}) {
127 | return apiAxios('POST', url, params, success, failure, extendParams)
128 | },
129 |
130 | put: function (url, params, success, failure, extendParams={}) {
131 | return apiAxios('PUT', url, params, success, failure, extendParams)
132 | },
133 |
134 | delete: function (url, params, success, failure, extendParams={}) {
135 | return apiAxios('DELETE', url, params, success, failure, extendParams)
136 | }
137 | }
--------------------------------------------------------------------------------
/src/config/wx_pay_helper.js:
--------------------------------------------------------------------------------
1 | var root = process.env.API_WX_PAY_ROOT;
2 |
3 | // 生产环境接口
4 | // http://fortest.innourl.com/sanse_wap_v2/dist/home
5 | // var root = 'http://fortest.innourl.com/sanse_wap_v2/api'
6 |
7 | // 引用axios
8 | var axios = require('axios')
9 |
10 |
11 | function apiAxios (method, url, params, success) {
12 | let headerInfo = {
13 | 'platform_src': 'WAP',
14 | 'cookie_id': '23456006805d970d5438a354dc019fc295614979',
15 | 'systype': 'wap'
16 | };
17 |
18 | axios({
19 | method: method,
20 | url: url,
21 | headers: headerInfo ? headerInfo : null,
22 | baseURL: root,
23 | withCredentials: false
24 | })
25 | .then(function (res) {
26 | if(res.error != '1') {
27 | if (typeof success == 'function') {
28 | success(res);
29 | }
30 | }
31 | })
32 | .catch(function (err) {
33 | let res = err.response;
34 | if(err) {
35 | window.alert('api error, HTTP CODE: ' + err)
36 | return
37 | }
38 | })
39 | }
40 |
41 |
42 |
43 | function jsApiCall (data, cb) {
44 |
45 | WeixinJSBridge.invoke(
46 | 'getBrandWCPayRequest',
47 | data,
48 | function(res) {
49 | WeixinJSBridge.log(res.err_msg);
50 | var msg = '';
51 | if(res.err_msg=="get_brand_wcpay_request:cancel") {
52 | //取消结算后的动作
53 | //alert('取消支付');
54 | msg = '取消支付';
55 |
56 | }
57 | if(res.err_msg=="get_brand_wcpay_request:ok") {
58 | //支付成功后的动作
59 | // alert('支付成功');
60 | msg = '支付成功';
61 | }
62 | if(res.err_msg=="get_brand_wcpay_request:fail") {
63 | //支付失败后的动作
64 | // alert('支付失败');
65 | msg = '支付失败';
66 | }
67 |
68 | if(typeof cb == 'function') {
69 | cb(msg);
70 | }
71 | }
72 | );
73 | }
74 |
75 | export default {
76 | callpay: function(data, context, cb) {
77 | if(typeof WeixinJSBridge == "undefined") {
78 | if( document.addEventListener ) {
79 | document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
80 | } else if(document.attachEvent) {
81 | document.attachEvent('WeixinJSBridgeReady', jsApiCall);
82 | document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
83 | }
84 | cb('请用微信浏览器打开');
85 | }else{
86 | jsApiCall(data, cb);
87 | }
88 | },
89 |
90 | wxPayGetRequest: function (url, params, success) {
91 | // console.log(url, params, success);
92 | return apiAxios('GET', url, params, success);
93 | }
94 | }
--------------------------------------------------------------------------------
/src/font/sanse_w3.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/font/sanse_w3.ttf
--------------------------------------------------------------------------------
/src/font/sanse_w6.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/font/sanse_w6.ttf
--------------------------------------------------------------------------------
/src/images/address_manager/add_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/address_manager/add_icon.png
--------------------------------------------------------------------------------
/src/images/address_manager/address_del_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/address_manager/address_del_icon.png
--------------------------------------------------------------------------------
/src/images/address_manager/address_edit_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/address_manager/address_edit_icon.png
--------------------------------------------------------------------------------
/src/images/address_manager/address_selected_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/address_manager/address_selected_icon.png
--------------------------------------------------------------------------------
/src/images/blance/my_blance_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/blance/my_blance_bg.jpg
--------------------------------------------------------------------------------
/src/images/common/active_alert_succeed_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/active_alert_succeed_icon.png
--------------------------------------------------------------------------------
/src/images/common/active_alert_tip_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/active_alert_tip_icon.png
--------------------------------------------------------------------------------
/src/images/common/add_disable_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/add_disable_icon.png
--------------------------------------------------------------------------------
/src/images/common/add_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/add_icon.png
--------------------------------------------------------------------------------
/src/images/common/black_arr_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/black_arr_icon.png
--------------------------------------------------------------------------------
/src/images/common/checkbox_disbale_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/checkbox_disbale_icon.png
--------------------------------------------------------------------------------
/src/images/common/checkbox_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/checkbox_icon.png
--------------------------------------------------------------------------------
/src/images/common/checkbox_icon_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/checkbox_icon_active.png
--------------------------------------------------------------------------------
/src/images/common/complete_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/complete_icon.png
--------------------------------------------------------------------------------
/src/images/common/default_user_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/default_user_icon.png
--------------------------------------------------------------------------------
/src/images/common/edit_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/edit_icon.png
--------------------------------------------------------------------------------
/src/images/common/link_right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/link_right_arrow.png
--------------------------------------------------------------------------------
/src/images/common/load_more.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/load_more.gif
--------------------------------------------------------------------------------
/src/images/common/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/loading.gif
--------------------------------------------------------------------------------
/src/images/common/login_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/login_bg.jpg
--------------------------------------------------------------------------------
/src/images/common/market_pay_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/market_pay_icon.png
--------------------------------------------------------------------------------
/src/images/common/pull_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/pull_arrow.png
--------------------------------------------------------------------------------
/src/images/common/sanse_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/sanse_logo.png
--------------------------------------------------------------------------------
/src/images/common/shopping_bag_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/shopping_bag_icon.png
--------------------------------------------------------------------------------
/src/images/common/subtract_disable_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/subtract_disable_icon.png
--------------------------------------------------------------------------------
/src/images/common/subtract_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/subtract_icon.png
--------------------------------------------------------------------------------
/src/images/common/user_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/user_icon.png
--------------------------------------------------------------------------------
/src/images/common/wechat_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/wechat_icon.png
--------------------------------------------------------------------------------
/src/images/common/wx_pay_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/common/wx_pay_icon.png
--------------------------------------------------------------------------------
/src/images/coupon/coupon_out_of_date.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/coupon/coupon_out_of_date.jpg
--------------------------------------------------------------------------------
/src/images/coupon/overdue_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/coupon/overdue_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/brand_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/brand_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/brand_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/brand_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/carts_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/carts_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/carts_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/carts_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/home_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/home_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/home_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/home_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/store_pay_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/store_pay_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/store_pay_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/store_pay_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/tide_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/tide_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/tide_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/tide_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/user_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/user_active_icon.png
--------------------------------------------------------------------------------
/src/images/footer_bar/user_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/footer_bar/user_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/add_goods_hide_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/add_goods_hide_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/add_goods_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/add_goods_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/add_to_shopping_bag_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/add_to_shopping_bag_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/add_to_shopping_bag_tip_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/add_to_shopping_bag_tip_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/collection_active_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/collection_active_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/collection_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/collection_icon.png
--------------------------------------------------------------------------------
/src/images/goods_detail/store_search_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_detail/store_search_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/clock_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/clock_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/empty_filter_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/empty_filter_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/goods_list_empty_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/goods_list_empty_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/new_goods_empty_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/new_goods_empty_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/rest_btn_active_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/rest_btn_active_btn.png
--------------------------------------------------------------------------------
/src/images/goods_list/rest_btn_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/rest_btn_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/scroll_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/scroll_back.png
--------------------------------------------------------------------------------
/src/images/goods_list/search_goods_btn_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/search_goods_btn_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/search_goods_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/search_goods_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/seckill_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/seckill_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/seckill_price_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/seckill_price_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/special_price_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/special_price_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/ttime_limited_preferential_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/ttime_limited_preferential_icon.png
--------------------------------------------------------------------------------
/src/images/goods_list/ttime_limited_preferential_price_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_list/ttime_limited_preferential_price_icon.png
--------------------------------------------------------------------------------
/src/images/goods_search/clear_history_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/goods_search/clear_history_icon.png
--------------------------------------------------------------------------------
/src/images/help_center/link_right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/help_center/link_right_arrow.png
--------------------------------------------------------------------------------
/src/images/home/home_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/home/home_bg.jpg
--------------------------------------------------------------------------------
/src/images/my_collection/collection_empty_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/my_collection/collection_empty_icon.png
--------------------------------------------------------------------------------
/src/images/my_collection/del_collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/my_collection/del_collection.png
--------------------------------------------------------------------------------
/src/images/my_commission/explain_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/my_commission/explain_icon.png
--------------------------------------------------------------------------------
/src/images/order_detail/point_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/order_detail/point_icon.png
--------------------------------------------------------------------------------
/src/images/order_detail/sending_status_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/order_detail/sending_status_icon.png
--------------------------------------------------------------------------------
/src/images/orders_common/orders_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/orders_common/orders_empty.png
--------------------------------------------------------------------------------
/src/images/orders_common/orders_no_pay_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/orders_common/orders_no_pay_empty.png
--------------------------------------------------------------------------------
/src/images/orders_common/orders_no_send_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/orders_common/orders_no_send_empty.png
--------------------------------------------------------------------------------
/src/images/pay_info/prompt_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/pay_info/prompt_icon.png
--------------------------------------------------------------------------------
/src/images/pay_info/reward_tip_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/pay_info/reward_tip_icon.png
--------------------------------------------------------------------------------
/src/images/point/my_points_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/point/my_points_bg.jpg
--------------------------------------------------------------------------------
/src/images/red_package/my_package_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/red_package/my_package_bg.jpg
--------------------------------------------------------------------------------
/src/images/shopping_bag/del_goods_item_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/shopping_bag/del_goods_item_icon.png
--------------------------------------------------------------------------------
/src/images/shopping_bag/shopping_bag_empty_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/shopping_bag/shopping_bag_empty_icon.png
--------------------------------------------------------------------------------
/src/images/store_pay/history_pay_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/store_pay/history_pay_icon.png
--------------------------------------------------------------------------------
/src/images/store_pay/refresh_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/store_pay/refresh_icon.png
--------------------------------------------------------------------------------
/src/images/store_pay/shop_pay_bg_code.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/store_pay/shop_pay_bg_code.jpg
--------------------------------------------------------------------------------
/src/images/store_pay_result/pay_success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/store_pay_result/pay_success.png
--------------------------------------------------------------------------------
/src/images/store_search/empty_store_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/store_search/empty_store_icon.png
--------------------------------------------------------------------------------
/src/images/temp_coupon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/temp_coupon.jpg
--------------------------------------------------------------------------------
/src/images/temp_coupon_out_of_date.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/temp_coupon_out_of_date.jpg
--------------------------------------------------------------------------------
/src/images/test_img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/test_img.jpg
--------------------------------------------------------------------------------
/src/images/test_img2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/test_img2.jpg
--------------------------------------------------------------------------------
/src/images/test_img3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/test_img3.jpg
--------------------------------------------------------------------------------
/src/images/user_index/amount_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/amount_arrow.png
--------------------------------------------------------------------------------
/src/images/user_index/amount_cut_down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/amount_cut_down_arrow.png
--------------------------------------------------------------------------------
/src/images/user_index/collection_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/collection_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/commission_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/commission_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/exit.png
--------------------------------------------------------------------------------
/src/images/user_index/help_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/help_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/invite_friend_qr_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/invite_friend_qr_code.png
--------------------------------------------------------------------------------
/src/images/user_index/location_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/location_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/message.png
--------------------------------------------------------------------------------
/src/images/user_index/pay_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/pay_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/receive_goods_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/receive_goods_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/record_list_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/record_list_line.png
--------------------------------------------------------------------------------
/src/images/user_index/send_goods_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/send_goods_icon.png
--------------------------------------------------------------------------------
/src/images/user_index/special.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/special.png
--------------------------------------------------------------------------------
/src/images/user_index/user_card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/user_card.jpg
--------------------------------------------------------------------------------
/src/images/user_index/user_data_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_index/user_data_icon.png
--------------------------------------------------------------------------------
/src/images/user_info/female_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/female_icon.png
--------------------------------------------------------------------------------
/src/images/user_info/male_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/male_icon.png
--------------------------------------------------------------------------------
/src/images/user_info/mobile_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/mobile_icon.png
--------------------------------------------------------------------------------
/src/images/user_info/sex_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/sex_btn.png
--------------------------------------------------------------------------------
/src/images/user_info/sex_btn_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/sex_btn_active.png
--------------------------------------------------------------------------------
/src/images/user_info/toggle_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/src/images/user_info/toggle_icon.png
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 | import routes from './router'
4 | import FastClick from 'fastclick'
5 | import $ from 'jquery'
6 | import './styles/common.css'
7 | import './config/flexible_css.js'
8 | import './config/flexible.js'
9 | import request from './config/request.js'
10 | import interfaceConfig from './config/interface_config.js'
11 | import md5Api from './config/md5.js'
12 | import helper from './config/helper.js'
13 | import store from './store'
14 | import axios from 'axios'
15 |
16 | import './plugins/lazysizes.min.js'
17 |
18 | Vue.config.productionTip = false
19 | Vue.prototype.$http = axios
20 | Vue.prototype.HOST = '/api'
21 | Vue.prototype.$request = request
22 | Vue.prototype.$interface = interfaceConfig
23 | Vue.prototype.$helper = helper
24 | Vue.prototype.$md5 = md5Api
25 |
26 | console.log(md5Api);
27 |
28 | function init() {
29 | // store.commit('SET_USER_ID', '304014');
30 | // store.commit('SET_COOKIE_ID', '23456006805d970d5438a354dc019fc295614979');
31 | let userId = localStorage.getItem('USER_ID');
32 | let cookieId = localStorage.getItem('COOKIE_ID');
33 |
34 | if (cookieId) {
35 | store.commit('SET_COOKIE_ID', cookieId);
36 |
37 | } else {
38 | // localStorage.setItem('COOKIE_ID', '23456006805d970d5438a354dc019fc295614979');
39 | // cookieId = '23456006805d970d5438a354dc019fc295614979';
40 | // store.commit('SET_COOKIE_ID', cookieId);
41 | let cookieId = md5Api(new Date().getTime());
42 | localStorage.setItem('COOKIE_ID', cookieId);
43 | store.commit('SET_COOKIE_ID', cookieId);
44 | }
45 |
46 | if (userId) {
47 | store.commit('SET_USER_ID', userId);
48 | }/* else {
49 | localStorage.setItem('USER_ID', '304014');
50 | userId = '304014';
51 | store.commit('SET_USER_ID', userId);
52 | }*/
53 |
54 | if ('addEventListener' in document) {
55 | document.addEventListener('DOMContentLoaded', function() {
56 | FastClick.attach(document.body);
57 | }, false);
58 | }
59 | }
60 |
61 | init();
62 |
63 | Vue.use(VueRouter)
64 | const router = new VueRouter({
65 | mode: 'history',
66 | // base: '/vue_mobile/',
67 | // base: '/sanse_wap_v2/dist/',
68 | routes
69 | })
70 |
71 | router.beforeEach((to, from, next) => {
72 | console.log(this);
73 | document.title = to.meta.title;
74 | next()
75 | })
76 |
77 | new Vue({
78 | router,
79 | store,
80 | }).$mount('#app')
81 |
--------------------------------------------------------------------------------
/src/pages/brand/brand.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
103 |
104 |
145 |
--------------------------------------------------------------------------------
/src/pages/brand/goods_search.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
12 |
13 | 清空
14 |
15 |
16 |
17 |
25 |
26 |
27 |
28 |
119 |
120 |
225 |
--------------------------------------------------------------------------------
/src/pages/home/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
59 |
60 |
85 |
--------------------------------------------------------------------------------
/src/pages/shopping_bag/delievry_time.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 | {{item.rectime}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/pages/shopping_bag/payment_list.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 | {{item.pay_name}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/pages/store_pay/checkstand_pay_info.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
请到收银台支付
5 |
6 |
7 | 应付金额
8 | ¥{{payInfo.need_to_pay_amount}}
9 |
10 |
11 |
12 |
13 | 订单金额
14 | {{payInfo.offline_sn}}
15 |
16 |
17 |
18 |
19 | 优惠信息
20 |
21 |
22 | -
23 | 首单立减
24 | -¥{{payInfo.random_money}}
25 |
26 | -
27 | 优惠券
28 | -¥{{payInfo.coupon_money}}
29 |
30 | -
31 | 积分抵扣
32 | -¥{{payInfo.integral_money}}
33 |
34 |
35 |
36 |
37 |
38 |
39 | 店铺名称
40 | {{payInfo.payment_description}}
41 |
42 |
43 | 订单编号
44 | {{payInfo.offline_sn}}
45 |
46 |
47 | 支付方式
48 | 商场支付
49 |
50 |
51 | 支付状态
52 | {{payInfo.payment_description}}
53 |
54 |
55 | 下单时间
56 | {{payInfo.create_time}}
57 |
58 |
59 |
{{payInfo.first_reduction}}
60 |
61 |
62 |
63 |
64 |
95 |
96 |
--------------------------------------------------------------------------------
/src/pages/store_pay/history_pay.vue:
--------------------------------------------------------------------------------
1 |
2 |
25 |
26 |
27 |
154 |
155 |
--------------------------------------------------------------------------------
/src/pages/store_pay/store_pay.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
请向收银人员出示当前页面
4 |
5 |
6 |
![条码]()
7 |
8 |

9 |
10 |
11 |
12 | 每分钟自动更新
13 |
14 |
15 |
16 |
17 | 历史支付信息
18 |
19 |
20 |
21 |
22 |
149 |
150 |
--------------------------------------------------------------------------------
/src/pages/store_pay/store_pay_result.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{payInfo.payment_description}}
6 |
7 |
8 | 所属店铺
9 | {{payInfo.store_name}}
10 |
11 |
12 | 订单编号
13 | {{payInfo.offline_sn}}
14 |
15 |
16 |
订单实付款
17 |
18 |
19 | {{payInfo.need_to_pay_amount}}
20 |
21 |
22 |
{{payInfo.first_reduction}}
23 |
24 |
25 |
26 |
27 |
51 |
52 |
--------------------------------------------------------------------------------
/src/pages/user/address_manager.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 添加新地址
5 |
6 |
7 | -
8 |
9 | 收 件 人:{{item.consignee}}
10 |
11 |
12 | 手机号码:{{item.mobile}}
13 |
14 |
15 | 所在地区:{{item.distinctAddress}}
16 |
17 |
18 | 详细地址:{{item.address}}
19 |
20 |
21 |
22 |
23 | 默认地址
24 | 设置默认
25 |
26 |
27 |
28 |
29 | 确认收货地址
30 |
31 |
37 |
38 |
39 |
40 |
142 |
143 |
--------------------------------------------------------------------------------
/src/pages/user/apply_return.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 取消
16 |
请选择退货原因
17 |
18 |
19 | - {{item._reason}}
20 |
21 |
22 |
确认
23 |
24 |
25 |
26 |
27 |
28 |
161 |
162 |
--------------------------------------------------------------------------------
/src/pages/user/bind_phone_number.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 发送验证码
10 | {{restTime}}s
11 |
12 |
13 |
14 | 提交
15 |
16 |
17 |
18 |
19 |
20 |
21 |
68 |
69 |
141 |
--------------------------------------------------------------------------------
/src/pages/user/coupon.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 | 未使用
6 |
7 | -
8 | 已过期
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
42 |
43 |
76 |
--------------------------------------------------------------------------------
/src/pages/user/help_center.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 | {{item.title}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
47 |
48 |
--------------------------------------------------------------------------------
/src/pages/user/help_center_content.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
37 |
38 |
--------------------------------------------------------------------------------
/src/pages/user/login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{sendCodeTip}}
10 |
11 |
12 |
13 |
14 | 提交
15 |
16 |
17 |
18 |
19 |
20 |
122 |
--------------------------------------------------------------------------------
/src/pages/user/my_commission.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |

7 |
8 |
我的奖金(红包)
9 |
10 | 0.00元
11 |
12 |
13 |
14 |
15 |
16 |
23 |
24 |
--------------------------------------------------------------------------------
/src/pages/user/wx_login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 | 手机验证登录
11 |
12 |
13 |
14 |
15 |
16 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/plugins/date/date.css:
--------------------------------------------------------------------------------
1 | .page {
2 | display: none;
3 | position: fixed;
4 | left: 0;
5 | bottom: 0;
6 | right: 0;
7 | width: 100%;
8 | height: 100%;
9 | overflow: hidden;
10 | }
11 |
12 | #datescroll div {
13 | float: left;
14 | margin-left: 10%;
15 | margin-top: 15px;
16 | padding-right: 22px;
17 | }
18 |
19 | #datescroll_datetime div {
20 | float: left;
21 | margin-left: 10%;
22 | padding-right: 22px;
23 | }
24 |
25 | #datescroll #yearwrapper {
26 | position: absolute;
27 | left: 0;
28 | margin-top: 0;
29 | top: 40px;
30 | bottom: 0;
31 | width: 80%;
32 | }
33 |
34 | #datescroll #monthwrapper {
35 | position: absolute;
36 | left: 26%;
37 | margin-top: 0;
38 | top: 40px;
39 | bottom: 0;
40 | width: 80%;
41 | }
42 |
43 | #datescroll #daywrapper {
44 | position: absolute;
45 | left: 50%;
46 | bottom: 0;
47 | top: 40px;
48 | margin-top: 0;
49 | width: 80%;
50 | }
51 |
52 | #Hourwrapper {
53 | position: absolute;
54 | left: 0;
55 | top: 195px;
56 | bottom: 68px;
57 | width: 80%;
58 | }
59 |
60 | #Minutewrapper {
61 | position: absolute;
62 | left: 26%;
63 | top: 195px;
64 | bottom: 68px;
65 | width: 80%;
66 | }
67 |
68 | #Secondwrapper {
69 | position: absolute;
70 | left: 50%;
71 | top: 195px;
72 | bottom: 68px;
73 | width: 80%;
74 | }
75 |
76 | #Hourwrapper ul li {
77 | color: #898989;
78 | font-size: 16px;
79 | }
80 |
81 | #Minutewrapper ul li {
82 | color: #898989;
83 | font-size: 16px;
84 | }
85 |
86 | #Secondwrapper ul li {
87 | color: #898989;
88 | font-size: 16px;
89 | }
90 |
91 | #Secondwrapper ul {
92 | margin-top: 3px;
93 | }
94 |
95 | #yearwrapper ul li {
96 | color: #898989;
97 | font-size: 16px;
98 | }
99 |
100 | #monthwrapper ul li {
101 | color: #898989;
102 | font-size: 16px;
103 | }
104 |
105 | #daywrapper ul li {
106 | color: #898989;
107 | font-size: 16px;
108 | }
109 |
110 | #markyear {
111 | position: relative;
112 | margin-left: 76px;
113 | top: -2px;
114 | }
115 |
116 | #markmonth {
117 | position: relative;
118 | margin-left: 40px;
119 | top: -2px;
120 | }
121 |
122 | #markday {
123 | position: relative;
124 | margin-left: 42px;
125 | top: -2px;
126 | }
127 |
128 | #markhour {
129 | position: relative;
130 | margin-left: 62px;
131 | top: -2px;
132 | }
133 |
134 | #markminut {
135 | position: relative;
136 | margin-left: 58px;
137 | top: -2px;
138 | }
139 |
140 | #marksecond {
141 | position: relative;
142 | margin-left: 68px;
143 | top: -2px;
144 | }
145 |
146 | #dateheader {
147 | width: 100%;
148 | height: 50px;
149 | background: #79C12F;
150 | text-align: center;
151 | color: #fff;
152 | line-height: 50px;
153 | font-size: 20px;
154 | }
155 |
156 | #dateconfirm,
157 | #datecancle {
158 | position: absolute;
159 | color: #000;
160 | left: 3%;
161 | top: 50%;
162 | transform: translateY(-50%);
163 | }
164 |
165 | #datecancle {
166 | left: auto;
167 | right: 3%;
168 | }
169 |
170 | #dateshadow {
171 | display: none;
172 | position: fixed;
173 | width: 100%;
174 | height: 100%;
175 | top: 0;
176 | left: 0;
177 | background: #000;
178 | filter: alpha(Opacity=50);
179 | -moz-opacity: 0.5;
180 | opacity: 0.5;
181 | z-index: 2;
182 | }
183 |
184 | #datePage {
185 | position: fixed;
186 | bottom: 0;
187 | vertical-align: middle;
188 | width: 100%;
189 | height: 290px;
190 | background: #fff;
191 | z-index: 9999999;
192 | }
193 |
194 | #datetitle {
195 | width: 100%;
196 | height: 40px;
197 | background: #fff;
198 | text-align: center;
199 | color: #afafaf;
200 | line-height: 40px;
201 | position: relative;
202 | }
203 |
204 | #datemark {
205 | left: 0;
206 | width: 100%;
207 | height: 50px;
208 | position: absolute;
209 | top: 140px;
210 | background: #fff;
211 | }
212 |
213 | #timemark {
214 | display: none;
215 | }
216 |
217 | #datescroll {
218 | background: #ddd;
219 | width: 100%;
220 | height: 250px;
221 | text-align: center;
222 | line-height: 50px;
223 | }
224 |
225 | #datescroll_datetime {
226 | display: none;
227 | background: #F8F8F8;
228 | width: 94%;
229 | margin: 10px 3%;
230 | margin-top: 10px;
231 | border: 1px solid #E0E0E0;
232 | border-radius: 4px;
233 | height: 120px;
234 | text-align: center;
235 | line-height: 40px;
236 | }
237 |
238 | #yearwrapper ul,
239 | #monthwrapper ul,
240 | #daywrapper ul {
241 | width: 40%;
242 | }
243 |
244 | #Hourwrapper ul,
245 | #Minutewrapper ul,
246 | #Secondwrapper ul {
247 | width: 40%;
248 | }
249 |
250 | #dateFooter {
251 | width: 100%;
252 | background: #fff;
253 | height: 50px;
254 | bottom: 0px;
255 | position: absolute;
256 | }
257 |
--------------------------------------------------------------------------------
/src/plugins/lazysizes.min.js:
--------------------------------------------------------------------------------
1 | /*! lazysizes - v4.0.0-rc2 */
2 | !function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d,e=b.documentElement,f=a.Date,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h],k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,d,e,f,g){var h=b.createEvent("CustomEvent");return e||(e={}),e.instance=c,h.initCustomEvent(d,!f,!g,e),a.dispatchEvent(h),h},w=function(b,c){var e;!g&&(e=a.picturefill||d.pf)?e({reevaluate:!0,elements:[b]}):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;ce&&(e=0),a||9>e&&m?i():k(i,e))}},C=function(a){var b,c,d=99,e=function(){b=null,a()},g=function(){var a=f.now()-c;d>a?k(g,d-a):(m||e)(e)};return function(){c=f.now(),b||(b=k(g,d))}},D=function(){var g,l,m,o,p,y,D,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O="onscroll"in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=-1,T=function(a){R--,a&&a.target&&u(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var d,f=a,g="hidden"==x(b.body,"visibility")||"hidden"!=x(a,"visibility");for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=e;)g=(x(f,"opacity")||1)>0,g&&"visible"!=x(f,"overflow")&&(d=f.getBoundingClientRect(),g=H>d.left&&Gd.top-1&&FR&&(a=r.length)){f=0,S++,null==K&&("expand"in d||(d.expand=e.clientHeight>500&&e.clientWidth>500?500:370),J=d.expand,K=J*d.expFactor),K>Q&&1>R&&S>2&&o>2&&!b.hidden?(Q=K,S=0):Q=o>1&&S>1&&6>R?J:P;for(;a>f;f++)if(r[f]&&!r[f]._lazyRace)if(O)if((p=r[f][i]("data-expand"))&&(m=1*p)||(m=Q),q!==m&&(y=innerWidth+m*L,D=innerHeight+m,n=-1*m,q=m),h=r[f].getBoundingClientRect(),(I=h.bottom)>=n&&(F=h.top)<=D&&(H=h.right)>=n*L&&(G=h.left)<=y&&(I||H||G||F)&&(d.loadHidden||"hidden"!=x(r[f],"visibility"))&&(l&&3>R&&!p&&(3>o||4>S)||U(r[f],m))){if(ba(r[f]),k=!0,R>9)break}else!k&&l&&!j&&4>R&&4>S&&o>2&&(g[0]||d.preloadAfterLoad)&&(g[0]||!p&&(I||H||G||F||"auto"!=r[f][i](d.sizesAttr)))&&(j=g[0]||r[f]);else ba(r[f]);j&&!k&&ba(j)}},W=B(V),X=function(a){s(a.target,d.loadedClass),t(a.target,d.loadingClass),u(a.target,Z),v(a.target,"lazyloaded")},Y=A(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,c=a[i](d.srcsetAttr);(b=d.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},aa=A(function(a,b,c,e,f){var g,h,j,l,o,p;(o=v(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(c?s(a,d.autosizesClass):a.setAttribute("sizes",e)),h=a[i](d.srcsetAttr),g=a[i](d.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),o={target:a},p&&(u(a,T,!0),clearTimeout(m),m=k(T,2500),s(a,d.loadingClass),u(a,Z,!0)),l&&q.call(j.getElementsByTagName("source"),_),h?a.setAttribute("srcset",h):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,d.lazyClass),z(function(){(!p||a.complete&&a.naturalWidth>1)&&(p?T(o):R--,X(o))},!0)}),ba=function(a){var b,c=M.test(a.nodeName),e=c&&(a[i](d.sizesAttr)||a[i]("sizes")),f="auto"==e;(!f&&l||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,d.errorClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,c))},ca=function(){if(!l){if(f.now()-p<999)return void k(ca,999);var a=C(function(){d.loadMode=3,W()});l=!0,d.loadMode=3,W(),j("scroll",function(){3==d.loadMode&&(d.loadMode=2),a()},!0)}};return{_:function(){p=f.now(),c.elements=b.getElementsByClassName(d.lazyClass),g=b.getElementsByClassName(d.lazyClass+" "+d.preloadClass),L=d.hFac,j("scroll",W,!0),j("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(e,{childList:!0,subtree:!0,attributes:!0}):(e[h]("DOMNodeInserted",W,!0),e[h]("DOMAttrModified",W,!0),setInterval(W,999)),j("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[h](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(j("load",ca),b[h]("DOMContentLoaded",W),k(ca,2e4)),c.elements.length?(V(),z._lsFlush()):W()},checkElems:W,unveil:ba}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||w(a,c.detail)}),e=function(a,b,d){var e,f=a.parentNode;f&&(d=y(a,f,d),e=v(a,"lazybeforesizes",{width:d,dataAttr:!!b}),e.defaultPrevented||(d=e.detail.width,d&&d!==a._lazysizesWidth&&c(a,f,e,d)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=C(f);return{_:function(){a=b.getElementsByClassName(d.autosizesClass),j("resize",g)},checkElems:g,updateElem:e}}(),F=function(){F.i||(F.i=!0,E._(),D._())};return function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0};d=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in d||(d[b]=c[b]);a.lazySizesConfig=d,k(function(){d.init&&F()})}(),c={cfg:d,autoSizer:E,loader:D,init:F,uP:w,aC:s,rC:t,hC:r,fire:v,gW:y,rAF:z}}});
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import mutations from './mutations'
4 |
5 |
6 | Vue.use(Vuex)
7 |
8 | const state = {
9 | userId: '0', // 全局使用的userid,个人中心页几乎各项数据的获取都需要此字段~同时此字段也被用来判断用户是否已经登录~默认为0表示没有登录
10 | cookieId: '0', // 一个随机id~因在多个页面获取数据时需要用到故作全局配置~默认为 0
11 | companyId: '1', // 固定的id值
12 | brandId: '1', // 固定的id值
13 | jpushId: '0', // 固定的id值
14 | channelId: '0', // 固定的id值
15 | appId: '0', // 固定的id值
16 | restTime: 5, // 验证码重发时间
17 | versionType: 'MAPP', // 还未有wap的接口~此处使用和ios相同的配置参数去获取系统配置(待用)
18 | systypes: 'IOS', // 还未有wap的接口~此处使用和ios相同的配置参数去获取系统配置(待用)
19 | layoutStyle: 'sanse-home-layout', // 首页广告布局名
20 | goodsListRecord: [], // 记录商品列表当前加载的商品数据的状况~以便从商品详情页返回的时候还原之前的状态
21 | isShowLoad: false,
22 | keyWord: '', // 当在商品搜索页输入关键词并跳转到搜索结果页时需先记录输入的关键词~以便再再次返回搜索页的时候直接显示上次输入的关键词
23 | userInfo: {},
24 | shoppingBagNum: 0,
25 | loginRouter: navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger' ? '/wx_login' : '/login', // 配置登录路由~机制为加载页面的时候检测页面是否是用微信打开~如果是则将此路由修改为/wx_login~对应wx_login.vue
26 |
27 | routerList: {
28 | '/home': 0,
29 |
30 | '/brand': 1,
31 | '/login': 2,
32 | '/goods_list': 5,
33 | '/goods_search': 6,
34 | '/goods_detail': 7,
35 | '/store_search': 8,
36 |
37 | '/shopping_bag': 2,
38 | '/settle_accounts': 8,
39 | '/delievry_time': 9,
40 | '/payment_list': 10,
41 | '/select_coupon': 11,
42 |
43 | '/user_index': 3,
44 | '/blance': 15,
45 | '/red_package': 16,
46 | '/point': 17,
47 | '/coupon': 18,
48 | '/orders_all': 19,
49 | '/orders_no_pay': 20,
50 | '/orders_no_send': 21,
51 | '/orders_no_receive': 22,
52 | '/order_detail': 40,
53 | 'apply_return': 41,
54 | '/user_info': 23,
55 | '/address_manager': 24,
56 | '/my_collection': 25,
57 | '/help_center': 26,
58 | '/bind_phone_number': 30,
59 | '/coupon/no_use': 31,
60 | '/coupon/overdue': 32,
61 |
62 | '/store_pay': 4,
63 | '/history_pay': 50,
64 | '/pay_info': 51,
65 | '/history_pay/store_pay_result': 52,
66 | },
67 |
68 | }
69 |
70 | export default new Vuex.Store({
71 | state,
72 | mutations
73 | })
74 |
--------------------------------------------------------------------------------
/src/store/mutations.js:
--------------------------------------------------------------------------------
1 | const SET_USER_ID = 'SET_USER_ID'
2 | const SET_COOKIE_ID = 'SET_COOKIE_ID'
3 | const SHOW_LOAD = 'SHOW_LOAD'
4 | const HIDE_LOAD = 'HIDE_LOAD'
5 | const SET_KEY_WORD = 'SET_KEY_WORD'
6 | const SET_GOODS_LIST_RECORD = 'SET_GOODS_LIST_RECORD'
7 | const PUSH_GOODS_LIST_RECORD = 'PUSH_GOODS_LIST_RECORD'
8 | const SET_USER_INFO = 'SET_USER_INFO'
9 | const SET_SHOPPING_BAG_NUM = 'SET_SHOPPING_BAG_NUM'
10 | const SET_LOGIN_ROUTER = 'SET_LOGIN_ROUTER'
11 |
12 | export default {
13 |
14 | [SET_USER_ID](state, data) {
15 | state.userId = data;
16 | },
17 |
18 | [SET_COOKIE_ID](state, data) {
19 | state.cookieId = data;
20 | },
21 |
22 | [SHOW_LOAD](state) {
23 | state.isShowLoad = true;
24 | },
25 |
26 | [HIDE_LOAD](state) {
27 | state.isShowLoad = false;
28 | },
29 |
30 | [SET_KEY_WORD](state, arg) {
31 | state.keyWord = arg.value;
32 | },
33 |
34 | [SET_GOODS_LIST_RECORD](state, data) {
35 | state.goodsListRecord = data;
36 | },
37 |
38 | [PUSH_GOODS_LIST_RECORD](state, data) {
39 | state.goodsListRecord.push(...data);
40 | },
41 |
42 | [SET_USER_INFO](state, data) {
43 | state.userInfo = data;
44 | },
45 |
46 | [SET_SHOPPING_BAG_NUM](state, data) {
47 | state.shoppingBagNum = data;
48 | },
49 |
50 | [SET_LOGIN_ROUTER](state, data) {
51 | state.loginRouter = data;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/styles/common.css:
--------------------------------------------------------------------------------
1 | html, body, div, span,
2 | h1, h2, h3, h4, h5, h6, p,
3 | b, i,
4 | dl, dt, dd, ol, ul, li,
5 | form, label,
6 | table, caption, tbody, tfoot, thead, tr, th, td,
7 | article, aside, canvas, details, figcaption, figure,
8 | footer, header, hgroup, menu, nav, section, summary,
9 | time, mark, audio, video {
10 | margin: 0;
11 | padding: 0;
12 | border: 0;
13 | outline: 0;
14 | vertical-align: baseline;
15 | background: transparent;
16 | }
17 |
18 | body {
19 | line-height: 1;
20 | font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif;
21 | font-size: 13px;
22 | color: #333;
23 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
24 | }
25 |
26 | h1, h2, h3, h4, h5, h6 {
27 | font-weight: normal;
28 | }
29 |
30 | :focus {
31 | outline: 1;
32 | }
33 |
34 | article,aside,canvas,details,figcaption,figure,
35 | footer,header,hgroup,menu,nav,section,summary {
36 | display: block;
37 | }
38 |
39 | ul {
40 | list-style: none;
41 | }
42 |
43 | blockquote, q {
44 | quotes: none;
45 | }
46 |
47 | blockquote:before, blockquote:after,
48 | q:before, q:after {
49 | content: '';
50 | content: none;
51 | }
52 |
53 | a {
54 | color: inherit;
55 | margin: 0;
56 | padding: 0;
57 | border: none;
58 | vertical-align: baseline;
59 | background: transparent;
60 | text-decoration: none;
61 | }
62 |
63 | body a:link, body a:visited, body a:hover {
64 | text-decoration: none;
65 | }
66 |
67 | del {
68 | text-decoration: line-through;
69 | }
70 |
71 | abbr[title], dfn[title] {
72 | border-bottom: 1px dotted #000;
73 | cursor: help;
74 | }
75 |
76 | table {
77 | border-collapse: collapse;
78 | border-spacing: 0;
79 | }
80 |
81 | input, select {
82 | vertical-align: middle;
83 | }
84 |
85 | html, body {
86 | height: 100%;
87 | box-sizing: border-box;
88 | }
89 | body {
90 | color: #333;
91 | font-size: 13px;
92 | }
93 |
94 | [data-dpr="2"] body {
95 | font-size: 24px;
96 | }
97 |
98 | [data-dpr="3"] body {
99 | font-size: 36px;
100 | }
101 |
102 | .ofh {
103 | overflow: hidden;
104 | }
105 |
106 | .fl {
107 | float: left;
108 | }
109 |
110 | .fr {
111 | float: right;
112 | }
113 |
114 | #app {
115 | min-width: 100%;
116 | }
117 |
118 | .confirm_btn_box {
119 | line-height: 1.4rem;
120 | text-align: center;
121 | background: #ef8200;
122 | color: #fff;
123 | letter-spacing: 0.097rem;
124 | }
125 |
126 | .confirm_btn {
127 | display: block;
128 | }
129 |
130 |
131 | @font-face {
132 | font-family: 'sansefont_light';
133 | src: url(../font/sanse_w3.ttf);
134 | font-weight: normal;
135 | font-style: normal;
136 | }
137 |
138 | @font-face {
139 | font-family: 'sansefont_bold';
140 | src: url(../font/sanse_w6.ttf);
141 | font-weight: normal;
142 | font-style: normal;
143 | }
144 |
145 | .sansefont_light {
146 | font-family: 'sansefont_light';
147 | }
148 |
149 | .sansefont_bold {
150 | font-family: 'sansefont_bold';
151 | }
152 |
153 | /* @font-face {
154 | font-family: 'GothamLight';
155 | src: url(../font/Gotham-Light.eot);
156 | src: local('O'),
157 | url(../font/Gotham-Light.woff) format('woff'),
158 | url(../font/Gotham-Light.ttf) format('truetype');
159 | font-weight: normal;
160 | font-style: normal;
161 | } */
162 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/x-shadow-x/sanse_wap_v2/fc3f370fd2252b2dd9d2274392c9dc6164138751/static/.gitkeep
--------------------------------------------------------------------------------