wangfukang 3 years ago
parent
commit
01e70becc6
  1. 142
      pages/billing/addUser.vue
  2. 2
      pages/billing/changeGoods1.vue
  3. 16
      pages/index/addHangOrder.vue
  4. 8
      pages/index/dataStatistics.vue
  5. 14
      pages/index/index.vue
  6. 5
      pages/index/orderDetail.vue
  7. 26
      pages/index/peopleList.vue
  8. 14
      pages/inventory/addinventory.vue
  9. 2
      pages/inventory/changeGoods1.vue
  10. 34
      pages/inventory/goodsList1.vue
  11. 2
      pages/inventory/inventoryDetail.vue
  12. 15
      pages/login/login.vue

142
pages/billing/addUser.vue

@ -31,6 +31,9 @@
</template> </template>
<script> <script>
import {
getArea
} from '@/utils/global.js'
import { import {
mapState mapState
} from 'vuex'; } from 'vuex';
@ -41,8 +44,8 @@
show: false, show: false,
delShow: false, delShow: false,
addressObj: {}, addressObj: {},
type:'', type: '',
popleType:'', popleType: '',
formData: { formData: {
consigneeMobile: '', consigneeMobile: '',
consigneeName: '', consigneeName: '',
@ -64,10 +67,9 @@
rules: { rules: {
consigneeName: { consigneeName: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '请输入姓名', errorMessage: '请输入姓名',
} }]
]
}, },
consigneeMobile: { consigneeMobile: {
rules: [{ rules: [{
@ -103,7 +105,7 @@
}, },
onLoad(option) { onLoad(option) {
this.popleType = option.popleType this.popleType = option.popleType
this.type=option.type this.type = option.type
let data = JSON.parse(option.data) let data = JSON.parse(option.data)
if (option.type = "edit") { if (option.type = "edit") {
this.formData.address1 = data.province + data.city + data.area this.formData.address1 = data.province + data.city + data.area
@ -122,7 +124,7 @@
}, },
delItemModal() { delItemModal() {
this.delShow = false; this.delShow = false;
if(this.popleType=="khName"){ if (this.popleType == "khName") {
this.tui.request("/app/customer/delById", "post", { this.tui.request("/app/customer/delById", "post", {
id: this.formData.id, id: this.formData.id,
}, false, true).then((res) => { }, false, true).then((res) => {
@ -139,7 +141,7 @@
}) })
} }
}) })
}else{ } else {
this.tui.request("/app/supplier/delByIds", "post", { this.tui.request("/app/supplier/delByIds", "post", {
ids: this.formData.id, ids: this.formData.id,
}, false, true).then((res) => { }, false, true).then((res) => {
@ -162,41 +164,70 @@
nameBlur() { nameBlur() {
this.formData.username = this.formData.phone; this.formData.username = this.formData.phone;
}, },
openPicker() { authVerification() {
this.show = true uni.getSetting({
success: (res) => {
if (res.authSetting['scope.userLocation']) {
/* 用户授权成功时走这里 */
this.openPicker()
} else if (res.authSetting['scope.userLocation'] === undefined) {
/* 用户未授权时走这里 */
console.log('没有授权')
this.handleOpenSetting()
} else {
/* 用户拒绝了授权后走这里 */
console.log('拒绝了授权 false')
this.handleOpenSetting()
}
},
})
}, },
handleOpenSetting() {
onhideShow() { wx.openSetting({
this.show = false success: (res) => {
console.log('定位 openSetting', res)
if (res.authSetting["scope.userLocation"]) {
this.openPicker()
}
}
})
}, },
//选中省市区 openPicker() {
onsetCity(e) { let that = this;
let data = e.detail.target.dataset; uni.chooseLocation({
let address = data.province + data.city + data.area; success: function(res) {
this.show = false if(res.name != ''){
this.formData.address1 = address; let aaa = getArea(res.address)
this.addressObj = { that.formData.province = aaa.province
province: data.province, that.formData.city = aaa.city
city: data.city, that.formData.area = aaa.country
area: data.area, that.formData.address = aaa.address + '-' + res.name
} that.formData.address1 = aaa.province + aaa.city + aaa.country
}else{
that.tui.toast("微信地址选择器调用失败,请重新选择!")
}
},
fail: function(res) {
console.log(res)
}
});
}, },
// 触发提交表单 // 触发提交表单
submit() { submit() {
let that = this; let that = this;
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
if(this.popleType == 'khName'){ if (this.popleType == 'khName') {
if(that.type=='edit'){ if (that.type == 'edit') {
that.tui.request("/app/customer/edit", "post", { that.tui.request("/app/customer/edit", "post", {
name:this.formData.consigneeName, name: this.formData.consigneeName,
phone:this.formData.consigneeMobile, phone: this.formData.consigneeMobile,
address:this.formData.address, address: this.formData.address,
province:this.addressObj.province, province: this.formData.province,
city:this.addressObj.city, city: this.formData.city,
area:this.addressObj.area, area: this.formData.area,
id:this.formData.id, id: this.formData.id,
userName:this.formData.consigneeMobile userName: this.formData.consigneeMobile
}, false,true).then((res) => { }, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: "添加成功", title: "添加成功",
@ -215,16 +246,16 @@
}) })
} }
}) })
}else{ } else {
that.tui.request("/app/customer/save", "post", { that.tui.request("/app/customer/save", "post", {
name:this.formData.consigneeName, name: this.formData.consigneeName,
phone:this.formData.consigneeMobile, phone: this.formData.consigneeMobile,
address:this.formData.address, address: this.formData.address,
province:this.addressObj.province, province: this.formData.province,
city:this.addressObj.city, city: this.formData.city,
area:this.addressObj.area, area: this.formData.area,
userName:this.formData.consigneeMobile userName: this.formData.consigneeMobile
}, false,true).then((res) => { }, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: "添加成功", title: "添加成功",
@ -245,11 +276,8 @@
}) })
} }
}else{ } else {
if(that.type=='edit'){ if (that.type == 'edit') {
this.formData.city = this.addressObj.city
this.formData.area = this.addressObj.area
this.formData.province = this.addressObj.province
that.tui.request("/app/supplier/edit", "post", this.formData, false, that.tui.request("/app/supplier/edit", "post", this.formData, false,
true).then((res) => { true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -265,8 +293,8 @@
}) })
} }
}) })
}else{ } else {
that.tui.request("/app/supplier/save", "post", Object.assign(that.addressObj, res), false, that.tui.request("/app/supplier/save", "post", this.formData, false,
true).then((res) => { true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
@ -274,7 +302,7 @@
icon: 'none' icon: 'none'
}) })
let pages = let pages =
getCurrentPages(); getCurrentPages();
let prevPage = pages[pages.length - 2]; let prevPage = pages[pages.length - 2];
prevPage.$vm.popleType = 'gysName' prevPage.$vm.popleType = 'gysName'
uni.navigateBack({ uni.navigateBack({
@ -289,17 +317,17 @@
}) })
} }
} }
}).catch(err => { }).catch(err => {})
})
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.cc_area_view{ .cc_area_view {
z-index: 997 !important; z-index: 997 !important;
} }
.formBox { .formBox {
margin: 20rpx; margin: 20rpx;
padding: 20rpx; padding: 20rpx;
@ -323,7 +351,7 @@
padding: 0 20rpx; padding: 0 20rpx;
.tui-btn-mr { .tui-btn-mr {
width:130rpx; width: 130rpx;
height: 60rpx; height: 60rpx;
background: #088FEB; background: #088FEB;
color: #fff; color: #fff;

2
pages/billing/changeGoods1.vue

@ -25,7 +25,7 @@
<view class="box-right-num">{{item.productSn}}</view> <view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box" v-if="storageType== 0"> <view class="price-box" v-if="storageType== 0">
<text>{{item.purchasePrice}}</text> <text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
<view class="price-box"> <view class="price-box">

16
pages/index/addHangOrder.vue

@ -316,14 +316,20 @@
scanCodeAdd(item) { scanCodeAdd(item) {
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
this.productId = res.result
this.hangId = item.id this.hangId = item.id
if (item.saleDetailDTOList) { let shopId = res.result.split(',')[1]
for (let i = 0; i < item.saleDetailDTOList.length; i++) { if(shopId == uni.getStorageSync('shopId')){
this.carList.push(item.saleDetailDTOList[i]) this.productId = res.result.split(',')[0]
this.toggle('bottom', res.result.split(',')[0]);
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
this.carList.push(item.saleDetailDTOList[i])
}
} }
this.toggle('bottom', res.result);
}else{
this.tui.toast('您的店铺中暂无该商品!')
} }
this.toggle('bottom', res.result);
}, },
fail: (res) => { fail: (res) => {

8
pages/index/dataStatistics.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" /> <uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" @change="searchList" />
<view class="IndexContent"> <view class="IndexContent">
<view class="contentPadding"> <view class="contentPadding">
<u-grid :col="2"> <u-grid :col="2">
@ -107,7 +107,11 @@
let end = year + '-' + month + '-' + da //当天 let end = year + '-' + month + '-' + da //当天
let beg = year + '-' + month + '-01' //当月第一天 let beg = year + '-' + month + '-01' //当月第一天
this.range = [beg,end] this.range = [beg,end]
} },
searchList() {
this.priceList = [];
this.getList()
},
} }
} }
</script> </script>

