Commit b36a4cf9 by 王志慧

Merge branch 'SAAS+V4.42' of http://192.168.3.233:8090/saas_plus/dj-car-boutique…

…-work-wechat into SAAS+V4.42
2 parents ecc9118f 41ce4bdc
...@@ -37,7 +37,8 @@ export default { ...@@ -37,7 +37,8 @@ export default {
data, data,
[], [],
"/router/enhancement/1.0.0", "/router/enhancement/1.0.0",
"AI" "AI",
false
); );
}, },
//根据提供的历史消息、用户ID、批次ID和持续时间,获取销售能力模拟评测的结果,并将结果数据存储数据库。 //根据提供的历史消息、用户ID、批次ID和持续时间,获取销售能力模拟评测的结果,并将结果数据存储数据库。
......
...@@ -123,7 +123,7 @@ Component({ ...@@ -123,7 +123,7 @@ Component({
"pitch_ratio": 1.0, "pitch_ratio": 1.0,
}, },
"request": { "request": {
"reqid": uuid, "reqid": uuid + Date.now(),
"text": text, "text": text,
"text_type": "plain", "text_type": "plain",
"operation": "query", "operation": "query",
......
...@@ -119,6 +119,10 @@ Page({ ...@@ -119,6 +119,10 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {
const {roleName} = options;
if(roleName) {
this.setData({show:true})
}
const { const {
aiPhone aiPhone
} = await setConfigInfo({}); } = await setConfigInfo({});
......
...@@ -89,9 +89,10 @@ const domain_items = { ...@@ -89,9 +89,10 @@ const domain_items = {
merchants: "https://commodity.glsx.com.cn", merchants: "https://commodity.glsx.com.cn",
}, },
preRelease: { preRelease: {
dj: "https://dj.beta.glsx.com.cn", dj: "http://dj.beta.glsx.com.cn",
scrm: "https://scrm.beta.glsx.com.cn", scrm: "https://scrm.beta.glsx.com.cn",
merchants: "https://rop-merchant.beta.glsx.com.cn", merchants: "http://rop-merchant.beta.glsx.com.cn",
AI: 'https://aipractice.beta.glsx.com.cn',
}, },
cdptest: { cdptest: {
dj: "https://cdptest.glsx.com.cn", dj: "https://cdptest.glsx.com.cn",
......
...@@ -9,13 +9,13 @@ import util from '~/utils/util.js' ...@@ -9,13 +9,13 @@ import util from '~/utils/util.js'
import qs from '~/utils/lib/qs' import qs from '~/utils/lib/qs'
/**接口 */ /**接口 */
class Request { class Request {
get(method, data, noSignAttr, requestPath, domainName) { get(method, data, noSignAttr, requestPath, domainName,failTips) {
return this.request('GET', method, data, noSignAttr, requestPath, domainName) return this.request('GET', method, data, noSignAttr, requestPath, domainName,failTips)
} }
post(method, data, noSignAttr, requestPath, domainName) { post(method, data, noSignAttr, requestPath, domainName,failTips) {
return this.request('POST', method, data, noSignAttr, requestPath, domainName) return this.request('POST', method, data, noSignAttr, requestPath, domainName,failTips)
} }
request(RequestMethods, method, data, noSignAttr = [], requestPath, domainName = 'dj') { request(RequestMethods, method, data, noSignAttr = [], requestPath, domainName = 'dj',failTips = true) {
let _this = this let _this = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
...@@ -82,10 +82,12 @@ class Request { ...@@ -82,10 +82,12 @@ class Request {
fail(error) { fail(error) {
wx.hideLoading() wx.hideLoading()
console.error(`接口异常:${domain[domainName]}${requestPath || path}?method=${method}`, error) console.error(`接口异常:${domain[domainName]}${requestPath || path}?method=${method}`, error)
wx.showToast({ if(failTips) {
title: '系统异常', wx.showToast({
icon: 'error' title: '系统异常',
}) icon: 'error'
})
}
reject(error) reject(error)
}, },
complete() { complete() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!