登录
This commit is contained in:
69
App.vue
69
App.vue
@@ -1,49 +1,68 @@
|
||||
<script lang="ts">
|
||||
import { TUILogin } from '@tencentcloud/tui-core';
|
||||
// #ifdef APP-PLUS || H5
|
||||
import { TUIChatKit } from './TUIKit';
|
||||
|
||||
// #ifdef APP-PLUS || H5
|
||||
import { TUIChatKit } from "./TUIKit";
|
||||
import TUIlogin from "./components/TUILogin.js";
|
||||
|
||||
TUIChatKit.init();
|
||||
// #endif
|
||||
|
||||
let vueVersion = 2;
|
||||
// #ifdef VUE3
|
||||
vueVersion = 3;
|
||||
// #endif
|
||||
let vueVersion = 3;
|
||||
|
||||
|
||||
// Required information
|
||||
// You can get userSig from TencentCloud chat console for Testing TUIKit.
|
||||
// Deploy production environment please get it from your server.
|
||||
// View https://cloud.tencent.com/document/product/269/32688
|
||||
uni.$SDKAppID = 1600086550; // Your SDKAppID
|
||||
uni.$userID = '123'; // Your userID
|
||||
uni.$userSig = 'eJwtzF0LgjAYhuH-suOQ132K0IkYdGAYOaQOs614GclaI4Lov7fUw*d64P4Q3XTZywZSEpoBWU0bjR0jXnHinLKFn8advUdDylwCQCGFgPmxb4-BJhdC0HTNGvH*N8WVZBx4sVTwlqrq4f2muYQKtj090GPdQhwBtaqHE9OwE1UbBu-2Xe-W5PsDP3YvSw__'; // Your userSig
|
||||
|
||||
export default {
|
||||
provide() {
|
||||
data() {
|
||||
return {
|
||||
$global: {
|
||||
lastPage: null
|
||||
}
|
||||
info: {},
|
||||
userSig: "",
|
||||
chatInfo: {},
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.info = res.data;
|
||||
},
|
||||
});
|
||||
uni.getStorage({
|
||||
key: "userSig",
|
||||
success: (res) => {
|
||||
this.userSig = res.data;
|
||||
},
|
||||
});
|
||||
uni.getStorage({
|
||||
key: "chatInfo",
|
||||
success: (res) => {
|
||||
this.chatInfo = res.data;
|
||||
},
|
||||
});
|
||||
if (this.userSig) {
|
||||
TUIlogin(this.chatInfo.appId, this.info.userChatId, this.userSig);
|
||||
}
|
||||
},
|
||||
onLaunch: function () {
|
||||
TUILogin.login({
|
||||
SDKAppID: uni.$SDKAppID,
|
||||
userID: uni.$userID,
|
||||
userSig: uni.$userSig,
|
||||
useUploadPlugin: true, // If you need to send rich media messages, please set to true.
|
||||
framework: `vue${vueVersion}` // framework used vue2 / vue3
|
||||
}).catch(() => {});
|
||||
}
|
||||
provide() {
|
||||
return {
|
||||
$global: {
|
||||
lastPage: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
/* common css for page */
|
||||
uni-page-body,html,body,page {
|
||||
uni-page-body,
|
||||
html,
|
||||
body,
|
||||
page {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
20
components/TUILogin.js
Normal file
20
components/TUILogin.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { TUILogin } from "@tencentcloud/tui-core";
|
||||
|
||||
function TUIlogin(
|
||||
chatInfo,
|
||||
info,
|
||||
userSig,
|
||||
) {
|
||||
uni.$SDKAppID = chatInfo.appId; // Your SDKAppID
|
||||
uni.$userID = info.userChatId; // Your userID
|
||||
uni.$userSig = userSig; // Your userSig
|
||||
TUILogin.login({
|
||||
SDKAppID: uni.$SDKAppID,
|
||||
userID: uni.$userID,
|
||||
userSig: uni.$userSig,
|
||||
useUploadPlugin: true, // If you need to send rich media messages, please set to true.
|
||||
framework: `vue${vueVersion}`, // framework used vue2 / vue3
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
export default TUIlogin;
|
||||
@@ -67,7 +67,7 @@ let tabList = reactive([
|
||||
iconPath: "../../static/Mine.png",
|
||||
selectedIconPath: "../../static/Mineclick.png",
|
||||
text: "我的",
|
||||
pagePath: "../../pages/Mine/Mine",
|
||||
pagePath: "/pages/Mine/Mine",
|
||||
middleClass: "",
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -27,8 +27,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户信息"
|
||||
}
|
||||
},{
|
||||
"path": "pages/Setting/Setting",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
|
||||
@@ -1,20 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<button @click="openConversationList">打开会话列表</button>
|
||||
<button @click="openContact">打开联系人</button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
// 打开会话列表
|
||||
openConversationList() {
|
||||
uni.navigateTo({ url: '/TUIKit/components/TUIConversation/index' });
|
||||
},
|
||||
// 打开联系人
|
||||
openContact() {
|
||||
uni.navigateTo({ url: '/TUIKit/components/TUIContact/index' });
|
||||
},
|
||||
<view class="container">
|
||||
<view class="PersonalInformation">
|
||||
<view class="header">
|
||||
<image :src="userinfo.headerIcon" mode="scaleToFill" class="headerIcon" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="name">{{ userinfo.nickName }}</view>
|
||||
</view>
|
||||
<view class="Settings" @click="goSetting">
|
||||
<image class="SettingsIcon" src="../../static/Settings.png" mode="scaleToFill"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabBar">
|
||||
<tabBar></tabBar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabBar from "../../components/tabBar/tabBar";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {},
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
console.log(this.userinfo);
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goSetting() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Setting/Setting'
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
},
|
||||
components: {
|
||||
tabBar,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.PersonalInformation {
|
||||
margin-top: 200rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.header {
|
||||
margin-left: 50rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.headerIcon {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.name {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.Settings {
|
||||
margin-left: 370rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.SettingsIcon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
136
pages/Setting/Setting.vue
Normal file
136
pages/Setting/Setting.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<button class="login-btn" open-type="chooseAvatar" @chooseavatar="Userinfo">
|
||||
<image class="avatar" :src="userinfo"></image>
|
||||
</button>
|
||||
<input
|
||||
type="nickname"
|
||||
class="weui-input"
|
||||
placeholder="请输入昵称"
|
||||
@blur="inputName"
|
||||
/>
|
||||
<button class="weui-btn" @click="wxLogin">修改</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../components/request.js";
|
||||
|
||||
export default {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
userinfo:"",
|
||||
name: "",
|
||||
id: "",
|
||||
info: {},
|
||||
userSig: "",
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
uni.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = res.data.headerIcon;
|
||||
},
|
||||
});
|
||||
uni.getStorage({
|
||||
key: "userSig",
|
||||
success: (res) => {
|
||||
this.userSig = res.data;
|
||||
},
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 输入昵称
|
||||
inputName(e) {
|
||||
this.name = e.detail.value;
|
||||
},
|
||||
// 选择头像
|
||||
async Userinfo(e) {
|
||||
const { avatarUrl } = e.detail;
|
||||
this.userinfo = avatarUrl;
|
||||
},
|
||||
// 微信登录
|
||||
async wxLogin(e) {
|
||||
uni.showLoading({
|
||||
title: "登录中...",
|
||||
mask: true,
|
||||
});
|
||||
console.log("userinfo", this.userinfo);
|
||||
console.log("name", this.name);
|
||||
console.log("id", this.id);
|
||||
console.log("userSig", this.userSig);
|
||||
|
||||
const res = await request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
headerIcon: this.userinfo,
|
||||
nickName: this.name,
|
||||
usersig: this.userSig,
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
console.log("res", res);
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
console.log("修改成功", res.data);
|
||||
uni.setStorageSync("userinfo", res.data.info);
|
||||
uni.hideLoading();
|
||||
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
//````````````````````````````````````````````````````````````````````
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.login-btn {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
padding: 0px;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.weui-input {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.weui-btn {
|
||||
width: 40%;
|
||||
margin-top: 20rpx;
|
||||
background-color: #11cb2a00;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -11,6 +11,7 @@
|
||||
<script>
|
||||
import request from "../../components/request.js";
|
||||
import genTestUserSig from "../../components/debug/GenerateTestUserSig.js";
|
||||
import TUIlogin from "../../components/TUILogin.js";
|
||||
// const genTestUserSig = require('../../components/debug/GenerateTestUserSig.js');
|
||||
export default {
|
||||
inject: ['$global'],
|
||||
@@ -54,6 +55,7 @@ export default {
|
||||
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||
userID: userID,
|
||||
})
|
||||
uni.setStorageSync("chatInfo", this.info.data.chatInfo)
|
||||
uni.setStorageSync("userSig", userSig)
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
uni.reLaunch({
|
||||
@@ -62,6 +64,7 @@ export default {
|
||||
} else {
|
||||
uni.setStorageSync("userinfo", this.info.data.info);
|
||||
uni.hideLoading();
|
||||
TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.userChatId, userSig)
|
||||
//跳转原来页面否则首页
|
||||
uni.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home", // 默认页
|
||||
|
||||
BIN
static/Settings.png
Normal file
BIN
static/Settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
@@ -1 +1 @@
|
||||
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\nimport { TUILogin } from '@tencentcloud/tui-core';\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet vueVersion = 2;\r\n\r\nvueVersion = 3;\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\nuni.$SDKAppID = 1600086550; // Your SDKAppID\r\nuni.$userID = '123'; // Your userID\r\nuni.$userSig = 'eJwtzF0LgjAYhuH-suOQ132K0IkYdGAYOaQOs614GclaI4Lov7fUw*d64P4Q3XTZywZSEpoBWU0bjR0jXnHinLKFn8advUdDylwCQCGFgPmxb4-BJhdC0HTNGvH*N8WVZBx4sVTwlqrq4f2muYQKtj090GPdQhwBtaqHE9OwE1UbBu-2Xe-W5PsDP3YvSw__'; // Your userSig\r\n\r\nexport default {\r\n\tprovide() {\r\n return {\r\n $global: {\r\n lastPage: null\r\n }\r\n }\r\n },\r\n onLaunch: function () {\r\n\t TUILogin.login({\r\n\t SDKAppID: uni.$SDKAppID,\r\n\t userID: uni.$userID, \r\n\t userSig: uni.$userSig, \r\n\t useUploadPlugin: true, // If you need to send rich media messages, please set to true.\r\n\t framework: `vue${vueVersion}` // framework used vue2 / vue3\r\n\t }).catch(() => {});\r\n }\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,html,body,page {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","TUILogin","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;AASA,IAAI,aAAa;AAEjB,aAAa;AAObA,cAAAA,MAAI,YAAY;AAChBA,cAAAA,MAAI,UAAU;AACdA,cAAAA,MAAI,WAAW;AAEf,MAAe,YAAA;AAAA,EACd,UAAU;AACA,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AAAA,EACA,UAAU,WAAY;AACtBC,kBAAAA,EAAS,MAAM;AAAA,MACb,UAAUD,cAAI,MAAA;AAAA,MACd,QAAQA,cAAI,MAAA;AAAA,MACZ,SAASA,cAAI,MAAA;AAAA,MACb,iBAAiB;AAAA;AAAA,MACjB,WAAW,MAAM,UAAU;AAAA;AAAA,IAAA,CAC5B,EAAE,MAAM,MAAM;AAAA,IAAA,CAAE;AAAA,EACjB;AACF;ACxBO,SAAS,YAAY;AAC1B,QAAM,MAAME,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
|
||||
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script lang=\"ts\">\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nlet vueVersion = 3;\r\n\r\n\r\n// Required information\r\n// You can get userSig from TencentCloud chat console for Testing TUIKit.\r\n// Deploy production environment please get it from your server.\r\n// View https://cloud.tencent.com/document/product/269/32688\r\n\r\nexport default {\r\n data() {\r\n return {\r\n info: {},\r\n userSig: \"\",\r\n chatInfo: {},\r\n };\r\n },\r\n onLoad(option) {\r\n uni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n this.info = res.data;\r\n },\r\n });\r\n uni.getStorage({\r\n key: \"userSig\",\r\n success: (res) => {\r\n this.userSig = res.data;\r\n },\r\n });\r\n uni.getStorage({\r\n key: \"chatInfo\",\r\n success: (res) => {\r\n this.chatInfo = res.data;\r\n },\r\n });\r\n if (this.userSig) {\r\n TUIlogin(this.chatInfo.appId, this.info.userChatId, this.userSig);\r\n }\r\n },\r\n provide() {\r\n return {\r\n $global: {\r\n lastPage: null,\r\n },\r\n };\r\n },\r\n};\r\n</script>\r\n<style>\r\n/* common css for page */\r\nuni-page-body,\r\nhtml,\r\nbody,\r\npage {\r\n width: 100% !important;\r\n height: 100% !important;\r\n overflow: hidden;\r\n}\r\n</style>\r\n","import App from './App'\r\n\r\n// #ifndef VUE3\r\nimport Vue from 'vue'\r\nimport './uni.promisify.adaptor'\r\nVue.config.productionTip = false\r\nApp.mpType = 'app'\r\nconst app = new Vue({\r\n ...App\r\n})\r\napp.$mount()\r\n// #endif\r\n\r\n// #ifdef VUE3\r\nimport { createSSRApp } from 'vue'\r\nexport function createApp() {\r\n const app = createSSRApp(App)\r\n return {\r\n app\r\n }\r\n}\r\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,MAAe,YAAA;AAAA,EACb,OAAO;AACE,WAAA;AAAA,MACL,MAAM,CAAC;AAAA,MACP,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,OAAO,QAAQ;AACbA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,OAAO,IAAI;AAAA,MAClB;AAAA,IAAA,CACD;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,UAAU,IAAI;AAAA,MACrB;AAAA,IAAA,CACD;AACDA,kBAAAA,MAAI,WAAW;AAAA,MACb,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AAAA,MACtB;AAAA,IAAA,CACD;AACD,QAAI,KAAK,SAAS;AAChB,eAAS,KAAK,SAAS,OAAO,KAAK,KAAK,YAAY,KAAK,OAAO;AAAA,IAClE;AAAA,EACF;AAAA,EACA,UAAU;AACD,WAAA;AAAA,MACL,SAAS;AAAA,QACP,UAAU;AAAA,MACZ;AAAA,IAAA;AAAA,EAEJ;AACF;ACxCO,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
|
||||
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/TUILogin.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/TUILogin.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TUILogin.js","sources":["components/TUILogin.js"],"sourcesContent":["import { TUILogin } from \"@tencentcloud/tui-core\";\r\n\r\nfunction TUIlogin(\r\n chatInfo,\r\n info,\r\n userSig,\r\n) {\r\n uni.$SDKAppID = chatInfo.appId; // Your SDKAppID\r\n uni.$userID = info.userChatId; // Your userID\r\n uni.$userSig = userSig; // Your userSig\r\n TUILogin.login({\r\n SDKAppID: uni.$SDKAppID,\r\n userID: uni.$userID,\r\n userSig: uni.$userSig,\r\n useUploadPlugin: true, // If you need to send rich media messages, please set to true.\r\n framework: `vue${vueVersion}`, // framework used vue2 / vue3\r\n }).catch(() => {});\r\n }\r\n\r\n export default TUIlogin;"],"names":["uni","TUILogin"],"mappings":";;AAEA,SAAS,SACL,UACA,MACA,SACF;AACEA,sBAAI,YAAY,SAAS;AACzBA,sBAAI,UAAU,KAAK;AACnBA,gBAAG,MAAC,WAAW;AACfC,gBAAAA,EAAS,MAAM;AAAA,IACb,UAAUD,cAAG,MAAC;AAAA,IACd,QAAQA,cAAG,MAAC;AAAA,IACZ,SAASA,cAAG,MAAC;AAAA,IACb,iBAAiB;AAAA;AAAA,IACjB,WAAW,MAAM,UAAU;AAAA;AAAA,EACjC,CAAK,EAAE,MAAM,MAAM;AAAA,EAAA,CAAE;AACrB;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"Mine.js","sources":["pages/Mine/Mine.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvTWluZS9NaW5lLnZ1ZQ"],"sourcesContent":["<template>\r\n\t<div>\r\n\t <button @click=\"openConversationList\">打开会话列表</button>\r\n\t <button @click=\"openContact\">打开联系人</button>\r\n\t</div>\r\n </template>\r\n <script>\r\n export default {\r\n\tmethods: {\r\n\t // 打开会话列表\r\n\t openConversationList() {\r\n\t\tuni.navigateTo({ url: '/TUIKit/components/TUIConversation/index' });\r\n\t },\r\n\t // 打开联系人\r\n\t openContact() {\r\n\t\tuni.navigateTo({ url: '/TUIKit/components/TUIContact/index' });\r\n\t },\r\n\t},\r\n };\r\n </script>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Mine/Mine.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAOE,MAAK,YAAU;AAAA,EAChB,SAAS;AAAA;AAAA,IAEP,uBAAuB;AACxBA,oBAAAA,MAAI,WAAW,EAAE,KAAK,2CAA4C,CAAA;AAAA,IAChE;AAAA;AAAA,IAED,cAAc;AACfA,oBAAAA,MAAI,WAAW,EAAE,KAAK,sCAAuC,CAAA;AAAA,IAC3D;AAAA,EACF;;;;;;;;;AChBF,GAAG,WAAW,eAAe;"}
|
||||
{"version":3,"file":"Mine.js","sources":["pages/Mine/Mine.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvTWluZS9NaW5lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"container\">\r\n <view class=\"PersonalInformation\">\r\n <view class=\"header\">\r\n <image :src=\"userinfo.headerIcon\" mode=\"scaleToFill\" class=\"headerIcon\" />\r\n </view>\r\n <view>\r\n <view class=\"name\">{{ userinfo.nickName }}</view>\r\n </view>\r\n <view class=\"Settings\" @click=\"goSetting\">\r\n\t <image class=\"SettingsIcon\" src=\"../../static/Settings.png\" mode=\"scaleToFill\"/>\r\n\t </view>\r\n </view>\r\n </view>\r\n <view class=\"tabBar\">\r\n <tabBar></tabBar>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {\r\n userinfo: {},\r\n };\r\n },\r\n onShow() {\r\n\tuni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n this.userinfo = res.data;\r\n console.log(this.userinfo);\r\n },\r\n });\r\n },\r\n methods: {\r\n goSetting() {\r\n\t\tuni.navigateTo({\r\n\t\t\turl: '/pages/Setting/Setting'\r\n\t\t});\r\n\t},\r\n },\r\n components: {\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n height: 100%;\r\n width: 100%;\r\n background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);\r\n}\r\n.PersonalInformation {\r\n margin-top: 200rpx;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n}\r\n.header {\r\n margin-left: 50rpx;\r\n width: 100rpx;\r\n height: 100rpx;\r\n border-radius: 50%;\r\n}\r\n.headerIcon {\r\n width: 100rpx;\r\n height: 100rpx;\r\n border-radius: 50%;\r\n}\r\n.name {\r\n margin-left: 30rpx;\r\n}\r\n.Settings {\r\n margin-left: 370rpx;\r\n width: 50rpx;\r\n height: 50rpx;\r\n}\r\n.SettingsIcon {\r\n width: 50rpx;\r\n height: 50rpx;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Mine/Mine.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;;AAoBA,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,UAAU,CAAE;AAAA;EAEf;AAAA,EACD,SAAS;AACVA,kBAAAA,MAAI,WAAW;AAAA,MACV,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AAChB,aAAK,WAAW,IAAI;AACpBA,sBAAY,MAAA,MAAA,OAAA,6BAAA,KAAK,QAAQ;AAAA,MAC1B;AAAA,IACH,CAAC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,YAAY;AACdA,oBAAAA,MAAI,WAAW;AAAA,QACd,KAAK;AAAA,MACN,CAAC;AAAA,IACD;AAAA,EACC;AAAA,EACD,YAAY;AAAA,IACV;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;AC7CA,GAAG,WAAW,eAAe;"}
|
||||
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/Setting/Setting.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/Setting/Setting.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
48
unpackage/dist/dev/mp-weixin/app.js
vendored
48
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -7,6 +7,7 @@ if (!Math) {
|
||||
"./pages/index/index.js";
|
||||
"./pages/login/login.js";
|
||||
"./pages/UserInformation/UserInformation.js";
|
||||
"./pages/Setting/Setting.js";
|
||||
"./TUIKit/components/TUIConversation/index.js";
|
||||
"./TUIKit/components/TUIChat/index.js";
|
||||
"./TUIKit/components/TUIChat/video-play.js";
|
||||
@@ -16,30 +17,43 @@ if (!Math) {
|
||||
"./TUIKit/components/TUISearch/index2.js";
|
||||
"./TUIKit/components/TUIConversation/conversation-list/index2.js";
|
||||
}
|
||||
let vueVersion = 2;
|
||||
vueVersion = 3;
|
||||
common_vendor.index.$SDKAppID = 1600086550;
|
||||
common_vendor.index.$userID = "123";
|
||||
common_vendor.index.$userSig = "eJwtzF0LgjAYhuH-suOQ132K0IkYdGAYOaQOs614GclaI4Lov7fUw*d64P4Q3XTZywZSEpoBWU0bjR0jXnHinLKFn8advUdDylwCQCGFgPmxb4-BJhdC0HTNGvH*N8WVZBx4sVTwlqrq4f2muYQKtj090GPdQhwBtaqHE9OwE1UbBu-2Xe-W5PsDP3YvSw__";
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
userSig: "",
|
||||
chatInfo: {}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.info = res.data;
|
||||
}
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "userSig",
|
||||
success: (res) => {
|
||||
this.userSig = res.data;
|
||||
}
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "chatInfo",
|
||||
success: (res) => {
|
||||
this.chatInfo = res.data;
|
||||
}
|
||||
});
|
||||
if (this.userSig) {
|
||||
TUIlogin(this.chatInfo.appId, this.info.userChatId, this.userSig);
|
||||
}
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
$global: {
|
||||
lastPage: null
|
||||
}
|
||||
};
|
||||
},
|
||||
onLaunch: function() {
|
||||
common_vendor.A.login({
|
||||
SDKAppID: common_vendor.index.$SDKAppID,
|
||||
userID: common_vendor.index.$userID,
|
||||
userSig: common_vendor.index.$userSig,
|
||||
useUploadPlugin: true,
|
||||
// If you need to send rich media messages, please set to true.
|
||||
framework: `vue${vueVersion}`
|
||||
// framework used vue2 / vue3
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
};
|
||||
function createApp() {
|
||||
|
||||
3
unpackage/dist/dev/mp-weixin/app.json
vendored
3
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -4,7 +4,8 @@
|
||||
"pages/Mine/Mine",
|
||||
"pages/index/index",
|
||||
"pages/login/login",
|
||||
"pages/UserInformation/UserInformation"
|
||||
"pages/UserInformation/UserInformation",
|
||||
"pages/Setting/Setting"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
|
||||
5
unpackage/dist/dev/mp-weixin/app.wxss
vendored
5
unpackage/dist/dev/mp-weixin/app.wxss
vendored
@@ -1,6 +1,9 @@
|
||||
|
||||
/* common css for page */
|
||||
uni-page-body,html,body,page {
|
||||
uni-page-body,
|
||||
html,
|
||||
body,
|
||||
page {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
overflow: hidden;
|
||||
|
||||
10
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
10
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
@@ -1,5 +1,6 @@
|
||||
"use strict";
|
||||
const _imports_0$3 = "/static/HomeBackground.png";
|
||||
const _imports_0$4 = "/static/HomeBackground.png";
|
||||
const _imports_0$3 = "/static/Settings.png";
|
||||
const _imports_0$2 = "/static/Navigationimg.png";
|
||||
const _imports_1$1 = "/static/Return.png";
|
||||
const createGroup = "/assets/start-group.6d6b5fbb.svg";
|
||||
@@ -82,9 +83,10 @@ exports.InvitationDark = InvitationDark;
|
||||
exports.InvitationLight = InvitationLight;
|
||||
exports.SearchDefaultIcon = SearchDefaultIcon;
|
||||
exports._imports_0 = _imports_0$2;
|
||||
exports._imports_0$1 = _imports_0$3;
|
||||
exports._imports_0$2 = _imports_0$1;
|
||||
exports._imports_0$3 = _imports_0;
|
||||
exports._imports_0$1 = _imports_0$4;
|
||||
exports._imports_0$2 = _imports_0$3;
|
||||
exports._imports_0$3 = _imports_0$1;
|
||||
exports._imports_0$4 = _imports_0;
|
||||
exports._imports_1 = _imports_1$1;
|
||||
exports._imports_1$1 = _imports_1;
|
||||
exports.addSVG = addSVG;
|
||||
|
||||
@@ -7770,7 +7770,7 @@ function isConsoleWritable() {
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.0.107,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_6sCg0b";
|
||||
const id = "mp-weixin_lBK7e6";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
19
unpackage/dist/dev/mp-weixin/components/TUILogin.js
vendored
Normal file
19
unpackage/dist/dev/mp-weixin/components/TUILogin.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
function TUIlogin(chatInfo, info, userSig) {
|
||||
common_vendor.index.$SDKAppID = chatInfo.appId;
|
||||
common_vendor.index.$userID = info.userChatId;
|
||||
common_vendor.index.$userSig = userSig;
|
||||
common_vendor.A.login({
|
||||
SDKAppID: common_vendor.index.$SDKAppID,
|
||||
userID: common_vendor.index.$userID,
|
||||
userSig: common_vendor.index.$userSig,
|
||||
useUploadPlugin: true,
|
||||
// If you need to send rich media messages, please set to true.
|
||||
framework: `vue${vueVersion}`
|
||||
// framework used vue2 / vue3
|
||||
}).catch(() => {
|
||||
});
|
||||
}
|
||||
exports.TUIlogin = TUIlogin;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/TUILogin.js.map
|
||||
@@ -134,7 +134,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
g: "4813d59a-0-" + i0
|
||||
});
|
||||
}),
|
||||
b: common_assets._imports_0$3,
|
||||
b: common_assets._imports_0$4,
|
||||
c: $data.Gender,
|
||||
d: $data.Gender ? 1 : "",
|
||||
e: !$data.Gender ? 1 : ""
|
||||
|
||||
@@ -38,7 +38,7 @@ const _sfc_main = {
|
||||
iconPath: "../../static/Mine.png",
|
||||
selectedIconPath: "../../static/Mineclick.png",
|
||||
text: "我的",
|
||||
pagePath: "../../pages/Mine/Mine",
|
||||
pagePath: "/pages/Mine/Mine",
|
||||
middleClass: ""
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -37,7 +37,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
f: !$data.Select ? 1 : "",
|
||||
g: common_vendor.o$1((...args) => $options.screening && $options.screening(...args)),
|
||||
h: common_vendor.o$1((...args) => $options.Search && $options.Search(...args)),
|
||||
i: common_assets._imports_0$2
|
||||
i: common_assets._imports_0$3
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ce2f6748"]]);
|
||||
|
||||
46
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
46
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
@@ -1,23 +1,49 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
userinfo: {}
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.userinfo = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/Mine/Mine.vue:33", this.userinfo);
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 打开会话列表
|
||||
openConversationList() {
|
||||
common_vendor.index.navigateTo({ url: "/TUIKit/components/TUIConversation/index" });
|
||||
},
|
||||
// 打开联系人
|
||||
openContact() {
|
||||
common_vendor.index.navigateTo({ url: "/TUIKit/components/TUIContact/index" });
|
||||
goSetting() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/Setting/Setting"
|
||||
});
|
||||
}
|
||||
},
|
||||
components: {
|
||||
tabBar
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_tabBar2 = common_vendor.resolveComponent("tabBar");
|
||||
_easycom_tabBar2();
|
||||
}
|
||||
const _easycom_tabBar = () => "../../components/tabBar/tabBar.js";
|
||||
if (!Math) {
|
||||
_easycom_tabBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o$1((...args) => $options.openConversationList && $options.openConversationList(...args)),
|
||||
b: common_vendor.o$1((...args) => $options.openContact && $options.openContact(...args))
|
||||
a: $data.userinfo.headerIcon,
|
||||
b: common_vendor.t($data.userinfo.nickName),
|
||||
c: common_assets._imports_0$2,
|
||||
d: common_vendor.o$1((...args) => $options.goSetting && $options.goSetting(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-402ad917"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Mine/Mine.js.map
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"tab-bar": "../../components/tabBar/tabBar"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<view><button bindtap="{{a}}">打开会话列表</button><button bindtap="{{b}}">打开联系人</button></view>
|
||||
<view class="container data-v-402ad917"><view class="PersonalInformation data-v-402ad917"><view class="header data-v-402ad917"><image src="{{a}}" mode="scaleToFill" class="headerIcon data-v-402ad917"/></view><view class="data-v-402ad917"><view class="name data-v-402ad917">{{b}}</view></view><view class="Settings data-v-402ad917" bindtap="{{d}}"><image class="SettingsIcon data-v-402ad917" src="{{c}}" mode="scaleToFill"/></view></view></view><view class="tabBar data-v-402ad917"><tab-bar class="data-v-402ad917" u-i="402ad917-0" bind:__l="__l"></tab-bar></view>
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
.container.data-v-402ad917 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.PersonalInformation.data-v-402ad917 {
|
||||
margin-top: 200rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.header.data-v-402ad917 {
|
||||
margin-left: 50rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.headerIcon.data-v-402ad917 {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.name.data-v-402ad917 {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.Settings.data-v-402ad917 {
|
||||
margin-left: 370rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
.SettingsIcon.data-v-402ad917 {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
93
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.js
vendored
Normal file
93
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const _sfc_main = {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
userinfo: "",
|
||||
name: "",
|
||||
id: "",
|
||||
info: {},
|
||||
userSig: ""
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
success: (res) => {
|
||||
this.id = res.data.id;
|
||||
this.name = res.data.nickName;
|
||||
this.userinfo = res.data.headerIcon;
|
||||
}
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "userSig",
|
||||
success: (res) => {
|
||||
this.userSig = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 输入昵称
|
||||
inputName(e) {
|
||||
this.name = e.detail.value;
|
||||
},
|
||||
// 选择头像
|
||||
async Userinfo(e) {
|
||||
const { avatarUrl } = e.detail;
|
||||
this.userinfo = avatarUrl;
|
||||
},
|
||||
// 微信登录
|
||||
async wxLogin(e) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "登录中...",
|
||||
mask: true
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:62", "userinfo", this.userinfo);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:63", "name", this.name);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:64", "id", this.id);
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:65", "userSig", this.userSig);
|
||||
const res = await components_request.request({
|
||||
url: "user/updateUserInfo",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.id,
|
||||
headerIcon: this.userinfo,
|
||||
nickName: this.name,
|
||||
usersig: this.userSig
|
||||
},
|
||||
userInfo: false
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:78", "res", res);
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:84", "修改成功", res.data);
|
||||
common_vendor.index.setStorageSync("userinfo", res.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: "修改失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: $data.userinfo,
|
||||
b: common_vendor.o$1((...args) => $options.Userinfo && $options.Userinfo(...args)),
|
||||
c: common_vendor.o$1((...args) => $options.inputName && $options.inputName(...args)),
|
||||
d: common_vendor.o$1((...args) => $options.wxLogin && $options.wxLogin(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3c55a289"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Setting/Setting.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "设置",
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="container data-v-3c55a289"><button class="login-btn data-v-3c55a289" open-type="chooseAvatar" bindchooseavatar="{{b}}"><image class="avatar data-v-3c55a289" src="{{a}}"></image></button><input type="nickname" class="weui-input data-v-3c55a289" placeholder="请输入昵称" bindblur="{{c}}"/><button class="weui-btn data-v-3c55a289" bindtap="{{d}}">修改</button></view>
|
||||
33
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.wxss
vendored
Normal file
33
unpackage/dist/dev/mp-weixin/pages/Setting/Setting.wxss
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
.container.data-v-3c55a289 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||
}
|
||||
.login-btn.data-v-3c55a289 {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 50%;
|
||||
padding: 0px;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.avatar.data-v-3c55a289 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.weui-input.data-v-3c55a289 {
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.weui-btn.data-v-3c55a289 {
|
||||
width: 40%;
|
||||
margin-top: 20rpx;
|
||||
background-color: #11cb2a00;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const components_debug_GenerateTestUserSig = require("../../components/debug/GenerateTestUserSig.js");
|
||||
const components_TUILogin = require("../../components/TUILogin.js");
|
||||
const _sfc_main = {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
@@ -33,18 +34,19 @@ const _sfc_main = {
|
||||
},
|
||||
userInfo: false
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/login/login.vue:46", "登录结果:", res);
|
||||
common_vendor.index.__f__("log", "at pages/login/login.vue:47", "登录结果:", res);
|
||||
this.info = res;
|
||||
if (this.info.code === 200) {
|
||||
if (this.info.data.newAccount) {
|
||||
const sdkAppID = Number(this.info.data.chatInfo.appId);
|
||||
const userID = "administrator";
|
||||
const { userSig } = components_debug_GenerateTestUserSig.genTestUserSig({
|
||||
const { userSig: userSig2 } = components_debug_GenerateTestUserSig.genTestUserSig({
|
||||
SDKAPPID: sdkAppID,
|
||||
SECRETKEY: this.info.data.chatInfo.appKey,
|
||||
userID
|
||||
});
|
||||
common_vendor.index.setStorageSync("userSig", userSig);
|
||||
common_vendor.index.setStorageSync("chatInfo", this.info.data.chatInfo);
|
||||
common_vendor.index.setStorageSync("userSig", userSig2);
|
||||
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||
common_vendor.index.reLaunch({
|
||||
url: "/pages/UserInformation/UserInformation"
|
||||
@@ -52,6 +54,7 @@ const _sfc_main = {
|
||||
} else {
|
||||
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||
common_vendor.index.hideLoading();
|
||||
components_TUILogin.TUIlogin(this.info.data.chatInfo.appId, this.info.data.info.userChatId, userSig);
|
||||
common_vendor.index.reLaunch({
|
||||
url: this.$global.lastPage || "/pages/Home/Home"
|
||||
// 默认页
|
||||
|
||||
BIN
unpackage/dist/dev/mp-weixin/static/Settings.png
vendored
Normal file
BIN
unpackage/dist/dev/mp-weixin/static/Settings.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user