api
This commit is contained in:
@@ -21,8 +21,8 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.advertisement {
|
.advertisement {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 100rpx;
|
||||||
background: #ff0000;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
/* 样式定义 */
|
/* 样式定义 */
|
||||||
</style>
|
</style>
|
||||||
64
components/debug/GenerateTestUserSig.js
Normal file
64
components/debug/GenerateTestUserSig.js
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腾讯云 SDKAppId,需要替换为您自己账号下的 SDKAppId。
|
||||||
|
*
|
||||||
|
* 进入腾讯云实时音视频[控制台](https://console.cloud.tencent.com/rav ) 创建应用,即可看到 SDKAppId,
|
||||||
|
* 它是腾讯云用于区分客户的唯一标识。
|
||||||
|
*/
|
||||||
|
// const SDKAPPID = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名过期时间,建议不要设置的过短
|
||||||
|
* <p>
|
||||||
|
* 时间单位:秒
|
||||||
|
* 默认时间:7 x 24 x 60 x 60 = 604800 = 7 天
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算签名用的加密密钥,获取步骤如下:
|
||||||
|
*
|
||||||
|
* step1. 进入腾讯云实时音视频[控制台](https://console.cloud.tencent.com/rav ),如果还没有应用就创建一个,
|
||||||
|
* step2. 单击“应用配置”进入基础配置页面,并进一步找到“帐号体系集成”部分。
|
||||||
|
* step3. 点击“查看密钥”按钮,就可以看到计算 UserSig 使用的加密的密钥了,请将其拷贝并复制到如下的变量中
|
||||||
|
*
|
||||||
|
* 注意:该方案仅适用于调试Demo,正式上线前请将 UserSig 计算代码和密钥迁移到您的后台服务器上,以避免加密密钥泄露导致的流量盗用。
|
||||||
|
* 文档:https://cloud.tencent.com/document/product/647/17275#Server
|
||||||
|
*/
|
||||||
|
// const SECRETKEY = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Module: GenerateTestUserSig
|
||||||
|
*
|
||||||
|
* Function: 用于生成测试用的 UserSig,UserSig 是腾讯云为其云服务设计的一种安全保护签名。
|
||||||
|
* 其计算方法是对 SDKAppID、UserID 和 EXPIRETIME 进行加密,加密算法为 HMAC-SHA256。
|
||||||
|
*
|
||||||
|
* Attention: 请不要将如下代码发布到您的线上正式版本的 App 中,原因如下:
|
||||||
|
*
|
||||||
|
* 本文件中的代码虽然能够正确计算出 UserSig,但仅适合快速调通 SDK 的基本功能,不适合线上产品,
|
||||||
|
* 这是因为客户端代码中的 SECRETKEY 很容易被反编译逆向破解,尤其是 Web 端的代码被破解的难度几乎为零。
|
||||||
|
* 一旦您的密钥泄露,攻击者就可以计算出正确的 UserSig 来盗用您的腾讯云流量。
|
||||||
|
*
|
||||||
|
* 正确的做法是将 UserSig 的计算代码和加密密钥放在您的业务服务器上,然后由 App 按需向您的服务器获取实时算出的 UserSig。
|
||||||
|
* 由于破解服务器的成本要高于破解客户端 App,所以服务器计算的方案能够更好地保护您的加密密钥。
|
||||||
|
*
|
||||||
|
* Reference:https://cloud.tencent.com/document/product/647/17275#Server
|
||||||
|
*/
|
||||||
|
export default function genTestUserSig(config) {
|
||||||
|
const { SDKAPPID, SECRETKEY,userID } = config;
|
||||||
|
const EXPIRETIME = 604800;
|
||||||
|
const generator = new LibGenerateTestUserSig(SDKAPPID, SECRETKEY, EXPIRETIME);
|
||||||
|
const userSig = generator.genTestUserSig(userID);
|
||||||
|
|
||||||
|
return {
|
||||||
|
sdkAppID: SDKAPPID,
|
||||||
|
userSig,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// module.exports = {
|
||||||
|
// genTestUserSig,
|
||||||
|
// };
|
||||||
2
components/debug/lib-generate-test-usersig-es.min.js
vendored
Normal file
2
components/debug/lib-generate-test-usersig-es.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
52
components/request.js
Normal file
52
components/request.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
export default function request(urldata) {
|
||||||
|
const {url, data, method, header,userInfo} = urldata;
|
||||||
|
const baseUrl =
|
||||||
|
"http://192.168.0.218:8086"
|
||||||
|
+url;
|
||||||
|
console.log("``````````````````````````````````",userInfo);
|
||||||
|
if (userInfo) {
|
||||||
|
uni.getStorage({
|
||||||
|
key: "userinfo",
|
||||||
|
success: (res) => {
|
||||||
|
if(res.data){
|
||||||
|
if(res.data.nickName){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.request({
|
||||||
|
url: baseUrl,
|
||||||
|
data: data,
|
||||||
|
method: method,
|
||||||
|
header: header,
|
||||||
|
success: function (res) {
|
||||||
|
resolve(res.data);
|
||||||
|
},
|
||||||
|
fail: function (res) {
|
||||||
|
reject(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.reLaunch({ url: "/pages/UserInformation/UserInformation"})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({ url: '/pages/login/login' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.request({
|
||||||
|
url: baseUrl,
|
||||||
|
data: data,
|
||||||
|
method: method,
|
||||||
|
header: header,
|
||||||
|
success: function (res) {
|
||||||
|
resolve(res.data);
|
||||||
|
},
|
||||||
|
fail: function (res) {
|
||||||
|
reject(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "tk-mini-program",
|
"name" : "tk-mini-program",
|
||||||
"appid" : "",
|
"appid" : "__UNI__A6CDB98",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
@@ -50,20 +50,24 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "",
|
"appid" : "wx0af70c44ad1939e9",
|
||||||
"optimization" : {
|
"optimization" : {
|
||||||
"subPackages" : true
|
"subPackages" : true
|
||||||
},
|
},
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false,
|
||||||
|
"minified" : true,
|
||||||
|
"postcss" : true
|
||||||
},
|
},
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"permission" : {}
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-baidu" : {
|
"mp-baidu" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true,
|
||||||
|
"appid" : ""
|
||||||
},
|
},
|
||||||
"mp-toutiao" : {
|
"mp-toutiao" : {
|
||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
|
|||||||
12
pages.json
12
pages.json
@@ -16,7 +16,19 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "聊天"
|
"navigationBarTitleText": "聊天"
|
||||||
}
|
}
|
||||||
|
},{
|
||||||
|
"path": "pages/login/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/UserInformation/UserInformation",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "用户信息"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="top-navigation-container">
|
<view class="top-navigation-container">
|
||||||
<top-navigation></top-navigation>
|
<top-navigation></top-navigation>
|
||||||
</view>
|
</view>
|
||||||
<view class="Advertisement">
|
<view class="Advertisement" @click="goAdvertisement">
|
||||||
<advertisement></advertisement>
|
<advertisement></advertisement>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentList">
|
<view class="contentList">
|
||||||
@@ -29,18 +29,9 @@ export default {
|
|||||||
// this.requestSomething();
|
// this.requestSomething();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// requestSomething() {
|
goAdvertisement(){
|
||||||
// wx.request({
|
uni.navigateTo({ url: '/pages/login/login' })
|
||||||
// url: "http://192.168.0.218:8086/user/login", // 请求的 URL
|
}
|
||||||
// method: "POST", // 请求方式
|
|
||||||
// success: (res) => {
|
|
||||||
// console.log("请求成功", res.data); // 处理成功的响应
|
|
||||||
// },
|
|
||||||
// fail: (err) => {
|
|
||||||
// console.error("请求失败", err); // 处理失败的响应
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
topNavigation,
|
topNavigation,
|
||||||
@@ -83,7 +74,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.contentList {
|
.contentList {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 300rpx;
|
top: 400rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1300rpx;
|
height: 1300rpx;
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<button @click="openChat">OpenChat</button>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
data() {
|
||||||
openChat() {
|
return {
|
||||||
// 1v1 chat: conversationID = `C2C${userID}`
|
title: 'Hello'
|
||||||
// group chat: conversationID = `GROUP${groupID}`
|
|
||||||
const conversationID = 'C2Cqwe';
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.reLaunch({ url: "/pages/UserInformation/UserInformation"})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 方法定义
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 样式定义 */
|
||||||
|
</style>
|
||||||
161
pages/UserInformation/UserInformation.vue
Normal file
161
pages/UserInformation/UserInformation.vue
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
<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 {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userinfo:
|
||||||
|
"https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0",
|
||||||
|
name: "",
|
||||||
|
id: "",
|
||||||
|
info: {},
|
||||||
|
userSig: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
uni.getStorage({
|
||||||
|
key: "userinfo",
|
||||||
|
success: (res) => {
|
||||||
|
this.id = res.data.id;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
uni.getStorage({
|
||||||
|
key: "userSig",
|
||||||
|
success: (res) => {
|
||||||
|
this.userSig = res.data;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// const { info } = option;
|
||||||
|
// this.id = JSON.parse(info).id
|
||||||
|
},
|
||||||
|
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,
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { code } = await uni.login({
|
||||||
|
provider: "weixin",
|
||||||
|
onlyAuthorize: true,
|
||||||
|
});
|
||||||
|
console.log("code", code);
|
||||||
|
console.log("code", this.name);
|
||||||
|
console.log("code", this.userinfo);
|
||||||
|
console.log("code", this.id);
|
||||||
|
console.log("code", this.userSig);
|
||||||
|
|
||||||
|
const res = await request({
|
||||||
|
url: "/user/inputUserInfo",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
id: this.id,
|
||||||
|
headerIcon: this.userinfo,
|
||||||
|
nickName: this.name,
|
||||||
|
code,
|
||||||
|
usersig: this.userSig,
|
||||||
|
},
|
||||||
|
userInfo: false,
|
||||||
|
});
|
||||||
|
console.log("res", res);
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "登录成功",
|
||||||
|
icon: "success",
|
||||||
|
});
|
||||||
|
console.log("登录成功", res.data);
|
||||||
|
uni.setStorageSync("userinfo", res.data.info);
|
||||||
|
//```````````````````````````````````````````````````````````````````````登录成功后跳转回原页面 或 首页
|
||||||
|
// const fromPage = decodeURIComponent(options.from || "");
|
||||||
|
// if (fromPage) {
|
||||||
|
// uni.redirectTo({
|
||||||
|
// url: fromPage,
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// uni.switchTab({ url: "/pages/index/index" }); // 默认首页
|
||||||
|
// }
|
||||||
|
//````````````````````````````````````````````````````````````````````
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: "登录失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} catch (err) {
|
||||||
|
console.error("登录错误:", err);
|
||||||
|
uni.showToast({
|
||||||
|
title: "请检查网络连接",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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>
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
//此页面用于聊天的链接入口,请不要在这里添加内容,不要删除此页面,否则会导致编译失败
|
||||||
|
//这里虽然看不出任何于聊天有关的内容,但为了防止编译失败,请保留此页面
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
137
pages/login/login.vue
Normal file
137
pages/login/login.vue
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<image class="logo" :src="userInfo.avatarUrl"></image>
|
||||||
|
<view class="nickname"> {{ userInfo.nickName }}</view>
|
||||||
|
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||||
|
使用微信登录
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from "../../components/request.js";
|
||||||
|
import genTestUserSig from "../../components/debug/GenerateTestUserSig.js";
|
||||||
|
// const genTestUserSig = require('../../components/debug/GenerateTestUserSig.js');
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: {},
|
||||||
|
info: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.getUserInfo({
|
||||||
|
provider: "weixin",
|
||||||
|
success: (res) => {
|
||||||
|
this.userInfo = res.userInfo;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取手机号
|
||||||
|
async getPhoneNumber(e) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: "登录中...",
|
||||||
|
mask: true,
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const res = await request({
|
||||||
|
url: "/user/loginWithPhoneNumber",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
code: e.detail.code,
|
||||||
|
},
|
||||||
|
userInfo: false,
|
||||||
|
});
|
||||||
|
console.log("登录结果:", 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} = genTestUserSig({
|
||||||
|
SDKAPPID : sdkAppID,
|
||||||
|
SECRETKEY:this.info.data.chatInfo.appKey,
|
||||||
|
userID: userID,
|
||||||
|
})
|
||||||
|
uni.setStorageSync("userSig", userSig)
|
||||||
|
uni.setStorageSync("userinfo", this.info.data.info);
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/UserInformation/UserInformation",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync("userinfo", this.info.data.info);
|
||||||
|
uni.hideLoading();
|
||||||
|
// `
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1, // 返回层级(默认值为 1)
|
||||||
|
});
|
||||||
|
// `································································登录成功后跳转回原页面 或 首页
|
||||||
|
// const fromPage = decodeURIComponent(options.from || "");
|
||||||
|
// if (fromPage) {
|
||||||
|
// uni.redirectTo({
|
||||||
|
// url: fromPage,
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// uni.switchTab({ url: "/pages/index/index" }); // 默认首页
|
||||||
|
// }
|
||||||
|
// `·································································
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: "登录失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("登录错误:", err);
|
||||||
|
uni.showToast({
|
||||||
|
title: "请检查网络连接",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.nickname {
|
||||||
|
width: 300rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 0px;
|
||||||
|
padding: 20rpx 40rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
.login-btn {
|
||||||
|
background-color: hsla(0, 0%, 100%, 0);
|
||||||
|
border: 1px solid #00ff0000;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
color: #666;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -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\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 = 'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDCzNTUwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZuYGxpbALVATclMB5qaUmwRlpvkHBmcHWps7hScoe3sm6PtmRxZXOWZkZYbWGKYXlVo6ByUUlqRbqtUCwBTujBs'; // Your userSig\r\n\r\nexport default {\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":";;;;;;;;;;;;;;;;AAOA,IAAI,aAAa;AAEjB,aAAa;AAObA,cAAAA,MAAI,YAAY;AAChBA,cAAAA,MAAI,UAAU;AACdA,cAAAA,MAAI,WAAW;AAEf,MAAe,YAAA;AAAA,EACb,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;ACfO,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\nimport { TUILogin } from '@tencentcloud/tui-core';\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 = 'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwoZGxlDh4pTsxIKCzBQlK0MzAwMDCzNTUwOITGpFQWZRKlDc1NTUCCgFES3JzAWJmZuYGxpbALVATclMB5qaUmwRlpvkHBmcHWps7hScoe3sm6PtmRxZXOWZkZYbWGKYXlVo6ByUUlqRbqtUCwBTujBs'; // Your userSig\r\n\r\nexport default {\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":";;;;;;;;;;;;;;;;;;AAOA,IAAI,aAAa;AAEjB,aAAa;AAObA,cAAAA,MAAI,YAAY;AAChBA,cAAAA,MAAI,UAAU;AACdA,cAAAA,MAAI,WAAW;AAEf,MAAe,YAAA;AAAA,EACb,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;ACfO,SAAS,YAAY;AAC1B,QAAM,MAAME,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"Advertisement.js","sources":["components/Advertisement/Advertisement.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9jb21wb25lbnRzL0FkdmVydGlzZW1lbnQvQWR2ZXJ0aXNlbWVudC52dWU"],"sourcesContent":["<template>\r\n <view class=\"advertisement\">广告</view>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n.advertisement {\r\n width: 100%;\r\n height: 200rpx;\r\n background: #ff0000;\r\n}\r\n /* 样式定义 */\r\n</style>","import Component from 'D:/项目/tk-mini-program/components/Advertisement/Advertisement.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AAKI,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAET;AACJ;;;;;AChBJ,GAAG,gBAAgB,SAAS;"}
|
{"version":3,"file":"Advertisement.js","sources":["components/Advertisement/Advertisement.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDov6aG555uuL3RrLW1pbmktcHJvZ3JhbS9jb21wb25lbnRzL0FkdmVydGlzZW1lbnQvQWR2ZXJ0aXNlbWVudC52dWU"],"sourcesContent":["<template>\r\n <view class=\"advertisement\">广告</view>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n.advertisement {\r\n width: 100%;\r\n height: 100rpx;\r\n background: #ffffff;\r\n}\r\n /* 样式定义 */\r\n</style>","import Component from 'D:/项目/tk-mini-program/components/Advertisement/Advertisement.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AAKI,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAET;AACJ;;;;;AChBJ,GAAG,gBAAgB,SAAS;"}
|
||||||
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/debug/GenerateTestUserSig.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/debug/GenerateTestUserSig.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"GenerateTestUserSig.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
||||||
File diff suppressed because one or more lines are too long
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/request.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/components/request.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"request.js","sources":["components/request.js"],"sourcesContent":["export default function request(urldata) {\r\n const {url, data, method, header,userInfo} = urldata;\r\n const baseUrl = \r\n \"http://192.168.0.218:8086\"\r\n +url;\r\n console.log(\"``````````````````````````````````\",userInfo);\r\n if (userInfo) {\r\n uni.getStorage({\r\n key: \"userinfo\",\r\n success: (res) => {\r\n if(res.data){\r\n if(res.data.nickName){\r\n return new Promise((resolve, reject) => {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n resolve(res.data);\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n });\r\n }else{\r\n uni.reLaunch({ url: \"/pages/UserInformation/UserInformation\"})\r\n }\r\n }else{\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n }\r\n }\r\n });\r\n }else{\r\n return new Promise((resolve, reject) => {\r\n uni.request({\r\n url: baseUrl,\r\n data: data,\r\n method: method,\r\n header: header,\r\n success: function (res) {\r\n resolve(res.data);\r\n },\r\n fail: function (res) {\r\n reject(res);\r\n }\r\n });\r\n });\r\n }\r\n\r\n}"],"names":["uni","res"],"mappings":";;AAAe,SAAS,QAAQ,SAAS;AACrC,QAAM,EAAC,KAAK,MAAM,QAAQ,QAAO,SAAQ,IAAI;AAC7C,QAAM,UACN,8BACC;AACDA,gBAAA,MAAA,MAAA,OAAA,8BAAY,sCAAqC,QAAQ;AACzD,MAAI,UAAU;AACVA,kBAAAA,MAAI,WAAW;AAAA,MACX,KAAK;AAAA,MACL,SAAS,CAAC,QAAQ;AACd,YAAG,IAAI,MAAK;AACR,cAAG,IAAI,KAAK,UAAS;AACjB,mBAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpCA,4BAAAA,MAAI,QAAQ;AAAA,gBACR,KAAK;AAAA,gBACL;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,SAAS,SAAUC,MAAK;AACpB,0BAAQA,KAAI,IAAI;AAAA,gBACnB;AAAA,gBACD,MAAM,SAAUA,MAAK;AACjB,yBAAOA,IAAG;AAAA,gBACb;AAAA,cACjC,CAA6B;AAAA,YAC7B,CAAyB;AAAA,UACzB,OAAyB;AACDD,0BAAAA,MAAI,SAAS,EAAE,KAAK,yCAAwC,CAAC;AAAA,UAChE;AAAA,QACrB,OAAqB;AACDA,wBAAAA,MAAI,WAAW,EAAE,KAAK,qBAAoB,CAAE;AAAA,QAC/C;AAAA,MACJ;AAAA,IACb,CAAW;AAAA,EACX,OAAS;AACA,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACrCA,oBAAAA,MAAI,QAAQ;AAAA,QACR,KAAK;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,SAAU,KAAK;AACpB,kBAAQ,IAAI,IAAI;AAAA,QACnB;AAAA,QACD,MAAM,SAAU,KAAK;AACjB,iBAAO,GAAG;AAAA,QACb;AAAA,MACjB,CAAa;AAAA,IACb,CAAS;AAAA,EACJ;AAEL;;"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\">\r\n <contentList></contentList>\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 topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n // this.requestSomething();\r\n },\r\n methods: {\r\n // requestSomething() {\r\n // wx.request({\r\n // url: \"http://192.168.0.218:8086/user/login\", // 请求的 URL\r\n // method: \"POST\", // 请求方式\r\n // success: (res) => {\r\n // console.log(\"请求成功\", res.data); // 处理成功的响应\r\n // },\r\n // fail: (err) => {\r\n // console.error(\"请求失败\", err); // 处理失败的响应\r\n // },\r\n // });\r\n // },\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n contentList,\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaR;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;ACjDA,GAAG,WAAW,eAAe;"}
|
{"version":3,"file":"Home.js","sources":["pages/Home/Home.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvSG9tZS9Ib21lLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"page\">\r\n <image src=\"../../static/HomeBackground.png\" class=\"HomeBackground\"></image>\r\n </view>\r\n <view class=\"top-navigation-container\">\r\n <top-navigation></top-navigation>\r\n </view>\r\n <view class=\"Advertisement\" @click=\"goAdvertisement\">\r\n <advertisement></advertisement>\r\n </view>\r\n <view class=\"contentList\">\r\n <contentList></contentList>\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 topNavigation from \"../../components/topNavigation/topNavigation\";\r\nimport Advertisement from \"../../components/Advertisement/Advertisement\";\r\nimport contentList from \"../../components/contentList/contentList\";\r\nimport tabBar from \"../../components/tabBar/tabBar\";\r\nexport default {\r\n data() {\r\n return {};\r\n },\r\n onLoad() {\r\n // this.requestSomething();\r\n },\r\n methods: {\r\n goAdvertisement(){\r\n uni.navigateTo({ url: '/pages/login/login' })\r\n }\r\n },\r\n components: {\r\n topNavigation,\r\n Advertisement,\r\n contentList,\r\n tabBar,\r\n },\r\n};\r\n</script>\r\n\r\n<style scoped>\r\n.page {\r\n position: relative;\r\n width: 750rpx;\r\n height: 1620rpx;\r\n}\r\n\r\n.HomeBackground {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n z-index: -1;\r\n}\r\n.top-navigation-container {\r\n position: fixed;\r\n top: 160rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 114.5rpx;\r\n}\r\n.Advertisement {\r\n position: fixed;\r\n top: 300rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 100rpx;\r\n z-index: 100;\r\n}\r\n.contentList {\r\n position: fixed;\r\n top: 400rpx;\r\n left: 0;\r\n width: 100%;\r\n height: 1300rpx;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Home/Home.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;;AAmBA,MAAO,gBAAe,MAAW;AACjC,MAAO,gBAAe,MAAW;AACjC,MAAO,cAAa,MAAW;AAC/B,eAAe,MAAW;AAC1B,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;EACR;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA,IACP,kBAAiB;AACfA,oBAAAA,MAAI,WAAW,EAAE,KAAK,sBAAsB;AAAA,IAC9C;AAAA,EACD;AAAA,EACD,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACH;;;;;;;;;;;;;;;;;;;;ACxCA,GAAG,WAAW,eAAe;"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"Mine.js","sources":["pages/Mine/Mine.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvTWluZS9NaW5lLnZ1ZQ"],"sourcesContent":["<template>\r\n <button @click=\"openChat\">OpenChat</button>\r\n </template>\r\n <script>\r\n export default {\r\n methods: {\r\n openChat() {\r\n // 1v1 chat: conversationID = `C2C${userID}`\r\n // group chat: conversationID = `GROUP${groupID}`\r\n const conversationID = 'C2Cqwe';\r\n uni.navigateTo({\r\n url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`\r\n });\r\n }\r\n }\r\n }\r\n </script>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Mine/Mine.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAII,MAAK,YAAU;AAAA,EACb,SAAS;AAAA,IACP,WAAW;AAGT,YAAM,iBAAiB;AACvBA,oBAAAA,MAAI,WAAW;AAAA,QACb,KAAK,mDAAmD,cAAc;AAAA,MACxE,CAAC;AAAA,IACH;AAAA,EACF;AACF;;;;;;;ACdJ,GAAG,WAAW,eAAe;"}
|
{"version":3,"file":"Mine.js","sources":["pages/Mine/Mine.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvTWluZS9NaW5lLnZ1ZQ"],"sourcesContent":["<template>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ttitle: 'Hello'\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\tuni.reLaunch({ url: \"/pages/UserInformation/UserInformation\"})\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t// 方法定义\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style scoped>\r\n\t/* 样式定义 */\r\n</style>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/Mine/Mine.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAIC,MAAK,YAAU;AAAA,EACd,OAAO;AACN,WAAO;AAAA,MACN,OAAO;AAAA,IACR;AAAA,EACA;AAAA,EACD,SAAS;AACRA,kBAAAA,MAAI,SAAS,EAAE,KAAK,yCAAwC,CAAC;AAAA,EAC7D;AAAA,EACD,SAAS;AAAA;AAAA,EAET;AACD;;;;;ACfD,GAAG,WAAW,eAAe;"}
|
||||||
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/UserInformation/UserInformation.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/UserInformation/UserInformation.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n /* 样式定义 */\r\n</style>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;AAII,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAET;AACJ;;;;;ACfJ,GAAG,WAAW,eAAe;"}
|
{"version":3,"file":"index.js","sources":["pages/index/index.vue","../../HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvaW5kZXgvaW5kZXgudnVl"],"sourcesContent":["<template>\r\n</template>\r\n\r\n<script>\r\n//此页面用于聊天的链接入口,请不要在这里添加内容,不要删除此页面,否则会导致编译失败\r\n//这里虽然看不出任何于聊天有关的内容,但为了防止编译失败,请保留此页面\r\n export default {\r\n data() {\r\n return {\r\n title: 'Hello'\r\n }\r\n },\r\n onLoad() {\r\n // 页面加载时执行\r\n },\r\n methods: {\r\n // 方法定义\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n /* 样式定义 */\r\n</style>","import MiniProgramPage from 'D:/项目/tk-mini-program/pages/index/index.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;AAMI,MAAK,YAAU;AAAA,EACX,OAAO;AACH,WAAO;AAAA,MACH,OAAO;AAAA,IACX;AAAA,EACH;AAAA,EACD,SAAS;AAAA,EAER;AAAA,EACD,SAAS;AAAA;AAAA,EAET;AACJ;;;;;ACjBJ,GAAG,WAAW,eAAe;"}
|
||||||
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
vendored
Normal file
1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/login/login.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/mp-weixin/app.js
vendored
2
unpackage/dist/dev/mp-weixin/app.js
vendored
@@ -5,6 +5,8 @@ if (!Math) {
|
|||||||
"./pages/Home/Home.js";
|
"./pages/Home/Home.js";
|
||||||
"./pages/Mine/Mine.js";
|
"./pages/Mine/Mine.js";
|
||||||
"./pages/index/index.js";
|
"./pages/index/index.js";
|
||||||
|
"./pages/login/login.js";
|
||||||
|
"./pages/UserInformation/UserInformation.js";
|
||||||
"./TUIKit/components/TUIConversation/index.js";
|
"./TUIKit/components/TUIConversation/index.js";
|
||||||
"./TUIKit/components/TUIChat/index.js";
|
"./TUIKit/components/TUIChat/index.js";
|
||||||
"./TUIKit/components/TUIChat/video-play.js";
|
"./TUIKit/components/TUIChat/video-play.js";
|
||||||
|
|||||||
5
unpackage/dist/dev/mp-weixin/app.json
vendored
5
unpackage/dist/dev/mp-weixin/app.json
vendored
@@ -2,7 +2,9 @@
|
|||||||
"pages": [
|
"pages": [
|
||||||
"pages/Home/Home",
|
"pages/Home/Home",
|
||||||
"pages/Mine/Mine",
|
"pages/Mine/Mine",
|
||||||
"pages/index/index"
|
"pages/index/index",
|
||||||
|
"pages/login/login",
|
||||||
|
"pages/UserInformation/UserInformation"
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
@@ -48,5 +50,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"permission": {},
|
||||||
"usingComponents": {}
|
"usingComponents": {}
|
||||||
}
|
}
|
||||||
@@ -6870,7 +6870,7 @@ function populateParameters(fromRes, toRes) {
|
|||||||
let _SDKVersion = SDKVersion;
|
let _SDKVersion = SDKVersion;
|
||||||
const hostLanguage = (language || "").replace(/_/g, "-");
|
const hostLanguage = (language || "").replace(/_/g, "-");
|
||||||
const parameters = {
|
const parameters = {
|
||||||
appId: "",
|
appId: "__UNI__A6CDB98",
|
||||||
appName: "tk-mini-program",
|
appName: "tk-mini-program",
|
||||||
appVersion: "1.0.0",
|
appVersion: "1.0.0",
|
||||||
appVersionCode: "100",
|
appVersionCode: "100",
|
||||||
@@ -7019,7 +7019,7 @@ const getAppBaseInfo = {
|
|||||||
hostName: _hostName,
|
hostName: _hostName,
|
||||||
hostSDKVersion: SDKVersion,
|
hostSDKVersion: SDKVersion,
|
||||||
hostTheme: theme,
|
hostTheme: theme,
|
||||||
appId: "",
|
appId: "__UNI__A6CDB98",
|
||||||
appName: "tk-mini-program",
|
appName: "tk-mini-program",
|
||||||
appVersion: "1.0.0",
|
appVersion: "1.0.0",
|
||||||
appVersionCode: "100",
|
appVersionCode: "100",
|
||||||
@@ -7770,7 +7770,7 @@ function isConsoleWritable() {
|
|||||||
function initRuntimeSocketService() {
|
function initRuntimeSocketService() {
|
||||||
const hosts = "192.168.0.107,127.0.0.1";
|
const hosts = "192.168.0.107,127.0.0.1";
|
||||||
const port = "8090";
|
const port = "8090";
|
||||||
const id = "mp-weixin_KIydzX";
|
const id = "mp-weixin_gcKgKG";
|
||||||
const lazy = typeof swan !== "undefined";
|
const lazy = typeof swan !== "undefined";
|
||||||
let restoreError = lazy ? () => {
|
let restoreError = lazy ? () => {
|
||||||
} : initOnError();
|
} : initOnError();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
.advertisement.data-v-b94d73cb {
|
.advertisement.data-v-b94d73cb {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 100rpx;
|
||||||
background: #ff0000;
|
background: #ffffff;
|
||||||
}
|
}
|
||||||
/* 样式定义 */
|
/* 样式定义 */
|
||||||
|
|||||||
14
unpackage/dist/dev/mp-weixin/components/debug/GenerateTestUserSig.js
vendored
Normal file
14
unpackage/dist/dev/mp-weixin/components/debug/GenerateTestUserSig.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
"use strict";
|
||||||
|
const components_debug_libGenerateTestUsersigEs_min = require("./lib-generate-test-usersig-es.min.js");
|
||||||
|
function genTestUserSig(config) {
|
||||||
|
const { SDKAPPID, SECRETKEY, userID } = config;
|
||||||
|
const EXPIRETIME = 604800;
|
||||||
|
const generator = new components_debug_libGenerateTestUsersigEs_min.LibGenerateTestUserSig(SDKAPPID, SECRETKEY, EXPIRETIME);
|
||||||
|
const userSig = generator.genTestUserSig(userID);
|
||||||
|
return {
|
||||||
|
sdkAppID: SDKAPPID,
|
||||||
|
userSig
|
||||||
|
};
|
||||||
|
}
|
||||||
|
exports.genTestUserSig = genTestUserSig;
|
||||||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/debug/GenerateTestUserSig.js.map
|
||||||
4290
unpackage/dist/dev/mp-weixin/components/debug/lib-generate-test-usersig-es.min.js
vendored
Normal file
4290
unpackage/dist/dev/mp-weixin/components/debug/lib-generate-test-usersig-es.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
53
unpackage/dist/dev/mp-weixin/components/request.js
vendored
Normal file
53
unpackage/dist/dev/mp-weixin/components/request.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../common/vendor.js");
|
||||||
|
function request(urldata) {
|
||||||
|
const { url, data, method, header, userInfo } = urldata;
|
||||||
|
const baseUrl = "http://192.168.0.218:8086" + url;
|
||||||
|
common_vendor.index.__f__("log", "at components/request.js:6", "``````````````````````````````````", userInfo);
|
||||||
|
if (userInfo) {
|
||||||
|
common_vendor.index.getStorage({
|
||||||
|
key: "userinfo",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.data) {
|
||||||
|
if (res.data.nickName) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
common_vendor.index.request({
|
||||||
|
url: baseUrl,
|
||||||
|
data,
|
||||||
|
method,
|
||||||
|
header,
|
||||||
|
success: function(res2) {
|
||||||
|
resolve(res2.data);
|
||||||
|
},
|
||||||
|
fail: function(res2) {
|
||||||
|
reject(res2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
common_vendor.index.reLaunch({ url: "/pages/UserInformation/UserInformation" });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
common_vendor.index.request({
|
||||||
|
url: baseUrl,
|
||||||
|
data,
|
||||||
|
method,
|
||||||
|
header,
|
||||||
|
success: function(res) {
|
||||||
|
resolve(res.data);
|
||||||
|
},
|
||||||
|
fail: function(res) {
|
||||||
|
reject(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.request = request;
|
||||||
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/request.js.map
|
||||||
18
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
18
unpackage/dist/dev/mp-weixin/pages/Home/Home.js
vendored
@@ -12,18 +12,9 @@ const _sfc_main = {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// requestSomething() {
|
goAdvertisement() {
|
||||||
// wx.request({
|
common_vendor.index.navigateTo({ url: "/pages/login/login" });
|
||||||
// url: "http://192.168.0.218:8086/user/login", // 请求的 URL
|
}
|
||||||
// method: "POST", // 请求方式
|
|
||||||
// success: (res) => {
|
|
||||||
// uni.__f__('log','at pages/Home/Home.vue:37',"请求成功", res.data); // 处理成功的响应
|
|
||||||
// },
|
|
||||||
// fail: (err) => {
|
|
||||||
// uni.__f__('error','at pages/Home/Home.vue:40',"请求失败", err); // 处理失败的响应
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
topNavigation,
|
topNavigation,
|
||||||
@@ -46,7 +37,8 @@ if (!Math) {
|
|||||||
}
|
}
|
||||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return {
|
return {
|
||||||
a: common_assets._imports_0$1
|
a: common_assets._imports_0$1,
|
||||||
|
b: common_vendor.o$1((...args) => $options.goAdvertisement && $options.goAdvertisement(...args))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7ffebbf4"]]);
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7ffebbf4"]]);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<view class="page data-v-7ffebbf4"><image src="{{a}}" class="HomeBackground data-v-7ffebbf4"></image></view><view class="top-navigation-container data-v-7ffebbf4"><top-navigation class="data-v-7ffebbf4" u-i="7ffebbf4-0" bind:__l="__l"></top-navigation></view><view class="Advertisement data-v-7ffebbf4"><advertisement class="data-v-7ffebbf4" u-i="7ffebbf4-1" bind:__l="__l"></advertisement></view><view class="contentList data-v-7ffebbf4"><content-list class="data-v-7ffebbf4" u-i="7ffebbf4-2" bind:__l="__l"></content-list></view><view class="tabBar data-v-7ffebbf4"><tab-bar class="data-v-7ffebbf4" u-i="7ffebbf4-3" bind:__l="__l"></tab-bar></view>
|
<view class="page data-v-7ffebbf4"><image src="{{a}}" class="HomeBackground data-v-7ffebbf4"></image></view><view class="top-navigation-container data-v-7ffebbf4"><top-navigation class="data-v-7ffebbf4" u-i="7ffebbf4-0" bind:__l="__l"></top-navigation></view><view class="Advertisement data-v-7ffebbf4" bindtap="{{b}}"><advertisement class="data-v-7ffebbf4" u-i="7ffebbf4-1" bind:__l="__l"></advertisement></view><view class="contentList data-v-7ffebbf4"><content-list class="data-v-7ffebbf4" u-i="7ffebbf4-2" bind:__l="__l"></content-list></view><view class="tabBar data-v-7ffebbf4"><tab-bar class="data-v-7ffebbf4" u-i="7ffebbf4-3" bind:__l="__l"></tab-bar></view>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
.contentList.data-v-7ffebbf4 {
|
.contentList.data-v-7ffebbf4 {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 300rpx;
|
top: 400rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1300rpx;
|
height: 1300rpx;
|
||||||
|
|||||||
21
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
21
unpackage/dist/dev/mp-weixin/pages/Mine/Mine.js
vendored
@@ -1,20 +1,21 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
const common_vendor = require("../../common/vendor.js");
|
const common_vendor = require("../../common/vendor.js");
|
||||||
const _sfc_main = {
|
const _sfc_main = {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: "Hello"
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
common_vendor.index.reLaunch({ url: "/pages/UserInformation/UserInformation" });
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openChat() {
|
// 方法定义
|
||||||
const conversationID = "C2Cqwe";
|
|
||||||
common_vendor.index.navigateTo({
|
|
||||||
url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return {
|
return {};
|
||||||
a: common_vendor.o$1((...args) => $options.openChat && $options.openChat(...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);
|
wx.createPage(MiniProgramPage);
|
||||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Mine/Mine.js.map
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Mine/Mine.js.map
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<button bindtap="{{a}}">OpenChat</button>
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
/* 样式定义 */
|
||||||
|
|||||||
102
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.js
vendored
Normal file
102
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.js
vendored
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const components_request = require("../../components/request.js");
|
||||||
|
const _sfc_main = {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userinfo: "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0",
|
||||||
|
name: "",
|
||||||
|
id: "",
|
||||||
|
info: {},
|
||||||
|
userSig: ""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
common_vendor.index.getStorage({
|
||||||
|
key: "userinfo",
|
||||||
|
success: (res) => {
|
||||||
|
this.id = res.data.id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
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
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const { code } = await common_vendor.index.login({
|
||||||
|
provider: "weixin",
|
||||||
|
onlyAuthorize: true
|
||||||
|
});
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:68", "code", code);
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:69", "code", this.name);
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:70", "code", this.userinfo);
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:71", "code", this.id);
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:72", "code", this.userSig);
|
||||||
|
const res = await components_request.request({
|
||||||
|
url: "/user/inputUserInfo",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
id: this.id,
|
||||||
|
headerIcon: this.userinfo,
|
||||||
|
nickName: this.name,
|
||||||
|
code,
|
||||||
|
usersig: this.userSig
|
||||||
|
},
|
||||||
|
userInfo: false
|
||||||
|
});
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:86", "res", res);
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "登录成功",
|
||||||
|
icon: "success"
|
||||||
|
});
|
||||||
|
common_vendor.index.__f__("log", "at pages/UserInformation/UserInformation.vue:92", "登录成功", res.data);
|
||||||
|
common_vendor.index.setStorageSync("userinfo", res.data.info);
|
||||||
|
} else {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "登录失败",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
common_vendor.index.__f__("error", "at pages/UserInformation/UserInformation.vue:115", "登录错误:", err);
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "请检查网络连接",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
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-35d730ef"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
||||||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/UserInformation/UserInformation.js.map
|
||||||
4
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "用户信息",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
1
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<view class="container data-v-35d730ef"><button class="login-btn data-v-35d730ef" open-type="chooseAvatar" bindchooseavatar="{{b}}"><image class="avatar data-v-35d730ef" src="{{a}}"></image></button><input type="nickname" class="weui-input data-v-35d730ef" placeholder="请输入昵称" bindblur="{{c}}"/><button class="weui-btn data-v-35d730ef" bindtap="{{d}}">登录</button></view>
|
||||||
33
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.wxss
vendored
Normal file
33
unpackage/dist/dev/mp-weixin/pages/UserInformation/UserInformation.wxss
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
.container.data-v-35d730ef {
|
||||||
|
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-35d730ef {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 0px;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.avatar.data-v-35d730ef {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.weui-input.data-v-35d730ef {
|
||||||
|
width: 80%;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
.weui-btn.data-v-35d730ef {
|
||||||
|
width: 40%;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
background-color: #11cb2a00;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
87
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
87
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const components_request = require("../../components/request.js");
|
||||||
|
const components_debug_GenerateTestUserSig = require("../../components/debug/GenerateTestUserSig.js");
|
||||||
|
const _sfc_main = {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: {},
|
||||||
|
info: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
common_vendor.index.getUserInfo({
|
||||||
|
provider: "weixin",
|
||||||
|
success: (res) => {
|
||||||
|
this.userInfo = res.userInfo;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取手机号
|
||||||
|
async getPhoneNumber(e) {
|
||||||
|
common_vendor.index.showLoading({
|
||||||
|
title: "登录中...",
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const res = await components_request.request({
|
||||||
|
url: "/user/loginWithPhoneNumber",
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
code: e.detail.code
|
||||||
|
},
|
||||||
|
userInfo: false
|
||||||
|
});
|
||||||
|
common_vendor.index.__f__("log", "at pages/login/login.vue:46", "登录结果:", 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({
|
||||||
|
SDKAPPID: sdkAppID,
|
||||||
|
SECRETKEY: this.info.data.chatInfo.appKey,
|
||||||
|
userID
|
||||||
|
});
|
||||||
|
common_vendor.index.setStorageSync("userSig", userSig);
|
||||||
|
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||||
|
common_vendor.index.reLaunch({
|
||||||
|
url: "/pages/UserInformation/UserInformation"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
common_vendor.index.setStorageSync("userinfo", this.info.data.info);
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
common_vendor.index.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
// 返回层级(默认值为 1)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "登录失败",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
common_vendor.index.__f__("error", "at pages/login/login.vue:87", "登录错误:", err);
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "请检查网络连接",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
|
return {
|
||||||
|
a: $data.userInfo.avatarUrl,
|
||||||
|
b: common_vendor.t($data.userInfo.nickName),
|
||||||
|
c: common_vendor.o$1((...args) => $options.getPhoneNumber && $options.getPhoneNumber(...args))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
||||||
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/login.js.map
|
||||||
4
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "登录",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<view class="container"><image class="logo" src="{{a}}"></image><view class="nickname">{{b}}</view><button class="login-btn" open-type="getPhoneNumber" bindgetphonenumber="{{c}}"> 使用微信登录 </button></view>
|
||||||
35
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
35
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(to bottom, #11cb2a6e, #2574fc6d);
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.nickname {
|
||||||
|
width: 300rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 0px;
|
||||||
|
padding: 20rpx 40rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
.login-btn {
|
||||||
|
background-color: hsla(0, 0%, 100%, 0);
|
||||||
|
border: 1px solid #00ff0000;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.tips {
|
||||||
|
color: #666;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
@@ -6,14 +6,14 @@
|
|||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"es6": true,
|
"es6": true,
|
||||||
"postcss": false,
|
"postcss": true,
|
||||||
"minified": false,
|
"minified": true,
|
||||||
"newFeature": true,
|
"newFeature": true,
|
||||||
"bigPackageSizeSupport": true
|
"bigPackageSizeSupport": true
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "",
|
"libVersion": "",
|
||||||
"appid": "touristappid",
|
"appid": "wx0af70c44ad1939e9",
|
||||||
"projectname": "tk-mini-program",
|
"projectname": "tk-mini-program",
|
||||||
"condition": {
|
"condition": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
3
unpackage/dist/dev/mp-weixin/project.private.config.json
vendored
Normal file
3
unpackage/dist/dev/mp-weixin/project.private.config.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"libVersion": "2.25.4"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user