Commit 9ca3e5e9 by 匡雅琴

Merge branch 'kuangyq_v2.10.0' of http://192.168.3.233:8090/saas/mini-program/ai…

…-card into kuangyq_v2.10.0
2 parents 4262a513 efede916
// components/UserInfo/UserInfo.js
import { componentsMixin } from '../../mixins/index'
Component({
behaviors:[componentsMixin],
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
......
<text>这里是用户信息组件</text>
\ No newline at end of file
<view class="user-wrapper">
<view class="user-info">
<view class="user-company">
<image webp src="{{IMGURL}}/home/logo.png"></image>
<text>汽车流通行业数字化运营服务商</text>
</view>
</view>
</view>
\ No newline at end of file
.user-wrapper {
padding: 24rpx 32rpx 32rpx;
background-color: #fff;
}
.user-info {
height: 416rpx;
padding: 40rpx 52rpx;
box-shadow: 0 12rpx 32rpx 0 rgba(147, 160, 194, .35);
border-radius: 16rpx;
}
.user-company {
display: flex;
align-items: center;
}
.user-company image {
width: 112rpx;
height: 24rpx;
}
.user-company text {
font-size: 18rpx;
line-height: 24rpx;
color: #2d2d33;
margin-left: 16rpx;
}
\ No newline at end of file
/*
* @Description:
* @Author: huyue
* @Date: 2022-09-01 11:28:34
* @LastEditors: huyue
* @LastEditTime: 2022-09-01 17:31:43
*/
module.exports = Behavior({
lifetimes: {
attached() {
......
import componentsMixin from './componentsMixin'
module.exports = {
componentsMixin
}
\ No newline at end of file
{
"usingComponents": {
"user-info": "../../../components/UserInfo/UserInfo"
}
},
"navigationBarTitleText": "广联数科智能名片"
}
\ No newline at end of file
......@@ -42,6 +42,20 @@ class Router {
wx.onAppRoute(e => {
let thisPage = this.getPageInstance()
if (thisPage) {
if (!wx.$version) util.getImgVersion().then(({
version
}) => {
wx.$version = version || '1.0.0'
thisPage.setData({
img_version: wx.$version
})
})
else thisPage.setData({
img_version: wx.$version,
})
thisPage.setData({
IMGURL: wx.$imgUrl
})
this.setNavigationBarTitleText(thisPage)
let onRoute = thisPage.onRoute
thisPage.$query = this[_query]
......
import $router from '../router/index'
import {
commonApi
} from '../api/api'
/**emoji正则 */
const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac])/g
/**
* 日期格式化
* let time = new Date().format('yyyy-MM-dd hh:mm:ss') //log 2020-07-31 10:00:00
*/
const getImgVersion = () => {
return commonApi.getImgVersion()
}
Date.prototype.format = function (fmt) {
let o = {
"M+": this.getMonth() + 1, //月份
......@@ -398,6 +404,7 @@ const Util = {
setUserInfo,
showLoading,
hideLoading,
getImgVersion,
getViewInfo,
setCopyData,
getSceneId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!