''
liukangdong
2024-05-28 e47f3d8ef4d9c5d941f15ba5a24394b6eddd2d29
''
已添加1个文件
已修改5个文件
39 ■■■■ 文件已修改
h5/api/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/staff.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/visitor.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/auth/auth.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login/login.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/notice/notice.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/index.js
@@ -1,6 +1,7 @@
import { http } from '@/utils/service.js'
export * from '@/utils/config.js'
export * from './visitor'
export * from './staff'
// æŸ¥è¯¢å­—典值数据
export const getSystemDictData = (data) => {
h5/api/staff.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
import { http } from '@/utils/service.js'
// login
export const loginPost = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/member/accountLogin',
    data
  })
}
h5/api/visitor.js
@@ -1,5 +1,4 @@
import { http } from '@/utils/service.js'
import { methods } from 'uview-ui/libs/mixin/mixin'
// è®¿å®¢é¢„约详情
export const visitorSubDetail = (data) => {
h5/pages/auth/auth.vue
@@ -15,9 +15,9 @@
            const appID = 'wx4d7c10bdec51942b'
            const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
            // const scope = 'snsapi_userinfo'
            let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc')
      let uri = encodeURIComponent('https://xiaopiqiu2.natapp1.cc')
            let authURL =
              `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`
        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
            window.location.href = authURL
        }
    }
h5/pages/login/login.vue
@@ -7,7 +7,7 @@
      <view class="login_list_item">
        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
        <input
          v-model="form.idCard"
          v-model="form.account"
          maxlength="18"
          type="number"
          placeholder="账号"
@@ -32,14 +32,15 @@
</template>
<script>
import { loginPost } from '@/api'
export default {
  name: 'login',
  data() {
    return {
      form: {
        idCard: '',
        password: ''
        account: '',
        password: '',
      }
    }
  },
@@ -52,14 +53,25 @@
      console.log(e)
    },
    onLogin() {
      const { form } = this
      if (!form.account) return uni.showToast({
        title: '账号后不能为空',
        icon: 'none'
      })
      if (!form.password) return uni.showToast({
        title: '密码不能为空',
        icon: 'none'
      })
      const appID = 'wx4d7c10bdec51942b'
      const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
      // const scope = 'snsapi_userinfo'
      let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc')
      let uri = encodeURIComponent('https://xiaopiqiu2.natapp1.cc')
      let authURL =
        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`
      window.location.href = authURL
      loginPost(form).then(res => {
        console.log('res', res);
      })
    }
  }
}
h5/pages/notice/notice.vue
@@ -24,7 +24,7 @@
    }
  },
  onLoad() {
    // this.getInfo()
    this.getInfo()
  },
  methods: {
    getInfo() {