12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-763b02ba"],{"39d1":function(t,e,n){"use strict";var a=n("fe7e");e["a"]=Object(a["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.b(),on:{touchmove:t.onTouchMove}},t._l(t.list,function(e,a){return n("icon",{key:a,class:t.b("item"),attrs:{size:t.size+"px","data-index":a,name:e?t.icon:t.voidIcon,color:t.disabled?t.disabledColor:e?t.color:t.voidColor},on:{click:function(e){t.onSelect(a)}}})}))},name:"rate",props:{value:Number,readonly:Boolean,disabled:Boolean,size:{type:Number,default:20},icon:{type:String,default:"star"},voidIcon:{type:String,default:"star-o"},color:{type:String,default:"#ffd21e"},voidColor:{type:String,default:"#c7c7c7"},disabledColor:{type:String,default:"#bdbdbd"},count:{type:Number,default:5}},computed:{list:function(){var t=this;return Array.apply(null,{length:this.count}).map(function(e,n){return n<t.value})}},methods:{onSelect:function(t){this.disabled||this.readonly||(this.$emit("input",t+1),this.$emit("change",t+1))},onTouchMove:function(t){if(document.elementFromPoint){t.preventDefault();var e=t.touches[0],n=e.clientX,a=e.clientY,i=document.elementFromPoint(n,a);if(i&&i.dataset){var o=i.dataset.index;o&&this.onSelect(+o)}}}}})},4142:function(t,e,n){"use strict";n("68ef"),n("8199")},5709:function(t,e,n){},"62d0":function(t,e,n){},8199:function(t,e,n){},"8a0b":function(t,e,n){},"8e48":function(t,e,n){"use strict";var a=n("5709"),i=n.n(a);i.a},9082:function(t,e,n){"use strict";n.r(e);var a,i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("nav-bar",{attrs:{path:"index",title:"礼品卡"}}),2===t.myPresent.status||3===t.myPresent.status?n("gift-card",{attrs:{"present-img":t.receivedPresent.img,"present-name":t.receivedPresent.name,"present-desc":t.receivedPresent.desc,owner:1,placeId:t.receivedPresent.placeId,gender:t.receivedPresent.gender,status:-1,wechat:t.receivedPresent.wechat}}):t._e(),0!==t.RcommentDo.content.length?n("div",{staticClass:"letter"},[t._m(0),n("van-rate",{attrs:{icon:"like","void-icon":"like-o",readonly:"",color:"red"},model:{value:t.RcommentDo.rate,callback:function(e){t.$set(t.RcommentDo,"rate",e)},expression:"RcommentDo.rate"}}),n("p",[t._v(t._s(t.RcommentDo.content))])],1):t._e(),n("gift-card",{attrs:{"present-img":t.myPresent.img,"present-name":t.myPresent.name,"present-desc":t.myPresent.desc,owner:0,placeId:t.myPresent.placeId,gender:t.myPresent.gender,status:t.myPresent.status,wechat:t.myPresent.wechat}}),0!==t.commentDo.content.length?n("div",{staticClass:"letter"},[t._m(1),n("van-rate",{attrs:{icon:"like","void-icon":"like-o",readonly:"",color:"red"},model:{value:t.commentDo.rate,callback:function(e){t.$set(t.commentDo,"rate",e)},expression:"commentDo.rate"}}),n("p",[t._v(t._s(t.commentDo.content))])],1):t._e(),4===t.myPresent.status?n("div",{staticClass:"letter"},[t._m(2),0!==t.reason.length?n("p",[t._v("原因:"+t._s(t.reason))]):t._e()]):t._e(),n("div",{staticStyle:{height:"100px",width:"100%"}}),n("img",{staticStyle:{position:"fixed",bottom:"100px","max-width":"100%","z-index":"-1"},attrs:{src:"http://pjczv6ygf.bkt.clouddn.com/present_card_bottom.png"}}),2===t.myPresent.status?n("div",{staticStyle:{position:"fixed",bottom:"0",width:"100%","background-color":"#fff6e3"}},[n("van-button",{staticStyle:{"background-color":"#fd6740","border-color":"#fd6740",width:"85%"},attrs:{type:"primary",size:"large"},on:{click:t.toWriteComment}},[t._v("确认交换成功")]),n("p",[t._v("交换成功可以开始接收对方发来的感谢信哦")])],1):t._e(),0===t.myPresent.status||1===t.myPresent.status||4===t.myPresent.status?n("div",{staticStyle:{position:"fixed",bottom:"0",width:"100%"}},[4!==t.myPresent.status?n("van-button",{staticStyle:{width:"85%"},attrs:{type:"default",size:"large"},on:{click:t.editPresent}},[t._v("修改礼物")]):t._e(),n("van-button",{staticStyle:{width:"85%",margin:"10px 0 10px"},attrs:{type:"warning",size:"large"},on:{click:t.deletePresent}},[t._v("删除礼物")])],1):t._e()],1)},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticStyle:{"font-size":"110%"}},[n("strong",[t._v("我送出的感谢信")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticStyle:{"font-size":"110%"}},[n("strong",[t._v("我收到的感谢信")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[n("strong",[t._v("审核未通过,请前往首页重新发布礼物!")])])}],r=(n("a481"),n("55dd"),n("e17f"),n("2241")),s=(n("e7e5"),n("d399")),l=n("ade3"),c=(n("4142"),n("39d1")),d=(n("7f7f"),n("66b9"),n("b650")),f=(n("cadf"),n("551c"),n("097d"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"gift_card"},[n("van-row",{staticStyle:{"border-bottom":"solid 1px #e4e4e4",padding:"5px"}},[n("van-col",{attrs:{span:"8"}},[n("img",{staticStyle:{"max-width":"100%"},attrs:{src:t.presentImg}})]),n("van-col",{attrs:{span:"16"}},[n("van-row",{attrs:{type:"flex",justify:"space-between"}},[n("van-col",{staticClass:"c"},[n("p",[n("strong",[t._v(t._s(t.owner?"对方":"我")+"的礼物")])])]),n("van-col",{staticClass:"c"},[n("p",[t._v(t._s(t.place[t.placeId]))])])],1),-1!==t.gender?n("van-row",{attrs:{type:"flex",justify:"space-between"}},[n("van-col",{staticClass:"c"},[n("p",[t._v(t._s(t.owner?"对方":"匹配")+"性别")])]),n("van-col",{staticClass:"c"},[n("p",[t._v(t._s(t.genders[t.gender]))])])],1):t._e(),-1!==t.status?n("van-row",{attrs:{type:"flex",justify:"space-between"}},[n("van-col",{staticClass:"c"},[n("p",[t._v("礼物状态")])]),n("van-col",{staticClass:"c"},[n("p",{style:{color:t.statusColor[t.status]}},[t._v(t._s(t.statusString[t.status]))])])],1):t._e(),n("van-row",{attrs:{type:"flex",justify:"space-between"}},[n("van-col",{staticClass:"c"},[n("p",[t._v("微信")])]),n("van-col",{staticClass:"c"},[n("p",{style:t.owner?"color: #778899":"color: #191970; float: left",on:{click:t.toMe}},[t._v("\n "+t._s(t.wechat))]),t.owner?n("van-button",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.wechat,expression:"wechat",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onError,expression:"onError",arg:"error"}],staticStyle:{"margin-left":"5px"},attrs:{round:"",size:"mini"}},[t._v("复制")]):t._e()],1)],1)],1)],1),n("p",{staticStyle:{"text-align":"left","font-size":"100%"}},[n("strong",[t._v(t._s(t.presentName))])]),n("p",{staticStyle:{"text-align":"left"}},[t._v(t._s(t.presentDesc))])],1)}),u=[],m=(n("c5f6"),n("81e6"),n("9ffb")),v=(n("4d48"),n("d1e1")),g=(n("9cb7"),n("66fd")),p={name:"giftCard",components:(a={},Object(l["a"])(a,g["a"].name,g["a"]),Object(l["a"])(a,v["a"].name,v["a"]),Object(l["a"])(a,m["a"].name,m["a"]),Object(l["a"])(a,d["a"].name,d["a"]),a),data:function(){return{place:["斋区","西南","南区","桂庙","西丽"],statusString:["审核中","匹配中","匹配成功","交换成功","审核失败"],statusColor:["#fd6740","#00ff00","#00bfff","#00fa9a","#ff0000"],genders:["未知","男","女"]}},props:{presentImg:{type:String,default:"http://pjczv6ygf.bkt.clouddn.com/image_load_fail.jpg"},presentName:{type:String,default:"礼物名称"},presentDesc:{type:String,default:"没有获取到对方的礼物!"},owner:{type:Number,default:0},placeId:{type:Number,default:0},gender:{type:Number,default:0},status:{type:Number,default:0},wechat:{type:String,default:"undefined id"}},methods:{onCopy:function(t){s["a"].success("复制成功: "+t.text)},onError:function(t){s["a"].fail("复制失败")},toMe:function(){0===this.owner&&this.$router.push("me")}}},h=p,y=(n("8e48"),n("2877")),b=Object(y["a"])(h,f,u,!1,null,"2eb89ae4",null);b.options.__file="giftCard.vue";var _,w=b.exports,x=n("da1d"),D=n("6ef9"),S={name:"giftDetail",components:(_={NavBar:x["a"],GiftCard:w},Object(l["a"])(_,d["a"].name,d["a"]),Object(l["a"])(_,c["a"].name,c["a"]),_),data:function(){return{myPresent:{},reason:"",receivedPresent:{},giftDo:{},identityDo:{},commentDo:{content:"",rate:5},RgiftDo:{},RidentityDo:{},RcommentDo:{content:"",rate:5},orderId:-1}},methods:{editPresent:function(){s["a"].loading({mask:!0,message:"加载中...",duration:500});var t=this.myPresent;this.$router.push({path:"presentRegister",query:{presentId:t.id}})},deletePresent:function(){var t=this;r["a"].confirm({message:"确认删除礼物吗?"}).then(function(){s["a"].loading({mask:!0,message:"加载中...",duration:1e3});var e=t;D["a"].get_data("smartGoods/list?goodid="+t.myPresent.id,function(t){try{var n=t.model.list;"10000"===t.ret?(n[0].isDel=1,D["a"].get_data("smartGoods/updateBatch",function(t){"10000"===t.ret?(s["a"].success("删除成功"),e.$router.push("index")):s["a"].fail("删除失败,请检查网络")},n)):s["a"].fail("获取资源失败")}catch(a){console.warn(a),s["a"].fail("获取资源失败")}},{})}).catch(function(){})},toWriteComment:function(){var t=this.myPresent.id,e=this.receivedPresent.id,n=this.orderId;this.$router.push({path:"assess",query:{myId:t,goodId:e,orderId:n}})},loadGift:function(){var t=this.$route.query.presentId;null!=t&&void 0!=t||(t=D["a"].utils_get_param("presentId")),void 0!=t&&null!=t||(s["a"].fail("请重新进入礼物页哦"),this.$router.push("index"));var e=this;D["a"].get_data("smartGoods/list?goodid="+t,function(t){if("10000"===t.ret){if(void 0===t.model||null==t.model||void 0==t.model.list||t.model.list.length<=0)return s["a"].fail("礼物查看遇到问题,请稍等一下再试吧"),void e.$router.push("index");e.giftDo=t.model.list[0],e.onloadGift(e.giftDo)}},{})},initGifts:function(){if(void 0!==this.RgiftDo.goodid){var t={},e=this.RidentityDo;t.id=this.RgiftDo.goodid,t.name=this.RgiftDo.name,t.desc=this.RgiftDo.description,t.gender=e.userSex,t.placeId=e.dormDistrict,t.wechat=e.userWxAccount,t.img="http://pjczv6ygf.bkt.clouddn.com/mysterious%20gift.jpg",this.receivedPresent=t}var n={},a={};a=this.identityDo,n.id=this.giftDo.goodid,n.name=this.giftDo.name,n.desc=this.giftDo.description,n.status=this.giftDo.sort,n.gender=this.giftDo.goodFirstKind,n.placeId=a.dormDistrict,n.wechat=a.userWxAccount,n.img="http://gift.fogice.com"+this.giftDo.img,this.myPresent=n},onloadGift:function(){var t=this,e=this.giftDo.sort,n=this.giftDo.goodid;if(e>=2){4===e&&t.onloadReview(n);var a=localStorage.getItem("frontend-userid");D["a"].get_data("smartOrder/list?userId="+a,function(a){try{if(console.log("----- order res -----"),console.log(a),"10000"===a.ret&&void 0!==a.model.list&&0!==a.model.list.length){var i=a.model.list[0],o=parseInt(i.note);t.orderId=i.id,D["a"].get_data("smartGoods/list?goodid="+o,function(a){console.log("----- received gift -----");try{if(console.log(a),"10000"===a.ret){if(void 0===a.model||null==a.model||void 0==a.model.list||a.model.list.length<=0)return s["a"].fail("礼物查看遇到问题,请稍等一下再试吧"),void t.$router.push("index");t.RgiftDo=a.model.list[0],t.onloadReceiveGift(n,e)}}catch(i){console.warn(i),s["a"].fail("获取数据失败,请重试")}},{})}}catch(r){console.warn(r),s["a"].fail("数据异常!请重试")}},{})}else this.initGifts()},onloadReceiveGift:function(t,e){var n=this.RgiftDo.ownerId,a=this.RgiftDo.goodid,i=this;D["a"].get_data("smartIdentity/list?userId="+n,function(n){try{console.log("----- receiver's identity"),console.log(n),"10000"===n.ret&&void 0!==n.model&&0!==n.model.list.length?(i.RidentityDo=n.model.list[0],3===e?i.onloadFeedback(t,a):i.initGifts()):s["a"].fail("获取数据失败,请重试")}catch(o){console.log(o),s["a"].fail("获取数据失败,请重试")}},{})},onloadFeedback:function(t,e){var n=this;D["a"].get_data("smartOrderFeedback/list?goodId="+t,function(t){console.log("----- received feedback -----"),console.log(t);try{if("10000"===t.ret){var a={content:"暂未收到"};void 0!==t.model.list&&0!==t.model.list.length&&(a=t.model.list[0],n.commentDo.rate=a.ratingMajor),n.commentDo.content=a.content,D["a"].get_data("smartOrderFeedback/list?goodId="+e,function(e){console.log("----- sent feedback -----"),console.log(t);try{if("10000"===e.ret){var a={content:"感谢信未发送或发送失败"};void 0!==e.model.list&&0!==e.model.list.length&&(a=e.model.list[0],n.RcommentDo.rate=a.ratingMajor),n.RcommentDo.content=a.content,n.initGifts()}else s["a"].fail("获取信息失败"),n.initGifts()}catch(i){console.warn(i),s["a"].fail("获取信息失败"),n.initGifts()}},{})}else s["a"].fail("获取信息失败"),n.initGifts()}catch(i){console.warn(i),s["a"].fail("获取信息失败"),n.initGifts()}},{})},onloadReview:function(t){var e=this;D["a"].get_data("smartGoodReview/list?goodId="+t,function(t){if("10000"===t.ret&&void 0!==t.model.list){if(0!==t.model.list.length){var n=k(t.model.list);e.reason=t.model.list[n].displayNote}}else s["a"].fail("获取信息失败")},{})}},created:function(){if(localStorage.getItem("frontend-userid")){var t=localStorage.getItem("frontend-userid"),e=this;D["a"].get_data("smartIdentity/list?userId="+t,function(t){try{"10000"!==t.ret||void 0===t.model||null==t.model||void 0==t.model.list||t.model.list.length<=0?s["a"].fail("获取信息失败"):(e.identityDo=t.model.list[0],e.loadGift())}catch(n){console.warn(n),s["a"].fail("获取信息失败")}},{})}else this.$router.push("login")}};function k(t){for(var e=0,n=new Date(t[0].reviewTime.replace(/-/g,"/")),a=1;a<t.length;a++){var i=new Date(t[a].reviewTime.replace(/-/g,"/"));n<i&&(n=i,e=a)}return e}var I=S,P=(n("e01b"),Object(y["a"])(I,i,o,!1,null,"b8edaf22",null));P.options.__file="giftDetail.vue";e["default"]=P.exports},a481:function(t,e,n){"use strict";var a=n("cb7c"),i=n("4bf8"),o=n("9def"),r=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,d=Math.min,f=Math.floor,u=/\$([$&`']|\d\d?|<[^>]*>)/g,m=/\$([$&`']|\d\d?)/g,v=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,function(t,e,n,g){return[function(a,i){var o=t(this),r=void 0==a?void 0:a[e];return void 0!==r?r.call(a,o,i):n.call(String(o),a,i)},function(t,e){var i=g(n,t,this,e);if(i.done)return i.value;var f=a(t),u=String(this),m="function"===typeof e;m||(e=String(e));var h=f.global;if(h){var y=f.unicode;f.lastIndex=0}var b=[];while(1){var _=l(f,u);if(null===_)break;if(b.push(_),!h)break;var w=String(_[0]);""===w&&(f.lastIndex=s(u,o(f.lastIndex),y))}for(var x="",D=0,S=0;S<b.length;S++){_=b[S];for(var k=String(_[0]),I=c(d(r(_.index),u.length),0),P=[],C=1;C<_.length;C++)P.push(v(_[C]));var $=_.groups;if(m){var R=[k].concat(P,I,u);void 0!==$&&R.push($);var j=String(e.apply(void 0,R))}else j=p(k,u,I,P,$,e);I>=D&&(x+=u.slice(D,I)+j,D=I+k.length)}return x+u.slice(D)}];function p(t,e,a,o,r,s){var l=a+t.length,c=o.length,d=m;return void 0!==r&&(r=i(r),d=u),n.call(s,d,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,a);case"'":return e.slice(l);case"<":s=r[i.slice(1,-1)];break;default:var d=+i;if(0===d)return i;if(d>c){var u=f(d/10);return 0===u?i:u<=c?void 0===o[u-1]?i.charAt(1):o[u-1]+i.charAt(1):i}s=o[d-1]}return void 0===s?"":s})}})},aa57:function(t,e,n){},aeeb:function(t,e,n){"use strict";var a=n("62d0"),i=n.n(a);i.a},c3a6:function(t,e,n){"use strict";n("68ef")},da1d:function(t,e,n){"use strict";var a,i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-nav-bar",{staticStyle:{"background-color":"#fff6e3"},attrs:{title:t.title,border:!1}},[t._v('\n style="max-width: 30px;"\n />\n '),n("van-icon",{attrs:{slot:"left",name:"arrow-left",color:"black"},on:{click:t.onClickLeft},slot:"left"})],1)],1)},o=[],r=n("ade3"),s=(n("c3a6"),n("ad06")),l=(n("7f7f"),n("68ef"),n("8a0b"),n("fe7e")),c=Object(l["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:[t.b({fixed:t.fixed}),{"van-hairline--bottom":t.border}],style:t.style},[n("div",{class:t.b("left"),on:{click:function(e){t.$emit("click-left")}}},[t._t("left",[t.leftArrow?n("icon",{class:t.b("arrow"),attrs:{name:"arrow-left"}}):t._e(),t.leftText?n("span",{class:t.b("text"),domProps:{textContent:t._s(t.leftText)}}):t._e()])],2),n("div",{staticClass:"van-ellipsis",class:t.b("title")},[t._t("title",[t._v(t._s(t.title))])],2),n("div",{class:t.b("right"),on:{click:function(e){t.$emit("click-right")}}},[t._t("right",[t.rightText?n("span",{class:t.b("text"),domProps:{textContent:t._s(t.rightText)}}):t._e()])],2)])},name:"nav-bar",props:{title:String,fixed:Boolean,leftText:String,rightText:String,leftArrow:Boolean,border:{type:Boolean,default:!0},zIndex:{type:Number,default:1}},computed:{style:function(){return{zIndex:this.zIndex}}}}),d=(n("cadf"),n("551c"),n("097d"),{name:"navBar",components:(a={},Object(r["a"])(a,c.name,c),Object(r["a"])(a,s["a"].name,s["a"]),a),props:{path:{type:String,default:"index"},title:{type:String,default:"深大换换礼物交换"}},methods:{onClickLeft:function(){this.$router.push(this.path)}}}),f=d,u=(n("aeeb"),n("2877")),m=Object(u["a"])(f,i,o,!1,null,"7f9774c3",null);m.options.__file="navBar.vue";e["a"]=m.exports},e01b:function(t,e,n){"use strict";var a=n("aa57"),i=n.n(a);i.a}}]);
- //# sourceMappingURL=chunk-763b02ba.a1f4b500.js.map
|