Commit ffdf1cc2 authored by 吴春's avatar 吴春

11

parent c970eed4
...@@ -14,12 +14,22 @@ ...@@ -14,12 +14,22 @@
v-if="canIUseGetUserProfile == false" v-if="canIUseGetUserProfile == false"
@getuserinfo="showLogin == true ? getoldUser() : ''" @getuserinfo="showLogin == true ? getoldUser() : ''"
></button> ></button>
<template v-else>
<button <button
:style="sureStyle" :style="sureStyle"
class="hotsopt" class="hotsopt"
v-if="canIUseGetUserProfile == true" v-if="AppConfig.TenantId!=18"
@tap="showLogin == true ? getUserProfile() : ''" @tap="showLogin == true ? getUserProfile() : ''"
></button> ></button>
<button v-else
:style="sureStyle"
class="hotsopt"
open-type="getPhoneNumber"
@getphonenumber="handleGetPhoneNumber"
></button>
</template>
<button :style="cancelStyle" class="hotsopt" @click="close"></button> <button :style="cancelStyle" class="hotsopt" @click="close"></button>
</u-popup> </u-popup>
<coupon <coupon
...@@ -50,9 +60,13 @@ export default { ...@@ -50,9 +60,13 @@ export default {
showLogin: true, showLogin: true,
canIUseGetUserProfile: false, canIUseGetUserProfile: false,
msg: {}, msg: {},
AppConfig:{
TenantId:0
},
}; };
}, },
created() { created() {
this.AppConfig.TenantId=this.GetMiniAppId().TenantId;
this.pageinfo = uni.getStorageSync("basedata") this.pageinfo = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").auth_page ? uni.getStorageSync("basedata").auth_page
: {}; : {};
...@@ -66,24 +80,44 @@ export default { ...@@ -66,24 +80,44 @@ export default {
this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`; this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
}, },
methods: { methods: {
//授权获取手机号码
handleGetPhoneNumber(e) {
var that=this;
if (e.detail.errMsg !== 'getPhoneNumber:ok') {
uni.showToast({
title: "需要授权手机号才能登录",
icon: "none",
});
return;
}
//获取手机号专用的 code
const phoneCode = e.detail.code;
//调用 wx.login 获取登录用的 code
wx.login({
success: (loginRes) => {
const loginCode = loginRes.code;
that.request2(
{
url: "/api/mall/GetWeChatOpenId",
data: {
Code: loginCode, // 用于换取 openid
phoneCode: phoneCode // 用于换取手机号
},
},
(res) => {
if (res.resultCode == 1) {
let resObj = {OpenId:res.data};
that.getLogin(resObj);
}
}
);
},
fail: (err) => {
console.log('wx.login 失败', err);
}
});
},
getoldUser() { getoldUser() {
//旧的 兼容电脑端
//4.27注释掉 给予新的提示不能在电脑端登录
// var that = this;
// uni.login({
// provider: 'weixin',
// success: function (loginRes) {
// console.log(loginRes.authResult);
// // 获取用户信息
// uni.getUserInfo({
// provider: 'weixin',
// success: function (infoRes) {
// console.log(infoRes,'infoRes')
// that.getUserInfo(infoRes)
// }
// });
// }
// });
uni.showToast({ uni.showToast({
title: "电脑端暂时不能获取用户信息,请转到手机端使用!", title: "电脑端暂时不能获取用户信息,请转到手机端使用!",
icon: "none", icon: "none",
...@@ -112,24 +146,6 @@ export default { ...@@ -112,24 +146,6 @@ export default {
console.log(err,'=====err'); console.log(err,'=====err');
}, },
}) })
// wx.getUserProfile({
// desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
// success: (info) => {
// console.log(info);
// this.msg = {
// Id: 0,
// AliasName: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// };
// that.getUserInfo(info);
// },
// fail: (err) => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
}, },
getUserInfo(info) { getUserInfo(info) {
var that = this; var that = this;
...@@ -239,7 +255,6 @@ export default { ...@@ -239,7 +255,6 @@ export default {
}, },
}, },
(res) => { (res) => {
console.log(186, EduSchoolId);
uni.hideLoading(); uni.hideLoading();
that.showLogin = true; //防止多次点击登录 that.showLogin = true; //防止多次点击登录
if (res.resultCode == 1) { if (res.resultCode == 1) {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
"quickapp" : {}, "quickapp" : {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxaeb077c07ed6f30d", "appid" : "wxbb033190e0ffa5db",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"minified" : false "minified" : false
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
<!-- 首店活动插件 --> <!-- 首店活动插件 -->
<tradeActivity v-if="d.id == 'tradeActivity'" :dataObj="d.data" :pagePaddingBottom="pagePaddingBottom" @refresh="refreshPage" <tradeActivity v-if="d.id == 'tradeActivity'" :dataObj="d.data" :pagePaddingBottom="pagePaddingBottom" @refresh="refreshPage"
ref="tradeActive"></tradeActivity> ref="tradeActive"></tradeActivity>
<!--首店首页数据插件-->
<tradeIndex v-if="d.id == 'tradeIndex'" :dataObj="d.data" @refresh="refreshPage"></tradeIndex>
</template> </template>
</view> </view>
</template> </template>
...@@ -157,6 +159,7 @@ ...@@ -157,6 +159,7 @@
import orderPopup from "@/components/coupons/orderPopup.vue"; //离线订单弹窗 import orderPopup from "@/components/coupons/orderPopup.vue"; //离线订单弹窗
import Pubu from "@/components/pubu/index.vue"; //瀑布流 import Pubu from "@/components/pubu/index.vue"; //瀑布流
import tradeActivity from "@/components/tradeActivity/index.vue"; //首店活动插件 import tradeActivity from "@/components/tradeActivity/index.vue"; //首店活动插件
import tradeIndex from "@/components/tradeActivity/tradeIndex.vue"; //首店首页数据
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
export default { export default {
data() { data() {
...@@ -241,6 +244,7 @@ ...@@ -241,6 +244,7 @@
orderPopup, orderPopup,
Pubu, Pubu,
tradeActivity, tradeActivity,
tradeIndex
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
......
...@@ -221,11 +221,11 @@ export default { ...@@ -221,11 +221,11 @@ export default {
nextSepName: "第2步", nextSepName: "第2步",
// type=1:输入框,2:照片 // type=1:输入框,2:照片
stepOneList: [ stepOneList: [
{ // {
name: "营业执照", // name: "营业执照",
tip: "(点击图片上传营业执照)", // tip: "(点击图片上传营业执照)",
type: 2, // type: 2,
}, // },
{ {
name: "企业名称", name: "企业名称",
text: "请输入企业名称", text: "请输入企业名称",
...@@ -233,16 +233,16 @@ export default { ...@@ -233,16 +233,16 @@ export default {
delIcon: false, delIcon: false,
type: 1, type: 1,
}, },
// {
// name: "统一社会信用代码",
// text: "输入18位社会信用代码",
// field: "UnifiedCode",
// delIcon: false,
// type: 1,
// },
{ {
name: "统一社会信用代码", name: "联系人",
text: "输入18位社会信用代码", text: "请输入联系人姓名",
field: "UnifiedCode",
delIcon: false,
type: 1,
},
{
name: "法人代表",
text: "请输入法人姓名",
field: "LegalPerson", field: "LegalPerson",
delIcon: false, delIcon: false,
type: 1, type: 1,
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
@custom="getList(1)" @custom="getList(1)"
></u-search> ></u-search>
</view> </view>
<view <!-- <view
style=" style="
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
style="flex: 1; width: 1px; margin-left: 15rpx" style="flex: 1; width: 1px; margin-left: 15rpx"
mode="widthFix" mode="widthFix"
></image> ></image>
</view> </view> -->
<u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty>
<scroll-view <scroll-view
v-else v-else
......
...@@ -3,7 +3,7 @@ export default { ...@@ -3,7 +3,7 @@ export default {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285" Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue.prototype.host2 = "https://mallApi.oytour.com" //电商接口 Vue.prototype.host2 = "https://mallApi.oytour.com" //电商接口
//Vue.prototype.host2 = "http://192.168.5.46:8200" Vue.prototype.host2 = "http://127.0.0.1:5000"
//Vue.prototype.host2 = "http://192.168.5.56:8029" //Vue.prototype.host2 = "http://192.168.5.56:8029"
// Vue.prototype.host3 = "https://jjeduapi.oytour.com" //进阶小课堂以前接口 // Vue.prototype.host3 = "https://jjeduapi.oytour.com" //进阶小课堂以前接口
Vue.prototype.UploadConfig = function() { //本地上传配置 Vue.prototype.UploadConfig = function() { //本地上传配置
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
// 获取小程序APPID // 获取小程序APPID
Vue.prototype.GetMiniAppId = function() { Vue.prototype.GetMiniAppId = function() {
let appObj = {}; let appObj = {};
let appType = 15; let appType = 7;
switch (appType) { switch (appType) {
case 1: //赞羊 case 1: //赞羊
appObj = { appObj = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment