1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["setting-businessShow"],{"09f1":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.getComList=o,e.getReply=r,e.getStoreShow=s,e.setStoreShow=u,e.updateComment=l;var i=a(n("5b42"));function o(t){return i.default.get("api/manage.service.comment/list",{params:t})}function r(t){return i.default.get("api/manage.service.comment/reply",{params:t})}function l(t){return i.default.post("api/manage.service.comment/updateComment",t)}function s(t){return i.default.get("api/manage.shop.config/getStoreShow",{params:t})}function u(t){return i.default.post("api/manage.shop.config/setStoreShow",t)}var c={getComList:o,getReply:r,updateComment:l,getStoreShow:s,setStoreShow:u};e.default=c},"0c2e":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("2634")),o=a(n("2fdc"));n("aa9c"),n("fd3c"),n("dd2b");var r=a(n("09f1")),l={data:function(){return{action:"",notes:"",fileList:[],images:[],textareaValue:"",src:"",uploadinfo:[],shot:!1,uploadedUrls:[],uploadUrl:""}},mounted:function(){console.log(uni.getStorageSync("base_url")),this.action=uni.getStorageSync("base_url")+"/api/upload/image",console.log("this.action",this.action),this.getStoreShow()},methods:{chooseFile:function(){var t=this;uni.chooseFile({extension:[".mp4"],type:"video",success:function(e){var n=e.tempFiles[0].path;t.uploadFile(n)}})},uploadFile:function(t){var e=this,n=this.action;uni.uploadFile({url:n,filePath:t,name:"file",success:function(t){var n=JSON.parse(t.data);e.uploadinfo=n.data.uri,e.shot=!1;e.uploadedUrls.push(e.uploadinfo),e.uploadUrl=e.uploadedUrls.join(","),console.log("uploadedUrls",e.uploadedUrls),console.log("uploadUrl:",e.uploadUrl)},fail:function(t){console.log(t)}})},clear:function(){this.uploadUrl=""},handleNavBack:function(){uni.navigateBack({delta:1})},getStoreShow:function(){var t=this;return(0,o.default)((0,i.default)().mark((function e(){var n;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r.default.getStoreShow({sid:t._sid});case 2:n=e.sent,console.log("商家秀数据",n.data),t.textareaValue=n.data.content,t.uploadUrl=n.data.video,n.data.images&&(t.images=n.data.images.map((function(t){return{image:t}})),t.fileList=n.data.images.map((function(t){return{url:t}})));case 7:case"end":return e.stop()}}),e)})))()},submit:function(){var t=this;return(0,o.default)((0,i.default)().mark((function e(){var n;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log("this.images",t.images),e.next=3,r.default.setStoreShow({sid:t._sid,video:t.uploadUrl,images:t.images.map((function(t){return t.image})),content:t.textareaValue});case 3:n=e.sent,console.log("商家秀数据",n.data.data),n&&1===n.code?uni.showToast({title:"修改成功",icon:"success"}):uni.showToast({title:"修改失败",icon:"error"}),t.$router.go(0);case 7:case"end":return e.stop()}}),e)})))()},sucMaterial:function(t,e){this.images.push({image:t.data.uri}),console.log("images",this.images)},reMaterial:function(t,e,n){Array.isArray(this.images)&&this.images.splice(t,1),console.log("images",this.images)}}};e.default=l},1939:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.tn-input[data-v-22f87c42]{display:flex;flex-direction:row;position:relative;flex:1}.tn-input__input[data-v-22f87c42]{font-size:%?28?%;color:#080808;flex:1}.tn-input__textarea[data-v-22f87c42]{width:auto;font-size:%?28?%;color:#080808;padding:%?10?% 0;line-height:normal;flex:1}.tn-input--border[data-v-22f87c42]{border-radius:%?6?%;border:%?2?% solid rgba(0,0,0,.1)}.tn-input--error[data-v-22f87c42]{border-color:#e83a30!important}.tn-input__right-icon[data-v-22f87c42]{line-height:1}.tn-input__right-icon .icon[data-v-22f87c42]{color:#aaa}.tn-input__right-icon__item[data-v-22f87c42]{margin-left:%?10?%}.tn-input__right-icon__clear .icon[data-v-22f87c42]{font-size:%?32?%}.tn-input__right-icon__select[data-v-22f87c42]{transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.tn-input__right-icon__select .icon[data-v-22f87c42]{font-size:%?26?%}.tn-input__right-icon__select--reverse[data-v-22f87c42]{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}',""]),t.exports=e},3133:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,"uni-page-body[data-v-6fab9251]{background-color:#fff}body.?%PAGE?%[data-v-6fab9251]{background-color:#fff}.notes[data-v-6fab9251]{color:#999;margin:auto;width:95%}.hx[data-v-6fab9251]{height:1px;width:100%;background-color:rgba(0,0,0,.05);margin:%?20?% 0}.footer[data-v-6fab9251]{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:50px;border-radius:88px;background:#d60200;color:#fff;width:70%;text-align:center;padding:%?20?% 0}.video[data-v-6fab9251]{background-color:#e6e6e6;display:flex;color:#838383;font-size:14px;align-items:center;justify-content:center;width:%?200?%;height:%?200?%;margin:6px;border-radius:5px}",""]),t.exports=e},"3bcd":function(t,e,n){"use strict";var a=n("9854"),i=n.n(a);i.a},"502e":function(t,e,n){"use strict";n.r(e);var a=n("8687"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},5059:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var a={tnNavBar:n("3703").default,tnImageUpload:n("713d").default,tnInput:n("6864").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"body"},[n("tn-nav-bar",{staticClass:"nav_bar",attrs:{fixed:!0,beforeBack:t.handleNavBack,backTitle:"",backgroundColor:"#f5f5f5"}},[t._v("商家秀")]),n("v-uni-view",{staticClass:"notes",style:{paddingTop:t.vuex_custom_bar_height+10+"px"}},[n("v-uni-view",{staticStyle:{"font-size":"14px"}},[t._v("商家可以对作品,案例,环境,商品,订单等,展示一些优秀的图片或视频,")]),n("v-uni-view",{staticClass:"tn-flex"},[n("tn-image-upload",{attrs:{action:t.action,fileList:t.fileList,maxCount:2},on:{"on-success":function(e){arguments[0]=e=t.$handleEvent(e),t.sucMaterial.apply(void 0,arguments)},"on-remove":function(e){arguments[0]=e=t.$handleEvent(e),t.reMaterial.apply(void 0,arguments)}}}),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:!t.uploadUrl,expression:"!uploadUrl"}],staticClass:"video",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chooseFile.apply(void 0,arguments)}}},[t._v("选择视频")]),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:t.uploadUrl,expression:"uploadUrl"}],staticClass:"video",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clear.apply(void 0,arguments)}}},[t._v("清空视频")])],1),n("v-uni-video",{directives:[{name:"show",rawName:"v-show",value:t.uploadUrl,expression:"uploadUrl"}],staticStyle:{display:"flex",margin:"auto","margin-top":"10rpx"},attrs:{src:t.uploadUrl}}),n("v-uni-view",{staticStyle:{"font-size":"14px","margin-top":"20rpx"}},[t._v("点击上传图片或视频(最多展示两个图片或者一个图片一个视频)")]),n("v-uni-view",{staticClass:"hx"}),n("v-uni-view",{staticClass:"tn-flex-1"},[n("tn-input",{attrs:{placeholder:"请输入备注信息",type:"textarea",height:208,autoHeight:!0},model:{value:t.textareaValue,callback:function(e){t.textareaValue=e},expression:"textareaValue"}})],1),n("v-uni-view",{staticClass:"hx"})],1),n("v-uni-view",{staticClass:"footer",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[t._v("发布笔记")])],1)},o=[]},6864:function(t,e,n){"use strict";n.r(e);var a=n("a6a5"),i=n("502e");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("e370");var r=n("828b"),l=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"22f87c42",null,!1,a["a"],void 0);e["default"]=l.exports},"750c":function(t,e,n){var a=n("1939");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("dce1f50a",a,!0,{sourceMap:!1,shadowMode:!1})},8687:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa"),n("0c26");var i=a(n("a7d1")),o={mixins:[i.default],name:"tn-input",props:{value:{type:[String,Number],default:""},type:{type:String,default:"text"},inputAlign:{type:String,default:"left"},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:"color: #AAAAAA"},disabled:{type:Boolean,default:!1},maxLength:{type:Number,default:255},height:{type:Number,default:0},autoHeight:{type:Boolean,default:!0},confirmType:{type:String,default:"done"},customStyle:{type:Object,default:function(){return{}}},fixed:{type:Boolean,default:!1},focus:{type:Boolean,default:!1},passwordIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!1},borderColor:{type:String,default:"#dcdfe6"},selectOpen:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},cursorSpacing:{type:Number,default:0},selectionStart:{type:Number,default:-1},selectionEnd:{type:Number,default:-1},trim:{type:Boolean,default:!0},showConfirmBar:{type:Boolean,default:!0},showRightIcon:{type:Boolean,default:!1},rightIcon:{type:String,default:""}},computed:{inputStyle:function(){var t={};return t.minHeight=this.height?this.height+"rpx":"textarea"===this.type?this.textareaHeight+"rpx":this.inputHeight+"rpx",t=Object.assign(t,this.customStyle),t},elSelectionStart:function(){return String(this.selectionStart)},elSelectionEnd:function(){return String(this.selectionEnd)}},data:function(){return{defaultValue:this.value,inputHeight:70,textareaHeight:100,validateState:!1,focused:!1,showPassword:!1,lastValue:""}},watch:{value:function(t,e){this.defaultValue=t,t!==e&&"select"===this.type&&this.handleInput({detail:{value:t}})}},created:function(){this.$on("on-form-item-error",this.onFormItemError)},methods:{handleInput:function(t){var e=this,n=t.detail.value;this.trim&&(n=this.$t.string.trim(n)),this.$emit("input",n),this.defaultValue=n,setTimeout((function(){e.dispatch("tn-form-item","on-form-change",n)}),40)},handleBlur:function(t){var e=this,n=t.detail.value;setTimeout((function(){e.focused=!1}),100),this.$emit("blur",n),setTimeout((function(){e.dispatch("tn-form-item","on-form-blur",n)}),40)},onFormItemError:function(t){this.validateState=t},onFocus:function(t){this.focused=!0,this.$emit("focus")},onConfirm:function(t){this.$emit("confirm",t.detail.value)},onClear:function(t){this.$emit("input","")},inputClick:function(){this.$emit("click")}}};e.default=o},9854:function(t,e,n){var a=n("3133");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("87e0b71c",a,!0,{sourceMap:!1,shadowMode:!1})},a6a5:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"tn-input-class tn-input",class:{"tn-input--border":t.border,"tn-input--error":t.validateState},style:{padding:"0 "+(t.border?20:0)+"rpx",borderColor:t.borderColor,textAlign:t.inputAlign},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.inputClick.apply(void 0,arguments)}}},["textarea"===t.type?n("v-uni-textarea",{staticClass:"tn-input__input tn-input__textarea",style:[t.inputStyle],attrs:{value:t.defaultValue,placeholder:t.placeholder,placeholderStyle:t.placeholderStyle,disabled:t.disabled||"select"===t.type,maxlength:t.maxLength,fixed:t.fixed,focus:t.focus,autoHeight:t.autoHeight,selectionStart:t.elSelectionStart,selectionEnd:t.elSelectionEnd,cursorSpacing:t.cursorSpacing,showConfirmBar:t.showConfirmBar},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.handleInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.handleBlur.apply(void 0,arguments)},focus:function(e){arguments[0]=e=t.$handleEvent(e),t.onFocus.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}}):n("v-uni-input",{staticClass:"tn-input__input",style:[t.inputStyle],attrs:{type:"password"===t.type?"text":t.type,value:t.defaultValue,password:"password"===t.type&&!t.showPassword,placeholder:t.placeholder,placeholderStyle:t.placeholderStyle,disabled:t.disabled||"select"===t.type,maxlength:t.maxLength,focus:t.focus,confirmType:t.confirmType,selectionStart:t.elSelectionStart,selectionEnd:t.elSelectionEnd,cursorSpacing:t.cursorSpacing,showConfirmBar:t.showConfirmBar},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.handleInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.handleBlur.apply(void 0,arguments)},focus:function(e){arguments[0]=e=t.$handleEvent(e),t.onFocus.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"tn-input__right-icon tn-flex tn-flex-col-center"},[t.clearable&&""!==t.value&&t.focused?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClear.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"icon tn-icon-close"})],1):"text"===t.type&&!t.focused&&t.showRightIcon&&""!==t.rightIcon?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear"},[n("v-uni-view",{staticClass:"icon",class:["tn-icon-"+t.rightIcon]})],1):t._e(),t.passwordIcon&&"password"===t.type?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showPassword=!t.showPassword}}},[t.showPassword?n("v-uni-view",{staticClass:"icon tn-icon-eye"}):n("v-uni-view",{staticClass:"tn-icon-eye-hide"})],1):t._e(),"select"===t.type?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__select",class:{"tn-input__right-icon__select--reverse":t.selectOpen}},[n("v-uni-view",{staticClass:"icon tn-icon-up-triangle"})],1):t._e()],1)],1)},i=[]},a7d1:function(t,e,n){"use strict";function a(t,e,n){this.$children.map((function(i){t===i.$options.name?i.$emit.apply(i,[e].concat(n)):a.apply(i,[t,e].concat(n))}))}n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("fd3c"),n("c223");var i={methods:{dispatch:function(t,e,n){var a=this.$parent||this.$root,i=a.$options.name;while(a&&(!i||i!==t))a=a.$parent,a&&(i=a.$options.name);a&&a.$emit.apply(a,[e].concat(n))},broadcast:function(t,e,n){a.call(this,t,e,n)}}};e.default=i},b747:function(t,e,n){"use strict";n.r(e);var a=n("5059"),i=n("c8a6");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("3bcd");var r=n("828b"),l=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"6fab9251",null,!1,a["a"],void 0);e["default"]=l.exports},c8a6:function(t,e,n){"use strict";n.r(e);var a=n("0c2e"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},e370:function(t,e,n){"use strict";var a=n("750c"),i=n.n(a);i.a}}]);
|