|
@@ -7,52 +7,60 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import _ from '@/config'
|
|
|
+import _ from '@/config';
|
|
|
|
|
|
- export default {
|
|
|
- name: "isreg",
|
|
|
- created() {
|
|
|
- let self = this;
|
|
|
- let storeId = '';
|
|
|
- let href = location.href;
|
|
|
- if (href.indexOf('storeId') > -1) {
|
|
|
- storeId = 1;
|
|
|
- _.$http('/j/JGEmpolyer/Register', {
|
|
|
+export default {
|
|
|
+ name: 'isreg',
|
|
|
+ created() {
|
|
|
+ let self = this;
|
|
|
+ let storeId = '';
|
|
|
+ let href = location.href;
|
|
|
+ if (href.indexOf('storeId') > -1) {
|
|
|
+ storeId = Number.parseInt(href.split('storeId=')[1]);
|
|
|
+ _.$http(
|
|
|
+ '/j/JGEmpolyer/Register',
|
|
|
+ {
|
|
|
userId: _.user_id,
|
|
|
storeId: storeId,
|
|
|
- isReg: true
|
|
|
- }, res => {
|
|
|
+ isReg: true,
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ console.log(res)
|
|
|
if (res.data.message == '未注册') {
|
|
|
- self.$router.push({path: '/houseKeeping/login/', query: {storeId: storeId}});
|
|
|
+ self.$router.push({
|
|
|
+ path: '/houseKeeping/login/',
|
|
|
+ query: { storeId: storeId },
|
|
|
+ });
|
|
|
} else {
|
|
|
- self.$router.push({path: '/houseKeeping/info/'});
|
|
|
+ self.$router.push({ path: '/houseKeeping/info/' });
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- weui.alert('请重新扫二维码,进入本页面', function () {
|
|
|
- // self.$router.push({path: '/managementList'});
|
|
|
- // wx.closeWindow();
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {}
|
|
|
- }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ weui.alert('请重新扫二维码,进入本页面', function() {
|
|
|
+ // self.$router.push({path: '/managementList'});
|
|
|
+ // wx.closeWindow();
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {},
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .isreg {
|
|
|
- padding: 50% 0;
|
|
|
- text-align: center;
|
|
|
- color: #e64340;
|
|
|
- font-size: 1.5rem;
|
|
|
- font-weight: bold;
|
|
|
- text-shadow: 1px 1px 1px #747171;
|
|
|
- }
|
|
|
+.isreg {
|
|
|
+ padding: 50% 0;
|
|
|
+ text-align: center;
|
|
|
+ color: #e64340;
|
|
|
+ font-size: 1.5rem;
|
|
|
+ font-weight: bold;
|
|
|
+ text-shadow: 1px 1px 1px #747171;
|
|
|
+}
|
|
|
|
|
|
- @media (max-width: 320px) {
|
|
|
- .isreg {
|
|
|
- font-size: 1.2rem;
|
|
|
- }
|
|
|
+@media (max-width: 320px) {
|
|
|
+ .isreg {
|
|
|
+ font-size: 1.2rem;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|