Commit 1027cb4b7d52e7aa612307842f87c7fc1ac3f019

Authored by 后端研发-苏明海
2 parents 278c851b 48106e65

Merge branch 'dev' into 'test'

Dev

See merge request !706
components/diy_store_select/diy_store_select.js
@@ -44,10 +44,6 @@ Component({ @@ -44,10 +44,6 @@ Component({
44 44
45 //获取顶部的门店 45 //获取顶部的门店
46 getApp().get_user_store(function(){ 46 getApp().get_user_store(function(){
47 - var top_store=getApp().globalData.pk_store;  
48 - if(top_store){  
49 - th.setData({top_store:top_store});  
50 - }else{  
51 wx.getLocation({ 47 wx.getLocation({
52 type: 'gcj02', 48 type: 'gcj02',
53 success: function(res) { 49 success: function(res) {
@@ -61,9 +57,12 @@ Component({ @@ -61,9 +57,12 @@ Component({
61 } 57 }
62 } 58 }
63 }) 59 })
64 - } 60 +
65 }) 61 })
66 }, 62 },
  63 +
  64 +
  65 +
67 //-- 设置最近的店为默认的店,一开始加载的时候 -- 66 //-- 设置最近的店为默认的店,一开始加载的时候 --
68 set_fir_store_to_def(){ 67 set_fir_store_to_def(){
69 var th=this; 68 var th=this;
@@ -74,7 +73,13 @@ Component({ @@ -74,7 +73,13 @@ Component({
74 page:1, 73 page:1,
75 }; 74 };
76 dd.lat = th.data.lat; 75 dd.lat = th.data.lat;
77 - dd.lon = th.data.lon; 76 + dd.lon = th.data.lon;
  77 +
  78 + var top_store=getApp().globalData.pk_store;
  79 + if(top_store){
  80 + dd.pickup_id=top_store.pickup_id;
  81 + }
  82 +
78 //----------获取门店,最近的门店---------------- 83 //----------获取门店,最近的门店----------------
79 getApp().request.promiseGet("/api/weshop/pickup/list", { 84 getApp().request.promiseGet("/api/weshop/pickup/list", {
80 data: dd, 85 data: dd,
@@ -173,8 +178,7 @@ Component({ @@ -173,8 +178,7 @@ Component({
173 this.deal_pickup(this.data.all_pick_list,func) 178 this.deal_pickup(this.data.all_pick_list,func)
174 return false; 179 return false;
175 } 180 }
176 - var th = this,that=this;  
177 - var i = getApp().request; 181 + var th = this,that=this;
178 var dd = { 182 var dd = {
179 store_id: o.stoid, 183 store_id: o.stoid,
180 isstop: 0, 184 isstop: 0,
components/diy_store_select/diy_store_select.wxml
  1 +<wxs module="filters" src="../../utils/filter.wxs"></wxs>
  2 +
1 <!-- 如果是自定义模板的时候 --> 3 <!-- 如果是自定义模板的时候 -->
2 <block wx:if="{{object}}"> 4 <block wx:if="{{object}}">
3 <view class="store_sele1 flex ai_c" bindtap="sele_top_store" style="background-color:{{object.bgcolor}};color: {{object.word_color}};"> 5 <view class="store_sele1 flex ai_c" bindtap="sele_top_store" style="background-color:{{object.bgcolor}};color: {{object.word_color}};">
@@ -51,7 +53,7 @@ @@ -51,7 +53,7 @@
51 </view> 53 </view>
52 <view> 54 <view>
53 <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}"> 55 <view class="distance fs24 address-val"wx:if="{{item.distance!=null}}">
54 - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> 56 + 距离: {{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view>
55 </view> 57 </view>
56 </view> 58 </view>
57 <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> 59 <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
packageB/components/painter/painter.js
@@ -746,7 +746,7 @@ Component({ @@ -746,7 +746,7 @@ Component({
746 fail: (error) => { 746 fail: (error) => {
747 // 如果图片坏了,则直接置空,防止坑爹的 canvas 画崩溃了 747 // 如果图片坏了,则直接置空,防止坑爹的 canvas 画崩溃了
748 view.url = ""; 748 view.url = "";
749 - console.error(`getImageInfo ${view.url} failed, ${JSON.stringify(error)}`); 749 + // console.error(`getImageInfo ${view.url} failed, ${JSON.stringify(error)}`);
750 }, 750 },
751 complete: () => { 751 complete: () => {
752 completeCount++; 752 completeCount++;
packageB/images/luckDraw/jiang.png 0 → 100644

19.6 KB

packageB/pages/luckactivity/luckinfo/luckinfo.js
  1 +var util = require("../../../../utils/util.js");
1 var WxParse = require('../../../../utils/wxParse/wxParse.js'); 2 var WxParse = require('../../../../utils/wxParse/wxParse.js');
2 const app = getApp(); 3 const app = getApp();
3 let imghost = app.globalData.setting.imghost; 4 let imghost = app.globalData.setting.imghost;
4 let self = null; 5 let self = null;
  6 +let imgDraw = {
  7 + "width": "554px",
  8 + "height": "899px",
  9 + "background": imghost + "miniapp/images/share_bg.png",
  10 + "views": [
  11 + { //0.头像
  12 + "type": "image",
  13 + // "url": "",
  14 + "css": {
  15 + "background": "white",
  16 + "width": "80px",
  17 + "height": "80px",
  18 + "top": "24px",
  19 + "left": "40px",
  20 + "borderRadius": "80px",
  21 + }
  22 + },
  23 + { //1.昵称
  24 + "type": "text",
  25 + "text": "",
  26 + "css": {
  27 + "color": "#000000",
  28 + "width": "400px",
  29 + "top": "25px",
  30 + "left": "140px",
  31 + "fontSize": "26px",
  32 + "maxLines": "1",
  33 + }
  34 + },
  35 + { //2.强烈推荐
  36 + "type": "text",
  37 + "text": "强烈推荐",
  38 + "css": {
  39 + "color": "#fff",
  40 + "background": "#FF6768",
  41 + "width": "105px",
  42 + "height": "26px",
  43 + "lineHeight": "26px",
  44 + "top": "70px",
  45 + "left": "140px",
  46 + "borderRadius": "10px",
  47 + "fontSize": "18px",
  48 + "textAlign": "center"
  49 +
  50 + }
  51 + },
  52 + { //3.分享标题
  53 + "type": "text",
  54 + "text": "",
  55 + "css": {
  56 + "width": "554px",
  57 + "padding": "20px",
  58 + "left": "20px",
  59 + "top": "160px",
  60 + "fontSize": "28px",
  61 + "textAlign": "left",
  62 + "maxLines": "1",
  63 + }
  64 + },
  65 + { //4.分享内容
  66 + "type": "text",
  67 + // "text": "",
  68 + "css": {
  69 + "color": "#000000",
  70 + "width": "554px",
  71 + "padding": "20px",
  72 + "left": "20px",
  73 + "top": "190px",
  74 + "fontSize": "26px",
  75 + "textAlign": "center",
  76 + "maxLines": "1",
  77 + }
  78 + },
  79 + { //5.分享图片
  80 + "type": "image",
  81 + "url": "/packageB/images/luckDraw/jiang.png",
  82 + "css": {
  83 + "width": "auto",
  84 + "height": "350px",
  85 + "top": "230px",
  86 + "left": "277px",
  87 + "align": "center",
  88 + "mode": "aspectFill",
  89 + }
  90 + },
  91 + { //6
  92 + "type": "image",
  93 + "url": "/images/share/s_gou.png",
  94 + "css": {
  95 + "width": "30px",
  96 + "height": "30px",
  97 + "top": "620px",
  98 + "left": "18px",
  99 + "rotate": "0",
  100 + "borderRadius": "30px",
  101 + }
  102 + },
  103 + { //7
  104 + "type": "text",
  105 + "text": "正品保障",
  106 + "css": {
  107 + "color": "red",
  108 + "width": "110px",
  109 + "top": "620px",
  110 + "left": "52px",
  111 + "fontSize": "22px",
  112 + }
  113 + },
  114 + { //8
  115 + "type": "image",
  116 + "url": "/images/share/s_gou.png",
  117 + "css": {
  118 + "width": "30px",
  119 + "height": "30px",
  120 + "top": "620px",
  121 + "left": "208px",
  122 + "borderRadius": "30px",
  123 + }
  124 + },
  125 + { //9
  126 + "type": "text",
  127 + "text": "纯实体店",
  128 + "css": {
  129 + "color": "red",
  130 + "width": "129px",
  131 + "top": "620px",
  132 + "left": "243px",
  133 + "fontSize": "22px",
  134 + }
  135 + },
  136 + { //10
  137 + "type": "image",
  138 + "url": "/images/share/s_gou.png",
  139 + "css": {
  140 + "width": "30px",
  141 + "height": "30px",
  142 + "top": "620px",
  143 + "left": "410px",
  144 + "borderRadius": "30px",
  145 + }
  146 + },
  147 + { //11
  148 + "type": "text",
  149 + "text": "官方验证",
  150 + "css": {
  151 + "color": "red",
  152 + "width": "121px",
  153 + "top": "620px",
  154 + "left": "450px",
  155 + "fontSize": "22px",
  156 + }
  157 + },
  158 + { //12.横线
  159 + "type": "rect",
  160 + "css": {
  161 + "background": "#f0f0f0",
  162 + "width": "554px",
  163 + "height": "1px",
  164 + "top": "676px",
  165 + "left": "0px",
  166 + }
  167 + },
  168 + { //13
  169 + "type": "text",
  170 + "text": "特惠活动时间仅限",
  171 + "css": {
  172 + "color": "#000000",
  173 + "width": "245px",
  174 + "top": "730px",
  175 + "left": "28px",
  176 + "fontSize": "24px",
  177 + "textAlign": "left"
  178 + }
  179 + },
  180 + { //14.时间
  181 + "type": "text",
  182 + // "text": "",
  183 + "css": {
  184 + "width": "377px",
  185 + "top": "770px",
  186 + "left": "28px",
  187 + "fontSize": "24px",
  188 + }
  189 + },
  190 + { //15
  191 + "type": "text",
  192 + "text": "长按识别小程序码有惊喜哦!",
  193 + "css": {
  194 + "color": "#7c7c7c",
  195 + "width": "348px",
  196 + "top": "810px",
  197 + "left": "27px",
  198 + "fontSize": "24px",
  199 + }
  200 + },
  201 +
  202 + { //16.码
  203 + "type": "image",
  204 + // "url": "",
  205 + "css": {
  206 + "width": "150px",
  207 + "height": "150px",
  208 + "top": "705px",
  209 + "left": "380px",
  210 + "mode": "scaleToFill"
  211 + }
  212 + },
  213 +
  214 + ]
  215 + };
  216 +
5 217
6 Page({ 218 Page({
7 data: { 219 data: {
  220 + imgDraw: imgDraw,
8 start: false, 221 start: false,
9 list: null, 222 list: null,
10 isLoading: false, // 检测是否已经发送请求,防止重复发送请求 223 isLoading: false, // 检测是否已经发送请求,防止重复发送请求
@@ -12,6 +225,8 @@ Page({ @@ -12,6 +225,8 @@ Page({
12 pageNum: 1, // 当前页数 225 pageNum: 1, // 当前页数
13 imghost: imghost, 226 imghost: imghost,
14 num: 3, 227 num: 3,
  228 + canStart: false,
  229 +
15 230
16 prizes: [], 231 prizes: [],
17 defaultConfig: { 232 defaultConfig: {
@@ -63,7 +278,10 @@ Page({ @@ -63,7 +278,10 @@ Page({
63 // }); 278 // });
64 // console.log('imghost+++++', imghost); 279 // console.log('imghost+++++', imghost);
65 self = this; 280 self = this;
  281 + let first_leader = null;
66 this.data.options = options; 282 this.data.options = options;
  283 +
  284 +
67 // this.setData({ 285 // this.setData({
68 // options, 286 // options,
69 // imghost, 287 // imghost,
@@ -72,28 +290,58 @@ Page({ @@ -72,28 +290,58 @@ Page({
72 wx.setNavigationBarTitle({ 290 wx.setNavigationBarTitle({
73 title: options.title, 291 title: options.title,
74 }); 292 });
  293 +
  294 +
75 app.isLogin().then(function(data) {//进入页面前已经授权登录成功 295 app.isLogin().then(function(data) {//进入页面前已经授权登录成功
76 self.setData({ 296 self.setData({
77 userInfo: data, 297 userInfo: data,
78 - // imghost,  
79 }); 298 });
80 }); 299 });
  300 +
  301 +
  302 +
  303 + //从分享的跳转过来
  304 + if (options.id == undefined || options.id == null || options.id == '') {
  305 + var scene = decodeURIComponent(options.scene);
  306 + scene = scene.split('_');
  307 + first_leader = scene[0];
  308 + this.data.options.id = scene[1];
  309 + };
  310 +
  311 + if(first_leader) {
  312 + // console.log("log---", first_leader);
  313 + app.globalData.first_leader = first_leader;
  314 + //调用接口判断是不是会员
  315 + app.request.promiseGet("/api/weshop/shoppingGuide/get/" + app.globalData.setting.stoid +"/" + first_leader,{}).then(res=>{
  316 + if(res.data.code==0){
  317 + app.globalData.guide_id = res.data.data.id;
  318 + }
  319 + })
  320 + };
  321 +
  322 +
  323 +
  324 +
  325 +
81 }, 326 },
82 327
83 onShow() { 328 onShow() {
  329 + // console.log('show~~`');
84 if(app.globalData.userInfo) { 330 if(app.globalData.userInfo) {
85 if(!this.data.isLogin) { 331 if(!this.data.isLogin) {
86 -  
87 this.setData({ 332 this.setData({
88 userInfo: app.globalData.userInfo, 333 userInfo: app.globalData.userInfo,
89 isLogin: true, 334 isLogin: true,
  335 + 'imgDraw.views[0].url': app.globalData.userInfo.head_pic,//头像
  336 + 'imgDraw.views[1].text': app.globalData.userInfo.nickname,//昵称
90 }); 337 });
91 -  
92 // console.log('imghost', this.data.imghost); 338 // console.log('imghost', this.data.imghost);
93 let user_id = app.globalData.userInfo.user_id; 339 let user_id = app.globalData.userInfo.user_id;
94 let store_id = app.globalData.setting.stoid; 340 let store_id = app.globalData.setting.stoid;
95 let id = this.data.options.id; 341 let id = this.data.options.id;
96 let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`; 342 let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`;
  343 +
  344 +
97 345
98 346
99 app.request.get(url, { 347 app.request.get(url, {
@@ -114,33 +362,89 @@ Page({ @@ -114,33 +362,89 @@ Page({
114 // console.log('luckInfo', res.data.data); 362 // console.log('luckInfo', res.data.data);
115 let luckInfo = res.data.data; 363 let luckInfo = res.data.data;
116 364
117 - 365 + self.setData({
  366 + 'imgDraw.views[3].text': self.data.luckInfo.act_name,//分享标题
  367 + // 'imgDraw.views[4].text': '快来一起抽奖吧,精美奖品等着你!',//分享内容
  368 + 'imgDraw.views[14].text': util.formar_no_full(self.data.luckInfo.begindate) + ' 至 ' + util.formar_no_full(self.data.luckInfo.enddate),//活动时间
  369 + });
  370 +
  371 +
  372 + let luckStyle = null;
118 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板 373 if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板
119 - let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`; 374 + let url = `/api/weshop/marketing/marketingLuckTemplate/get/0/${luckInfo.template_id}`;
120 app.request.get(url, { 375 app.request.get(url, {
121 success: function(res) { 376 success: function(res) {
122 - // console.log('prizes//////', res.data.data);  
123 - self.setData({  
124 - template: res.data.data,  
125 - bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图  
126 - 'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘  
127 - 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针  
128 - }); 377 + let template = null;
  378 + if(res.data.code == 0) {
  379 + template = res.data.data;
  380 + self.setData({
  381 + template,
  382 + bannerUrl: imghost + template.bannerUrl, //背景图
  383 + 'blocks[0].imgs[0].src': imghost + ((template&&template.wheelBaseUrl) ? template.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  384 + 'buttons[0].imgs[0].src': imghost + ((template&&template.wheelPointerUrl) ? template.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
  385 + 'imgDraw.views[3].text': template.title, //分享标题
  386 + 'imgDraw.views[5].url': imghost + (template&&template.share_image ? template.share_image:self.data.luckInfo.imageurl), //分享图片
  387 + });
  388 +
  389 + let color = template&&template.colorCode ? template.colorCode:'#da104b';
  390 + luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`;
  391 + self.setData({
  392 + luckStyle,
  393 + });
  394 + // self.setData({
  395 + // template: res.data.data,
  396 + // bannerUrl: imghost + res.data.data.bannerUrl, //背景图
  397 + // //bannerUrl: imghost + ((res.data.data&&res.data.data.bannerUrl) ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png?v=2'), //背景图
  398 + // 'blocks[0].imgs[0].src': imghost + res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  399 + // 'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
  400 + // 'imgDraw.views[3].text': (res.data.data&&res.data.data.title) ? res.data.data.title : self.data.luckInfo.act_name,//分享标题
  401 + // // 'imgDraw.views[4].text': (res.data.data&&res.data.data.share_content) ? res.data.data.share_content : '快来一起抽奖吧,精美奖品等着你!',//分享内容
  402 + // 'imgDraw.views[5].url': (res.data.data&&res.data.data.share_image) ? (imghost + res.data.data.share_image):(self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packpageB/images/luckDraw/jiang.png'),//分享图片
  403 + // 'imgDraw.views[14].text': util.formar_no_full(self.data.luckInfo.begindate) + ' 至 ' + util.formar_no_full(self.data.luckInfo.enddate),//活动时间
  404 + // });
  405 + } else {
  406 + luckStyle = `background: #da104b url(${imghost + 'miniapp/images/luckDraw/bg.png?v=2'}) no-repeat;`;
  407 + self.setData({
  408 + luckStyle,
  409 + 'imgDraw.views[5].url': self.data.luckInfo.imageurl ? (imghost + self.data.luckInfo.imageurl):'/packageB/images/luckDraw/jiang.png', //分享图片
  410 + //'blocks[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelBaseUrl) ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png?v=2'), //转盘
  411 + //'buttons[0].imgs[0].src': imghost + ((res.data.data&&res.data.data.wheelPointerUrl) ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png?v=2'), //指针
  412 + });
  413 + // let color = template&&template.colorCode ? template.colorCode:'#da104b';
  414 +
  415 + // self.setData({
  416 + // luckStyle,
  417 + // });
  418 + };
  419 +
129 }, 420 },
130 }); 421 });
131 } else { 422 } else {
132 - // wx.hideLoading(); 423 +
  424 + if(luckInfo && luckInfo.imageurl) {
  425 + self.setData({
  426 + 'imgDraw.views[5].url': imghost + self.data.luckInfo.imageurl, //分享图片
  427 + });
  428 + };
  429 +
133 if(luckInfo && luckInfo.store_bannerUrl) { 430 if(luckInfo && luckInfo.store_bannerUrl) {
134 self.setData({ 431 self.setData({
135 bannerUrl: imghost + luckInfo.store_bannerUrl, 432 bannerUrl: imghost + luckInfo.store_bannerUrl,
  433 + custom: true,
  434 + });
  435 + } else {
  436 + self.setData({
  437 + bannerUrl: imghost + 'miniapp/images/luckDraw/bg.png?v=2',
  438 + custom: false,
136 }); 439 });
137 }; 440 };
138 441
139 - // self.setData({  
140 - // showMask2: false,  
141 - // hiddenCanvas: false,  
142 - // });  
143 - 442 + let color = self.data.custom ? '#f0f0f0':'#da104b';
  443 + luckStyle = `background: ${color} url(${self.data.bannerUrl}) no-repeat;`;
  444 + self.setData({
  445 + luckStyle,
  446 + });
  447 +
144 }; 448 };
145 449
146 450
@@ -149,7 +453,6 @@ Page({ @@ -149,7 +453,6 @@ Page({
149 title: self.data.luckInfo.msgInfo, 453 title: self.data.luckInfo.msgInfo,
150 icon: 'none', 454 icon: 'none',
151 }); 455 });
152 - // return;  
153 }; 456 };
154 457
155 }, 458 },
@@ -167,7 +470,7 @@ Page({ @@ -167,7 +470,7 @@ Page({
167 self.setData({ 470 self.setData({
168 award, 471 award,
169 }); 472 });
170 - console.log('award', award); 473 + // console.log('award', award);
171 self.prizeLayout(award); 474 self.prizeLayout(award);
172 475
173 }, 476 },
@@ -211,6 +514,24 @@ Page({ @@ -211,6 +514,24 @@ Page({
211 }, 514 },
212 }); 515 });
213 516
  517 + let mainUrl = app.globalData.setting.url;
  518 + // let stoid = app.globalData.setting.stoid;
  519 + let cj_id = this.data.options.id;
  520 + // let user_id = app.globalData.userInfo.user_id;
  521 +
  522 + wx.getImageInfo({
  523 + src: `${mainUrl}/api/wx/open/app/user/getWeAppEwm/${store_id}?sceneValue=${user_id}_${cj_id}&pageValue=pages/index/index/index`,
  524 + success (res) {
  525 + if(res.code != -1) {
  526 + self.setData({
  527 + 'imgDraw.views[16].url': res.path,
  528 + });
  529 + };
  530 +
  531 + }
  532 + });
  533 +
  534 +
214 }; 535 };
215 }; 536 };
216 }, 537 },
@@ -503,146 +824,184 @@ Page({ @@ -503,146 +824,184 @@ Page({
503 return; 824 return;
504 }; 825 };
505 826
506 -  
507 - if(this.data.luckInfo.user_LuckNumDay > 0 || this.data.luckInfo.vip_act_num == 0) {  
508 - // console.log('start choujiang');  
509 - // let start = false;  
510 - if(!this.data.start) {  
511 - this.data.start = true;  
512 - // 获取抽奖组件实例  
513 - const $lucky = this.selectComponent('#myLucky');  
514 - // 调用play方法开始旋转  
515 - $lucky.play(); 827 + // 获取积分
  828 + app.request.promisePost('/api/weshop/marketing/marketingLuckForm/startLuckIntegral', {
  829 + isShowLoading: false,
  830 + data: {
  831 + storeId: app.globalData.setting.stoid,
  832 + userId: app.globalData.userInfo.user_id,
  833 + LuckId: this.data.options.id,
  834 + },
  835 + })
  836 + .then(function(res) {
  837 + if(res.data.code == -1) {
  838 + //积分不足,弹出提示
  839 + self.data.luckInfo.msgInfo = res.data.msg
  840 + wx.showToast({
  841 + title: res.data.msg,
  842 + icon: 'none',
  843 + });
  844 + return;
  845 + };
  846 +
  847 + if(res.data.code == 0) {
516 848
517 - // 获取抽奖结果  
518 - app.request.post('/api/weshop/marketing/marketingLuckForm/startLuck', {  
519 - isShowLoading: false,  
520 - data: {  
521 - storeId: app.globalData.setting.stoid,  
522 - userId: app.globalData.userInfo.user_id,  
523 - LuckId: this.data.options.id,  
524 - },  
525 - success: function(res) { 849 + if(self.data.luckInfo.user_LuckNumDay > 0 || self.data.luckInfo.vip_act_num == 0) {
  850 + // console.log('start choujiang');
  851 + // let start = false;
  852 + if(!self.data.start) {
  853 + self.data.start = true;
  854 + // 获取抽奖组件实例
  855 + const $lucky = self.selectComponent('#myLucky');
  856 + // 调用play方法开始旋转
  857 + $lucky.play();
526 858
527 - if(res.data.code == 0) {  
528 - console.log('开始摇奖', res.data.data);  
529 - if(self.data.luckInfo.vip_act_num != 0) {  
530 - self.setData({  
531 - 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,  
532 - // isActive: true,  
533 - });  
534 - };  
535 -  
536 - self.setData({  
537 - // 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,  
538 - isActive: true,  
539 - wow: res.data.data,  
540 - });  
541 - // console.log('请求成功', res.data.data);  
542 - let luckyId = res.data.data.id;  
543 - let indexArr = self.luckyIndex(self.data.prizes, luckyId);  
544 - // console.log('抽奖奖品id', luckyId);  
545 - // console.log('奖品列表', self.data.prizes);  
546 - // console.log('奖品对应的索引数组', indexArr);  
547 - let random = Math.random() * indexArr.length >> 0;  
548 - // console.log('random', random);  
549 - let index = indexArr[random];  
550 - setTimeout(() => {  
551 - $lucky.stop(index);  
552 - self.data.start = false;  
553 - }, 3000);  
554 -  
555 -  
556 - //获取兑奖记录  
557 - // app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {  
558 - // isShowLoading: false,  
559 - // data: {  
560 - // store_id: app.globalData.setting.stoid,  
561 - // user_id: app.globalData.userInfo.user_id,  
562 - // luck_formid: self.data.options.id,  
563 - // luck_state: 1  
564 - // },  
565 - // success: function(res) {  
566 - // if(res.data.code == 0) {  
567 - // // console.log('res===>', res.data.data.pageData);  
568 - // self.setData({  
569 - // record: res.data.data.pageData,  
570 - // });  
571 - // };  
572 - // },  
573 - // });  
574 -  
575 -  
576 - } else {  
577 - let thxIndexArr = self.data.thxIndexArr;  
578 - const random = Math.random() * thxIndexArr.length >> 0;  
579 - const index = thxIndexArr[random];  
580 - // console.log('谢谢参与数组', thxIndexArr);  
581 - // console.log('请求出错产生谢谢参与的随机数', index);  
582 - setTimeout(() => {  
583 - $lucky.stop(index);  
584 - self.data.start = false;  
585 - }, 3000);  
586 -  
587 - 859 + // 获取抽奖结果
  860 + app.request.post('/api/weshop/marketing/marketingLuckForm/startLuck', {
  861 + isShowLoading: false,
  862 + data: {
  863 + storeId: app.globalData.setting.stoid,
  864 + userId: app.globalData.userInfo.user_id,
  865 + LuckId: self.data.options.id,
  866 + },
  867 + success: function(res) {
  868 +
  869 + if(res.data.code == 0) {
  870 + // console.log('开始摇奖', res.data.data);
  871 + if(self.data.luckInfo.vip_act_num != 0) {
  872 + self.setData({
  873 + 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  874 + // isActive: true,
  875 + });
  876 + };
  877 +
  878 + self.setData({
  879 + // 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  880 + isActive: true,
  881 + wow: res.data.data,
  882 + });
  883 + // console.log('wow', self.data.wow);
  884 + // console.log('请求成功', res.data.data);
  885 + let luckyId = res.data.data.id;
  886 + let indexArr = self.luckyIndex(self.data.prizes, luckyId);
  887 + // console.log('抽奖奖品id', luckyId);
  888 + // console.log('奖品列表', self.data.prizes);
  889 + // console.log('奖品对应的索引数组', indexArr);
  890 + let random = Math.random() * indexArr.length >> 0;
  891 + // console.log('random', random);
  892 + let index = indexArr[random];
  893 + setTimeout(() => {
  894 + $lucky.stop(index);
  895 + self.data.start = false;
  896 + }, 3000);
  897 +
  898 +
  899 + //获取兑奖记录
  900 + // app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {
  901 + // isShowLoading: false,
  902 + // data: {
  903 + // store_id: app.globalData.setting.stoid,
  904 + // user_id: app.globalData.userInfo.user_id,
  905 + // luck_formid: self.data.options.id,
  906 + // luck_state: 1
  907 + // },
  908 + // success: function(res) {
  909 + // if(res.data.code == 0) {
  910 + // // console.log('res===>', res.data.data.pageData);
  911 + // self.setData({
  912 + // record: res.data.data.pageData,
  913 + // });
  914 + // };
  915 + // },
  916 + // });
  917 +
  918 +
  919 + } else {
  920 + let thxIndexArr = self.data.thxIndexArr;
  921 + const random = Math.random() * thxIndexArr.length >> 0;
  922 + const index = thxIndexArr[random];
  923 + // console.log('谢谢参与数组', thxIndexArr);
  924 + // console.log('请求出错产生谢谢参与的随机数', index);
  925 + setTimeout(() => {
  926 + $lucky.stop(index);
  927 + self.data.start = false;
  928 + }, 3000);
  929 +
  930 +
  931 +
  932 +
  933 + if(res.data.code == -1) {
  934 + wx.showToast({
  935 + title: res.data.msg,
  936 + icon: 'none',
  937 + });
  938 + self.data.luckInfo.msgInfo = res.data.msg;
  939 + return;
  940 + // self.data.start = true;
  941 + };
  942 +
  943 +
  944 + if(res.data.code == -2 && self.data.luckInfo.vip_act_num != 0) {
  945 + self.setData({
  946 + 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1,
  947 + });
  948 + };
  949 +
  950 +
  951 + };
  952 +
588 953
  954 + },
589 955
590 - if(res.data.code == -1) { 956 + fail: function(res) {
  957 + // console.log('出错');
591 wx.showToast({ 958 wx.showToast({
592 - title: res.data.msg,  
593 - icon: 'none',  
594 - });  
595 - self.data.luckInfo.msgInfo = res.data.msg;  
596 - return;  
597 - // self.data.start = true;  
598 - };  
599 - // console.log('请求出错');  
600 - if(res.data.code == -2 && self.data.luckInfo.vip_act_num != 0) {  
601 - self.setData({  
602 - 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1, 959 + title: '数据请求失败',
  960 + icon: 'error',
603 }); 961 });
604 - }; 962 + let thxIndexArr = self.data.thxIndexArr;
  963 + const random = Math.random() * thxIndexArr.length >> 0;
  964 + const index = thxIndexArr[random];
  965 + setTimeout(() => {
  966 + $lucky.stop(index);
  967 + self.data.start = false;
  968 + }, 3000);
  969 + },
605 970
606 971
607 972
608 -  
609 - };  
610 - },  
611 -  
612 - fail: function(res) {  
613 - // console.log('出错');  
614 - wx.showToast({  
615 - title: '数据请求失败',  
616 - icon: 'error',  
617 }); 973 });
618 - let thxIndexArr = self.data.thxIndexArr;  
619 - const random = Math.random() * thxIndexArr.length >> 0;  
620 - const index = thxIndexArr[random];  
621 - setTimeout(() => {  
622 - $lucky.stop(index);  
623 - self.data.start = false;  
624 - }, 3000);  
625 - }, 974 +
  975 + }
626 976
627 - }); 977 +
  978 + } else {
  979 + wx.showToast({
  980 + title: '你今天的抽奖次数已用完啦!~',
  981 + icon: 'none',
  982 + });
  983 + };
628 984
629 - }  
630 -  
631 -  
632 - } else {  
633 - wx.showToast({  
634 - title: '你今天的抽奖次数已用完啦!~',  
635 - icon: 'none',  
636 - });  
637 - }; 985 + };
  986 + });
  987 +
  988 +
  989 +
  990 +
  991 +
638 992
639 }, 993 },
640 end (event) { 994 end (event) {
641 // 中奖奖品详情 995 // 中奖奖品详情
642 - console.log('00000000~',event.detail.lbtype); 996 + console.log('抽奖结果:',event.detail);
643 let no_luck_urltype = this.data.luckInfo.no_luck_urltype; 997 let no_luck_urltype = this.data.luckInfo.no_luck_urltype;
644 - let lbtype; 998 + let lbtype = null;
  999 + // let good_id = null;
645 let resultTitle = event.detail.fonts[0].text.replace('\n',''); 1000 let resultTitle = event.detail.fonts[0].text.replace('\n','');
  1001 + // if(event.detail.id) {
  1002 + // console.log('~~~~~~----++++++',event.detail.id);
  1003 + // good_id = event.detail.id;
  1004 + // };
646 if(event.detail.lbtype == 5) { 1005 if(event.detail.lbtype == 5) {
647 lbtype = 5; 1006 lbtype = 5;
648 } else { 1007 } else {
@@ -656,6 +1015,7 @@ Page({ @@ -656,6 +1015,7 @@ Page({
656 resultTitle, 1015 resultTitle,
657 showPopup: false, 1016 showPopup: false,
658 currentLbtype: lbtype, 1017 currentLbtype: lbtype,
  1018 + // good_id,
659 }); 1019 });
660 1020
661 1021
@@ -691,7 +1051,7 @@ Page({ @@ -691,7 +1051,7 @@ Page({
691 }); 1051 });
692 }; 1052 };
693 } else if((self.data.luckInfo.give_type == 2)) { 1053 } else if((self.data.luckInfo.give_type == 2)) {
694 - if(self.data.luckInfo.give_integral > 0) { 1054 + if(self.data.luckInfo.give_growth > 0) {
695 wx.showToast({ 1055 wx.showToast({
696 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`, 1056 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
697 icon: 'none', 1057 icon: 'none',
@@ -708,7 +1068,7 @@ Page({ @@ -708,7 +1068,7 @@ Page({
708 }); 1068 });
709 }; 1069 };
710 } else if((self.data.luckInfo.give_type == 2)) { 1070 } else if((self.data.luckInfo.give_type == 2)) {
711 - if(self.data.luckInfo.give_integral > 0) { 1071 + if(self.data.luckInfo.give_growth > 0) {
712 wx.showToast({ 1072 wx.showToast({
713 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`, 1073 title: `获得游戏奖励成长值${self.data.luckInfo.give_growth}`,
714 icon: 'none', 1074 icon: 'none',
@@ -887,20 +1247,30 @@ Page({ @@ -887,20 +1247,30 @@ Page({
887 }, 1247 },
888 1248
889 showQr(e) { 1249 showQr(e) {
  1250 + let id = null;
890 let store_id = app.globalData.setting.stoid; 1251 let store_id = app.globalData.setting.stoid;
891 - let id = e.currentTarget.dataset.id; 1252 + if(e && e.currentTarget.dataset.id) {
  1253 + id = e.currentTarget.dataset.id;
  1254 + } else {
  1255 + id = this.data.wow.record_id;
  1256 + };
892 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`; 1257 let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`;
  1258 + // console.log('good_id', id, url);
893 app.request.put(url, { 1259 app.request.put(url, {
894 success: function(res) { 1260 success: function(res) {
895 if(res.data.code == 0) { 1261 if(res.data.code == 0) {
896 let data = res.data.data; 1262 let data = res.data.data;
897 - console.log('data!!!!', data);  
898 let barcode = self.selectComponent("#qrcode"); 1263 let barcode = self.selectComponent("#qrcode");
899 barcode.open({val: data}); 1264 barcode.open({val: data});
900 self.setData({ 1265 self.setData({
901 hiddenCanvas: true, 1266 hiddenCanvas: true,
902 showPopup: false, 1267 showPopup: false,
903 }); 1268 });
  1269 + } else {
  1270 + wx.showToast({
  1271 + title: res.data.msg,
  1272 + icon: 'none',
  1273 + });
904 }; 1274 };
905 }, 1275 },
906 1276
@@ -918,6 +1288,31 @@ Page({ @@ -918,6 +1288,31 @@ Page({
918 this.setData({ 1288 this.setData({
919 showResult: false, 1289 showResult: false,
920 }); 1290 });
921 - this.showPopup(); 1291 + this.showQr();
  1292 + },
  1293 +
  1294 + showPoster() {
  1295 + this.setData({
  1296 + hiddenCanvas: true,
  1297 + showMask: true,
  1298 + showPoster: true,
  1299 + });
  1300 + },
  1301 +
  1302 + closePoster() {
  1303 + this.setData({
  1304 + showMask: false,
  1305 + showPoster: false,
  1306 + hiddenCanvas: false,
  1307 + });
  1308 + },
  1309 +
  1310 +
  1311 +
  1312 + onImgOK(e) {
  1313 + this.setData({
  1314 + myimg: e.detail.path,
  1315 + });
922 }, 1316 },
  1317 +
923 }) 1318 })
924 \ No newline at end of file 1319 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.json
@@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
2 "usingComponents": { 2 "usingComponents": {
3 "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index", 3 "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index",
4 "qrcode": "/components/my-qrcode/my-qrcode", 4 "qrcode": "/components/my-qrcode/my-qrcode",
5 - "nodata": "/components/nodata/nodata" 5 + "nodata": "/components/nodata/nodata",
  6 + "painter": "/packageB/components/painter/painter"
6 }, 7 },
7 "enablePullDownRefresh": false, 8 "enablePullDownRefresh": false,
8 "navigationBarTitleText": "幸运大转盘" 9 "navigationBarTitleText": "幸运大转盘"
packageB/pages/luckactivity/luckinfo/luckinfo.wxml
1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs> 1 <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
2 <wxs module="tool" src="./tool.wxs"></wxs> 2 <wxs module="tool" src="./tool.wxs"></wxs>
3 -<view class="luck-container" style="background: {{template.colorCode ? template.colorCode:'#da104b'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png?v=2')}}) no-repeat;"> 3 +<view class="luck-container {{!template&&custom ? 'on':''}}" style="{{luckStyle}}">
  4 +<!-- <view class="luck-container {{!template&&custom ? 'on':''}}" style="background: {{template&&template.colorCode ? template.colorCode:(custom ? '#f0f0f0':'#da104b')}} url({{bannerUrl ? bannerUrl:''}}) no-repeat;"> -->
4 <!-- 中奖人员 --> 5 <!-- 中奖人员 -->
5 <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}"> 6 <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}">
6 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000"> 7 <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000">
@@ -35,17 +36,17 @@ @@ -35,17 +36,17 @@
35 hiddenCanvas="{{hiddenCanvas}}" 36 hiddenCanvas="{{hiddenCanvas}}"
36 /> 37 />
37 </view> 38 </view>
38 - <view class="fs28 white t-c pdt10" wx:if="{{luckInfo.vip_act_num == 0}}">今天你有 <text class="fs50 c-yellow">不限次</text> 抽奖机会</view>  
39 - <view class="fs28 white t-c pdt10" wx:else>今天你还有 <text class="fs50 c-yellow">{{filter.show_default(luckInfo.user_LuckNumDay, '0')}}</text> 次抽奖机会</view> 39 + <view class="weel-txt fs28 white t-c pdt10" wx:if="{{luckInfo.vip_act_num == 0}}">今天你有 <text class="fs50 c-yellow cs">不限次</text> 抽奖机会</view>
  40 + <view class="weel-txt fs28 white t-c pdt10" wx:else>今天你还有 <text class="fs50 c-yellow cs">{{filter.show_default(luckInfo.user_LuckNumDay < 0 ? 0:luckInfo.user_LuckNumDay, '0')}}</text> 次抽奖机会</view>
40 <view class="tip-to-down expand-transition"> 41 <view class="tip-to-down expand-transition">
41 <text></text> 42 <text></text>
42 <text></text> 43 <text></text>
43 </view> 44 </view>
44 </view> 45 </view>
45 <!-- 奖品展示 --> 46 <!-- 奖品展示 -->
46 - <view wx:if="{{award}}"> 47 + <view wx:if="{{award && award.length != 0}}">
47 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view> 48 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view>
48 - <view class="list br12 bg-white"> 49 + <view class="panel list br12 bg-white">
49 <view class="list-item" wx:for="{{award}}"> 50 <view class="list-item" wx:for="{{award}}">
50 <view class="img-container"> 51 <view class="img-container">
51 <image wx:if="{{item.luck_goods_img}}" src="{{imghost + item.luck_goods_img}}" class="img" mode="aspectFit"></image> 52 <image wx:if="{{item.luck_goods_img}}" src="{{imghost + item.luck_goods_img}}" class="img" mode="aspectFit"></image>
@@ -64,19 +65,19 @@ @@ -64,19 +65,19 @@
64 <!-- 活动展示 --> 65 <!-- 活动展示 -->
65 <view> 66 <view>
66 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view> 67 <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view>
67 - <view class="bg-white br12 pd20 fs28"> 68 + <view class="panel bg-white br12 pd20 fs28">
68 <!-- {{luckInfo.remark}} --> 69 <!-- {{luckInfo.remark}} -->
69 <import src="../../../../utils/wxParse/wxParse.wxml"/> 70 <import src="../../../../utils/wxParse/wxParse.wxml"/>
70 <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}"/> --> 71 <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}"/> -->
71 <!-- 时间 --> 72 <!-- 时间 -->
72 - <view class="bdb"> 73 + <view class="bdt">
73 <!-- <view class=""> --> 74 <!-- <view class=""> -->
74 <view class="txt-red">活动时间:</view> 75 <view class="txt-red">活动时间:</view>
75 <view class="fs28 pdv20">{{filter.format_time(luckInfo.begindate, 1) + ' 至 ' + filter.format_time(luckInfo.enddate, 1)}}</view> 76 <view class="fs28 pdv20">{{filter.format_time(luckInfo.begindate, 1) + ' 至 ' + filter.format_time(luckInfo.enddate, 1)}}</view>
76 <!-- </view> --> 77 <!-- </view> -->
77 </view> 78 </view>
78 <!-- 规则 --> 79 <!-- 规则 -->
79 - <view class="bdb" wx:if="{{luckInfo.remark}}"> 80 + <view class="bdt" wx:if="{{luckInfo.remark}}">
80 <view class="txt-red pdt20">活动说明:</view> 81 <view class="txt-red pdt20">活动说明:</view>
81 <view class="fs28 pdv20"><template is="wxParse" data="{{wxParseData:content.nodes}}"/></view> 82 <view class="fs28 pdv20"><template is="wxParse" data="{{wxParseData:content.nodes}}"/></view>
82 </view> 83 </view>
@@ -116,14 +117,14 @@ @@ -116,14 +117,14 @@
116 </view> 117 </view>
117 </view> --> 118 </view> -->
118 <!-- 技术支持 --> 119 <!-- 技术支持 -->
119 - <view class="t-c"> 120 + <view class="logo-container t-c">
120 <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> --> 121 <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> -->
121 - <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png'}}" class="logo" lazy-load></image>提供技术支持</view> 122 + <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image>提供技术支持</view>
122 </view> 123 </view>
123 </view> 124 </view>
124 125
125 <!-- 分享按钮 --> 126 <!-- 分享按钮 -->
126 -<!-- <view class="circle-container zhuanfa" bindtap=""><text class="iconfont icon-zhuanfa1"></text></view> --> 127 +<view class="circle-container zhuanfa" bindtap="showPoster"><text class="iconfont icon-zhuanfa1"></text></view>
127 128
128 <!-- 悬浮按钮 --> 129 <!-- 悬浮按钮 -->
129 <view class="circle-container gift {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view> 130 <view class="circle-container gift {{((record && record.length != 0) || isActive) ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view>
@@ -140,10 +141,10 @@ @@ -140,10 +141,10 @@
140 <view class="ellipsis-2 fs28">{{item.luck_name}}</view> 141 <view class="ellipsis-2 fs28">{{item.luck_name}}</view>
141 <view class="pdt20"> 142 <view class="pdt20">
142 <view class="fs26 xc-black3">价值:<text class="rmb">{{item.luck_goods_price}}</text></view> 143 <view class="fs26 xc-black3">价值:<text class="rmb">{{item.luck_goods_price}}</text></view>
143 - <view class="flex ai_c jc_fe fs26 xc-black3 "> 144 + <view class="flex ai_c {{item.luck_type == 5 ? 'jc_sb':'jc_fe'}} fs26 xc-black3 ">
144 <!-- <view style="visibility: {{item.luck_type == 5 ? 'visible':'hidden'}};">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> --> 145 <!-- <view style="visibility: {{item.luck_type == 5 ? 'visible':'hidden'}};">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> -->
145 <!-- <view style="">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> --> 146 <!-- <view style="">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view> -->
146 - <!-- <view class="fs24 c-a">中奖时间:{{filter.format_time(item.luck_time, 1)}}</view> --> 147 + <view class="fs24 c-a" wx:if="{{item.luck_type == 5}}">兑换截止时间:{{filter.show_default(item.changeDate, '不限')}}</view>
147 <view class="btn" bindtap="{{item.luck_type == 5 ? (item.state == 0 ? 'showQr':''):'goto'}}" data-type="{{item.luck_type}}" data-id="{{item.id}}" data-ordersn="{{item.order_sn}}" data-buyreceiveid="{{item.buyreceive_id}}">{{item.luck_type == 5 ? (item.state == 1 ? '已兑换':'兑换'):'查看'}}</view> 148 <view class="btn" bindtap="{{item.luck_type == 5 ? (item.state == 0 ? 'showQr':''):'goto'}}" data-type="{{item.luck_type}}" data-id="{{item.id}}" data-ordersn="{{item.order_sn}}" data-buyreceiveid="{{item.buyreceive_id}}">{{item.luck_type == 5 ? (item.state == 1 ? '已兑换':'兑换'):'查看'}}</view>
148 </view> 149 </view>
149 </view> 150 </view>
@@ -187,9 +188,21 @@ @@ -187,9 +188,21 @@
187 </view> 188 </view>
188 189
189 190
  191 +<!-- 海报 -->
  192 + <view class="poster-container" wx:if="{{showPoster}}">
  193 + <view class="t-r pdb20 white2"><text class="iconfont icon-close fs40" bindtap="closePoster"></text></view>
  194 + <image src="{{myimg}}" class="poster" show-menu-by-longpress></image>
  195 + <view class="pdt10 fs26 white2"><text class="iconfont icon-zhiwen"></text> 长按图片保存至相册</view>
  196 + </view>
  197 +
  198 +
190 <!-- 遮罩层 --> 199 <!-- 遮罩层 -->
191 <view class="mask" wx:if="{{showMask}}"></view> 200 <view class="mask" wx:if="{{showMask}}"></view>
192 -<!-- 进场遮罩层 -->  
193 -<view class="mask2" wx:if="{{showMask2}}"></view>  
194 201
195 -<qrcode id="qrcode" bind:close="closeQr"></qrcode>  
196 \ No newline at end of file 202 \ No newline at end of file
  203 +<!-- 遮罩层2 -->
  204 +<!-- <cover-view class="mask2"></cover-view> -->
  205 +
  206 +<qrcode id="qrcode" bind:close="closeQr"></qrcode>
  207 +
  208 +
  209 +<painter style="position: absolute; top: -9999rpx;" palette="{{imgDraw}}" bind:imgOK="onImgOK" />
197 \ No newline at end of file 210 \ No newline at end of file
packageB/pages/luckactivity/luckinfo/luckinfo.wxss
@@ -13,7 +13,7 @@ page, @@ -13,7 +13,7 @@ page,
13 13
14 .luck-container { 14 .luck-container {
15 background-size: 100% auto !important; 15 background-size: 100% auto !important;
16 - padding: 50% 20rpx 0; 16 + padding: 42% 20rpx 0;
17 } 17 }
18 18
19 .weel-container { 19 .weel-container {
@@ -113,8 +113,8 @@ page, @@ -113,8 +113,8 @@ page,
113 } 113 }
114 114
115 .logo { 115 .logo {
116 - width: 120rpx;  
117 - height: 40rpx; 116 + width: 132rpx;
  117 + height: 37rpx;
118 margin-right: 10rpx; 118 margin-right: 10rpx;
119 } 119 }
120 120
@@ -320,9 +320,7 @@ page, @@ -320,9 +320,7 @@ page,
320 color: #ff2d4b; 320 color: #ff2d4b;
321 } 321 }
322 322
323 -.bdb {  
324 - border-bottom: 2rpx solid #ebedf0;  
325 -} 323 +
326 324
327 .c-yellow { 325 .c-yellow {
328 color: yellow; 326 color: yellow;
@@ -336,7 +334,7 @@ page, @@ -336,7 +334,7 @@ page,
336 width: 100%; 334 width: 100%;
337 height: 100%; 335 height: 100%;
338 top: 0; 336 top: 0;
339 - background-color: rgba(0,0,0,.5); 337 + background-color: rgba(0,0,0,.7);
340 z-index: 1; 338 z-index: 1;
341 } 339 }
342 340
@@ -437,3 +435,50 @@ page, @@ -437,3 +435,50 @@ page,
437 padding: 0 10rpx; 435 padding: 0 10rpx;
438 } 436 }
439 437
  438 +.bdt ~ .bdt {
  439 + border-top: 2rpx solid #ebedf0;
  440 +}
  441 +
  442 +.poster-container {
  443 + text-align: center;
  444 + color: white;
  445 + position: fixed;
  446 + top: 50%;
  447 + left: 50%;
  448 + transform: translate(-50%, -50%);
  449 + z-index: 9;
  450 +}
  451 +
  452 +.poster {
  453 + width: 554rpx;
  454 + height: 899rpx;
  455 + /* border-radius: 16rpx; */
  456 + margin: 0 auto;
  457 + /* background-color: pink; */
  458 +}
  459 +
  460 +
  461 +.luck-container.on .weel-txt {
  462 + color: black;
  463 +}
  464 +
  465 +.luck-container.on .badge,
  466 +.luck-container.on .logo-container,
  467 +.luck-container.on .tip-to-down {
  468 + -webkit-filter: brightness(60%);
  469 + filter: brightness(60%);
  470 +}
  471 +
  472 +.luck-container.on .panel {
  473 + box-shadow: 0 0 24rpx #e7e9eb;
  474 +}
  475 +
  476 +.luck-container.on .cs {
  477 + color: #ff5000;
  478 +}
  479 +
  480 +
  481 +
  482 +
  483 +
  484 +
packageB/pages/user/binding_info/binding_info.js 0 → 100644
  1 +// packageB/pages/user/binding_info/binding_info.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
0 \ No newline at end of file 67 \ No newline at end of file
packageB/pages/user/binding_info/binding_info.json 0 → 100644
  1 +{
  2 + "usingComponents": {}
  3 +}
0 \ No newline at end of file 4 \ No newline at end of file
packageB/pages/user/binding_info/binding_info.wxml 0 → 100644
  1 +<!--packageB/pages/user/binding_info/binding_info.wxml-->
  2 +<text>packageB/pages/user/binding_info/binding_info.wxml</text>
packageB/pages/user/binding_info/binding_info.wxss 0 → 100644
  1 +/* packageB/pages/user/binding_info/binding_info.wxss */
0 \ No newline at end of file 2 \ No newline at end of file
pages/user/binding_info/binding_info.js deleted
1 -var e = getApp(),app=e, a = e.request, t = e.globalData.setting,os=t, i = require("../../../utils/common.js");  
2 -  
3 -Page({  
4 - data: {  
5 - url: t.url,  
6 - iurl: t.imghost,  
7 - nickName: "",  
8 - userHeadPic: "",  
9 - isRegist: !1,  
10 - bindMobile: "",  
11 - bindCode: "",  
12 - regMobile: "",  
13 - regCode: "",  
14 - regPwd: "",  
15 - isAgree: !1,  
16 - canGetCode: !1,  
17 -  
18 - config:null,  
19 -  
20 - store: null,  
21 - imghots: os.imghost,  
22 - gettime:0,  
23 - },  
24 - onLoad: function(e) {  
25 - var th=this;  
26 - app.getConfig(function (e) {  
27 - th.setData({ store: e });  
28 - })  
29 - app.getConfig2(function (e) {  
30 - var cf = JSON.parse(e.sms_send_type);  
31 - th.setData({ config: cf });  
32 - console.log(th.data.config);  
33 - })  
34 -  
35 -  
36 - },  
37 - account: function() {  
38 - this.setData({  
39 - isRegist: !1  
40 - });  
41 - },  
42 - regist: function() {  
43 - this.setData({  
44 - isRegist: !0  
45 - });  
46 - },  
47 - setMobile: function(e) {  
48 - this.data.bindMobile = e.detail.value;  
49 - },  
50 - setCode: function(e) {  
51 - this.data.bindCode = e.detail.value;  
52 - },  
53 -  
54 - //---获取短信验证码---  
55 - getCode: function(t) {  
56 - var th=this;  
57 - if ("" != this.data.bindMobile) {  
58 - var s = this;  
59 - a.post("/api/weshop/smslog/sendsms", {  
60 - data: {  
61 - mobile: this.data.bindMobile,  
62 - store_id: os.stoid,  
63 - wxopenid: app.globalData.openid,  
64 - },  
65 - success: function(e) {  
66 - if(e.data.code==0){  
67 - th.setData({ gettime: th.data.config.time_out, canGetCode:1});  
68 - th.setInt();  
69 - }else{  
70 - e.showWarning(e.data.msg);  
71 - }  
72 - }  
73 - });  
74 - } else e.showWarning("请输入手机号码");  
75 - },  
76 -  
77 - //----发送验证码的推送时间倒计时---  
78 - setInt:function(){  
79 - var th=this;  
80 - var it=setInterval(function(){  
81 - var ti = th.data.gettime-1;  
82 - if (ti<=0){  
83 - th.setData({ gettime:0, canGetCode: !1 });  
84 - clearInterval(it);  
85 - }  
86 - else{  
87 - th.setData({ gettime: ti,});  
88 - }  
89 - },1000);  
90 - },  
91 -  
92 - setRegMobile: function(e) {  
93 - this.data.regMobile = e.detail.value;  
94 - },  
95 - setRegPwd: function(e) {  
96 - this.data.regPwd = e.detail.value;  
97 - },  
98 - setRegCode: function(e) {  
99 - this.data.regCode = e.detail.value;  
100 - },  
101 - getRegCode: function(t) {  
102 - if ("" != this.data.regMobile) {  
103 - var s = this;  
104 - a.post("/Home/Api/checkRegMobile", {  
105 - data: {  
106 - mobile: this.data.regMobile  
107 - },  
108 - success: function(e) {  
109 - i.sendBindSmsCode(s.data.regMobile);  
110 - }  
111 - });  
112 - } else e.showWarning("请输入手机号码");  
113 - },  
114 - check: function() {  
115 - this.setData({  
116 - isAgree: !this.data.isAgree  
117 - });  
118 - },  
119 - bindAccount: function() {  
120 - var t = this;  
121 - var r = getApp().globalData.getu;  
122 - var openid = getApp().globalData.openid;  
123 -  
124 - "" != this.data.bindMobile ? "" != this.data.bindCode ? a.get("/api/weshop/users/thirdLogin", {  
125 - data: {  
126 - mobile: t.data.bindMobile,  
127 - code: t.data.bindCode,  
128 - openid: openid,  
129 - nickname: r.nickName,  
130 - head_pic: r.avatarUrl,  
131 - sex: r.gender,  
132 - store_id:os.stoid,  
133 - },  
134 - success: function(a) {  
135 - if(a.data.code==0){  
136 - wx.setStorageSync("isAuth", !0),  
137 - e.globalData.userInfo = a.data.data,  
138 - e.globalData.user_id = e.globalData.userInfo.user_id, e.globalData.userInfo.head_pic = i.getFullUrl(e.globalData.userInfo.head_pic),  
139 - "function" == typeof cb && cb(e.globalData.userInfo, e.globalData.wechatUser);  
140 - e.showWarning("绑定成功");  
141 - setTimeout(function(){  
142 - wx.navigateTo({  
143 - url: '/pages/user/index/index',  
144 - })  
145 - },1000);  
146 - }else{  
147 - e.showWarning("请输入验证码")  
148 - }  
149 - }  
150 - }) : e.showWarning("请输入验证码") : e.showWarning("请输入手机号码");  
151 - },  
152 -  
153 - bindReg: function() {  
154 - var t = this;  
155 - if( "" != this.data.regMobile ){  
156 - e.showWarning("请输入手机号码"); return false;  
157 - }else if( "" != this.data.regCode){  
158 - e.showWarning("请输入验证码"); return false;  
159 - }else {  
160 - var openid = getApp().globalData.openid;  
161 - var r = getApp().globalData.getu;  
162 - a.post("/api/weshop/users/thirdLogin", {  
163 - data: {  
164 - mobile: t.data.regMobile,  
165 - verify_code: t.data.regCode,  
166 - openid: openid,  
167 - nickname: r.nickName,  
168 - head_pic: r.avatarUrl,  
169 - sex: r.gender,  
170 - },  
171 - success: function(a) {  
172 - console.log("thirdLogin");  
173 - console.log(e);  
174 - if (e.data.code == 0) {  
175 - app.globalData.user_id = e.data.data.user_id;  
176 - } else {  
177 - return app.showWarning("授权登入失败!");  
178 - }  
179 - wx.setStorageSync("isAuth", !0), a.globalData.userInfo = e.data.data, a.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic);  
180 - wx.navigateBack({ delta: 1 })  
181 - }  
182 - })  
183 - }  
184 - }  
185 -});  
186 -  
187 -function randomNum(min, max) {  
188 - return Math.floor(Math.random() * (max - min) + min);  
189 -}  
190 -/**生成一个随机色**/  
191 -function randomColor(min, max) {  
192 - var r = randomNum(min, max);  
193 - var g = randomNum(min, max);  
194 - var b = randomNum(min, max);  
195 - return "rgb(" + r + "," + g + "," + b + ")";  
196 -}  
197 -  
198 -/**绘制验证码图片**/  
199 -function drawPic(that) {  
200 - ctx = wx.createCanvasContext('canvas');  
201 - /**绘制背景色**/  
202 - ctx.fillStyle = randomColor(180, 240); //颜色若太深可能导致看不清  
203 - ctx.fillRect(0, 0, 90, 28)  
204 - /**绘制文字**/  
205 - var arr;  
206 - var text = '';  
207 - var str = 'ABCEFGHJKLMNPQRSTWXY123456789';  
208 - for (var i = 0; i < 4; i++) {  
209 - var txt = str[randomNum(0, str.length)];  
210 - ctx.fillStyle = randomColor(50, 160); //随机生成字体颜色  
211 - ctx.font = randomNum(20, 26) + 'px SimHei'; //随机生成字体大小  
212 - var x = 5 + i * 20;  
213 - var y = randomNum(20, 25);  
214 - var deg = randomNum(-20, 20);  
215 - //修改坐标原点和旋转角度  
216 - ctx.translate(x, y);  
217 - ctx.rotate(deg * Math.PI / 180);  
218 - ctx.fillText(txt, 5, 0);  
219 - text = text + txt;  
220 - //恢复坐标原点和旋转角度  
221 - ctx.rotate(-deg * Math.PI / 180);  
222 - ctx.translate(-x, -y);  
223 - }  
224 - /**绘制干扰线**/  
225 - for (var i = 0; i < 4; i++) {  
226 - ctx.strokeStyle = randomColor(40, 180);  
227 - ctx.beginPath();  
228 - ctx.moveTo(randomNum(0, 90), randomNum(0, 28));  
229 - ctx.lineTo(randomNum(0, 90), randomNum(0, 28));  
230 - ctx.stroke();  
231 - }  
232 - /**绘制干扰点**/  
233 - for (var i = 0; i < 20; i++) {  
234 - ctx.fillStyle = randomColor(0, 255);  
235 - ctx.beginPath();  
236 - ctx.arc(randomNum(0, 90), randomNum(0, 28), 1, 0, 2 * Math.PI);  
237 - ctx.fill();  
238 - }  
239 - ctx.draw(false, function () {  
240 - that.setData({  
241 - text: text  
242 - })  
243 - });  
244 -}  
245 \ No newline at end of file 0 \ No newline at end of file
pages/user/binding_info/binding_info.json deleted
1 -{  
2 - "navigationBarTitleText": "关联手机号",  
3 - "enablePullDownRefresh": false  
4 -}  
5 \ No newline at end of file 0 \ No newline at end of file
pages/user/binding_info/binding_info.wxml deleted
1 -<view>  
2 - <view class="binding-top" style="background-image:url('{{iurl}}/miniapp/images/binding-bj.png')">  
3 - <view class="user-logo">  
4 - <image src="{{imghots+store.store_logo}}"></image>  
5 - </view>  
6 - <view class="user-text">  
7 - <text>{{store.store_name}}</text>  
8 -  
9 - </view>  
10 - <view class="userbj-cover">  
11 - <image src="{{iurl}}/miniapp/images/white-cover.png"></image>  
12 - </view>  
13 - </view>  
14 - <view class="binding-container">  
15 - <!-- <view class="binding-tips">  
16 - <text>为了给您更好地服务,请关注一个TPshop账号  
17 -若还没有TPshop账号,则注册后默认完成关联</text>  
18 - </view> -->  
19 - <view>  
20 - <!-- <view class="correlation-cont">  
21 - <view bindtap="account" class="connect-item {{isRegist?'':'tp-list-bg'}}">关联已有账号</view>  
22 - <view bindtap="regist" class="connect-item {{isRegist?'tp-list-bg':''}}">注册并关联账号</view>  
23 - </view> -->  
24 -  
25 - <view class="correlation-input-wrap">  
26 - <view class="items-warp" hidden="{{isRegist}}">  
27 - <view class="item_cont">  
28 - <image src="{{iurl}}/miniapp/images/numb.png"></image>  
29 - <text>手机号码</text>  
30 - <input bindinput="setMobile" id="username" name="username" placeholder="请输入手机号码" type="number"></input>  
31 - </view>  
32 -  
33 - <view class="item_cont ">  
34 - <image src="{{iurl}}/miniapp/images/code.png"></image>  
35 - <text decode="{{true}}" space="{{true}}">验&nbsp;证&nbsp;&nbsp;码</text>  
36 - <input bindinput="setCode" id="password" name="password" placeholder="请输入验证码" type="number"></input>  
37 - <button wx:if="{{canGetCode}}" class="tp-get-gode btn-disable">  
38 - {{gettime>0?gettime:""}}秒后重发  
39 - </button>  
40 - <button wx:else bindtap="getCode" class="tp-get-gode"> 获取验证码</button>  
41 - </view>  
42 - <view class="item-cont">  
43 - <button bindtap="bindAccount" class="correlation-submit">立即绑定</button>  
44 - </view>  
45 - </view>  
46 - <view class="items-warp" hidden="{{!isRegist}}">  
47 - <view class="item_cont">  
48 - <image src="{{iurl}}/miniapp/images/numb.png"></image>  
49 - <text>手机号码</text>  
50 - <input bindinput="setRegMobile" id="username" name="username" placeholder="请输入手机号码" type="number"></input>  
51 - </view>  
52 - <view class="item_cont ">  
53 - <image src="{{iurl}}/miniapp/images/password.png"></image>  
54 - <text>设置密码</text>  
55 - <input bindinput="setRegPwd" id="username" name="username" placeholder="字母和数字组成的6-16位字符" type="password"></input>  
56 - </view>  
57 - <view class="item_cont">  
58 - <image src="{{iurl}}/miniapp/images/code.png"></image>  
59 - <text decode="{{true}}" space="{{true}}">验&nbsp;证&nbsp;&nbsp;码</text>  
60 - <input bindinput="setRegCode" id="password" name="password" placeholder="请输入验证码" type="number"></input>  
61 - <button bindtap="getRegCode" class="tp-get-gode">获取验证码</button>  
62 - </view>  
63 - <view class="item-cont">  
64 - <button bindtap="bindReg" class="correlation-submit">立即绑定</button>  
65 - </view>  
66 - </view>  
67 - </view>  
68 - </view>  
69 - <view class="bingding-agreement" hidden="{{!isRegist}}">  
70 - <checkbox bindtap="check" checked="{{isAgree}}"></checkbox>  
71 - <label>我已阅读并同意</label>  
72 - <navigator>《TPshop商城用户注册协议》</navigator>  
73 - </view>  
74 - </view>  
75 -</view>  
76 -  
77 -  
pages/user/binding_info/binding_info.wxss deleted
1 -page {  
2 - background-color: #fff;  
3 -}  
4 -  
5 -.binding-top {  
6 - width: 100%;  
7 - height: 450rpx;  
8 - text-align: center;  
9 - position: relative;  
10 - overflow: hidden;  
11 -}  
12 -  
13 -.user-logo {  
14 - width: 190rpx;  
15 - height: 190rpx;  
16 - border-radius: 50%;  
17 - border: 2px solid #fff;  
18 - overflow: hidden;  
19 - position: absolute;  
20 - left: 50%;  
21 - margin-left: -95rpx;  
22 - top: 60rpx;  
23 -}  
24 -  
25 -.user-logo image {  
26 - width: 100%;  
27 - height: 100%;  
28 -}  
29 -  
30 -.user-text {  
31 - margin-top: 142px;  
32 -}  
33 -  
34 -.user-text text {  
35 - display: block;  
36 - margin-top: 16rpx;  
37 - color: #fff;  
38 -}  
39 -  
40 -.userbj-cover {  
41 - width: 100%;  
42 - height: 46rpx;  
43 - position: absolute;  
44 - left: 0;  
45 - bottom: 0;  
46 - z-index: 20;  
47 -}  
48 -  
49 -.userbj-cover image {  
50 - width: 100%;  
51 - height: 46rpx;  
52 -}  
53 -  
54 -.binding-container {  
55 - width: 100%;  
56 - padding-top: 15px;  
57 -}  
58 -  
59 -.binding-tips {  
60 - font-size: 14px;  
61 - color: #666;  
62 - text-align: center;  
63 - letter-spacing: 2rpx;  
64 -}  
65 -  
66 -.correlation-cont {  
67 - width: 600rpx;  
68 - margin: 0 auto;  
69 - margin-top: 40rpx;  
70 - overflow: hidden;  
71 -}  
72 -  
73 -.connect-item {  
74 - width: 296rpx;  
75 - height: 78rpx;  
76 - line-height: 78rpx;  
77 - font-size: 16px;  
78 - text-align: center;  
79 - border: 1px solid #b7b7b7;  
80 - float: left;  
81 -}  
82 -  
83 -.correlation-cont .connect-item:first-child {  
84 - border-bottom-left-radius: 30px;  
85 - border-top-left-radius: 30px;  
86 -}  
87 -  
88 -.correlation-cont .connect-item:last-child {  
89 - border-bottom-right-radius: 30px;  
90 - border-top-right-radius: 30px;  
91 -}  
92 -  
93 -.tp-list-bg {  
94 - color: #fff;  
95 - background: #e23435;  
96 - border: 1px solid #e23435!important;  
97 -}  
98 -  
99 -.correlation-input-wrap {  
100 - margin-top: 56rpx;  
101 - width: 100%;  
102 -}  
103 -  
104 -.item_cont {  
105 - width: 660rpx;  
106 - height: 96rpx;  
107 - margin: 0 auto;  
108 - position: relative;  
109 - line-height: 96rpx;  
110 - border-bottom: 1px solid #e6e6e6;  
111 -}  
112 -  
113 -.item_cont image {  
114 - width: 48rpx;  
115 - height: 48rpx;  
116 - vertical-align: middle;  
117 -}  
118 -  
119 -.item_cont text {  
120 - font-size: 16px;  
121 - vertical-align: middle;  
122 - color: #666;  
123 - margin-left: 16rpx;  
124 -}  
125 -  
126 -.item_cont input {  
127 - border: 0px;  
128 - font-size: 16px;  
129 - height: 50rpx;  
130 - line-height: 50rpx;  
131 - display: inline-block;  
132 - vertical-align: middle;  
133 - width: 432rpx;  
134 - margin-left: 30rpx;  
135 -}  
136 -  
137 -.tp-get-gode {  
138 - position: absolute;  
139 - right: 0;  
140 - top: 20rpx;  
141 - border-radius: 30rpx;  
142 - background-color: #f05052;  
143 - color: #fff;  
144 - height: 56rpx;  
145 - width: 140rpx;  
146 - font-size: 22rpx;  
147 - line-height: 56rpx;  
148 - z-index: 50;  
149 -}  
150 -.tp-get-gode.btn-disable{  
151 - background-color: #e6e6e6;  
152 - color: #999;  
153 -}  
154 -  
155 -.correlation-submit {  
156 - width: 660rpx;  
157 - height: 96rpx;  
158 - line-height: 96rpx;  
159 - background: #db261e;  
160 - border: none;  
161 - border-radius: 6px;  
162 - color: #ffffff;  
163 - font-size: 20px;  
164 - margin-top: 40rpx;  
165 -}  
166 -  
167 -.bingding-agreement {  
168 - width: 660rpx;  
169 - margin: 0 auto;  
170 - margin-top: 20rpx;  
171 - font-size: 14px;  
172 - margin-bottom: 30px;  
173 -}  
174 -  
175 -.bingding-agreement label {  
176 - vertical-align: middle;  
177 - color: #333;  
178 - margin-left: 10rpx;  
179 -}  
180 -  
181 -.bingding-agreement navigator {  
182 - vertical-align: middle;  
183 - color: #0094ca;  
184 - display: inline-block;  
185 -}  
186 -  
187 -checkbox .wx-checkbox-input {  
188 - border-radius: 50%;  
189 - width: 36rpx;  
190 - height: 36rpx;  
191 -}  
192 -  
193 -checkbox .wx-checkbox-input.wx-checkbox-input-checked {  
194 - border: none;  
195 - background: red;  
196 - width: 40rpx;  
197 - height: 40rpx;  
198 -}  
199 -  
200 -checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {  
201 - border-radius: 50%;  
202 - width: 36rpx;  
203 - height: 36rpx;  
204 - line-height: 36rpx;  
205 - text-align: center;  
206 - font-size: 30rpx;  
207 - color: #fff;  
208 - background: transparent;  
209 - transform: translate(-50%,-50%) scale(1);  
210 -}  
211 \ No newline at end of file 0 \ No newline at end of file
pages/user/order_detail/order_detail.js
@@ -19,10 +19,11 @@ Page({ @@ -19,10 +19,11 @@ Page({
19 19
20 getApp().getConfig2(function (e) { 20 getApp().getConfig2(function (e) {
21 21
22 - th.setData({conf: e,sales_rules:e.sales_rules }); 22 + th.setData({conf: e,sales_rules:e.sales_rules, userInfo: getApp().globalData.userInfo});
23 //--- 看后台是不是有开通等级卡 --- 23 //--- 看后台是不是有开通等级卡 ---
24 if(e.switch_list){ 24 if(e.switch_list){
25 var s_list=JSON.parse(e.switch_list); 25 var s_list=JSON.parse(e.switch_list);
  26 + th.setData({sys_switch: s_list});
26 var is_open_offline=s_list.is_pricing_open; 27 var is_open_offline=s_list.is_pricing_open;
27 var user=getApp().globalData.userInfo; 28 var user=getApp().globalData.userInfo;
28 //如果后台有开启等级价的功能 29 //如果后台有开启等级价的功能
pages/user/order_detail/order_detail.wxml
@@ -52,7 +52,19 @@ @@ -52,7 +52,19 @@
52 </view> 52 </view>
53 <view class="order-operate"> 53 <view class="order-operate">
54 <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view> 54 <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view>
55 - <view bindtap="contactService" class="contact-us goods-btn">联系客服</view> 55 + <view>
  56 + <!-- <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> -->
  57 + <!-- <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  58 + <view></view> -->
  59 + <!-- </button> -->
  60 + <button wx:if="{{sys_switch.weapp_customertype}}" class="contact-us goods-btn" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">联系客服</button>
  61 + <!-- <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
  62 + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  63 + <view>联系客服</view>
  64 + </view> -->
  65 + <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view>
  66 + </view>
  67 + <!-- <view bindtap="contactService" class="contact-us goods-btn">联系客服</view> -->
56 <view bindtap="cancelOrder" class="cancel-order goods-btn" data-id="{{order.order_id}}" 68 <view bindtap="cancelOrder" class="cancel-order goods-btn" data-id="{{order.order_id}}"
57 hidden="{{!(order.order_status==0&&order.pay_status==0)}}">取消订单</view> 69 hidden="{{!(order.order_status==0&&order.pay_status==0)}}">取消订单</view>
58 </view> 70 </view>
pages/user/order_detail/order_detail.wxss
@@ -170,4 +170,9 @@ @@ -170,4 +170,9 @@
170 background-color: #f23030; 170 background-color: #f23030;
171 /* margin-left: 2rpx; */ 171 /* margin-left: 2rpx; */
172 margin-right: 8rpx 172 margin-right: 8rpx
  173 +}
  174 +
  175 +
  176 +.contact-us.goods-btn::after {
  177 + content: none;
173 } 178 }
174 \ No newline at end of file 179 \ No newline at end of file