Commit cc97d89a by 黄静

hj

parent 076b8174
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" /> <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<recent name="$PROJECT_DIR$/flask/conf" /> <recent name="$PROJECT_DIR$/flask/conf" />
</key> </key>
</component> </component>
<component name="RunManager" selected="Python.user_behavior"> <component name="RunManager" selected="Python.main">
<configuration name="company_basic" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> <configuration name="company_basic" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="recommendation" /> <module name="recommendation" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.user_behavior" />
<item itemvalue="Python.main" /> <item itemvalue="Python.main" />
<item itemvalue="Python.user_behavior" />
<item itemvalue="Python.company_basic" /> <item itemvalue="Python.company_basic" />
<item itemvalue="Python.company_es" /> <item itemvalue="Python.company_es" />
<item itemvalue="Python.mod_db" /> <item itemvalue="Python.mod_db" />
...@@ -173,48 +173,53 @@ ...@@ -173,48 +173,53 @@
<workItem from="1587352427758" duration="7427000" /> <workItem from="1587352427758" duration="7427000" />
<workItem from="1587433007175" duration="571000" /> <workItem from="1587433007175" duration="571000" />
<workItem from="1587437264430" duration="2651000" /> <workItem from="1587437264430" duration="2651000" />
<workItem from="1588754339665" duration="838000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" /> <option name="version" value="2" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state width="562" height="466" key="DebuggerActiveHint" timestamp="1587029725739"> <state width="562" height="466" key="DebuggerActiveHint" timestamp="1587029725739">
<screen x="0" y="23" width="1680" height="972" /> <screen x="0" y="23" width="1680" height="972" />
</state> </state>
<state width="562" height="466" key="DebuggerActiveHint/0.23.1680.972@0.23.1680.972" timestamp="1587029725739" /> <state width="562" height="466" key="DebuggerActiveHint/0.23.1680.972@0.23.1680.972" timestamp="1587029725739" />
<state width="1638" height="229" key="GridCell.Tab.0.bottom" timestamp="1587456914197"> <state width="914" height="282" key="GridCell.Tab.0.bottom" timestamp="1588755181972">
<screen x="0" y="23" width="1680" height="970" /> <screen x="0" y="0" width="1920" height="1040" />
</state> </state>
<state width="1638" height="229" key="GridCell.Tab.0.bottom/0.0.1680.993@0.0.1680.993" timestamp="1587364538708" /> <state width="1638" height="229" key="GridCell.Tab.0.bottom/0.0.1680.993@0.0.1680.993" timestamp="1587364538708" />
<state width="914" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1588755181972" />
<state width="1345" height="260" key="GridCell.Tab.0.bottom/0.23.1680.967@0.23.1680.967" timestamp="1587114865120" /> <state width="1345" height="260" key="GridCell.Tab.0.bottom/0.23.1680.967@0.23.1680.967" timestamp="1587114865120" />
<state width="1638" height="229" key="GridCell.Tab.0.bottom/0.23.1680.970@0.23.1680.970" timestamp="1587456914197" /> <state width="1638" height="229" key="GridCell.Tab.0.bottom/0.23.1680.970@0.23.1680.970" timestamp="1587456914197" />
<state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.971@0.23.1680.971" timestamp="1587028755730" /> <state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.971@0.23.1680.971" timestamp="1587028755730" />
<state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.972@0.23.1680.972" timestamp="1587029936244" /> <state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.972@0.23.1680.972" timestamp="1587029936244" />
<state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.975@0.23.1680.975" timestamp="1587040846953" /> <state width="1345" height="321" key="GridCell.Tab.0.bottom/0.23.1680.975@0.23.1680.975" timestamp="1587040846953" />
<state width="1638" height="229" key="GridCell.Tab.0.center" timestamp="1587456914196"> <state width="914" height="282" key="GridCell.Tab.0.center" timestamp="1588755181972">
<screen x="0" y="23" width="1680" height="970" /> <screen x="0" y="0" width="1920" height="1040" />
</state> </state>
<state width="1638" height="229" key="GridCell.Tab.0.center/0.0.1680.993@0.0.1680.993" timestamp="1587364538707" /> <state width="1638" height="229" key="GridCell.Tab.0.center/0.0.1680.993@0.0.1680.993" timestamp="1587364538707" />
<state width="914" height="282" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1588755181972" />
<state width="1345" height="260" key="GridCell.Tab.0.center/0.23.1680.967@0.23.1680.967" timestamp="1587114865119" /> <state width="1345" height="260" key="GridCell.Tab.0.center/0.23.1680.967@0.23.1680.967" timestamp="1587114865119" />
<state width="1638" height="229" key="GridCell.Tab.0.center/0.23.1680.970@0.23.1680.970" timestamp="1587456914196" /> <state width="1638" height="229" key="GridCell.Tab.0.center/0.23.1680.970@0.23.1680.970" timestamp="1587456914196" />
<state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.971@0.23.1680.971" timestamp="1587028755729" /> <state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.971@0.23.1680.971" timestamp="1587028755729" />
<state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.972@0.23.1680.972" timestamp="1587029936243" /> <state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.972@0.23.1680.972" timestamp="1587029936243" />
<state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.975@0.23.1680.975" timestamp="1587040846953" /> <state width="1345" height="321" key="GridCell.Tab.0.center/0.23.1680.975@0.23.1680.975" timestamp="1587040846953" />
<state width="1638" height="229" key="GridCell.Tab.0.left" timestamp="1587456914195"> <state width="914" height="282" key="GridCell.Tab.0.left" timestamp="1588755181972">
<screen x="0" y="23" width="1680" height="970" /> <screen x="0" y="0" width="1920" height="1040" />
</state> </state>
<state width="1638" height="229" key="GridCell.Tab.0.left/0.0.1680.993@0.0.1680.993" timestamp="1587364538706" /> <state width="1638" height="229" key="GridCell.Tab.0.left/0.0.1680.993@0.0.1680.993" timestamp="1587364538706" />
<state width="914" height="282" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1588755181972" />
<state width="1345" height="260" key="GridCell.Tab.0.left/0.23.1680.967@0.23.1680.967" timestamp="1587114865119" /> <state width="1345" height="260" key="GridCell.Tab.0.left/0.23.1680.967@0.23.1680.967" timestamp="1587114865119" />
<state width="1638" height="229" key="GridCell.Tab.0.left/0.23.1680.970@0.23.1680.970" timestamp="1587456914195" /> <state width="1638" height="229" key="GridCell.Tab.0.left/0.23.1680.970@0.23.1680.970" timestamp="1587456914195" />
<state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.971@0.23.1680.971" timestamp="1587028755729" /> <state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.971@0.23.1680.971" timestamp="1587028755729" />
<state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.972@0.23.1680.972" timestamp="1587029936243" /> <state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.972@0.23.1680.972" timestamp="1587029936243" />
<state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.975@0.23.1680.975" timestamp="1587040846952" /> <state width="1345" height="321" key="GridCell.Tab.0.left/0.23.1680.975@0.23.1680.975" timestamp="1587040846952" />
<state width="1638" height="229" key="GridCell.Tab.0.right" timestamp="1587456914196"> <state width="914" height="282" key="GridCell.Tab.0.right" timestamp="1588755181972">
<screen x="0" y="23" width="1680" height="970" /> <screen x="0" y="0" width="1920" height="1040" />
</state> </state>
<state width="1638" height="229" key="GridCell.Tab.0.right/0.0.1680.993@0.0.1680.993" timestamp="1587364538707" /> <state width="1638" height="229" key="GridCell.Tab.0.right/0.0.1680.993@0.0.1680.993" timestamp="1587364538707" />
<state width="914" height="282" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1588755181972" />
<state width="1345" height="260" key="GridCell.Tab.0.right/0.23.1680.967@0.23.1680.967" timestamp="1587114865120" /> <state width="1345" height="260" key="GridCell.Tab.0.right/0.23.1680.967@0.23.1680.967" timestamp="1587114865120" />
<state width="1638" height="229" key="GridCell.Tab.0.right/0.23.1680.970@0.23.1680.970" timestamp="1587456914196" /> <state width="1638" height="229" key="GridCell.Tab.0.right/0.23.1680.970@0.23.1680.970" timestamp="1587456914196" />
<state width="1345" height="321" key="GridCell.Tab.0.right/0.23.1680.971@0.23.1680.971" timestamp="1587028755730" /> <state width="1345" height="321" key="GridCell.Tab.0.right/0.23.1680.971@0.23.1680.971" timestamp="1587028755730" />
...@@ -294,10 +299,11 @@ ...@@ -294,10 +299,11 @@
</breakpoint-manager> </breakpoint-manager>
</component> </component>
<component name="com.intellij.coverage.CoverageDataManagerImpl"> <component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/entprofile$main.coverage" NAME="main Coverage Results" MODIFIED="1588755009484" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/recommendation$mod_db.coverage" NAME="mod_db Coverage Results" MODIFIED="1587358120537" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/db" /> <SUITE FILE_PATH="coverage/recommendation$mod_db.coverage" NAME="mod_db Coverage Results" MODIFIED="1587358120537" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/db" />
<SUITE FILE_PATH="coverage/recommendation$main.coverage" NAME="main Coverage Results" MODIFIED="1587437271477" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/recommendation$company_basic.coverage" NAME="company_basic Coverage Results" MODIFIED="1587363152092" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/service" />
<SUITE FILE_PATH="coverage/recommendation$company_es.coverage" NAME="company_es Coverage Results" MODIFIED="1587358210574" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/dao" /> <SUITE FILE_PATH="coverage/recommendation$company_es.coverage" NAME="company_es Coverage Results" MODIFIED="1587358210574" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/dao" />
<SUITE FILE_PATH="coverage/recommendation$company_basic.coverage" NAME="company_basic Coverage Results" MODIFIED="1587363152092" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/service" />
<SUITE FILE_PATH="coverage/recommendation$main.coverage" NAME="main Coverage Results" MODIFIED="1587437271477" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/recommendation$user_behavior.coverage" NAME="user_behavior Coverage Results" MODIFIED="1587456914187" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/user_behavior" /> <SUITE FILE_PATH="coverage/recommendation$user_behavior.coverage" NAME="user_behavior Coverage Results" MODIFIED="1587456914187" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/user_behavior" />
</component> </component>
</project> </project>
\ No newline at end of file
(function(e){function t(t){for(var r,o,c=t[0],i=t[1],s=t[2],l=0,f=[];l<c.length;l++)o=c[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&f.push(a[o][0]),a[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);p&&p(t);while(f.length)f.shift()();return u.push.apply(u,s||[]),n()}function n(){for(var e,t=0;t<u.length;t++){for(var n=u[t],r=!0,o=1;o<n.length;o++){var c=n[o];0!==a[c]&&(r=!1)}r&&(u.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={app:0},a={app:0},u=[];function c(e){return i.p+"assets/js/"+({}[e]||e)+"."+{"chunk-15340143":"1942c530"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-15340143":1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="assets/css/"+({}[e]||e)+"."+{"chunk-15340143":"9594b44b"}[e]+".css",a=i.p+r,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var s=u[c],l=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===r||l===a))return t()}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){s=f[c],l=s.getAttribute("data-href");if(l===r||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var r=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=r,delete o[e],p.parentNode.removeChild(p),n(u)},p.href=a;var d=document.getElementsByTagName("head")[0];d.appendChild(p)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var u=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=u);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.src=c(e);var f=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(p);var n=a[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",f.name="ChunkLoadError",f.type=r,f.request=o,n[1](f)}a[e]=void 0}};var p=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var f=0;f<s.length;f++)t(s[f]);var p=l;u.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";var r=n("85ec"),o=n.n(r);o.a},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=n("2b0e"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},a=[],u={name:"App",components:{}},c=u,i=(n("034f"),n("2877")),s=Object(i["a"])(c,o,a,!1,null,null,null),l=s.exports,f=(n("d3b7"),n("8c4f"));r["default"].use(f["a"]);var p=new f["a"]({routes:[{path:"/:companyName",component:function(){return n.e("chunk-15340143").then(n.bind(null,"8799"))}}]}),d=p,h=n("2f62");r["default"].use(h["a"]);var m=new h["a"].Store({state:{},mutations:{},actions:{},modules:{}}),v=n("5c96"),g=n.n(v);r["default"].use(g.a),r["default"].config.productionTip=!1,new r["default"]({router:d,store:m,render:function(e){return e(l)}}).$mount("#app")},"85ec":function(e,t,n){}});
//# sourceMappingURL=app.57bca242.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pymysql import pymysql
import json import json
from flask import Flask, render_template, request from flask import Flask, render_template, request
...@@ -9,15 +11,24 @@ def talk(recommendId): ...@@ -9,15 +11,24 @@ def talk(recommendId):
cur = connection.cursor() cur = connection.cursor()
try: try:
list_test=[] list_test=[]
update_sql='UPDATE tj_talking t1 ,tj_recommend_do_status t2 set t1.recommend_id=t2.recommend_id where t1.recommend_product=t2.product_name' select_name_sql='SELECT product_name FROM `tj_recommend_do_status` where recommend_id ="%s"'%(recommendId)
cur.execute(update_sql) #update_sql='UPDATE tj_talking t1 ,tj_recommend_do_status t2 set t1.recommend_id=t2.recommend_id where t1.recommend_product=t2.product_name'
connection.commit() cur.execute(select_name_sql)
select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_id="%s"'%(recommendId) name=cur.fetchone()
print(name)
#connection.commit()
select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s"'%(name)
cur.execute(select_sql) cur.execute(select_sql)
s=cur.fetchone() s=cur.fetchone()
for i in range(0,len(s)): for i in range(0,len(s)):
list_test.append(s[i]) list_test.append(s[i])
print(list_test) print(list_test)
# if s:
# for i in range(0,len(s)):
# list_test.append(s[i])
# print(list_test)
# else:
# list_test.append('暂无话术,感谢您')
cur.close() cur.close()
connection.close() connection.close()
return True,list_test return True,list_test
...@@ -31,7 +42,7 @@ def talkName(recommend_product): ...@@ -31,7 +42,7 @@ def talkName(recommend_product):
cur = connection.cursor() cur = connection.cursor()
try: try:
list_test=[] list_test=[]
select_sql='select start_text,res_text,mq_text,end_text from tj_talking where recommend_product="%s"'%(recommend_product) select_sql='select start_text,res_text,mq_text,end_text from tj_talking where commerce_product="%s"'%(recommend_product)
cur.execute(select_sql) cur.execute(select_sql)
s=cur.fetchone() s=cur.fetchone()
for i in range(0,len(s)): for i in range(0,len(s)):
...@@ -46,40 +57,26 @@ def talkName(recommend_product): ...@@ -46,40 +57,26 @@ def talkName(recommend_product):
return False,{} return False,{}
# 服务器接口API # 服务器接口API
app = Flask(__name__)
@app.route('/api/talking', methods = ['POST'])
def SingleLogoApi1():
try:
recommendId = request.get_json().get("recommendId")
print(recommendId)
isSuss, talkings = talk(recommendId)
if isSuss:
return json.dumps({"status": 0, "msg": "成功", "data": talkings}, ensure_ascii=False)
else:
return json.dumps({"status": -1, "msg": "返回数据为空", "data": {}}, ensure_ascii=False)
except:
return json.dumps({"status": -1, "msg":"调用服务出错","data": {}}, ensure_ascii=False)
# 服务器接口API
# app = Flask(__name__)
def talking(server): def talking(server):
@server.route('/api/talking', methods = ['POST']) @server.route('/api/talking', methods = ['POST'])
def SingleLogoApi1(): def SingleLogoApi1():
try: try:
recommendId = request.get_json().get("recommendId") recommendId = request.get_json().get("recommendId")
print(recommendId)
isSuss, talkings = talk(recommendId) isSuss, talkings = talk(recommendId)
if isSuss: if isSuss:
return json.dumps({"status": 0, "msg": "成功", "data": talkings}, ensure_ascii=False) return json.dumps({"status": 0, "msg": "成功", "data": talkings}, ensure_ascii=False)
else: else:
return json.dumps({"status": -1, "msg": "返回数据为空", "data": {}}, ensure_ascii=False) return json.dumps({"status": -1, "msg": "返回数据为空", "data": {}}, ensure_ascii=False)
except: except:
return json.dumps({"status": -1, "msg": "调用服务出错", "data": {}}, ensure_ascii=False) return json.dumps({"status": -1, "msg":"调用服务出错","data": {}}, ensure_ascii=False)
# 服务器接口API 根据推荐名字
def talking_product(server): def talking_product(server):
@server.route('/api/talkingName', methods=['POST']) @server.route('/api/talkingName', methods=['POST'])
def SingleLogoApi(): def SingleLogoApi():
...@@ -91,10 +88,7 @@ def talking_product(server): ...@@ -91,10 +88,7 @@ def talking_product(server):
else: else:
return json.dumps({"status": -1, "msg": "返回数据为空", "data": {}}, ensure_ascii=False) return json.dumps({"status": -1, "msg": "返回数据为空", "data": {}}, ensure_ascii=False)
except: except:
return json.dumps({"status": -1, "msg": "调用服务出错", "data": {}}, ensure_ascii=False) return json.dumps({"status": -1, "msg":"调用服务出错","data": {}}, ensure_ascii=False)
# if __name__ == '__main__':
# CORS(app, supports_credentials=True)#允许跨域
# # app.run(host='172.16.18.2', port=15501, debug=True)
# app.run(host='127.0.0.1', port=5000, debug=True)
# talk("商标注册") # talk("商标注册")
\ No newline at end of file
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>gsb_recomm</title><link href=/assets/css/chunk-15340143.9594b44b.css rel=prefetch><link href=/assets/js/chunk-15340143.0b15e051.js rel=prefetch><link href=/assets/css/app.f89c7511.css rel=preload as=style><link href=/assets/js/app.47dac23e.js rel=preload as=script><link href=/assets/js/chunk-vendors.a861e867.js rel=preload as=script><link href=/assets/css/app.f89c7511.css rel=stylesheet></head><body><noscript><strong>We're sorry but gsb_recomm doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/assets/js/chunk-vendors.a861e867.js></script><script src=/assets/js/app.47dac23e.js></script></body></html> <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>gsb_recomm</title><link href=/assets/css/chunk-15340143.9594b44b.css rel=prefetch><link href=/assets/js/chunk-15340143.1942c530.js rel=prefetch><link href=/assets/css/app.f89c7511.css rel=preload as=style><link href=/assets/js/app.57bca242.js rel=preload as=script><link href=/assets/js/chunk-vendors.a861e867.js rel=preload as=script><link href=/assets/css/app.f89c7511.css rel=stylesheet></head><body><noscript><strong>We're sorry but gsb_recomm doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/assets/js/chunk-vendors.a861e867.js></script><script src=/assets/js/app.57bca242.js></script></body></html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment