Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import OrderHeader from '../../common/header'
import { Tab, Tabs } from 'vant';
import { mapState } from 'vuex'
import { mapMutations} from "vuex";
import { Button } from 'vant';
export default{
data(){
return{
activeOrder:0
}
},
components:{
OrderHeader,
[Tab.name]:Tab,
[Tabs.name]:Tabs,
[Button.name]:Button
},
computed:{
...mapState([
"ordersList"
])
},
created(){
console.log(this.ordersList);
},
mounted:function(){
},
methods:{
...mapMutations(["delOrders"]),
checkOrder(order){
this.$store.dispatch('setCurrentorder', order);
this.$router.push({ path: "orderDetail"});
'example',
'eye-open',
'eye',
'form',
'link',
'nested',
'password',
'table',
'tree',
'user',
'404'
]
}
},
components: {
[Button.name]: Button,
[Tabbar.name]: Tabbar,
[TabbarItem.name]: TabbarItem,
[Swipe.name]: Swipe,
[SwipeItem.name]: SwipeItem,
FooterTabbar
},
computed: {
...mapState({
loading: state => state['@@loading'].effects['test/onePlusAsync']
})
},
methods: {
add () {
this.onePlusAsync(this.value)
},
addOne () {
toggleMsg: '验证码登录'
}
}
return {
icon: 'eye',
toggleMsg: '密码登录'
}
},
passwordIcon: function () {
return this.passwordType === 'password' ? 'closed-eye' : 'eye'
}
},
components: {
[Field.name]: Field,
[Icon.name]: Icon,
[Button.name]: Button,
VerifyCodeBtn
}
}
<style lang="scss"></style>
}
]
};
},
data() {
return {
userAccount: "guest",
userPasswd: "guest"
};
},
components: {
[NavBar.name]: NavBar,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Toast.name]: Toast,
[Button.name]: Button,
[Field.name]: Field
},
mounted() {},
methods: {
async onLogin() {
const userAccountEmpty = strategies.isNonEmpty(this.userAccount, this.$t("m.strategies.name"));
const userPasswdLength = strategies.isNonEmpty(this.userPasswd, 4, this.$t("m.strategies.pwdLenth"));
const result = userAccountEmpty || userPasswdLength;
if (result) {
Toast({
message: result,
position: "bottom"
});
} else {
let res = await apiLogin(this.userAccount, this.userPasswd);
if (res.data.code == 0) {
this.mobile = res.data.data.mobile;
})
},
loginOut() {
authLogout().then(res => {
removeLocalStorage('Authorization')
removeLocalStorage('avatar')
removeLocalStorage('nickName')
this.$router.push({ name: 'home' });
});
}
},
components: {
[Button.name]: Button,
[Uploader.name]: Uploader,
[Picker.name]: Picker,
[Popup.name]: Popup
}
};
let orderId = this.$route.query.orderId;
orderDetail({ orderId: orderId }).then(res => {
var data = res.data.data;
this.orderInfo = data.orderInfo;
this.orderGoods = data.orderGoods;
this.handleOption = data.orderInfo.handleOption;
this.expressInfo = data.expressInfo;
});
}
},
components: {
[Dialog.name]: Dialog,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[Button.name]: Button,
[SubmitBar.name]: SubmitBar,
[Card.name]: Card,
[Field.name]: Field
}
};