Commit 294b4506db08f1c89d236ce9c7a8847bde4d2fb0

Authored by DESKTOP-QHAFKU5\iceling
1 parent 4ed08ef9

bug修改

pages/user/my_service/appment_main.js
@@ -90,9 +90,6 @@ Page({ @@ -90,9 +90,6 @@ Page({
90 var bea_name = th.data.beautician_name; //美容师名称 90 var bea_name = th.data.beautician_name; //美容师名称
91 var time = th.data.time; //预约时间 91 var time = th.data.time; //预约时间
92 var is_sub = th.data.is_sub; //是否重复提交 92 var is_sub = th.data.is_sub; //是否重复提交
93 - wx.showLoading({  
94 - title: '加载中',  
95 - })  
96 var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 93 var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
97 var serviceId = th.data.itemId; //服务id 94 var serviceId = th.data.itemId; //服务id
98 var beauticianID = th.data.beauticianID; //美容师id 95 var beauticianID = th.data.beauticianID; //美容师id
@@ -127,6 +124,7 @@ Page({ @@ -127,6 +124,7 @@ Page({
127 'content-type': 'application/json' 124 'content-type': 'application/json'
128 }, // 设置请求的 header 125 }, // 设置请求的 header
129 success: function(res) { 126 success: function(res) {
  127 + console.log("真正提交1111111",res.data);
130 th.setData({ 128 th.setData({
131 is_sub: 0 129 is_sub: 0
132 }) 130 })
@@ -237,19 +235,25 @@ Page({ @@ -237,19 +235,25 @@ Page({
237 typeid: "1011" 235 typeid: "1011"
238 } 236 }
239 }).then(res => { 237 }).then(res => {
  238 + wx.showLoading({
  239 + title: '加载中',
  240 + })
240 if (res.data.code == 0 && res.data.data.pageData.length > 0) { 241 if (res.data.code == 0 && res.data.data.pageData.length > 0) {
241 template_id = res.data.data.pageData[0].template_id; 242 template_id = res.data.data.pageData[0].template_id;
242 // //授权订阅 243 // //授权订阅
243 wx.requestSubscribeMessage({ 244 wx.requestSubscribeMessage({
244 tmplIds: [template_id], 245 tmplIds: [template_id],
245 success(res) { 246 success(res) {
  247 + console.log("成功的回调222222", res);
246 th.success(); 248 th.success();
247 }, 249 },
248 fail(res) { 250 fail(res) {
  251 + console.log("失败的回调1111111", res.data);
249 th.success(); 252 th.success();
250 } 253 }
251 }) 254 })
252 } else { 255 } else {
  256 + console.log("接口调用失败0000000", res.data);
253 th.success(); 257 th.success();
254 } 258 }
255 }) 259 })
pages/user/my_service/tment_eval.js
@@ -21,37 +21,37 @@ Page({ @@ -21,37 +21,37 @@ Page({
21 beautician: "", //美容师信息 21 beautician: "", //美容师信息
22 fromType: "服务评价", //评价来源 22 fromType: "服务评价", //评价来源
23 arrangeTime: "", //服务日期 23 arrangeTime: "", //服务日期
24 - is_evaluate:0,//是否评价  
25 - EvaluateDatetime:"",//评价时间 24 + is_evaluate: 0, //是否评价
  25 + EvaluateDatetime: "", //评价时间
26 }, 26 },
27 //点击星级 27 //点击星级
28 check_stars: function(e) { 28 check_stars: function(e) {
29 var th = this; 29 var th = this;
30 - var is_evaluate = th.data.is_evaluate;//0可点击  
31 - if (is_evaluate==0){  
32 - var index = e.currentTarget.dataset.index;  
33 - var stars_index = th.data.stars_index;  
34 - if (index != stars_index) {  
35 - var url = "/api/weshop/marketing/reservation/star/label/list";  
36 - getApp().request.promiseGet(url, {  
37 - data: {  
38 - Star: index+1,  
39 - storeId: a.stoid  
40 - }  
41 - }).then(res => {  
42 - if (res.data.code == 0) {  
43 - th.setData({  
44 - labels: res.data.data  
45 - })  
46 - } else {  
47 - getApp().my_warnning(res.data.msg, 0, th);  
48 - return;  
49 - }  
50 - })  
51 - th.setData({  
52 - stars_index: index  
53 - })  
54 - } 30 + var is_evaluate = th.data.is_evaluate; //0可点击
  31 + if (is_evaluate == 0) {
  32 + var index = e.currentTarget.dataset.index;
  33 + var stars_index = th.data.stars_index;
  34 + if (index != stars_index) {
  35 + var url = "/api/weshop/marketing/reservation/star/label/list";
  36 + getApp().request.promiseGet(url, {
  37 + data: {
  38 + Star: index + 1,
  39 + storeId: a.stoid
  40 + }
  41 + }).then(res => {
  42 + if (res.data.code == 0) {
  43 + th.setData({
  44 + labels: res.data.data
  45 + })
  46 + } else {
  47 + getApp().my_warnning(res.data.msg, 0, th);
  48 + return;
  49 + }
  50 + })
  51 + th.setData({
  52 + stars_index: index
  53 + })
  54 + }
55 } 55 }
56 }, 56 },
57 //输入评价意见和建议 57 //输入评价意见和建议
@@ -75,19 +75,19 @@ Page({ @@ -75,19 +75,19 @@ Page({
75 //选择标签 75 //选择标签
76 check_label: function(e) { 76 check_label: function(e) {
77 var th = this; 77 var th = this;
78 - var evaluate = th.data.is_evaluate;//0为未评价,未评价才可点击标签  
79 - if (evaluate==0){  
80 - var index = e.currentTarget.dataset.index;  
81 - var label_id = th.data.labels[index].check;  
82 - var labels = 'labels[' + index + '].check';  
83 - if (label_id) {  
84 - label_id = 0  
85 - } else {  
86 - label_id = 1  
87 - }  
88 - th.setData({  
89 - [labels]: label_id  
90 - }) 78 + var evaluate = th.data.is_evaluate; //0为未评价,未评价才可点击标签
  79 + if (evaluate == 0) {
  80 + var index = e.currentTarget.dataset.index;
  81 + var label_id = th.data.labels[index].check;
  82 + var labels = 'labels[' + index + '].check';
  83 + if (label_id) {
  84 + label_id = 0
  85 + } else {
  86 + label_id = 1
  87 + }
  88 + th.setData({
  89 + [labels]: label_id
  90 + })
91 } 91 }
92 }, 92 },
93 //查询美容师信息 93 //查询美容师信息
@@ -118,22 +118,22 @@ Page({ @@ -118,22 +118,22 @@ Page({
118 evaluate_get: function() { 118 evaluate_get: function() {
119 var th = this; 119 var th = this;
120 var url = "/api/weshop/evaluation/evaluate/get"; 120 var url = "/api/weshop/evaluation/evaluate/get";
121 - getApp().request.promiseGet(url,{ 121 + getApp().request.promiseGet(url, {
122 data: { 122 data: {
123 number: th.data.number, 123 number: th.data.number,
124 storeId: a.stoid 124 storeId: a.stoid
125 } 125 }
126 }).then(res => { 126 }).then(res => {
127 - if(res.data.code == 0){  
128 - th.setData({  
129 - stars_index: res.data.data.Star,  
130 - labels: res.data.data.EvaluationList,  
131 - proposal: res.data.data.Remark,  
132 - EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0,19)  
133 - })  
134 - }else{  
135 - getApp().my_warnning(res.data.msg,0,th);  
136 - } 127 + if (res.data.code == 0) {
  128 + th.setData({
  129 + stars_index: res.data.data.Star-1,
  130 + labels: res.data.data.EvaluationList,
  131 + proposal: res.data.data.Remark,
  132 + EvaluateDatetime: res.data.data.WriteTime.substring(0, 19)
  133 + })
  134 + } else {
  135 + getApp().my_warnning(res.data.msg, 0, th);
  136 + }
137 }) 137 })
138 }, 138 },
139 //提交评价 139 //提交评价
@@ -145,7 +145,7 @@ Page({ @@ -145,7 +145,7 @@ Page({
145 if (stars < 0) { 145 if (stars < 0) {
146 getApp().my_warnning("请进行评分", 0, th); 146 getApp().my_warnning("请进行评分", 0, th);
147 return false; 147 return false;
148 - } else if (proposal==""){ 148 + } else if (proposal == "") {
149 getApp().my_warnning("给点建议呗", 0, th); 149 getApp().my_warnning("给点建议呗", 0, th);
150 return false; 150 return false;
151 } 151 }
@@ -222,8 +222,8 @@ Page({ @@ -222,8 +222,8 @@ Page({
222 onShow: function() { 222 onShow: function() {
223 var th = this; 223 var th = this;
224 var is_evaluate = th.data.is_evaluate; 224 var is_evaluate = th.data.is_evaluate;
225 - if (is_evaluate==1){ 225 + if (is_evaluate == 1) {
226 th.evaluate_get(); 226 th.evaluate_get();
227 - } 227 + }
228 }, 228 },
229 }) 229 })
230 \ No newline at end of file 230 \ No newline at end of file
pages/user/my_service/tment_eval.wxml
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 35
36 <view class="flex-center"> 36 <view class="flex-center">
37 <view class="starss"> 37 <view class="starss">
38 - <image class="stars" src="{{iurl}}{{stars_index>=index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{index}}"></image> 38 + <image class="stars" src="{{iurl}}{{key<=stars_index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{key}}" wx:for-index="key"></image>
39 </view> 39 </view>
40 </view> 40 </view>
41 <view class="tea_labs"> 41 <view class="tea_labs">