mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 17:41:45 +08:00
no message
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ dist/
|
||||
node_modules/
|
||||
.DS_Store
|
||||
.idea/
|
||||
.h5_dev_dist
|
||||
|
||||
@@ -2,7 +2,9 @@ const path = require('path')
|
||||
const pkg = require('../package.json')
|
||||
|
||||
const [TARO_CMD, TARO_ENV] = process.env.npm_lifecycle_event.split(':')
|
||||
const DIST_PATH = TARO_ENV === 'h5' ? 'h5_dist' : 'dist'
|
||||
const DIST_PATH = TARO_ENV === 'h5'
|
||||
? (process.env.NODE_ENV === 'production' ? 'h5_dist' : '.h5_dev_dist' )
|
||||
: 'dist'
|
||||
|
||||
const config = {
|
||||
projectName: pkg.name,
|
||||
|
||||
@@ -1 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{"483":function(e,t,n){},"587":function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return y});var a=n(2),r=n.n(a),c=n(3),o=n.n(c),i=n(600),l=n(277),s=n(278),u=n(207),m=n(28),p=n(29),f=(n(483),function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}());var y=function(e){function CartIndex(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,CartIndex);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(CartIndex.__proto__||Object.getPrototypeOf(CartIndex)).call(this,e));return t.handleClickCategoryNav=function(e){t.setState({"currentIndex":e})},t.state={"list":null,"pluralType":!1,"imgType":!1,"currentIndex":0},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(CartIndex,a["Component"]),f(CartIndex,[{"key":"componentDidMount","value":function componentDidMount(){this.fetch()}},{"key":"fetch","value":function(){var e=function _asyncToGenerator(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function step(a,r){try{var c=t[a](r),o=c.value}catch(e){return void n(e)}if(!c.done)return Promise.resolve(o).then(function(e){step("next",e)},function(e){step("throw",e)});e(o)}("next")})}}(regeneratorRuntime.mark(function _callee(){var e,t;return regeneratorRuntime.wrap(function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p.a.category.get();case 2:e=n.sent,t=Object(m.k)(e,{"category_name":"category_name","children":"children"}),this.setState({"list":t});case 5:case"end":return n.stop()}},_callee,this)}));return function fetch(){return e.apply(this,arguments)}}()},{"key":"handleClickItem","value":function handleClickItem(e){var t="/pages/item/list?cat_id="+e.cat_id;r.a.navigateTo({"url":t})}},{"key":"render","value":function render(){var e=this,t=this.state,n=t.list,a=t.pluralType,r=t.imgType,c=t.currentIndex,p=void 0;return n&&(p=n[c].children),n?o.a.createElement(i.a,{"className":"page-category-index"},o.a.createElement(u.g,{"isFixed":!0}),o.a.createElement(i.a,{"className":"category-list"},o.a.createElement(l.a,{"className":"category-list__nav","scrollY":!0},o.a.createElement(i.a,{"className":"category-nav"},n.map(function(t,n){return o.a.createElement(i.a,{"className":Object(m.a)("category-nav__content",c===n?"category-nav__content-checked":null),"key":n,"onClick":e.handleClickCategoryNav.bind(e,n)},t.category_name)}))),o.a.createElement(l.a,{"className":"category-list__content","scrollY":!0},o.a.createElement(i.a,{"className":Object(m.a)(a?"category-content":"category-content-no")},p.map(function(t){return o.a.createElement(i.a,{"className":"category-content__img","key":t.category_id,"onClick":e.handleClickItem.bind(e,t)},o.a.createElement(s.a,{"className":Object(m.a)(r?"cat-img":"cat-img-no"),"mode":"aspectFill","src":t.image_url}),o.a.createElement(i.a,{"className":"img-cat-name"},t.category_name))}),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "))))):o.a.createElement(u.e,null)}},{"key":"componentDidShow","value":function componentDidShow(){}}]),CartIndex}()}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{"483":function(e,t,n){},"587":function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return y});var a=n(2),r=n.n(a),c=n(3),o=n.n(c),i=n(600),l=n(277),s=n(278),u=n(207),m=n(28),p=n(29),f=(n(483),function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}());var y=function(e){function CartIndex(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,CartIndex);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(CartIndex.__proto__||Object.getPrototypeOf(CartIndex)).call(this,e));return t.handleClickCategoryNav=function(e){t.setState({"currentIndex":e})},t.state={"list":null,"pluralType":!1,"imgType":!1,"currentIndex":0},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(CartIndex,a["Component"]),f(CartIndex,[{"key":"componentDidMount","value":function componentDidMount(){this.fetch()}},{"key":"fetch","value":function(){var e=function _asyncToGenerator(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){return function step(a,r){try{var c=t[a](r),o=c.value}catch(e){return void n(e)}if(!c.done)return Promise.resolve(o).then(function(e){step("next",e)},function(e){step("throw",e)});e(o)}("next")})}}(regeneratorRuntime.mark(function _callee(){var e,t;return regeneratorRuntime.wrap(function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p.a.category.get();case 2:e=n.sent,t=Object(m.k)(e,{"category_name":"category_name","children":"children"}),this.setState({"list":t});case 5:case"end":return n.stop()}},_callee,this)}));return function fetch(){return e.apply(this,arguments)}}()},{"key":"handleClickItem","value":function handleClickItem(e){var t="/pages/item/list?cat_id="+e.category_id;r.a.navigateTo({"url":t})}},{"key":"render","value":function render(){var e=this,t=this.state,n=t.list,a=t.pluralType,r=t.imgType,c=t.currentIndex,p=void 0;return n&&(p=n[c].children),n?o.a.createElement(i.a,{"className":"page-category-index"},o.a.createElement(u.g,{"isFixed":!0}),o.a.createElement(i.a,{"className":"category-list"},o.a.createElement(l.a,{"className":"category-list__nav","scrollY":!0},o.a.createElement(i.a,{"className":"category-nav"},n.map(function(t,n){return o.a.createElement(i.a,{"className":Object(m.a)("category-nav__content",c===n?"category-nav__content-checked":null),"key":n,"onClick":e.handleClickCategoryNav.bind(e,n)},t.category_name)}))),o.a.createElement(l.a,{"className":"category-list__content","scrollY":!0},o.a.createElement(i.a,{"className":Object(m.a)(a?"category-content":"category-content-no")},p.map(function(t){return o.a.createElement(i.a,{"className":"category-content__img","key":t.category_id,"onClick":e.handleClickItem.bind(e,t)},o.a.createElement(s.a,{"className":Object(m.a)(r?"cat-img":"cat-img-no"),"mode":"aspectFill","src":t.image_url}),o.a.createElement(i.a,{"className":"img-cat-name"},t.category_name))}),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "),o.a.createElement(i.a,{"className":"category-content__img-empty"}," "))))):o.a.createElement(u.e,null)}},{"key":"componentDidShow","value":function componentDidShow(){}}]),CartIndex}()}}]);
|
||||
@@ -1 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{"250":function(e,t,n){(e.exports=n(213)(!1)).push([e.i,".taro-text {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.taro-text__selectable {\n -moz-user-select: text;\n -webkit-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}",""])},"251":function(e,t,n){var o=n(250);"string"==typeof o&&(o=[[e.i,o,""]]);var r={"sourceMap":!1,"insertAt":"top","hmr":!0,"transform":void 0,"insertInto":void 0};n(212)(o,r);o.locals&&(e.exports=o.locals)},"49":function(e,t,n){"use strict";n(210);var o=n(3),r=n.n(o),i=n(214),c=n.n(i),a=n(42),s=n.n(a),u=(n(251),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}),l=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var p=function(e){function Text(){return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Text),function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Text.__proto__||Object.getPrototypeOf(Text)).apply(this,arguments))}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Text,r.a.Component),l(Text,[{"key":"render","value":function render(){var e=this.props,t=e.className,n=e.selectable,o=void 0!==n&&n,i=s()("taro-text",{"taro-text__selectable":o},t);return r.a.createElement("span",u({},c()(this.props,["selectable","className"]),{"className":i}),this.props.children)}}]),Text}();t.a=p},"552":function(e,t,n){},"601":function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return l});var o=n(2),r=n.n(o),i=n(3),c=n.n(i),a=n(600),s=n(49),u=(n(552),function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}());function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function Index(){var e,t,n;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Index);for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];return t=n=_possibleConstructorReturn(this,(e=Index.__proto__||Object.getPrototypeOf(Index)).call.apply(e,[this].concat(r))),n.config={"navigationBarTitleText":"首页"},_possibleConstructorReturn(n,t)}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Index,o["Component"]),u(Index,[{"key":"componentWillMount","value":function componentWillMount(){r.a.redirectTo({"url":"/pages/item/point-detail?id=560"})}},{"key":"componentDidMount","value":function componentDidMount(){}},{"key":"componentWillUnmount","value":function componentWillUnmount(){}},{"key":"componentDidShow","value":function componentDidShow(){}},{"key":"componentDidHide","value":function componentDidHide(){}},{"key":"render","value":function render(){return c.a.createElement(a.a,{"className":"index"},c.a.createElement(s.a,null,"Hello world!"))}}]),Index}()}}]);
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{"250":function(e,t,n){(e.exports=n(213)(!1)).push([e.i,".taro-text {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.taro-text__selectable {\n -moz-user-select: text;\n -webkit-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}",""])},"251":function(e,t,n){var o=n(250);"string"==typeof o&&(o=[[e.i,o,""]]);var r={"sourceMap":!1,"insertAt":"top","hmr":!0,"transform":void 0,"insertInto":void 0};n(212)(o,r);o.locals&&(e.exports=o.locals)},"49":function(e,t,n){"use strict";n(210);var o=n(3),r=n.n(o),i=n(214),c=n.n(i),a=n(42),s=n.n(a),u=(n(251),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}),l=function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}();var p=function(e){function Text(){return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Text),function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Text.__proto__||Object.getPrototypeOf(Text)).apply(this,arguments))}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Text,r.a.Component),l(Text,[{"key":"render","value":function render(){var e=this.props,t=e.className,n=e.selectable,o=void 0!==n&&n,i=s()("taro-text",{"taro-text__selectable":o},t);return r.a.createElement("span",u({},c()(this.props,["selectable","className"]),{"className":i}),this.props.children)}}]),Text}();t.a=p},"552":function(e,t,n){},"601":function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return l});var o=n(2),r=n.n(o),i=n(3),c=n.n(i),a=n(600),s=n(49),u=(n(552),function(){function defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&defineProperties(e.prototype,t),n&&defineProperties(e,n),e}}());function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function Index(){var e,t,n;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Index);for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];return t=n=_possibleConstructorReturn(this,(e=Index.__proto__||Object.getPrototypeOf(Index)).call.apply(e,[this].concat(r))),n.config={"navigationBarTitleText":"首页"},_possibleConstructorReturn(n,t)}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Index,o["Component"]),u(Index,[{"key":"componentWillMount","value":function componentWillMount(){r.a.redirectTo({"url":"/pages/home/index"})}},{"key":"componentDidMount","value":function componentDidMount(){}},{"key":"componentWillUnmount","value":function componentWillUnmount(){}},{"key":"componentDidShow","value":function componentDidShow(){}},{"key":"componentDidHide","value":function componentDidHide(){}},{"key":"render","value":function render(){return c.a.createElement(a.a,{"className":"index"},c.a.createElement(s.a,null,"Hello world!"))}}]),Index}()}}]);
|
||||
@@ -42,8 +42,8 @@ export default class CartIndex extends Component {
|
||||
}
|
||||
|
||||
handleClickItem (item) {
|
||||
const { cat_id } = item
|
||||
const url = `/pages/item/list?cat_id=${cat_id}`
|
||||
const { category_id } = item
|
||||
const url = `/pages/item/list?cat_id=${category_id}`
|
||||
|
||||
Taro.navigateTo({
|
||||
url
|
||||
|
||||
@@ -9,7 +9,7 @@ export default class Index extends Component {
|
||||
|
||||
componentWillMount () {
|
||||
Taro.redirectTo({
|
||||
url: '/pages/item/point-detail?id=560'
|
||||
url: '/pages/home/index'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user