design.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. var memberMyOrderHtml = '<div></div>';
  2. Vue.component("diy-member-my-order-sources", {
  3. template: memberMyOrderHtml,
  4. data: function () {
  5. return {
  6. data: this.$parent.data,
  7. styleList: [
  8. {text: '样式一', value: 1},
  9. {text: '样式二', value: 2},
  10. {text: '样式三', value: 3},
  11. {text: '样式四', value: 4}
  12. ],
  13. iconList: [
  14. {
  15. title: "风格一",
  16. data: {
  17. "waitPay": {
  18. "title": "待付款",
  19. "icon": "icondiy icon-system-daifukuan2",
  20. "style": {
  21. "bgRadius": 0,
  22. "fontSize": 75,
  23. "iconBgColor": [],
  24. "iconBgColorDeg": 0,
  25. "iconBgImg": "",
  26. "iconColor": ["#FF7B1D", "#FF1544"],
  27. "iconColorDeg": 0
  28. }
  29. },
  30. "waitSend": {
  31. "title": "待发货",
  32. "icon": "icondiy icon-system-daifahuo2",
  33. "style": {
  34. "bgRadius": 0,
  35. "fontSize": 75,
  36. "iconBgColor": [],
  37. "iconBgColorDeg": 0,
  38. "iconBgImg": "",
  39. "iconColor": ["#FF7B1D", "#FF1544"],
  40. "iconColorDeg": 0
  41. }
  42. },
  43. "waitConfirm": {
  44. "title": "待收货",
  45. "icon": "icondiy icon-system-daishouhuo2",
  46. "style": {
  47. "bgRadius": 0,
  48. "fontSize": 75,
  49. "iconBgColor": [],
  50. "iconBgColorDeg": 0,
  51. "iconBgImg": "",
  52. "iconColor": ["#FF7B1D", "#FF1544"],
  53. "iconColorDeg": 0
  54. }
  55. },
  56. "waitUse": {
  57. "title": "待使用",
  58. "icon": "icondiy icon-system-daishiyong2",
  59. "style": {
  60. "bgRadius": 0,
  61. "fontSize": 75,
  62. "iconBgColor": [],
  63. "iconBgColorDeg": 0,
  64. "iconBgImg": "",
  65. "iconColor": ["#FF7B1D", "#FF1544"],
  66. "iconColorDeg": 0
  67. }
  68. },
  69. "refunding": {
  70. "title": "售后",
  71. "icon": "icondiy icon-system-shuhou2",
  72. "style": {
  73. "bgRadius": 0,
  74. "fontSize": 75,
  75. "iconBgColor": [],
  76. "iconBgColorDeg": 0,
  77. "iconBgImg": "",
  78. "iconColor": ["#FF7B1D", "#FF1544"],
  79. "iconColorDeg": 0
  80. }
  81. }
  82. }
  83. },
  84. {
  85. title: "风格二",
  86. data: {
  87. "waitPay": {
  88. "title": "待付款",
  89. "icon": "icondiy icon-system-daifukuan",
  90. "style": {
  91. "bgRadius": 0,
  92. "fontSize": 75,
  93. "iconBgColor": [],
  94. "iconBgColorDeg": 0,
  95. "iconBgImg": "",
  96. "iconColor": [],
  97. "iconColorDeg": 0
  98. }
  99. },
  100. "waitSend": {
  101. "title": "待发货",
  102. "icon": "icondiy icon-system-daifahuo",
  103. "style": {
  104. "bgRadius": 0,
  105. "fontSize": 75,
  106. "iconBgColor": [],
  107. "iconBgColorDeg": 0,
  108. "iconBgImg": "",
  109. "iconColor": [],
  110. "iconColorDeg": 0
  111. }
  112. },
  113. "waitConfirm": {
  114. "title": "待收货",
  115. "icon": "icondiy icon-system-daishouhuo",
  116. "style": {
  117. "bgRadius": 0,
  118. "fontSize": 75,
  119. "iconBgColor": [],
  120. "iconBgColorDeg": 0,
  121. "iconBgImg": "",
  122. "iconColor": [],
  123. "iconColorDeg": 0
  124. }
  125. },
  126. "waitUse": {
  127. "title": "待使用",
  128. "icon": "icondiy icon-system-daishiyong",
  129. "style": {
  130. "bgRadius": 0,
  131. "fontSize": 75,
  132. "iconBgColor": [],
  133. "iconBgColorDeg": 0,
  134. "iconBgImg": "",
  135. "iconColor": [],
  136. "iconColorDeg": 0
  137. }
  138. },
  139. "refunding": {
  140. "title": "售后",
  141. "icon": "icondiy icon-system-shuhou",
  142. "style": {
  143. "bgRadius": 0,
  144. "fontSize": 75,
  145. "iconBgColor": [],
  146. "iconBgColorDeg": 0,
  147. "iconBgImg": "",
  148. "iconColor": [],
  149. "iconColorDeg": 0
  150. }
  151. }
  152. }
  153. },
  154. {
  155. title: "风格三",
  156. data: {
  157. "waitPay": {"title": "待付款"},
  158. "waitSend": {"title": "待发货"},
  159. "waitConfirm": {"title": "待收货"},
  160. "waitUse": {"title": "待使用"},
  161. "refunding": {"title": "售后"}
  162. }
  163. },
  164. {
  165. title: "风格四",
  166. data: {
  167. "waitPay": {
  168. "title": "待支付",
  169. "icon": "icondiy icon-system-daizhifu",
  170. "style": {
  171. "bgRadius": 0,
  172. "fontSize": 90,
  173. "iconBgColor": [],
  174. "iconBgColorDeg": 0,
  175. "iconBgImg": "",
  176. "iconColor": ["#20DA86", "#03B352"],
  177. "iconColorDeg": 0
  178. }
  179. },
  180. "waitSend": {
  181. "title": "备货中",
  182. "icon": "icondiy icon-system-beihuozhong",
  183. "style": {
  184. "bgRadius": 0,
  185. "fontSize": 90,
  186. "iconBgColor": [],
  187. "iconBgColorDeg": 0,
  188. "iconBgImg": "",
  189. "iconColor": ["#20DA86", "#03B352"],
  190. "iconColorDeg": 0
  191. }
  192. },
  193. "waitConfirm": {
  194. "title": "配送中",
  195. "icon": "icondiy icon-system-paisongzhong",
  196. "style": {
  197. "bgRadius": 0,
  198. "fontSize": 90,
  199. "iconBgColor": [],
  200. "iconBgColorDeg": 0,
  201. "iconBgImg": "",
  202. "iconColor": ["#20DA86", "#03B352"],
  203. "iconColorDeg": 0
  204. }
  205. },
  206. "waitUse": {
  207. "title": "待使用",
  208. "icon": "icondiy icon-system-daishiyong2",
  209. "style": {
  210. "bgRadius": 0,
  211. "fontSize": 75,
  212. "iconBgColor": [],
  213. "iconBgColorDeg": 0,
  214. "iconBgImg": "",
  215. "iconColor": ["#20DA86", "#03B352"],
  216. "iconColorDeg": 0
  217. }
  218. },
  219. "refunding": {
  220. "title": "退换货",
  221. "icon": "icondiy icon-system-tuihuoguanli",
  222. "style": {
  223. "bgRadius": 0,
  224. "fontSize": 90,
  225. "iconBgColor": [],
  226. "iconBgColorDeg": 0,
  227. "iconBgImg": "",
  228. "iconColor": ["#20DA86", "#03B352"],
  229. "iconColorDeg": 0
  230. }
  231. }
  232. }
  233. }
  234. ]
  235. };
  236. },
  237. created: function () {
  238. this.$parent.data.ignore = [];//加载忽略内容 -- 其他设置中的属性设置
  239. this.$parent.data.ignoreLoad = true; // 等待忽略数组赋值后加载
  240. // 组件所需的临时数据
  241. this.$parent.data.tempData = {
  242. styleList: this.styleList,
  243. systemColor: diyMemberMyOrderSystemColor,
  244. methods: {
  245. switchIconStyle: this.switchIconStyle,
  246. handleIconStyle: this.handleIconStyle
  247. },
  248. };
  249. },
  250. methods: {
  251. verify: function (index) {
  252. var res = {code: true, message: ""};
  253. return res;
  254. },
  255. handleIconStyle(data) {
  256. if (this.data.style == 1 || this.data.style == 4) {
  257. data.iconColor = [colourBlend(diyMemberMyOrderSystemColor.main_color, '#ffffff', 0.5), diyMemberMyOrderSystemColor.main_color];
  258. }
  259. return data;
  260. },
  261. switchIconStyle(index) {
  262. this.$parent.data.style = index + 1;
  263. this.$parent.data.icon = {};
  264. var self = this;
  265. setTimeout(function () {
  266. self.$parent.data.icon = self.iconList[index].data;
  267. })
  268. }
  269. }
  270. });