新增批发商检验判断
This commit is contained in:
parent
0061b65d63
commit
f39c51e806
|
@ -8,7 +8,7 @@ let env = "prod"
|
||||||
switch(env){
|
switch(env){
|
||||||
case 'prod': BASE_URL = 'https://erp.lihaink.cn';break;
|
case 'prod': BASE_URL = 'https://erp.lihaink.cn';break;
|
||||||
case 'test': BASE_URL = 'https://ceshi-erp.lihaink.cn';break;
|
case 'test': BASE_URL = 'https://ceshi-erp.lihaink.cn';break;
|
||||||
default: BASE_URL = 'http://192.168.1.15:8546';
|
default: BASE_URL = 'http://192.168.1.10:8546';
|
||||||
}
|
}
|
||||||
|
|
||||||
let HTTP_REQUEST_URL
|
let HTTP_REQUEST_URL
|
||||||
|
|
|
@ -45,6 +45,14 @@
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/code/code",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<web-view v-if="src" :src="src"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { onLoad } from "@dcloudio/uni-app"
|
||||||
|
|
||||||
|
let url = 'https://crmeb-test.shop.lihaink.cn/api/view?uid='; //地址
|
||||||
|
let uid = 9; // 用户id
|
||||||
|
let navTo = '_|_navTo=_pages_index_index' // 回跳页面地址 _pages_index_index 中/替换成_ 需要带上 _|_navTo 前缀
|
||||||
|
// let navTo = '_|_navTo=_pageQuota_quotation_detail' // 回跳页面地址 _pages_index_index 中/替换成_ 需要带上 _|_navTo 前缀
|
||||||
|
const src = ref('')
|
||||||
|
|
||||||
|
onLoad(options=>{
|
||||||
|
if(options.id) {
|
||||||
|
uid = options.id;
|
||||||
|
}
|
||||||
|
// url = url + uid + navTo;
|
||||||
|
url = url + uid;
|
||||||
|
// 公众号绑定
|
||||||
|
src.value = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe2428e8fe6767e45&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo&state=92efd21273559f62a614a3b49e2e3fcb&connect_redirect=1#wechat_redirect`
|
||||||
|
console.log(src.value);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -15,6 +15,10 @@
|
||||||
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
||||||
size="28"></up-icon>微信快捷登录</up-button>
|
size="28"></up-icon>微信快捷登录</up-button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="btn">
|
||||||
|
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
||||||
|
size="28"></up-icon>公众号授权</up-button>
|
||||||
|
</view> -->
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<up-button color="#ECFFEE" @click="showWeixin=false" size="large"><text
|
<up-button color="#ECFFEE" @click="showWeixin=false" size="large"><text
|
||||||
style="color: #20B128;">使用短信验证登录</text></up-button>
|
style="color: #20B128;">使用短信验证登录</text></up-button>
|
||||||
|
@ -61,6 +65,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<bindPhone :show="showBind" @close="showBind = false" @change="getPhoneNumber" />
|
<bindPhone :show="showBind" @close="showBind = false" @change="getPhoneNumber" />
|
||||||
|
<modal :show="showOfficial" @close="showOfficial = false" @change="officialCode()" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -70,6 +75,7 @@
|
||||||
import { userLoginApi, userLoginWeixinApi, getMobileByMnpApi } from "@/api/user.js";
|
import { userLoginApi, userLoginWeixinApi, getMobileByMnpApi } from "@/api/user.js";
|
||||||
import useUserStore from "@/store/user.js"
|
import useUserStore from "@/store/user.js"
|
||||||
import bindPhone from "@/components/bindPhone.vue"
|
import bindPhone from "@/components/bindPhone.vue"
|
||||||
|
import modal from "@/components/modal.vue"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +83,26 @@
|
||||||
if (!userStore.userInfo.supplier) uni.reLaunch({
|
if (!userStore.userInfo.supplier) uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
else uni.$u.toast('功能开发中')
|
else if(!userStore.userInfo.supplier.openid) {
|
||||||
|
return showOfficial.value = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pageQuota/quotation/detail'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 微信公众号绑定
|
||||||
|
const officialCode = ()=>{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/code/code',
|
||||||
|
success: () => {
|
||||||
|
let user = userStore.userInfo;
|
||||||
|
user.supplier ? user.supplier.openid = 1 : user.supplier = {};
|
||||||
|
userStore.setUserInfo(user);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const userStore = useUserStore(); //使用pinia进行状态管理
|
const userStore = useUserStore(); //使用pinia进行状态管理
|
||||||
|
@ -118,9 +143,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showOfficial = ref(false);
|
||||||
const showBind = ref(false); //是否显示绑定手机号弹窗
|
const showBind = ref(false); //是否显示绑定手机号弹窗
|
||||||
const getPhoneNumber = (e) => {
|
const getPhoneNumber = (e) => {
|
||||||
console.log("===", e);
|
|
||||||
if (e.detail?.errMsg == 'getPhoneNumber:ok') {
|
if (e.detail?.errMsg == 'getPhoneNumber:ok') {
|
||||||
getMobileByMnpApi({
|
getMobileByMnpApi({
|
||||||
code: e.detail.code
|
code: e.detail.code
|
||||||
|
|
|
@ -24,7 +24,7 @@ const useUserStore = defineStore("user", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
token.value = "1df48a21913ef4eba488983e7b84c056"
|
// token.value = "6f85cbaee3341c3f2d7bb7080663ce68"
|
||||||
// token.value = "95b24dd6d2dda836fe07854b08ba0944"
|
// token.value = "95b24dd6d2dda836fe07854b08ba0944"
|
||||||
userInfo.value = {
|
userInfo.value = {
|
||||||
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
|
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
|
||||||
|
|
Loading…
Reference in New Issue