Commit ffdf1cc2 authored by 吴春's avatar 吴春

11

parent c970eed4
......@@ -14,12 +14,22 @@
v-if="canIUseGetUserProfile == false"
@getuserinfo="showLogin == true ? getoldUser() : ''"
></button>
<button
:style="sureStyle"
class="hotsopt"
v-if="canIUseGetUserProfile == true"
@tap="showLogin == true ? getUserProfile() : ''"
></button>
<template v-else>
<button
:style="sureStyle"
class="hotsopt"
v-if="AppConfig.TenantId!=18"
@tap="showLogin == true ? getUserProfile() : ''"
></button>
<button v-else
:style="sureStyle"
class="hotsopt"
open-type="getPhoneNumber"
@getphonenumber="handleGetPhoneNumber"
></button>
</template>
<button :style="cancelStyle" class="hotsopt" @click="close"></button>
</u-popup>
<coupon
......@@ -50,9 +60,13 @@ export default {
showLogin: true,
canIUseGetUserProfile: false,
msg: {},
AppConfig:{
TenantId:0
},
};
},
created() {
this.AppConfig.TenantId=this.GetMiniAppId().TenantId;
this.pageinfo = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").auth_page
: {};
......@@ -66,24 +80,44 @@ export default {
this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
},
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() {
//旧的 兼容电脑端
//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({
title: "电脑端暂时不能获取用户信息,请转到手机端使用!",
icon: "none",
......@@ -112,24 +146,6 @@ export default {
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) {
var that = this;
......@@ -235,11 +251,10 @@ export default {
CounponPassword: CounponPassword,
KeyWord: KeyWord,
EduSchoolId: EduSchoolId,
EduId:EduId
EduId:EduId
},
},
(res) => {
console.log(186, EduSchoolId);
uni.hideLoading();
that.showLogin = true; //防止多次点击登录
if (res.resultCode == 1) {
......
......@@ -66,7 +66,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxaeb077c07ed6f30d",
"appid" : "wxbb033190e0ffa5db",
"setting" : {
"urlCheck" : false,
"minified" : false
......
......@@ -82,6 +82,8 @@
<!-- 首店活动插件 -->
<tradeActivity v-if="d.id == 'tradeActivity'" :dataObj="d.data" :pagePaddingBottom="pagePaddingBottom" @refresh="refreshPage"
ref="tradeActive"></tradeActivity>
<!--首店首页数据插件-->
<tradeIndex v-if="d.id == 'tradeIndex'" :dataObj="d.data" @refresh="refreshPage"></tradeIndex>
</template>
</view>
</template>
......@@ -157,6 +159,7 @@
import orderPopup from "@/components/coupons/orderPopup.vue"; //离线订单弹窗
import Pubu from "@/components/pubu/index.vue"; //瀑布流
import tradeActivity from "@/components/tradeActivity/index.vue"; //首店活动插件
import tradeIndex from "@/components/tradeActivity/tradeIndex.vue"; //首店首页数据
const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
......@@ -241,6 +244,7 @@
orderPopup,
Pubu,
tradeActivity,
tradeIndex
},
onLoad(options) {
let that = this;
......
......@@ -50,7 +50,7 @@
<view v-for="(item, index) in stepOneList" :key="index">
<view class="itemBox">
<view class="name">
{{ item.name }}
{{ item.name }}
<text class="tip" v-if="item.tip">{{ item.tip }}</text>
</view>
<view class="con1" v-if="item.type == 1">
......@@ -221,11 +221,11 @@ export default {
nextSepName: "第2步",
// type=1:输入框,2:照片
stepOneList: [
{
name: "营业执照",
tip: "(点击图片上传营业执照)",
type: 2,
},
// {
// name: "营业执照",
// tip: "(点击图片上传营业执照)",
// type: 2,
// },
{
name: "企业名称",
text: "请输入企业名称",
......@@ -233,16 +233,16 @@ export default {
delIcon: false,
type: 1,
},
// {
// name: "统一社会信用代码",
// text: "输入18位社会信用代码",
// field: "UnifiedCode",
// delIcon: false,
// type: 1,
// },
{
name: "统一社会信用代码",
text: "输入18位社会信用代码",
field: "UnifiedCode",
delIcon: false,
type: 1,
},
{
name: "法人代表",
text: "请输入法人姓名",
name: "联系人",
text: "请输入联系人姓名",
field: "LegalPerson",
delIcon: false,
type: 1,
......
......@@ -79,7 +79,7 @@
@custom="getList(1)"
></u-search>
</view>
<view
<!-- <view
style="
display: flex;
align-items: center;
......@@ -100,7 +100,7 @@
style="flex: 1; width: 1px; margin-left: 15rpx"
mode="widthFix"
></image>
</view>
</view> -->
<u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty>
<scroll-view
v-else
......
......@@ -3,7 +3,7 @@ export default {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
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.host3 = "https://jjeduapi.oytour.com" //进阶小课堂以前接口
Vue.prototype.UploadConfig = function() { //本地上传配置
......@@ -208,7 +208,7 @@ export default {
// 获取小程序APPID
Vue.prototype.GetMiniAppId = function() {
let appObj = {};
let appType = 15;
let appType = 7;
switch (appType) {
case 1: //赞羊
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