| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978 |
- <template>
- <view class="contentV">
- <customNav :shownav="true" :deleteBt="edeatState" :title="$t('index.mendianguanli')" titledetl="" v-on:Enavbarsel="navbarsel"></customNav>
- <view v-if="auditStatus!=1" class="yzmctV">
- <text style="font-size: 30rpx;color:green;margin-left: 4%;width: 92%;">{{noteStatus}}</text>
- </view>
- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.mendianmc')}}:</text>
- <input class="noinputV" type="text" :placeholder="$t('mend.qingshurdm')" :value="posName" @input="inpuact1">
- </view>
- <!-- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.fuzheren')}}:</text>
- <input class="noinputV" type="text" :placeholder="$t('mend.fuzheren')" :value="fuzheren" @input="fuzherenip">
- </view> -->
- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.kefudianhua')}}:</text>
- <input class="noinputV" type="number" :placeholder="$t('mend.qingshurkfdh')" :value="telephone" @input="phoneinput">
- </view>
- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.xukezhenghao')}}:</text>
- <input class="noinputV" type="text" :value="xukezheng" :placeholder="$t('mend.jingyingxkzh')" @input="inpuact3">
- </view>
- <view class="contentInRowL" style="margin-left: 8%;margin-top: 40rpx;align-items: center;">
- <text class="yzmbt" style="width: 50%;">{{$t('mend.yingyeshijan')}}:</text>
- </view>
- <view class="contentInRowL" style="margin-left: 8%;margin-top: 10rpx;align-items: center;">
- <view class="contentColumn">
- <view class="contentInRowL" v-for="(Ytime,index) in yingyeTime">
- <view class="timetext" style="color: green;">{{Ytime.startTime}}</view>
- <text> — </text>
- <view class="timetext" style="color: crimson;">{{Ytime.endTime}}</view>
- <image style="width: 54rpx;height: 54rpx; margin-left:40rpx;" src="/static/images/jian@3x.png" mode="scaleToFill" @click="delyysj(index)"></image>
- </view>
- <view class="contentInRowL" >
- <picker mode="multiSelector" :value="timeB" :range="array" @change="TimeChangeB">
- <view class="timetext" style="color: green;">{{timeB!=''?timeB:$t('mend.kaishisj')}}</view>
- </picker>
- <text> — </text>
- <picker mode="multiSelector" :value="timeN" :range="array" @change="TimeChangeN">
- <view class="timetext" style="color: crimson;">{{timeN!=''?timeN:$t('mend.jieshusj')}}</view>
- </picker>
- <image style="width: 50rpx;height: 50rpx;padding-left: 40rpx;" src="/static/images/plus-circle-fill@3x.png" mode="scaleToFill" @click="addyysj"></image>
- </view>
- </view>
-
- </view>
- <view class="contentInRowL" style="margin-left: 8%;margin-top: 40rpx;">
- <text class="yzmbt">{{$t('mend.hangyeleix')}}:</text>
- <radio-group @change="radioChange">
- <radio value="0" :checked="type==0"/>
- {{$t('mend.canyin')}}
- <radio value="1" :checked="type==1" />
- {{$t('mend.shangchao')}}
- </radio-group>
- </view>
- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.mendianleix')}}:</text>
- <view class="xialakuang">
- <uni-data-select class="" v-model="fltype" :placeholder="$t('mend.qingxuanze')" :localdata="range" @change="selectchange" ></uni-data-select>
- </view>
- </view>
- <view v-if="fwrange.length>0" class="skuViewCt">
- <text class="fwyzmbt">{{$t('mend.fuwuleix')}}:</text>
- <view class="contensbgg">
- <checkbox-group v-for="(itemc,index) in fwrange" >
- <text @click="selectfwtye(index)"><checkbox :value="itemc.value" :checked="itemc.state==1?true:false" />{{itemc.text}}</text>
- </checkbox-group>
- </view>
- </view>
- <view class="contentColumn" style="margin-top: 40rpx;width: 82%;margin-left: 9%;">
- <text class="yzmbt">{{$t('mend.mendianweiz')}}:</text>
- <view class="contentInRowS" style="width: 100%;">
- <textarea class="textinput" auto-height="true"
- :disabled="addrinputact"
- :always-embed='false'
- :adjust-position='true'
- :value="address"
- cursor-spacing='30'
- confirm-hold='true'
- :focus='false'
- maxlength='300'
- @input='inpuact6'
- ></textarea>
- <!-- <input class="addrinputV" :disabled="addrinputact" type="text" :value="address" @input="inpuact6"> -->
- <uni-icons custom-prefix="custom-icon" color="#006AFF" type="location-filled" size="36" @click="selctAddr"></uni-icons>
- </view>
- </view>
- <view class="yzmctV">
- <text class="yzmbt">{{$t('mend.qisongjine')}}:</text>
- <input class="noinputV" type="number" :value="posPrice" :placeholder="$t('mend.qingsrwszd')" @input="inpuact2">
- </view>
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.logo')}}:</text>
- </view>
- <view class="yzmctV" @click="logoimge">
- <netImage width="190" height="190" bradius="4" :mysrc="lgImage" mymode="scaleToFill"></netImage>
- </view>
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.mendiantp')}}:</text>
- </view>
- <view class="yzmctV" @click="mdselectImage">
- <netImage width="610" height="340" bradius="4" :mysrc="spImage" mymode="scaleToFill"></netImage>
- </view>
-
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.jingyingzhtp')}}:</text>
- </view>
- <view class="yzmctV" @click="zhengjianImage(0)">
- <netImage width="610" height="610" bradius="4" :mysrc="Image0" mymode="scaleToFill"></netImage>
- </view>
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.weituosq')}}:</text>
- </view>
- <view class="yzmctV" @click="zhengjianImage(1)">
- <netImage width="610" height="610" bradius="4" :mysrc="Image1" mymode="scaleToFill"></netImage>
- </view>
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.shipinanquan')}}:</text>
- </view>
- <view class="yzmctV" @click="zhengjianImage(2)">
- <netImage width="610" height="610" bradius="4" :mysrc="Image2" mymode="scaleToFill"></netImage>
- </view>
- <view class="contentInRowL">
- <text style="font-size: 28rpx;text-align: left;margin-left: 8%;margin-top: 40rpx;">{{$t('mend.caidantup')}}:</text>
- </view>
- <view class="yzmctV" @click="zhengjianImage(3)">
- <netImage width="610" height="610" bradius="4" :mysrc="Image3" mymode="scaleToFill"></netImage>
- </view>
-
- <view class="yzmctV">
- <text style="font-size: 30rpx;color: darkgray;">{{$t('mend.yishangbitian')}}</text>
- </view>
- <view class="yzmctV" style="margin-bottom: 40rpx;">
- <text class="querenBt" @click="tijiao">{{$t('index.tijiao')}}</text>
- </view>
- <yhdslCropper ref="yhdslCropper" :quality="1" mode="scale" @uploadImg="uploadImg" :scale="scale"></yhdslCropper>
- </view>
- </template>
- <script>
-
- import api from "@/pages/api/api.js"
- import ApibaseUrl from "@/config/urlConfig.js"
- import yhdslCropper from '@/components/yhdsl-cropper/yhdsl-cropper.vue';
-
- export default {
- components: {
- yhdslCropper
- },
- data() {
- return {
- value:0,
- id:-1,
- range: [],
- fwrange: [],
- selectindex:['0','0','0','0'],
- mendianMs:[],
- latitude:0,
- longitude:0,
- area: "",
- address: this.$t('mend.qingxzdz'),
- addrNamedetl:this.$t('mend.qingxzdz'),
- posName: "",
- fuzheren:'',
- telephone:'',
- image: "",
- posPrice:0,
- xukezheng:'',
- yingyesj:'',
- fltype:0,
- type:0,
- userInfo:{},
- fenleiLst:{},
- fuwuList:{},
- spImage:'',
- lgImage:'',
- baseUrl:this.$baseImagurl,
- scale:1.8,
- edeatState:0,
- addrinputact:true,
- auditStatus:0,
- noteStatus:'',
- annexList:['','','',''],
- imgeState:0,
- array:[],
- yingyeTime:[],
- timeB:'',
- timeN:'',
- Image0:'',
- Image1:'',
- Image2:'',
- Image3:'',
- }
- },
- onLoad(option) {
- this.id=option.id;
- this.getfwlxlist();
- this.array=[
- ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'],
- ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59']
- ];
- },
- onShow() {
- this.gettempLocate();
- var data = uni.getStorageSync('userInfo');
- this.userInfo = JSON.parse(data);
- this.auditStatus=this.userInfo.auditStatus;
- if(this.userInfo.auditStatus==0){//未审核
- this.noteStatus=this.$t('user.zhhwsh');
- }
- else if(this.userInfo.auditStatus!=1){
- this.noteStatus=this.$t('user.zhhyc');
- }
- this.getmendianfenlei();
-
- },
- methods: {
- radioChange(e){
- console.log(e.detail.value)
- this.type=e.detail.value;
- },
- inpuact1(v){
- this.posName = v.target.value;
- },
- inpuact2(v){v
- this.posPrice = v.target.value;
- },
- inpuact3(v){v
- this.xukezheng = v.target.value;
- },
- inpuact4(v){
- this.yingyesj = v.target.value;
- },
- inpuact6(v){
- this.address = v.target.value;
- },
-
- fuzherenip(v){
- this.fuzheren = v.target.value;
- },
- phoneinput(v){
- this.telephone = v.target.value;
- },
- delyysj(i){
- if(this.yingyeTime.length>i){
- this.delYingyeshijian(this.yingyeTime[i].id);
- // var tempList = this.yingyeTime;
- // tempList.splice(i,1);
- // this.yingyeTime=tempList;
- }
- },
- addyysj(){
- if(this.timeN!=''&&this.timeB!=''){
- var lastT={
- startTime:this.timeB,
- endTime:this.timeN
- }
- this.addYingyeshijian(lastT);
- this.yingyeTime.push(lastT);
- this.timeB='';
- this.timeN='';
- console.log(JSON.stringify(this.yingyeTime));
- }
- else{
-
- }
- },
- TimeChangeB: function(e) {
- console.log(e)
- var v = e.detail.value;
- var timeB = this.array[0][v[0]] +':'+this.array[1][v[1]];
- this.timeB=timeB;
- },
- TimeChangeN: function(e) {
- console.log(e.detail.value)
- var v = e.detail.value;
- var timeN =this.array[0][v[0]] +':'+this.array[1][v[1]];
- this.timeN=timeN;
- },
- gettempLocate(){
- var that =this;
- try {//读取
- var data = uni.getStorageSync("tempLocation");
- console.log(data);
- if(''==data || undefined==data || null==data){
- return;
- }
- else{
- this.latitude=data.latitude;
- this.longitude=data.longitude;
- if(data.name&&data.name.length>2){
- this.address=data.name;
- }
- else{
- this.address=data.address;
- }
- this.addrinputact=false;
- uni.setStorageSync('tempLocation',"");
- return;
- }
- } catch(e){//错误
- return;
- }
- },
-
- intfofwrange(selectindex){
- for(var i=0;i<this.fuwuList.length;i++){
- for(var j=0;j<selectindex.length;j++){
- if(this.fuwuList[i].value == selectindex[j] ){
- this.fuwuList[i].state = 1;
- }
- }
- }
- this.fwrange= this.fuwuList;
- },
-
- selectchange(e){
- console.log(e);
- this.fltype=e;
- },
- selectfwtye(index){
- console.log(index)
- if(this.fwrange[index].state==0){
- this.fwrange[index].state=1;
- }
- else{
- this.fwrange[index].state=0
- }
- var select = [];
- for(var i=0;i<this.fwrange.length;i++){
- if(this.fwrange[i].state == 1){
- select.push(this.fwrange[i].value)
- }
- }
- this.selectindex = select;
- },
-
- selctAddr(){
- // uni.navigateTo({
- // //url:'/pages/UserCenter/map/mapN',
- // url:'/pages/UserCenter/map/map?state=0'
- // })
- uni.navigateTo({
- url:'/pages/UserCenter/map/Chazhaodizhi'
- })
- },
-
- tijiao(){
- if(this.auditStatus!=1){
- uni.showToast({
- title:this.noteStatus,
- icon:"none"
- })
- return;
- }
- else{
- this.addmendian();
- }
- },
- logoimge(){
- console.log('logoimge');
- this.imgeState=-1;
- this.scale=1;
- this.$refs.yhdslCropper.chooseImage();
- },
- mdselectImage(){
- console.log('selectImage');
- this.imgeState=-1;
- this.scale=1.8;
- this.$refs.yhdslCropper.chooseImage();
- },
- zhengjianImage(index){
- this.imgeState=index;
- this.selectImage();
- },
-
- selectImage(){
- var that = this;
- var ulUrl = ApibaseUrl.getUploadUrl();
- uni.chooseImage({
- count: 1, // 图片数量
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择或者拍照
- success: (res) => {
- const tempFilePaths = res.tempFilePaths;
- uni.showLoading({
- mask:true
- })
- uni.uploadFile({
- url:ulUrl, //上传图片api
- filePath: tempFilePaths[0],
- name: 'file',
- header:{
- //"Authorization": userinfo.token
- },
- success: (res) => {
- uni.hideLoading();
- let group = JSON.parse(res.data);
- this.annexList[this.imgeState]=group.data;
- this.Image0=this.annexList[0];
- this.Image1=this.annexList[1];
- this.Image2=this.annexList[2];
- this.Image3=this.annexList[3];
- },
- fail() {
- uni.hideLoading();
- }
- });
- }
- });
- },
-
- uploadImg(e) {
- console.log(this.scale)
- uni.showLoading({
- mask:true
- });
- var that = this;
- var ulUrl = ApibaseUrl.getUploadUrl();
- uni.uploadFile({
- url:ulUrl, //上传图片api
- filePath: e,
- name: 'file',
- header:{
- //"Authorization": userinfo.token
- },
- success: (res) => {
- uni.hideLoading();
- console.log(res)
- let group = JSON.parse(res.data);
- if(that.scale==1){
- that.lgImage = group.data;
- }
- else{
- if(that.imgeState<0){
- that.spImage = group.data;
- }
- else{
- this.annexList[this.imgeState]=group.data;
- this.Image0=this.annexList[0];
- this.Image1=this.annexList[1];
- this.Image2=this.annexList[2];
- this.Image3=this.annexList[3];
- }
- }
- // console.log(that.scale,that.lgImage)
- uni.showToast({
- title:that.$t('mend.shangccg'),
- icon:"success"
- })
- },
- fail() {
- uni.hideLoading();
- }
- });
- },
- imagesel(src){
- console.log(src);
- uni.navigateTo({
- url:'/pages/UserCenter/mendian/BigimageView?mysrc='+src
- })
- },
- getmendianDetail(id){
- console.log('getmendianDetail:id',id);
- api('getmendianDetail',{
- id:id
- },
- r=>{
- this.mendianMs=r.data.data;
- console.log('----',this.mendianMs);
- this.posName=this.mendianMs.posName;
- this.telephone=this.mendianMs.telephone;
- this.posPrice=this.mendianMs.posPrice;
- this.latitude=this.mendianMs.latitude;
- this.longitude=this.mendianMs.longitude;
- if(this.latitude==''||this.latitude==0||this.latitude==undefined){
- this.addrinputact=true;
- }
- if(this.longitude==''||this.longitude==0||this.longitude==undefined){
- this.addrinputact=true;
- }
- if(this.addrinputact==true){
- uni.showToast({
- title:this.$t('mend.qxtianjiafl'),
- icon:"none",
- duration: 3000
- })
- }
- this.area=this.mendianMs.area;
- this.address=this.mendianMs.address;
- this.fltype=this.mendianMs.sort;
- this.spImage=this.mendianMs.image;
- this.lgImage=this.mendianMs.logo;
- this.xukezheng=this.mendianMs.hygienePermit;
-
- // if(this.mendianMs.windingUp){
- // this.timeN=this.mendianMs.windingUp;
- // }
-
- this.type=this.mendianMs.type;
- this.selectindex = JSON.parse(this.mendianMs.serverType);
- if(this.mendianMs.hygieneLicence){
- this.annexList=this.mendianMs.hygieneLicence.split(",");
- if(this.annexList.length!=4){
- this.annexList=['','','',''];
- }
- this.Image0=this.annexList[0];
- this.Image1=this.annexList[1];
- this.Image2=this.annexList[2];
- this.Image3=this.annexList[3];
- }
- this.intfofwrange(this.selectindex);
- this.getYingyeshijian(id);
- },failc=>{
- //console.log('getadvertis----',failc)
-
- });
-
- },
-
- getmendianfenlei(){
- var language = uni.getStorageSync('language');
- api('getmendianfenlei',{
- pageSize:40
- },
- r=>{
- this.fenleiLst=r.data.rows;
- console.log('getmendianfenlei---',this.fenleiLst)
- var Trange=[];
- for(var i=0;i<this.fenleiLst.length;i++){
- var name='';
- if(language=='zh-Hans'){
- name=this.fenleiLst[i].name;
- }
- else if(language=='zh-Hant'){
- name=this.fenleiLst[i].nameTw;
- }
- else{
- name=this.fenleiLst[i].nameVi;
- }
- Trange.push({value:this.fenleiLst[i].id,text:name});
- }
- this.range=Trange;
- if(this.id>=0){
- this.value=this.mendianMs.type;
- }
- },failc=>{
- //console.log('getadvertis----',failc)
-
- });
-
- },
- getfwlxlist(){
- var language = uni.getStorageSync('language');
-
- api('fwlxlist',{
- pageSize:40
- },
- r=>{
- var objList=r.data.rows;
- var Trange=[];
- for(var i=0;i<objList.length;i++){
- var name='';
- if(language=='yuenan'){
- name=objList[i].nameVi;
- }
- else if(language=='zh-Hans'){
- name=objList[i].nameCn;
- }
- else if(language=='zh-Hant'){
- name=objList[i].nameTw;
- }
- Trange.push({value:objList[i].id,text:name,state:0});
- }
- this.fuwuList=Trange;
- if(this.id>=0){
- this.edeatState=1;
- this.addrinputact=false;
- this.getmendianDetail(this.id)
- }
- },failc=>{
- //console.log('getadvertis----',failc)
-
- });
-
- },
- addmendian(){
- var data;
- if(this.id>0){
- data={
- "id":this.id,
- "posName": this.posName,
- "telephone":this.telephone,
- "image":this.spImage,
- "logo":this.lgImage,
- "posPrice": this.posPrice,
- "area":this.area,
- "address": this.address,
- "longitude": this.longitude,
- "latitude": this.latitude,
- "briefIntroduction": "",
- "type":this.type,
- "hygienePermit":this.xukezheng,
- "openBusiness":'',
- "windingUp":this.timeN,
- "sort":this.fltype,
- "serverType":JSON.stringify(this.selectindex),
- "userId": this.userInfo.userId,
- "hygieneLicence":this.annexList+''
- }
- }
- else{
- data={
- "posName": this.posName,
- "telephone":this.telephone,
- "image":this.spImage,
- "logo":this.lgImage,
- "posPrice": this.posPrice,
- "area":this.area,
- "address": this.address,
- "longitude": this.longitude,
- "latitude": this.latitude,
- "briefIntroduction": "",
- "type":this.type,
- "hygienePermit":this.xukezheng,
- "openBusiness":'',
- "windingUp":this.timeN,
- "sort":this.fltype,
- "serverType":JSON.stringify(this.selectindex),
- "userId": this.userInfo.userId,
- "hygieneLicence":this.annexList+''
- }
- }
-
- var checkdataR = this.checkdata(data);
- if(!checkdataR){
- return;
- }
- console.log('addmendian',data);
- var that = this;
- api('addmendian',data,
- r=>{
- console.log(r)
- if(r.data.code!=200){
- uni.showToast({
- title:that.$t('api.baochunsb'),
- icon:"none"
- })
- return;
- }
- if(that.id){
- uni.navigateBack({
- delta:1,//返回层数,2则上上页
- })
- }
- else{
- if(r.data.data){
- that.id=r.data.data.id;
- for(var i=0;i<that.yingyeTime.length;i++){
- that.addYingyeshijian(that.yingyeTime[i])
- }
- uni.navigateBack({
- delta:1,//返回层数,2则上上页
- })
- }
- }
- },failc=>{
- //console.log('getadvertis----',failc)
-
- });
- },
- checkdata(data){
- if(data.posName.length<1){
- uni.showToast({
- title:this.$t('mend.qingshurdm'),
- icon:"none"
- })
- return false;
- }
- if(data.telephone.length<1){
- uni.showToast({
- title:this.$t('mend.qingshurkfdh'),
- icon:"none"
- })
- return false;
- }
- if(data.hygienePermit.length<1){
- uni.showToast({
- title:this.$t('mend.jingyingxkzh'),
- icon:"none"
- })
- return false;
- }
- if(this.yingyeTime.length<=0){
- uni.showToast({
- title:this.$t('mend.yingyeshijan'),
- icon:"none"
- })
- return false;
- }
- if(data.sort.length<1){
- uni.showToast({
- title:this.$t('mend.qingxuanmendianlx'),
- icon:"none"
- })
- return false;
- }
- if(data.serverType.length<1){
- uni.showToast({
- title:this.$t('mend.qingxuanfuwulx'),
- icon:"none"
- })
- return false;
- }
- if(data.latitude==0||data.longitude==0){
- uni.showToast({
- title:this.$t('mend.qingxzdz'),
- icon:"none"
- })
- return false;
- }
- if(data.address.length<1){
- uni.showToast({
- title:this.$t('mend.qingxzdz'),
- icon:"none"
- })
- return false;
- }
-
- if(data.posPrice.length<1){
- uni.showToast({
- title:this.$t('mend.qingsrwszd'),
- icon:"none"
- })
- return false;
- }
- if(data.image.length<1){
- uni.showToast({
- title:this.$t('mend.qingtianx'),
- icon:"none"
- })
- return false;
- }
- return true;
- },
- navbarsel(index){
- if(index!=5){
- return;
- }
- var that = this;
- uni.showModal({
- cancelText: that.$t('order.quxiao'), // 取消按钮的文字
- confirmText: that.$t('comp.queren'), // 确认按钮的文字
- title: that.$t('api.message'),
- content: that.$t('index.sanchudianp'),
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- that.delemendian();
- } else { //这里是点击了取消以后
- console.log('用户点击取消')
- }
-
- }
- })
- },
- delemendian(){
- api('delemendian',{
- id:this.id
- },
- r=>{
- console.log(r)
- if(r.data.code==200){
- uni.showToast({
- title:this.$t('index.sanchuchengg'),
- icon:"none",
- duration: 2500
- })
- setTimeout(() => {
- uni.navigateBack({
- delta: 2,
- });
- }, 2500);
- }
- else{
- uni.showToast({
- title:r.data.msg,
- icon:"none"
- })
- }
- },failc=>{
- uni.showToast({
- title:failc,
- icon:"none"
- })
-
- });
- },
- //营业时间====================
- getYingyeshijian(mid){//查询
- api('getHours',{
- mdId:mid,
- },res=>{
- console.log('getHours',res)
- if(res.data.code==200){
- this.yingyeTime=res.data.data;
- }
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- addYingyeshijian(times){//添加
- console.log(this.id)
- if(!this.id){
- return;
- }
- api('addHours',{
- mdId:this.id,
- startTime:times.startTime, //开始时间
- endTime:times.endTime //结束时间
- },res=>{
- console.log('addHours',res)
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- delYingyeshijian(id){//删除
- api('delHours',{
- id:id,
- },res=>{
- console.log('delHours',res)
- this.getYingyeshijian(this.id);
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- }
- }
- }
- </script>
- <style>
- .contentV{
- display: flex;
- width: 100%;
- justify-content: center;
- display: inline-block;
- }
- .yzmctV{
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- margin-top: 40rpx;
- }
- .noinputV{
- font-size: 30rpx;
- margin-left: 20rpx;
- width: 60%;
- height: 60rpx;
- line-height: 60rpx;
- border-radius: 20rpx;
- border: 2rpx solid darkgray;
- }
- .addrinputV{
- font-size: 26rpx;
- margin-left: 20rpx;
- width: 54%;
- height: 60rpx;
- line-height: 60rpx;
- border-radius: 20rpx;
- border: 2rpx solid darkgray;
- }
- .addrtext{
- margin-left: 20rpx;
- font-size: 26rpx;
- width: 60%;
- text-decoration:underline;
- }
- .yzmbt{
- font-size: 28rpx;
- width: 150rpx;
- }
- .xialakuang{
- margin-left: 20rpx;
- width: 60%;
- height: 60rpx;
- line-height: 60rpx;
- }
- .imagV{
- width: 80%;
- height: 20vh;
- background-color: antiquewhite;
- }
- .querenBt{
- margin-top: 30rpx;
- width: 80%;
- height: 60rpx;
- line-height: 60rpx;
- padding: 10rpx;
- border-radius: 20rpx;
- border: solid #40AE36;
- border-width: 0px 0px 6rpx 0px;
- text-align: center;
- justify-content: center;
- background-color: #40AE36;
- color: white;
- box-shadow: 0rpx 0rpx 10rpx 0rpx #40AE36;
- }
- .skuViewCt{
- display: flex;
- flex-direction: column;
- justify-content:center;
- margin-top: 10rpx;
- }
- .fwyzmbt{
- margin-left: 9%;
- font-size: 28rpx;
- }
- .contensbgg{
- display: flex;
- flex-direction: column;
- justify-content:flex-start;
- width: 80%;
- margin-left: 12%;
- }
- .youhuixinxi{
- margin: 10rpx;
- padding: 4rpx;
- font-size: 26rpx;
- line-height: 54rpx;
- height: 54rpx;
- border: 2rpx solid lightgray;
- border-radius: 8rpx;
- }
- .xz{
- border: 2rpx solid brown;
- color: crimson;
- }
- .textinput{
- margin-top: 10rpx;
- margin-bottom: 10rpx;
- padding-top: 10rpx;
- padding-bottom: 10rpx;
- width: 550rpx;
- border-radius: 6rpx;
- border: 1rpx solid darkgray;
- }
- .item_list{
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- }
- .item_content{
- width:180rpx;
- height:180rpx;
- margin: 10rpx;
- box-sizing: border-box;
- }
- .upimagV{
- width: 210rpx;
- height:210rpx;
- }
- .timetext{
- font-size: 30rpx;
- text-align: center;
- line-height: 60rpx;
- border: solid lavender;
- border-width: 0px 0px 1rpx 0px;
- }
- </style>
|