Commit aa1f8ba7 by 李嘉林

抖音兼容

parent 654db285
......@@ -2,9 +2,15 @@
export default {
created () {
// NODE_ENV
let extConfig = wx.getExtConfigSync? wx.getExtConfigSync(): {}
let extConfig = {};
if (process.env.NODE_ENV=="development") {
extConfig={mixid:'antgood'}
} else{
if(MINI_ENV=='tt'){
extConfig={mixid:'ant'}
}else{
extConfig=wx.getExtConfigSync? wx.getExtConfigSync(): {}
}
}
this.$store.commit("setExtConfig", extConfig.mixid);
......
import { requestPOST, requestGET } from "@/utils/request.js";
// wx
export default {
//登录
orderDetail(options) {
return requestGET(`${process.env.OLSHOP_URL}/order/detail`, options);
}
};
......@@ -4,6 +4,9 @@ export default {
to_wx_pay(options) {
return requestPOST1(`${process.env.OLSHOP_URL}/pay/to_wx_pay`, options);
},
to_tt_pay(options) {
return requestPOST1(`${process.env.OLSHOP_URL}/pay/to_tt_pay`, options);
},
cancelPayment(options) {
return requestPOST1(
`${process.env.OLSHOP_URL}/pay/payment_cancel?orderSn=${options}`
......
......@@ -5,6 +5,7 @@
<p class="shopName" v-if="shopName">{{shopName}}</p>
<div class="btn_info">
<button class="btn" lang="zh_CN" open-type="getUserInfo" @getuserinfo="getUserInfo" @click="clickLogin">一键登录</button>
<!-- <div class="codeLogin">短信验证码登录</div> -->
</div>
<!-- <div>{{testd}}</div>
......@@ -17,7 +18,7 @@
<div class="btn_info1">
<h1>绑定手机号</h1>
<span class="hint">检测到您的账号还未绑定手机号,请绑定手机号</span>
<button class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">绑定手机号一键绑定</button>
<button class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="!isTT">绑定手机号一键绑定</button>
<div class="btn2" @click="handbindHandle">手动绑定手机号</div>
</div>
<div class="layer" @click="isShowPhone=false"></div>
......@@ -64,6 +65,11 @@ export default {
test_isHaveUnion: "",
test_unionId: "",
fromType:'',//来源类型 mini:小程序跳转到当前登录页
ttData:{
iv:"",
encryptedData:"",
},
isTT:MINI_ENV=='tt',
};
},
created() {},
......@@ -238,6 +244,9 @@ export default {
e.target={
rawData:e.rawData
};
this.ttData.iv= e.mp.detail.iv;
this.ttData.encryptedData=e.mp.detail.encryptedData;
console.log(this.ttData,'------------------------247')
}
console.log(e,e.mp,e.target.rawData,'-----------------------229')
if (this.isHaveUnion) {
......@@ -271,7 +280,10 @@ export default {
this.userInfo = JSON.parse(e.target.rawData);
console.log(this.userInfo, "this.userInfo");
this.$store.commit('setUserInfo',this.userInfo)
// if(MINI_ENV=='tt'){
// this.bindUser();
// return;
// }
if (this.unionId) {
login
.checkUnionid({ unionId: this.unionId, openId: this.openid },MINI_ENV)
......@@ -378,6 +390,11 @@ export default {
city: this.userInfo.city,
otherPhone: 0
};
if(MINI_ENV=='tt'){
query.iv=this.ttData.iv;
query.encryptedData=this.ttData.encryptedData;
query.sessionKey=this.session_key;
}
if (this.$store.state.spokesmanGroupId != "") {
query.spokesmanRelId = this.$store.state.spokesmanRelId;
query.spokesmanGroupId = this.$store.state.spokesmanGroupId;
......@@ -388,6 +405,7 @@ export default {
login
.bindUser(query,MINI_ENV)
.then(res => {
wx.hideLoading();
//绑定成功
if (res.data.code == 200) {
this.NEED_CERTIFIED = res.data.data.NEED_CERTIFIED;
......@@ -405,6 +423,8 @@ export default {
// this.backPath
// }&params=${encodeURIComponent(this.backParams)}`
// });
}else{
wx.showToast({ title: res.data.msg, icon: "none" });
}
})
.catch(err => {
......@@ -482,6 +502,16 @@ export default {
width: 200px;
border-radius: 5px;
}
.codeLogin{
background-color: #e5e5e5;
color: #fff;
height: 45px;
width: 200px;
border-radius: 5px;
text-align: center;
line-height: 45px;
margin-top: 20px;
}
}
.enterpriseLogin {
position: absolute;
......
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