14
pages/index/index.vue

@ -221,12 +221,13 @@
this.getSaleInfo() this.getSaleInfo()
}, },
onLoad() { onLoad() {
if(uni.getStorageSync('publicize')){ //宣传页
// if(uni.getStorageSync('publicize')){
}else{ // }else{
uni.setStorageSync("publicize", true) // uni.setStorageSync("publicize", true)
this.$refs.publicizepopup.open('center') // this.$refs.publicizepopup.open('center')
} // }
}, },
onTabItemTap(e){ onTabItemTap(e){
@ -298,7 +299,8 @@
that.tui.request("/oauth2/logout", "POST", {}, false, false).then((res) => { that.tui.request("/oauth2/logout", "POST", {}, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.tui.toast("退出登录成功") that.tui.toast("退出登录成功")
uni.clearStorage(); // uni.clearStorage();
uni.removeStorage({key: 'hiver_token'});
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login' url: '/pages/login/login'
}) })

5
pages/index/orderDetail.vue

@ -247,7 +247,7 @@
</uni-popup> </uni-popup>
<!-- 退货确认输入框 --> <!-- 退货确认输入框 -->
<uni-popup ref="returnDialog" type="dialog"> <uni-popup ref="returnDialog" type="dialog">
<uni-popup-dialog ref="returnClose" v-model="returnAmount" mode="input" title="请再次确认退货金额" <uni-popup-dialog ref="returnClose" mode="input" title="请再次确认退货金额"
placeholder="请输入退货金额" @confirm="sureReturn"></uni-popup-dialog> placeholder="请输入退货金额" @confirm="sureReturn"></uni-popup-dialog>
</uni-popup> </uni-popup>
</view> </view>
@ -650,7 +650,8 @@
// } // }
if (this.isReturn) { if (this.isReturn) {
this.returnAmount = this.sAmout // this.returnAmount = this.sAmout
this.$refs.returnClose.val = this.returnAmount
this.$refs.returnDialog.open() this.$refs.returnDialog.open()
// this.sureReturn() // this.sureReturn()
} else { } else {

26
pages/index/peopleList.vue

@ -8,7 +8,7 @@
<view class="" v-if="popleType== 'khName' || popleType== 'gysName'" @tap=""> <view class="" v-if="popleType== 'khName' || popleType== 'gysName'" @tap="">
<!-- 供应商、客户走这一套 --> <!-- 供应商、客户走这一套 -->
<view> <view>
<button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">新增人员</button> <button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">{{popleType=='khName'?'新增客户':'新增供应商'}}</button>
</view> </view>
<view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)" <view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)"
style="display: flex;flex-direction: column;height: auto;padding-bottom: 20rpx;"> style="display: flex;flex-direction: column;height: auto;padding-bottom: 20rpx;">
@ -22,7 +22,7 @@
</view> </view>
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;"> <view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;">
<text>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text> <text>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text>
<text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text> <text style="font-size: 26rpx;color:#747474;height: auto;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text>
</view> </view>
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 25rpx;"> <view v-if="item.name != '散客'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 25rpx;">
编辑 编辑
@ -139,6 +139,15 @@
if(options.khName){ if(options.khName){
this.khName = JSON.parse(options.khName) || '' this.khName = JSON.parse(options.khName) || ''
} }
if(options.popleType == 'khName'){
uni.setNavigationBarTitle({
title: '客户列表'
});
}else if(options.popleType == 'gysName'){
uni.setNavigationBarTitle({
title: '供应商列表'
});
}
if (options.popleType == 'khName' || options.popleType == 'gysName') { //供应商或者客户 if (options.popleType == 'khName' || options.popleType == 'gysName') { //供应商或者客户
this.khOrGysList(); this.khOrGysList();
} else if (options.popleType == 'wlName' || options.popleType == 'kdName' || options.popleType == 'fcName' || options.popleType == 'dbName') { //物流快递 } else if (options.popleType == 'wlName' || options.popleType == 'kdName' || options.popleType == 'fcName' || options.popleType == 'dbName') { //物流快递
@ -322,15 +331,18 @@
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
background: #fff; background: #fff;
font-size: 32rpx; font-size: 32rpx;
margin-top: 20rpx; margin: 20rpx auto 0;
width: 95%;
padding-left: 10rpx;
position: relative; position: relative;
} }
.name-tel { .name-tel {
width: 70%; width: 75%;
height: 75rpx; display: flex;
line-height: 75rpx; flex-direction: column;
padding-left: 40rpx; height: auto;
font-size: 15px;
} }
.name-edit{ .name-edit{
width: 120rpx; width: 120rpx;

14
pages/inventory/addinventory.vue

@ -284,11 +284,21 @@
this.storageType = uni.getStorageSync('type') this.storageType = uni.getStorageSync('type')
}, },
methods: { methods: {
//扫一扫功能
scanCodeAdd() { scanCodeAdd() {
uni.scanCode({ uni.scanCode({
// scanType: ['barCode'],
onlyFromCamera: true,
success: (res) => { success: (res) => {
this.productId = res.result // this.productId = res.result
this.toggle('bottom', res.result); // this.toggle('bottom', res.result);
let shopId = res.result.split(',')[1]
if(shopId == uni.getStorageSync('shopId')){
this.productId = res.result.split(',')[0]
this.toggle('bottom', res.result.split(',')[0]);
}else{
this.tui.toast('您的店铺中暂无该商品!')
}
}, },
fail: (res) => { fail: (res) => {
uni.showToast({ uni.showToast({

2
pages/inventory/changeGoods1.vue

@ -27,7 +27,7 @@
<view class="box-right-num">{{item.productSn}}</view> <view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price"> <view class="box-right-price">
<view class="price-box" v-if="storageType == 0"> <view class="price-box" v-if="storageType == 0">
<text>{{item.purchasePrice == null ?'待入库':item.purchasePrice}}</text> <text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text> <text>采购价</text>
</view> </view>
<view class="price-box"> <view class="price-box">

34
pages/inventory/goodsList1.vue

@ -199,7 +199,7 @@
<view class="content-list" v-if="radioType == '4'"> <view class="content-list" v-if="radioType == '4'">
<view class="list-name" style="width:150rpx;padding-left:0;">选择车号</view> <view class="list-name" style="width:150rpx;padding-left:0;">选择车号</view>
<view class="list-val"> <view class="list-val">
<input type="text" placeholder="请选择" disabled :value="wlName.shippingMethod" <input type="text" placeholder="请选择" disabled :value="wlName.companyName"
style="border-bottom: 1px solid #fff;text-align: center;" style="border-bottom: 1px solid #fff;text-align: center;"
@tap.stop="goPopleList('fcName')"> @tap.stop="goPopleList('fcName')">
<uni-icons type="right" size="16" <uni-icons type="right" size="16"
@ -209,7 +209,7 @@
<view class="content-list" v-if="radioType == '5'"> <view class="content-list" v-if="radioType == '5'">
<view class="list-name" style="width:150rpx;padding-left:0;">选择车号</view> <view class="list-name" style="width:150rpx;padding-left:0;">选择车号</view>
<view class="list-val"> <view class="list-val">
<input type="text" placeholder="请选择" disabled :value="wlName.shippingMethod" <input type="text" placeholder="请选择" disabled :value="wlName.companyName"
style="border-bottom: 1px solid #fff;text-align: center;" style="border-bottom: 1px solid #fff;text-align: center;"
@tap.stop="goPopleList('dbName')"> @tap.stop="goPopleList('dbName')">
<uni-icons type="right" size="16" <uni-icons type="right" size="16"
@ -454,6 +454,7 @@
multiple:1, multiple:1,
productId:'', productId:'',
productNum:0, productNum:0,
afterPrice:0 //第二次选择商品的时候,先计算这个价格,实收金额= 已经存在的实收金额 + afterPrice
} }
}, },
components: { components: {
@ -466,6 +467,7 @@
this.wlName = JSON.parse(JSON.stringify(this.wlName)) this.wlName = JSON.parse(JSON.stringify(this.wlName))
this.kdyName = JSON.parse(JSON.stringify(this.kdyName)) this.kdyName = JSON.parse(JSON.stringify(this.kdyName))
this.lbgName = JSON.parse(JSON.stringify(this.lbgName)) this.lbgName = JSON.parse(JSON.stringify(this.lbgName))
console.log('商品',this.carList1)
if (uni.getStorageSync('carList1') != '') { if (uni.getStorageSync('carList1') != '') {
this.carList.clear() this.carList.clear()
this.carList1 = JSON.parse(uni.getStorageSync('carList1')) this.carList1 = JSON.parse(uni.getStorageSync('carList1'))
@ -487,6 +489,15 @@
this.saleId = '' this.saleId = ''
} }
for (let i = 0; i < this.carList1.length; i++) { for (let i = 0; i < this.carList1.length; i++) {
// if(that.priceType == 0){ //零售
// this.afterPrice += this.carList1[i].lsprice
// }else if(that.priceType == 1){ //批发
// this.afterPrice += this.carList1[i].wholesalePrice
// }
// if (that.discountType == 1) { //整体折扣
// this.afterPrice = this.afterPrice * 10000 * that.discountNum / 10 / 10000
// }
if(this.carList1[i].saleDetailQueryDTO){ if(this.carList1[i].saleDetailQueryDTO){
if (this.carList.size == 0) { //当前页没有数据 if (this.carList.size == 0) { //当前页没有数据
@ -716,9 +727,18 @@
scanCodeAdd() { scanCodeAdd() {
uni.setStorageSync('saoma','1') uni.setStorageSync('saoma','1')
uni.scanCode({ uni.scanCode({
// scanType: ['barCode'],
onlyFromCamera: true,
success: (res) => { success: (res) => {
this.productId = res.result // this.productId = res.result
this.toggle('bottom', res.result); // this.toggle('bottom', res.result);
let shopId = res.result.split(',')[1]
if(shopId == uni.getStorageSync('shopId')){
this.productId = res.result.split(',')[0]
this.toggle('bottom', res.result.split(',')[0]);
}else{
this.tui.toast('您的店铺中暂无该商品!')
}
}, },
fail: (res) => { fail: (res) => {
uni.showToast({ uni.showToast({
@ -1339,11 +1359,9 @@
that.shouldPay = that.shouldPay + value.price that.shouldPay = that.shouldPay + value.price
that.totalAmount = that.totalAmount + value.productCount that.totalAmount = that.totalAmount + value.productCount
}) })
if(this.relPrice == ''){ this.relPrice = this.shouldPay
this.relPrice = this.shouldPay
}
that.noPay = this.relPrice - this.priceOk that.noPay = this.relPrice - (this.priceOk==''? 0 : this.priceOk)
}, },
//修改已选规格的数量 //修改已选规格的数量
GoodsNumChange(e, index, index1) { GoodsNumChange(e, index, index1) {

2
pages/inventory/inventoryDetail.vue

@ -139,7 +139,7 @@
strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '供应商:'+this.dataList.supplierName) strCmd += blesdk.addCPCLText('0', '130', '24', '0', 0, '供应商:'+this.dataList.supplierName)
strCmd += blesdk.addCPCLText('0', '180', '24', '0', 0, '批发价:'+this.dataList.wholesalePrice) strCmd += blesdk.addCPCLText('0', '180', '24', '0', 0, '批发价:'+this.dataList.wholesalePrice)
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+this.dataList.price) strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+this.dataList.price)
strCmd += blesdk.addCPCLQRCode(260, 170, 'H', '1', 6, this.dataList.id) //二维码 strCmd += blesdk.addCPCLQRCode(200, 140, 'H', '1', 6, [this.dataList.id,uni.getStorageSync('shopId')]) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中 strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
this.bufferData = strCmd; this.bufferData = strCmd;

15
pages/login/login.vue

@ -109,8 +109,8 @@
computed: mapState(['type']), computed: mapState(['type']),
onLoad() { onLoad() {
this.getCaptchaImg(); this.getCaptchaImg();
// this.username = uni.getStorageSync('username') this.username = uni.getStorageSync('username')
// this.password = uni.getStorageSync('password') this.password = uni.getStorageSync('password')
}, },
methods: { methods: {
...mapMutations(['login']), ...mapMutations(['login']),
@ -188,6 +188,8 @@
uni.setStorageSync("wayValue", this.wayValue) uni.setStorageSync("wayValue", this.wayValue)
uni.setStorageSync("nickname", res.result.user.nickname) uni.setStorageSync("nickname", res.result.user.nickname)
uni.setStorageSync("id", res.result.user.id) uni.setStorageSync("id", res.result.user.id)
uni.setStorageSync('username',this.username)
uni.setStorageSync('password',this.password)
if(this.wayValue == 2){ //下游客户登录 if(this.wayValue == 2){ //下游客户登录
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
@ -199,14 +201,7 @@
this.shopList = res.result.shopList; this.shopList = res.result.shopList;
this.toggle("center"); this.toggle("center");
}else{ }else{
uni.setStorageSync('type',res.result.shopList[0].type)
this.checkShop(res.result.shopList[0]) this.checkShop(res.result.shopList[0])
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
})
}, 200)
this.tui.toast('登录成功', 2000, true)
} }
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
@ -225,8 +220,6 @@
deviceId:res1.deviceId deviceId:res1.deviceId
}, false, true).then((res) => { }, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// uni.setStorageSync('username',this.username)
// uni.setStorageSync('password',this.password)
uni.setStorageSync('type',item.type) uni.setStorageSync('type',item.type)
uni.setStorageSync('shopId',item.shopId) uni.setStorageSync('shopId',item.shopId)
uni.setStorageSync('shopName',item.shopName) uni.setStorageSync('shopName',item.shopName)

Loading…
Cancel
Save