This commit is contained in:
XiaoMo 2025-04-08 15:52:52 +08:00
parent 8001f8eaeb
commit bb3f1aaa6e
6 changed files with 61 additions and 11 deletions

View File

@ -19,7 +19,7 @@ Page({
img: "https://jm-static.v0750.com/image/xi.png", img: "https://jm-static.v0750.com/image/xi.png",
name: "洗车教程", name: "洗车教程",
dsc:"规范洗车,轻松安全", dsc:"规范洗车,轻松安全",
url: "webview/webview?url=https://jmqf.v0750.com/video", url: "webview/webview?url=https://t-jm.v0750.com/video",
needlogin: !1 needlogin: !1
}, { }, {
img: "https://jm-static.v0750.com/image/dui.png", img: "https://jm-static.v0750.com/image/dui.png",
@ -192,7 +192,7 @@ Page({
success: function(i) { success: function(i) {
console.log(i), wx.showLoading({ console.log(i), wx.showLoading({
title: "" title: ""
}), e.globalData.qrcode = i.result, t.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(t) { }), e.globalData.qrcode = i.result, t.request("https://t-jm.v0750.com/miniprogram/identify", i, !0).then(function(t) {
console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode, console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode,
a.setData({ a.setData({
isScan: !!t.data.devicecode isScan: !!t.data.devicecode
@ -264,7 +264,7 @@ Page({
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: this.data.tmplIds, tmplIds: this.data.tmplIds,
success: function(e) { success: function(e) {
console.log("requestSubscribeMessage", e), t.request("https://jmqf.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {}); console.log("requestSubscribeMessage", e), t.request("https://t-jm.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {});
}, },
fail: function(e) { fail: function(e) {
console.log("requestSubscribeMessagefail", e); console.log("requestSubscribeMessagefail", e);

View File

@ -56,5 +56,55 @@ Page({
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: "" + t.globalData.servicetel phoneNumber: "" + t.globalData.servicetel
}); });
},
updateUserAvatar: function() {
var that = this;
wx.getUserProfile({
desc: '用于更新您的头像',
success: function(res) {
var userInfo = res.userInfo;
e.request('miniprogram/user/update', {
avatar: userInfo.avatarUrl
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
title: '头像更新成功',
icon: 'success'
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
});
}
});
},
updateUserNickname: function() {
var that = this;
wx.getUserProfile({
desc: '用于更新您的昵称',
success: function(res) {
var userInfo = res.userInfo;
e.request('miniprogram/user/update', {
nickname: userInfo.nickName
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
title: '昵称更新成功',
icon: 'success'
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
});
}
});
} }
}); });

View File

@ -2,12 +2,12 @@
<page-loding wx:if="{{showLoding}}"></page-loding> <page-loding wx:if="{{showLoding}}"></page-loding>
<view class="page-top"> <view class="page-top">
<view class="user-info"> <view class="user-info">
<view class="avatar"> <view class="avatar" bindtap="updateUserAvatar">
<image src="{{user.avatar}}"></image> <image src="{{user.avatar}}"></image>
</view> </view>
<view class="info"> <view class="info">
<view class="left"> <view class="left">
<view class="username">{{user.nickname}}</view> <view class="username" bindtap="updateUserNickname">{{user.nickname}}</view>
<view class="tel">{{user.mobile}}</view> <view class="tel">{{user.mobile}}</view>
</view> </view>
<view class="right"> <view class="right">

View File

@ -77,7 +77,7 @@ Page({
success: function(i) { success: function(i) {
wx.showLoading({ wx.showLoading({
title: "" title: ""
}), t.globalData.qrcode = i.result, e.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(e) { }), t.globalData.qrcode = i.result, e.request("https://t-jm.v0750.com/miniprogram/identify", i, !0).then(function(e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({ if (wx.hideLoading(), 200 != e.code) return wx.showModal({
title: "提示", title: "提示",
content: e.message content: e.message

View File

@ -1,6 +1,6 @@
{ {
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "jmapp", "projectname": "JMApp",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false "urlCheck": false

View File

@ -78,7 +78,7 @@ function n(a) {
} }
function c(e, a) { function c(e, a) {
console.log("appstart", e), o = a, n("https://jmqf.v0750.com/miniprogram", { console.log("appstart", e), o = a, n("https://t-jm.v0750.com/miniprogram", {
code: e code: e
}, !0).then(function(e) { }, !0).then(function(e) {
var o = e.data; var o = e.data;
@ -89,7 +89,7 @@ function c(e, a) {
} }
module.exports = { module.exports = {
initial_url: "https://jmqf.v0750.com/miniprogram", initial_url: "https://t-jm.v0750.com/miniprogram",
login: t, login: t,
request: n, request: n,
pageStart: function(e) { pageStart: function(e) {
@ -106,9 +106,9 @@ module.exports = {
c(res.code, e); c(res.code, e);
}); });
}, },
baseUrl: "https://jmqf.v0750.com/", baseUrl: "https://t-jm.v0750.com/",
getDevicecode: function(e, a) { getDevicecode: function(e, a) {
o = e, n("https://jmqf.v0750.com/miniprogram/identify/reload", a, !0).then(function(e) { o = e, n("https://t-jm.v0750.com/miniprogram/identify/reload", a, !0).then(function(e) {
var a = e.data; var a = e.data;
console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode; console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
}); });