| | |
| | | export default { |
| | | |
| | | // httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | httpBaseUri: 'http://47.99.58.211/flower', |
| | | httpBaseUri: 'https://www.hmyxianhua.com/flower', |
| | | // httpBaseUri: 'http://47.99.58.211/flower', |
| | | |
| | | clientId: '', |
| | | secret: '', |
| | |
| | | </view> |
| | | <view class="m-t-12" @click="getNoticeMore"> |
| | | <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon |
| | | :scrollable="scrollable" :text="currentNotice.title||'暂无公共'" :key="currentNotice.id" /> |
| | | :scrollable="scrollable" :text="currentNotice.title||'暂无公告'" :key="currentNotice.id" /> |
| | | <span v-if="!currentNotice||!currentNotice.id"> </span> |
| | | </view> |
| | | <view class="item-container"> |
| | |
| | | icon: "none"
|
| | | });
|
| | | this.setTimer(); //调用定时器方法
|
| | | }else{
|
| | | this.getCodeText = "获取验证码" //发送验证码
|
| | | this.getCodeisWaiting = false;
|
| | | this.getCodeBtnColor = "#20613D";
|
| | | }
|
| | | // setTimeout(() => {
|
| | | // uni.showToast({
|
| | |
| | | }
|
| | | }
|
| | | if (this.loginType == 'code') {
|
| | | if (!that.tel) {
|
| | | if (!that.phoneNumber) {
|
| | | uni.showToast({
|
| | | title: '请输入手机号',
|
| | | icon: 'none'
|
| | |
| | | // }, 1000);
|
| | |
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: '登录失败!',
|
| | | icon: 'none'
|
| | | });
|
| | | // uni.showToast({
|
| | | // title: '登录失败!',
|
| | | // icon: 'none'
|
| | | // });
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | msg: '' |
| | | }) |
| | | } else { |
| | | console.log('res',res.data) |
| | | if (res.data.code == ('0')) { |
| | | resolve({ |
| | | data: res.data.data, |
| | | code: 0, |
| | | msg: '' |
| | | }) |
| | | } else if (res.data.code === '3000'||res.data.code === '30000') { |
| | | } else if (res.data.code === '3000'||res.data&&res.data.code&&res.data.code.startsWith('3000')) { |
| | | if (Array.isArray(res.data.data)) { |
| | | if (res.data.data.length > 0 && res.data.data[0] |
| | | .errorMessage) { |
| | | message.showToast(res.data.data[0].errorMessage) |
| | | .msg) { |
| | | message.showToast(res.data.data[0].msg) |
| | | } |
| | | } else if (res.data.data && res.data.data.errorMessage) { |
| | | message.showToast(res.data.data.errorMessage) |
| | | } else if (res.data && res.data.msg) { |
| | | message.showToast(res.data.msg) |
| | | } else if (res.data.data && typeof res.data.data === 'string') { |
| | | message.showToast(res.data.data) |
| | | } |
| | | reject({ |
| | | data: null, |
| | | code: parseInt(res.data.code), |
| | | msg: res.data.data |
| | | msg: res.data.data || res.data.msg |
| | | }) |
| | | } else if (res.data.code === '4000'||res.data.code === '40000') { |
| | | } else if (res.data.code === '4000'||res.data&&res.data.code&&res.data.code.startsWith('4000')) { |
| | | message.showToast('系统异常') |
| | | } else { |
| | | if (res.data.data && typeof res.data.data === 'string') { |
| | |
| | | // remoteip:'',//服务器ip |
| | | sign: { |
| | | 'enterprise': 0, |
| | | 'info':0, |
| | | 'flower':0, |
| | | }, |
| | | defaultaddress: {} |
| | | }, |
| | |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/partner' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | const resp = await http.request('post', '/api/login/partner' + ((data |
| | | .phoneNumber||data.tel) ? '/phone' : ''), { |
| | | data: { |
| | | username: data.username, |
| | | password: data.password, |
| | |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/supplier' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | const resp = await http.request('post', '/api/login/supplier' + ((data |
| | | .phoneNumber ||data.tel) ? '/phone' : ''), { |
| | | data: { |
| | | username: data.username, |
| | | username: (data.phoneNumber ||data.tel)?(data.phoneNumber || data.tel): data.username, |
| | | password: data.password, |
| | | tel: data.phoneNumber || data.tel, |
| | | smsCode: data.smsCode || '' |
| | |
| | | const resp = await http.request('post', '/api/login/customer' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | data: { |
| | | username: data.username, |
| | | username: (data.phoneNumber ||data.tel)?(data.phoneNumber || data.tel): data.username, |
| | | password: data.password, |
| | | tel: data.phoneNumber || data.tel, |
| | | smsCode: data.smsCode || '' |
| | |
| | | if (re.code == 2000 || re.code == 0) {
|
| | | this.$message.showToast('操作成功')
|
| | | //需要标记加一下
|
| | | // this.$store.dispatch('sign_add', 'application');
|
| | | this.$store.dispatch('sign_add', 'flower');
|
| | |
|
| | | this.backpage()
|
| | | }
|
| | |
| | | <view class="buttons"> |
| | | <view class="button" @click.stop="toDetail(item)">编辑</view> |
| | | |
| | | <view class="button" @click.stop="buttonStatus(item,'OFF')" |
| | | v-if="item.status=='UP'">下架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'UP')" |
| | | v-if="item.status=='OFF'||item.status=='FORCE_OFF'">上架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'off')" |
| | | v-if="item.status=='UP'||item.status=='up'">下架</view> |
| | | <view class="button" @click.stop="buttonStatus(item,'up')" |
| | | v-if="item.status=='OFF'||item.status=='off'||item.status=='FORCE_OFF'">上架</view> |
| | | <view class="button" @click.stop="openValue(item,'price')">价格</view> |
| | | <view class="button" @click.stop="openValue(item,'stock')">库存</view> |
| | | <view class="button" @click.stop="toDetailAdd(item)">复制</view> |
| | |
| | | inputplaceholder: '', |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | onShow(){ |
| | | if (this.sign['flower']) { |
| | | this.$store.dispatch('sign_clear', 'flower'); |
| | | this.refreshList() |
| | | } |
| | | }, |
| | | async onLoad(options) { |
| | | this.type = options.type || 'all' |
| | | var title = '' |
| | | //todo 根据type切换查询条件 |
| | |
| | | title: title |
| | | }) |
| | | } |
| | | await this.$store.dispatch('sign_clear', 'flower'); |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | |
| | | }) |
| | | }, |
| | | async buttonStatus(item, status) { |
| | | await this.$message.confirm(`确定${status==='OFF'?'下降':'上架'}此商品吗`) |
| | | await this.$message.confirm(`确定${status==='off'?'下降':'上架'}此商品吗`) |
| | | this.$message.showLoading() |
| | | this.$http.request('get', '/api/supplier/flower/list/' + status, { |
| | | params: { |
| | |
| | | if (res.code == 0) { |
| | | this.$message.showToast('操作成功') |
| | | item.status = status |
| | | item.statusStr = (status == 'OFF' ? '下架' : '上架') |
| | | item.statusStr = (status == 'off' ? '下架' : '上架') |
| | | } |
| | | }).finally(() => { |
| | | this.$message.hideLoading() |
| | |
| | | <view class="tj-container-p"> |
| | | <view class="tj-container flex"> |
| | | <view class="tj-each flex1"> |
| | | <view class="value">9</view> |
| | | <view class="value">0</view> |
| | | <view class="label">买家</view> |
| | | </view> |
| | | <view class="tj-each flex1"> |
| | |
| | | if (re.code == 2000 || re.code == 0) { |
| | | this.$message.showToast('操作成功') |
| | | //需要标记加一下 |
| | | this.$store.dispatch('sign_add', 'application'); |
| | | this.$store.dispatch('sign_add', 'info'); |
| | | this.$store.dispatch('getCurrentInfo') |
| | | |
| | | this.backpage() |
| | |
| | | } else { |
| | | this.dto[key] = '' |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | uploadIcon(key) { |
| | | const that = this |
| | |
| | | icon: "none"
|
| | | });
|
| | | this.setTimer(); //调用定时器方法
|
| | | }else{
|
| | | this.getCodeText = "获取验证码" //发送验证码
|
| | | this.getCodeisWaiting = false;
|
| | | this.getCodeBtnColor = "#20613D";
|
| | | }
|
| | | // setTimeout(() => {
|
| | | // //弹出提示框
|
| | |
| | | }, 1000);
|
| | |
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: '登录失败!',
|
| | | icon: 'none'
|
| | | });
|
| | | // uni.showToast({
|
| | | // title: '登录失败!',
|
| | | // icon: 'none'
|
| | | // });
|
| | | return;
|
| | | }
|
| | |
|