Commit 55ed3236 by songbingqi

添加openId弹框

parent 9ade4a34
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<style scoped lang="less"> <style scoped lang="less">
.toastCSS{ .toastCSS{
background: #4C4C4C; background: #4C4C4C;
max-width: 266rpx; max-width: 100%;
position: fixed; position: fixed;
z-index: 999999; z-index: 999999;
top: 50%; top: 50%;
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
package: data.package, package: data.package,
signType: data.signType || "MD5", // 签名算法 signType: data.signType || "MD5", // 签名算法
paySign: data.paySign, // 签名 paySign: data.paySign, // 签名
success: async function (res) { success: async function (res) {
if (res.errMsg == "requestPayment:ok") { if (res.errMsg == "requestPayment:ok") {
// 删除购物车数据后重新放回购物车 // 删除购物车数据后重新放回购物车
uni.setStorageSync("shopCarInfo", []); uni.setStorageSync("shopCarInfo", []);
......
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
}) })
.then((res) => { .then((res) => {
const { statusCode, data } = res; const { statusCode, data } = res;
const { code, token, phoneNumber } = data; const { code, token, phoneNumber, openId } = data;
if (statusCode == 200 && data && code == 200) { if (statusCode == 200 && data && code == 200) {
console.log(token, "-------token"); console.log(token, "-------token");
uni.setStorage({ key: "Authorization", data: token }); uni.setStorage({ key: "Authorization", data: token });
...@@ -228,6 +228,11 @@ export default { ...@@ -228,6 +228,11 @@ export default {
uni.setStorage({ key: "userInfo", data: data }); uni.setStorage({ key: "userInfo", data: data });
Store.commit("setUserInfo", data); Store.commit("setUserInfo", data);
Store.commit("setAuthorization", token); Store.commit("setAuthorization", token);
if(openId) {
context.showToast({
title: openId,
});
}
this.getUserInfo(data); this.getUserInfo(data);
if (callback) return callback(); if (callback) return callback();
} }
......
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