Commit 7d4a318d by 前端

对练需求

1 parent 61c0c75c
...@@ -8,7 +8,7 @@ module.exports = { ...@@ -8,7 +8,7 @@ module.exports = {
}, },
/**微信登录 */ /**微信登录 */
ssoLogin(data) { ssoLogin(data) {
return api.post("scrm.api.sso.weapp.jscode.login", data, [], return api.post("scrm.api.sso.weapp.jscode.getOpenId", data, [],
"/rop-scrm-sso/router", "/rop-scrm-sso/router",
"scrm",false); "scrm",false);
}, },
......
...@@ -174,33 +174,25 @@ Page({ ...@@ -174,33 +174,25 @@ Page({
}) })
.exec(); .exec();
}, },
setRemind() {
wx.requestSubscribeMessage({
tmplIds: ["ctivVQAIoDzv1OKlcI9cXiJpyKZBUP1XamO8sBP8ij0"],
success(res) {
wx.showToast({
title: "订阅成功",
icon: "none",
});
wx.p.router.back();
},
});
},
/** /**
* 生命周期函数--监听页面加载+ * 生命周期函数--监听页面加载+
* *
*/ */
async onLoad(options) { async onLoad(options) {
this.setRemind(); let {
const {
duration,
batch_id,
roleType, roleType,
id, id,
sparringLink, sparringLink,
sparringTaskId, sparringTaskId,
entry, entry,
} = options; } = options;
this.getAvatar(roleType);
if(entry == "notice") {
this.setData({
backStatus:true
})
entry = 'other'
}
this.setData({ this.setData({
id, id,
entry, entry,
...@@ -208,10 +200,6 @@ Page({ ...@@ -208,10 +200,6 @@ Page({
sparringLink, sparringLink,
sparringTaskId, sparringTaskId,
}); });
this.getAvatar(roleType);
const { uuid } = wx.$util.getUserInfo();
if (id) {
this.setData({ this.setData({
duration: false, duration: false,
}); });
...@@ -219,18 +207,7 @@ Page({ ...@@ -219,18 +207,7 @@ Page({
this.getChatDetail({ this.getChatDetail({
id, id,
}); });
} else {
const history_message = wx.getStorageSync("history_message");
const sensitiveRes = await aiApi.getSensitive({
history_message,
});
const is_sensitive = sensitiveRes.is_sensitive;
const chatList = JSON.parse(wx.getStorageSync("chatList"));
this.setData({
chatList,
});
this.handleSave(chatList, duration, is_sensitive);
}
console.log(windowW); console.log(windowW);
}, },
......
<!-- packageEquity/pages/aiCheck/result/result.wxml --> <!-- packageEquity/pages/aiCheck/result/result.wxml -->
<view class="bg"></view> <view class="bg"></view>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{ true }}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{ backStatus?false:true }}" bindback="back">
<view class="navigation-title"> <view class="navigation-title">
<view class="result-title"> <view class="result-title">
<view wx:for="{{resultTab}}" wx:key="{{item.id}}" class="result-bar {{tabId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="handleRuselt"> <view wx:for="{{resultTab}}" wx:key="{{item.id}}" class="result-bar {{tabId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="handleRuselt">
......
...@@ -66,7 +66,7 @@ class Request { ...@@ -66,7 +66,7 @@ class Request {
if (thisPage.route != 'pages/wxLogin/wxLogin') { if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true) getApp().login(true)
} }
} else if (code == -1 && failTips) { } else if (code == -1) {
wx.showToast({ wx.showToast({
title: message || '网络请求失败', title: message || '网络请求失败',
icon: 'none' icon: 'none'
......
...@@ -114,7 +114,7 @@ const setOpenId = openId => { ...@@ -114,7 +114,7 @@ const setOpenId = openId => {
wx.setStorageSync('dj_boutique_openId', openId) wx.setStorageSync('dj_boutique_openId', openId)
} }
const getOpenId = () => { const getOpenId = () => {
wx.getStorageSync('dj_boutique_openId', openId) return wx.getStorageSync('dj_boutique_openId')
} }
const removeStorage = () => { const removeStorage = () => {
wx.removeStorageSync('noSignInUuid') wx.removeStorageSync('noSignInUuid')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!