Browse Source

‘tinaj添加资源

wangyong 5 years ago
parent
commit
3bf3c8d144

+ 7 - 0
customized/pages/boxMade/boxComb/boxComb.js

@@ -46,6 +46,7 @@ Page({
     buildSrcArray: [],
     dataId:[],
     customGoodsImg: "",
+    customGoodsMaterial:"",//定制资源图片
 
   },
 
@@ -140,6 +141,11 @@ Page({
       imgTouch = wx.getStorageSync('madeCupImgData' + i);
       dataPositionObj = util.changeCup(i.toString()).dataPositionObj;
       console.log(dataPositionObj, imgTouch,"dataPositionObj")
+      let customGoodsMaterial = that.data.customGoodsMaterial;
+      customGoodsMaterial += imgTouch.src.replace(host,'')+',';
+      that.setData({
+        customGoodsMaterial: customGoodsMaterial
+      })
       wx.getSystemInfo({
         success: function (res) {
           let rpx = res.windowWidth / 750;
@@ -380,6 +386,7 @@ Page({
         customGoodsNum: 1,
         userId: app.globalData.user_id,
         customGoodsId:wx.getStorageSync('detail').id,
+        customGoodsMaterial: that.data.customGoodsMaterial.substring(0, that.data.customGoodsMaterial.length-1),
       },
       success: function (res) {
         console.log(res, "加入购物车")

+ 7 - 0
customized/pages/made/comb/comb.js

@@ -60,6 +60,7 @@ Page({
     },
     buildSrcArray: [],
     customGoodsImg:"",
+    customGoodsMaterial: "",//定制资源图片
 
   },
 
@@ -169,6 +170,11 @@ Page({
       imgTouch = wx.getStorageSync('madeCupImgData'+i);
       dataPositionObj = util.changeCup(i.toString()).dataPositionObj;
       console.log(dataPositionObj,"dataPositionObj")
+      let customGoodsMaterial = that.data.customGoodsMaterial;
+      customGoodsMaterial += imgTouch.src.replace(host, '') + ',';
+      that.setData({
+        customGoodsMaterial: customGoodsMaterial
+      })
       wx.getSystemInfo({
         success: function (res) {
           let rpx = res.windowWidth / 750;
@@ -381,6 +387,7 @@ Page({
         customGoodsName:'奶缸-黑色 350ml',
         customGoodsNum: 1,
         userId: app.globalData.user_id,
+        customGoodsMaterial: that.data.customGoodsMaterial.substring(0, that.data.customGoodsMaterial.length - 1),
       },
       success:function(res){
         console.log(res,"加入购物车")

+ 7 - 0
customized/pages/oneMade/oneComb/oneComb.js

@@ -45,6 +45,7 @@ Page({
     imgSrcArray: [],
     buildSrcArray: [],
     customGoodsImg: "",
+    customGoodsMaterial: "",//定制资源图片
 
   },
 
@@ -131,6 +132,11 @@ Page({
     })
     if (wx.getStorageSync('madeImgData' + i)) {
       imgTouch = wx.getStorageSync('madeImgData' + i);
+      let customGoodsMaterial = that.data.customGoodsMaterial;
+      customGoodsMaterial += imgTouch.src.replace(host, '') + ',';
+      that.setData({
+        customGoodsMaterial: customGoodsMaterial
+      })
       wx.getSystemInfo({
         success: function (res) {
           let rpx = res.windowWidth / 750;
@@ -351,6 +357,7 @@ Page({
         customGoodsNum: 1,
         userId: app.globalData.user_id,
         customGoodsId:wx.getStorageSync('detail').id,
+        customGoodsMaterial: that.data.customGoodsMaterial.substring(0, that.data.customGoodsMaterial.length - 1),
       },
       success: function (res) {
         console.log(res, "加入购物车")

+ 1 - 1
readme.md

@@ -17,4 +17,4 @@
       y = -高度/2
       fillRect(x,y,宽度,高度)
 ### 缺少详情页,字体加粗、字体定制
-v:3.1.7
+v:3.1.8